my dog learned polymorphism*
The moose likes Servlets and the fly likes Map JSP to servlet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Map JSP to servlet" Watch "Map JSP to servlet" New topic
Author

Map JSP to servlet

Adam Teg
Ranch Hand

Joined: Feb 09, 2006
Posts: 36
Hi,
When a person clicks on link that is href="http://localhost:8080/ETest/jsp/AddQA.jsp"

I want it to go to a servlet
<servlet>
<servlet-name>AddQAAction</servlet-name>
<servlet-class>com.etest.action.AddQAAction</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>AddQAAction</servlet-name>
<url-pattern>/AddQA.jsp</url-pattern>
</servlet-mapping>

I am getting HTTP Status 404 - /jsp/AddQA.jsp

What am I doing wrong?
Thanks
Adam Teg
Ranch Hand

Joined: Feb 09, 2006
Posts: 36
By the way I have tried different combination for <url-pattern>

Thanks
huisheng xu
Greenhorn

Joined: Mar 04, 2006
Posts: 2
<servlet-mapping>
<servlet-name>AddQAAction</servlet-name>
<url-pattern>/jsp/AddQA.jsp</url-pattern>
</servlet-mapping>

try this way.
Adam Teg
Ranch Hand

Joined: Feb 09, 2006
Posts: 36
Thanks, I was sure I tried that..guess not.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Map JSP to servlet