Thanks for the info, I'll try adding "/servlets/" (and maybe "/servlet/") in
the jsp code today
to see if tomcat finds the .class files.

BTW, I managed to get around this, by putting everything in the same
directory:
the jsp and the .class (just for testings, as I don't really like this
solution).

Now, I get the error message below although the call to the servlet is the
first line
of the jsp...  if ever you have a clue on this, just let me know. The code
for the
jsp itself, very simple, is shown below.

Thanks
--Christophe

***** The code of the JSP is: *****
<%
  RequestDispatcher rd = request.getRequestDispatcher("Servlet1.class");
  rd.forward(request, response);
%>
<HTML><HEAD><TITLE>Jsp1</TITLE></HEAD>
<BODY>test body</BODY>
</HTML>

***** the error message I get is: *****
Error: 500 Location: /jbproject/projCpb3/cpb3/Servlet1.class
Internal Servlet Error:java.lang.IllegalStateException: OutputStream is
already being used for this request
 at org.apache.tomcat.core.ResponseImpl.getWriter(ResponseImpl.java:210)
 at
org.apache.tomcat.core.HttpServletResponseFacade.getWriter(HttpServletRespon
seFacade.java:148)
 at org.apache.jasper.runtime.JspWriterImpl.initOut(JspWriterImpl.java:154)
 at
org.apache.jasper.runtime.JspWriterImpl.flushBuffer(JspWriterImpl.java:146)
 at org.apache.jasper.runtime.JspWriterImpl.flush(JspWriterImpl.java:191)
 at
jbproject.projCpb_00033.cpb_00033._0002fjbproject_0002fprojCpb_00033_0002fcp
b_00033_0002fJsp_00031_0002ejspJsp1_jsp_8._jspService(_0002fjbproject_0002fp
rojCpb_00033_0002fcpb_00033_0002fJsp_00031_0002ejspJsp1_jsp_8.java:71)
 at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:126)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
 at
org.apache.jasper.runtime.JspServlet$JspServletWrapper.service(JspServlet.ja
va:174)
 at org.apache.jasper.runtime.JspServlet.serviceJspFile(JspServlet.java:261)
 at org.apache.jasper.runtime.JspServlet.service(JspServlet.java:369)
 at
com.borland.jbuilder.webserverglue.tomcat.jsp.JspLoaderEcho.service(Unknown
Source)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
 at
org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java:503)


> -----Message d'origine-----
> De:   Nils Janson [SMTP:[EMAIL PROTECTED]]
> Date: mercredi 14 février 2001 18:19
> À:    [EMAIL PROTECTED]
> Objet:        Re: JSP/Servlets and JBuilder 4 paths problem
>
> hi,
>
> The default path for servlets in tomcat is /servlets/<our_servlet>.
>
> So I recommend that you try this
>
> myRequestDispatcher =
> request.getRequestDispatcher("/servlets/myPackage.Servlet1");
>
> Check the web.xml file under <tomcat_home>/conf
>
> You can also add a web.xml for your project by adding the directory
> WEB-INF to your project root and put the web.xml file there.
>
> I hope this is to some help.
>
> /Nils
>
> >-----Original Message-----
> >From: Christophe Dubourg [mailto:[EMAIL PROTECTED]]
> >Sent: Wednesday, February 14, 2001 9:36 AM
> >To: [EMAIL PROTECTED]
> >Subject: JSP/Servlets and JBuilder 4 paths problem
> >
> >
> >Hi, I'm writing a JSP which must call different servlets,
> >using the requestDispatcher.forward() function.
> >
> >The servlet engine has problems finding the servlets.
> >I have problems with the paths : the server integrated into JBuilder
> >(tomCat) just can't find the servlet, although I have added almost
> >everything in my classpath and in the project's search paths.
> >
> >my jsp contains a line like this:
> > myRequestDispatcher =
> >request.getRequestDispatcher("myPackage.Servlet1");
> > myRequestDispatcher.forward();
> >
> >and I have Servlet1.class in the /classes/mypackage/ directory.
> >
> >Any idea how to tell tomCat to find the file mypack.Servlet1.class ?
> >
> >FYI, the files are organized like this (JBuilder 4 default)
> >
> >myProject/
> >     src/
> >             myPackage/
> >                     jsp1.jsp
> >                     Servlet1.java
> >      classes/
> >             myPackage/
> >                     Servlet1.class
> >
> >Thanks for any help on this
> >--Christophe
> >
> >=================================================================

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to