Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

servlet path

 
Manon Baratt
Ranch Hand
Posts: 58
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have an application I was running in Eclipse using Tomcat. I used index.jsp which redirected to a servlet. When I try to run this application in RAD using the WebSphere App server, I get a 500 error. My servlets are stored under Java Resources/JavaSource. What changes do I make to web.xml to get this working?

Thanks.
 
Prabhu Venkatachalam
Ranch Hand
Posts: 502
Java jQuery Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Seems like URL is wrong.

Check web.xml entry and .jsp form URL entry matches.
[ December 27, 2006: Message edited by: Prabhu Venkatachalam ]
 
Manon Baratt
Ranch Hand
Posts: 58
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here is the requestdispatcher line I use in my index.jsp.

RequestDispatcher rd = request.getRequestDispatcher("servlet/MyServlet");
rd.forward(request, response);

This soultion worked under Tomcat.
 
Manon Baratt
Ranch Hand
Posts: 58
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I mistyped the lines. Below is the correct lines.

RequestDispatcher rd = request.getRequestDispatcher("/MyServlet");
rd.forward(request, response);
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic