compile against servlet.jar but must run tomcat with servlet-ap1.jar

2005-05-09 Thread Fred Cook

Hi All,
We our new to Tomcat and have a bit of an odd problem.  We are  
developing a getting started project.  We have found that we must 
compile with servlet.jar in our CLASSPATH, but Tomcat will not run with 
servlet.jar in the CLASSPATH.  Tomcat will run with servlet-api.jar, but 
the test program will not compile with servlet-api.jar in the 
CLASSPATH.  To be more specific we get a:

package javax.servlet.http does not exist
error when compiling against servlet-api.jar
Similar errors ocure when running Tomcat with servlet.jar
Changing the CLASSPATH everytime we decide to compile or run isn't much 
fun.  Anybody got an idea on why this is happening, and what the 
solution is.

Tomcat vs 5.5.7
apache vs 2.0.53
RH 8.0
JDK 1.5
-Fred
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: tomcat stopped

2005-05-06 Thread Fred Cook

servlet-api.jar does seem to work.
How we found servlet.jar... we googled javax.lang.xxx.xxx, which came 
from a compile error.  The only references were to servlet.jar.  The two 
versions of servlet.jar were quite old.. 1999 and 2001 if I remember 
correctly, which caused me concern, but it is all we found.

Thanks for the help.
-Fred

Wendy Smoak wrote:
From: Fred Cook [EMAIL PROTECTED]
2) We had the CLASSPATH set to point to servlet.jar (needed to 
compile the test program).  This was the main problem, which might 
bring up a versioning question.  We are running RH 8.0 on this 
machine with Tomcat 5.5.7 and apache 2.0.53.  What is the correct 
version of servlet.jar that should be run with this version of Tomcat 
and Apache?

Well... I don't think it's called servlet.jar anymore.  A quick look 
shows no servlet.jar file in the Tomcat 5.5.9 download.  I believe the 
file you want is servlet-api.jar .  (I'm still on 4.1, so I'm 
guessing...)

You could also download the official API from Sun, and compile 
against that.  It's not that you need to compile against a specific 
version of _Tomcat_, it's that you need to compile against the right 
version of the Servlet Specification.  In your case, Tomcat 5.5 is 
Servlet 2.4, so make sure that's what you're using.

Where did you get the 'servlet.jar' file that you were using?  Maybe 
it does contain the right stuff, but those strange NoClassDefFound 
errors you were getting made me suspicious.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: tomcat stopped

2005-05-05 Thread Fred Cook
Hi Wendy,
We got it working, there were 2 problems.
1) It took 10 seconds for the machine to turn off Tomcat (yes I know 
..old hardware) after shutdown.sh was run.  And the much more interesting.
2) We had the CLASSPATH set to point to servlet.jar (needed to compile 
the test program).  This was the main problem, which might bring up a 
versioning question.  We are running RH 8.0 on this machine with Tomcat 
5.5.7 and apache 2.0.53.  What is the correct version of servlet.jar 
that should be run with this version of Tomcat and Apache?

-Fred 

Wendy Smoak wrote:
From: Fred Cook [EMAIL PROTECTED]
 

We just use cp to get foo.war into the webapps dir.  But we shut down
tomcat first, then restart it.
The exact steps:
We build our test app under a  /home file system, then cp the .war
file to the Tomcat webapps dir , Tomcat is under the same /home file
system.
Shut down Tomcat.
Startup Tomcat.
Go to //localhost:8080/foo/ with FireFox, we see a blank screen.
   

This is based on my experience with Tomcat 4.1.  If you're using 5, things
might be different.  That said, try this:
  1. shut down Tomcat
  2. delete the 'myapp' directory under webapps
  3. copy the new myapp.war file into webapps
  4. start Tomcat
I assume you have Tomcat configured to explode the .war file.  If you don't
delete the directory, Tomcat won't ever explode your new .war file.
(Alternately, configure it to run from the un-exploded .war file.)
 

It concerns me that the Manager does not run from localhost:8080 or
   

anything else for that matter.
 

I think the first step maybe to get Tomcats home page links working.
   

Did it ever work?  Do you get the authentication challenge? Did you add a
user to tomcat-users.xml with the correct roles?
Are you certain you're compiling against the same version of servlet.jar (or
the equivalent) that you're running with?
 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: tomcat stopped

2005-05-04 Thread Fred Cook
: javax.servlet.ServletResponse.isCommitted()Z
   at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:112)
   at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
   at 
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
   at 
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:825)
   at 
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:738)
   at 
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:526)
   at 
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
   at 
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
   at java.lang.Thread.run(Thread.java:595)

Wendy Smoak wrote:
From: Fred Cook [EMAIL PROTECTED]
 

We are new to tomcat and have been having some difficulties.  Things
started out well, but when development work started, Tomcat stopped
responding to any changes in the reinstalled .war file.
   

What do you mean by 'reinstalled'?  Are you copying the .war file into
'webapps', using the manager app, or what?  Please tell us exactly

tomcat stopped

2005-05-03 Thread Fred Cook

Hi All,
We are new to tomcat and have been having some difficulties.  Things 
started out well, but when development work started, Tomcat stopped 
responding to any changes in the reinstalled .war file.  IE a new  
//localhost:8080/foo/ was the same as the old.  We get localhost:8080, 
but now all it's links and all our code displays a blank screen.  And 
the oddest problem is  we can go to localhost:8080/foo when foo has been 
removed and there is no error generated.

We go through the ./startup.sh and ./shutdown.sh steps every time a 
server was changed.
We have reinstalled Tomcat.

Anybody have an ideas
-Fred
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]