You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Srinivasu Gandu <SG...@SoftwareSpecialists.com> on 2003/04/11 17:54:56 UTC

RequestDispatcher rd = getServletContext().

Hi all,
 RequestDispatcher rd =
getServletContext().getRequestDispatcher("TestServlet?callist="+tab_name); 
 rd.forward(request,response);
when I am trying to access the servlet called by my control servlet I am
getting the following exception... even if I give "/" before the path it can
not see that.. what should be my path settings..??
"
java.lang.IllegalArgumentException: Path
TestServlet?callist=administrativeservices does not start with a "/"
character at
org.apache.catalina.core.ApplicationContext.getRequestDispatcher(Application
Context.java:590) 

"

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: RequestDispatcher rd = getServletContext().

Posted by Tim Funk <fu...@joedog.org>.
Request dispatchers from getServletContext() must be obtained with an 
absolute path.

Request dispatchers from ServletRequest can be obtained with an relative path.

-Tim

Srinivasu Gandu wrote:
> Hi all,
>  RequestDispatcher rd =
> getServletContext().getRequestDispatcher("TestServlet?callist="+tab_name); 
>  rd.forward(request,response);
> when I am trying to access the servlet called by my control servlet I am
> getting the following exception... even if I give "/" before the path it can
> not see that.. what should be my path settings..??
> "
> java.lang.IllegalArgumentException: Path
> TestServlet?callist=administrativeservices does not start with a "/"
> character at
> org.apache.catalina.core.ApplicationContext.getRequestDispatcher(Application
> Context.java:590) 
> 
> "
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org