• Post Reply Bookmark Topic Watch Topic
  • New Topic

mapping the root directory servlet for your webapp  RSS feed

 
Jeff Storey
Ranch Hand
Posts: 230
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, I have a web application deployed to Tomcat, call myapp. I would like it when visitors come to http://myserver/myapp/ that they are directed to a specific servlet (i.e. my servlet mapping file should handle this URL pattern and redirect appropriately). If I do something like this:



This seems to map any unhandled URL. My current solution is to create a dummy index.html page that is empty and map index.html to rootServlet. This way when a visitor hits the root of the site, they are directed to index.html and then onto rootServlet. Is there a better way to do this?

Thanks,
Jeff
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65833
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Research the "welcome file" setting of the deployment descriptor.
 
Jeff Storey
Ranch Hand
Posts: 230
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks, appreciate the help!

Jeff
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!