Re: Servlet reload problem

2003-10-27 Thread Neil Zanella

Interesting. I am having either the same problem or in any case a very 
similar one. I used to use Tomcat 1.4.24 with the autoreload feature
that everyone likes to use so much, because it's just so convenient
when you're developing web applications not to have to restart the
web server every time you make a little change and want to see the
results once again.

Anyhow, when I upgraded to Tomcat 1.4.27 the autoreload feature was
not working even though I made the exact same change to the 
conf/server.xml file, namely, just after the following
comment, insert the following DefaultContext tag:

!-- Define properties for each web application. This only needed
if you want to set non-default properties, or have web application
document roots in places other than the virtual host's appBase
directory. --
   
  
DefaultContext reloadable=true/

I wonder why there is not even a comment in conf/server.xml with these
lines commented out for easy uncommenting. There should be!

Anyhow, it doesn't seem to work with Tomcat 4.1.27. On the other hand you,
mention a patch, but when I go to the download section from the web site
http://jakarta.apache.org/tomcat/ I get to a page:

http://jakarta.apache.org/site/sourceindex.cgi

where the only download option I get is the following:

http://apache.mirrored.ca/jakarta/tomcat-4/source/jakarta-tomcat-4.1.27-src.tar.gz

... so I had to guess the path:

http://apache.mirrored.ca/jakarta/tomcat-4/binaries/

to the hotfix. Why isn't there simply a link to:

http://apache.mirrored.ca/jakarta/tomcat-4/ or equivalent on these pages?

Regards,

Neil

On Thu, 23 Oct 2003, Lawence wrote:

 Dear all,
  
 I am using Tomcat 1.4.27 and each time after I made some modification to my servlet, 
 tomcat didn't reload the updated one. By the way I already installed the hot patch 
 that is said to solve the reloading problem. Any ideas?
  
 Thanks in advance.
 
 
 -
 Do you Yahoo!?
 The New Yahoo! Shopping - with improved product search


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



servlets: automatic compilation: is it possible?

2003-10-27 Thread Neil Zanella

Hello,

I am currently using Tomcat 4.1.27. When I want to deploy a web 
application I have to recompile the servlet (.java file) and
place the produced class file (bytecode) under the WEB-INF/classes
directory. Now, with JSP when you have a .jsp file the it all
happens automatically: you don't have to manually produce and
place any class files anywhere. Can I do the same with Java
servlets: just tell the server where my .java servlet is
and let the server automatically compile it? That would
be a desirable feature for Tomcat. Is it currently
possible?

Thanks,

Neil


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



running tomcat on port 80 instead of port 8080

2003-07-03 Thread Neil Zanella

Hello,

Sorry if this is a FAQ but how can I run Jakarta Tomcat on port 80 rather 
than on port 8080? I guess all I have to do is change 
$CATALINA_HOME/conf/server.xml so that instead of:

!-- Define a non-SSL Coyote HTTP/1.1 Connector on port 8080 --
Connector className=org.apache.coyote.tomcat4.CoyoteConnector
   port=8080 minProcessors=5 maxProcessors=75
   enableLookups=true redirectPort=8443
   acceptCount=100 debug=0 connectionTimeout=2

the following appears instead:

!-- Define a non-SSL Coyote HTTP/1.1 Connector on port 8080 --
Connector className=org.apache.coyote.tomcat4.CoyoteConnector
   port=80 minProcessors=5 maxProcessors=75
   enableLookups=true redirectPort=8443
   acceptCount=100 debug=0 connectionTimeout=2

and restart the server. Is this correct?

Thanks,

Neil


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



Re: multiuser setup: please help

2003-06-28 Thread Neil Zanella

On Fri, 27 Jun 2003, John Turner wrote:

 
 I don't use this feature, but a couple of things come to mind:
 
 - does the user account that Tomcat uses have read permissions to those 
 directories?

I am not sure what user accound Tomcat uses, probably the root account 
since I installed it as root (it came with Sun One Studio JDK), but in
any case the answer is YES because:

$ ls -ld ~joedoe
drwx--x--x   57 joedoe  joedoe  16384 Jun 28 20:14 /home/joedoe
$ ls -ld ~joedoe/public_html
drwxrwxr-x5 joedoe  joedoe  4096 Jun 28 20:13 /home/joedoe/public_html
$ ls -ld ~joedoe/public_html/index.html
-rw-rw-r--1 joedoe  joedoe  218 Jun 28 20:12 
/home/joedoe/public_html/index.html

and I can view the file with mozilla while connecting to plain Apache on
the standard HTTP port 80, however...

 - NOTHING under WEB-INF is ever directly accessible, both WEB-INF and META- 
 INF are protected resources as far as tomcat is concerned.  I'm not sure 
 what you're expecting with the URLs you posted.

Yes, this is correct, things unsed WEB-INF JSP 2.2 standard directory 
should not be directly accessible according to the documentation, but
the directory it rests in should be...

 The test to see if it is working is to put index.html in 
 ~johndoe/public_html and then try to access it by 
 http://localhost:8080/~johndoe or http://localhost:8080/~johndoe/index.html 

THIS IS THE PROBLEM. I cannot see anything when I access:

http://localhost:8080/~johndoe/index.html

but I can access:

http://localhost/~johndoe/index.html

and have restarted tomcat successfully after editing
the $CATALINA_HOME/conf/server.xml file so that it
has the following lines:

 Host

!-- snip --

Listener className=org.apache.catalina.startup.UserConfig
  directoryName=public_html
  userClass=org.apache.catalina.startup.PasswdUserDatabase/

  /Host

Any ideas of why it is not working. I have followed the directions
haven't I. Could it be I need a newer version of Tomcat than the
one distributed with Sun One Studio (which is 4.0.1)? But Tomcat
does not complain about the XML, so it should be recognizing it?

Thank you for your help,

Neil

 
 After that, anything else you have to do would have to follow the standard 
 app deployment rules, such as having servlets defined in web.xml or using 
 the invoker, defining welcome pages in web.xml, etc.
 
 HTH
 
 John
  On Fri, 27 Jun 2003 00:24:40 -0230 (NDT), Neil Zanella 
 [EMAIL PROTECTED] wrote:
 
 
  Thank you for your suggestion. I am using Tomcat 4.0.1 and I realize
  that the same applies to Tomcat 4.0:
 
  http://jakarta.apache.org/tomcat/tomcat-4.0- 
  doc/config/defaultcontext.html
 
  I have read the User Web Applications section and done as described:
 
  I added the XML entity and attributes given by:
 
  Listener className=org.apache.catalina.startup.UserConfig
  directoryName=public_html
  userClass=org.apache.catalina.startup.PasswdUserDatabase/
 
  inside the Host entity in the server.xml file. I added these at the very
  end of the entity. I also created user readable files:
 
  ~johndoe/public_html/contextroot/WEB-INF/web.xml
  ~johndoe/public_html/contextroot/WEB-INF/classes
  ~johndoe/public_html/contextroot/WEB-INF/classes/JohnDoe.class
 
  and also tried
 
  ~johndoe/public_html/webapps/contextroot/WEB-INF/web.xml
  ~johndoe/public_html/webapps/contextroot/WEB-INF/classes
  ~johndoe/public_html/webapps/contextroot/WEB-INF/classes/JohnDoe.class
 
  as well as:
 
  ~johndoe/public_html/WEB-INF/web.xml
  ~johndoe/public_html/WEB-INF/classes
  ~johndoe/public_html/WEB-INF/classes/JohnDoe.class
 
  but I get a 404 HTTP response (file not found) each
  time I point my browser to:
 
  http://localhost:8080/~johndoe/contextroot/webappjohndoe
  http://localhost:8080/~johndoe/webappjohndoe
 
  Furthermore, each time I have a directory called 
  ~johndoe/public_html/WEB-INF and restart the server,
  I get a 404 when I access:
 
  http://localhost:8080/~johndoe
 
  whereas in the other cases I get a directory listing.
 
  The documentation states:
 
  Each user web application will be deployed with characteristics 
  established by any DefaultContext element you have configured
  for this Host.
 
  Does this have anything to do with it? I am puzzled by why
  my servlet is not displaying.
 
  Once again, thank you for your help!!!
 
  Neil
 
  On Thu, 26 Jun 2003, John Turner wrote:
 
 
  http://jakarta.apache.org/tomcat/tomcat-4.1-doc/config/host.html
 
  The section marked User Web Applications should be what you want.
 
  John
 
  On Thu, 26 Jun 2003 09:17:33 -0230 (NDT), Neil Zanella 
  [EMAIL PROTECTED] wrote:
 
  
   Hello,
  
   I have successfully setup Tomcat but now I want the following:
  
   Suppose some Linux based system has a dynamic and constantly changing
   number of users ranging in the thousands. I would like to set up
   tomcat so that:
  
   Each user gets a context root in a directory such as:
   http://localhost:8080/~johndoe

Re: multiuser setup: please help

2003-06-28 Thread Neil Zanella

Thanks John! All I had to do was upgrade my Tomcat installation from
the 4.0.1 version which comes with Java Sun One Studio (and is still
being distributed at the Java site, huh!) to Tomcat 4.1.24, which at
least is a stable release!

I don't know why Java is still distributing 
j2sdk-1_4_1_02-s1studio_ce-4u1-bin-linux.bin
with Tomcat 4.0.1. They should make a new
release with the updated Tomcat version
(or not distribute Tomcat at all and
encourage users to download the
latest)!

Neil

On Sat, 28 Jun 2003, Neil Zanella wrote:

  The test to see if it is working is to put index.html in 
  ~johndoe/public_html and then try to access it by 
  http://localhost:8080/~johndoe or http://localhost:8080/~johndoe/index.html 
 
 THIS IS THE PROBLEM. I cannot see anything when I access:
 
 http://localhost:8080/~johndoe/index.html
 
 Any ideas of why it is not working. I have followed the directions
 haven't I. Could it be I need a newer version of Tomcat than the
 one distributed with Sun One Studio (which is 4.0.1)? But Tomcat
 does not complain about the XML, so it should be recognizing it?
  
   I added the XML entity and attributes given by:
  
   Listener className=org.apache.catalina.startup.UserConfig
   directoryName=public_html
   userClass=org.apache.catalina.startup.PasswdUserDatabase/


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



multiuser setup: please help

2003-06-26 Thread Neil Zanella

Hello,

I have successfully setup Tomcat but now I want the following:

Suppose some Linux based system has a dynamic and constantly changing
number of users ranging in the thousands. I would like to set up
tomcat so that:

   Each user gets a context root in a directory such as:
   http://localhost:8080/~johndoe/contextroot/

   This happens in such a way that when a request to a subdirectory
   that looks like the one above is issued, Tomcat automatically
   knows how to handle it. Is this possible?

This would be ideal. I don't see why it shouldn't be possible.

If this is impossible, then consider it to be a missing feature
from tomcat. I almost feel it should be documented somewhere if
available, otherwise, if not available, it should be implemented.

I guess I could define a path mapping of the form:

http://localhost:8080/~+/contextroot/

I actually tried this but it did not work: I used the path mapping
inside the webapps/ROOT/WEB-INF/web.xml file:

?xml version=1.0 encoding=ISO-8859-1?

!DOCTYPE web-app
PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN
http://java.sun.com/dtd/web-app_2_3.dtd;

web-app

  display-namewelcome/display-name
  descriptionThese examples are from the created contextroot 
subdirectory of webapps./description
  servlet
servlet-namewelcome/servlet-name
descriptionThis web application welcomes you./description
servlet-classWelcomeServlet/servlet-class
  /servlet
  servlet-mapping
servlet-namewelcome/servlet-name
url-patternhttp://localhost:8080/~*/contextroot/*/url-pattern
  /servlet-mapping

/web-app

I thought I could have the URL execute a servlet, that would execute
then execute a servlet from the users' directory. Sound complicated?
Perhaps there is an easier way???


Suggestions very welcome!!!

Neil


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



Re: multiuser setup: please help

2003-06-26 Thread Neil Zanella

Thank you for your suggestion. I am using Tomcat 4.0.1 and I realize
that the same applies to Tomcat 4.0:

http://jakarta.apache.org/tomcat/tomcat-4.0-doc/config/defaultcontext.html

I have read the User Web Applications section and done as described:

I added the XML entity and attributes given by:

  Listener className=org.apache.catalina.startup.UserConfig
directoryName=public_html
userClass=org.apache.catalina.startup.PasswdUserDatabase/

inside the Host entity in the server.xml file. I added these at the very
end of the entity. I also created user readable files:

~johndoe/public_html/contextroot/WEB-INF/web.xml
~johndoe/public_html/contextroot/WEB-INF/classes
~johndoe/public_html/contextroot/WEB-INF/classes/JohnDoe.class

and also tried

~johndoe/public_html/webapps/contextroot/WEB-INF/web.xml
~johndoe/public_html/webapps/contextroot/WEB-INF/classes
~johndoe/public_html/webapps/contextroot/WEB-INF/classes/JohnDoe.class

as well as:

~johndoe/public_html/WEB-INF/web.xml
~johndoe/public_html/WEB-INF/classes
~johndoe/public_html/WEB-INF/classes/JohnDoe.class

but I get a 404 HTTP response (file not found) each
time I point my browser to:

http://localhost:8080/~johndoe/contextroot/webappjohndoe
http://localhost:8080/~johndoe/webappjohndoe

Furthermore, each time I have a directory called 
~johndoe/public_html/WEB-INF and restart the server,
I get a 404 when I access:

http://localhost:8080/~johndoe

whereas in the other cases I get a directory listing.

The documentation states:

Each user web application will be deployed with characteristics 
established by any DefaultContext element you have configured
for this Host.

Does this have anything to do with it? I am puzzled by why
my servlet is not displaying.

Once again, thank you for your help!!!

Neil

On Thu, 26 Jun 2003, John Turner wrote:

 
 http://jakarta.apache.org/tomcat/tomcat-4.1-doc/config/host.html
 
 The section marked User Web Applications should be what you want.
 
 John
 
 On Thu, 26 Jun 2003 09:17:33 -0230 (NDT), Neil Zanella [EMAIL PROTECTED] 
 wrote:
 
 
  Hello,
 
  I have successfully setup Tomcat but now I want the following:
 
  Suppose some Linux based system has a dynamic and constantly changing
  number of users ranging in the thousands. I would like to set up
  tomcat so that:
 
  Each user gets a context root in a directory such as:
  http://localhost:8080/~johndoe/contextroot/
 
  This happens in such a way that when a request to a subdirectory
  that looks like the one above is issued, Tomcat automatically
  knows how to handle it. Is this possible?
 
  This would be ideal. I don't see why it shouldn't be possible.
 
  If this is impossible, then consider it to be a missing feature
  from tomcat. I almost feel it should be documented somewhere if
  available, otherwise, if not available, it should be implemented.
 
  I guess I could define a path mapping of the form:
 
  http://localhost:8080/~+/contextroot/
 
  I actually tried this but it did not work: I used the path mapping
  inside the webapps/ROOT/WEB-INF/web.xml file:
 
  ?xml version=1.0 encoding=ISO-8859-1?
 
  !DOCTYPE web-app
  PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN
  http://java.sun.com/dtd/web-app_2_3.dtd;
 
  web-app
 
  display-namewelcome/display-name
  descriptionThese examples are from the created contextroot subdirectory 
  of webapps./description
  servlet
  servlet-namewelcome/servlet-name
  descriptionThis web application welcomes you./description
  servlet-classWelcomeServlet/servlet-class
  /servlet
  servlet-mapping
  servlet-namewelcome/servlet-name
  url-patternhttp://localhost:8080/~*/contextroot/*/url-pattern
  /servlet-mapping
 
  /web-app
 
  I thought I could have the URL execute a servlet, that would execute
  then execute a servlet from the users' directory. Sound complicated?
  Perhaps there is an easier way???
 
 
  Suggestions very welcome!!!
 
  Neil
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 
 
 


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



What the Tomcat 4 RPM files forgot to do.

2003-06-23 Thread Neil Zanella

Hello,

I would like to make the following suggestion for the Tomcat 4 RPM file:

To conform with Red Hat's policy, and at the same time simplify the 
installation process, the following two files should be placed in
the Red Hat compliant /etc/profile.d directory (these are used
to set environment variables upon startup from various RPM
packages):

$ cat /etc/profile.d/tomcat.csh
# Tomcat initialization script (csh)
if ( $?CATALINA_HOME ) then
 exit
endif
setenv CATALINA_HOME /var/tomcat4

... and ...

$ cat /etc/profile.d/tomcat.sh
# Tomcat initialization script (sh)
if [ -z $CATALINA_HOME ] ; then
CATALINA_HOME=/var/tomcat4
fi
export CATALINA_HOME


This sets CATALINA_HOME correctly according to the current installation of 
tomcat4 under /var/tomcat4 (whose correctness according to FHS I am not
yet convinced of).

Thanks!

Neil


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



RPMs

2003-06-21 Thread Neil Zanella

Hello,

I have installed the tomcat 4 RPMs but when I http to port 8080 I see 
nothing despite the fact that I have started tomcat and apache from 
the /etc/init.d directory. Any ideas?

Thanks!!!

Neil


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



Re: UserDir

2002-08-03 Thread Neil Zanella


I am no expert on tomcat but as far as I know the tomcat server needs to
be restarted each time the contents of one of the web application source
code files changes. If something like UserDir really can be set so that
$CATALINA_HOME is different for every user, then there should probably
be a cron job on the system to restart the server at regular time
intervals or something like that.

And by the way, what exactly did you do to reconfigure your tomcat
installation?

Regards,

Neil

On Fri, 2 Aug 2002, Adrian Montero wrote:

 
 I reconfigured my jakarta to handle user dir files. Everything works 
 fine and dandy like in $CATALINA_HOME/webapps. However when I try to run 
 a servlet (only in the ~userdir) I get the download dialog from my web 
 browser. I have tried to copy $CATALINA_HOME/webapps/examples to my 
 userdir and indeed jsps work but not servlets it doesnt even find them. 
 Anyone got any ideas?
 
 Regards
 
 
 
 --
 To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: mailto:[EMAIL PROTECTED]
 


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




RE: How do I implement favicon.ico using catalina?

2002-06-13 Thread Neil Zanella


The rendering of a favicon is dependent on your browser supporting it.
Currently as far as I know only MS IE, KDE konqueror, and the latest
beta version of netscape 7 support the rendering of a favicon. Place
the favicon.ico in some place such as images/favicon.ico and then
place the following in your html code:

link rel=shortcut icon href=images/favicon.ico

On Thu, 13 Jun 2002, Reynir Hübner wrote:

 
 yes,I think it should work as it's the browser that checks for it, it has nothing 
to do with the webserver.
 
 for somereason I feel like it should be favico.ico but not favicon.ico .. can it be 
correct ?
 
 hope it helps
 -reynir
 
 
 
  -Original Message-
  From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
  Sent: 13. júní 2002 18:21
  To: Tomcat Users List
  Subject: How do I implement favicon.ico using catalina?
  
  
  I tried dropping a favicon.ico into my webapps/myapp directory to no
  avail... Is this supported?
  
  Dave
  
  --
  To unsubscribe, e-mail:   
  mailto:[EMAIL PROTECTED]
  For additional commands, e-mail: 
  mailto:[EMAIL PROTECTED]
  
  
 
 --
 To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: mailto:[EMAIL PROTECTED]
 


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




please help: multiuser installation

2002-06-13 Thread Neil Zanella


Hello,

I want all users on my system to serve servlets or JSPs from their own
~/public_html directories or somewhere under there. So how do I
configure tomcat for this?

Thanks,

Neil


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




Re: AW: unanswered questions: Multiple Tomcat Instances

2002-05-28 Thread Neil Zanella


Thanks!

Did you just copy the files under ${CATALINA_BASE}/conf from the
corresponding ones in ${CATALINA_HOME}/conf or do these need to
be altered in one way or another?
Also, I am assuming that you are placing your java and class
files under ${CATALINA_HOME}/webapps/Context/WEB-INF/classes
Is this the case or can it be done differently?
Do any settings need to be modified under
${CATALINA_HOME}/conf/server.xml ?

Thanks,

Neil

On Tue, 28 May 2002, Ralph Einfeldt wrote:

 I don't know if it's the minimal set, but it works for me:
 
 ${CATALINA_BASE}/conf
 ${CATALINA_BASE}/conf/server.xml
 ${CATALINA_BASE}/conf/tomcat-users.xml
 ${CATALINA_BASE}/conf/web.xml
 ${CATALINA_BASE}/conf/catalina.policy
 ${CATALINA_BASE}/webapps/Context
   // Replace Context with the name of your
   // Context (Default=ROOT)
 
 You access it with an url like
 localhost:8080 
 if you are browsing from the server.
 
 hostname:8080
 if you are browsing from your intranet
 
 8080 is the port you defined in server.xml for the http connector.
 
  -Ursprüngliche Nachricht-
  Von: Neil Zanella [mailto:[EMAIL PROTECTED]]
  Gesendet: Dienstag, 28. Mai 2002 01:47
  An: Tomcat Users Mailing List
  Betreff: unanswered questions: Multiple Tomcat Instances
  
  
  
  Does anyone know what a minimal installation of files under 
  ${CATALINA_BASE}
  should consist of in order to allow the running of servlets and jsps?
  Where should they be placed? How do I access them with a web browser?
 
 --
 To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: mailto:[EMAIL PROTECTED]
 



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




Re: Tomcat newbie: multiuser installation

2002-05-27 Thread Neil Zanella


On Sun, 26 May 2002, Phillip Morelock wrote:

 I don't know about the ~ stuff but I do know the probable reason you have
 to be root to do what you're doing:
 
 To bind to a port  1024 on linux you must be root.  If you've bound tomcat
 to a port lower than 1024, you'll have to be root to start it.

I have tomcat running on the standard tomcat port which is 8080 so that 
should not be a problem. However it seems that allowing users to shut
down and restart the server manually is not good because one user could
end up starting the server and another shutting it down at the same
time. There must be a better way, such as setting up a cron job to
restart tomcat every so often. Is this how it is done? Alternatively,
can users run their own instances of the tomcat server? I don't see
how a tomcat installation could cater to multiple developers, each
developing their own servlets, without causing trouble. (?)

 As far as being able to load new classes, have you tried using reloadable
 contexts?  search google for
 
 tomcat 4 reloadable contexts

I will have a look.

Thanks,

Neil

 On 5/26/02 3:06 PM, Neil Zanella [EMAIL PROTECTED] wrote:
 
  
  Hello,
  
  I have asked posted question before but got no responses
  so I will try this again:
  
  I have installed Tomcat 4.0.3 on Red Hat Linux 7.3 with
  Sun JDK 1.4 and J2EE 1.3.1 and everything runs smoothly
  but every time I recompile a servlet placed under the
  /usr/local/jakarta-tomcat-4.0.3/webapps/ROOT/WEB-INF/classes/
  directory I have to restart the Tomcat server as root
  in order for the changes to take effect. I need to
  set up Tomcat in such a way that each user can restart
  the server since no user is supposed to know the root
  passwod. In addition, each user should be able to keep
  their own servlets under their ~/public_html directory
  since each user can only write under ~ and /tmp. Also,
  they should able to have a URL involving ~username
  point to their servlets.
  
  All I am asking is, how do I configure Tomcat for use
  by multiple nonpriviledged servlet developers on a
  multiuser Unix like system?
  
  Thanks,
  
  Neil
  
  
  --
  To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
  For additional commands, e-mail: mailto:[EMAIL PROTECTED]
  
 
 
 --
 To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: mailto:[EMAIL PROTECTED]
 


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




Re: AW: Tomcat newbie: multiuser installation

2002-05-27 Thread Neil Zanella


On Mon, 27 May 2002, Ralph Einfeldt wrote:

 
 Have a look at RUNNING.txt:
 
 (4) Advanced Configuration - Multiple Tomcat 4 Instances

Thanks!

Neil


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




problems shutting down tomcat 4.0.3: java.net.ConnectException

2002-05-27 Thread Neil Zanella


Hello,

Sometimes, when I try to shut down tomcat I get the following errors, 
other times I do not. I am on Red Hat 7.3 with sun jdk 1.4. These
errors show up roughly 50% of the time.

# $CATALINA_HOME/bin/startup.sh
Using CATALINA_BASE:   /usr/local/jakarta-tomcat-4.0.3
Using CATALINA_HOME:   /usr/local/jakarta-tomcat-4.0.3
Using CATALINA_TMPDIR: /usr/local/jakarta-tomcat-4.0.3/temp
Using JAVA_HOME:   /usr/local/j2sdk1.4.0
# $CATALINA_HOME/bin/shutdown.sh
Using CATALINA_BASE:   /usr/local/jakarta-tomcat-4.0.3
Using CATALINA_HOME:   /usr/local/jakarta-tomcat-4.0.3
Using CATALINA_TMPDIR: /usr/local/jakarta-tomcat-4.0.3/temp
Using JAVA_HOME:   /usr/local/j2sdk1.4.0
Catalina.stop: java.net.ConnectException: Connection refused
java.net.ConnectException: Connection refused
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:295)
at 
java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:161)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:148)
at java.net.Socket.connect(Socket.java:425)
at java.net.Socket.connect(Socket.java:375)
at java.net.Socket.init(Socket.java:290)
at java.net.Socket.init(Socket.java:118)
at org.apache.catalina.startup.Catalina.stop(Catalina.java:831)
at org.apache.catalina.startup.Catalina.execute(Catalina.java:683)
at org.apache.catalina.startup.Catalina.process(Catalina.java:179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:243)

Other times shutting down works just fine:

# $CATALINA_HOME/bin/startup.sh
Using CATALINA_BASE:   /usr/local/jakarta-tomcat-4.0.3
Using CATALINA_HOME:   /usr/local/jakarta-tomcat-4.0.3
Using CATALINA_TMPDIR: /usr/local/jakarta-tomcat-4.0.3/temp
Using JAVA_HOME:   /usr/local/j2sdk1.4.0
# $CATALINA_HOME/bin/shutdown.sh
Using CATALINA_BASE:   /usr/local/jakarta-tomcat-4.0.3



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




startup question

2002-05-27 Thread Neil Zanella


I was reading a howto that emphasiszes that tomcat
needs to be started before apache. Is this really
true and if yes then why? I was able to run some
servlets by starting apache first.

Thanks,

Neil


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




unanswered questions: Multiple Tomcat Instances

2002-05-27 Thread Neil Zanella


Hello,

I am still trying to setup tomcat for multiple instances.
I read RUNNING.txt but it is rather incomplete
in section (4) as it does not describe what a
minimal set of files and their contents in
${CATALINA_BASE} would consist of in this
case...

As a regular user I created a new directory called ~/tomcat and added the
CATALINA_BASE directory to my ~/.bash_profile so that it looks like this:

export PATH=${PATH}:/usr/local/jdk/bin
export JAVA_HOME=/usr/local/j2sdk1.4.0
export CLASSPATH=.:/usr/local/j2sdkee1.3.1/lib/j2ee.jar
export CATALINA_HOME=/usr/local/jakarta-tomcat-4.0.3
export CLASSPATH=${CLASSPATH}:/usr/local/saxon/saxon.jar
export CATALINA_BASE=${HOME}/tomcat

Then I created the four directories mentioned in RUNNING.txt (4) with:

mkdir ${CATALINA_BASE}/{conf,logs,webapps,work}

Now what? I can start tomcat but cannot shut it down:

Catalina.stop: java.lang.Exception: Can't open config file: 
/home/nzanella/tomcat/conf/server.xml due to: java.io.FileNotFoundException: 
/home/nzanella/tomcat/conf/server.xml (No such file or directory)

Does anyone know what a minimal installation of files under ${CATALINA_BASE}
should consist of in order to allow the running of servlets and jsps?
Where should they be placed? How do I access them with a web browser?

Thanks,

Neil


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




Tomcat newbie: multiuser installation

2002-05-26 Thread Neil Zanella


Hello,

I have asked posted question before but got no responses
so I will try this again:

I have installed Tomcat 4.0.3 on Red Hat Linux 7.3 with
Sun JDK 1.4 and J2EE 1.3.1 and everything runs smoothly
but every time I recompile a servlet placed under the
/usr/local/jakarta-tomcat-4.0.3/webapps/ROOT/WEB-INF/classes/
directory I have to restart the Tomcat server as root
in order for the changes to take effect. I need to
set up Tomcat in such a way that each user can restart
the server since no user is supposed to know the root
passwod. In addition, each user should be able to keep
their own servlets under their ~/public_html directory
since each user can only write under ~ and /tmp. Also,
they should able to have a URL involving ~username
point to their servlets.

All I am asking is, how do I configure Tomcat for use
by multiple nonpriviledged servlet developers on a
multiuser Unix like system?

Thanks,

Neil


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




Tomcat installation: HTTP Status 404 error message

2002-05-14 Thread Neil Zanella


Hello,

I have just installed Apache Jakarta Tomcat 4.0.3, Java 2 SDK 1.4.0,
and Java 2 SDK EE 1.3.1 on a Red Hat 7.3 Linux platform. I appended
the following lines to my personal ~/.bash_profile file:

export PATH=$PATH:/usr/local/jdk/bin
export JAVA_HOME=/usr/local/j2sdk1.4.0
export CLASSPATH=.:/usr/local/j2sdkee1.3.1/lib/j2ee.jar
export CATALINA_HOME=/usr/local/jakarta-tomcat-4.0.3
export CLASSPATH=$CLASSPATH:/usr/local/saxon/saxon.jar

I can view the following file:

/usr/local/jakarta-tomcat-4.0.3/webapps/ROOT/index.html

by pointing my browser to http://localhost:8080/

However when I tried to run a servlet by creating directory:

/usr/local/jakarta-tomcat-4.0.3/webapps/ROOT/WEB-INF/classes

and placing class file HelloWorldServlet.class there and

accessing http://localhost:8080/servlet/HelloWorldServlet

I get the following error:

Apache Tomcat/4.0.3 - HTTP Status 404 - /servlets/HelloWorldServlet

!!

Why? I can view the example servlet files just fine.
Is there some file such as web.xml or so which I need
to configure to be able to view HelloWorldServlet in
this directory (which I believe is the standard place
where servlets should be put)?

Thanks a lot,

Neil


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




Tomcat: please help: multi user/developer setup

2002-05-14 Thread Neil Zanella


OK. The problem was that the server needs to be restarted each
time a servlet is recompiled. Doing this as root is somewhat
not the best thing to do from a security point of view.
Is there any way that I can give all users on the
system permission to create their own servlets
and run them? How can I configure tomcat to
allow for such a configuration?

I am looking for a configuration where a command like
http://localhost:8080/~janesmith/servlet/HelloWorldServlet

will access janesmith's HelloWorldServlet in some standard location
such as ~janesmith/tomcat/HelloWorldServlet.class or something like that.

Thanks!

Neil

On Tue, 14 May 2002, Neil Zanella wrote:

 
 Hello,
 
 I have just installed Apache Jakarta Tomcat 4.0.3, Java 2 SDK 1.4.0,
 and Java 2 SDK EE 1.3.1 on a Red Hat 7.3 Linux platform. I appended
 the following lines to my personal ~/.bash_profile file:
 
 export PATH=$PATH:/usr/local/jdk/bin
 export JAVA_HOME=/usr/local/j2sdk1.4.0
 export CLASSPATH=.:/usr/local/j2sdkee1.3.1/lib/j2ee.jar
 export CATALINA_HOME=/usr/local/jakarta-tomcat-4.0.3
 export CLASSPATH=$CLASSPATH:/usr/local/saxon/saxon.jar
 
 I can view the following file:
 
 /usr/local/jakarta-tomcat-4.0.3/webapps/ROOT/index.html
 
 by pointing my browser to http://localhost:8080/
 
 However when I tried to run a servlet by creating directory:
 
 /usr/local/jakarta-tomcat-4.0.3/webapps/ROOT/WEB-INF/classes
 
 and placing class file HelloWorldServlet.class there and
 
 accessing http://localhost:8080/servlet/HelloWorldServlet
 
 I get the following error:
 
 Apache Tomcat/4.0.3 - HTTP Status 404 - /servlets/HelloWorldServlet
 
 !!
 
 Why? I can view the example servlet files just fine.
 Is there some file such as web.xml or so which I need
 to configure to be able to view HelloWorldServlet in
 this directory (which I believe is the standard place
 where servlets should be put)?
 
 Thanks a lot,
 
 Neil
 
 
 --
 To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: mailto:[EMAIL PROTECTED]
 


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