To shorten the Tomcat application URL

To shorten the Tomcat server application URL currently we are using long form of http://localhost:8080/[blazeds]/myapp/application.html

  1. First we need to remove the port Numbers of tomcat by configuring the server.xml in tomcat ../conf/server.xml

<!–<Connector port=”8080″ protocol=”HTTP/1.1″

connectionTimeout=”20000″

redirectPort=”8443″ />

–>

<Connector port=”80″ protocol=”HTTP/1.1″

connectionTimeout=”20000″

redirectPort=”8443″ />

the commented one which we used currently , the new one is just remove the port number as 8080 as 80 .

so that you can access the tomcat path in URL like http://localhost

  1. To shorten the URL just copy  [myapp] flex application files into the [blazeds]
  1. Rename the [blazeds] folder as [myapp] (your favourite Name)
  1. Change the content.xml in myapp folder

<?xml version=”1.0″ encoding=”utf-8″?>

<content>

<page location=”URL”>

<text>http://localhost/ myapp /messagebroker/amf</text>

</page>

<page location=”URL1″>

<text>http://localhost/ myapp /jasperReport.jsp</text>

</page>

</content>

  1. Restart the tomcat Server.
  1. Now you can access your application http://localhost/ myapp / myapp.html

If you want to avoid myapp.html file name rename the file as index.html

You can access your application like http://localhsot/ myapp

Referred URL

  1. http://www.coderanch.com/t/81669/Tomcat/remove-port-number-URL
  2. http://www.coderanch.com/t/87915/Tomcat/tomcat-define-context-root-name
  3. http://www.velocityreviews.com/forums/t370192-tomcat-redirect-localhost.html
Advertisement

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.