No, on the contrary, is sounds like you need to remove some libs. ;)
This sounds like a classic case of library shadowing, where an older lib
in the path becomes visible instead of the newer version. Remove the
JSDK jar files from your classpath and add orion.jar to it instead. orion.jar
contains the Servlet 2.2 and JSP 1.1 API.

Hope it helps :)

/Magnus Stenman, the Orion team
http://www.orionserver.com


> Hi,
>
> When I try use RequestDispatcher to forward to another page I get a
> compilation error (Class RequestDispatcher not found).  I have got JSDK2.0,
> Orion Web Server and JDK 1.2.2.
>
> The file compiled is
>
> import java.io.*;
> import javax.servlet.*;
> import javax.servlet.http.*;
> import java.util.*;
>
> public class SessionTracking extends HttpServlet
> {
>
>         public void doPost (    HttpServletRequest      request,
> HttpServletResponse response )
>                 throws ServletException, IOException
>         {
>                 PrintWriter             out;
>                 String                  title = "MyServlet Output";
>
>             String username=" ";
>
>             HttpSession session = request.getSession(true);
>                 SessionValue sesval
> =(SessionValue)session.getValue(session.getId());
>                 username = sesval.getSessionUser();
>
>                 response.setContentType("text/html");
>
>                 RequestDispatcher dispatcher =
> getServletContext().getRequestDispatcher("/servlet/SelectServletBean");
>                 dispatcher.forward(request, response);
>
>                 out = response.getWriter();
>                 out.println("<HTML><HEAD><TITLE>");
>                 out.println(title);
>                 out.println("</TITLE></HEAD><BODY>");
>                 out.println("<H1>" + title + "</H1>");
>                 out.println("<H2> You are " + username + ". I can remember
> you. </H2>");
>
>
>                 out.println("<P>This is output from." + getClass().getName()
> );
>                 out.println("</BODY></HTML>");
>                 out.close();
>         }
>
> }
>
>
> The errors reported are:
>
> 1. Class RequestDispatcher not found
> 2. Method getRequestDispatcher(java.lang.string) not found in interface
> javax.servlet.ServletContext.
>
> Do i need to import any additional libraries?
>
> Thanks in advance.
>
> Regards,
>
> Vaidya
>
> ===========================================================================
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
> FAQs on JSP can be found at:
>  http://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.html

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html

Reply via email to