Just converted from Tomcat 3.0 to Orion and we were experiencing this
problem

A solution that worked for us is to use

getServletConfig().getServletContext().getRequestDispatcher("theUrl");

I still dont know why this actually works but it does.

Another possible reason is that the JSP/Servlet that is executing the
getRequestDispatcher() isnt in your application's context

Try doing the following to see

String path =
getServletConfig().getServletContext().getRealPath("/adirectory");
System.out.println("Context: "+ reportPath);


This usually helps me debug context problems. As you can see I am definitely
no expert with contexts.

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Ferghil
O'Rourke
Sent: Tuesday, 25 April 2000 2:37
To: Orion-Interest
Subject: Problems with URL to getRequestDispatcher()


Hi.
Anyone experienced problems using getRequestDispatcher() with orion?
The following returns null for me for 'dispatcher'

 RequestDispatcher dispatcher;

 ServletContext sc = getServletContext();
 dispatcher =
sc.getRequestDispatcher("/controller-web/controller_move.jsp");

 if (dispatcher != null)
     dispatcher.forward(req, res);
 else
     System.out.println("Request dispatcher == null");


I have a feeling that it has something to do with the relative
URL passed to getRequestDispatcher. In an orion application setup what
should this be? I'm developing an app called "controller" with JSPs,
servlets and beans. All my class files for the beans and servlets are
under the root \orion\lib\com... directory.
All my JSPs however are under the root /controller/controller-web
directory. So I use the URL above.

Is this the correct one? I know this URL specification must begin
with "/" and is relative to the app's root dir, which I'm assuming
here to be /controller. Perhaps I have to place the JSPs somewhere
under /orion ?
Any help appreciated.
Thanks,
Ferghil O'Rourke




Reply via email to