Title: Error with using certain methods
Make sure that you do not have the /my_app in your sHTMLLocation variable.
If the code is in a JSP, though, I believe you should have the /my_app prefix
to the location of your other "included" or "forwarded to" JSP.
 
I have working code in my servlets of the following template:
  String location = "/jsp/mycode.jsp";
  RequestDispatcher dispatcher = req.getRequestDispatcher(location);
  dispatcher.forward(req, res);
where my jsps are located in a directory
 $TOMCAT_HOME/webapps/my_app/jsp/
 
Hope this helps,
 
RK

 
 -----Original Message-----
From: Richey, Ross [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, December 20, 2000 12:56 PM
To: [EMAIL PROTECTED]
Subject: Error with using certain methods

We have a whole bunch of code which was developed using VisualAge on Windows NT.  Now we are attempting to move these pages to a server running RedHat Linux 7.0, Tomcat 3.1.1, Sun Java 2 SDK 1.3, Apache 1.3.14 + mod_ssl.  The following code segment illustrates code that works fine under VisualAge, but fails under Tomcat.  When this JSP to JSP code is called it returns a 404 page not found error which seems to indicate a problem with the forward method.  Is this a known-problem and if so what is the best work-around. 

---------------------------------------------------------              
        }
        else
        if (req.getParameter("btnJSPToJSP") != null) {
                //call using forward JSP
                rd = getServletContext().getRequestDispatcher(sHTMLLocation + "Test2.jsp");
                if (rd != null) rd.forward(req, res);
                else System.out.println("rd = null");          
        }      
---------------------------------------------------------

Any help is appreciated.

Ross Richey
Webmaster www.aruplab.com
[EMAIL PROTECTED]

Reply via email to