Win a copy of The Business Blockchain this week in the Cloud forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

General question.

 
Rohit Kelkar
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1. Will a servlet mapping
<servlet-mapping>
<servlet-name>reportServlet<servlet-name>
<url-pattern>report</url-pattern>
</servlet-mapping>
work for http://www.something.com/report?
2. Will a servlet mapping
<servlet-mapping>
<servlet-name>reportServlet<servlet-name>
<url-pattern>/report/</url-pattern>
</servlet-mapping>
ever be useful?
Haven't tried them.
 
Vedhas Pitkar
Ranch Hand
Posts: 445
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I think the first one wont work while the second one will work.I also didnt try it out,am a bit lazy ,I guess.
 
Rohit Kelkar
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you suggest a example for the 2nd one?
I can't think of one.
 
R K Singh
Ranch Hand
Posts: 5384
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
http://www.yourDomainName.com/yourServletContext/report/someURI should call *reportServlet*
CMIW
 
Rohit Kelkar
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Tried both of them and both of the mappings did work. I cannot think of any explaination why those worked !!!
 
yi zhu
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The first one does not work (with Tomcat)!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic