You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Firestar <th...@yahoo.com> on 2001/10/05 09:19:38 UTC

Must servlets be inside WEB-INF/classes pr /lib?

Hi,

I'm using TC 4.0, and my servlets (due to some
constraints) must be placed in a separate folder, e.g.
E:\myclasses\servlets instead of the recommended
Servlet Deployment structure, i.e. WEB-INF/classes or
WEB-INF/lib. 

Is this possible in TC? I know in JRun it is possible
to do so by specifying the classpath to my servlets in
the configuration file. 

Thanks in advance.

Regards
Firestar

__________________________________________________
Do You Yahoo!?
NEW from Yahoo! GeoCities - quick and easy web site hosting, just $8.95/month.
http://geocities.yahoo.com/ps/info1

Re: ## Out of Environment space ## Solution

Posted by Sam <is...@ms45.hinet.net>.
thanks, It is work now.
command /E.

----- Original Message -----
From: Mikael Aronsson <mi...@telia.com>
To: <to...@jakarta.apache.org>
Sent: Friday, October 05, 2001 5:38 PM
Subject: Re: ## Out of Environment space ##


> You need to increase the environment space, command.com has a switch for
> this, I don't remember in my head what it is though, type command /? and
you
> should get info about it. Modify your config.sys so that this option is
used
> for the default command.com
>
> Mikael
>
> ----- Original Message -----
> From: "Sam" <is...@ms45.hinet.net>
> To: <to...@jakarta.apache.org>
> Sent: Friday, October 05, 2001 9:00 AM
> Subject: ## Out of Environment space ##
>
>
> > Hi all,
> >
> >   I want to run tomcat 3.2.3 on win98.
> >   the set environment as follows:
> >
> >   ==C:\tomcat\bin>set
> > TMP=C:\WINDOWS\TEMP
> > TEMP=C:\WINDOWS\TEMP
> > PROMPT=$p$g
> > winbootdir=C:\WINDOWS
> > COMSPEC=C:\WINDOWS\COMMAND.COM
> > PATH=.;C:\JDK\BIN;C:\WINDOWS;C:\WINDOWS\COMMAND
> > CLASSOATH=.;c:\tomcat\lib\servlet.jar;c:\jdk\lib\tools.jar
> > windir=C:\WINDOWS
> > JAVA_HOME=c:\jdk
> > TOMCAT_HOME=c:\tomcat
> >   ==
> >
> >   execute C:\tomcat\bin\startup.bat and report,
> >
> > ==
> > C:\tomcat\bin>startup
> > Out of environment space
> > Out of environment space
> > Out of environment space
> > Out of environment space
> > Out of environment space
> > Out of environment space
> > Unable to set CLASSPATH dynamically.
> > Note: To set the CLASSPATH dynamical
> >       only DOS 8.3 names may be used
> > Setting your CLASSPATH statically.
> > Out of environment space
> > Out of environment space
> > Out of environment space
> > Out of environment space
> > Out of environment space
> > Out of environment space
> > Out of environment space
> >
> > Using CLASSPATH: c:\tomcat\classes
> >
> > Out of environment space
> > Starting Tomcat in new window
> > C:\tomcat\bin>
> > ==
> >
> >   I do not run any other program.
> >   what is the reason?
> >
> >   thanks all.
> >
> >
> >
> > > On Fri, 5 Oct 2001, Firestar wrote:
> > >
> > > > Hi Dmitri, thanks for your quick reply.
> > > >
> > > > I have tried adding the classpath to my servlets to
> > > > catalina.bat, but it throw a javax.http.servlet class
> > > > not found exception. It will works OK if i do not add
> > > > in the classpath.
> > > >
> > > > Regards,
> > > > Firestar
> > > >
> > > > > > Is this possible in TC? I know in JRun it is
> > > > > possible
> > > > > > to do so by specifying the classpath to my
> > > > > servlets in
> > > > > > the configuration file.
> > > > > Anything's possible....  the simplest way is to
> > > > > change the catalina.sh to
> > > > > include your classpath, but this is plain _wrong_,
> > > > > what you would be
> > > > > better off doing is changing your build/deploy
> > > > > process so that you have a
> > > > > properly structured webapp.
> > > > >
> > > > > for more info check out
> > > > > http://java.sun.com/products/servlets
> > > > >
> > > > > cheers
> > > > > dim
> > > > >
> > > > >
> > > >
> > > >
> > > > __________________________________________________
> > > > Do You Yahoo!?
> > > > NEW from Yahoo! GeoCities - quick and easy web site hosting, just
> > $8.95/month.
> > > > http://geocities.yahoo.com/ps/info1
> > > >
> > >
> >
>


Most reliable way of determining when tomcat has finished starting up

Posted by Janek Bogucki <ja...@yahoo.co.uk>.
Does anyone know a good way of checking for when
tomcat  has finished starting up?

I'd like to have a script like this

   $ $CATALAINA_HOME/bin/startup.sh
   $ ..wait for TC to finish starting up ...
   # $APACHE/sbin/apachectl graceful

I'm using Tomcat 4.0 w/ mod_webapp.so.

Any tips welcome,
Janek Bogucki

____________________________________________________________
Do You Yahoo!?
Get your free @yahoo.co.uk address at http://mail.yahoo.co.uk
or your free @yahoo.ie address at http://mail.yahoo.ie

Re: ## Out of Environment space ##

Posted by Mikael Aronsson <mi...@telia.com>.
You need to increase the environment space, command.com has a switch for
this, I don't remember in my head what it is though, type command /? and you
should get info about it. Modify your config.sys so that this option is used
for the default command.com

Mikael

----- Original Message -----
From: "Sam" <is...@ms45.hinet.net>
To: <to...@jakarta.apache.org>
Sent: Friday, October 05, 2001 9:00 AM
Subject: ## Out of Environment space ##


> Hi all,
>
>   I want to run tomcat 3.2.3 on win98.
>   the set environment as follows:
>
>   ==C:\tomcat\bin>set
> TMP=C:\WINDOWS\TEMP
> TEMP=C:\WINDOWS\TEMP
> PROMPT=$p$g
> winbootdir=C:\WINDOWS
> COMSPEC=C:\WINDOWS\COMMAND.COM
> PATH=.;C:\JDK\BIN;C:\WINDOWS;C:\WINDOWS\COMMAND
> CLASSOATH=.;c:\tomcat\lib\servlet.jar;c:\jdk\lib\tools.jar
> windir=C:\WINDOWS
> JAVA_HOME=c:\jdk
> TOMCAT_HOME=c:\tomcat
>   ==
>
>   execute C:\tomcat\bin\startup.bat and report,
>
> ==
> C:\tomcat\bin>startup
> Out of environment space
> Out of environment space
> Out of environment space
> Out of environment space
> Out of environment space
> Out of environment space
> Unable to set CLASSPATH dynamically.
> Note: To set the CLASSPATH dynamical
>       only DOS 8.3 names may be used
> Setting your CLASSPATH statically.
> Out of environment space
> Out of environment space
> Out of environment space
> Out of environment space
> Out of environment space
> Out of environment space
> Out of environment space
>
> Using CLASSPATH: c:\tomcat\classes
>
> Out of environment space
> Starting Tomcat in new window
> C:\tomcat\bin>
> ==
>
>   I do not run any other program.
>   what is the reason?
>
>   thanks all.
>
>
>
> > On Fri, 5 Oct 2001, Firestar wrote:
> >
> > > Hi Dmitri, thanks for your quick reply.
> > >
> > > I have tried adding the classpath to my servlets to
> > > catalina.bat, but it throw a javax.http.servlet class
> > > not found exception. It will works OK if i do not add
> > > in the classpath.
> > >
> > > Regards,
> > > Firestar
> > >
> > > > > Is this possible in TC? I know in JRun it is
> > > > possible
> > > > > to do so by specifying the classpath to my
> > > > servlets in
> > > > > the configuration file.
> > > > Anything's possible....  the simplest way is to
> > > > change the catalina.sh to
> > > > include your classpath, but this is plain _wrong_,
> > > > what you would be
> > > > better off doing is changing your build/deploy
> > > > process so that you have a
> > > > properly structured webapp.
> > > >
> > > > for more info check out
> > > > http://java.sun.com/products/servlets
> > > >
> > > > cheers
> > > > dim
> > > >
> > > >
> > >
> > >
> > > __________________________________________________
> > > Do You Yahoo!?
> > > NEW from Yahoo! GeoCities - quick and easy web site hosting, just
> $8.95/month.
> > > http://geocities.yahoo.com/ps/info1
> > >
> >
>


## Out of Environment space ##

Posted by Sam <is...@ms45.hinet.net>.
Hi all,

  I want to run tomcat 3.2.3 on win98.
  the set environment as follows:

  ==C:\tomcat\bin>set
TMP=C:\WINDOWS\TEMP
TEMP=C:\WINDOWS\TEMP
PROMPT=$p$g
winbootdir=C:\WINDOWS
COMSPEC=C:\WINDOWS\COMMAND.COM
PATH=.;C:\JDK\BIN;C:\WINDOWS;C:\WINDOWS\COMMAND
CLASSOATH=.;c:\tomcat\lib\servlet.jar;c:\jdk\lib\tools.jar
windir=C:\WINDOWS
JAVA_HOME=c:\jdk
TOMCAT_HOME=c:\tomcat
  ==

  execute C:\tomcat\bin\startup.bat and report,

==
C:\tomcat\bin>startup
Out of environment space
Out of environment space
Out of environment space
Out of environment space
Out of environment space
Out of environment space
Unable to set CLASSPATH dynamically.
Note: To set the CLASSPATH dynamical
      only DOS 8.3 names may be used
Setting your CLASSPATH statically.
Out of environment space
Out of environment space
Out of environment space
Out of environment space
Out of environment space
Out of environment space
Out of environment space

Using CLASSPATH: c:\tomcat\classes

Out of environment space
Starting Tomcat in new window
C:\tomcat\bin>
==

  I do not run any other program.
  what is the reason?

  thanks all.



> On Fri, 5 Oct 2001, Firestar wrote:
>
> > Hi Dmitri, thanks for your quick reply.
> >
> > I have tried adding the classpath to my servlets to
> > catalina.bat, but it throw a javax.http.servlet class
> > not found exception. It will works OK if i do not add
> > in the classpath.
> >
> > Regards,
> > Firestar
> >
> > > > Is this possible in TC? I know in JRun it is
> > > possible
> > > > to do so by specifying the classpath to my
> > > servlets in
> > > > the configuration file.
> > > Anything's possible....  the simplest way is to
> > > change the catalina.sh to
> > > include your classpath, but this is plain _wrong_,
> > > what you would be
> > > better off doing is changing your build/deploy
> > > process so that you have a
> > > properly structured webapp.
> > >
> > > for more info check out
> > > http://java.sun.com/products/servlets
> > >
> > > cheers
> > > dim
> > >
> > >
> >
> >
> > __________________________________________________
> > Do You Yahoo!?
> > NEW from Yahoo! GeoCities - quick and easy web site hosting, just
$8.95/month.
> > http://geocities.yahoo.com/ps/info1
> >
>


Re: Must servlets be inside WEB-INF/classes pr /lib?

Posted by Dmitri Colebatch <di...@bigpond.net.au>.
In that case you can use tomcat 3.x, it does allow your servlets to be int
he global classpath, but there are potential hazards involved.  For
instance you wont be able to have them reloaded dynamically.

hth
cheesr
dim

On Fri, 5 Oct 2001, Firestar wrote:

> Hi Dmitri, thanks for yr patience.
> 
> I guess we have no choice but to stick with JRun for
> the moment (until we sort out our own classes
> deployment internally), as it allows us the
> 'flexibility' to break the rule:) 
> 
> Regards,
> Firestar
> 
> --- Dmitri Colebatch <di...@bigpond.net.au> wrote:
> > Hi,
> > 
> > yeah, that doesn't surprise me... the reason that
> > tomcat 4 ignores your
> > classpath is that it causes all sorts of problems. 
> > seriously, the spec
> > outlines how things are suppose to happen, and my
> > best advice would be to
> > put your servlets in web-inf/classes (or lib).  
> > 
> > alternatively, you'd need to have a good explanation
> > from someone who
> > fully understands the class loading mechanism of
> > catalina... I could take
> > a few guesses, but wont.  I also think that someone
> > who does fully
> > understand it will simply repeat the above
> > advice.... 
> > 
> > so, cd /myservletclasses; jar cf myservlets.jar *
> > 
> > (o:
> > 
> > cheers
> > dim
> > 
> > On Fri, 5 Oct 2001, Firestar wrote:
> > 
> > > Hi Dmitri, thanks for your quick reply. 
> > > 
> > > I have tried adding the classpath to my servlets
> > to
> > > catalina.bat, but it throw a javax.http.servlet
> > class
> > > not found exception. It will works OK if i do not
> > add
> > > in the classpath.
> > > 
> > > Regards,
> > > Firestar
> > > 
> > > > > Is this possible in TC? I know in JRun it is
> > > > possible
> > > > > to do so by specifying the classpath to my
> > > > servlets in
> > > > > the configuration file. 
> > > > Anything's possible....  the simplest way is to
> > > > change the catalina.sh to
> > > > include your classpath, but this is plain
> > _wrong_,
> > > > what you would be
> > > > better off doing is changing your build/deploy
> > > > process so that you have a
> > > > properly structured webapp.
> > > > 
> > > > for more info check out
> > > > http://java.sun.com/products/servlets
> > > > 
> > > > cheers
> > > > dim
> > > > 
> > > > 
> > > 
> > > 
> > > __________________________________________________
> > > Do You Yahoo!?
> > > NEW from Yahoo! GeoCities - quick and easy web
> > site hosting, just $8.95/month.
> > > http://geocities.yahoo.com/ps/info1
> > > 
> > 
> 
> 
> __________________________________________________
> Do You Yahoo!?
> NEW from Yahoo! GeoCities - quick and easy web site hosting, just $8.95/month.
> http://geocities.yahoo.com/ps/info1
> 


Re: Must servlets be inside WEB-INF/classes pr /lib?

Posted by Firestar <th...@yahoo.com>.
Hi Dmitri, thanks for yr patience.

I guess we have no choice but to stick with JRun for
the moment (until we sort out our own classes
deployment internally), as it allows us the
'flexibility' to break the rule:) 

Regards,
Firestar

--- Dmitri Colebatch <di...@bigpond.net.au> wrote:
> Hi,
> 
> yeah, that doesn't surprise me... the reason that
> tomcat 4 ignores your
> classpath is that it causes all sorts of problems. 
> seriously, the spec
> outlines how things are suppose to happen, and my
> best advice would be to
> put your servlets in web-inf/classes (or lib).  
> 
> alternatively, you'd need to have a good explanation
> from someone who
> fully understands the class loading mechanism of
> catalina... I could take
> a few guesses, but wont.  I also think that someone
> who does fully
> understand it will simply repeat the above
> advice.... 
> 
> so, cd /myservletclasses; jar cf myservlets.jar *
> 
> (o:
> 
> cheers
> dim
> 
> On Fri, 5 Oct 2001, Firestar wrote:
> 
> > Hi Dmitri, thanks for your quick reply. 
> > 
> > I have tried adding the classpath to my servlets
> to
> > catalina.bat, but it throw a javax.http.servlet
> class
> > not found exception. It will works OK if i do not
> add
> > in the classpath.
> > 
> > Regards,
> > Firestar
> > 
> > > > Is this possible in TC? I know in JRun it is
> > > possible
> > > > to do so by specifying the classpath to my
> > > servlets in
> > > > the configuration file. 
> > > Anything's possible....  the simplest way is to
> > > change the catalina.sh to
> > > include your classpath, but this is plain
> _wrong_,
> > > what you would be
> > > better off doing is changing your build/deploy
> > > process so that you have a
> > > properly structured webapp.
> > > 
> > > for more info check out
> > > http://java.sun.com/products/servlets
> > > 
> > > cheers
> > > dim
> > > 
> > > 
> > 
> > 
> > __________________________________________________
> > Do You Yahoo!?
> > NEW from Yahoo! GeoCities - quick and easy web
> site hosting, just $8.95/month.
> > http://geocities.yahoo.com/ps/info1
> > 
> 


__________________________________________________
Do You Yahoo!?
NEW from Yahoo! GeoCities - quick and easy web site hosting, just $8.95/month.
http://geocities.yahoo.com/ps/info1

Re: Must servlets be inside WEB-INF/classes pr /lib?

Posted by Dmitri Colebatch <di...@bigpond.net.au>.
Hi,

yeah, that doesn't surprise me... the reason that tomcat 4 ignores your
classpath is that it causes all sorts of problems.  seriously, the spec
outlines how things are suppose to happen, and my best advice would be to
put your servlets in web-inf/classes (or lib).  

alternatively, you'd need to have a good explanation from someone who
fully understands the class loading mechanism of catalina... I could take
a few guesses, but wont.  I also think that someone who does fully
understand it will simply repeat the above advice.... 

so, cd /myservletclasses; jar cf myservlets.jar *

(o:

cheers
dim

On Fri, 5 Oct 2001, Firestar wrote:

> Hi Dmitri, thanks for your quick reply. 
> 
> I have tried adding the classpath to my servlets to
> catalina.bat, but it throw a javax.http.servlet class
> not found exception. It will works OK if i do not add
> in the classpath.
> 
> Regards,
> Firestar
> 
> > > Is this possible in TC? I know in JRun it is
> > possible
> > > to do so by specifying the classpath to my
> > servlets in
> > > the configuration file. 
> > Anything's possible....  the simplest way is to
> > change the catalina.sh to
> > include your classpath, but this is plain _wrong_,
> > what you would be
> > better off doing is changing your build/deploy
> > process so that you have a
> > properly structured webapp.
> > 
> > for more info check out
> > http://java.sun.com/products/servlets
> > 
> > cheers
> > dim
> > 
> > 
> 
> 
> __________________________________________________
> Do You Yahoo!?
> NEW from Yahoo! GeoCities - quick and easy web site hosting, just $8.95/month.
> http://geocities.yahoo.com/ps/info1
> 


Re: Must servlets be inside WEB-INF/classes pr /lib?

Posted by Firestar <th...@yahoo.com>.
Hi Dmitri, thanks for your quick reply. 

I have tried adding the classpath to my servlets to
catalina.bat, but it throw a javax.http.servlet class
not found exception. It will works OK if i do not add
in the classpath.

Regards,
Firestar

> > Is this possible in TC? I know in JRun it is
> possible
> > to do so by specifying the classpath to my
> servlets in
> > the configuration file. 
> Anything's possible....  the simplest way is to
> change the catalina.sh to
> include your classpath, but this is plain _wrong_,
> what you would be
> better off doing is changing your build/deploy
> process so that you have a
> properly structured webapp.
> 
> for more info check out
> http://java.sun.com/products/servlets
> 
> cheers
> dim
> 
> 


__________________________________________________
Do You Yahoo!?
NEW from Yahoo! GeoCities - quick and easy web site hosting, just $8.95/month.
http://geocities.yahoo.com/ps/info1

Re: Must servlets be inside WEB-INF/classes pr /lib?

Posted by Dmitri Colebatch <di...@bigpond.net.au>.
On Fri, 5 Oct 2001, Firestar wrote:

> I'm using TC 4.0, and my servlets (due to some
> constraints) must be placed in a separate folder, e.g.
> E:\myclasses\servlets instead of the recommended
> Servlet Deployment structure, i.e. WEB-INF/classes or
> WEB-INF/lib. 
This is not "recommended" it is required.  Its laid down by the servlet
specification how a servlet container handles web applications, and what
the structure of a web application should be.

> Is this possible in TC? I know in JRun it is possible
> to do so by specifying the classpath to my servlets in
> the configuration file. 
Anything's possible....  the simplest way is to change the catalina.sh to
include your classpath, but this is plain _wrong_, what you would be
better off doing is changing your build/deploy process so that you have a
properly structured webapp.

for more info check out http://java.sun.com/products/servlets

cheers
dim