Manager App: 500 internal error

2002-04-08 Thread JBrawner

Hello,

I'm having trouble getting the manager app to work.  I've added an entry in
tomcat-users.xml and after authentication I get the following error:

(in log and browser)

javax.servlet.ServletException: Error allocating a servlet instance
   at
org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:657)
   at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)

   at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)

   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.java:190)

   at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)

   at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:528)

   at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)

   at
org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)

   at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)

   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:2343)
   at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)

   at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)

   at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)

   at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)

   at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)

   at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)

   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:174)

   at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)

   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:1012)

   at
org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1107)

   at java.lang.Thread.run(Thread.java:536)

Root Cause
oot cause
java.lang.SecurityException: Servlet of class
org.apache.catalina.servlets.ManagerServlet is privileged and cannot be
loaded by this web application
   at
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:900)

   at
org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:653)
   at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)

   at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)

   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.java:190)

   at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)

   at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:528)

   at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)

   at
org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)

   at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)

   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:2343)
   at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)

   at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)

   at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)

   at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)

   at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)

   at
org.apache.catalina.core.StandardPipelin

security-constraint and error-page

2002-03-12 Thread JBrawner

I've setup a security constraint, with basic authentication, in a memory
realm.  It works as expected until I add an error page for the 401 error
code (unauthorized). Then, when I request the page, I get the 401 error
page automatically and am never prompted to login.  I was expecting to get
the 401 error page only if I supplied an incorrect login.

What am I doing wrong?  (Win2000pro, Tomcat 4.0.3, jdk 1.4)   Here is a
portion of my web.xml:

  
401
/notauthorized.jsp
  

  

  BrawnerLau Website
  /adminentry.jsp


  brawnerlau

  

  
BASIC
BrawnerLau Website
  


Thanks,

Jason E. Brawner
Silenus Group
(248) 735-8077


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




Tomcat 4.0.2 unpacking wars

2002-03-04 Thread JBrawner

I've upgraded from Tomcat 3 to Tomcat 4.0.2 and have lost the ability to
unpack wars. Here is a piece of my server.xml

  

  


I use the following command to create my war file from within the PSP
directory
jar cfv PSP.war .

This worked great with Tomcat 3(something) but I get the following error
when tomcat 4 starts:

2002-03-04 10:17:09 StandardContext[/PSP]: Error initializing resources:
Document base C:\Tomcat402\webapps\PSP does not exist or is not a readable
directory
2002-03-04 10:17:09 StandardContext[/PSP]: Context startup failed due to
previous errors
2002-03-04 10:17:09 StandardContext[/PSP]: Exception during cleanup after
start failed
LifecycleException:  Container StandardContext[/PSP] has not been started
 at
org.apache.catalina.core.ContainerBase.stop(ContainerBase.java:1147)
 at
org.apache.catalina.core.StandardContext.stop(StandardContext.java:3451)
 at
org.apache.catalina.core.StandardContext.start(StandardContext.java:3408)
 at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1123)
 at org.apache.catalina.core.StandardHost.start(StandardHost.java:614)
 at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1123)
 at
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:343)
 at
org.apache.catalina.core.StandardService.start(StandardService.java:388)
 at
org.apache.catalina.core.StandardServer.start(StandardServer.java:506)
 at
org.apache.catalina.startup.CatalinaService.start(CatalinaService.java:261)
 at
org.apache.catalina.startup.CatalinaService.execute(CatalinaService.java:172)
 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.BootstrapService.main(BootstrapService.java:428)

It is correct that the PSP directory doesn't exist but shouldn't tomcat
create that directory when unpacking the war (which it doesn't do). Any
ideas on how to solve this problem?

Thanks in advance,

Jason E. Brawner


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




RE: 2 instance of tomcat within 1 machine

2002-02-26 Thread JBrawner


John,

Could you please post the contents of you server.xml?  I'm trying to do
exactly what you've done with only 2 tomcat instances and am having
difficulty.  Also, I'm confused at which tomcat subdirectories needed to be
present in each CATALINA_BASE directory. The running.txt file mentions the
conf, logs, webapps, and work directories but you mention having to edit
the catalina.bat file (in the bin sub-directory) for each instance. So the
bin directory is needed to be copied as well?

Thanks,

Jason Brawner



   

John Niven 

  
rcat.com>cc:   

 Subject: RE: 2 instance of tomcat within 
1 machine
02/26/2002 

08:48 AM   

Please respond 

to "Tomcat 

Users List"

   

   





Hi Keith (response inline)

This is supplementary info to Remy's: I think we've both got different
set-ups.

> -Original Message-
> From: Keith Ng [mailto:[EMAIL PROTECTED]]
> Sent: 2 March 2002 11:40
> To: Tomcat Users List
> Subject: RE: 2 instance of tomcat within 1 machine
>
>
> Which version of tomcat are u using?
> im using 4.0.2
>

I've recently got 5 instances running on one 'lil-ole workstation, used for
personal development work.  My goal was to have multiple instances that I
could mess around with, without destroying the "live" (documentation,
examples, etc) server.

> how did u configure? Must i have more then 1 copy of tomcat?

No. I've installed tomcat (4.0.2) on my D: drive (should have said: Windows
2000 Pro, 2 hard-drives with multiple partitions - D: is apps, I: is
development) and the various instances on my I: drive:

CATALINA_HOME:
D:\tomcat\
CATALINA_BASEs:
i:\tomcat-servers\server01\
i:\tomcat-servers\server02\
i:\tomcat-servers\server03\
etc

Follow the instructions in running.txt for which directories to copy - I'm
at work just now (JRun ;-( ) but off-hand I think it's bin, conf, lib &
webapps.  Within /conf, you need to edit server.xml so the various ports
don't conflict.  Eg. if the CATALINA_HOME/conf/server.xml uses port 8080,
/server01/conf/server.xml could be 8081 for example.  There are three
locations in the server.xml which I edited - I don't have the file to hand
at the moment, but if you'd like a copy I can post it tonight/tomorrow.

Once you've created the directory heirarchy, and edited the server.xml
files, you should be able to start your new instances from the command
line/shell.  I'm lazy, so I just edited the catalina.bat files in
/server0x/bin/ to set CATALINA_BASE and CATALINA_HOME - again, if you'd
like
a copy I'll post it tomorrow.

> I really dunno... pls help
>
>

Basically, most of the info is in running.txt from your Tomcat install.  I
found the only real gotcha was that I needed to renumber the ports.  Once
I'd got that sorted out the rest was plain sailing ;)

Best of luck, and if you're still stuck let me know and I'll post files.

Cheers
John

--
John Niven
Reply via mailing-list.

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






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




Jasper - precompiling and loading jsp's

2002-02-21 Thread JBrawner

I'm having difficulty getting Tomcat 4.0.2 (Win2000) to load jsp's on
startup. Here are my questions:

1.  Do I have to pre-compile a jsp before starting tomcat for the
 to work on a jsp file?
2.  How do I get jspc / jasper tool to work?  Where is the documentation?

My goal is to get jsp's compiled and loaded when tomcat starts.  Is this
possible?

Thanks,

Jason E. Brawner


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




JSP load-on-startup

2002-01-29 Thread JBrawner

I used the following xml in my deployment descriptor expecting Tomcat4 to
generate a servlet from my jsp within the work directory.


  Home
  /home.jsp
  1



  Home
  /home.jsp


It appears to have done nothing.  The servlet isn't generated until I
request home.jsp for the first time.  Did I do this correctly?  Shouldn't
it have compiled, loaded and initialized my jsp?

Thanks in advance,

Jason E. Brawner



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




Directory problem

2002-01-25 Thread JBrawner

I am running Tomcat 4 standalone.  Currently, I have my website running
with a base directory called Brawner.  Therefore, to access my site you
have to use the following URL...

http://localhost/Brawner/

I need it to work off the root directory like the following...
http://localhost/

Is there a way I can setup tomcat to direct all request to the root
directory to my Brawner directory?

Thanks,

Jason E. Brawner



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




Tomcat4 not unpacking wars

2001-12-27 Thread JBrawner

Tomcat4 is not unpacking my wars on startup.  Do I have to configure it to
do this?  The following is the host element from my server.xml. Isn't this
right?


  


Thanks,

Jason E. Brawner



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




Unknown error

2001-12-20 Thread JBrawner

I have Tomcat 4 running standalone. The error message below is in my
catalina_log file many times and I don't know what the problem is.  All my
JSP's and servlets run fine.


2001-12-20 07:53:45 HttpProcessor[80][3] process.invoke
java.lang.NullPointerException
 at
org.apache.catalina.valves.ErrorDispatcherValve.status(ErrorDispatcherValve.java:280)
 at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:180)
 at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
 at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
 at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
 at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:462)
 at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
 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:566)
 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:1011)
 at
org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1106)
 at java.lang.Thread.run(Thread.java:484)


Any idea's on how to fix this?

Thanks,
Jason E. Brawner



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




Using mod_jk in Tomcat4

2001-12-13 Thread JBrawner

I've given up on mod_webapp and am trying to use mod_jk.  The instructions
for mod_jk says 'use Tomcat to create the mod_jk.conf file'.  How is this
done?


thanks,

Jason E. Brawner


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




Tomcat 4 as an NT Service

2001-12-03 Thread JBrawner

I am trying to get Tomcat 4 to run as an service on win2000pro.  I copied
the wrapper.properties file from my Tomcat 3.2 installation and placed it
in CATALINA_HOME\conf\ directory and used jk_nt_service to create the
service.  When I try to start the service, windows returns a message saying
the service didn't return an error.

Here my wrapper.properties file: (i included all the .jar i found just to
be safe)

##
#
# $Header: /home/cvs/jakarta-tomcat/src/etc/Attic/wrapper.properties,v
1.2.2.1 2000/10/16 01:59:22 larryi Exp $
# $Revision: 1.2.2.1 $
# $Date: 2000/10/16 01:59:22 $
#
#
# jk_service.properties - a bootstrup file for the Tomcat NT service.
#
# This file provides jk_nt_service with the needed information to
# start tomcat at a different process.
#
# As a general note, the characters $( and ) are used internally to define
# macros. Do not use them!!!
#
# Whenever you see a set of lines such as:
# x=value
# y=$(x)\something
#
# the final value for y will be value\something
#
# Normaly all you will need to modify is the first two properties, i.e.
# wrapper.tomcat_home and wrapper.java_home. Most of the configuration
# is derived from these two.
#

#
# wrapper.tomcat_home should point to the location where you
# installed tomcat. This is where you have your conf, webapps and lib
# directories.
#
wrapper.catalina_home=C:\Tomcat401

#
# wrapper.java_home should point to your Java installation. Normally
# you should have a bin and lib directories beneath it.
#
wrapper.java_home=C:\Java\j2sdk1.4.0-beta3

#
#-- ADVANCED MODE 
# Make sure that you read the how-to before making too many changes.
#-
#

#
# Defining where the service is going to put the standard
# output of Tomcat. This is where System.out.println and
# System.err.println goes to.
#
#wrapper.stdout=$(wrapper.catalina_home)\logs\StandardOut.log
#wrapper.stderr=$(wrapper.catalina_home)\logs\StandardErr.log

#
# Additions to the path. put here directories where you store DLLs for
# native methods etc.
#
#wrapper.ld_path=d:\
wrapper.ld_path=c:\

#
# Defining the classpath. All the rows that belongs to the class_path
# property are concatenated to create the classpath for Tomcat.
#
# If you have additional locations that you would like to add to the
# claspath you should add a new wrapper.class_path= line.
#
wrapper.class_path=$(wrapper.catalina_home)\classes
wrapper.class_path=$(wrapper.catalina_home)\common\lib\servlet.jar
wrapper.class_path=$(wrapper.catalina_home)\lib\jasper-runtime.jar
wrapper.class_path=$(wrapper.catalina_home)\lib\jasper-compiler.jar
wrapper.class_path=$(wrapper.catalina_home)\lib\naming-factory.jar
wrapper.class_path=$(wrapper.catalina_home)\common\lib\activation.jar
wrapper.class_path=$(wrapper.catalina_home)\common\lib\jndi.jar
wrapper.class_path=$(wrapper.catalina_home)\common\lib\jta.jar
wrapper.class_path=$(wrapper.catalina_home)\common\lib\mail.jar
wrapper.class_path=$(wrapper.catalina_home)\common\lib\naming-common.jar
wrapper.class_path=$(wrapper.catalina_home)\common\lib\xerces.jar
wrapper.class_path=$(wrapper.catalina_home)\common\lib\naming-resources.jar
wrapper.class_path=$(wrapper.catalina_home)\common\lib\tyrex-0.9.7.0.jar
wrapper.class_path=$(wrapper.catalina_home)\common\lib\jdbc2_0-stdext.jar
wrapper.class_path=$(wrapper.catalina_home)\lib\JTurbo.jar
wrapper.class_path=$(wrapper.catalina_home)\lib\jconn2.jar
wrapper.class_path=$(wrapper.catalina_home)\bin\bootstrap.jar
wrapper.class_path=$(wrapper.catalina_home)\server\lib\catalina.jar
wrapper.class_path=$(wrapper.catalina_home)\server\lib\warp.jar
wrapper.class_path=$(wrapper.catalina_home)\server\lib\tomcat-util.jar
wrapper.class_path=$(wrapper.catalina_home)\server\lib\tomcat-ajp.jar


#
# This is where Javac is located in JDK1.2.x
#
wrapper.class_path=$(wrapper.java_home)\lib\tools.jar
#
# and a tribute to JDK1.1.x
#
wrapper.class_path=$(wrapper.java_home)\lib\classes.zip

#
# This is the Java interpreter used for running Tomcat
#
wrapper.javabin=$(wrapper.java_home)\bin\java.exe

#
# This is Tomcat's startup class (the class that contains Tomcat's
# starting point.
#
#wrapper.startup_class=org.apache.tomcat.startup.Tomcat
wrapper.startup_class=org.apache.catalina.startup.BootstrapService


#
# This is the location where tomcat's server.xml configuration file
# is located.
#
wrapper.server_xml=$(wrapper.catalina_home)\conf\server.xml

#
# The NT service uses AJP12/AJP13 to shutdown Tomcat. The
# wrapper.shutdown_port tells the service the identity of the port that
# is used by AJP12/AJP13.
#
wrapper.shutdown_port=8005

#
# Can either be ajp12 or ajp13 depending on your configuration.
#
# Default value is ajp12
#
wrapper.shutdown_protocol=ajp12

#
# This is the command line that is used to start Tomcat. You can *add*
extra
# parameters to it but you can not remove anything.

2 Tomcat4 questions

2001-11-30 Thread JBrawner

Question 1:  How do you make Tomcat4.0 a NT Service?  In previous releases
I used jk_nt_service and pointed that toward the wrapper.properties file.
There is no wrapper.properties file in Tomcat4  

Question 2:   I installed tomcat and i can see the example jsp's fine
running tomcat alone.  So, I configured it to run under apache (latest
release, 1.3.somthing) and the JSP's work fine functionally, but the images
on http://localhost/examples/jsp/index.html never appear, and the browser
hangs.  Any ideas why?  The only configurations I did where adding
mod_webapp in http.conf and changing tomcats port so it wouldn't conflict
with apache.

Thanks,

Jason E. Brawner



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




Apache/Tomcat sending default image

2001-10-26 Thread JBrawner


Is there anyway for Apache/Tomcat to send a default image to the user if
the image they are requesting doesn't exist to prevent a broken image?  I
have a JSP/Servlet site that collects and dynamically displays images based
on user response. Sometimes the image requested just isn't there.

I could have the JSP go look in the file system everytime to make sure it
was there (pretty easy) but that could take time since there could be tens
of thousands of images.

Is this possible?


Jason E. Brawner






Apache/Tomcat sending default image

2001-10-26 Thread JBrawner

Is there anyway for Apache/Tomcat to send a default image to the user if
the image they are requesting doesn't exist to prevent a broken image?  I
have a JSP/Servlet site that collects and dynamically displays images based
on user response. Sometimes the image requested just isn't there.

I could have the JSP go look in the file system everytime to make sure it
was there (pretty easy) but that could take time since there could be tens
of thousands of images.

Is this possible?


Jason E. Brawner





Limiting size of access.log

2001-10-05 Thread JBrawner

Sorry if this is an elementary question, but how do you limit the file size
of access.log so it doesn't grow, forever?

Thanks,

Jason E. Brawner





Case Sensitivity

2001-09-14 Thread JBrawner

I want a directory in my url to not be case sensitive.  For example:

http://localhost/abc/ABCServlet
http://localhost/ABC/ABCServlet

I want both of the above to go to the /ABC/ABCServlet.  I'm running
Apache/Tomcat.  I've tried the alias in httpd.conf but it doesn't seem to
work.

Any ideas?

Jason E. Brawner
Silenus Group





static class and JSP

2001-09-12 Thread JBrawner

Upon tomcat being started, I have a servlet populate a static class with
configurations that are used by other servlets when they are invoked.  This
works great!  But, now I'd like to have my JSP's use this static class but
I'm getting the "Undefined variable or class name" error on the JSP.  How
do I tell the JSP's where this file is?  It is in the web-inf/classes
directory with my other servlets.

Thanks,

Jason E. Brawner





JSP/Servlet Printing

2001-08-21 Thread JBrawner

This is a question I posted in Sun's Java Forums and got no replies.  I
really need a solution and was hoping someone in this group could help out.

I have an Apache/Tomcat webserver on a standalone touchscreen kiosk. The
customer would like a print button on every jsp and, when touched by the
user, would like the page printed.  How do I do this?

1. I've tried the javascript print() method but I DON'T want the print
dialog to appear.  I want to print directly to the default printer.  Is
there a way to bypass the print dialog?

2. Also, in the servlet, I've tried to populate a JEditorPane with the html
and print it using the awt.print stuff.  But that doesn't work.  Is there a
trick to getting that working within a servlet?

Does anybody know how I can accomplish this by using the two approaches
I've listed or any other way?

Thanks,
JEB





Multiple servlets using same initParameters

2001-08-14 Thread JBrawner

I have multiple servlets in the same directory and they all get the same
init-params from web.xml.

Currently, I have 5 servlets and am required to repeat all the init-params
5 times, one for each servlet.  So if one parameter changes, I have to
change it five times in web.xml. I'd like to only have them in the web.xml
file once and all servlets use them.  How is this possible?

One approach I took was to create a servlet that all my other servlets
subclassed and all it did was grab the init-params.  I couldn't get it to
work.

Any ideas?

Thanks,

JEB




Trouble with logging

2001-08-10 Thread JBrawner

In my servlet I use the log() method which logged to servlet.log.  I have
recently moved my context out of the webapps directory and into my own
directory not in tomcat's directory structure.  Now, everything works ok
except nothing gets logged to servlet.log.   Anybody know how to fix this?

Thanks,
JEB




Logging

2001-08-08 Thread JBrawner

In my servlet I use the log() method which logged to servlet.log.  I have
recently moved my context out of the webapps directory and into my own
directory not in tomcat's directory structure.  Now, everything works ok
except nothing gets logged to servlet.log.   Anybody know how to fix this?



Jason E. Brawner
Silenus Group
(248) 735-8077




Re: locating web.xml

2001-07-26 Thread JBrawner


Does tomcat require a WEB-INF directory? I would like to replace the
default:
\WEB-INF\classesdirectory with simply:
\servlet
and have my web.xml be in \servlet instead of \WEB-INF\classes

Is this possible?


Jason E. Brawner
Silenus Group
(248) 735-8077


   
 
Mattias Karlsvaerd 
 
   cc:   
 
 Subject: Re: locating web.xml 
 
07/26/2001 10:27   
 
AM 
 
Please respond to  
 
tomcat-user
 
   
 
   
 




You can read the "Developing Applications With Tomcat"
it discribes in steps how you could develop a
webapplication with Tomcat and how the directorytree
should look like. It's availible on tomcat's homepage.

The web.xml file should be placed in the WEB-INF dir
in your docbase dir.
You also have to define a context for your application
in server.xml. This file can be found in the tomcat
home dir in the conf dir.

--- [EMAIL PROTECTED] wrote: > I have created a new
directory structure for my
> servlet and jsp's.
> Everything works ok except my servlet cannot find
> its web.xml file. How do
> I tell Tomcat (or the servlet) where it is?  I
> currently have it in the
> same directory as my servlet:
>
> C:\www\PSP\servlet\
>
> Thanks,
>
>
> Jason E. Brawner
>
>

=
/Mattias Karlsvärd

_
Do You Yahoo!?
[EMAIL PROTECTED] - skaffa en gratis mailadress på http://mail.yahoo.se







locating web.xml

2001-07-26 Thread JBrawner

I have created a new directory structure for my servlet and jsp's.
Everything works ok except my servlet cannot find its web.xml file. How do
I tell Tomcat (or the servlet) where it is?  I currently have it in the
same directory as my servlet:

C:\www\PSP\servlet\

Thanks,


Jason E. Brawner





RE: Killing endless loop servlet - howto ? killing JVM or unload class ?

2001-07-02 Thread JBrawner


> First, I don't know if it's killing a thread is the right approach.
Should
I do that, without shutdown Tomcat ?

If you must have an endless loop, here is a way to kill it.

try
{
   while (true)
   {
 // inside infinite loop
   }
}
catch (InterruptedException)
{
}

When you want the thread to be killed, just call it's interrupt() method.
This will catch the exception outside the loop and terminate.

Just a suggestion...

Jason E. Brawner
Silenus Group



   

William

Kaufman  To: "'[EMAIL PROTECTED]'"

  

uity.com>cc:   

 Subject: RE: Killing endless loop servlet 
- howto ? killing JVM or
07/02/2001   unload   class ?  

10:11 AM   

Please 

respond to 

tomcat-user

   

   





OK, no one's answered this yet, so,...

> First, I don't know if it's killing a thread is the right approach.
Should
I do that, without shutdown Tomcat ?

So, why are you creating an infinite loop?  I mean, if you didn't, you
wouldn't have to kill it.

If you're generally asking how one can kill threads in Java, you could use
java.lang.Thread.stop() (but read the deprecation warning).  But as a rule,
not creating infinite loops is a much better strategy.

> Is there a way to set a 'time-out' for a Servlet ?

Not the way you mean.  You can set a timeout for a session (by modifying
your web.xml); but AFAIK, the only way to set a timeout for a request would
be on your browser.

-- Bill K.

-Original Message-
From: Renato Weiner [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 02, 2001 6:03 AM
To: [EMAIL PROTECTED]
Subject: Killing endless loop servlet - howto ? killing JVM or unload class
?


Hi all,
I'm rolling out a successful Tomcat instalation in a shared environment (
it's a great software ! ). But I have a concern.
I created a servlet that loops forever ( a very stupid one, by the way ).
When I executed it, it allocates a Tomcat thread and it just runs forever.
If I try to kill it after it consumed, let's say, 30 seconds of processing,
it ended up killing the whole JVM.
First, I don't know if it's killing a thread is the right approach. Should
I
do that, without shutdown Tomcat ? Is there a way to set a 'time-out' for a
Servlet ? What I can doin this situation ? Is there an Interceptor that can
unload this class somehow ?
Thanks in advance
Renato - Brazil
P.S. I'm running Linux, kernel 2.4.3, Tomcat 3.2.2




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







Apache as dependant service

2001-07-02 Thread JBrawner

I know have Tomcat and Apache running as services on Win2000.  Since Tomcat
must start before Apache, how do I make Apache depend on Tomcat?  In other
words, how can I guarantee that Tomcat will start before Apache?

In the Win2000 services there is a tab for dependencies but its disabled.
I am administrator of the box.  Any ideas?


Jason E. Brawner
Silenus Group





Problem running Tomcat 3.2 as a service on Win2000

2001-07-02 Thread JBrawner

I have a servlet that connects to a database. When I have tomcat running
from the batch file (tomcat start) the servlet runs fine and connects to
the db.  When I install tomcat as a service I get a ClassNotFoundException
saying it can't find my JDBC driver.  My driver is contained in a jar file
with the classpath set correctly.  Any ideas on how to fix this?



Jason E. Brawner
Silenus Group




RE: URL Help

2001-06-04 Thread JBrawner


My servlet class name is GVservlet.


Jason E. Brawner



   
   
William
   
Kaufman  To: "'[EMAIL PROTECTED]'"
   
  
   
uity.com>cc:   
   
 Subject: RE: URL Help 
   
06/04/2001 
   
06:09 PM   
   
Please 
   
respond to 
   
tomcat-user
   
   
   
   
   




> I can only get it to work if I include 'servlet' like the following:
>
> http://localhost/Gillette/servlet/Venus?SerialId=ZVXZV&ContactId=1
...
> web.xml:
> 
> Venus
> GVservlet
> 

Which is the name of your servlet class--"Venus" or "GVservlet"?  (That may
be the problem you're having,...)

-- Bill K.


> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: Monday, June 04, 2001 2:48 PM
> To: [EMAIL PROTECTED]
> Subject: URL Help
>
>
> I need my URL to look like this:
>
> http://localhost/Gillette/Venus?SerialId=ZVXZV&ContactId=1
> where Gillette is a directory and Venus is the servlet name.
> I can only
> get it to work if I include 'servlet' like the following:
>
> http://localhost/Gillette/servlet/Venus?SerialId=ZVXZV&ContactId=1
>
> I've got a few good responses in previous postings but
> haven't been able to
> get it to work.  Here is some configurationscan anybody
> tell me what
> I'm doing wrong?
>
> server.xml:
>  crossContext="false"
> debug="0" reloadable="true" >
>
> web.xml:
> 
> Venus
> GVservlet
> 
>
> 
>   Venus
>   /Venus
> 
>
> I've tried it with and without the servlet-mapping tag.  Any ideas?
>
>
> Jason E. Brawner
>







URL Help

2001-06-04 Thread JBrawner

I need my URL to look like this:

http://localhost/Gillette/Venus?SerialId=ZVXZV&ContactId=1
where Gillette is a directory and Venus is the servlet name.  I can only
get it to work if I include 'servlet' like the following:

http://localhost/Gillette/servlet/Venus?SerialId=ZVXZV&ContactId=1

I've got a few good responses in previous postings but haven't been able to
get it to work.  Here is some configurationscan anybody tell me what
I'm doing wrong?

server.xml:


web.xml:

Venus
GVservlet



  Venus
  /Venus


I've tried it with and without the servlet-mapping tag.  Any ideas?


Jason E. Brawner




servlet-mapping tag

2001-06-04 Thread JBrawner

I need to modify my servlets url's so they don't include tomcat's default
'servlet' directory.  For example,

One servlet is in:
 c:\tomcat\webapps\dir1\WEB-INF\classes
therefore the url is:
 http://localhost/dir1/servlet/ServletName

I need the urls to not have the 'servlet' in it
(http://localhost/dir1/ServletName). I was told previously to add a
 to my web.xml file. Do I do this in %TOMCAT_HOME%
\conf\web.xml since I want it to apply to all servlets?

I have tried this and can't get it to work. Can somebody give me an
example?

Many Thanks,

Jason E. Brawner




Changing Tomcats default servlet url?

2001-05-23 Thread JBrawner

Sorry, if this is a duplicate posting...but I received no responses and
thought I sent it incorrectly.


I'm in the process of switching from JServ to Tomcat.  All the servlets
that were running previously are running now on tomcat but they have
different urls.  I need the url to be the same as it was before I switched
to tomcat and am having trouble.

My servlet is in:
 c:\tomcat\webapps\dir1\WEB-INF\classes
I used the same setup as the examples that come with tomcat.  To reach that
servlet you have to
use the following url:
http://localhost/dir1/servlet/ServletName

I need the url to not have the 'servlet' in it.  Anybody know how to do
this?  Also, how does tomcat determine the servlet is in the
WEB-INF\classes directory?  Does it alias that as 'servlet'?  If so, where
is this done?

Frustrated...


Jason E. Brawner
Consultant
Silenus Group, Inc.
248.735.8077 Ext. 184
810.252.9944 Cellular




Changing default servlet url

2001-05-22 Thread JBrawner

I'm in the process of switching from JServ to Tomcat.  All the servlets
that were running previously are running now on tomcat but they have
different urls.  I need the url to be the same as it was before I switched
to tomcat and am having trouble.

My servlet is in:
 c:\tomcat\webapps\dir1\WEB-INF\classes
I used the same setup as the examples.  To reach that servlet you have to
use the following url:
http://localhost/dir1/servlet/ServletName

I need the url to not have the 'servlet' in it.  Anybody know how to do
this?  Also, how does tomcat determine the servlet is in the
WEB-INF\classes directory?  Does it alias that as 'servlet'?  If so, where
is this done?

Frustrated...

Jason E. Brawner
Consultant
Silenus Group, Inc.
248.735.8077 Ext. 184
810.252.9944 Cellular