Jann
 Somebody did reply to my question .Here is what i got.......
------
Hello:
>From what I can tell:
(1) In your PronServlet.java service() method, you are manually parsing the
form data using the stream returned by request.getInputStream()
(2) In the JSP page, Tomcat is attempting to parse the form data again.
The servlet API docs specify that you can only call getInputStream() once
on a request, and that doing so may cause problems reading parameters, so I
suspect that's the source of your problem. I'm not entirely sure why the
generated JSP servlet is trying to read the parameters. Perhaps you're using
the parameters in the JSP page, or perhaps the JSP engine just reads it by
default, which would seem reasonable to me.
The simple workaround would be not to parse the form data in your
PronServlet, but to just use request.getParameter() and let Tomcat handle
it. That's the way I've done it in the past, and haven't had problems.
---
thanks
Srinivas


-----Original Message-----
From: Jann VanOver [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, July 18, 2001 3:39 PM
To: '[EMAIL PROTECTED]'
Subject: RE: Problem with JSP mapping to subdirectory


That should have said "servlet mapping"
-----Original Message-----
From: Jann VanOver 
Sent: Wednesday, July 18, 2001 3:37 PM
To: '[EMAIL PROTECTED]'
Subject: RE: Problem with JSP mapping to subdirectory


Please look at Web.XML.  You need TWO elements in Web.xml for each server mapping you 
want to set up.
-----Original Message-----
From: Renato Weiner [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, July 18, 2001 3:35 PM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: Problem with JSP mapping to subdirectory


Hi all,

I'm having a problem using JSP/Servlets in a subdirectory other than root.
To whomever want to test these are the steps:
- httpd.conf:
<VirtualDomain .... >
JkMount /test/*.jsp ajp12
JkMount /servlet_test/* ajp12
</VirtualDomain>
- server.xml
<RequestInterceptor
            className="org.apache.tomcat.request.InvokerInterceptor"
            debug="9" prefix="/servlet_test/" />
....
<Host name="www.name.com">
 <Context path="" docBase="/home/name/public_html/test" debug="9" crossContext="false" 
reloadable="true" />
</Host>
I can run a servlet since it loads the right web.xml in test.
log: 
2001-07-18 19:27:17 - Ctx( ... ): Reading /home/name/public_html/test/WEB-INF/web.xml
URL:
http://www.name.com/servlet_test/MyServlet
But when I try to run a JSP I got a 404 error message. Looking at the logs:
2001-07-18 19:29:18 - Ctx( ... ): Get real path /test/Hello.jsp /home/name/
/public_html/test/test/Hello.jsp /home/name/public_html/test
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2001-07-18 19:29:18 - Ctx( ... ): 404 R(  + /test/Hello.jsp + null) JSP file not found
URL: 
http://www.name.com/test/Hello.jsp
Am I doing something wrong ? Or is it a problem??
Renato.





Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail - only $35 a year!
http://personal.mail.yahoo.com/

Reply via email to