*
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes General question. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "General question." Watch "General question." New topic
Author

General question.

Rohit Kelkar
Ranch Hand

Joined: Sep 16, 2002
Posts: 38
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

Joined: Jan 27, 2001
Posts: 445
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

Joined: Sep 16, 2002
Posts: 38
Can you suggest a example for the 2nd one?
I can't think of one.
R K Singh
Ranch Hand

Joined: Oct 15, 2001
Posts: 5371
http://www.yourDomainName.com/yourServletContext/report/someURI should call *reportServlet*
CMIW


"Thanks to Indian media who has over the period of time swiped out intellectual taste from mass Indian population." - Chetan Parekh
Rohit Kelkar
Ranch Hand

Joined: Sep 16, 2002
Posts: 38
Tried both of them and both of the mappings did work. I cannot think of any explaination why those worked !!!
yi zhu
Ranch Hand

Joined: Sep 10, 2002
Posts: 41
The first one does not work (with Tomcat)!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: General question.