• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Map JSP to servlet

 
Adam Teg
Ranch Hand
Posts: 36
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 36
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
By the way I have tried different combination for <url-pattern>

Thanks
 
huisheng xu
Greenhorn
Posts: 2
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
<servlet-mapping>
<servlet-name>AddQAAction</servlet-name>
<url-pattern>/jsp/AddQA.jsp</url-pattern>
</servlet-mapping>

try this way.
 
Adam Teg
Ranch Hand
Posts: 36
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks, I was sure I tried that..guess not.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic