Re: ClassCastException uppon requests

2001-10-18 Thread David Treves

Hi, I went through a simple tutorial just to make sure my Tomcat is
installed properly, but I just realized that I can only see the main page of
the Tomcat (the welcome page under ROOT dir). When I try to access either
JSP or servlets exapmles I ge the 404 error.

I am using Tomcat 4.0 on win2000. I used the EXE installation file.

Here is the exception I copied from the examples log file:

2001-10-18 08:25:08 StandardContext[/examples]: Exception sending context
initialized event to listener instance of class listeners.SessionListener
java.lang.LinkageError: loader constraints violated when linking
javax/servlet/ServletContext class
 at listeners.SessionListener.contextInitialized(SessionListener.java:163)
 at
org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:
3201)
 at
org.apache.catalina.core.StandardContext.start(StandardContext.java:3385)
 at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1123)
 at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1123)
 at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:307)
 at org.apache.catalina.core.StandardService.start(StandardService.java:388)
 at org.apache.catalina.core.StandardServer.start(StandardServer.java:505)
 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:42
)
 at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
.java:28)
 at java.lang.reflect.Method.invoke(Method.java:313)
 at
org.apache.catalina.startup.BootstrapService.main(BootstrapService.java:360)

2001-10-18 08:25:08 StandardContext[/examples]: Context startup failed due
to previous errors
2001-10-18 08:25:08 StandardContext[/examples]: Exception sending context
destroyed event to listener instance of class listeners.ContextListener
java.lang.IncompatibleClassChangeError
 at listeners.ContextListener.log(ContextListener.java:177)
 at listeners.ContextListener.contextDestroyed(ContextListener.java:147)
 at
org.apache.catalina.core.StandardContext.listenerStop(StandardContext.java:3
241)
 at org.apache.catalina.core.StandardContext.stop(StandardContext.java:3443)
 at
org.apache.catalina.core.StandardContext.start(StandardContext.java:3415)
 at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1123)
 at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1123)
 at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:307)
 at org.apache.catalina.core.StandardService.start(StandardService.java:388)
 at org.apache.catalina.core.StandardServer.start(StandardServer.java:505)
 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:42
)
 at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
.java:28)
 at java.lang.reflect.Method.invoke(Method.java:313)
 at
org.apache.catalina.startup.BootstrapService.main(BootstrapService.java:360)



Thanks for your time!  :o)
David.
- Original Message -
From: Craig R. McClanahan [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, October 17, 2001 9:16 PM
Subject: Re: ClassCastException uppon requests


 The usual culprit is having a servlet.jar file in your
 $JAVA_HOME/jre/lib/ext directory, or otherwise messing around with where
 Tomcat sets up JAR files.

 Craig


 On Wed, 17 Oct 2001, David Treves wrote:

  Date: Wed, 17 Oct 2001 19:52:26 +0200
  From: David Treves [EMAIL PROTECTED]
  Reply-To: [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Subject: ClassCastException uppon requests
 
  Hi,
 
  I wrote a very simple servlet that supposed to receive 2 parameters from
a
  form (POST method) and write them on screen.
 
 
  the doPost() method is too simple... getting the PrintWriter and
printing
  one line with both parameters...
 
  Am I missing something here?
  Why doesn't it point to a line of error in MY servlet code?
 
  everytime I try to submit the data to the servlet I get the collowing
error:
 
 
  A Servlet Exception Has Occurred
  java.lang.ClassCastException: servlets.LoginServlet
   at
org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:832)
   at
 
org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:621)
   at
 
org.apache.catalina.servlets.InvokerServlet.serveRequest(InvokerServlet.java
  :396)
   at
 
org.apache.catalina.servlets.InvokerServlet.doGet(InvokerServlet.java:180)
   at 

RE: apache 1.3.20 and .so files - problem persists.

2001-10-18 Thread Brijesh Kumar

Resending again... please help.

Brijesh.

-Original Message-
From: Brijesh Kumar [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, October 16, 2001 2:06 PM
To: [EMAIL PROTECTED]
Subject: RE: apache 1.3.20 and .so files - problem persists.


Hi,

libapr.dll is also present in  the modules directory.

Please note that in my Win2K box I also have installed Apache 1.3.12. But
that has been installed in my C drive while Apache 1.3.20 has been installed
in my D drive. Apache 1.3.12 was not up when I started Apache 1.3.20

Any solutions?

Brijesh.

-Original Message-
From: Pier Fumagalli [mailto:[EMAIL PROTECTED]]
Sent: Monday, October 15, 2001 8:51 PM
To: [EMAIL PROTECTED]
Subject: Re: apache 1.3.20 and .so files - problem persists.


Brijesh Kumar at [EMAIL PROTECTED] wrote:

 Hi,

 I tried that and after starting Tomcat 4.0 and then Apache 1.3.20, I got
the
 following error.

 Syntax error on line 1033 of d:/apache group/apache/conf/httpd.conf:
 Cannot load d:/apache group/apache/modules/mod_webapp.so into server:
(127)
 The
 specified procedure could not be found:

 My httpd.conf looks like this.

 Line no 1033: LoadModule webapp_module modules/mod_webapp.so
 Line no 1034: AddModule mod_webapp.c
 Line no 1035: WebAppConnection warpConnection warp localhost:8008
 Line no 1036: WebAppDeploy examples warpConnection /examples/

 I have specified ServerName and VirtualHost entries.

 I also tried after commenting the VirtualHost entries and AddModule
entried.
 That too didn't work out. What could be the problem?

It seems that your Apache can't load the module because of a lack of
dependencies... Did you copy also libapr.dll into your /modules/ directory?

Pier




mod_jk problems.

2001-10-18 Thread Moldovan Ovidiu




Hi,

   I have met a problem using mod_jk.dll under NT. When the apache,
is starting I got a warm like:

 [warn] Loaded DSO modules/mod_jk.dll uses plain Apache 1.3 API, 
this module might crash under EAPI! (please recompile it with -DEAPI)

   I understand what is the problem, but can some one told me from 
where to get mod_jk.dll compiled with -DEAPI, because to compile this 
from sources under NT it is not at my hand?

   I forgot the Apache is using mod_ssl, but I quess that is not a 
problem.

   Thx a lot,

  Ova

[EMAIL PROTECTED]





Ilmainen Internet @ http://www.nic.fi/




Re: Conflict between tomcat 3.2 libraries and application libs

2001-10-18 Thread Dmitri Colebatch

Upgrading to tomcat 4 (or maybe 3.3 as well, I'm not sure what it
does with classpath tho) would do the trick, but I'm not sure if that is
an option.  What you are experiencing is a common issue with 3.2, and the
approach you are taking is basically the common fix.

cheers
dim

On Thu, 18 Oct 2001, David Pedrotti wrote:

 I am experiencing conflict with libraries in the tomcat\lib directory
 and the application\WEB-INF\lib directory.
 
 Specifically the web application needs to use a more recent version of
 jaxp.jar than the one deployed with tomcat 3.2 but sees the one in
 tomcat\lib first. Updating the one in tomcat\lib causes problems with
 tomcat (I am looking for a more flexible solution than this!).
 
 Is there a way of configuring tomcat so that the application libraries
 are used first or some other way around the problem?
 
 Does anyone know the solution to this problem.
 
 TIA
 Dave...
 ---
 David Pedrotti   Tel:  (08) 9486 8500
 Beacon TechnologyFax:  (08) 9486 8566
 1 Howard Street  E-mail:   [EMAIL PROTECTED]
 Perth, WA 6000   Web Site: www.beacon.com.au
 
 
 




Re: Is JAR necessary after running?

2001-10-18 Thread Jim Cheesman

At 04:52 AM 18/10/01, you wrote:
 Hi all,

 If Tomcat is startup already,
 Can I delete servlet.jar?


Quick answer: try!
Real answer, at least on Win2000: no. Unless you're actually using a 
different servlet.jar to the one you think you are.

How to fake a delete on Win2000: overwrite the jar with another one, this 
time empty.


Jim


--

   *   Jim Cheesman   *
 Trabajo: 
[EMAIL PROTECTED] - (34)(91) 724 9200 x 2360
   Evil is 
not all bad.





Which ISAPI_REDIRECT.DLL to use for Tomcat 4.0.1 w/ IIS 5?

2001-10-18 Thread Hessing Ingo


Hi!

I've just installed Tomcat 4.0.1 on W2k and it works. Next step would be
the installation of the ISAPI_REDIRECT.DLL to serve HTML-pages and stuff
via IIS 5.

But in contrast to Tomcat 3.2.3 there is no dedicated
ISAPI_REDIRECT.DLL-file that comes with version 4.0.1.

Question: Can I (should I) use the old .DLL-file or is a
Tomat-4-ready-version on its way?

And: If I am to use the old version - where do I put the
uriworkermap.properties file? There is none in the conf directory of
Tomcat 4.

bestWISHES

Ingo




RE: Running Tomcat as a service

2001-10-18 Thread Tarek M. Nabil

Thanks :)

-Original Message-
From: Kevin Yank [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, October 16, 2001 10:37 PM
To: [EMAIL PROTECTED]
Subject: RE: Running Tomcat as a service


Try typing java -X to view the list of non-standard (OS specific) java
options.

__

Kevin Yank
Technical Content Director
SitePoint.com - Master the Web!

e: [EMAIL PROTECTED]
w: www.sitepoint.com
p: +1 514 457 1116
___


-Original Message-
From: Tarek M. Nabil [mailto:[EMAIL PROTECTED]]
Sent:  Tue, 16 Oct 2001 14:58:00 +0200
To: [EMAIL PROTECTED]
Subject:  RE: Running Tomcat as a service

You're right, it worked :)
Thanks man :)
But if you write java and read the usage, you find nothing about
this
option, why isn't it documented, do you have any idea?

-Original Message-
From: Randy Layman [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, October 16, 2001 2:09 PM
To: [EMAIL PROTECTED]
Subject: RE: Running Tomcat as a service


Add -Xrs to the call to start Tomcat at the bottom of the
wrapper.properties
file.  (Its a JVM parameter to indicate that the service should
ignore
the
user logoff signal)




test

2001-10-18 Thread Boris Maretic

test




RE: How to work around jk_nt_service bug,

2001-10-18 Thread Tarek M. Nabil

That's very strange, cause it worked perfectly for me, and I had the
same problem you have. Where did you add the -Xrs? It has to be in the
wrapper.properties file. The only difference between our configurations
is that I ran Tomcat stand alone...does that make a difference?

-Original Message-
From: Ylan Segal [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, October 17, 2001 8:46 PM
To: [EMAIL PROTECTED]
Subject: RE: How to work around jk_nt_service bug,


Thanks for the response.. but that did not work.
The problem is that the service is not failing, just it is being stopped
on
logout of the user (with administrator user).
I also tried the -Xrs in the wrapper.properties as suggested in another
thread in the list, but with no luck.

Anyone has any other ideas?

Thanks.

 -Original Message-
 From: Bryan Lipscy [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, October 17, 2001 11:34 AM
 To: [EMAIL PROTECTED]
 Subject: RE: How to work around jk_nt_service bug,


 Set the service to restart.

 Start - Settings - Control Panel - Administrative Tools - Services
-

 Tomcat (or whatever you named it) - Recovery

 Set First Failure, Second Failure,  Subsequent Failure to
Restart
 the service






 -Original Message-
 From: Ylan Segal [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, October 17, 2001 9:47 AM
 To: [EMAIL PROTECTED]
 Subject: How to work around jk_nt_service bug,


 Hi guys,

 I am experiencing the porblem mentioned in the docs with jdk 1.3.1
using
 jk_nt_service where tomcat stops (3.2.3) if the user logs out.

 I can't roll back to jdk 1.2 because I need classes in 1.3.1. How
 can I work
 around this?

 All this is running on windows 2000/ IIS 5. Would it help if I
 set up tomcat
 as in-process?

 Thanks for your help.

 Ylan Segal.






Tomcat 4 CGI

2001-10-18 Thread Mark Muffett

I'm using Tomcat v4.0.1 on port 80 (ie without Apache)

Since I have a few legacy sites, I've had to enable the cgi facility.  I've
done this, and the .pl files get called, but it seems that no parameters are
being passed - any ideas?

Thanks for any help

Mark Muffett




Running servlets on tomcat 3.2.1 with IIS 5.0

2001-10-18 Thread Boris Maretic

Hi

Please can anyone help me about this problem.

I have just installed TOMCAT 3.2.1 (standalone) on WIN200 and it works.
I have setup tomcat as a JSP engine for IIS. 
But now I would like to make tomcat as a SERVLET engine for IIS.

System:
WIN 2000
IIS 5.0
TOMCAT 3.2.1
C:\INETPUB\WWWROOT\MYAPP\ is place where application files are situated 

A part of Servlet.xml file which I added is this:
-
Context path="/" 
  docBase="C:/InetPub/wwwroot" 
  crossContext="false"
  debug="0" 
  reloadable="true"  
/Context
--

I have used automatically generated file uriworkermap.properties-auto.
The part of that file is:
-
#
# Default worker to be used through our mappings
#
default.worker=ajp12

#
# Root context mounts for Tomcat
#
/servlet/*=$(default.worker)
/*.jsp=$(default.worker)
---

JSP files are executed by tomcat  correctly but servlet not.Why?
How to run servlet from IIS?



Thanks in advance!

Boris
Ecsat-Split
Croatia








Using a servlet for authorization

2001-10-18 Thread Dr. Evil


I am trying to use a servlet for authorization like this:

There is a servlet called authservlet which checks to see if there is
a valid user object in the session state.  Here is how it is used:

I have a directory called /secure with a bunch of .jsp files in it.

There is a mapping in web.xml:

   servlet-mapping
  servlet-name
authservlet
  /servlet-name
  url-pattern
/secure/*
  /url-pattern
   /servlet-mapping

Every time someone tries to request a page like /secure/hello.jsp, the
request is instead handed to authservlet.  That part is working fine.
authservlet gets the request and can decide what to do with it.

The problem is that I am trying to get authservlet to pass the request
back to the jsp by doing something like this:

RequestDispatcher rd =
request.getRequestDispatcher(/secure/hello.jsp);
rd.forward(request, response);

where in this case I have hard-coded in hello.jsp as the target, just
for testing (obviously I will replace this with something which looks
at what the real url is).

The problem is, when I then try to load /secure/hello.jsp, it looks
like the server goes into an infinite loop.  It never returns the page
and I end up with a bunch of catalina processes running, which I have
to kill -9 to get rid of.

I'm sure I'm making some simple mistake here.  Any sugestions?

Thanks



Re: Tomcat 4 CGI

2001-10-18 Thread Mark Muffett

I've just managed to it to work using GET, but still can't get any
parameters with POST - any ideas? - it must be something to do with the read
from stdin...

Mark

- Original Message -
From: Mark Muffett [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, October 18, 2001 9:48 AM
Subject: Tomcat 4  CGI


 I'm using Tomcat v4.0.1 on port 80 (ie without Apache)

 Since I have a few legacy sites, I've had to enable the cgi facility.
I've
 done this, and the .pl files get called, but it seems that no parameters
are
 being passed - any ideas?

 Thanks for any help

 Mark Muffett





WebApp: Error 500 (File: pr_warp.c Line: 434)

2001-10-18 Thread Kishor K

hi,
 
I have installed TC4.0.1 and Apache on Win NT.
Connected them using mod_webapp and Warp.
 
Sometimes nothing comes and browser waits for the output.
But sometimes i am getting the following error.
++
WebApp: Error 500
 
 (File: pr_warp.c Line: 434) 
 
(null) 
+
 
httpd.conf
 
LoadModule webapp_module modules/mod_webapp.so
AddModule   mod_webapp.c 

 
NameVirtualHost *
   VirtualHost *
ServerName www.myserver.com
DocumentRoot D:/Program Files/Apache/htdocs
 #start for tomcat4.0.1@@@
WebAppConnection conn  warp  www.myserver.com:8008
WebAppDeploy examples  conn  /examples
   WebAppDeploy myapp  conn  /myapp   
   WebAppInfo   /webapp-info
#end for tomcat4.0.1@@@
/VirtualHost
VirtualHost *
ServerName www.yourserver.com
DocumentRoot D:/Program Files/Apache/yourdocs
/VirtualHost

server.xml
 
i hvnt added anything to the server.xml
No contexts added to the server.xml.
 
Any idea?
 
kishor
 






_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com




Important: RE: [TC3.3b1](=? TC3.3rc1) use of taglib causes org.apache.crimson.jaxp.DocumentBuilderFactoryImpl not found error

2001-10-18 Thread Roberts Huw

I have the same problem, but I'm just using raw JSPs, no Jetspeed or
anything.
Further, I thought that Tomcat 3.3 (later builds) was supposed to solve the
problems with
mixed XML parsers.  The problem I get is when a JSP includes some other
JSP via jsp:include.  What ~seems~ to be happening is that the included
JSP
gets compiled using the ClassLoader of the WebApp rather than Tomcat's
ClassLoader
so that if the XML parser you're using is incompatible there'll be a
problem.

Is there a Tomcat developer out there who can help?

Thanks a lot,
Huw

 -Original Message-
 From: Paul Spencer [mailto:[EMAIL PROTECTED]]
 Sent: 01 September 2001 22:42
 To: [EMAIL PROTECTED]
 Subject: Re: [TC3.3b1] use of taglib causes
 org.apache.crimson.jaxp.DocumentBuilderFactoryImpl not found error
 
 
 I have made the changes suggested.  I still get the same errors.
 
 The jsp file will work when referenced directly,
 http://localhost/jetspeed/hello.jsp, but fails when it is executed by
 Jetspeed.
 
 This problem is does not occur in Tomcat 3.3-m4 or Tomcat 4.0-b7.  I
 suspect something that was changed between 3.3-m4 and 3.3-b1 
 is causing
 the problem, but I do not know what it is :-(.  I do not believe the
 problem is with Jetspeed because I used the same WAR file when testing
 all 3 versions of Tomcat.
 
 The error message may not be related to the actual error.  The empty
 .java file in the work directory may be the closer to the problem. 
 Maybe somewhere in the process of converting from .jsp to .java when a
 taglib is defined.  
 
 I enabled debug logging. 
  No entries on the servlet logfile
  The jasper log contained:
 2001-09-01 17:29:25 - Package name is:
 WEB_0002dINF.templates.jsp.portlets.html
 2001-09-01 17:29:25 - Class file name is:
 E:\apache\jakarta-tomcat-3.3-b1\work\DEFAULT\jetspeed\WEB_0002
 dINF\templates\jsp\portlets\html\Example_1.class
 2001-09-01 17:29:25 - Java file name is:
 E:\apache\jakarta-tomcat-3.3-b1\work\DEFAULT\jetspeed\WEB_0002
 dINF\templates\jsp\portlets\html\Example_1.java
 2001-09-01 17:29:25 - Class name is: Example_1
 2001-09-01 17:29:25 - 
 Handling Directive: taglib
 {uri=/WEB-INF/templates/jsp/tld/template.tld,
 prefix=jetspeed}
 
 Ideas?
 
 Paul Spencer
 
 Will Stranathan wrote:
  
  Take the XML related jars in TOMCAT_HOME/lib and rename them to
  x[whatever].jar (for example, xjaxp.jar).  Then put Velocity's XML
  parsers in TOMCAT_HOME/lib.
  
  I know it's a kludge, but AFAICT, these sorts of 
 classloader issues have
  been corrected in 4.0.  (Which is all the Struts people 
 can't understand
  why their stuff suddenly DOESN'T work - all the Struts WAR's come
  without any parser libraries.)
  
  w
  
  Paul Spencer wrote:
  
   I am getting the following error while using Jetspeed with Tomcat
   3.3-b1.  This error does NOT occur in Tomcat 3.3-m4!
 [Fri Aug 31 22:19:33 EDT 2001] -- ERROR -- Error 
 rendering Velocity
   template:   /controllers/html/multicolumn.vm: Invocation of method
   'getContent' in  class
   org.apache.jetspeed.portal.controls.VelocityPortletControl threw
   exception class  javax.xml.parsers.FactoryConfigurationError :
   Provider   
 org.apache.crimson.jaxp.DocumentBuilderFactoryImpl not found
  
   In addition the .java file created in the work directory 
 is has a size
   of 0 bytes.
  
   I copied crimson.jar and jaxp.jar to the lib/apps directory, as
   suggested in
   
 http://www.mail-archive.com/tomcat-dev@jakarta.apache.org/msg1
3224.html
  ,
  but that did not work.
 
  My jsp file is below (Note this file work in Tomcat v3.3-m3 and -m4):
%@ taglib uri='/WEB-INF/templates/jsp/tld/template.tld'
  prefix='jetspeed' %
p
  bJSP/b Hello World!
  bServer date:/b jetspeed:info requestedInfo=ServerDate /
/p
 
 
  Ideas?
 
  Thank you
  Paul Spencer
 


The information in this email is confidential and is intended solely
for the addressee(s).
Access to this email by anyone else is unauthorised. If you are not
an intended recipient, you must not read, use or disseminate the
information contained in the email.
Any views expressed in this message are those of the individual
sender, except where the sender specifically states them to be
the views of Capco.

http://www.capco.com
***




Re: multipart requests

2001-10-18 Thread Matt Dilley

Mark Muffett wrote:

Matt

I used the O'reilly packages and they worked fine (I did the example from
Java Servlet Programming, then adapted it) - what's your conguration and
what errors do you get ?

Mark Muffett

- Original Message -
From: Matt Dilley [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, October 17, 2001 3:24 PM
Subject: multipart requests


hi

Does anyone know where I can get hold of a multipart request servlet
that will allow me to upload .jpg and .gif image files to the jsp server?

I have tried the o'reilly packages, but it always failes to upload any
image files

Many thanks

Matt




java servlet programming?
where can I find that?





Figured it out (was Re: Using a servlet for authorization)

2001-10-18 Thread Dr. Evil


This...

servlet-mapping
   servlet-name
 authservlet
   /servlet-name
   url-pattern
 /secure/*
   /url-pattern
/servlet-mapping

and this

 RequestDispatcher rd =
 request.getRequestDispatcher(/secure/hello.jsp);
 rd.forward(request, response);

were causing a horrible loop.  I didn't realize that Tomcat would run
the servlet mappings on the args to getRequestDispatcher, but it
does.  The solution is simple:  make the url-pattern something else,
like securepages, and then it can serve the files out of the /secure/
directory.

This is going to be a fantasticly useful auth method once I get it all
working.  Yet again, I find that tomcat is enormously powerful and has
a steep learning curve.  The two go together I guess.



RE: Figured it out (was Re: Using a servlet for authorization)

2001-10-18 Thread Tarek M. Nabil

Dr. Evil, could you please explain your solution again, I didn't quite
get it.

-Original Message-
From: Dr. Evil [mailto:[EMAIL PROTECTED]]
Sent: Thursday, October 18, 2001 11:32 AM
To: [EMAIL PROTECTED]
Subject: Figured it out (was Re: Using a servlet for authorization)



This...

servlet-mapping
   servlet-name
 authservlet
   /servlet-name
   url-pattern
 /secure/*
   /url-pattern
/servlet-mapping

and this

 RequestDispatcher rd =
 request.getRequestDispatcher(/secure/hello.jsp);
 rd.forward(request, response);

were causing a horrible loop.  I didn't realize that Tomcat would run
the servlet mappings on the args to getRequestDispatcher, but it
does.  The solution is simple:  make the url-pattern something else,
like securepages, and then it can serve the files out of the /secure/
directory.

This is going to be a fantasticly useful auth method once I get it all
working.  Yet again, I find that tomcat is enormously powerful and has
a steep learning curve.  The two go together I guess.



RE: blocking access using filter

2001-10-18 Thread Taavi Tiirik

Thanks, Craig!

  1. If user is not logged in or if the session has
  timed out then it should open login page and after
  successful login it should try to access the very
  same request (ie. the same document).

 I don't quite see why you need to modify the standard
 form-based login mechanisms, either.  Can't you just use
 the standard form based login for triggering authentication?

No, I did not want to modify standard login mechanism by
any means :-). I simply had this (wrong) impression that
filters get called before checking security constraints.
How stupid of me :-). Creating security constraint like
you suggested covered the first step and now I have this
filter purring like a kitten.

Just in case anybody is interested... this is what I did.
doFilter looks like this:

public void doFilter (
ServletRequest request,
ServletResponse response,
FilterChain chain
)
throws IOException, ServletException
{
HttpServletRequest httpRequest = null;
HttpServletResponse httpResponse = null;

if( request instanceof HttpServletRequest )
httpRequest = (HttpServletRequest)request;

if( response instanceof HttpServletResponse )
httpResponse = (HttpServletResponse)response;

boolean authorized = false;
String user = httpRequest.getRemoteUser();

// Is this really necessary? Could it be that requests
// other than HttpServletRequest are passed to
// this filter? Can they be harmful by any means?
// Or should I let them through?
if( httpRequest == null || httpResponse == null || user == null
){
httpResponse.sendError( HttpServletResponse.SC_NOT_FOUND
);
return;
}

try {
// At this point we have user name in 'user' and request
URI
// in 'requestURI'. Make sure that this user has rights
to
// get this document and set authorized to true, if
(s)he has.

authorized = ...

} catch( Exception e ){
}

if( !authorized ){
httpResponse.sendError( HttpServletResponse.SC_NOT_FOUND
);
return;
}

// Pass control on to the next filter
chain.doFilter( request, response );
}

with best wishes,
Taavi





mod_jk Error by stress test.

2001-10-18 Thread Jacob FanChiang

Hi,
I use a software called LoadRunner to stress my apache1.2.30 + tomcat-3.3-b1
on Redhat Linux-7.1 simulate 200 users.
There are all these kind of message in my logs/mod_jk.log
Could somebody tell me what should I do to avoid this problem??
Thanks

[Thu Oct 18 09:01:07 2001]  [jk_ajp13_worker.c (226)]:
connection_tcp_get_message: Error - jk_tcp_so
cket_recvfull failed
[Thu Oct 18 09:01:07 2001]  [jk_ajp13_worker.c (681)]: Error reading reply
[Thu Oct 18 09:01:07 2001]  [jk_ajp13_worker.c (805)]: In
jk_endpoint_t::service, get_reply failed i
n send loop 0
[Thu Oct 18 09:01:07 2001]  [jk_connect.c (143)]: jk_open_socket, connect()
failed errno = 111
[Thu Oct 18 09:01:07 2001]  [jk_ajp13_worker.c (194)]: In
jk_endpoint_t::connect_to_tomcat, failed e
rrno = 111
[Thu Oct 18 09:01:07 2001]  [jk_ajp13_worker.c (604)]: Error connecting to
the Tomcat process.
[Thu Oct 18 09:01:07 2001]  [jk_ajp13_worker.c (808)]: In
jk_endpoint_t::service, send_request faile
d in send loop 1
[Thu Oct 18 09:01:07 2001]  [jk_connect.c (143)]: jk_open_socket, connect()
failed errno = 111
[Thu Oct 18 09:01:07 2001]  [jk_ajp13_worker.c (194)]: In
jk_endpoint_t::connect_to_tomcat, failed e
rrno = 111
[Thu Oct 18 09:01:07 2001]  [jk_ajp13_worker.c (604)]: Error connecting to
the Tomcat process.
[Thu Oct 18 09:01:07 2001]  [jk_ajp13_worker.c (808)]: In
jk_endpoint_t::service, send_request faile
d in send loop 2
[Thu Oct 18 09:45:54 2001]  [jk_ajp13_worker.c (350)]: Error
ajp13_process_callback - write failed
[Thu Oct 18 09:45:54 2001]  [jk_ajp13_worker.c (801)]: In
jk_endpoint_t::service, get_reply failed w
ithout recovery in send loop 0


Jacob FanChiang





Re: Getting apache environment variables into Tomcat

2001-10-18 Thread Nicholas Blachford

Dmitri Colebatch wrote:

 what's wrong with
 
 request.getServerPort()
 
 from the ServletRequest interface?


I know the server port, it's the Client port I want.




--

Nicholas Blachford
mailto:[EMAIL PROTECTED]
Ministar nepretpostavljenih okolnosti
The vast majority of trouble is caused 
by the verbal minority of people.





Re: Reversed deployment configuration for mod_webapp...

2001-10-18 Thread jean-frederic clere

Pier Fumagalli wrote:
 
 I've been looking in the past month at which were the main difficulties in
 mod_webapp usage, and I think that the most difficult part for users comes
 when someone tries to deploy a web-application both in server.xml and
 httpd.conf. Why? Let's see an example:
 
 httpd.conf
 --
 ServerName myhost.domain.dom
 Port 80
 WebAppConnection conn warp myhost.domain.dom:8008
 WebAppDeploy examples conn /examples
 
 server.xml
 --
 Connector className=...WarpConnector ... /
 Engine className=...WarpEngine
   Host name=localhost debug=0 appBase=webapps unpackWARs=true
 className=...WarpHost
 Context path=/examples docBase=examples
 /Context
   /Host
 /Engine
 
 To the random viewer, this looks like a valid configuration, the context
 deployed in server.xml should be seen under /examples by Apache...
 
 BUT (yeah, there's always a but), what's going to happen is that when run,
 we're going to have TWO instances of the examples context: one deployed for
 the localhost host (configured in server.xml) and one configured for
 myhost.domain.dom (configured in httpd.conf and autodeployed by WARP).
 
 Basically, if you're not careful enough, things are going to be screwed up,
 and you won't get what you want.

- Sure I have tried to help several time in user list about this...

 
 One possible solution to the problem would be to reverse the deployment
 scheme of WARP. If we put all context configurations in server.xml, and add
 a directive such as WebAppDeployAll true, what we can achieve is that for
 a particular VirtualHost... or root the root server configured in
 httpd.conf, we're going to automatically retrieve all contexts configured in
 server.xml for that particular host.

Like JkAutoMount * myworker1 * (in a VirtualHost.../).

 
 This will solve a bunch of problems, but there is one tiny little bit that
 is still lacking from Catalina, and that makes things hard: apache, and all
 other webservers, use the Host header to select what named virtual host
 I'm using. The Host header, though, is formatted in this way: host:port.
 
 So, what it basically means is that a virtual host name is made up by two
 values: the name and the port. Catalina standalone works great, because I
 can just set up two connectors in two engines, with two different ports, and
 have different behaviours for two virtual hosts having the same name but
 different port values.
 
 When coming down to WARP, we have one single connector getting all requests
 thru one single port, so, what we need to do is use a selector also over on
 a port to figure out the real virtualhost (host:port) to use.

What about using host_port (or any character is not valid in hostname)?
When I try to add server localhost_8080 J2EE gives a funny error message Cannot
connect to host.

 
 I'm planning to implement this mapping in the Warp* classes (not to break
 anything back), basically rewriting the map methods and adding a
 setPort/getPort property into host. But by doing this I won't be able to use
 the Standard* implementation of the Catalina stuff... My only problem is how
 this could cope with the Manager Application.

Specialy how to detect that sometime has changed?

 
 Pier



Always getting handshake_failure trying clientAuth

2001-10-18 Thread Gaussmann, Horst

Hello!

I'm trying to get a client authentification running. But i'am always getting

a handshake_failure.

The following output is generated by jsse debugging=all

Thread-20, WRITE:  SSL v3.0 Handshake, length = 745
Thread-20, READ:  SSL v3.0 Alert, length = 2
Thread-20, RECV SSLv3 ALERT:  warning, no_certificate
SSL -- handshake alert:  no_certificate
Thread-20, SEND SSL v3.0 ALERT:  fatal, description = handshake_failure
Thread-20, WRITE:  SSL v3.0 Alert, length = 2

I've installed 2 trusted user certificates into my browsers ( IE5.5 and
Netscape 6.1 ) but always the same problem.
I've configured tomcat3.2.3

Connector className=org.apache.tomcat.service.PoolTcpConnector
Parameter name=handler
value=org.apache.tomcat.service.http.HttpConnectionHandler/
Parameter name=port value=443/
Parameter name=socketFactory
value=org.apache.tomcat.net.SSLSocketFactory /
Parameter name=keystore value=c:\tomcat\conf\.keystore /
Parameter name=keypass value=changeit /
Parameter name=clientAuth value=true /
/Connector

I've tried the same with TC4.01 ( other configuration ) but found the same
problem.

Maybe some hints thanx Horst




RE: Important: RE: [TC3.3b1](=? TC3.3rc1) use of taglib causes org.apache.crimson.jaxp.DocumentBuilderFactoryImpl not found error

2001-10-18 Thread Ignacio J. Ortega

This a known problem that suffered rc1, test gainst rc2 this should be
solved..

Saludos ,
Ignacio J. Ortega


 -Mensaje original-
 De: Roberts Huw [mailto:[EMAIL PROTECTED]]
 Enviado el: jueves 18 de octubre de 2001 11:21
 Para: '[EMAIL PROTECTED]'
 Asunto: Important: RE: [TC3.3b1](=? TC3.3rc1) use of taglib causes
 org.apache.crimson.jaxp.DocumentBuilderFactoryImpl not found error
 
 
 I have the same problem, but I'm just using raw JSPs, no Jetspeed or
 anything.
 Further, I thought that Tomcat 3.3 (later builds) was 
 supposed to solve the
 problems with
 mixed XML parsers.  The problem I get is when a JSP includes 
 some other
 JSP via jsp:include.  What ~seems~ to be happening is that 
 the included
 JSP
 gets compiled using the ClassLoader of the WebApp rather than Tomcat's
 ClassLoader
 so that if the XML parser you're using is incompatible there'll be a
 problem.
 
 Is there a Tomcat developer out there who can help?
 
 Thanks a lot,
 Huw
 
  -Original Message-
  From: Paul Spencer [mailto:[EMAIL PROTECTED]]
  Sent: 01 September 2001 22:42
  To: [EMAIL PROTECTED]
  Subject: Re: [TC3.3b1] use of taglib causes
  org.apache.crimson.jaxp.DocumentBuilderFactoryImpl not found error
  
  
  I have made the changes suggested.  I still get the same errors.
  
  The jsp file will work when referenced directly,
  http://localhost/jetspeed/hello.jsp, but fails when it is 
 executed by
  Jetspeed.
  
  This problem is does not occur in Tomcat 3.3-m4 or Tomcat 4.0-b7.  I
  suspect something that was changed between 3.3-m4 and 3.3-b1 
  is causing
  the problem, but I do not know what it is :-(.  I do not believe the
  problem is with Jetspeed because I used the same WAR file 
 when testing
  all 3 versions of Tomcat.
  
  The error message may not be related to the actual error.  The empty
  .java file in the work directory may be the closer to the problem. 
  Maybe somewhere in the process of converting from .jsp to 
 .java when a
  taglib is defined.  
  
  I enabled debug logging. 
   No entries on the servlet logfile
   The jasper log contained:
  2001-09-01 17:29:25 - Package name is:
  WEB_0002dINF.templates.jsp.portlets.html
  2001-09-01 17:29:25 - Class file name is:
  E:\apache\jakarta-tomcat-3.3-b1\work\DEFAULT\jetspeed\WEB_0002
  dINF\templates\jsp\portlets\html\Example_1.class
  2001-09-01 17:29:25 - Java file name is:
  E:\apache\jakarta-tomcat-3.3-b1\work\DEFAULT\jetspeed\WEB_0002
  dINF\templates\jsp\portlets\html\Example_1.java
  2001-09-01 17:29:25 - Class name is: Example_1
  2001-09-01 17:29:25 - 
  Handling Directive: taglib  
  {uri=/WEB-INF/templates/jsp/tld/template.tld,
  prefix=jetspeed}
  
  Ideas?
  
  Paul Spencer
  
  Will Stranathan wrote:
   
   Take the XML related jars in TOMCAT_HOME/lib and rename them to
   x[whatever].jar (for example, xjaxp.jar).  Then put Velocity's XML
   parsers in TOMCAT_HOME/lib.
   
   I know it's a kludge, but AFAICT, these sorts of 
  classloader issues have
   been corrected in 4.0.  (Which is all the Struts people 
  can't understand
   why their stuff suddenly DOESN'T work - all the Struts WAR's come
   without any parser libraries.)
   
   w
   
   Paul Spencer wrote:
   
I am getting the following error while using Jetspeed 
 with Tomcat
3.3-b1.  This error does NOT occur in Tomcat 3.3-m4!
  [Fri Aug 31 22:19:33 EDT 2001] -- ERROR -- Error 
  rendering Velocity
template:   /controllers/html/multicolumn.vm: 
 Invocation of method
'getContent' in  class
org.apache.jetspeed.portal.controls.VelocityPortletControl threw
exception class  javax.xml.parsers.FactoryConfigurationError :
Provider   
  org.apache.crimson.jaxp.DocumentBuilderFactoryImpl not found
   
In addition the .java file created in the work directory 
  is has a size
of 0 bytes.
   
I copied crimson.jar and jaxp.jar to the lib/apps directory, as
suggested in

  http://www.mail-archive.com/tomcat-dev@jakarta.apache.org/msg1
 3224.html
   ,
   but that did not work.
  
   My jsp file is below (Note this file work in Tomcat 
 v3.3-m3 and -m4):
 %@ taglib uri='/WEB-INF/templates/jsp/tld/template.tld'
   prefix='jetspeed' %
 p
   bJSP/b Hello World!
   bServer date:/b jetspeed:info 
 requestedInfo=ServerDate /
 /p
  
  
   Ideas?
  
   Thank you
   Paul Spencer
  
 
 **
 **
 The information in this email is confidential and is intended solely
 for the addressee(s).
 Access to this email by anyone else is unauthorised. If you are not
 an intended recipient, you must not read, use or disseminate the
 information contained in the email.
 Any views expressed in this message are those of the individual
 sender, except where the sender specifically states them to be
 the views of Capco.
 
 http://www.capco.com
 **
 *
 
 



Problem with sessions and SSL

2001-10-18 Thread Alexandre Victoor

Hello
I have a tomcat-cocoon site that is working well with http. Now this same 
website is under sll and the session cookies seem to expire  very fast. 
Some images in my pages come from unsecured location. Does anyone knows if 
these two thinks are linked ?
Is it normal that session cookies doesn't work the same way with or without 
ssl ?
Thanks

Alex






RE: Conflict between tomcat 3.2 libraries and application libs

2001-10-18 Thread Randy Layman

3.3 will solve this problem.

 -Original Message-
 From: Dmitri Colebatch [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, October 18, 2001 3:00 AM
 To: [EMAIL PROTECTED]
 Subject: Re: Conflict between tomcat 3.2 libraries and 
 application libs
 
 
 Upgrading to tomcat 4 (or maybe 3.3 as well, I'm not sure what it
 does with classpath tho) would do the trick, but I'm not sure 
 if that is
 an option.  What you are experiencing is a common issue with 
 3.2, and the
 approach you are taking is basically the common fix.
 
 cheers
 dim
 
 On Thu, 18 Oct 2001, David Pedrotti wrote:
 
  I am experiencing conflict with libraries in the tomcat\lib 
 directory
  and the application\WEB-INF\lib directory.
  
  Specifically the web application needs to use a more recent 
 version of
  jaxp.jar than the one deployed with tomcat 3.2 but sees the one in
  tomcat\lib first. Updating the one in tomcat\lib causes 
 problems with
  tomcat (I am looking for a more flexible solution than this!).
  
  Is there a way of configuring tomcat so that the 
 application libraries
  are used first or some other way around the problem?
  
  Does anyone know the solution to this problem.
  
  TIA
  Dave...
  ---
  David Pedrotti   Tel:  (08) 9486 8500
  Beacon TechnologyFax:  (08) 9486 8566
  1 Howard Street  E-mail:   [EMAIL PROTECTED]
  Perth, WA 6000   Web Site: www.beacon.com.au
  
  
  
 



Tomcat 4.0.1 IllegalStateException (was NOT in 4.0 final)

2001-10-18 Thread pero

Hi,

after updating to TC 4.0.1 I occasionally get the following exception:

StandardWrapperValve[jsp]: Servlet.service() for servlet jsp threw exception
java.lang.IllegalStateException
at
org.apache.catalina.connector.ResponseFacade.getWriter(ResponseFacade.java:1
59)
at
org.apache.jasper.runtime.JspWriterImpl.initOut(JspWriterImpl.java:166)
at
org.apache.jasper.runtime.JspWriterImpl.flushBuffer(JspWriterImpl.java:158)
at
org.apache.jasper.runtime.JspWriterImpl.flush(JspWriterImpl.java:205)
at
org.apache.jasper.runtime.PageContextImpl.release(PageContextImpl.java:176)
at
org.apache.jasper.runtime.JspFactoryImpl.internalReleasePageContext(JspFacto
ryImpl.java:198)
at
org.apache.jasper.runtime.JspFactoryImpl.releasePageContext(JspFactoryImpl.j
ava:193)
at org.apache.jsp.page3$jsp._jspService(page3$jsp.java:3393)
at
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.ja
va:202)
at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:382)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:474)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:247)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:193)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:243)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
va:201)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase
.java:472)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
64)
at
org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:2
46)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
64)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2344)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164
)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.
java:170)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
64)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170
)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
64)
at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:462)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
64)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
:163)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at
org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:
1011)
at
org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1106
)
at java.lang.Thread.run(Thread.java:484)

It is not bound to a specific page (even if I reload the page that cause the
error the exception does not reoccur) and the page is executed normally
even if that exception occurs.
In TC4.0 final I never got such an exception.
After checking the catalina-source, I found out that the exception is raised
if the response has been suspended. But I did not do such things explicitly.
(and again, tomcat did not complain in version 4.0)

I could ignore the exception (for it seems to have no impact on the
jsp-execution), but of course it's not that nice. :-)

So, any ideas what's going on?

thanks,
pero






RE: How to change session key name

2001-10-18 Thread Larry Isaacs

Did my simple test on Tomcat 3.1 and yep, no
USER_ID cookie displayed.  I would assume it's a
bug in Tomcat 3.1, which is unlikely to be fixed.
You will need to upgrade to avoid this bug.
There are a lot of other bugs you would avoid by
upgrading as well.

Cheers,
Larry

 -Original Message-
 From: Jovie Castaneda [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, October 17, 2001 7:29 PM
 To: [EMAIL PROTECTED]
 Subject: RE: How to change session key name
 
 
 Hi Larry,
 
Thanks for the reply I really want to make it but it seems 
 that I cant
 get
 what's going on here is it beacause im using Tomcat 3.1?
 
 
 -Original Message-
 From: Larry Isaacs [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, October 17, 2001 11:20 PM
 To: '[EMAIL PROTECTED]'
 Subject: RE: How to change session key name
 
 
 I tried this with Tomcat 3.2.3 and 3.3 and I see
 both the User_ID cookie as well as the JSESSIONID cookie.
 It's not clear which version of Tomcat you are using,
 or what you might be doing differently from my simple
 test case.
 
 Cheers,
 Larry
 
  -Original Message-
  From: Jovie Castaneda [mailto:[EMAIL PROTECTED]]
  Sent: Wednesday, October 17, 2001 3:24 AM
  To: [EMAIL PROTECTED]
  Subject: RE: How to change session key name
 
 
  sorry to interrupt guys but ive been bugged with this
  JSESSION problem too..
  i was attempting to create cookies with this code
 
  Cookie cookie1 = new Cookie(User_ID, Integer.toString(userid));
  res.addCookie(cookie1);
  res.sendRedirect(/test/servlet/MyServlet);
 
  I am expecting to get the cookies I have set when I 
 retrieve them from
  MyServlet
  Using this code:
 
  if (cookies !=null){
  for(int i=0; i cookies.length; i++){
  System.out.println(Name  : +cookiesi.getName());
  System.out.println(Value : +cookiesi.getValue());
  }
  }
 
 
  My expected result should be the following:
  Name: UserID
  Value: UserID Value
 
  But why am i getting only 1 value which happens to be
  JSESSIONID ( coming from the session created)
  and its sessionid as the value
  why cant it create cookies and store the values in it?
 
  PLEASE HELP HERETHANKS A LOT!@!
 
 
  -Original Message-
  From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
  Sent: Wednesday, October 17, 2001 5:27 PM
  To: [EMAIL PROTECTED]
  Subject: Re: How to change session key name
 
 
  Firestar wrote:
  
   Hi, by default session-key name in tomcat is
   JSESSIONID. Is there a way for me to change the
   session-key name (to something shorter for e.g.)? I
   can't seem to find it in any of the config files.
   Thanks in advance.
 
  Don't think so. JSESSIONID is from the Servlet Spec. Unless,
  of course,
  you wish to download the source, modify it and become non
  compliant with
  the spec...
 
  Bojan
 
 



RE: running multiple instances of the same web app with an application-scope javabean

2001-10-18 Thread Larry Isaacs

You could try running the same webapp multiple times on one
Tomcat instance using different context names for each
webapp instance, i.e.

Context path=/myapp1 docBase=myapp ...

Context path=/myapp2 docBase=myapp ...

Each would have its own application scope attributes, which
I think is what you are asking for.

Hope this helps.

Larry

 -Original Message-
 From: Aleksandar Milanovic [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, October 17, 2001 5:13 PM
 To: Tomcat-User
 Subject: running multiple instances of the same web app with an
 application-scope javabean
 
 
 Hi All,
 
 I want to run multiple instances of the same web app on a 
 single Tomcat 4.0.
 Unfortunately, this web app uses a bean with an application session
 context. This bean should be though different for each web 
 app instance
 deployed on the server. I have a few ideas how this could be 
 achieved, but
 am not sure if they're realistic:
 
 1. Somehow force Tomcat to run multiple JVM. If this is 
 possible, how I can
 instruct it to run a single web app instance on a given JVM?
 2. Install multiple instances of Tomcat on the same machine 
 and run a single
 web app instance in each installation.
 3. Change the bean scope to session, introduce a new init 
 servlet whose
 session starts with the server startup and ends with the 
 server shutdown,
 and share the bean among servlets/JSPs within the same context.
 
 Is this feasible, and is there a better solution?
 
 thx
 Alex
 
 



Re: How can I...

2001-10-18 Thread Adrian Caramarin

Hi Bo,

I ran into this problem once. I think all you need to do to is to set up
your JAVA_HOME environment properly, that means use SET
JAVA_HOME=C:\JDK1.2.1 instead SET JAVA_HOME=C:\JDK1.2.1\BIN. Try that,
should work.

Adrian


- Original Message -
From: Bo Xu [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, October 17, 2001 11:10 PM
Subject: Re: How can I...


 blanchard nike wrote:

  Good Day,
  I am learning servlet programming, using
  Jakarta-Tomcat 3.2.3 container. But I have the thing
  stopped because it seems I am failing in setting
  JAVA_HOME to point to my jdk installation. I tried the
  setting in the autoexec.bat this way:
  SET JAVA_HOME=C:\JDK1.2.1\BIN
  it did not work, and I tried in the command line this
  way: as it is said in the user guide;
  C set JAVA_HOME=c=\jdk1.2.1\bin still it did not work
  and the same error message appears: Set JAVA_HOME to
  point to your jdk installation. I am confused; I have
  the jdk working perfectly with applets. What can I do?
  What shall I type and where to fix up this?
  Also it is said I must add the java compiler to my
  PATH. Could you help me with this please?
  I would really appreciate your help, thanks
  beforehand.
  I am using Win 98.
  Regards

 set JAVA_HOME=C:\jdk1.3.1
 set JAKARTA_HOME=C:\jakarta-tomcat-4.0

 and in my win98 PC, if I *also* set PATH=C:\jdk1.3.1\bin, I found I
 can not run startup.bat (it doesn't lauch the second dos-prompt).

 Bo
 Oct.17, 2001







JAAS not working any more with Tomcat 4.0 (!?)

2001-10-18 Thread Markus Kerber

Hi all,

when trying to perfom a JAAS authentification from within servlets I
get the attached error message. Funny enough the same code works with
Tomcat 3.2.x but not with Tomcat 4.0! The code snippet I use for the 
authentification is:


/* set the path to the jaas configuration files */
System.setProperty(java.security.auth.login.config, jaasConfigFile);

[...]

LoginContext lc = null;
try {

lc = new LoginContext(sampleJAAS, new MyCallBackHandler());

} catch (LoginException le) {
le.printStackTrace();
/* ... auth failed */
} catch (SecurityException se) {
se.printStackTrace();
/* ... auth failed */

} 

As mentioned before the same code works with Tomcat 3.2.x and when used
standalone. The path to the config file is correct (I even put it in 
different locations within the classpath and working directories). I am 
not using a security manager. I use a simple NT login module, however it 
is never invoked (the exception is raised before). All other parts of the
application is working quite fine. Am I doing something?

Any help will be greatly appreciated.

Kind regards,
Markus Kerber

--


java.lang.SecurityException: unable to instantiate LoginConfiguration
at javax.security.auth.login.Configuration.getConfiguration(Configuration.java:212)
at javax.security.auth.login.LoginContext$1.run(LoginContext.java:166)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.login.LoginContext.init(LoginContext.java:163)
at javax.security.auth.login.LoginContext.(LoginContext.java:319)
at mycode.util.LoginHandler.authenticate(LoginHandlerStatup.java:40)
[...]

___
1.000.000 DM gewinnen - kostenlos tippen - http://millionenklick.web.de
[EMAIL PROTECTED], 8MB Speicher, Verschluesselung - http://freemail.web.de





JDBC Realm (Tomcat 4.0.1) - Coding standard?

2001-10-18 Thread raj

I am having problems connecting to a Cloudscape (v3.6) db using Tomcat 4.0.1
when using JDBC realm in my server.xml

The error I get is:
java.lang.NullPointerException
at org.apache.catalina.realm.JDBCRealm.open(JDBCRealm.java:549)
at org.apache.catalina.realm.JDBCRealm.start(JDBCRealm.java:613)
at 
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1108)
at 
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:307)
at 
org.apache.catalina.core.StandardService.start(StandardService.java:388)
at 
org.apache.catalina.core.StandardServer.start(StandardServer.java:505)
at org.apache.catalina.startup.Catalina.start(Catalina.java:776)
at org.apache.catalina.startup.Catalina.execute(Catalina.java:681)
at org.apache.catalina.startup.Catalina.process(Catalina.java:179)
at java.lang.reflect.Method.invoke(Native Method)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:243)


This got me looking at the code in JDBCRealm.java.
The code (at the lines in question) is as follows:

542:// Open a new connection
543:Properties props = new Properties();
544:if (connectionName != null)
545:props.put(user, connectionName);
546:if (connectionPassword != null)
547:props.put(password, connectionPassword);
548:dbConnection = driver.connect(connectionURL, props);
549:dbConnection.setAutoCommit(false);
550:return (dbConnection);

I wrote a test program connecting to Cloudscape (via the WebLogic 
driver) and found that:

dbConnection = driver.connect(connectionURL, props);

returns a NULL, whereas

dbConnection = DriverManager.getConnection(connectionURL, props);

returns the connection.

Now, as far as I can recollect, though the former is valid, it is not a 
recommended method
for getting a connection. Using DriverManager is the recommended method.

Any ideas why the driver itself is being used to get the connection. 
If there is a general  consensus can this
be replaced with DriverManager instead?

Cheers
-raj




RE: mod-jk for AIX 4.3.3

2001-10-18 Thread Arnaud Héritier

Thanks a lot for your help Adam.

It will make gain a lot of time for me.

arno


 -Message d'origine-
 De:   Adam Fowler [SMTP:[EMAIL PROTECTED]]
 Date: mercredi 17 octobre 2001 18:39
 À:[EMAIL PROTECTED]
 Objet:Re: mod-jk for AIX 4.3.3
 
 I have this one:-
 
 http://users.aber.ac.uk/aff9/tomcat/tomcat-3.2/aix/4.3.3/RS6000-ppc/
 
 If that helps 8o) Build instructions are also up at 
 http://users.aber.ac.uk/aff9
 
 Regards,
 
 Adam.
 
 Arnaud Héritier wrote:
  hi guys (and girls)
  
  Is there available somewhere the mod_jk.so for AIX 4.3.3 or should I compile it ???
  
  thanx
  
  Arnaud HERITIER
  Ingénieur d'études
  SOPRA. Group
  EAI Consulting
  Tel : +33-1-53-33-44-74
  Email : [EMAIL PROTECTED]
  
  
  
 
 




Test

2001-10-18 Thread SafePower

Test Message




RE: Is JAR necessary after running?

2001-10-18 Thread Mangi, Rick

Out of curiosity, why would you want to do that?

-Original Message-
From: Jim Cheesman [mailto:[EMAIL PROTECTED]]
Sent: Thursday, October 18, 2001 3:11 AM
To: [EMAIL PROTECTED]
Subject: Re: Is JAR necessary after running?


At 04:52 AM 18/10/01, you wrote:
 Hi all,

 If Tomcat is startup already,
 Can I delete servlet.jar?


Quick answer: try!
Real answer, at least on Win2000: no. Unless you're actually using a 
different servlet.jar to the one you think you are.

How to fake a delete on Win2000: overwrite the jar with another one, this 
time empty.


Jim


--

   *   Jim Cheesman   *
 Trabajo: 
[EMAIL PROTECTED] - (34)(91) 724 9200 x 2360
   Evil is 
not all bad.




RE: How to change session key name

2001-10-18 Thread Richard Troy


 On Wed, 17 Oct 2001, Firestar wrote:

  But JRun does allow me to change it:) I was hoping
  Tomcat 4.0 would be as flexible...

 And I was hoping that you recognized how badly serverd your employer is
 (by those who developed this application) if your application depends on
 something as obscure as this.  The *right* behavior would be to change
 your app so that you are not locked in by it.

  For e.g. another gd thing abt JRun is that it allows
  us to place our servlets and classes anywhere, instead
  of WEB-INF folder.

 It is not defined in the spec (unlike the name of the sesson id cookie :-)
 so servers can do what they want in this respect.  And Tomcat 4
 automatically adds any JAR files in $CATALIAN_HOME/common/lib and
 $CATALINA_HOME/lib to the set of classes visible to webapps.  On
 Unix-based systems, you can create symbolic links to the existing JAR
 files so that they don't have to be moved.

It's not well know, but you can do this with WindowsNT and later MS
operating systems too:

http://support.microsoft.com/support/kb/articles/Q205/5/24.ASP

(Read the whole thing - a lot of the juicy stuff's at the bottom.)

HTH,
RT


-- 
Richard Troy, Chief Scientist
Science Tools Corporation
[EMAIL PROTECTED], 510-567-9957, http://ScienceTools.com/






RE: URGENT - Tomcat Crashing Frequently Dr. Watson Error

2001-10-18 Thread Ignacio J. Ortega

This is a problem in JDBC-ODBC Bridge.., asked and answered so many
times.., result was..

JDBC-ODBC is not for production !! or any serious use!!!

In either case never a crash in the JVM can be caused by a Java
program.., it's ever a problem in native parts.., the JDBC-ODBC bridge
in your case..

Saludos ,
Ignacio J. Ortega


 -Mensaje original-
 De: Shah, Chintan V (Chintan) [mailto:[EMAIL PROTECTED]]
 Enviado el: jueves 18 de octubre de 2001 16:15
 Para: '[EMAIL PROTECTED]'
 Asunto: URGENT - Tomcat Crashing Frequently Dr. Watson Error
 Importancia: Alta
 
 
 Hi All,
 
 I'm new to this mailing group. I need some help. 
 
 I'm using Apache 1.3.19 , Tomcat 3.2.1 with Win NT 4.0 
 Service Pack 6,  128
 MB RAM, Pentium II machine.
 My application architecture is Ms-Access - Java Beans - JSP . 
 Many of my JSP
 pages are doing heavy processes like database searching, 
 updating multiple
 database tables, multiple table rows at a time...etc.
 
 My Tomcat crashes very frequently (Dr. Watson Error)...  I tried to
 understand the Dr Watson log file also...And if I am not 
 wrong, I could
 understand that the log file is showing faults in the system 
 functions like,
 MPHeapFree or RtlEnterCriticalSection or something like 
 that.. (If you want
 then i can send you the chunk of that log file also...).
 
 I could identify the sequence of actions also, where the 
 majority times the
 Tomcat crashes... One sequence is ...In IE/NS browser, i log into my
 application, then with Ctrl+N, i open another window and then 
 from both of
 the browser windows, i surf thru different modules and pages, 
 till then it
 works fine...no probs... then, i log out from one of the 
 browser window
 (which obviously logs me out in another browser also...) and 
 close one of
 the window. Then I again log into the application from the 
 open window...and
 go thru different pages and do some heavy database access stuff...like
 searching, updating tables and all... and during this  at 
 some point in
 time...the tomcat crashes...(dr watson error).
 
 Now, as I have gone thru the Archieves of the Tomcat Users mailing
 list...i've frequently seen people saying that JDBC ODBC driver is not
 THREAD SAFE and it should NOT be used for production and Sun is also
 saying that JDBC ODBC driver is just experimental and having 
 some problems
 which they are not going to solve...(sun bug parade...).. and 
 people advice
 to use some other database access drivers.so, can 
 somebody advice me
 that exactly which driver should I use...and where it is 
 available...(which
 should be freely available, should allow my code to work with 
 that also
 without changes, and easily implementable...) ...as within 
 next two days
 I've to launch the application.
 
 eagerly waiting for solutions,
 TIA,
 
 thanks and regards,
 Chintan Shah
 
 



RE: URGENT - Tomcat Crashing Frequently Dr. Watson Error

2001-10-18 Thread Shah, Chintan V (Chintan)

Hi,

Thanks for your reply... then what should i do ? Still my problem is open...
exactly which driver should I use...and where it is  available...(which
should be freely available, should allow my code to work with that also
without changes, and easily implementable...) ...as within  next two days
I've to launch the application.

I searched for the JDBC drivers on net... I found some of them.. (from
Merant, iNetSoftwareand some others...) , but they are costly... isn't
any option available from Sun itself??? 

Within short span..i'm planning to move from MS-Access 2000 to MS-SQL Server
7.0, so, it should be compatible for both..

urgent help and guidance on this is appreciable

thanks and regards,
Chintan Shah


-Original Message-
From: Ignacio J. Ortega [mailto:[EMAIL PROTECTED]]
Sent: Thursday, October 18, 2001 7:53 PM
To: '[EMAIL PROTECTED]'
Subject: RE: URGENT - Tomcat Crashing Frequently Dr. Watson Error


This is a problem in JDBC-ODBC Bridge.., asked and answered so many
times.., result was..

JDBC-ODBC is not for production !! or any serious use!!!

In either case never a crash in the JVM can be caused by a Java
program.., it's ever a problem in native parts.., the JDBC-ODBC bridge
in your case..

Saludos ,
Ignacio J. Ortega


 -Mensaje original-
 De: Shah, Chintan V (Chintan) [mailto:[EMAIL PROTECTED]]
 Enviado el: jueves 18 de octubre de 2001 16:15
 Para: '[EMAIL PROTECTED]'
 Asunto: URGENT - Tomcat Crashing Frequently Dr. Watson Error
 Importancia: Alta
 
 
 Hi All,
 
 I'm new to this mailing group. I need some help. 
 
 I'm using Apache 1.3.19 , Tomcat 3.2.1 with Win NT 4.0 
 Service Pack 6,  128
 MB RAM, Pentium II machine.
 My application architecture is Ms-Access - Java Beans - JSP . 
 Many of my JSP
 pages are doing heavy processes like database searching, 
 updating multiple
 database tables, multiple table rows at a time...etc.
 
 My Tomcat crashes very frequently (Dr. Watson Error)...  I tried to
 understand the Dr Watson log file also...And if I am not 
 wrong, I could
 understand that the log file is showing faults in the system 
 functions like,
 MPHeapFree or RtlEnterCriticalSection or something like 
 that.. (If you want
 then i can send you the chunk of that log file also...).
 
 I could identify the sequence of actions also, where the 
 majority times the
 Tomcat crashes... One sequence is ...In IE/NS browser, i log into my
 application, then with Ctrl+N, i open another window and then 
 from both of
 the browser windows, i surf thru different modules and pages, 
 till then it
 works fine...no probs... then, i log out from one of the 
 browser window
 (which obviously logs me out in another browser also...) and 
 close one of
 the window. Then I again log into the application from the 
 open window...and
 go thru different pages and do some heavy database access stuff...like
 searching, updating tables and all... and during this  at 
 some point in
 time...the tomcat crashes...(dr watson error).
 
 Now, as I have gone thru the Archieves of the Tomcat Users mailing
 list...i've frequently seen people saying that JDBC ODBC driver is not
 THREAD SAFE and it should NOT be used for production and Sun is also
 saying that JDBC ODBC driver is just experimental and having 
 some problems
 which they are not going to solve...(sun bug parade...).. and 
 people advice
 to use some other database access drivers.so, can 
 somebody advice me
 that exactly which driver should I use...and where it is 
 available...(which
 should be freely available, should allow my code to work with 
 that also
 without changes, and easily implementable...) ...as within 
 next two days
 I've to launch the application.
 
 eagerly waiting for solutions,
 TIA,
 
 thanks and regards,
 Chintan Shah
 
 



Making WebApp

2001-10-18 Thread Jason Terando
 smime.p7s


RE: URGENT - Tomcat Crashing Frequently Dr. Watson Error

2001-10-18 Thread Jim Cheesman

At 04:33 PM 18/10/01, you wrote:
Hi,

Thanks for your reply... then what should i do ? Still my problem is open...
exactly which driver should I use...and where it is  available...(which
should be freely available, should allow my code to work with that also
without changes, and easily implementable...) ...as within  next two days
I've to launch the application.

I searched for the JDBC drivers on net... I found some of them.. (from
Merant, iNetSoftwareand some others...) , but they are costly... isn't
any option available from Sun itself???

Within short span..i'm planning to move from MS-Access 2000 to MS-SQL Server
7.0, so, it should be compatible for both..


I'd move it right away to MSSQL - access isn't really a production 
database - more of a home one. Then download the MS drivers from Microsoft 
- see the current/recent thread on the subject for more information.



I agree with Ignacio that it's the jdbc:odbc bridge that's causing the 
problem - not tomcat.





--

   *   Jim Cheesman   *
 Trabajo: 
[EMAIL PROTECTED] - (34)(91) 724 9200 x 2360
   Evil is 
not all bad.





Making Webapp

2001-10-18 Thread Jason Terando

(sorry about the double post, I forgot to remove cert from from first one)
I've done the following in trying to get Apache + Tomcat working together:
1) Downloaded Tomcat 4.0.1 binaries
Status: running, examples work
2) Downloaded Apache 1.3.22 source, compiled via following:

configure --prefix=/usr/local/apache --enabled-shared=max
make
make install

Status: Apache is installed and running
3) Downloaded webapp-module-1.0-tc40-src.tar.gz

configure --with-apxs=/usr/local/apache/bin/apxs (runs and wishes me good
luck on make)
make
Make dies when it calls apxs, which is complaining no config variable
LDFLAGS_SHLIB
I poked around on google and found somebody else who ran into this but
couldn't find the response. Can anybody tell me what I missed/messed up?
Thanks!


_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com




AW: How to work around jk_nt_service bug,

2001-10-18 Thread Beat Friedli

I'm using http://www.alexandriasc.com/software/JavaService/index.html. You 
find examples for tomcat 3.x and 4.x both work very well. Also the 
combination with both iis is possible.


Beat Friedli

--


That's very strange, cause it worked perfectly for me, and I had the
same problem you have. Where did you add the -Xrs? It has to be in the
wrapper.properties file. The only difference between our configurations
is that I ran Tomcat stand alone...does that make a difference?

