• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to change application url by meaningfull name?

 
Yatish Sonkeshariya
Greenhorn
Posts: 16
Hibernate Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I just want to change my Java-Webapp url and webapp deployed in Tomcat-6.0 i.e i want to change webapp-url from http://localhost:8080/mywebapp to http://yatish/mywebapp.

Also i want to authenticate my webapp using Tomcat.

 
Tim Holloway
Saloon Keeper
Pie
Posts: 18212
53
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There are 2 ways to simplify the URL. One is to modify Tomcat's server.xml to use port 80 rather than its default of 8080 and to install the webapp in place of Tomcat's default root webapp.

The other way is to proxy Tomcat. The Apache HTTP server is often used to do this using either the old mod_jk connector or the newer Apache mod_proxy.

The second way has the advantage of keeping port 80 available for non-Java webapps and it minimizes the amount of customization needed to the Tomcat configuration and app deployment. The price is that you're now running 2 servers instead of 1.

The first way eliminates that expense, but the price is that you cannot just use Tomcat in its "out-of-the-box" configuration.
 
Tim Holloway
Saloon Keeper
Pie
Posts: 18212
53
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As for J2EE (Tomcat) security, the best place to start is any good book on servlets and JSPs. Read up on setting up web.xml for secure transport, security roles, and secured URLs. That will tell you what you need on the application side.

On the Tomcat side you simply deploy with a security Realm configured into the application Context. There are a number of Realm plugins that come with Tomcat, including JDBC, LDAP, and JAAS. There's also a simpler set of MemoryRealms that make testing easier by allowing you to define user IDs, passwords and security roles in an XML file (tomcat-users.xml).
 
Yatish Sonkeshariya
Greenhorn
Posts: 16
Hibernate Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Tim for reply.
Could you explain both way to achieve this goal, step by step?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic