problems connecting to MS Access when Tomca3.2 runs as service

2002-03-19 Thread Sampige, Srinivas

Hi

I am running  Tomcat3.2 on Windows2000. I am facing a problem when I try
to connect (from a Servlet) to an MS Access database when Tomcat is running
as an NT service. When I manually run Tomcat from the console the same
servlet works perfectly. The link
http://www.apachelabs.org/tomcat-user/200101.mbox/%3COFB012A4B8.0583C846-ONC
[EMAIL PROTECTED]%3E discusses the problem where the
driver is not getting loaded. But, the error I get is different -

--
SQL EXCEPTION OCCURRED CONNECTING TO DB -[Microsoft][ODBC Microsoft Access
Driver] The Microsoft Jet database engine cannot open the file '(unknown)'.
It is already opened exclusively by another user, or you need permission to
view its data.
--
 so it seems like the drivers are getting loaded. I am unable to figure out
the problem. Any help would be greately appreciated. I looked at the ODBC
data source that I have created but found nothing that is out of place.

thanks
Srinivas 


--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




Class.forName() crashing Tomcat4.0

2002-04-11 Thread Sampige, Srinivas

Hi 

   Iam using Tomcat4.0 on Win2K . My web appliation that was connecting
to DB2 was working fine on Tomcat3.2. I am using JDK1.3.1 to compile my
application. But when I port the application to run under Tomcat4.0 the
section of my code that loads the DB2 driver fails and causes Tomcat4.0 to
crash. From the stack trace I identified that the code is failing at line 79
of my class and that line is  where I am loading the driver by calling
Class.forName(). Here is the code snippet followed by the stack trace -

Code Snippet-
---
String driverClass = "COM.ibm.db2.jdbc.app.DB2Driver";
Class.forName(driverClass);
con =
DriverManager.getConnection("jdbc:db2:DB2DT10","idb4459","dbusr55");
//SECTION FOR TOMCAT -
--

Stack Trace :
java.lang.NoSuchFieldError: numBytesRead
at COM.ibm.db2.jdbc.app.DB2Driver.SQLAllocEnv(Native Method)
at COM.ibm.db2.jdbc.app.DB2Driver.(DB2Driver.java:234)
at COM.ibm.db2.jdbc.app.DB2Driver.(DB2Driver.java:119)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:120)
at
com.boeing.pron.beans.PronCommunicator.sendRequest(PronCommunicator.java:79)
at
com.boeing.pron.beans.PronCommunicator.ping(PronCommunicator.java:365)
at
com.boeing.pron.servlets.PingServlet.handleApplicationEvent(PingServlet.java
:36)
at com.boeing.pron.servlets.PronServlet.service(PronServlet.java:88)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:1264)
at
org.apache.catalina.servlets.InvokerServlet.serveRequest(InvokerServlet.java
:439)
at
org.apache.catalina.servlets.InvokerServlet.doPost(InvokerServlet.java:216)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:1145)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:1264)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:247)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:193)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:243)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
va:215)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase
.java:472)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
64)
at
org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:2
46)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
64)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2366)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164
)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:462)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
64)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
:163)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at
org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:
1005)
at
org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1098
)
at java.lang.Thread.run(Thread.java:484)


thanks
Srinivas

--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




RE: Class.forName() crashing Tomcat4.0

2002-04-11 Thread Sampige, Srinivas

Hi David
 Isn't it enough for it to be under the WEB-INF/lib folder of my web
application? That is how I have it.

thanks
Srinivas

-Original Message-
From: David Lu [mailto:[EMAIL PROTECTED]]
Sent: Thursday, April 11, 2002 4:59 PM
To: Tomcat Users List
Subject: Re: Class.forName() crashing Tomcat4.0



chances are tomcat was not able to find your driver.  be sure to
have a copy of your driver class (the jar file) in 
$JAKARTA_HOME/common/libs
directory.

   - david -

On 2002.04.11 16:43 "Sampige, Srinivas" wrote:
> Hi
> 
>Iam using Tomcat4.0 on Win2K . My web appliation that was
> connecting
> to DB2 was working fine on Tomcat3.2. I am using JDK1.3.1 to compile
> my
> application. But when I port the application to run under Tomcat4.0
> the
> section of my code that loads the DB2 driver fails and causes
> Tomcat4.0 to
> crash. From the stack trace I identified that the code is failing at
> line 79
> of my class and that line is  where I am loading the driver by calling
> Class.forName(). Here is the code snippet followed by the stack trace
> -


--
To unsubscribe:   <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>

--
To unsubscribe:   <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>




RE: Class.forName() crashing Tomcat4.0

2002-04-11 Thread Sampige, Srinivas

Also ,my other Jar files are under WEb-INF/lib folder and they are being
found.

thanks
Srinivas

-Original Message-
From: David Lu [mailto:[EMAIL PROTECTED]]
Sent: Thursday, April 11, 2002 4:59 PM
To: Tomcat Users List
Subject: Re: Class.forName() crashing Tomcat4.0



chances are tomcat was not able to find your driver.  be sure to
have a copy of your driver class (the jar file) in 
$JAKARTA_HOME/common/libs
directory.

   - david -

On 2002.04.11 16:43 "Sampige, Srinivas" wrote:
> Hi
> 
>Iam using Tomcat4.0 on Win2K . My web appliation that was
> connecting
> to DB2 was working fine on Tomcat3.2. I am using JDK1.3.1 to compile
> my
> application. But when I port the application to run under Tomcat4.0
> the
> section of my code that loads the DB2 driver fails and causes
> Tomcat4.0 to
> crash. From the stack trace I identified that the code is failing at
> line 79
> of my class and that line is  where I am loading the driver by calling
> Class.forName(). Here is the code snippet followed by the stack trace
> -


--
To unsubscribe:   <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>

--
To unsubscribe:   <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>




RE: Class.forName() crashing Tomcat4.0

2002-04-11 Thread Sampige, Srinivas

David
 I tried your solution but it didn't work. Tomcat4.0 is still crashing. Any
other ideas?

thanks
-Srinivas

-Original Message-
From: David Lu [mailto:[EMAIL PROTECTED]]
Sent: Thursday, April 11, 2002 4:59 PM
To: Tomcat Users List
Subject: Re: Class.forName() crashing Tomcat4.0



chances are tomcat was not able to find your driver.  be sure to
have a copy of your driver class (the jar file) in 
$JAKARTA_HOME/common/libs
directory.

   - david -

On 2002.04.11 16:43 "Sampige, Srinivas" wrote:
> Hi
> 
>Iam using Tomcat4.0 on Win2K . My web appliation that was
> connecting
> to DB2 was working fine on Tomcat3.2. I am using JDK1.3.1 to compile
> my
> application. But when I port the application to run under Tomcat4.0
> the
> section of my code that loads the DB2 driver fails and causes
> Tomcat4.0 to
> crash. From the stack trace I identified that the code is failing at
> line 79
> of my class and that line is  where I am loading the driver by calling
> Class.forName(). Here is the code snippet followed by the stack trace
> -


--
To unsubscribe:   <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>

--
To unsubscribe:   <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>




Bug in Tomcat ? - forwarding HTTP request from a Servlet to a JSP

2001-07-17 Thread Sampige, Srinivas

Hi 
 Iam using tomcat 3.2.1 and i have a servlet "PronServlet" that extends from 
HttpServlet . Now i have a servlet "LogonServlet" that extends from servlet 
"PronServlet" (which has got common functionality like checking for a valid session 
;has common methods that perform functionality like forwarding HTTP request to another 
url). In "LogonServlet" i have some code that does some processing and finally 
forwards the HTTP request to a JSP .Iam getting an error which iam pasting below.I ran 
the same application on JRun and it works fine .I noticed that if i removed the 
subclassing and instead subclassed LogonServlet directly from HttpServlet then the 
application works fine by forwarding the request to the next JSP .Here is the console 
output .Iam attaching the source code of
 PronServlet and LogonServlet .Anybody from the Tomcat dev team any ideas. ?

--
Creating a session for the user...
Forwarding request to the MENU page...
2001-07-17 02:17:22 - Ctx( /pron ): Exception in: R( /pron + /webUi/pronMenu.jsp + 
null) - java.lang.
IllegalArgumentException: Short Read
at javax.servlet.http.HttpUtils.parsePostData(HttpUtils.java:238)
at org.apache.tomcat.util.RequestUtil.readFormData(RequestUtil.java:101)
at org.apache.tomcat.core.RequestImpl.handleParameters(RequestImpl.java:691)
at org.apache.tomcat.core.RequestImpl.getParameterValues(RequestImpl.java:259)
at org.apache.tomcat.core.RequestImpl.getParameter(RequestImpl.java:250)
at 
org.apache.tomcat.facade.HttpServletRequestFacade.getParameter(HttpServletRequestFacade.ja
va:222)
at org.apache.jasper.servlet.JspServlet.preCompile(JspServlet.java:326)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:370)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404)
at org.apache.tomcat.core.Handler.service(Handler.java:286)
at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
at 
org.apache.tomcat.facade.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:194)
at 
com.boeing.pron.servlets.LogonServlet.handleApplicationEvent(LogonServlet.java:61)
at com.boeing.pron.servlets.PronServlet.service(PronServlet.java:56)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404)
at org.apache.tomcat.core.Handler.service(Handler.java:286)
at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
at 
org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:797)
at org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
at 
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandl
er.java:210)
at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498)
at java.lang.Thread.run(Thread.java:484)
--

 <>  <> 

 LogonServlet.java
 PronServlet.java


RE: Oracle JDBC in CLASSPATH for Tomcat 4.0

2001-07-17 Thread Sampige, Srinivas

put the zip file under "/lib" folder that you find under your tomcat 
installation.Should work without having to set the classpath because tomcat puts 
everything under /lib in classpath autmoatically when it starts up .

-Original Message-
From: Scott Brinker [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 17, 2001 3:19 PM
To: [EMAIL PROTECTED]
Subject: Oracle JDBC in CLASSPATH for Tomcat 4.0


I am trying to load the Oracle 8.1.7 thin client JDBC driver in a simple
servlet under Tomcat 4.0-b5. However, the following line:

  Class.forName("oracle.jdbc.driver.OracleDriver");

...keeps generating a ClassNotFoundException. I am running on Windows 2000,
and I have verified that the CLASSPATH environment variable is:

  D:\oracle\ora81\jdbc\lib\classes12.zip

...which is where the JDBC driver is. (I can write a stand-alone Java
application that loads that driver just fine, so I know it is where I think
it is.)

For what it's worth, I'm also running under JDK 1.3.1.

Do I have to do something special to have my web app recognize the system
CLASSPATH? Is there some place else I need to explicitly define it?

Many thanks,

Scott



RE: Oracle JDBC in CLASSPATH for Tomcat 4.0

2001-07-17 Thread Sampige, Srinivas

What i told you definitely works at least for the .jar files;from what you say it 
looks like Tomcat isn't picking up .zip files (i personally haven't tried it with .zip 
files).I would leave this question to be anwered by one of the Tomcat Dev Team members 
.But for now what i would try is -

 - edit the tomcat.bat found in the bin folder of the tomcat installation .Here is 
what the first  few lines look like(what is in red is what you need to add) :-

--->
rem - Save Environment Variables That May Change 

set _CP=%CP%
set _TOMCAT_HOME=%TOMCAT_HOME%
set _CLASSPATH=%CLASSPATH%

--->

Modify the last line as -
set _CLASSPATH=%CLASSPATH%;D:\oracle\ora81\jdbc\lib\classes12.zip


 Let me know if this helps.

-Srinivas

-Original Message-
From: John Hebert [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 17, 2001 3:46 PM
To: [EMAIL PROTECTED]
Subject: Re: Oracle JDBC in CLASSPATH for Tomcat 4.0


Scott Brinker wrote:

> Alas, it's still not finding it. I now have the classes12.zip in the
> following locations:
>
>   /jakarta-tomcat-4.0-b5/lib
>   /jakarta-tomcat-4.0-b5/common/lib
>   /jakarta-tomcat-4.0-b5/webapps/test/WEB-INF/lib
>
> ...(the latter being my web app), in addition to the CLASSPATH environment
> variable. Any other thoughts?
>


Can you confirm it is a valid archive ("jar -t classes12.zip")?

--
John Alex Hebert
[EMAIL PROTECTED]
System Engineer



Can somebody please reply to my previous email ?

2001-07-17 Thread Sampige, Srinivas

Here is the email is sent->

Sent: Tuesday, July 17, 2001 2:59 PM
To: [EMAIL PROTECTED]
Subject: Bug in Tomcat ? - forwarding HTTP request from a Servlet to a
JSP


Hi 
 Iam using tomcat 3.2.1 and i have a servlet "PronServlet" that extends from 
HttpServlet . Now i have a servlet "LogonServlet" that extends from servlet 
"PronServlet" (which has got common functionality like checking for a valid session 
;has common methods that perform functionality like forwarding HTTP request to another 
url). In "LogonServlet" i have some code that does some processing and finally 
forwards the HTTP request to a JSP .Iam getting an error which iam pasting below.I ran 
the same application on JRun and it works fine .I noticed that if i removed the 
subclassing and instead subclassed LogonServlet directly from HttpServlet then the 
application works fine by forwarding the request to the next JSP .Here is the console 
output .Iam attaching the source code of
 PronServlet and LogonServlet .Anybody from the Tomcat dev team any ideas. ?

--
Creating a session for the user...
Forwarding request to the MENU page...
2001-07-17 02:17:22 - Ctx( /pron ): Exception in: R( /pron + /webUi/pronMenu.jsp + 
null) - java.lang.
IllegalArgumentException: Short Read
at javax.servlet.http.HttpUtils.parsePostData(HttpUtils.java:238)
at org.apache.tomcat.util.RequestUtil.readFormData(RequestUtil.java:101)
at org.apache.tomcat.core.RequestImpl.handleParameters(RequestImpl.java:691)
at org.apache.tomcat.core.RequestImpl.getParameterValues(RequestImpl.java:259)
at org.apache.tomcat.core.RequestImpl.getParameter(RequestImpl.java:250)
at 
org.apache.tomcat.facade.HttpServletRequestFacade.getParameter(HttpServletRequestFacade.ja
va:222)
at org.apache.jasper.servlet.JspServlet.preCompile(JspServlet.java:326)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:370)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404)
at org.apache.tomcat.core.Handler.service(Handler.java:286)
at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
at 
org.apache.tomcat.facade.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:194)
at 
com.boeing.pron.servlets.LogonServlet.handleApplicationEvent(LogonServlet.java:61)
at com.boeing.pron.servlets.PronServlet.service(PronServlet.java:56)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404)
at org.apache.tomcat.core.Handler.service(Handler.java:286)
at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
at 
org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:797)
at org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
at 
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandl
er.java:210)
at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498)
at java.lang.Thread.run(Thread.java:484)
--

 <>  <> 



Bug in Tomcat3.2.1? - forwarding HTTP request from a Servlet to a JSP

2001-07-17 Thread Sampige, Srinivas

Hi 
 Iam using tomcat 3.2.1 and i have a servlet "PronServlet" that extends from 
HttpServlet . Now i have a servlet "LogonServlet" that extends from servlet 
"PronServlet" (which has got common functionality like checking for a valid session 
;has common methods that perform functionality like forwarding HTTP request to another 
url). In "LogonServlet" i have some code that does some processing and finally 
forwards the HTTP request to a JSP .Iam getting an error which iam pasting below.I ran 
the same application on JRun and it works fine .I noticed that if i removed the 
subclassing and instead subclassed LogonServlet directly from HttpServlet then the 
application works fine by forwarding the request to the next JSP .Here is the console 
output .Iam attaching the source code of
 PronServlet and LogonServlet .Anybody from the Tomcat dev team any ideas..?

--
Creating a session for the user...
Forwarding request to the MENU page...
2001-07-17 02:17:22 - Ctx( /pron ): Exception in: R( /pron + /webUi/pronMenu.jsp + 
null) - java.lang.
IllegalArgumentException: Short Read
at javax.servlet.http.HttpUtils.parsePostData(HttpUtils.java:238)
at org.apache.tomcat.util.RequestUtil.readFormData(RequestUtil.java:101)
at org.apache.tomcat.core.RequestImpl.handleParameters(RequestImpl.java:691)
at org.apache.tomcat.core.RequestImpl.getParameterValues(RequestImpl.java:259)
at org.apache.tomcat.core.RequestImpl.getParameter(RequestImpl.java:250)
at 
org.apache.tomcat.facade.HttpServletRequestFacade.getParameter(HttpServletRequestFacade.ja
va:222)
at org.apache.jasper.servlet.JspServlet.preCompile(JspServlet.java:326)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:370)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404)
at org.apache.tomcat.core.Handler.service(Handler.java:286)
at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
at 
org.apache.tomcat.facade.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:194)
at 
com.boeing.pron.servlets.LogonServlet.handleApplicationEvent(LogonServlet.java:61)
at com.boeing.pron.servlets.PronServlet.service(PronServlet.java:56)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404)
at org.apache.tomcat.core.Handler.service(Handler.java:286)
at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
at 
org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:797)
at org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
at 
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandl
er.java:210)
at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498)
at java.lang.Thread.run(Thread.java:484)
--

 <>  <> 

 LogonServlet.java
 PronServlet.java


RE: Bug in Tomcat ? - forwarding HTTP request from a Servlet to a JSP

2001-07-18 Thread Sampige, Srinivas

But how it this working in JRun ?

thanks
Srinivas

-Original Message-
From: Greg Trasuk [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 17, 2001 10:08 PM
To: [EMAIL PROTECTED]
Subject: RE: Bug in Tomcat ? - forwarding HTTP request from a Servlet to
a JSP


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.

Greg Trasuk, President
StratusCom Manufacturing Systems Inc. - We use information technology to
solve business problems on your plant floor.
http://stratuscom.ca

-----Original Message-
From: Sampige, Srinivas [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 17, 2001 5:59 PM
To: [EMAIL PROTECTED]
Subject: Bug in Tomcat ? - forwarding HTTP request from a Servlet to a
JSP


Hi
 Iam using tomcat 3.2.1 and i have a servlet "PronServlet" that extends from
HttpServlet . Now i have a servlet "LogonServlet" that extends from servlet
"PronServlet" (which has got common functionality like checking for a valid
session ;has common methods that perform functionality like forwarding HTTP
request to another url). In "LogonServlet" i have some code that does some
processing and finally forwards the HTTP request to a JSP .Iam getting an
error which iam pasting below.I ran the same application on JRun and it
works fine .I noticed that if i removed the subclassing and instead
subclassed LogonServlet directly from HttpServlet then the application works
fine by forwarding the request to the next JSP .Here is the console output
.Iam attaching the source code of
 PronServlet and LogonServlet .Anybody from the Tomcat dev team any
ideas. ?


--
Creating a session for the user...
Forwarding request to the MENU page...
2001-07-17 02:17:22 - Ctx( /pron ): Exception in: R( /pron +
/webUi/pronMenu.jsp + null) - java.lang.
IllegalArgumentException: Short Read
at javax.servlet.http.HttpUtils.parsePostData(HttpUtils.java:238)
at
org.apache.tomcat.util.RequestUtil.readFormData(RequestUtil.java:101)
at
org.apache.tomcat.core.RequestImpl.handleParameters(RequestImpl.java:691)
at
org.apache.tomcat.core.RequestImpl.getParameterValues(RequestImpl.java:259)
at
org.apache.tomcat.core.RequestImpl.getParameter(RequestImpl.java:250)
at
org.apache.tomcat.facade.HttpServletRequestFacade.getParameter(HttpServletRe
questFacade.ja
va:222)
at
org.apache.jasper.servlet.JspServlet.preCompile(JspServlet.java:326)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:370)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404)
at org.apache.tomcat.core.Handler.service(Handler.java:286)
at
org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
at
org.apache.tomcat.facade.RequestDispatcherImpl.forward(RequestDispatcherImpl
.java:194)
at
com.boeing.pron.servlets.LogonServlet.handleApplicationEvent(LogonServlet.ja
va:61)
at com.boeing.pron.servlets.PronServlet.service(PronServlet.java:56)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404)
at org.apache.tomcat.core.Handler.service(Handler.java:286)
at
org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
at
org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:79
7)
at
org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
at
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpC
onnectionHandl
er.java:210)
at
org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
at
org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498)
at java.lang.Thread.run(Thread.java:484)

--

 <>  <>



RE: Bug in Tomcat ? - forwarding HTTP request from a Servlet to a JSP

2001-07-18 Thread Sampige, Srinivas

Greg
 Also ,the same thing works great in weblogic also in addition to JRun.Any ideas ??
-Srinivas

-Original Message-
From: Greg Trasuk [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 17, 2001 10:08 PM
To: [EMAIL PROTECTED]
Subject: RE: Bug in Tomcat ? - forwarding HTTP request from a Servlet to
a JSP


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.

Greg Trasuk, President
StratusCom Manufacturing Systems Inc. - We use information technology to
solve business problems on your plant floor.
http://stratuscom.ca

-----Original Message-
From: Sampige, Srinivas [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 17, 2001 5:59 PM
To: [EMAIL PROTECTED]
Subject: Bug in Tomcat ? - forwarding HTTP request from a Servlet to a
JSP


Hi
 Iam using tomcat 3.2.1 and i have a servlet "PronServlet" that extends from
HttpServlet . Now i have a servlet "LogonServlet" that extends from servlet
"PronServlet" (which has got common functionality like checking for a valid
session ;has common methods that perform functionality like forwarding HTTP
request to another url). In "LogonServlet" i have some code that does some
processing and finally forwards the HTTP request to a JSP .Iam getting an
error which iam pasting below.I ran the same application on JRun and it
works fine .I noticed that if i removed the subclassing and instead
subclassed LogonServlet directly from HttpServlet then the application works
fine by forwarding the request to the next JSP .Here is the console output
.Iam attaching the source code of
 PronServlet and LogonServlet .Anybody from the Tomcat dev team any
ideas. ?


--
Creating a session for the user...
Forwarding request to the MENU page...
2001-07-17 02:17:22 - Ctx( /pron ): Exception in: R( /pron +
/webUi/pronMenu.jsp + null) - java.lang.
IllegalArgumentException: Short Read
at javax.servlet.http.HttpUtils.parsePostData(HttpUtils.java:238)
at
org.apache.tomcat.util.RequestUtil.readFormData(RequestUtil.java:101)
at
org.apache.tomcat.core.RequestImpl.handleParameters(RequestImpl.java:691)
at
org.apache.tomcat.core.RequestImpl.getParameterValues(RequestImpl.java:259)
at
org.apache.tomcat.core.RequestImpl.getParameter(RequestImpl.java:250)
at
org.apache.tomcat.facade.HttpServletRequestFacade.getParameter(HttpServletRe
questFacade.ja
va:222)
at
org.apache.jasper.servlet.JspServlet.preCompile(JspServlet.java:326)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:370)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404)
at org.apache.tomcat.core.Handler.service(Handler.java:286)
at
org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
at
org.apache.tomcat.facade.RequestDispatcherImpl.forward(RequestDispatcherImpl
.java:194)
at
com.boeing.pron.servlets.LogonServlet.handleApplicationEvent(LogonServlet.ja
va:61)
at com.boeing.pron.servlets.PronServlet.service(PronServlet.java:56)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404)
at org.apache.tomcat.core.Handler.service(Handler.java:286)
at
org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
at
org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:79
7)
at
org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
at
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpC
onnectionHandl
er.java:210)
at
org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
at
org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498)
at java.lang.Thread.run(Thread.java:484)

--

 <>  <>



RE: JSP's not finding classes in WEB-INF

2001-07-18 Thread Sampige, Srinivas

If you have just .class files then your JSP should work after placing those classes 
under WEB-INF/classes .But if you classes are in a .jar file then place them under 
WEB-INF/lib . Hope this helps

-srinivas

-Original Message-
From: Will England [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, July 18, 2001 10:54 AM
To: [EMAIL PROTECTED]
Subject: JSP's not finding classes in WEB-INF 


Greetings!

Ok - running Tomcat 3.2 on SunOS 2.7, with Java 1.2.  

I have a working application with servlets and JSP pages running under
Tomcat 3.1.  I'm trying to port it to 3.2.

However, every time I hit a JSP page, it gives a 500 error about how it
cannot find classes to compile.  Those classes are located in the WEB-INF
directory, under the /classes folder.  

The classpath does *not* contain the WEB-INF/classes directory.

If I hard-code the WEB-INF/classes directory into the classpath, they
work.  However, I do not want to do this.  

What is the problem, and how can I resolve it?

I have tried settiing the environment variables TOMCAT_HOME and JAVA_HOME,
and moving tools.jar into TOMCAT_HOME/lib.

Thanks for any tips or pointers!

Will


-- 
  /~>'find `funny quote`': Command not found; humor not installed.  
  1986 Concours 72,xxx  1982 Maxim 12,xxx (For Sale!) CDA #00046
  Overland Park, KS [EMAIL PROTECTED] PCS: 316-371-FOAD
http://will.mylanders.com/




RE: Tomcat: subject

2001-07-18 Thread Sampige, Srinivas

That is what i have done in my outook .I have setup a rule that filters all messages 
coming into my inbox with a to address of "[EMAIL PROTECTED]" and puts 
them in a folder "TOMCAT LIST".

-Srinivas

-Original Message-
From: Aditya Anand [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, July 18, 2001 12:33 PM
To: [EMAIL PROTECTED]
Subject: Re: Tomcat: subject


why don't you just setup a filter based on the 'to'
address!
--- "Li, Jerry" <[EMAIL PROTECTED]> wrote:
> Hi, All:
> 
> We have been flooded by emails from the mailing
> lists of CVS, apache,
> tomcat, and so on. All of them come into our inbox,
> it is very tough to
> separate them. If you send emails with "Tomcat" in
> the subject, we could
> easily group them and redirect them into a dedicated
> folder. For example,
> Windows user may create a rule in outlook to
> redirect all emails with Tomcat
> in the subject to a folder called Tomcat.
> 
> thanks,
> 
> Jerry
> 
> 


__
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail
http://personal.mail.yahoo.com/



RE: Bug in Tomcat ? - forwarding HTTP request from a Servlet to a JSP

2001-07-18 Thread Sampige, Srinivas

Thanks .I got it to work by doing it the usual way.Here is what i did in PronServlet -

/*Hashtable formData = HttpUtils.parsePostData(request.getContentLength(),
 request.getInputStream());*/
Hashtable formData = new Hashtable();
Enumeration en = request.getParameterNames();
System.out.println("===");
while (en.hasMoreElements())
  {
String paramName = (String) en.nextElement();
System.out.println("Param Name -> "+paramName);
String value = request.getParameter(paramName);
System.out.println("Value -> "+value);
formData.put(paramName,value);
  }
System.out.println("===");

-Srinivas



-Original Message-
From: Greg Trasuk [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, July 18, 2001 11:44 AM
To: [EMAIL PROTECTED]
Subject: RE: Bug in Tomcat ? - forwarding HTTP request from a Servlet to
a JSP


Srinivas:

I can't comment on Jrun or Weblogic, since I haven't used them.  Normally I
figure that since Tomcat is the officially sanctioned reference
implementation, if it doesn't work on Tomcat, it just plain doesn't work,
even if it does work on other containers.

Here's what the servlet API docs say about getParameter in
ServletRequest.getParameter() :
"If the parameter data was sent in the request body, such as occurs with an
HTTP POST request, then reading the body directly via getInputStream() or
getReader() can interfere with the execution of this method."

I take that to mean it may cause problems, but won't necessarily, depending
on the implementation.

Can you try out the workaround I suggested and see if it solves the
problem?  If it doesn't, then we're on the wrong debugging track anyway.

Greg Trasuk, President
StratusCom Manufacturing Systems Inc. - We use information technology to
solve business problems on your plant floor.
http://stratuscom.ca

-Original Message-
From: Sampige, Srinivas [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, July 18, 2001 11:56 AM
To: '[EMAIL PROTECTED]'
Subject: RE: Bug in Tomcat ? - forwarding HTTP request from a Servlet to
a JSP


Greg
 Also ,the same thing works great in weblogic also in addition to JRun.Any
ideas ??
-Srinivas

-Original Message-
From: Greg Trasuk [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 17, 2001 10:08 PM
To: [EMAIL PROTECTED]
Subject: RE: Bug in Tomcat ? - forwarding HTTP request from a Servlet to
a JSP


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.

Greg Trasuk, President
StratusCom Manufacturing Systems Inc. - We use information technology to
solve business problems on your plant floor.
http://stratuscom.ca

-Original Message-
From: Sampige, Srinivas [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 17, 2001 5:59 PM
To: [EMAIL PROTECTED]
Subject: Bug in Tomcat ? - forwarding HTTP request from a Servlet to a
JSP


Hi
 Iam using tomcat 3.2.1 and i have a servlet "PronServlet" that extends from
HttpServlet . Now i have a servlet "LogonServlet" that extends from servlet
"PronServlet" (which has got common functionality like checking for a valid
session ;has common methods that perform functionality like forwarding HTTP
request to another url). In "LogonServlet" i have some code that does some
processing and finally forwards the HTTP request to a JSP .Iam getting an
error which iam pasting below.I ran the same application on JRun and it
works fine .I noticed that if i removed the subclassing and instead
subclassed LogonServlet directly from HttpServlet then the application works
fine by forwarding the request to the next JSP .Here is the console output
.Iam attaching the source code of
 PronServlet and LogonServlet .Anybody from the Tomcat dev team any
ideas. ?


-

RE: Problem with JSP mapping to subdirectory

2001-07-18 Thread Sampige, Srinivas

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:

JkMount /test/*.jsp ajp12
JkMount /servlet_test/* ajp12

- server.xml



 

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/



Configuring my own servlets on Tomcat4.0

2002-02-21 Thread Sampige, Srinivas

Hi
 I downloaded Tomcat4.0 just now and insalled it. I am able to run the
example servlets. When I try to create my own servlets OR whehn I try to
deploy and run those web apps that were working on the older version
(Tomcat3.2) the new servlets don't run. Any clues? I looked at the
documentation but could not find anything.

thanks
-Srinivas

--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




RE: classes visibility in the WEB-INF dir ----> SOLVED

2002-02-22 Thread Sampige, Srinivas

Now more than one person has faced this problem. Please refer to my posting
titled "Configuring my own servlets on Tomcat4.0". Have the Tomcat
developers addressed this issue in the documentation?(at least I couldn't
find it...am I missing something?). This makes developement higly
unproductive. For you reference this is what I posted earlier(for which I
got replies) -

Hi
 I downloaded Tomcat4.0 just now and insalled it. I am able to run the
example servlets. When I try to create my own servlets OR whehn I try to
deploy and run those web apps that were working on the older version
(Tomcat3.2) the new servlets don't run. Any clues? I looked at the
documentation but could not find anything.

thanks
-Srinivas
--

thanks
Srinivas

To unsubscribe:   
For additional commands: 
Troubles with the list:  

-Original Message-
From: Dmitry Nikelshpur [mailto:[EMAIL PROTECTED]]
Sent: Friday, February 22, 2002 2:04 AM
To: Tomcat Users List
Subject: Re: classes visibility in the WEB-INF dir > SOLVED


I had something 'similar' happen when I was installing Tomcat 4.0.2...
I could not get servlets in webapps/myapp/web-inf/classes to be found.
I kept changing paths, web/server.xml, etc., but nothing seemed to work.
However, /examples and another WAR file were working fine.
What I did was:
1) I copied the servlets into one of the directories that were working 
(eg. examples).
 The servlets were being found
2) I copied all code from the directory that was not working into the 
/examples directory.
3) renamed the directory to the old nameand all works fine ever since.

Things like this have worked for me in the past when I get REALLY 
frustratedWas I really missing something (doubtful I was misspelling 
the servlet's name in this case)...This is reminiscent of invisible 
characters :-)  ...or something was causing the servlets not to be loaded?!?

Dmitry

Amine AMAR wrote:

>Hi,
> I tried to jar the classes directory and reload TC, but I have the same
behavior.
>
>I also tried creating a class kitabe.SearchUtilities2 with exacty the same
code as SearchUtilities (using save as). SearchUtilities2
>works fine, but not SearchUtilities.
>
>I then tried to rename my new SearchUtilities2 to SearchUtilities ---> THEN
IT DID WORK.
>
>This is very weard :?). I used to delete all .class files and recompile to
be sure that the files get recompiled, and that there is
>no problem related to that. If anyone of you have seen this behavior,
please let us know.
>
>Thank's all for your help
>
>Amine
>
>- Original Message -
>From: "Larry Isaacs" <[EMAIL PROTECTED]>
>To: "'Tomcat Users List'" <[EMAIL PROTECTED]>
>Sent: Wednesday, February 20, 2002 7:02 PM
>Subject: RE: classes visibility in the WEB-INF dir
>
>
>>Do you know if any bean or servlet in the ketabe web application
>>successfully loads kitabe.SearchUtilities.  If you are not sure,
>>you could try:
>>
>><% kitabe.SearchUtilities su = new kitabe.SearchUtilities() %>
>>
>>on a test JSP page in ketabe and see if it compiles.
>>
>>Cheers,
>>Larry
>>
>>>-Original Message-
>>>From: Amine AMAR [mailto:[EMAIL PROTECTED]]
>>>Sent: Wednesday, February 20, 2002 1:35 PM
>>>To: Tomcat Users List
>>>Subject: Re: classes visibility in the WEB-INF dir
>>>
>>>
>>>Hi,
>>>
>>>Yes, all kitabe classes are in /ketabe/WEB-INF/classes directory.
>>>Line 60 in kitabe.dal.home.AuthorHome.findByName() contain
>>>only a call for the constructor of kitabe.SearchUtilities
>>>(SearchUtilities su = new SearchUtilities();)
>>>
>>>Regards,
>>>Amine
>>>
>>>- Original Message -
>>>From: "Larry Isaacs" <[EMAIL PROTECTED]>
>>>To: "'Tomcat Users List'" <[EMAIL PROTECTED]>
>>>Sent: Wednesday, February 20, 2002 5:47 PM
>>>Subject: RE: classes visibility in the WEB-INF dir
>>>
>>>
Are all "kitabe" classes located in your /ketabe/WEB-INF/classes
directory?  Also, to you know what the link is between what
kitabe.dal.home.AuthorHome.findByName() is doing around line 60
and kitabe.SearchUtilities?

Cheers,
Larry


>-Original Message-
>From: Amine AMAR [mailto:[EMAIL PROTECTED]]
>Sent: Wednesday, February 20, 2002 11:34 AM
>To: Tomcat Users List
>Subject: Re: classes visibility in the WEB-INF dir
>
>
>Hi,
>Sorry for misleading you. my directories are kitabe and com.
>The pb comes from the kitabe directory. the 'dir' was just for the
>exemple.
>here after the whole log file
>-
>2002-02-20 15:56:15 WebappLoader[/ketabe]: Deploying class
>repositories to work directory
>C:\jakarta-tomcat-4.0.1\work\localhost\ketabe
>2002-02-20 15:56:15 WebappLoader[/ketabe]: Deploy JAR
>/WEB-INF/lib/classes12.jar to
>
>>>c:\www\ketabe\WEB-INF\lib\classes12.jar
>>>
>2002-02-20 15:56:15 We

RE: classes visibility in the WEB-INF dir ----> SOLVED

2002-02-22 Thread Sampige, Srinivas

Hi Craig
 Craig,my apologies for not being clear . First of all, yes I agree, as you
say - " 99.9% of them being user error or misunderstanding". "The issue"
that I was talking about was migrating to 4.0 from 3.2 as was mentioned in
my email. I spent some time trouble shooting,digging around in the
documentation and discovered that I had to change my "web.xml". 

>answers quickly is to provide as much information as possible about the
>problems you are facing (as *many* people do on TOMCAT-USER):
OS : Windows 2000
App Server : Tomcat4.0
Problem Desc : Servlets that run on 3.2.1 do not run on 4.0. I have added
the context to my webapp in 4.0 in exactly the same manner that I have done
in 3.2.1. 

Erorr that I get :
HTTP Status 404 - /xmlToPdf/servlet/ConvertXmlServlet
The requested resource (/xmlToPdf/servlet/ConvertXmlServlet) is not
available. 
 

>can tell you if it's been addressed in the documentation.  I'm afraid that
>I cannot read your mind :-).
  Well what was in my mind was ...I was really frustrated that I had to
worry about configuration issues and going back all over again doing trouble
shooting.Should I concentrate on my application design/logic OR should
concentrate on numerous config issues which I had done before and had to do
again when I moved to 4.0 and probably will have to do when I move to higher
versions?? . What I was looking for was some kind of a  guide "migrating to
4.0" which would highlight the kind of problem I faced(is there such a guide
I don't know of?). Also, I personally don't fancy the idea of people
accessing config files directly. Some kind of interface(need not be be fancy
stuff but a simple tool) should be provided. Eventhough everyone of us
understands what a config file looks like and contains it is very easy to
make a mistake but difficult to trouble shoot when involved in a big project
and concentrating on the application logic and other details.(of course
Tomat developers would be able to track down and fix it faster :-) but what
about the rest of us ?). 

>If "this issue" means that you didn't know you have to match your
>directory structure under /WEB-INF/classes to the package hierarchy of
>your classes, that is fundamental Java programming -- amply covered in the
>many books and tutorials about the language itself.  A good place to start
>is <http://java.sun.com/docs/books/tutorial/>.
>"bug reports" are really misunderstandings of how servlets work,
> or about what certain configuration settings mean).

Thanks for pointing me to the website. But, I have ample experience in
Java,servlets & a host od app servers (and of course packages othwerwise my
complex web app that I am working on wouldn't have worked in the first place
:-)). I guess I need more experience on posting a good email on the "mailing
list". I hope this and my previous email is/was taken in good spirit. I
wasn't looking at finding fault(which is the easiest thing to do :-)). It
was more like a frustrated ...hands in the air..help me ...kind of
...question.

thanks
Srinivas





-Original Message-
From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]]
Sent: Friday, February 22, 2002 10:30 AM
To: Tomcat Users List
Subject: RE: classes visibility in the WEB-INF dir > SOLVED




On Fri, 22 Feb 2002, Sampige, Srinivas wrote:

> Date: Fri, 22 Feb 2002 10:04:10 -0800
> From: "Sampige, Srinivas" <[EMAIL PROTECTED]>
> Reply-To: Tomcat Users List <[EMAIL PROTECTED]>
> To: 'Tomcat Users List' <[EMAIL PROTECTED]>
> Subject: RE: classes visibility in the WEB-INF dir > SOLVED
>
> Now more than one person has faced this problem. Please refer to my
posting
> titled "Configuring my own servlets on Tomcat4.0". Have the Tomcat
> developers addressed this issue in the documentation?(at least I couldn't
> find it...am I missing something?). This makes developement higly
> unproductive. For you reference this is what I posted earlier(for which I
> got replies) -

Which "this issue" are you speaking of?  If it's the fact that WEB-INF has
to be capitalized, that is documented in the Servlet Specification
(because it is common to all servlet containers, not just Tomcat):

  http://java.sun.com/products/servlet/download.html

In addition, any book or article or tutorial about building web
applications will certainly mention it.

If "this issue" means that you didn't know you have to match your
directory structure under /WEB-INF/classes to the package hierarchy of
your classes, that is fundamental Java programming -- amply covered in the
many books and tutorials about the language itself.  A good place to start
is <http://java.sun.com/docs/books/tutorial/>.

If it's some other issue, then you'll have to tell me what it w