• Post Reply Bookmark Topic Watch Topic
  • New Topic

Internal Server 500 error: No context configured to process this request  RSS feed

 
Ritesh Agrawal
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Here is the environment:

Tomcat 4.0.5 running on Windows XP

Directory structure
===================
PlayerApp
|---> player
|-----> player_component.jsp
|---> WEB-INF
|-----> web.xml
|-----> classes
|----- player/player_component.class
|------ com/player/PlayerServlet.class

WAR File Name
==============
PlayerApp.war

<<web.xml>>


Servlet Code layerServlet.java
============

getServletContext().getRequestDispatcher("/player/player_component.jsp").forward(request,response);

Problem Description:
====================

The JSPs have been precopiled and placed in WEB-INF/classes folder.
The precompiler generates the web.xml automatically.

The PlayerServlet is called when a button is clicked on a JSP page. This PlayerServlet tries to forward the request to playre-componet.jsp page. That is where I get the 500 page with a message:

=======
type Status report

message No Context configured to process this request

description The server encountered an internal error (No Context configured to process this request) that prevented it from fulfilling this request.
========

I am not sure about the way getServletContext().getRequestDispatcher() works.

Is it that, since the PlayerServlet is under context /servlet and the precompiled JSP is under /player I am facing this problem.

Please advice.

Thanks
Ritesh
 
Bosun Bello
Ranch Hand
Posts: 1512
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I did not see a <jsp-file> element in your web.xml. The request dispatcher should be referencing the associated URL.
 
geeta lalchandani
Ranch Hand
Posts: 118
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
according to me...

getServletContext().getRequestDispatcher("/playerApp/player/player_component.jsp").forward(request,response);
should work...

coz request dispatcher takes the path relative to the application context
if you use..
getRequest().getRequestDispatcher();
it will take the path relative to the request.

hope it helps
 
Ritesh Agrawal
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks pals,

It worked now. I used

getServletContext().getRequestDispatcher("/player/player_component.jsp").forward(request,response);

This is same as before, but the problem was with the server.xml file. :-)

The context was configured wrongly. I apologize for the goof up. I was looking for the problem at a wrong place.

Thanks for your help.

Regards
Ritesh
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!