-Original Message-
From: Ylan Segal [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, October 17, 2001 8:46 PM
To: [EMAIL PROTECTED]
Subject: RE: How to work around jk_nt_service bug,


Thanks for the response.. but that did not work.
The problem is that the service is not failing, just it is being stopped
on
logout of the user (with administrator user).
I also tried the -Xrs in the wrapper.properties as suggested in another
thread in the list, but with no luck.

Anyone has any other ideas?

Thanks.

-Original Message-
From: Bryan Lipscy [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, October 17, 2001 11:34 AM
To: [EMAIL PROTECTED]
Subject: RE: How to work around jk_nt_service bug,


Set the service to restart.

Start - Settings - Control Panel - Administrative Tools - Services
-

Tomcat (or whatever you named it) - Recovery

Set First Failure, Second Failure,  Subsequent Failure to
Restart
the service






-Original Message-
From: Ylan Segal [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, October 17, 2001 9:47 AM
To: [EMAIL PROTECTED]
Subject: How to work around jk_nt_service bug,


Hi guys,

I am experiencing the porblem mentioned in the docs with jdk 1.3.1
using
jk_nt_service where tomcat stops (3.2.3) if the user logs out.

I can't roll back to jdk 1.2 because I need classes in 1.3.1. How
can I work
around this?

All this is running on windows 2000/ IIS 5. Would it help if I
set up tomcat
as in-process?

Thanks for your help.

Ylan Segal.




_
Downloaden Sie MSN Explorer kostenlos unter http://explorer.msn.de/intl.asp




Redirection Filter on IIS : Authenification

2001-10-18 Thread Beat Friedli

question:
-
What files need to be accessible by the internet-guest-account when using 
the Redirection Filter on IIS?


background-information:
---
Im working with tomcat3.2.3 and the isapi_redirect.dll from the 
jakarta-Homepage on an IIS 4.
The redirection works fine on the local intranet-Server.

But on the external Internet-Server the system the user has to suply a 
network password even if anonymous access is allowed. (when entering a valid 
user and password all work fine)


Beat Friedli


_
Downloaden Sie MSN Explorer kostenlos unter http://explorer.msn.de/intl.asp




Authentication with tomcat

2001-10-18 Thread [EMAIL PROTECTED]

Hi all!

I've written these lines in web.xml, so users must be authenticated to use my 
application.

security-constraint
  web-resource-collection
 web-resource-nameProtected Area/web-resource-name
 url-pattern/admin/*/url-pattern
 http-methodDELETE/http-method
 http-methodGET/http-method
 http-methodPOST/http-method
 http-methodPUT/http-method
  /web-resource-collection
  auth-constraint
 role-nameAdminTestOnLine/role-name
  /auth-constraint
/security-constraint

login-config
  auth-methodBASIC/auth-method
  realm-nameAdminTestOnLine/realm-name
/login-config

If I use 8080 port it's OK, but if I use web server IIS it ask me an other 
authentication with Domain input, and I can't loggin.

Can I authenticate with only tomcat?
What I must do to authenticate users?


Please write me to [EMAIL PROTECTED] too.


Thanks!



RE: cancelled request

2001-10-18 Thread Cox, Charlie

thanks, but flush() doesn't help. 

I guess I need to know if there is a way to detect that the request has been
cancelled?

Charlie

 -Original Message-
 From: Rajah Kalipatnapu [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, October 17, 2001 6:15 PM
 To: [EMAIL PROTECTED]
 Subject: RE: cancelled request
 
 
 I'm not sure how far this helps. But try flush() every time 
 you write bytes
 to outputstream.
 Even though u r loosing the advantage of BufferStream by 
 flushing every
 time, there is a chance that u'll get an IOException if the 
 user cancels the
 download and the IOStream is closed, as the flush() forces 
 the bytes to the
 end stream.
 
  while(-1 != (bytesRead = bisDownload.read(buff, 0, buff.length)))
  {
bosDownload.write(buff, 0, bytesRead);
bosDownload.flush();
  }
 
 -Raj
 
 -Original Message-
 From: Barry White [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, October 17, 2001 2:50 PM
 To: [EMAIL PROTECTED]
 Subject: Re: cancelled request
 
 
 I have never done anything like that but I was thinking you 
 could use some
 kind of timeout in your servlet.  Try doing this in your 
 while loop.  You
 could also check bytesread and make sure it is changing.
 
 hope this helps,
 Barry
 - Original Message -
 From: Cox, Charlie [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Wednesday, October 17, 2001 4:32 PM
 Subject: cancelled request
 
 
  I didn't see anything about this in the archives, so 
 hopefully someone can
  help me out here.
 
  TC 3.2.1/IIS 5/W2K
  I am using a servlet to serve a large file (50MB) and 
 everything works
 fine
  if it completes as requested. But if the user clicks 'cancel', I get
  different results from Tomcat. Sometimes the servlet stops 
 running where
 it
  is, as if the thread is interrupted, while other times it continues
 running
  like nothing happened. In the both cases the download box 
 disappears from
  the browser. Netscape 6.1,4.7 and IE 5.5 all act the same 
 way. (IE 5.0 has
 a
  problem here, but I have other problems with it too).
 
  here's the code in my servlet providing the file
 
  resp.setContentType(application/octet-stream; name=somefile.exe;);
  resp.setHeader(Content-Disposition,
 attachment;filename=somefile.exe;);
  resp.setHeader(Content-Length, String.valueOf(filelength) + ;);
 
  InputStream isDownload;
  isDownload = getServletContext().getResourceAsStream(filename);
  BufferedInputStream bisDownload = new
 BufferedInputStream(isDownload,2048);
  BufferedOutputStream bosDownload = new
  BufferedOutputStream(resp.getOutputStream());
  byte[] buff = new byte[2048];
  int bytesRead;
 
  while(-1 != (bytesRead = bisDownload.read(buff, 0, buff.length)))
  {
  bosDownload.write(buff, 0, bytesRead);
  }
  bosDownload.close();
  bisDownload.close();
 
 
  The reason that this is an issue is that I send an email 
 upon completion
 of
  this download, and it shouldn't be sent if the user clicks 
 'cancel' but it
  is being sent when the servlet continues processing. I've 
 also wrapped
 this
  code is a try/catch and no exception/error is ever thrown.
 
  Charlie
 
 



RE: cancelled request

2001-10-18 Thread Cox, Charlie

my problem is that I can't distinguish a valid request from a cancelled one.
Tomcat in some instances stops my servlet exeution and in others lets it go
as if I didn't cancel.
There doesn't seem to be a time difference between downloading 50MB and the
time it would have taken to complete the download had I not clicked
'cancel'.

I would have expected the socket to be closed and an IO exception to be
thrown in my servlet - but if the servlet just stops as it sometimes does,
that's ok too.

Charlie

 -Original Message-
 From: Barry White [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, October 17, 2001 5:50 PM
 To: [EMAIL PROTECTED]
 Subject: Re: cancelled request
 
 
 I have never done anything like that but I was thinking you 
 could use some
 kind of timeout in your servlet.  Try doing this in your 
 while loop.  You
 could also check bytesread and make sure it is changing.
 
 hope this helps,
 Barry
 - Original Message -
 From: Cox, Charlie [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Wednesday, October 17, 2001 4:32 PM
 Subject: cancelled request
 
 
  I didn't see anything about this in the archives, so 
 hopefully someone can
  help me out here.
 
  TC 3.2.1/IIS 5/W2K
  I am using a servlet to serve a large file (50MB) and 
 everything works
 fine
  if it completes as requested. But if the user clicks 'cancel', I get
  different results from Tomcat. Sometimes the servlet stops 
 running where
 it
  is, as if the thread is interrupted, while other times it continues
 running
  like nothing happened. In the both cases the download box 
 disappears from
  the browser. Netscape 6.1,4.7 and IE 5.5 all act the same 
 way. (IE 5.0 has
 a
  problem here, but I have other problems with it too).
 
  here's the code in my servlet providing the file
 
  resp.setContentType(application/octet-stream; name=somefile.exe;);
  resp.setHeader(Content-Disposition,
 attachment;filename=somefile.exe;);
  resp.setHeader(Content-Length, String.valueOf(filelength) + ;);
 
  InputStream isDownload;
  isDownload = getServletContext().getResourceAsStream(filename);
  BufferedInputStream bisDownload = new
 BufferedInputStream(isDownload,2048);
  BufferedOutputStream bosDownload = new
  BufferedOutputStream(resp.getOutputStream());
  byte[] buff = new byte[2048];
  int bytesRead;
 
  while(-1 != (bytesRead = bisDownload.read(buff, 0, buff.length)))
  {
  bosDownload.write(buff, 0, bytesRead);
  }
  bosDownload.close();
  bisDownload.close();
 
 
  The reason that this is an issue is that I send an email 
 upon completion
 of
  this download, and it shouldn't be sent if the user clicks 
 'cancel' but it
  is being sent when the servlet continues processing. I've 
 also wrapped
 this
  code is a try/catch and no exception/error is ever thrown.
 
  Charlie
 
 



RemoteUser is null

2001-10-18 Thread Wayne Hefner

I am trying to set up authentication for my web app using tomcat.  I am
using just basic authentication and the application seems to authenticate me
and allows the user in.  However, when I issue a request.getRemoteUser() the
value returned is null.

The following is what I have placed in the web.xml file for the web app:

   security-constraint
  web-resource-collection
 web-resource-nameDIS Protected Area/web-resource-name
 !-- Define the context-relative URL(s) to be protected --
 url-pattern/jsp/security/protected/*/url-pattern
 url-pattern/DIS/*/url-pattern
 !-- If you list http methods, only those methods are protected --
 http-methodDELETE/http-method
 http-methodGET/http-method
 http-methodPOST/http-method
 http-methodPUT/http-method
  /web-resource-collection
  auth-constraint
 !-- Anyone with one of the listed roles may access this area --
 role-namedis/role-name
 role-namedisrole/role-name
  /auth-constraint
/security-constraint

!-- Default login configuration uses BASIC authentication --
login-config
  auth-methodBASIC/auth-method
  realm-nameDIS Basic Authentication Area/realm-name
/login-config
  /security-constraint

If anyone could let me know how I can force Tomcat to set RemoteUser I would
appreciate it.

thanks,

wayne





RE: URGENT - Tomcat Crashing Frequently Dr. Watson Error

2001-10-18 Thread Shah, Chintan V (Chintan)

hi, thanks for guidance...

Is the microsoft driver reliable and stable ?? will it work for MS-Access
and SQL Server both ? And i hope, it won't need major
configurations/setting/changeswhich need to keep the application again
under observation for a long time.. and in that case, what about existing
JDBC ODBC driver installed with JDK 1.3 (i.e. both the drivers installed
simultaneously won't create any problem ??). 

And how many changes do i need to do in my code... ??  
i.e. Class.forName(sun.jdbc.odbc.JdbcOdbcDriver).newInstance(); won't
work...so i will need to change that also...isn't it? 

One more thing, i tried to move to MS-SQL Server 7.0 , but some of my SQL
queries in my Java Beans (interacting with Databases...)didn't work
properlyso, i dropped plan for immediately moving to SQL Server.. , so,
making the code working on SQL also within 1-2 days seems very risky to me.
So, what can be the reasons for standart SQL stmt incompatibilities in
different databases ??

thanks and regards,
Chintan Shah


-Original Message-
From: Jim Cheesman [mailto:[EMAIL PROTECTED]]
Sent: Thursday, October 18, 2001 8:15 PM
To: [EMAIL PROTECTED]
Subject: RE: URGENT - Tomcat Crashing Frequently Dr. Watson Error


At 04:33 PM 18/10/01, you wrote:
Hi,

Thanks for your reply... then what should i do ? Still my problem is
open...
exactly which driver should I use...and where it is  available...(which
should be freely available, should allow my code to work with that also
without changes, and easily implementable...) ...as within  next two days
I've to launch the application.

I searched for the JDBC drivers on net... I found some of them.. (from
Merant, iNetSoftwareand some others...) , but they are costly... isn't
any option available from Sun itself???

Within short span..i'm planning to move from MS-Access 2000 to MS-SQL
Server
7.0, so, it should be compatible for both..


I'd move it right away to MSSQL - access isn't really a production 
database - more of a home one. Then download the MS drivers from Microsoft 
- see the current/recent thread on the subject for more information.



I agree with Ignacio that it's the jdbc:odbc bridge that's causing the 
problem - not tomcat.





--

   *   Jim Cheesman   *
 Trabajo: 
[EMAIL PROTECTED] - (34)(91) 724 9200 x 2360
   Evil is 
not all bad.




Permanent generation is full - tomcat must be restarted

2001-10-18 Thread Michael Klose

Hi there,

under HP UX we are usin apache 1.3.22 and tomcat 3.3 b1. At least once 
a day we have to restart tomcat.

In apache error log we can find

(233)No buffer space available: accept: (client socket)

In the window we started tomcat in we can find

Permanent generation is full...
Increase MaxPermSize (current capacity is set to: 32768k )

What can we do about this?

Thanks for your help

Best regards
Michael







AW: URGENT - Tomcat Crashing Frequently Dr. Watson Error

2001-10-18 Thread Ralph Einfeldt

For MS SQLServer there are two cheap choices:
http://www.microsoft.com/sql/downloads/2000/jdbc.asp
  (Beta)

ftp://freetds.internetcds.com/pub/freetds_jdbc
  (Not feature complete, but open source)

Netdirect has a free driver for Access and SQL Server
(full featured for 30 Days, after that only one connection)
http://www.j-netdirect.com/Pricing.htm

 -Ursprüngliche Nachricht-
 Von: Shah, Chintan V (Chintan) [mailto:[EMAIL PROTECTED]]
 Gesendet: Donnerstag, 18. Oktober 2001 16:33
 An: '[EMAIL PROTECTED]'
 Betreff: RE: URGENT - Tomcat Crashing Frequently Dr. Watson Error
snip/
 exactly which driver should I use...and where it is  
 available...(which
 should be freely available, should allow my code to work with 
 that also
 without changes, and easily implementable...) ...as within  
 next two days
 I've to launch the application.
snip/
 Within short span..i'm planning to move from MS-Access 2000 
 to MS-SQL Server
 7.0, so, it should be compatible for both..
snip/



Apache Version

2001-10-18 Thread Girosi Marco

Which version of Apache is needed by Tomcat 4 ?

Thanks

Marco Girosi

M2 srl - Torino
Internet Division
Tel. 011 8185735
Cell. 348 4042125




Re: Using a servlet for authorization

2001-10-18 Thread Craig R. McClanahan



On 18 Oct 2001, Dr. Evil wrote:

 Date: 18 Oct 2001 09:04:05 -
 From: Dr. Evil [EMAIL PROTECTED]
 Reply-To: [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Subject: Using a servlet for authorization


 I am trying to use a servlet for authorization like this:

 There is a servlet called authservlet which checks to see if there is
 a valid user object in the session state.  Here is how it is used:

 I have a directory called /secure with a bunch of .jsp files in it.

 There is a mapping in web.xml:

servlet-mapping
   servlet-name
 authservlet
   /servlet-name
   url-pattern
 /secure/*
   /url-pattern
/servlet-mapping

 Every time someone tries to request a page like /secure/hello.jsp, the
 request is instead handed to authservlet.  That part is working fine.
 authservlet gets the request and can decide what to do with it.

 The problem is that I am trying to get authservlet to pass the request
 back to the jsp by doing something like this:

 RequestDispatcher rd =
 request.getRequestDispatcher(/secure/hello.jsp);
 rd.forward(request, response);

 where in this case I have hard-coded in hello.jsp as the target, just
 for testing (obviously I will replace this with something which looks
 at what the real url is).

 The problem is, when I then try to load /secure/hello.jsp, it looks
 like the server goes into an infinite loop.  It never returns the page
 and I end up with a bunch of catalina processes running, which I have
 to kill -9 to get rid of.

It's not the server that went into a loop -- it's your application.

The request dispatcher mechanism uses the same servlet mappings that are
used on the original request.  Therefore, the request dispatcher for
/secure/hello.jsp will select your authentication servlet again, which
will get another request dispatcher, which will ...

The solution to this problem, at least in a Servlet 2.3 environment (like
Tomcat 4), is to use a Filter for performing this kind of authentication.
There was a thread on this over the last couple of days on TOMCAT-USER --
check the archives for some good ideas.


 I'm sure I'm making some simple mistake here.  Any sugestions?

 Thanks


Craig





Re: Problem with sessions and SSL

2001-10-18 Thread Alexandre Victoor

Sorry, I found the response myself to my problem. The problem came from a 
load-balancing between two tomcat servers...

Alex






j_security_check

2001-10-18 Thread Wayne Hefner

I am trying to set up a form based authorization, I have done everything
similar to examples I have found.  My login.jsp appears below:


html
body
h1Login page for examples/h1
form method=POST action=j_security_check 
 Username: input type=text name=j_usernamebr
 Password: input type=password name=j_passwordbr
 br
 input type=submit value=login name=j_security_check
/form

/body
/html

when I submit it doesn't appear that the engine knows about the
j_security_check servlet since it attempts to go to
http://mack-weh/login/j_security_check and displays a page not found error.

Is there anything that needs to be done to activate this servlet.

thanks,

wayne





JNDI configuration in Tomcat 4.0

2001-10-18 Thread Rodrigo Reis

Hi,

I'm having some trouble accessing JNDI through a JSP page. I have a
JSP page with the following code:

%
// Create a new context and perform the lookup
InitialContext ctx = new InitialContext();
ProductHome home = (ProductHome) PortableRemoteObject.narrow(
ctx.lookup(store/ProductHome), ProductHome.class);
%

When I test this page under Tomcat 4.0, I get the following page
(excerpt)

A Servlet Exception Has Occurred
Exception Report:
javax.servlet.ServletException: Cannot instantiate class:
org.apache.naming.java.javaURLContextFactory
at
org.apache.jasper.runtime.PageContextImpl.handlePageException(Unknown
Source)
at org.apache.jsp.scriptlet$jsp._jspService(scriptlet$jsp.java:124)
at org.apache.jasper.runtime.HttpJspBase.service(Unknown Source)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(Unknown
Source)

(...)

Root Cause:
javax.naming.NoInitialContextException: Cannot instantiate class:
org.apache.naming.java.javaURLContextFactory.  Root exception is
java.lang.ClassCastException: org.apache.naming.java.javaURLContextFactory
at
javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:659)
at
javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:250)
at javax.naming.InitialContext.init(InitialContext.java:226)

(...)

What I want to do with the JSPs I'm developing is to access to an
EJB in JBoss. When I add the following code to the beginning of the code
excerpt shown above everything goes well.

// Setup the JNDI properties
System.setProperty(java.naming.factory.initial,
org.jnp.interfaces.NamingContextFactory);
System.setProperty(java.naming.provider.url, bote.convex.pt:1099);

But what I want is to configure these properties outside the JSP
page. From what I've read in the Tomcat 4.0 documentation I should add some
environment entries in server.xml, inside the the Context tag of the
webapp in question. So, I added these 

  Environment name=java.naming.factory.initial 
  type=java.lang.String
value=org.jnp.interfaces.NamingContextFactory/
  Environment name=java.naming.provider.url
  type=java.lang.String value=bote.convex.pt:1099/ 
  Environment name=java.naming.factory.url.pkgs 
  type=java.lang.String
value=org.jboss.naming:org.jnp.interfaces/

Unfortunately with these tags added, the problem remained. Even
setting these environment variables using env-entry tags in the web.xml of
my webapp didn't work.

Does anyone know how this can be done? Thanks in advance.

Rodrigo Reis
IT Engineer

Convex Portugal Lda.
Taguspark
Edifício Ciência II, N.1 - 2º Andar
2780-920 Porto Salvo - Portugal

T.(351) 21 422 92 00
F.(351) 21 421 37 87



 winmail.dat


RE: How to work around jk_nt_service bug,

2001-10-18 Thread Jim Urban

This sounds like exactly what I am looking for.  As soon as I can, I will
download and install it.  Thanks for providing this solution to a problem
that has caused us Win32 users much grief.  Maybe you can get the
Apache/Tomcat people to provide a link to your page from within the Tomcat
documentation page.

Jim

-Original Message-
From: Beat Friedli [mailto:[EMAIL PROTECTED]]
Sent: Thursday, October 18, 2001 9:44 AM
To: [EMAIL PROTECTED]
Subject: AW: How to work around jk_nt_service bug,


I'm using http://www.alexandriasc.com/software/JavaService/index.html. You
find examples for tomcat 3.x and 4.x both work very well. Also the
combination with both iis is possible.


Beat Friedli


--


That's very strange, cause it worked perfectly for me, and I had the
same problem you have. Where did you add the -Xrs? It has to be in the
wrapper.properties file. The only difference between our configurations
is that I ran Tomcat stand alone...does that make a difference?

-Original Message-
From: Ylan Segal [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, October 17, 2001 8:46 PM
To: [EMAIL PROTECTED]
Subject: RE: How to work around jk_nt_service bug,


Thanks for the response.. but that did not work.
The problem is that the service is not failing, just it is being stopped
on
logout of the user (with administrator user).
I also tried the -Xrs in the wrapper.properties as suggested in another
thread in the list, but with no luck.

Anyone has any other ideas?

Thanks.

-Original Message-
From: Bryan Lipscy [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, October 17, 2001 11:34 AM
To: [EMAIL PROTECTED]
Subject: RE: How to work around jk_nt_service bug,


Set the service to restart.

Start - Settings - Control Panel - Administrative Tools - Services
-

Tomcat (or whatever you named it) - Recovery

Set First Failure, Second Failure,  Subsequent Failure to
Restart
the service






-Original Message-
From: Ylan Segal [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, October 17, 2001 9:47 AM
To: [EMAIL PROTECTED]
Subject: How to work around jk_nt_service bug,


Hi guys,

I am experiencing the porblem mentioned in the docs with jdk 1.3.1
using
jk_nt_service where tomcat stops (3.2.3) if the user logs out.

I can't roll back to jdk 1.2 because I need classes in 1.3.1. How
can I work
around this?

All this is running on windows 2000/ IIS 5. Would it help if I
set up tomcat
as in-process?

Thanks for your help.

Ylan Segal.




_
Downloaden Sie MSN Explorer kostenlos unter http://explorer.msn.de/intl.asp





Re: EJB Sevlets HOW-TO???

2001-10-18 Thread Craig R. McClanahan



On Thu, 18 Oct 2001, David Treves wrote:

 Date: Thu, 18 Oct 2001 17:01:58 +0200
 From: David Treves [EMAIL PROTECTED]
 Reply-To: [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Subject: EJB  Sevlets HOW-TO???

 Hi,

 I have installed Tomcat 4 on my win2000 box. The issue is how to get
 references to EJB objects from within a servelt. I know that Tomcat doesn't
 have the J2EE packages (besides the servlet API), so I added the J2EE jar
 file to $CATALINA_HOME\lib folder.


That's not going to work, because Tomcat is STILL not an EJB server.

If you want to use the J2EE RI (which includes Tomcat and an EJB
container), then you have to follow the processes defined in the J2EE RI's
documentation for building and deploying web applications on it.

Craig




RE: URGENT - Tomcat Crashing Frequently Dr. Watson Error

2001-10-18 Thread Jim Cheesman

At 04:57 PM 18/10/01, you wrote:
hi, thanks for guidance...

Is the microsoft driver reliable and stable ??


So far it seems to be.

  will it work for MS-Access
and SQL Server both ?

No idea, though I doubt it. And I doubt that you can find a decent driver 
for access - I can't imagine that there's much of a market for one.


And i hope, it won't need major
configurations/setting/changes

Only the database URL, user and password.


which need to keep the application again
under observation for a long time.. and in that case, what about existing
JDBC ODBC driver installed with JDK 1.3 (i.e. both the drivers installed
simultaneously won't create any problem ??).

Not a problem as the URL is different, as is the class name.




And how many changes do i need to do in my code... ??
i.e. Class.forName(sun.jdbc.odbc.JdbcOdbcDriver).newInstance(); won't
work...so i will need to change that also...isn't it?


Yes. But then have you really hard coded in the driver class name?




One more thing, i tried to move to MS-SQL Server 7.0 , but some of my SQL
queries in my Java Beans (interacting with Databases...)didn't work
properlyso, i dropped plan for immediately moving to SQL Server.. , so,
making the code working on SQL also within 1-2 days seems very risky to me.
So, what can be the reasons for standart SQL stmt incompatibilities in
different databases ??

What kind of queries? You cannot guarantee that the database will be the 
same, or even that it will behave in the same way (an update that affects 
no rows may throw a SQLException with one db, while another doesn't 
care...) You'll have to test reasonably extensively.


No, changing to MS SQL in 1-2 days is not a good idea. But nor is going to 
market using jdbc:odbc and access - and if the latter is exploding on a 
regular basis, you might have to.


Jim







--

   *   Jim Cheesman   *
 Trabajo: 
[EMAIL PROTECTED] - (34)(91) 724 9200 x 2360
   Evil is 
not all bad.





Re: Which connection pool class to use?

2001-10-18 Thread Cory Omand

I have used the JavaExchange DbConnectionBroker class extensively, and find that it is 
very easy to use - especially for servlets.  Check it out:

http://javaexchange.com/

C.

Dr. Evil wrote:
 
 Hi, I am using Tomcat 4 and Postgres 7.1.3 for a custom taglibs
 project.  Postgres has some JDBC 2.0 support but it doesn't seem to
 have connection pool support.  There seem to be a ton of connection
 pool classes out there.  Does anyone have a recomendation?  Something
 easy to use for a java newbie?
 
 Thanks

-- 
===
 Cory C. Omand - Test Engineer Direct: 510.574.6096
 Sun Microsystems Fax: 510.774.6194
 World Wide Operations  Pager: 510.774.PAGE (7423)
 Newark, CA  USA   [PIN - 5107742570]
===



Re: EJB Sevlets HOW-TO???

2001-10-18 Thread phillipmastroianni

I am no expert, so I may be wrong.  You may want to look at JBoss.org.  
This is a open source container which includes among other things EJB.  
I believe it is intended to work with a servlet container such as 
Tomcat.

- Original Message -
From: David Treves [EMAIL PROTECTED]
Date: Thursday, October 18, 2001 8:01 am
Subject: EJB  Sevlets HOW-TO???

 Hi,
 
 I have installed Tomcat 4 on my win2000 box. The issue is how to get
 references to EJB objects from within a servelt. I know that 
 Tomcat doesn't
 have the J2EE packages (besides the servlet API), so I added the 
 J2EE jar
 file to $CATALINA_HOME\lib folder.
 
 Ever since it is impossible to run a servlet in that container, 
 which makes
 sense since there are duplicated packages in it's CLASSPATH.
 
 My question is how to have the EJB API available to the container, yet
 prevent that ambiguity with the servlet API?
 
 
 Maybe I am doing something wrong... where can I read about it? Or 
 can anyone
 send a TODO list?
 
 :o)
 
 Thanks for your time!
 David.
 
 




RE: URGENT - Tomcat Crashing Frequently Dr. Watson Error

2001-10-18 Thread Shah, Chintan V (Chintan)

Hi,

On Microsoft site (url given below...), it says that the MS-SQLServer JDBC
driver is for SQL Server 2000, Windows 2000-sp2/ Windows XP, Linux, HP-UX,
Solaris OS, AIX ...

But, as of now, i'm supposed to use Win NT 4.0 workstation only as the
serverwill this driver work with MS-Access 2000/SQL Server 7.0 with Win
NT 4.0 Workstation as the server ??

thanks and regards,
Chintan Shah


-Original Message-
From: Ralph Einfeldt [mailto:[EMAIL PROTECTED]]
Sent: Thursday, October 18, 2001 8:31 PM
To: [EMAIL PROTECTED]
Subject: AW: URGENT - Tomcat Crashing Frequently Dr. Watson Error


For MS SQLServer there are two cheap choices:
http://www.microsoft.com/sql/downloads/2000/jdbc.asp
  (Beta)

ftp://freetds.internetcds.com/pub/freetds_jdbc
  (Not feature complete, but open source)

Netdirect has a free driver for Access and SQL Server
(full featured for 30 Days, after that only one connection)
http://www.j-netdirect.com/Pricing.htm

 -Ursprüngliche Nachricht-
 Von: Shah, Chintan V (Chintan) [mailto:[EMAIL PROTECTED]]
 Gesendet: Donnerstag, 18. Oktober 2001 16:33
 An: '[EMAIL PROTECTED]'
 Betreff: RE: URGENT - Tomcat Crashing Frequently Dr. Watson Error
snip/
 exactly which driver should I use...and where it is  
 available...(which
 should be freely available, should allow my code to work with 
 that also
 without changes, and easily implementable...) ...as within  
 next two days
 I've to launch the application.
snip/
 Within short span..i'm planning to move from MS-Access 2000 
 to MS-SQL Server
 7.0, so, it should be compatible for both..
snip/



setting default pages for Tomcat

2001-10-18 Thread Durham David Cntr 805CSS/SCBE

I'm using jakarta-tomcat-3.2.3 and I'm trying to setup an application so
that index.jsp is the default page for requests to a directory, e.g.
http://localhost/context/   I need this request to return
http://localhost/context/index.jsp.   I know that I could put an
index.html file with a redirector, but i would rather not.  Is there
anyway to configure tomcat with default pages?




David Durham
Programmer Analyst, NCI Information Systems
805th AMC / SCBE 
(618) 256 - 5264



Re: JAAS not working any more with Tomcat 4.0 (!?)

2001-10-18 Thread Antony Bowesman

Markus Kerber wrote:
 
 Hi all,
 
 when trying to perfom a JAAS authentification from within servlets I
 get the attached error message. Funny enough the same code works with
 Tomcat 3.2.x but not with Tomcat 4.0! The code snippet I use for the
 authentification is:

I just happened to be doing the same thing today and have found the same
problem.  The following post on the Java-security group shows the
problem and why it is probably not working.

http://archives.java.sun.com/cgi-bin/wa?A2=ind0108L=java-securityP=R4789

Haven't got around to looking at it but if you beat me to getting it
working let me know and I'll do the same.

Rgds
-- 
Antony Bowesman
[EMAIL PROTECTED]



RE: How to work around jk_nt_service bug,

2001-10-18 Thread Ylan Segal



 That's very strange, cause it worked perfectly for me, and I had the
 same problem you have. Where did you add the -Xrs? It has to be in the
 wrapper.properties file. The only difference between our configurations
 is that I ran Tomcat stand alone...does that make a difference?


The solution does work... I just was missing a space in the
wrappers.properties file. Everything is working fine now.,

Thanks.

Ylan Segal

-- Failure is not an option, it comes bundled with your Microsoft product





RE: multipart requests

2001-10-18 Thread James Yap


If you don't have a copy but would like to have a peek at the examples,
here's the link
http://www.servlets.com/jservlet2/examples/index.html


 It's an O'Reilly book by Hunter  Crawford. The O'Reilly servlet
 package (com.oreilly.servlet) is the code
 that goes along with the book.


 -Original Message-
 From: Matt Dilley [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, October 18, 2001 6:34 AM
 To: [EMAIL PROTECTED]
 Subject: Re: multipart requests


 Mark Muffett wrote:

Matt

I used the O'reilly packages and they worked fine (I did the example
from Java Servlet Programming, then adapted it) - what's your
conguration and what errors do you get ?

Mark Muffett

- Original Message -
From: Matt Dilley [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, October 17, 2001 3:24 PM
Subject: multipart requests


hi

Does anyone know where I can get hold of a multipart request servlet
that will allow me to upload .jpg and .gif image files to the jsp
server?

I have tried the o'reilly packages, but it always failes to upload any
image files

Many thanks

Matt




 java servlet programming?
 where can I find that?






RE: Apache Version

2001-10-18 Thread Kemp Randy-W18971

Any version can be used, but I recommend to use the latest, stable version.

-Original Message-
From: Girosi Marco [mailto:[EMAIL PROTECTED]]
Sent: Thursday, October 18, 2001 10:01 AM
To: 
Subject: Apache Version


Which version of Apache is needed by Tomcat 4 ?

Thanks

Marco Girosi

M2 srl - Torino
Internet Division
Tel. 011 8185735
Cell. 348 4042125



How to change Tomcat default port from 8080 to standard port 80?

2001-10-18 Thread Miao, Franco CAWS:EX

How to change Tomcat default port from 8080 to standard port 80?

Thanks!

Franco 



RE: EJB Sevlets HOW-TO???

2001-10-18 Thread Randy Layman


Someone posted this message on how to connect Tomcat to JBoss.
Maybe it has the information you need?

http://home.planet.nl/~cancr001/

Randy

 -Original Message-
 From: David Treves [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, October 18, 2001 11:02 AM
 To: [EMAIL PROTECTED]
 Subject: EJB  Sevlets HOW-TO???
 
 
 Hi,
 
 I have installed Tomcat 4 on my win2000 box. The issue is how to get
 references to EJB objects from within a servelt. I know that 
 Tomcat doesn't
 have the J2EE packages (besides the servlet API), so I added 
 the J2EE jar
 file to $CATALINA_HOME\lib folder.
 
 Ever since it is impossible to run a servlet in that 
 container, which makes
 sense since there are duplicated packages in it's CLASSPATH.
 
 My question is how to have the EJB API available to the container, yet
 prevent that ambiguity with the servlet API?
 
 
 Maybe I am doing something wrong... where can I read about 
 it? Or can anyone
 send a TODO list?
 
 :o)
 
 Thanks for your time!
 David.
 



RE: j_security_check

2001-10-18 Thread Randy Layman


You need to have your j_security_check URL from the root of the
WEBAPP.  For example, you need to post the form to
/examples/j_security_check in the examples webapp.  Your error message
implies to me that the login form in in the login directory.  You would want
your form's action to be ../j_security_check in this case.

Randy


 -Original Message-
 From: Wayne Hefner [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, October 18, 2001 11:23 AM
 To: [EMAIL PROTECTED]
 Subject: j_security_check
 
 
 I am trying to set up a form based authorization, I have done 
 everything
 similar to examples I have found.  My login.jsp appears below:
 
 
 html
 body
 h1Login page for examples/h1
 form method=POST action=j_security_check 
  Username: input type=text name=j_usernamebr
  Password: input type=password name=j_passwordbr
  br
  input type=submit value=login name=j_security_check
 /form
 
 /body
 /html
 
 when I submit it doesn't appear that the engine knows about the
 j_security_check servlet since it attempts to go to
 http://mack-weh/login/j_security_check and displays a page 
 not found error.
 
 Is there anything that needs to be done to activate this servlet.
 
 thanks,
 
 wayne
 
 



Re: Problems compiling mod_webapp on AIX

2001-10-18 Thread John Easton

Thanks Pier,  I'm a lot closer now.  Looks like pretty much everything compiled,
but when apxs is called it dies now.  I've had problems with shared modules on
AIX in the past, but unfortunately this is way over my head!  Here's the error:

make[]: Invoking make  build
{ APXS_LDFLAGS_SHLIB=`/www/apache_portal/bin/apxs -q LDFLAGS_SHLIB`
-lm -liconv -lnsl -ldl ;  APXS_LDFLAGS_SHLIB=`/usr/bin/echo
${APXS_LDFLAGS_SHLIB}` ;  APXS_CFLAGS=`/www/apache_portal/bin/apxs -q CFLAGS`
-g -O2  -g -O2-D_USE_IRS -U__STR__ -D_THREAD_SAFE
-I/www/java/webapp-module-20011017/apr/include
-I/www/java/webapp-module-20011017/include   ;  APXS_CFLAGS=`/usr/bin/echo
${APXS_CFLAGS}` ;  /www/apache_portal/bin/apxs  -S CFLAGS=${APXS_CFLAGS}  -S
LDFLAGS_SHLIB=${APXS_LDFLAGS_SHLIB}  -o mod_webapp.so  -c mod_webapp.c
/www/java/webapp-module-20011017/lib/libwebapp.a
/www/java/webapp-module-20011017/lib/libapr.a ;  }
gcc -DAIX=43 -DUSE_PTHREAD_SERIALIZED_ACCEPT -U__STR__ -DAIX_BIND_PROCESSOR
-DUSE_HSREGEX -DUSE_EXPAT -I../lib/expat-lite -g -O2 -g -O2 -D_USE_IRS -U__STR__
-D_THREAD_SAFE -I/www/java/webapp-module-20011017/apr/include
-I/www/java/webapp-module-20011017/include -fpic -DSHARED_MODULE
-I/www/apache_portal/include  -c mod_webapp.c
cc1: warning: -fpic ignored for AIX (all code is position independent)
ld -H512 -T512 -bhalt:4 -bM:SRE -bnoentry
-bI:/www/apache_portal/libexec/httpd.exp -lc -lm -liconv -lnsl -ldl -o
mod_webapp.so mod_webapp.o /www/java/webapp-module-20011017/lib/libwebapp.a
/www/java/webapp-module-20011017/lib/libapr.a
ld: 0711-244 ERROR: No csects or exported symbols have been saved.
apxs:Break: Command failed with rc=8
make: 1254-004 The error code from the last command is 1.


Stop.
make: 1254-004 The error code from the last command is 2.


Stop.
make: 1254-004 The error code from the last command is 2.

Any ideas?

Thanks,
John



Pier Fumagalli wrote:

 John Easton at [EMAIL PROTECTED] wrote:

  configure runs fine (configure --with-apxs=/path/to/apxs), but when I
  try make, it blows up immediately with the following:

 Can you try the latest daily snapshot from http://nagoya.apache.org/~pier/ ?
 Thanks!

 Pier




RE: cancelled request(more info)

2001-10-18 Thread Cox, Charlie

I noticed in the iis_redirect.log(debug on) that I get the following error
when I click cancel for my download.
[jk_isapi_plugin.c (355)]: jk_ws_service_t::write, WriteClient failed
[jk_ajp12_worker.c (596)]: ajpv12_handle_response, error writing back to
server

But then at the time that the download would have completed, I get the
following in the log(no more 'write' messages in between)

[jk_ajp12_worker.c (590)]: ajpv12_handle_response, response body is done
[jk_ajp12_worker.c (602)]: ajpv12_handle_response done
[jk_isapi_plugin.c (551)]: HttpExtensionProc service() returned OK
[jk_ajp12_worker.c (163)]: Into jk_endpoint_t::done

Does the isapi filter within IIS notify Tomcat that it gets this error? It
doesn't appear to be sending the error back to tomcat.

Or could it be that since I am writing so much to the output stream that
tomcat does not get the opportuninty to check for errors after it sends data
to the isapi filter?

Charlie

 -Original Message-
 From: Cox, Charlie [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, October 18, 2001 10:50 AM
 To: '[EMAIL PROTECTED]'
 Subject: RE: cancelled request
 
 
 my problem is that I can't distinguish a valid request from a 
 cancelled one.
 Tomcat in some instances stops my servlet exeution and in 
 others lets it go
 as if I didn't cancel.
 There doesn't seem to be a time difference between 
 downloading 50MB and the
 time it would have taken to complete the download had I not clicked
 'cancel'.
 
 I would have expected the socket to be closed and an IO 
 exception to be
 thrown in my servlet - but if the servlet just stops as it 
 sometimes does,
 that's ok too.
 
 Charlie
 
  -Original Message-
  From: Barry White [mailto:[EMAIL PROTECTED]]
  Sent: Wednesday, October 17, 2001 5:50 PM
  To: [EMAIL PROTECTED]
  Subject: Re: cancelled request
  
  
  I have never done anything like that but I was thinking you 
  could use some
  kind of timeout in your servlet.  Try doing this in your 
  while loop.  You
  could also check bytesread and make sure it is changing.
  
  hope this helps,
  Barry
  - Original Message -
  From: Cox, Charlie [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Sent: Wednesday, October 17, 2001 4:32 PM
  Subject: cancelled request
  
  
   I didn't see anything about this in the archives, so 
  hopefully someone can
   help me out here.
  
   TC 3.2.1/IIS 5/W2K
   I am using a servlet to serve a large file (50MB) and 
  everything works
  fine
   if it completes as requested. But if the user clicks 
 'cancel', I get
   different results from Tomcat. Sometimes the servlet stops 
  running where
  it
   is, as if the thread is interrupted, while other times it 
 continues
  running
   like nothing happened. In the both cases the download box 
  disappears from
   the browser. Netscape 6.1,4.7 and IE 5.5 all act the same 
  way. (IE 5.0 has
  a
   problem here, but I have other problems with it too).
  
   here's the code in my servlet providing the file
  
   resp.setContentType(application/octet-stream; 
 name=somefile.exe;);
   resp.setHeader(Content-Disposition,
  attachment;filename=somefile.exe;);
   resp.setHeader(Content-Length, 
 String.valueOf(filelength) + ;);
  
   InputStream isDownload;
   isDownload = getServletContext().getResourceAsStream(filename);
   BufferedInputStream bisDownload = new
  BufferedInputStream(isDownload,2048);
   BufferedOutputStream bosDownload = new
   BufferedOutputStream(resp.getOutputStream());
   byte[] buff = new byte[2048];
   int bytesRead;
  
   while(-1 != (bytesRead = bisDownload.read(buff, 0, buff.length)))
   {
   bosDownload.write(buff, 0, bytesRead);
   }
   bosDownload.close();
   bisDownload.close();
  
  
   The reason that this is an issue is that I send an email 
  upon completion
  of
   this download, and it shouldn't be sent if the user clicks 
  'cancel' but it
   is being sent when the servlet continues processing. I've 
  also wrapped
  this
   code is a try/catch and no exception/error is ever thrown.
  
   Charlie
  
  
 



how to use *.jsp w/ mod_webapp?

2001-10-18 Thread Norihisa Washitake

Hi,
I've built mod_webapp.so at last.

When i was using mod_jk, my httpd.conf included:
 JkMount /*.jsp ajp12
to enable JSP on apache.

Now what shoud I rewrite that to?

Using WebAppDeploy directive?
If so, please give me an example.

---
Truly Yours,
Norihisa Washitake [EMAIL PROTECTED]




Re: how unique is the session key?

2001-10-18 Thread pixel

i was hoping i could use the session id instead of doing the research, 
coding and testing required to create unique ids for this part of the 
project. [i.e., i'm trying to do to much in too little time :)]  

can anyone point me to a few good resources or techniques for generating 
unique client ids?

thanks,

~scott

Craig R. McClanahan wrote:


On Thu, 18 Oct 2001, Scott Ahten wrote:

Date: Thu, 18 Oct 2001 00:41:31 -0400
From: Scott Ahten [EMAIL PROTECTED]
Reply-To: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: how unique is the session key?

i'm planning on implementing a 'remember my login' feature in a project
i'm working on. is the sesssion key unique enough to be used as a
persistant cookie to uniquly identify clients across multiple sessions?


No.  You are absolutely guaranteed that session ids will be reused,
because they are based on a random number generator and there are only so
many possible numbers.

if so, does this just apply to tomcat or is this part of the spec and
container independent?


Why do you need anything other than assigning your own ids, and making
sure that you never assign the same id more than once?

thanks,

~scott




Craig










RE: How to change Tomcat default port from 8080 to standard port 80?

2001-10-18 Thread Leo Bynum




Try this:


open the server.xml file and search for 8080. 


Replace the line so 8080 is replaced with 80 like this:


   !-- Define a non-SSL HTTP/1.1 Connector on port 8080 --
Connector className=org.apache.catalina.connector.http.HttpConnector
   port=80 minProcessors=5 maxProcessors=75
   enableLookups=true redirectPort=8443
   acceptCount=10 debug=0 connectionTimeout=6/


-Original Message-
From: Miao, Franco CAWS:EX [mailto:[EMAIL PROTECTED]]
Sent: Thursday, October 18, 2001 8:59 AM
To: '[EMAIL PROTECTED]'
Subject: How to change Tomcat default port from 8080 to standard port
80?


How to change Tomcat default port from 8080 to standard port 80?

Thanks!

Franco 



RE: Permanent generation is full - tomcat must be restarted

2001-10-18 Thread Larry Isaacs

The Permanent generation relates to the JVM.  Here
are a couple of links for more information:

http://java.sun.com/docs/hotspot/VMOptions.html
http://java.sun.com/docs/hotspot/gc/index.html

Hope this helps.
Larry

 -Original Message-
 From: Michael Klose [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, October 18, 2001 11:01 AM
 To: [EMAIL PROTECTED]
 Cc: [EMAIL PROTECTED]
 Subject: Permanent generation is full - tomcat must be restarted
 
 
 Hi there,
 
 under HP UX we are usin apache 1.3.22 and tomcat 3.3 b1. At 
 least once 
 a day we have to restart tomcat.
 
 In apache error log we can find
 
 (233)No buffer space available: accept: (client socket)
 
 In the window we started tomcat in we can find
 
 Permanent generation is full...
 Increase MaxPermSize (current capacity is set to: 32768k )
 
 What can we do about this?
 
 Thanks for your help
 
 Best regards
 Michael
 
 
 
 



RE: multipart requests

2001-10-18 Thread Mangi, Rick

But keep in mind that the license for the com.oreilly.servlet code requires
that you own the book...

-Original Message-
From: James Yap [mailto:[EMAIL PROTECTED]]
Sent: Thursday, October 18, 2001 11:56 AM
To: [EMAIL PROTECTED]
Subject: RE: multipart requests



If you don't have a copy but would like to have a peek at the examples,
here's the link
http://www.servlets.com/jservlet2/examples/index.html


 It's an O'Reilly book by Hunter  Crawford. The O'Reilly servlet
 package (com.oreilly.servlet) is the code
 that goes along with the book.


 -Original Message-
 From: Matt Dilley [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, October 18, 2001 6:34 AM
 To: [EMAIL PROTECTED]
 Subject: Re: multipart requests


 Mark Muffett wrote:

Matt

I used the O'reilly packages and they worked fine (I did the example
from Java Servlet Programming, then adapted it) - what's your
conguration and what errors do you get ?

Mark Muffett

- Original Message -
From: Matt Dilley [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, October 17, 2001 3:24 PM
Subject: multipart requests


hi

Does anyone know where I can get hold of a multipart request servlet
that will allow me to upload .jpg and .gif image files to the jsp
server?

I have tried the o'reilly packages, but it always failes to upload any
image files

Many thanks

Matt




 java servlet programming?
 where can I find that?





Capturing all errors in Tomcat

2001-10-18 Thread James Hughes

Hi,

I am using tomcat 3.2.1 with apache 1.3.19

I want either tomcat (preferably) or apache to capture all my HTTP 500 and
404 errors and output a standard piece of html that I have.

I understand that for tomcat to do this i need the following in my web.xml:

error-page
  error-code500/error-code
  locationmySpecialErrorPage.html/location
/error-page
error-page
  error-code404/error-code
  locationmySpecialErrorPage.html/location
/error-page

I have this, but tomcat is not displaying my page when I type a non-existent
url into my browser.

Does anybody have any ideas what I am doing wrong or have at least the
definitive answer to error handling in tomcat 3.2.1?

Thanks in advance
J




Re: How to change Tomcat default port from 8080 to standard port 80?

2001-10-18 Thread pixel

visit the following url for docs on how to configure the http1.1 
connector

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

based on this information, you should end up with an entry like this in 
your server.xml file [located in the /config directory in tomcat home]

!-- Define a non-SSL HTTP/1.1 Connector on port 80 --
Connector className=org.apache.catalina.connector.http.HttpConnector
   port=80 minProcessors=5 maxProcessors=75
   enableLookups=true redirectPort=8443
   acceptCount=10 debug=0 connectionTimeout=6/
!-- Note : To disable connection timeouts, set connectionTimeout value
 to -1 --

~scott

Miao, Franco CAWS:EX wrote:

How to change Tomcat default port from 8080 to standard port 80?

Thanks!

Franco 








Catalina as an NT Service

2001-10-18 Thread Frank Lawlor

I've seen several queries about running Catalina as an NT
service but didn't find any clear replies, at least regarding
using the jk_nt_service.exe.

I got it working, but it was all pure guesswork.  Maybe
someone who knows something about this can add some
information or, BETTER STILL, add some information to
Catalina about running it as an NT service.

I started with the directions for Tomcat 3.2 and jk_nt_service.exe
http://jakarta.apache.org/tomcat/tomcat-3.2-doc/NT-Service-howto.html

I made the following additions/changes to wrapper.properties:

The only thing I found I needed in the classpath was bootstrap.jar:
wrapper.class_path=$(wrapper.tomcat_home)\bin\bootstrap.jar

The startup class is different:
wrapper.startup_class=org.apache.catalina.startup.Bootstrap

I added some flags and other changes to the startup command.
I didn't test to see if these are really all needed.  The SAXParser
one is probably only needed if your app uses it and you don't 
explicitly name the parser class.  The -Xrs switch is probably only 
needed for JDK 1.3.1 to keep the service from dying (??)   
Note the start on the end.
Broken across multiple lines here for clarity:
wrapper.cmd_line=$(wrapper.javabin) 
   -Xrs -Dorg.xml.sax.driver=org.apache.xerces.parsers.SAXParser
   -Dcatalina.home=C:\jakarta-tomcat-4.0-rc2
   -classpath $(wrapper.class_path) 
   $(wrapper.startup_class)
-config $(wrapper.server_xml)  start

Frank Lawlor
Athens Group, Inc.
(512) 345-0600 x151
Athens Group, an employee-owned consulting firm integrating technology
strategy and software solutions.






Tomcat 4.0 Tyrex configuration

2001-10-18 Thread William Au

I am running Tomcat 4.0 and would like to use the bundled Tyrex
for database connection pooling.  I followed the Tomcat documentation
and was able to make things work.

But how do I configure Tyres with additional parameters like the
maximum number of connections in the pool?


Bill







Catalina as an NT Service - WebDAV

2001-10-18 Thread Frank Lawlor

I just discovered something else:

WebDAV failed to start (sealing violation).  I added:
wrapper.class_path=$(wrapper.tomcat_home)\server\lib\jaxp.jar
wrapper.class_path=$(wrapper.tomcat_home)\server\lib\crimson.jar
wrapper.class_path=$(wrapper.tomcat_home)\server\lib\servlets-webdav.jar

and that seemed to fix it.  Again, not all these may be necessary
and there may be others that are for reasons I haven't discovered.

Frank Lawlor
Athens Group, Inc.
(512) 345-0600 x151
Athens Group, an employee-owned consulting firm integrating technology
strategy and software solutions.






two questions

2001-10-18 Thread Henry

Tomcat 3.2.3 runs wrong on my computer, and when it starts up,
the new windows generates a bunch of errors and disappear before I
was able to see clearly what the errors are. These are not logged
in and log files. How can i start tomcat in the original window,
or where can i find the run time error log?

second question is how can i specify username/password for Oracle in the
same way as MySQL does like below?

connectionURL=jdbc:mysql://localhost/authority?user=test;password=test





RE: j_security_check

2001-10-18 Thread andrewdrobson

Hi,
  I assume you are running a web server in front of 
tomcat in which case you need to tell your web 
server to delegate handling of j_security_check to
tomcat. With apache you would add following to httpd.conf

JkMount /login/j_security_check ajp13 (or ajp12 depending on 
connector protocol you are using)

Hope this helps
andrew

On 18-Oct-2001 Wayne Hefner wrote:
 I am trying to set up a form based authorization, I have done everything
 similar to examples I have found.  My login.jsp appears below:
 
 
 html
 body
 h1Login page for examples/h1
 form method=POST action=j_security_check 
  Username: input type=text name=j_usernamebr
  Password: input type=password name=j_passwordbr
  br
  input type=submit value=login name=j_security_check
 /form
 
 /body
 /html
 
 when I submit it doesn't appear that the engine knows about the
 j_security_check servlet since it attempts to go to
 http://mack-weh/login/j_security_check and displays a page not found error.
 
 Is there anything that needs to be done to activate this servlet.
 
 thanks,
 
 wayne




RE: How to change Tomcat default port from 8080 to standard port 80?

2001-10-18 Thread Conor . Power

You must change the port number in server.xml.

However you will need to run Tomcat as root to bind to this port. I don't
think you want to run Tomcat as root in a a production environment. As far
as I know there is no way to start Tomcat as root initially so that you can
bind to that port and then switch the user so that the porcess runs under
that user.

A solution is to use Apache as the server on port 80 forwarding requests
onto Tomcat. Apache lets you switch users after binding to port 80.

Conor.

-Original Message-
From: Miao, Franco CAWS:EX [mailto:[EMAIL PROTECTED]]
Sent: Thursday, October 18, 2001 8:59 AM
To: '[EMAIL PROTECTED]'
Subject: How to change Tomcat default port from 8080 to standard port
80?


How to change Tomcat default port from 8080 to standard port 80?

Thanks!

Franco 



Tomcat 4.0 and IIS

2001-10-18 Thread Clark Richey

Is it possible to tie Tomcat 4.0 into IIS? I have Tomcat 4.0  running alone
with no problems but I can find no documentation on integration with IIS.
Thanks!



Transfer-Encoding in Tomcat

2001-10-18 Thread Avery Buffington


I've been reading the changes from 3.2 to 3.3 and I see that support for
transfer-encoding has been added to mod_jk.  Does this effect the end
browsers at all?  It seems to me that the only thing that would use
mod_jk would be apache to hand of the request to tomcat.  After the jsp
is compiled and returned to apache then apache handles all the content
transfer stuff back to the browser, am I correct in this assumption?

What I'm getting at is some users expierence proxy errors along the
lines of incorrectly formatted chunked messages and such.  I'm
wondering if the problem is related to tomcat, apache, or possibly one
of the other afiliate sites that are pulled from the page.

thanks,

-avery

-- 

Avery Buffington
Portal System Administrator
FundsXpress Financial Network
[EMAIL PROTECTED]


Let's call it an accidental feature. --Larry Wall
 S/MIME Cryptographic Signature


update: Tomcat 4.0.1 IllegalStateException (was NOT in 4.0 final)

2001-10-18 Thread pero

Hi,

I found out that this happens mostly when using pageContext.forward(). I use
this method before writing any html-code and I do a return; afterwards.

Has anybody any clue?

cheers,
pero



 -Original Message-
 From: pero [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, October 18, 2001 1:45 PM
 To: [EMAIL PROTECTED]
 Subject: Tomcat 4.0.1 IllegalStateException (was NOT in 4.0 final)


 Hi,

 after updating to TC 4.0.1 I occasionally get the following exception:

 StandardWrapperValve[jsp]: Servlet.service() for servlet jsp
 threw exception
 java.lang.IllegalStateException
 at
 org.apache.catalina.connector.ResponseFacade.getWriter(ResponseFac
 ade.java:1
 59)
 at
 org.apache.jasper.runtime.JspWriterImpl.initOut(JspWriterImpl.java:166)
 at
 org.apache.jasper.runtime.JspWriterImpl.flushBuffer(JspWriterImpl.
 java:158)
 at
 org.apache.jasper.runtime.JspWriterImpl.flush(JspWriterImpl.java:205)
 at
 org.apache.jasper.runtime.PageContextImpl.release(PageContextImpl.
 java:176)
 at
 org.apache.jasper.runtime.JspFactoryImpl.internalReleasePageContex
 t(JspFacto
 ryImpl.java:198)
 at
 org.apache.jasper.runtime.JspFactoryImpl.releasePageContext(JspFac
 toryImpl.j
 ava:193)
 at org.apache.jsp.page3$jsp._jspService(page3$jsp.java:3393)
 at
 org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
 at
 org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(Jsp
 Servlet.ja
 va:202)
 at
 org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:382)
 at
 org.apache.jasper.servlet.JspServlet.service(JspServlet.java:474)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
 at
 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(A
 pplication
 FilterChain.java:247)
 at
 org.apache.catalina.core.ApplicationFilterChain.doFilter(Applicati
 onFilterCh
 ain.java:193)
 at
 org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapp
 erValve.ja
 va:243)
 at
 org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipel
 ine.java:5
 66)
 at
 org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.
 java:472)
 at
 org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
 at
 org.apache.catalina.core.StandardContextValve.invoke(StandardConte
 xtValve.ja
 va:201)
 at
 org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipel
 ine.java:5
 66)
 at
 org.apache.catalina.authenticator.AuthenticatorBase.invoke(Authent
 icatorBase
 .java:472)
 at
 org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipel
 ine.java:5
 64)
 at
 org.apache.catalina.valves.CertificatesValve.invoke(CertificatesVa
 lve.java:2
 46)
 at
 org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipel
 ine.java:5
 64)
 at
 org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.
 java:472)
 at
 org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
 at
 org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2344)
 at
 org.apache.catalina.core.StandardHostValve.invoke(StandardHostValv
 e.java:164
 )
 at
 org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipel
 ine.java:5
 66)
 at
 org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispat
 cherValve.
 java:170)
 at
 org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipel
 ine.java:5
 64)
 at
 org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValv
 e.java:170
 )
 at
 org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipel
 ine.java:5
 64)
 at
 org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:462)
 at
 org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipel
 ine.java:5
 64)
 at
 org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.
 java:472)
 at
 org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
 at
 org.apache.catalina.core.StandardEngineValve.invoke(StandardEngine
 Valve.java
 :163)
 at
 org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipel
 ine.java:5
 66)
 at
 org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.
 java:472)
 at
 org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
 at
 org.apache.catalina.connector.http.HttpProcessor.process(HttpProce
 ssor.java:
 1011)
 at
 org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor
 .java:1106
 )
 at java.lang.Thread.run(Thread.java:484)

 It is not bound to a specific page (even if I reload the page
 that cause the
 error the exception does not reoccur) and the page is executed normally
 even if that exception 

RE: two questions

2001-10-18 Thread Donie Kelly

Hi Henry

Use a command prompt to edit tomcat.bat in TOMCAT_HOME/bin

Find a line that looks like:  set _STARTJAVA=start Tomcat 3.2
%JAVA_HOME%\bin\java
And remove the... start Tomcat 3.2

Now run tomcat.bat start and it should start in the same command window. If
it exits you'll still be able to see the errors...

Hope that helps
Donie


 -Original Message-
From:   Henry [mailto:[EMAIL PROTECTED]] 
Sent:   18 October 2001 19:02
To: Tomcat (E-mail)
Subject:two questions

Tomcat 3.2.3 runs wrong on my computer, and when it starts up,
the new windows generates a bunch of errors and disappear before I
was able to see clearly what the errors are. These are not logged
in and log files. How can i start tomcat in the original window,
or where can i find the run time error log?

second question is how can i specify username/password for Oracle in the
same way as MySQL does like below?

connectionURL=jdbc:mysql://localhost/authority?user=test;password=test




Broken pipe message in tomcat.log

2001-10-18 Thread Tony Mueller

Hi,

I'm using Tomcat 3.2 and I get the message:

Context log: path=/rpm Broken pipe /rpm/servlet/rpm.Login
Context log: path=/rpm Broken pipe /rpm/servlet/rpm.Login
Context log: path=/rpm Broken pipe /rpm/servlet/rpm.Login
Context log: path=/rpm Broken pipe /rpm/servlet/rpm.Login

in my tomcat.log file when I try to access my login servlet. 

This only happens occasionally and makes tomcat hang.

I've read the archives and none of the proposed solutions seem to apply
to my situation since I'm not using any connection broker in this servlet.
Also each call to the servlet establishes a connection and then 
disconnects so my problem is not related to a connection timing out due
to any servlet inactivity.

In addition I've checked during this hang to see if I'm running out
of db connections. I'm not.

Also what is interesting, If I wait about 2 minutes the servlet
will finally connect and let my application continue on is merry way 
(much to the annoyance of my users)

I'm sure others are having this problem or have had this problem and 
found a solution.

Thanks 

Tony Mueller




Re: Tc 3.2.3 SSL/HTTPS config

2001-10-18 Thread David Smith

Info on how SSL works is off topic here and there are some very good papers 
on the net on the subject.  I did a short search with Google (search terms: 
SSL encryption protocol) and found a reasonable intro paper from Netsape on 
the subject.  It's at least enough to get your feet wet.

As far as Tomcat is concerned, I use 4.0.1 and can't authoratatively give you 
an answer on the level of SSL encription supported by 3.2.3.  The docs should 
say so somewhere.  I would suggest using the latest stable JDK (not JRE) and 
downloading the latest version of JSSE from Sun since it does not come with 
JDK 1.3.x.  I believe server.xml has instructions on generating a self signed 
cert for Tomcat as well.

On Wednesday 17 October 2001 07:19 pm, you wrote:
 - Message Text -

 Hi All,

 I've got an older Tomcat 3.2.2 installation that's apparently fully
 functional (haven't tried servlets/JSP yet) and I've just set up a new
 Tomcat 3.2.3 installation. Both installations serve their pages just fine.
 ...I realize that someone might tell me to go talk to another group
 regarding these topics but I'm posting here because this audience has to
 _use_ these tools whereas these questions would be lost on other groups
 (like JRE)...

 I'd like to get some more insight related to certificates and encryption
 strength:

 1) When I connect to my new 3.2.3 installation and have my certificate
 read, it reports to the browser that during a Certificate Name Check the
 certificate presented does not contain the correct site name. I'd like to
 know how to avoid this warning message. I also note that I don't get this
 message when I connect to my older 3.2.2 installation, yet the keys were
 created (more or less) the same way (see below). Ideas?

 2) Additionally, the new 3.2.3 installation reports that it's certificate
 uses Export Grade (RC4-Export with 40-bit secret key). After a second
 look, so does the older 3.2.2 installation. I'm not too worried about the
 encryption of the certificate, but this brought up an interesting question
 for which I don't know where to look: what's the actual encryption used
 for communications? I'm a Netscape fan, and eschew IE, and for various
 reasons I only use Netscape 4.7 - it doesn't tell me what the
 communications algorithem or strength is. Any clues where I find this out?
 (I saw that Tomcat with JSSE has a LOT of choices...) Does the Tomcat
 server automatically pick the highest strength encryption available with
 the connecting client? I haven't seen anything on this anywhere and I
 have looked... What gets me thinking here is that I downloaded the full
 strength US versions in every case. If it's going to only use export 40
 bit, what's the point and where's that stronger encryption?

 Certificate details: In installing Tomcat 3.2.2 I ran into a bug in that
 the certificate generator 'keytool' from the JRE in my environ apparantly
 didn't include RSA support. (java version 1.2.2 Solaris VM - build
 Solaris_JDK_1.2.2_06, native threads, sunwjit) . So, I loaded version
 1.3.1 of the Java2 runtime environment and the keytool from that works
 fine. There should be some different flags for specifying what grade
 of key gets generated in each case - I haven't found them yet. ...On my
 new 3.2.3 installation, I ran the keytool that came with Java 1.3.0. The
 certificate served by the 3.2.3 installation reports a bad certificate
 name check, and the one from JRE 1.3.1 doesn't...

 Minor, unrelated point: ${TOMCAT_HOME}/bin/tomcat.sh doesn't seem
 to work properly on my RedHat 6.2 box. On one occasion it crashed the
 shell I was in when I accidentally ran start twice. I suppose it
 could be unrelated but nothing else died. -shrug- I'm not spending any
 time on that one. -smile-

 Thanks for your comments,
 Richard




Cannot open connection conn

2001-10-18 Thread Kemp Randy-W18971

I have set up Tomcat 4.01, mod_webapp, and Apache 1.3.22 on Windows 2000.
What could be causing this error in the Apache error log, in regards to the
Tomcat connection?

[Thu Oct 18 09:50:02 2001] [error] Connection conn cannot connect
[Thu Oct 18 09:50:02 2001] [error] Cannot open connection conn

Tomcat parameters in httpd.conf

LoadModule webapp_module modules/mod_webapp.so

NameVirtualHost *

#
# VirtualHost example:
# Almost any Apache directive may go into a VirtualHost container.
#
#VirtualHost ip.address.of.host.some_domain.com
#ServerAdmin [EMAIL PROTECTED]
#DocumentRoot /www/docs/host.some_domain.com
#ServerName host.some_domain.com
#ErrorLog logs/host.some_domain.com-error_log
#CustomLog logs/host.some_domain.com-access_log common
#/VirtualHost

#VirtualHost _default_:*
#/VirtualHost

VirtualHost *
   ServerName localhost
   WebAppConnection conn warp localhost:8008
   WebAppDeploy examples conn /examples/
   WebAppDeploy onjava conn /onjava/
   WebAppInfo /webapp-info
 /VirtualHost



RE: two questions

2001-10-18 Thread Jim Urban

Open a command window.  Change to the tomcat bin directory and execute
tomcat run.

Jim

-Original Message-
From: Henry [mailto:[EMAIL PROTECTED]]
Sent: Thursday, October 18, 2001 1:02 PM
To: Tomcat (E-mail)
Subject: two questions


Tomcat 3.2.3 runs wrong on my computer, and when it starts up,
the new windows generates a bunch of errors and disappear before I
was able to see clearly what the errors are. These are not logged
in and log files. How can i start tomcat in the original window,
or where can i find the run time error log?

second question is how can i specify username/password for Oracle in the
same way as MySQL does like below?

connectionURL=jdbc:mysql://localhost/authority?user=test;password=test






Re: how to use *.jsp w/ mod_webapp?

2001-10-18 Thread JS

These are the additions I've included in httpd.conf to make mod_webapp serve 
jsp:
LoadModule webapp_module libexec/mod_webapp.so

IfModule mod_webapp.c
WebAppConnection warpConnection warp localhost:8008
WebAppDeploy examples warpConnection /examples/
WebAppDeploy webdav warpConnection /webdav/
/IfModule

make sure the ServerName directive is uncommented.

Hope that helps.

On Thursday 18 October 2001 11:53, you wrote:
 Hi,
 I've built mod_webapp.so at last.

 When i was using mod_jk, my httpd.conf included:
  JkMount /*.jsp ajp12

 to enable JSP on apache.

 Now what shoud I rewrite that to?

 Using WebAppDeploy directive?
 If so, please give me an example.

 ---
 Truly Yours,
 Norihisa Washitake [EMAIL PROTECTED]

-- 
paak, n:A stadium or inclosed playing field. To put or leave (a
a vehicle) for a time in a certain location.
patato, n:  The starchy, edible tuber of a widely cultivated plant.
Septemba, n:The 9th month of the year.
shua, n:Having no doubt; certain.
sista, n:   A female having the same mother and father as the speaker.
tamato, n:  A fleshy, smooth-skinned reddish fruit eaten in salads
or as a vegetable.
troopa, n:  A state policeman.
Wista, n:   A city in central Masschewsetts.
yaad, n:A tract of ground adjacent to a building.
-- Massachewsetts Unabridged Dictionary



problems with JDBC and JSP

2001-10-18 Thread Peter

hi All, I'm having some wierd behavior in a JSP that I can't seem to trace
the cause to. The code is similar to as follows
query = some query
PreparedStatement ps = connection.prepareStatement(query);
ps.setInt(1, some int variable);
ps.setInt(1, some other int variable);
ps.executeUpdate();
ps.close();
//second update
 query2 = new query
ps = connection.prepareStatement(query2);
   ps.setInt(1, some int variablet);
ps.executeUpdate();

however after closing the prepared statement the second everything goes
smoothly except that only nulls get inserted into the second update. I've
checked to make sure that the data gets to the right places before the
insert by checking with System.out.println(some int variable)  however
nothing seems to help.
it's as if the second update never occurs. I'm running a win2k server, with
tomcat 3.2.3 and a MSSQL server 2000, JDK 1.3 any advice is welcome
thanks. -Pete




.zip file in app/WEB-INF/lib

2001-10-18 Thread Henry

when i added the classes12.zip to my classpath for oracle JDBC, fine.
however, i added that zip file to myapp/WEB-INF/lib, it says:
could not find suitable driver

should i add something to web.xml as well?




Bind naming operation failed with JDBC DataSource

2001-10-18 Thread Brian Showalter

I've been trying to get Tomcat 4 and Apache set up to work
together using the mod_webapp connector, and keep running into
this problem that has me stumped.  So far there's only one
message here in the users list that's described the same problem,
but it has no accompanying solution.  I've checked the docs,
searched the user list archives, looked at the source and tried
several different approaches in search of a solution, to no
avail.

I've set up a JDBC datasource in Tomcat's server.xml file, and
made the appropriate resource-env-ref entries in my
application's web.xml file. What's happening is that when I start
up Tomcat, the log file for my application (/InspSched) shows an
error message as follows:

StandardContext[/InspSched]: Bind naming operation failed :
javax.naming.NamingException: Name {0} is already bound in this
Context

Even with this error, I can still connect to port 8080 and run my
application as expected.  Info from the database is displayed as
it should be, which leads me to believe that at least the
datasource is set up properly.  However, when I attempt to start
up Apache, Tomcat's apache_log file shows that a
javax.naming.NamingException: cannot create resource instance
exception is thrown.  My /InspSched app does not work when called
from Apache, but Tomcat's /examples app works fine.

Here are the context lines from my Tomcat server.xml file:

Context path=/InspSched docBase=InspSched debug=0
reloadable=true
  Logger className=org.apache.catalina.logger.FileLogger
prefix=localhost_InspSched_log suffix=.txt timestamp=true
  Resource name=jdbc/InspectionDb
type=com.inet.tds.PDataSource /
  ResourceParams name=jdbc/InspectionDb
parameternamefactory/namevalueorg.apache.naming.factory.BeanFactor
y/value/parameter
parameternameuser/namevaluewebuser/value/parameter
parameternamepassword/namevaluesecret/value/parameter
parameternameserverName/namevalueserver/value/parameter
parameternamedatabaseName/namevalueIntranet/value/parameter
parameternamemaxPoolSize/namevalue5/value/parameter
parameternameloginTimeout/namevalue10/value/parameter
parameternamemode/namevalue65/value/parameter
/ResourceParams
/Context

Here are the relevant lines from my application's web.xml file:

resource-env-ref
 
resource-env-ref-namejdbc/InspectionDb/resource-env-ref-name
 
resource-env-ref-typecom.inet.tds.PDataSource/resource-env-ref-type
/resource-env-ref

And here are the lines from the init() function of the controller
servlet, which is loaded on startup.

Context ctx = null;
try {
   ctx = new InitialContext();
} catch (NamingException e) {
   log(Couldn't build an initial context);
   throw new ServletException(e);
}
try {
   PDataSource pds = (PDataSource)
ctx.lookup(java:comp/env/jdbc/InspectionDb);
} catch (NamingException e) {
   log(JNDI lookup failed);
   throw new ServletException(e);
}

What am I missing?  How can I eliminate that first naming
exception that occurs when an object bind attempt is made?  How
can I determine exactly what object is being bound?  Is this
first exception related to the resource instance exception that
occurs when Apache is started up?

Thanks!





RE: .zip file in app/WEB-INF/lib

2001-10-18 Thread Randy Layman

As mentioned thousands of times before on this list (and probably lots of
times on Oracle's tech support lists and most definitely the servlet
specification), the WEB-INF/lib only automatically loads .jar files.  If you
rename classes12.zip to classes12.jar everything will work fine.

Randy

 -Original Message-
 From: Henry [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, October 18, 2001 4:08 PM
 To: [EMAIL PROTECTED]
 Subject: .zip file in app/WEB-INF/lib
 
 
 when i added the classes12.zip to my classpath for oracle JDBC, fine.
 however, i added that zip file to myapp/WEB-INF/lib, it says:
 could not find suitable driver
 
 should i add something to web.xml as well?
 



Re: Repost: setting default pages for Tomcat

2001-10-18 Thread carlos . chaparro


well i think it must work by default... if it's not, then in the web.xml
configuration file you can set up this in the welcome-file-list just add
a new item...

welcome-file
index.jsp
/welcome-file






RE: WebApp: Error 500 (File: pr_warp.c Line: 434)

2001-10-18 Thread Geoff Howard

I have had a lot of trouble with what seems to be a similar problem and can
add the following observations, but unfortunately, no solution.  I've looked
pretty hard through this and other lists and have found nothing that works.

To clarify, the symptoms I get are: the examples context (and presumably
other) never works correctly through the warp connector -- sometimes the
examples context page hangs, sometimes it gives the 500 error mentioned.
The index page (/examples/servlets/index.html) does not even load.  The
error logs show: 

1) I've noticed that everything works fine if I for testing purposes turn
off images display in my browser options (ie5.5 and netscape 4.7).
Conclusion: images may be the issue.
2) The examples (including images) all work flawlessly going straight to
Tomcat through :8080.
3) Apache works fine for all pages that don't go through warp (doc root set
to apache/htdocs, so static files and images there are fine)
4) My co-worker had no such trouble on his machine which is nearly identical
to mine, using the same builds (tomcat 4.0 release, Apache 1.3.20) and
identical conf files, both on apache and server.xml.
5) The same co-worker gets the same results hitting my machine from his.
6) I've since tried moving up to tomcat 4.0.1 with no luck.
7) I've tried both our own compiled version of mod_webapp.so and libapr.dll
(before the win32 binaries were released) and the binaries available at the
download site. 
8) I previously had tomcat and apache cooperating nicely under tomcat 3.2,
using mod_jk.
9) I'm using Win2K professional sp2, jdk1.3, +300M ram, 400MhzPII 
10) Just for kicks, I tried renaming mod_webapp.so to mod_webapp.dll and
changed the LoadModule call to match.  No luck.
11) I've tried both manual install as well as the .exe installers available
for both Apache and Tomcat.

Can anyone either add observations of their own of this issue, or point to a
potential cure?

Geoff

-Original Message-
From: Kishor K [mailto:[EMAIL PROTECTED]]
Sent: Thursday, October 18, 2001 5:19 AM
To: Tomcat User Mailing List
Subject: WebApp: Error 500 (File: pr_warp.c Line: 434) 


hi,
 
I have installed TC4.0.1 and Apache on Win NT.
Connected them using mod_webapp and Warp.
 
Sometimes nothing comes and browser waits for the output.
But sometimes i am getting the following error.
++
WebApp: Error 500
 
 (File: pr_warp.c Line: 434) 
 
(null) 
+
 
httpd.conf
 
LoadModule webapp_module modules/mod_webapp.so
AddModule   mod_webapp.c 

 
NameVirtualHost *
   VirtualHost *
ServerName www.myserver.com
DocumentRoot D:/Program Files/Apache/htdocs
 #start for tomcat4.0.1@@@
WebAppConnection conn  warp  www.myserver.com:8008
WebAppDeploy examples  conn  /examples
   WebAppDeploy myapp  conn  /myapp   
   WebAppInfo   /webapp-info
#end for tomcat4.0.1@@@
/VirtualHost
VirtualHost *
ServerName www.yourserver.com
DocumentRoot D:/Program Files/Apache/yourdocs
/VirtualHost

server.xml
 
i hvnt added anything to the server.xml
No contexts added to the server.xml.
 
Any idea?
 
kishor
 






_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com



RE: WebApp: Error 500 (File: pr_warp.c Line: 434) updated

2001-10-18 Thread Geoff Howard

sorry, forgot to paste the error log snippet.  The error log
({CATALINA_HOME}\logs\apache_log) shows:

2001-10-11 14:22:13 WarpHost[geoffpc.didax.com]: Mapping request for Host
2001-10-11 14:22:13 StandardContext[/examples]: Mapping
contextPath='/examples' with requestURI='/examples/servlets/index.html' and
relativeURI='/servlets/index.html'
2001-10-11 14:22:13 StandardContext[/examples]: Decoded
relativeURI='/servlets/index.html'
2001-10-11 14:22:13 StandardContext[/examples]:  Mapped to servlet 'default'
with servlet path '/servlets/index.html' and path info 'null' and
update=true
2001-10-11 14:22:13 [org.apache.catalina.connector.warp.WarpConnection]
Exception on socket
java.net.SocketException: Connection aborted by peer: socket write error
at java.net.SocketOutputStream.socketWrite(Native Method)
at java.net.SocketOutputStream.write(SocketOutputStream.java:62)
at org.apache.catalina.connector.warp.WarpConnection.send(Unknown
Source)
at
org.apache.catalina.connector.warp.WarpResponse$Stream.close(Unknown Source)
at
org.apache.catalina.connector.warp.WarpResponse$Stream.finish(Unknown
Source)
at
org.apache.catalina.connector.warp.WarpResponse.finishResponse(Unknown
Source)
at
org.apache.catalina.connector.warp.WarpRequestHandler.handle(Unknown Source)
at org.apache.catalina.connector.warp.WarpConnection.run(Unknown
Source)
at java.lang.Thread.run(Thread.java:484)

-Original Message-
From: Geoff Howard 
Sent: Thursday, October 18, 2001 4:51 PM
To: '[EMAIL PROTECTED]'
Subject: RE: WebApp: Error 500 (File: pr_warp.c Line: 434) 


I have had a lot of trouble with what seems to be a similar problem and can
add the following observations, but unfortunately, no solution.  I've looked
pretty hard through this and other lists and have found nothing that works.

To clarify, the symptoms I get are: the examples context (and presumably
other) never works correctly through the warp connector -- sometimes the
examples context page hangs, sometimes it gives the 500 error mentioned.
The index page (/examples/servlets/index.html) does not even load.  The
error logs show: 

1) I've noticed that everything works fine if I for testing purposes turn
off images display in my browser options (ie5.5 and netscape 4.7).
Conclusion: images may be the issue.
2) The examples (including images) all work flawlessly going straight to
Tomcat through :8080.
3) Apache works fine for all pages that don't go through warp (doc root set
to apache/htdocs, so static files and images there are fine)
4) My co-worker had no such trouble on his machine which is nearly identical
to mine, using the same builds (tomcat 4.0 release, Apache 1.3.20) and
identical conf files, both on apache and server.xml.
5) The same co-worker gets the same results hitting my machine from his.
6) I've since tried moving up to tomcat 4.0.1 with no luck.
7) I've tried both our own compiled version of mod_webapp.so and libapr.dll
(before the win32 binaries were released) and the binaries available at the
download site. 
8) I previously had tomcat and apache cooperating nicely under tomcat 3.2,
using mod_jk.
9) I'm using Win2K professional sp2, jdk1.3, +300M ram, 400MhzPII 
10) Just for kicks, I tried renaming mod_webapp.so to mod_webapp.dll and
changed the LoadModule call to match.  No luck.
11) I've tried both manual install as well as the .exe installers available
for both Apache and Tomcat.

Can anyone either add observations of their own of this issue, or point to a
potential cure?

Geoff

-Original Message-
From: Kishor K [mailto:[EMAIL PROTECTED]]
Sent: Thursday, October 18, 2001 5:19 AM
To: Tomcat User Mailing List
Subject: WebApp: Error 500 (File: pr_warp.c Line: 434) 


hi,
 
I have installed TC4.0.1 and Apache on Win NT.
Connected them using mod_webapp and Warp.
 
Sometimes nothing comes and browser waits for the output.
But sometimes i am getting the following error.
++
WebApp: Error 500
 
 (File: pr_warp.c Line: 434) 
 
(null) 
+
 
httpd.conf
 
LoadModule webapp_module modules/mod_webapp.so
AddModule   mod_webapp.c 

 
NameVirtualHost *
   VirtualHost *
ServerName www.myserver.com
DocumentRoot D:/Program Files/Apache/htdocs
 #start for tomcat4.0.1@@@
WebAppConnection conn  warp  www.myserver.com:8008
WebAppDeploy examples  conn  /examples
   WebAppDeploy myapp  conn  /myapp   
   WebAppInfo   /webapp-info
#end for tomcat4.0.1@@@
/VirtualHost
VirtualHost *
ServerName www.yourserver.com
DocumentRoot D:/Program Files/Apache/yourdocs
/VirtualHost

server.xml
 
i hvnt added anything to the server.xml
No contexts added to the server.xml.
 
Any idea?
 
kishor
 






_
Do You Yahoo!?
Get your free @yahoo.com 

  1   2   >