This week's book giveaway is in the Java 8 forum.
We're giving away four copies of Java 8 in Action and have Raoul-Gabriel Urma, Mario Fusco, and Alan Mycroft on-line!
See this thread for details.
The moose likes Tomcat and the fly likes URL mapping Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "URL mapping" Watch "URL mapping" New topic
Author

URL mapping

Bala RThiagarajan
Greenhorn

Joined: Dec 21, 2007
Posts: 8
Hi,
For my app, i have a req. where in i have to use different URLs and map the same app..

For example

http://localhost:8080/app/group1/home.do
http://localhost:8080/app/group2/home.do
http://localhost:8080/app/group3/home.do
http://localhost:8080/app/group4/home.do

all should point to the same action calss. i am not sure about how to have URL mapping like this. can any one suggest me..?
arulk pillai
Author
Ranch Hand

Joined: May 31, 2007
Posts: 3216
In your web.xml




http://www2.roguewave.com/support/docs/leif/leif/html/servletug/7-3.html


Java Interview Questions and Answers Blog | Amazon.com profile | Java Interview Books
Bala RThiagarajan
Greenhorn

Joined: Dec 21, 2007
Posts: 8
Hi thanks for you rpley ,

But when
I made /app as the context root and added /group*/*.do in the servlet mapping part of the WEB.xml. But when try to access the app using

http://localhost:8080/app/group1/home.do i am getting a 404 error..
am i missing some thing here..?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: URL mapping
 
Similar Threads
needs help in adding nodes from database
Fundamental struts question
Include file doubt?
Use welcome-file-list to run struts action?
JBoss running ?