• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

How to change application url by meaningfull name?

 
Greenhorn
Posts: 16
Hibernate Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.

 
Saloon Keeper
Posts: 27808
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Posts: 27808
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Tim for reply.
Could you explain both way to achieve this goal, step by step?
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic