It's not a secret anymore!
The moose likes Tomcat and the fly likes Configuring http://localhost in Tomcat/Eclipse Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Configuring http://localhost in Tomcat/Eclipse" Watch "Configuring http://localhost in Tomcat/Eclipse" New topic

Configuring http://localhost in Tomcat/Eclipse

D Taylor

Joined: Jun 10, 2008
Posts: 8

If I have an application running on Tomcat 5.5 through Eclipse which allows me to see my app by connecting to http://localhost:8080/myapp/index.jsp, how can I configure the system to direct to my app automatically if the user just goes to http://localhost?

I've seen this done before and I've heard of other people talking about it, but I can't see which settings I need to alter to achieve it.

The reason I'm asking is that until yesterday all my applications were working fine by just browsing to http://localhost, but suddenly something has changed and the address no longer works. I know the server is running fine because I can go to http://localhost:8080/myapp/index.jsp and my page is still there - but as the 'redirect' isn't working and all my urls are relative, none of my includes or CSS are picking up any more. :-/

I've looked in the usual places such as web.xml and httpd.conf, but cannot think of anything I've changed in those files at all.

Many thanks!

I agree. Here's the link:
subject: Configuring http://localhost in Tomcat/Eclipse
jQuery in Action, 3rd edition