AW: Tomcat 4.1.10 - JSP Compile Error

2002-09-24 Thread Ralph Einfeldt

Tomcat 4.1.10 has known problems with paths other than C:.

- Upgrade to 4.1.11
  According to the release notes the problem is fixed 
  in this version. (Haven't tried it)
- Use 4.1.10 with Jasper instead of Jasper2
- Downgrade to 4.0.4
- Move the application to C:

It should be possible to define an own jspDestroy
(in 4.0.3 it is possible).

Have a look at the generated code in the work directory.
If you haven't defined 2 jspDestroy methods, I would guess
that either jasper doublicates your method or defines
an own jspDestroy.

 -Ursprüngliche Nachricht-
 Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
 Gesendet: Montag, 23. September 2002 17:48
 An: [EMAIL PROTECTED]
 Betreff: Tomcat 4.1.10 - JSP Compile Error
 
 BTW - If I copy my wws2Java directory to the tomcat webapps 
 directory on c-drive
 everything works - except for the following error:
 
 Generated servlet error:
 [javac] Compiling 1 source file
 C:\Tomcat41\work\Standalone\localhost\wws2Java\index_jsp.java:
 42: jspDestroy()
 is already defined in org.apache.jsp.index_jsp  public void 
 jspDestroy() { ...
 
 What do I have to do, that the compiler finds the classes ?
 
 And - not my major problem - why is it no longer possible to 
 have a own jspDestroy implementation
 

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




Antwort: Re: Tomcat 4.1.10 - JSP Compile Error

2002-09-24 Thread Gunter . Noack

Hi,
sorry, that I ask, but do you have imported your package or class in the
JSP?
i.e %@ page import=tracking.* % or %@ page import=tracking.TestBean %

Because, if I copy my application to the webapps directory everything works.
And my packages are under classes\de\porsche\...

Another possibility for your problem might be, that you did not create the directory
WEB-INF with capital letters only.

Best regards,
Gunter





Sven Hoffmann [EMAIL PROTECTED] am 24.09.2002 02:01:28

Bitte antworten an Tomcat Users List [EMAIL PROTECTED]

An:Tomcat Users List [EMAIL PROTECTED]
Kopie:

Thema: Re: Tomcat 4.1.10 - JSP Compile Error


Hi,
I've a similar problem with tomcat 4.1.10. I've stored all my JSP's in
%Tomcat_Home%/webapps/ and the class-files (which belong to the package
tracking) in %TOMCAT_Home%/webapps/Web-inf/classes/tracking. When Tomcat
tries to compile a JSP that wants to use a Java class I get the following
error:
cannot resolve symbol
symbol  : class TestBean
location: package tracking
import tracking.TestBean;
...

In the mailing list I got the hint that this could be a bug in version
4.1.10 when it isn't installed on drive C: and that I should install it on
that drive or switch to version 4.1.11. So I installed version 4.1.11 in
directory C:\Programme\Apache\Tomcat_4.1.11 but I already got the same
error. Because of that I think that your error isn't caused by the fact
that
you haven't stored your web application under %TOMCAT_Home%/webapps/...

If you have a solution for your problem please let me know!
Thanks in advance!

Bye
Sven.



 Hi,
 I have installed Tomcat 4.1.10 on C:\Tomcat41. I have an application
which
 is on d:\appdir\wws2Java.
 The CATALINA_HOME is set to C:\Tomcat41
 CATALINA_BASE is not set.

 I set the context Section in server.xml as follows:
 !Context path=/wws2Java
  docBase=d:\appdir\wws2Java
  crossContext=true
  debug=2
  reloadable=true
 !/Context

 All the files which belongs to the application reside in the wws2Java
directory.
 The subdir structure is the same as in the standard webapps directory.
 (WEB-INF, classes and so on).
 Under Tomcat 3.2 this works perfectly.
 Now under Tomcat the compilation of the JSP fails because the compiler
 cannot find the imported packages of my application. This seems to happen
 because Tomcat 4 is no longer using the information of the classpath
environment
 setting.
 I read the documentation and searched the web to find out how I can
convince
 Tomcat that my classes are also to be found under the docbase directory.

 In the classloader HowTo I found the following:

 /WEB-INF/classes of your web application
 /WEB-INF/lib/*.jar of your web application
 Bootstrap classes of your JVM
 System class loader classses (described above)
 $CATALINA_HOME/common/classes
 $CATALINA_HOME/common/endorsed/*.jar
 $CATALINA_HOME/common/lib/*.jar
 $CATALINA_HOME/shared/classes
 $CATALINA_HOME/shared/lib/*.jar

 From this I would expect that my WEB-INF/classes directory will be
searched first.

 BTW - If I copy my wws2Java directory to the tomcat webapps directory on
c-drive
 everything works - except for the following error:

 Generated servlet error:
 [javac] Compiling 1 source file
 C:\Tomcat41\work\Standalone\localhost\wws2Java\index_jsp.java:42:
jspDestroy()
 is already defined in org.apache.jsp.index_jsp  public void jspDestroy()
{ ...

 What do I have to do, that the compiler finds the classes ?

 And - not my major problem - why is it no longer possible to have a own
jspDestroy
 implementation

 TIA and best regards,
 Gunter






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




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













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




InProcess Workers

2002-09-24 Thread Carl Olivier

Greetings.

I havea Tomcat 3.2.3 running behind Apache 1.3.20.  I use mod_jk to pass
request from Apache to Tomcat.

I have multiple virtual hosts set up, and each host uses its own worker.
From what I understand this means that each host has its own JVM of sorts?
Is this correct?

If so, is there any way to restart 1 worker without restarting the rest?

Thanks in advance,

Carl



compiler runs out of memory

2002-09-24 Thread # Lalit Nagpal #


hello ...

This is a frequent problem that i face with tomcat ...

here is the output in catalina.out ... is increasing
the heap size the only option ... if yes ... plz tell
me how to 

the stack trace is as follows ...

type Exception report

message 

description The server encountered an internal error
() that prevented it from fulfilling this request.

exception 

org.apache.jasper.JasperException: Unable to compile
class for JSPThe compiler has run out of memory. 
Consider using the -J-mxnumber command line option
to increase the maximum heap size.

at
org.apache.jasper.compiler.Compiler.compile(Unknown
Source)
at
org.apache.jasper.servlet.JspServlet.loadJSP(Unknown
Source)
at
org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary(Unknown
Source)
at
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(Unknown
Source)
at
org.apache.jasper.servlet.JspServlet.serviceJspFile(Unknown
Source)
at
org.apache.jasper.servlet.JspServlet.service(Unknown
Source)
at
javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Unknown
Source)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(Unknown
Source)
at
org.apache.catalina.core.StandardWrapperValve.invoke(Unknown
Source)
at
org.apache.catalina.core.StandardPipeline.invokeNext(Unknown
Source)
at
org.apache.catalina.core.StandardPipeline.invoke(Unknown
Source)
at
org.apache.catalina.core.ContainerBase.invoke(Unknown
Source)
at
org.apache.catalina.core.StandardContextValve.invoke(Unknown
Source)
at
org.apache.catalina.core.StandardPipeline.invokeNext(Unknown
Source)
at
org.apache.catalina.core.StandardPipeline.invoke(Unknown
Source)
at
org.apache.catalina.core.ContainerBase.invoke(Unknown
Source)
at
org.apache.catalina.core.StandardContext.invoke(Unknown
Source)
at
org.apache.catalina.core.StandardHostValve.invoke(Unknown
Source)
at
org.apache.catalina.core.StandardPipeline.invokeNext(Unknown
Source)
at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(Unknown
Source)
at
org.apache.catalina.core.StandardPipeline.invokeNext(Unknown
Source)
at
org.apache.catalina.valves.ErrorReportValve.invoke(Unknown
Source)
at
org.apache.catalina.core.StandardPipeline.invokeNext(Unknown
Source)
at
org.apache.catalina.valves.AccessLogValve.invoke(Unknown
Source)
at
org.apache.catalina.core.StandardPipeline.invokeNext(Unknown
Source)
at
org.apache.catalina.core.StandardPipeline.invoke(Unknown
Source)
at
org.apache.catalina.core.ContainerBase.invoke(Unknown
Source)
at
org.apache.catalina.core.StandardEngineValve.invoke(Unknown
Source)
at
org.apache.catalina.core.StandardPipeline.invokeNext(Unknown
Source)
at
org.apache.catalina.core.StandardPipeline.invoke(Unknown
Source)
at
org.apache.catalina.core.ContainerBase.invoke(Unknown
Source)
at
org.apache.coyote.tomcat4.CoyoteProcessor.service(CoyoteProcessor.java:311)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:305)
at
org.apache.coyote.tomcat4.CoyoteProcessor.process(CoyoteProcessor.java:785)
at
org.apache.coyote.tomcat4.CoyoteProcessor.run(CoyoteProcessor.java:864)
at java.lang.Thread.run(Thread.java:484)





Apache Tomcat/4.1-dev



=
# Lalit Nagpal #

__
Do you Yahoo!?
New DSL Internet Access from SBC  Yahoo!
http://sbc.yahoo.com

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




Re: compiler runs out of memory

2002-09-24 Thread Kwok Peng Tuck

You could increase the heap size as the error message suggested or 
stream line your code
so that it is more efficient :)

# Lalit Nagpal # wrote:

hello ...

This is a frequent problem that i face with tomcat ...

here is the output in catalina.out ... is increasing
the heap size the only option ... if yes ... plz tell
me how to 

the stack trace is as follows ...

type Exception report

message 

description The server encountered an internal error
() that prevented it from fulfilling this request.

exception 

org.apache.jasper.JasperException: Unable to compile
class for JSPThe compiler has run out of memory. 
Consider using the -J-mxnumber command line option
to increase the maximum heap size.

   at
org.apache.jasper.compiler.Compiler.compile(Unknown
Source)
   at
org.apache.jasper.servlet.JspServlet.loadJSP(Unknown
Source)
   at
org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary(Unknown
Source)
   at
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(Unknown
Source)
   at
org.apache.jasper.servlet.JspServlet.serviceJspFile(Unknown
Source)
   at
org.apache.jasper.servlet.JspServlet.service(Unknown
Source)
   at
javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
   at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Unknown
Source)
   at
org.apache.catalina.core.ApplicationFilterChain.doFilter(Unknown
Source)
   at
org.apache.catalina.core.StandardWrapperValve.invoke(Unknown
Source)
   at
org.apache.catalina.core.StandardPipeline.invokeNext(Unknown
Source)
   at
org.apache.catalina.core.StandardPipeline.invoke(Unknown
Source)
   at
org.apache.catalina.core.ContainerBase.invoke(Unknown
Source)
   at
org.apache.catalina.core.StandardContextValve.invoke(Unknown
Source)
   at
org.apache.catalina.core.StandardPipeline.invokeNext(Unknown
Source)
   at
org.apache.catalina.core.StandardPipeline.invoke(Unknown
Source)
   at
org.apache.catalina.core.ContainerBase.invoke(Unknown
Source)
   at
org.apache.catalina.core.StandardContext.invoke(Unknown
Source)
   at
org.apache.catalina.core.StandardHostValve.invoke(Unknown
Source)
   at
org.apache.catalina.core.StandardPipeline.invokeNext(Unknown
Source)
   at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(Unknown
Source)
   at
org.apache.catalina.core.StandardPipeline.invokeNext(Unknown
Source)
   at
org.apache.catalina.valves.ErrorReportValve.invoke(Unknown
Source)
   at
org.apache.catalina.core.StandardPipeline.invokeNext(Unknown
Source)
   at
org.apache.catalina.valves.AccessLogValve.invoke(Unknown
Source)
   at
org.apache.catalina.core.StandardPipeline.invokeNext(Unknown
Source)
   at
org.apache.catalina.core.StandardPipeline.invoke(Unknown
Source)
   at
org.apache.catalina.core.ContainerBase.invoke(Unknown
Source)
   at
org.apache.catalina.core.StandardEngineValve.invoke(Unknown
Source)
   at
org.apache.catalina.core.StandardPipeline.invokeNext(Unknown
Source)
   at
org.apache.catalina.core.StandardPipeline.invoke(Unknown
Source)
   at
org.apache.catalina.core.ContainerBase.invoke(Unknown
Source)
   at
org.apache.coyote.tomcat4.CoyoteProcessor.service(CoyoteProcessor.java:311)
   at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:305)
   at
org.apache.coyote.tomcat4.CoyoteProcessor.process(CoyoteProcessor.java:785)
   at
org.apache.coyote.tomcat4.CoyoteProcessor.run(CoyoteProcessor.java:864)
   at java.lang.Thread.run(Thread.java:484)





Apache Tomcat/4.1-dev



=
# Lalit Nagpal #

__
Do you Yahoo!?
New DSL Internet Access from SBC  Yahoo!
http://sbc.yahoo.com

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


  




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




Re: Tomcat Email - JavaMail Advice.

2002-09-24 Thread Raj Saini

Hi,

The one solution I suggest is to using a messaging product like JbossMQ or
OpenJMS. You you web application collect the data of the mail and wrap it
into an object and send it to the JMS server. Your web application will be
free to do another work now.

You can have a Message Drive Bean (MDB) or async client to the JMS. As and
when the mail message will arive the MDB or the Async client will
automatically pick this up and send it to any server.

You can load balance your web application just to collect the the mail
information and not to sit in a tight loop for processing the mails.

I am using this for a Trading system where the order execution messages are
mailed to user. The advantage here is if you have a lot of mail to send they
will be put in a queue and you application will always be available for
doing the core work.

In my opinion, this should be the best solution for your problem

Raj Saini

- Original Message -
From: Alex Wallace [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Monday, September 23, 2002 6:22 PM
Subject: Tomcat Email - JavaMail Advice.


 I need to make a web app that will notify and monitor activity to users by
 email, and potentially thousands of users (therefor emails). I want to ask
for
 advice as to how to handle this.

 Should the web app generate all the emails? May be use another machine as
a mail
 server (linux with exim?), but have the web app generate them?

 Have the web app just insert all emails to be sent in a database table and
have
 a separate application monitor the table or have trigers in the db server
 (postgresql) that will launc the app (java?) that will send the emails?

 As far as JavaMail, i did a small test with the code in the example in
tomcat
 (EmailServlet), I tried to send 1000 emails to a server of mine, using
localhost
 as the smtp server, and around the 70th email, the app complained about a
nested
 error, the localhost could not be contacted, connection refused, etc.  My
code
 is very simplistic, and I only did a for loop to try to send the same
email a
 thousand times to the same host. Evidently this doesn't work. I'm very new
to
 this, so could someone give me some advice on how to send large amounts of
 email? Currently using linux (debian woody) with exim.

 Advise in all aspects of this email is greatly appreciated.

 Thank you in advance!



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


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




Black Magic User List

2002-09-24 Thread Oliver . Lauer

Hi guys,

I sure I´m nerving now but I'm trying to unsubscribe since three days
always using the given account...it's black magic...I'm caught within the
tc user list forever :-)...

Oliver
--

Oliver Lauer
Stadtsparkasse Köln
512 / BK / Anwendungsentwicklung
Telefon: (0221) 226 - 5562
Fax: (0221) 226 - 5100
mailto:[EMAIL PROTECTED]
http://www.sk-koeln.de
Da E-Mails leicht unter fremdem Namen erstellt oder manipuliert werden
koennen, muessen wir zu Ihrem und unserem Schutz die rechtliche
Verbindlichkeit der vorstehenden Erklaerungen ausschliessen. Die fuer die
Stadtsparkasse Koeln geltenden Regeln ueber die Verbindlichkeit von
rechtsgeschaeftlichen Erklaerungen mit verpflichtendem Inhalt bleiben
unberuehrt.



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




RE: Black Magic User List

2002-09-24 Thread Nicholas Orr

Just click on the link below that says:
To unsubscribe, e-mail:
mailto:[EMAIL PROTECTED]

Or send a blank email to [EMAIL PROTECTED]

Easy.

Nicholas Orr

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, 24 September 2002 5:57 PM
To: [EMAIL PROTECTED]
Subject: Black Magic User List 


Hi guys,

I sure I´m nerving now but I'm trying to unsubscribe since three days always
using the given account...it's black magic...I'm caught within the tc user
list forever :-)...

Oliver
--

Oliver Lauer
Stadtsparkasse Köln
512 / BK / Anwendungsentwicklung
Telefon: (0221) 226 - 5562
Fax: (0221) 226 - 5100
mailto:[EMAIL PROTECTED]
http://www.sk-koeln.de
Da E-Mails leicht unter fremdem Namen erstellt oder manipuliert werden
koennen, muessen wir zu Ihrem und unserem Schutz die rechtliche
Verbindlichkeit der vorstehenden Erklaerungen ausschliessen. Die fuer die
Stadtsparkasse Koeln geltenden Regeln ueber die Verbindlichkeit von
rechtsgeschaeftlichen Erklaerungen mit verpflichtendem Inhalt bleiben
unberuehrt.



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


**
The information contained in this e-mail is confidential and is
intended only for the use of the addressee(s).
If you receive this e-mail in error, any use, distribution or
copying of this e-mail is not permitted. You are requested to
forward unwanted e-mail and address any problems to the
MIM Holdings Limited Support Centre.

For general enquires:   ++61 7 3833 8000
Support Centre e-mail:  [EMAIL PROTECTED]
Support Centre phone:   Australia 1800500646
International ++61 7 38338042
**


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




RE: Running tomcat 4.0 as NT Srvice

2002-09-24 Thread Vincent . Gaboriau

There is a topic which explain that, there were 1 or 2 weeks ago.
Make a search on the mailling list.

 -Message d'origine-
 De : Katz, Adi [mailto:[EMAIL PROTECTED]]
 Envoyé : lundi 23 septembre 2002 18:22
 À : [EMAIL PROTECTED]
 Objet : Running tomcat 4.0 as NT Srvice


 Hello,

 Tomcat 4.0 distributaion contains a file: tomcat.exe that is used
 for running tomcat as a service.
 There isnt seems to be any documentation regarding this or how to
 install the service.
 If you install tomcat using the exe installer it will be done
 automaticly but I need to do it
 by myself.
 Does anybody know something about how to use tomcat.exe ( it is
 in the bin directory )
 in order for tomcat to run as a service?

 Thanks,
 Adi





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




Special consideration of invoking native methods in Tomcat?

2002-09-24 Thread Furlan Bojan ITWET2

I am trying to access existing legacy system in our company over JSP running
on Tomcat. Using JNI, I am now able to call one of the C functions
(something like connect to a server and select database) from existing API.
The call succeeds, but it results in error during execution of that
function. The same call in a standalone java application is always
successful.
As far as I know, API communicates to server over socket mechanism. What
would be a difference between calling such a native function in standalone
Java application and using the same in JSP? I'm new in Java environment,
Tomcat and JSP, so I would appreciate any hint.

Regards
Bojan Furlan 

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




Re: Tomcat 4.0 - SSL DOES NOT WORK!

2002-09-24 Thread Martin Jacobson

neal wrote:

 Thanks but this is actually specific to tomcat 3.  The configuration for
 Tomcat 4 is a bit different.  :(
 
 Some good overall SSL info though. I'll pass this to the SysAdmin to see if
 this tips him off to anything.
 
 Thanks.
 Neal
 


Hi Neal,

I'm using 4.0.4b3 with SSL working fine. Other than setting up web.xml 
(below), the only issues were
(i) downloading JSSE and installing it as a standard extension (ie in 
the /lib/ext directory under Java's home.
(ii) generating a self-signed cert with keytool (I don't have a Thawte cert)

I did try to upgrade to 4.1.10, but I couldn't get the Coyote connector 
to work for me, so I've stayed with 4.0.4.

Do you get any errors logged when you try using https ? Set debug to 9 
and see what you get.

Hope this helps - SSL DOES work - really!

Martin

 extract from web.xml ---

!-- Define an SSL HTTP/1.1 Connector on port 443 --
Connector className=org.apache.catalina.connector.http.HttpConnector
port=443
minProcessors=5
maxProcessors=75
enableLookups=true
redirectPort=80
acceptCount=10
debug=0
scheme=https
secure=true
Factory className=org.apache.catalina.net.SSLServerSocketFactory
clientAuth=false
keystoreFile=/Users/martin/.keystore
keystorePass=mypassword
protocol=TLS
/
/Connector



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




AW: Black Magic User List

2002-09-24 Thread Ralph Einfeldt

Look at the return path of the tomcat list mails and you get:

Return-Path: tomcat-user-return-26788-your name=your domain@jakarta.apache.org

If that doesn't match the address you are using to unsubscibe.
use this address:
tomcat-user-unsubscribe-your name=your domain@jakarta.apache.org

If that doesn't help, write a mail to 
[EMAIL PROTECTED]

(the more info you provide what you tried and what 
reactions you observed the better the help will be)

 -Ursprüngliche Nachricht-
 Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
 Gesendet: Dienstag, 24. September 2002 09:57
 An: [EMAIL PROTECTED]
 Betreff: Black Magic User List 
 
 
 I sure I´m nerving now but I'm trying to unsubscribe since three days
 always using the given account...it's black magic...I'm 
 caught within the tc user list forever :-)...
 

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




RE: Special consideration of invoking native methods in Tomcat?

2002-09-24 Thread Collins, Jim

A possibility is Tomcat is already using the socket.

 -Original Message-
 From: Furlan Bojan ITWET2 [mailto:[EMAIL PROTECTED]]
 Sent: 24 September 2002 09:01
 To: '[EMAIL PROTECTED]'
 Subject: Special consideration of invoking native methods in Tomcat?
 
 
 I am trying to access existing legacy system in our company 
 over JSP running
 on Tomcat. Using JNI, I am now able to call one of the C functions
 (something like connect to a server and select database) from 
 existing API.
 The call succeeds, but it results in error during execution of that
 function. The same call in a standalone java application is always
 successful.
 As far as I know, API communicates to server over socket 
 mechanism. What
 would be a difference between calling such a native function 
 in standalone
 Java application and using the same in JSP? I'm new in Java 
 environment,
 Tomcat and JSP, so I would appreciate any hint.
 
 Regards
 Bojan Furlan 
 
 --
 To unsubscribe, e-mail:   
 mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: 
 mailto:[EMAIL PROTECTED]
 


PLEASE READ: The information contained in this email is confidential
and intended for the named recipient(s) only. If you are not an intended
recipient of this email you must not copy, distribute or take any 
further action in reliance on it and you should delete it and notify the
sender immediately. Email is not a secure method of communication and 
Nomura International plc cannot accept responsibility for the accuracy
or completeness of this message or any attachment(s). Please examine this
email for virus infection, for which Nomura International plc accepts
no responsibility. If verification of this email is sought then please
request a hard copy. Unless otherwise stated any views or opinions
presented are solely those of the author and do not represent those of
Nomura International plc. This email is intended for informational
purposes only and is not a solicitation or offer to buy or sell
securities or related financial instruments. Nomura International plc is
regulated by the Financial Services Authority and is a member of the
London Stock Exchange.



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




RE: Special consideration of invoking native methods in Tomcat?

2002-09-24 Thread Furlan Bojan ITWET2

I may be wrong, but I believe I have set the socket for Tomcat access to
8080 since another web server is running on the same server. The sockets
used by the legacy system I'm trying to access are completely different.

-Original Message-
From: Collins, Jim [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, September 24, 2002 10:06 AM
To: 'Tomcat Users List'
Subject: RE: Special consideration of invoking native methods in Tomcat?


A possibility is Tomcat is already using the socket.

 -Original Message-
 From: Furlan Bojan ITWET2 [mailto:[EMAIL PROTECTED]]
 Sent: 24 September 2002 09:01
 To: '[EMAIL PROTECTED]'
 Subject: Special consideration of invoking native methods in Tomcat?
 
 
 I am trying to access existing legacy system in our company 
 over JSP running
 on Tomcat. Using JNI, I am now able to call one of the C functions
 (something like connect to a server and select database) from 
 existing API.
 The call succeeds, but it results in error during execution of that
 function. The same call in a standalone java application is always
 successful.
 As far as I know, API communicates to server over socket 
 mechanism. What
 would be a difference between calling such a native function 
 in standalone
 Java application and using the same in JSP? I'm new in Java 
 environment,
 Tomcat and JSP, so I would appreciate any hint.
 
 Regards
 Bojan Furlan 
 
 --
 To unsubscribe, e-mail:   
 mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: 
 mailto:[EMAIL PROTECTED]
 


PLEASE READ: The information contained in this email is confidential
and intended for the named recipient(s) only. If you are not an intended
recipient of this email you must not copy, distribute or take any 
further action in reliance on it and you should delete it and notify the
sender immediately. Email is not a secure method of communication and 
Nomura International plc cannot accept responsibility for the accuracy
or completeness of this message or any attachment(s). Please examine this
email for virus infection, for which Nomura International plc accepts
no responsibility. If verification of this email is sought then please
request a hard copy. Unless otherwise stated any views or opinions
presented are solely those of the author and do not represent those of
Nomura International plc. This email is intended for informational
purposes only and is not a solicitation or offer to buy or sell
securities or related financial instruments. Nomura International plc is
regulated by the Financial Services Authority and is a member of the
London Stock Exchange.



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

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




Rif: Black Magic User List

2002-09-24 Thread lbiolcati

Same as you, but since a couple of week...

Luca




[EMAIL PROTECTED]
Inviato da: [EMAIL PROTECTED]
24/09/2002 09.57
Per favore, rispondere a Tomcat Users List

 
Per:[EMAIL PROTECTED]
Cc: 
Oggetto:Black Magic User List


Hi guys,

I sure I´m nerving now but I'm trying to unsubscribe since three days
always using the given account...it's black magic...I'm caught within the
tc user list forever :-)...

Oliver
--

Oliver Lauer
Stadtsparkasse Köln
512 / BK / Anwendungsentwicklung
Telefon: (0221) 226 - 5562
Fax: (0221) 226 - 5100
mailto:[EMAIL PROTECTED]
http://www.sk-koeln.de
Da E-Mails leicht unter fremdem Namen erstellt oder manipuliert werden
koennen, muessen wir zu Ihrem und unserem Schutz die rechtliche
Verbindlichkeit der vorstehenden Erklaerungen ausschliessen. Die fuer die
Stadtsparkasse Koeln geltenden Regeln ueber die Verbindlichkeit von
rechtsgeschaeftlichen Erklaerungen mit verpflichtendem Inhalt bleiben
unberuehrt.



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

___
tomcat-users mailing list
[EMAIL PROTECTED]
https://mailman.real-time.com/mailman/listinfo/tomcat-users





Re: JNDI Realm on Tomcat 4 does not work

2002-09-24 Thread John Holman

Stephan

I answered this a couple of days ago ... did it not reach the list?

You need to use curly brackets {} for the substitions, not parentheses ()

e.g.

 userPattern=uid={0},ou=people,dc=yikester,dc=net

not

 userPattern=uid=(0),ou=people,dc=yikester,dc=net

John


Stephan Schwab wrote:

Hi,

I want to secure a webapp with the JNDI realm. But the LDAP query is
sent wrong to my OpenLDAP server.

Here is a snippet from server.xml:

Realm className=org.apache.catalina.realm.JNDIRealm debug=99
connectionURL=ldap://localhost;
userPattern=uid=(0),ou=people,dc=yikester,dc=net
roleBase=ou=groups,dc=yikester,dc=net
roleName=cn
roleSearch=(uniqueMember=(0))
userPassword=userPassword /

On the OpenLDAP server I see in the logfile:

SRCH base=uid=(0),ou=people,dc=yikester,dc=net scope=0
filter=(objectClass=*)

So, the problem is that something prevents the exchange of uid=(0) with
the username in question.

I've tried with Tomcat 4.0.4 included in Netbeans 3.4 IDE and with
Tomcat 4.1.10. ldap.jar is from java.sun.com. I've tried with ldap.jar
from Novell Too, but the result is the same.

Any hints?

Stephan

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

  



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




keystore.name versus .keystore

2002-09-24 Thread neal

When my sysAdmin created the keystore file for our SSL cert, it came out
'keystore.name' not '.keystore' as the Tomcat manual said that it would.
The sysAdmin however insists he followed the directions and used the
appropriate JSSE keytool utility.

Could this be related to why my SSL (Tomcat4.0.4 Standalone) is not working?


Thanks.
Neal


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




RE: jk_ajp errors in mod_jk.log ???

2002-09-24 Thread Anthony Milbourne

Hi John

I onjy just noticed that this is in your HowTo (Apache 1.3.26 - Tomcat
4.0.4, at least) as well as in the list archives.  The example
wrokers.properties file you have given has a minor error.  It should be:

# BEGIN workers.properties
#
# Setup for apache system
#
# make this equal to CATALINA_HOME
workers.tomcat_home=/usr/local/jakarta-tomcat-4.0.4
#
# make this equal to JAVA_HOME
workers.java_home=/usr/java/j2sdk1.4.0_01
#
ps=/
worker.list=ajp13

# Definition for Ajp13 worker
#
worker.ajp13.port=8009

# change this line to match apache ServerName and Host name in
server.xml
worker.ajp13.host=localhost

worker.ajp13.type=ajp13
#
# END workers.properties
I have removed ajp12 from line 12 as Tomcat 4.0.4 doesn't need it
(as far as I know) and if you have it there without the appropriate
connector defined in server.xml it causes communication errors.
I hope that helps...
Anthony.


 -Original Message-
 From: Turner, John [SMTP:[EMAIL PROTECTED]]
 Sent: 23 September 2002 17:27
 To:   'Tomcat Users List'
 Subject:  RE: jk_ajp errors in mod_jk.log ???
 
 
 Oops.  What's the fixed file, or the fix itself?  I will gladly update
 things.
 
 John
 
 
  -Original Message-
  From: Anthony Milbourne [mailto:[EMAIL PROTECTED]]
  Sent: Monday, September 23, 2002 12:24 PM
  To: 'Tomcat Users List'
  Subject: RE: jk_ajp errors in mod_jk.log ???
  
  
  It looks to me like you may have an extra ajp entry in your 
  config file.
  Try getting rid of the ajp12 connector int the worker list.
  
  John accidentally posted a broken file to this list in a 
  reply to one of my
  questions.  It caused me loads of trouble, although I'm not 
  complaining as
  John (and his HowTo) has solved many problems for me.  
  Unfortunately a lot
  of people must have used it.
  
  Hope that helps,
  
  Anthony.
  
   -Original Message-
   From: [EMAIL PROTECTED] [SMTP:[EMAIL PROTECTED]]
   Sent: 23 September 2002 02:15
   To:   Tomcat Users List
   Subject:  Re: jk_ajp errors in mod_jk.log ???
   
   snip
Please post the contents of your workers.properties file.

This error seems to indicate that your apache machine 
  cannot establish a
connection to the tomcat machine.  You are running apache 
  and tomcat on
different machines, correct?
   Correct, I am running them on different machines.
   Attached hereto the workers.properties in 
  /usr/local/tomcat4/conf/jk 
   File: workers.propertiesFile: ATT553709.txt  
 


**
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.
This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.
www.mimesweeper.com
**


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




AW: Antwort: AW: Tomcat 4.1.10 - JSP Compile Error

2002-09-24 Thread Ralph Einfeldt

4.1.11 Has been announced last friday as test milestone:
http://jakarta.apache.org/builds/jakarta-tomcat-4.0/test/v4.1.11/

I did't recommend 4.1.12 as it isn't announced yet, so I don't 
know which state it has.

I think you are right with the jspDestroy().

 -Ursprüngliche Nachricht-
 Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
 Gesendet: Dienstag, 24. September 2002 10:21
 An: Tomcat Users List
 Betreff: Antwort: AW: Tomcat 4.1.10 - JSP Compile Error
 
 Thanks a lot. I installed Tomcat 4.1.12 (could not find 
 4.1.11) and now my jsp pages compile.
 
 Jsp-Destroy:
 I saw that jasper added a jspDestroy method to my jsp source.
snip/
 I don't think it should do it. Maybe ist should be in a 
 parent class and I call super() in my own implementation.
 

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




Re: AW: Antwort: AW: Tomcat 4.1.10 - JSP Compile Error

2002-09-24 Thread Remy Maucherat

Ralph Einfeldt wrote:
 4.1.11 Has been announced last friday as test milestone:
 http://jakarta.apache.org/builds/jakarta-tomcat-4.0/test/v4.1.11/
 
 I did't recommend 4.1.12 as it isn't announced yet, so I don't 
 know which state it has.
 
 I think you are right with the jspDestroy().

Yes, he's definitely right. You can file a bug.
It's not too hard to edit by hand the generated sources to fix the 
problem (by merging the two methods), though. Since only a very small 
amount of pages would likely need the jspDestroy, that could be a good 
enough workaround for now.

Remy


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




RE: Running multiple tomcat instances ?????

2002-09-24 Thread Anthony Milbourne

Hi

Thanks for that - my sysadmins told me i couldn't have more than 80
characters of process name.  My previous post was wrong, and that version of
ps is much more useful.

Anthony.

 -Original Message-
 From: Raj Mettai [SMTP:[EMAIL PROTECTED]]
 Sent: 23 September 2002 21:49
 To:   [EMAIL PROTECTED]
 Subject:  RE: Running multiple tomcat instances ?
 
 Thanks John, I will read the doc and try to get that code working, 
 meanwhile,  I have a found att version of ps under /usr/ucb/ps (solaris)
 
 which will give you a whole lot of information about the processes...
 
 example:
 
 # /usr/ucb/ps -auxwww |grep tomcat   
 root  5629  0.0  5.65760827824 ?S   Sep 20  0:27
 /usr/java/bin/../bin/sparc/native_threads/java
 -Djava.endorsed.dirs=/opt/tomcat2/bin:/opt/tomcat2/common/lib -classpath
 /usr/java/lib/tools.jar:/opt/tomcat2/bin/bootstrap.jar
 -Dcatalina.base=/opt/tomcat2 -Dcatalina.home=/opt/tomcat2
 -Djava.io.tmpdir=/opt/tomcat2/temp org.apache.catalina.startup.Bootstrap
 start
 
 -Raj
 
 
 


**
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.
This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.
www.mimesweeper.com
**


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




AW: AW: Antwort: AW: Tomcat 4.1.10 - JSP Compile Error

2002-09-24 Thread Ralph Einfeldt

As I don't have an account for bugzilla (I'm not 
even using tomcat), I won't file the bug :{.

 -Ursprüngliche Nachricht-
 Von: Remy Maucherat [mailto:[EMAIL PROTECTED]]
 Gesendet: Dienstag, 24. September 2002 10:58
 An: Tomcat Users List
 Betreff: Re: AW: Antwort: AW: Tomcat 4.1.10 - JSP Compile Error
 
 Yes, he's definitely right. You can file a bug.

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




RE: Broken Pipe Errors

2002-09-24 Thread Anthony Milbourne

Hi

Thanks for the feedback.  I don't think that, in our case, there are any
direct connections to Tomcat as it is behind a firewall and only Apache is
visible.  Also we put no-cache etc. in the headers - so hopefully IE will
not decide it hasn't changed.

Thanks anyway,

Anthony.

 -Original Message-
 From: Mike Jackson [SMTP:[EMAIL PROTECTED]]
 Sent: 23 September 2002 23:34
 To:   Tomcat Users List
 Subject:  RE: Broken Pipe Errors
 
 In my experience those broken pipe errors seem to happen most often when
 Internet Exploder decided that the page hasn't changed.  So they may or
 may not be a real symtom of your problem.  But I only got those when I
 was directly connecting to tomcat, not when I'm using apache as a front
 end.  Don't know if that'll help, but maybe it will.
 
 --mikej
 -=-
 mike jackson
 [EMAIL PROTECTED]
 
 -Original Message-
 From: Anthony Milbourne [mailto:[EMAIL PROTECTED]]
 Sent: Monday, September 23, 2002 10:11 AM
 To: 'Tomcat Users List'
 Subject: Broken Pipe Errors
 
 
 Hi
 
 I have an install of Apache 1.3.26 talking over mod_jk (4.0.4) to Tomcat
 4.0.4 on Solaris 8.
 
 All seems to work fine for a while (a couple of days perhaps) - but after
 a
 while I get a lot of broken pipe errors in catalina_out.xxx.txt.  I
 previously thought these were due to a missmatch between the number of
 tomcat processors (maxProcessors) and the number of Apache clients, but
 this
 doesn't seem to be the case.  The errors are as below.
 
 2002-09-23 00:19:30 Ajp13Processor[8009][3] process: invoke
 java.io.IOException: Broken pipe
   at java.net.SocketOutputStream.socketWrite(Native Method)
   at java.net.SocketOutputStream.write(SocketOutputStream.java:91)
   at org.apache.ajp.Ajp13.send(Ajp13.java:525)
   at org.apache.ajp.RequestHandler.finish(RequestHandler.java:495)
   at org.apache.ajp.Ajp13.finish(Ajp13.java:395)
   at
 org.apache.ajp.tomcat4.Ajp13Response.finishResponse(Ajp13Response.java:196
 )
   at
 org.apache.ajp.tomcat4.Ajp13Processor.process(Ajp13Processor.java:464)
   at
 org.apache.ajp.tomcat4.Ajp13Processor.run(Ajp13Processor.java:551)
   at java.lang.Thread.run(Thread.java:479)
 
 2002-09-23 00:48:51 Ajp13Processor[8009][11] process: invoke
 java.io.IOException: Broken pipe
   at java.net.SocketOutputStream.socketWrite(Native Method)
   at java.net.SocketOutputStream.write(SocketOutputStream.java:91)
   at org.apache.ajp.Ajp13.send(Ajp13.java:525)
   at org.apache.ajp.RequestHandler.finish(RequestHandler.java:495)
   at org.apache.ajp.Ajp13.finish(Ajp13.java:395)
   at
 org.apache.ajp.tomcat4.Ajp13Response.finishResponse(Ajp13Response.java:196
 )
   at
 org.apache.ajp.tomcat4.Ajp13Processor.process(Ajp13Processor.java:464)
   at
 org.apache.ajp.tomcat4.Ajp13Processor.run(Ajp13Processor.java:551)
   at java.lang.Thread.run(Thread.java:479)
 
 
 Eventually I get the error (lots of times):
 
 2002-09-23 10:02:05 Ajp13Connector[8009] No processor available, rejecting
 this connection
 
 Which is fairly serious as nobody can see the site at this point.
 At this point direct connections to Tomcat (via its HTTP connector on port
 8080) don't get a response either.
 
 If anyone has any experience/info regarding this I would love to hear it.
 
 Thanks,
 
   Anthony.
 


**
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.
This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.
www.mimesweeper.com
**


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




Re: Running multiple tomcat instances ?????

2002-09-24 Thread David Cassidy

Anthony

Another parameter you might want to try is 'f'

if it works for your ps it will show how the processes are related to
other processes - ie child processes siblings etc

/usr/ucb/ps -auxwwwf

David




Anthony Milbourne wrote:

Hi

Thanks for that - my sysadmins told me i couldn't have more than 80
characters of process name.  My previous post was wrong, and that version of
ps is much more useful.

   Anthony.

  

-Original Message-
From: Raj Mettai [SMTP:[EMAIL PROTECTED]]
Sent: 23 September 2002 21:49
To:   [EMAIL PROTECTED]
Subject:  RE: Running multiple tomcat instances ?

Thanks John, I will read the doc and try to get that code working, 
meanwhile,  I have a found att version of ps under /usr/ucb/ps (solaris)

which will give you a whole lot of information about the processes...

example:

# /usr/ucb/ps -auxwww |grep tomcat   
root  5629  0.0  5.65760827824 ?S   Sep 20  0:27
/usr/java/bin/../bin/sparc/native_threads/java
-Djava.endorsed.dirs=/opt/tomcat2/bin:/opt/tomcat2/common/lib -classpath
/usr/java/lib/tools.jar:/opt/tomcat2/bin/bootstrap.jar
-Dcatalina.base=/opt/tomcat2 -Dcatalina.home=/opt/tomcat2
-Djava.io.tmpdir=/opt/tomcat2/temp org.apache.catalina.startup.Bootstrap
start

-Raj







**
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.
This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.
www.mimesweeper.com
**


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

  





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




RE: Broken Pipe Errors

2002-09-24 Thread Cato, Christopher

Good luck on the no-cache stuff. Does not work with IE, which has a mind of
it's own. IE does not adhere to the standards and the solution is to print
something unique in the start of the document. I've had more problems with
IE and caching than I care to recount.

/Christopher

 -Original Message-
 From: Anthony Milbourne [mailto:[EMAIL PROTECTED]]
 Sent: den 24 september 2002 11:09
 To: 'Tomcat Users List'
 Subject: RE: Broken Pipe Errors
 
 
 Hi
 
 Thanks for the feedback.  I don't think that, in our case, 
 there are any
 direct connections to Tomcat as it is behind a firewall and 
 only Apache is
 visible.  Also we put no-cache etc. in the headers - so 
 hopefully IE will
 not decide it hasn't changed.
 
 Thanks anyway,
 
   Anthony.
 
  -Original Message-
  From:   Mike Jackson [SMTP:[EMAIL PROTECTED]]
  Sent:   23 September 2002 23:34
  To: Tomcat Users List
  Subject:RE: Broken Pipe Errors
  
  In my experience those broken pipe errors seem to happen 
 most often when
  Internet Exploder decided that the page hasn't changed.  So 
 they may or
  may not be a real symtom of your problem.  But I only got 
 those when I
  was directly connecting to tomcat, not when I'm using 
 apache as a front
  end.  Don't know if that'll help, but maybe it will.
  
  --mikej
  -=-
  mike jackson
  [EMAIL PROTECTED]
  
  -Original Message-
  From: Anthony Milbourne [mailto:[EMAIL PROTECTED]]
  Sent: Monday, September 23, 2002 10:11 AM
  To: 'Tomcat Users List'
  Subject: Broken Pipe Errors
  
  
  Hi
  
  I have an install of Apache 1.3.26 talking over mod_jk 
 (4.0.4) to Tomcat
  4.0.4 on Solaris 8.
  
  All seems to work fine for a while (a couple of days 
 perhaps) - but after
  a
  while I get a lot of broken pipe errors in catalina_out.xxx.txt.  I
  previously thought these were due to a missmatch between 
 the number of
  tomcat processors (maxProcessors) and the number of Apache 
 clients, but
  this
  doesn't seem to be the case.  The errors are as below.
  
  2002-09-23 00:19:30 Ajp13Processor[8009][3] process: invoke
  java.io.IOException: Broken pipe
  at java.net.SocketOutputStream.socketWrite(Native Method)
  at java.net.SocketOutputStream.write(SocketOutputStream.java:91)
  at org.apache.ajp.Ajp13.send(Ajp13.java:525)
  at org.apache.ajp.RequestHandler.finish(RequestHandler.java:495)
  at org.apache.ajp.Ajp13.finish(Ajp13.java:395)
  at
  
 org.apache.ajp.tomcat4.Ajp13Response.finishResponse(Ajp13Respo
nse.java:196
  )
  at
  
 org.apache.ajp.tomcat4.Ajp13Processor.process(Ajp13Processor.java:464)
  at
  org.apache.ajp.tomcat4.Ajp13Processor.run(Ajp13Processor.java:551)
  at java.lang.Thread.run(Thread.java:479)
  
  2002-09-23 00:48:51 Ajp13Processor[8009][11] process: invoke
  java.io.IOException: Broken pipe
  at java.net.SocketOutputStream.socketWrite(Native Method)
  at java.net.SocketOutputStream.write(SocketOutputStream.java:91)
  at org.apache.ajp.Ajp13.send(Ajp13.java:525)
  at org.apache.ajp.RequestHandler.finish(RequestHandler.java:495)
  at org.apache.ajp.Ajp13.finish(Ajp13.java:395)
  at
  
 org.apache.ajp.tomcat4.Ajp13Response.finishResponse(Ajp13Respo
nse.java:196
  )
  at
  
 org.apache.ajp.tomcat4.Ajp13Processor.process(Ajp13Processor.java:464)
  at
  org.apache.ajp.tomcat4.Ajp13Processor.run(Ajp13Processor.java:551)
  at java.lang.Thread.run(Thread.java:479)
  
  
  Eventually I get the error (lots of times):
  
  2002-09-23 10:02:05 Ajp13Connector[8009] No processor 
 available, rejecting
  this connection
  
  Which is fairly serious as nobody can see the site at this point.
  At this point direct connections to Tomcat (via its HTTP 
 connector on port
  8080) don't get a response either.
  
  If anyone has any experience/info regarding this I would 
 love to hear it.
  
  Thanks,
  
  Anthony.
  
 
 
 **
 This email and any files transmitted with it are confidential and
 intended solely for the use of the individual or entity to whom they
 are addressed. If you have received this email in error please notify
 the system manager.
 This footnote also confirms that this email message has been swept by
 MIMEsweeper for the presence of computer viruses.
 www.mimesweeper.com
 **
 
 
 --
 To unsubscribe, e-mail:   
 mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: 
 mailto:[EMAIL PROTECTED]
 

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




AW: Broken Pipe Errors

2002-09-24 Thread Ralph Einfeldt

To deal with the no-cache stuff we put in every url
that shall not be cached a unique id that is incremented
with each request. This way you force even IE not to cache
the data. (Unless you use javascript() to navigate in the 
page history)

 -Ursprüngliche Nachricht-
 Von: Cato, Christopher [mailto:[EMAIL PROTECTED]]
 Gesendet: Dienstag, 24. September 2002 11:14
 An: 'Tomcat Users List'
 Betreff: RE: Broken Pipe Errors
 
 Good luck on the no-cache stuff. Does not work with IE, which 
 has a mind of it's own.


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




MOD_WEBAPP [error] Cannot shutdown warpConnection

2002-09-24 Thread Fabio Marsilio

Hi all,

I have a problem with apache + tomcat  (mod_webapp)

My configuration:

- Webserver Machine (Linux):  apache 1.3.26 + mod_ssl 2.8.10-1.3.26 +
mod_webapp 1.0.1

  (this Machine is in the firewall's Dmz)


- Jsp Machine (Solaris): tomcat 4.0.1

  (this machine is in the trusted network of the firewall)


The firewall has a rule that allows tcp traffic between the two machines on
port 8008 (webapp ponnector)

All worked fine between apache and tomcat until I began to use ssl.

I configured a virtual host with ssl and all worked fine but if I wait a
certain amount of time without browsing (at least 12 hours)

then the apache server seem not to respond any more.

Every time I try to connect to my jsp application it gives an error:

[error] Cannot shutdown warpConnection

If I connect to the httpd://myserver.com/webapp-info/ pages it says that the
link with the jsp machine is ok

If I restart apache (not tomcat!) all works again.

This did not happen with apache withous ssl.

If someone has any Idea .it's welcome!

I cannot make an apache restart every morning ...   : )

This will be soon a production site!!

Thank you in advance



Fabio Marsilio

[EMAIL PROTECTED]






Re: Cannot setup tomcat (again)

2002-09-24 Thread Marc

Hi!
I've reinstalled jdk and tomcat, again. After installation (unpacking tomcat and
setting the environment variables JAVA_HOME, CATALINA_HOME and PATH), I started
tomcat. In the catalina.out:

bash-2.05$ tail -f catalina.out
Sep 24, 2002 2:34:23 AM org.apache.commons.modeler.Registry loadRegistry

INFO: Loading registry information
Sep 24, 2002 2:34:23 AM org.apache.commons.modeler.Registry getRegistry
INFO: Creating new Registry instance
Sep 24, 2002 2:34:24 AM org.apache.commons.modeler.Registry getServer
INFO: Creating MBeanServer


This is all information stored in catalina.out (performed by the startup process).
When I tried to connect to http://my_server_ip:8080/index.jsp, my browser returned
an error, and the catalina.out was not changed. When I tried another time, the
server responded, and the following lines were written in the catalina.out:


Sep 24, 2002 2:37:34 AM org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on port 8080
Starting service Tomcat-Standalone
Apache Tomcat/4.1.10
Sep 24, 2002 2:37:41 AM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on port 8080
Sep 24, 2002 2:37:41 AM org.apache.jk.common.ChannelSocket init
INFO: JK2: ajp13 listening on tcp port 8009
Sep 24, 2002 2:37:41 AM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=1/38
config=/usr/local/tools/tomcat/conf/jk2.properties


I'll tried this process changing 'localhost' for 'my_server_ip' in the
$CATALINA_HOME/conf/server.xml, and using jdk 1.3, but the process had the same
behavior.

And, of course, I couldn't shutdown tomcat with shutdown.sh.

Any idea?

Marc


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




Re: compiler runs out of memory

2002-09-24 Thread Ben Walding

One of the bugs fixed in JDK 1.4.1 is the leaking of memory in the java 
compiler.  This may fix the memory leak that you are seeing...

Kwok Peng Tuck wrote:

 You could increase the heap size as the error message suggested or 
 stream line your code
 so that it is more efficient :)

 # Lalit Nagpal # wrote:

 hello ...

 This is a frequent problem that i face with tomcat ...

 here is the output in catalina.out ... is increasing
 the heap size the only option ... if yes ... plz tell
 me how to 

 the stack trace is as follows ...

 type Exception report

 message
 description The server encountered an internal error
 () that prevented it from fulfilling this request.

 exception
 org.apache.jasper.JasperException: Unable to compile
 class for JSPThe compiler has run out of memory. Consider using the 
 -J-mxnumber command line option
 to increase the maximum heap size.

 at
 org.apache.jasper.compiler.Compiler.compile(Unknown
 Source)
 at
 org.apache.jasper.servlet.JspServlet.loadJSP(Unknown
 Source)
 at
 org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary(Unknown 

 Source)
 at
 org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(Unknown
 Source)
 at
 org.apache.jasper.servlet.JspServlet.serviceJspFile(Unknown
 Source)
 at
 org.apache.jasper.servlet.JspServlet.service(Unknown
 Source)
 at
 javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
 at
 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Unknown
 Source)
 at
 org.apache.catalina.core.ApplicationFilterChain.doFilter(Unknown
 Source)
 at
 org.apache.catalina.core.StandardWrapperValve.invoke(Unknown
 Source)
 at
 org.apache.catalina.core.StandardPipeline.invokeNext(Unknown
 Source)
 at
 org.apache.catalina.core.StandardPipeline.invoke(Unknown
 Source)
 at
 org.apache.catalina.core.ContainerBase.invoke(Unknown
 Source)
 at
 org.apache.catalina.core.StandardContextValve.invoke(Unknown
 Source)
 at
 org.apache.catalina.core.StandardPipeline.invokeNext(Unknown
 Source)
 at
 org.apache.catalina.core.StandardPipeline.invoke(Unknown
 Source)
 at
 org.apache.catalina.core.ContainerBase.invoke(Unknown
 Source)
 at
 org.apache.catalina.core.StandardContext.invoke(Unknown
 Source)
 at
 org.apache.catalina.core.StandardHostValve.invoke(Unknown
 Source)
 at
 org.apache.catalina.core.StandardPipeline.invokeNext(Unknown
 Source)
 at
 org.apache.catalina.valves.ErrorDispatcherValve.invoke(Unknown
 Source)
 at
 org.apache.catalina.core.StandardPipeline.invokeNext(Unknown
 Source)
 at
 org.apache.catalina.valves.ErrorReportValve.invoke(Unknown
 Source)
 at
 org.apache.catalina.core.StandardPipeline.invokeNext(Unknown
 Source)
 at
 org.apache.catalina.valves.AccessLogValve.invoke(Unknown
 Source)
 at
 org.apache.catalina.core.StandardPipeline.invokeNext(Unknown
 Source)
 at
 org.apache.catalina.core.StandardPipeline.invoke(Unknown
 Source)
 at
 org.apache.catalina.core.ContainerBase.invoke(Unknown
 Source)
 at
 org.apache.catalina.core.StandardEngineValve.invoke(Unknown
 Source)
 at
 org.apache.catalina.core.StandardPipeline.invokeNext(Unknown
 Source)
 at
 org.apache.catalina.core.StandardPipeline.invoke(Unknown
 Source)
 at
 org.apache.catalina.core.ContainerBase.invoke(Unknown
 Source)
 at
 org.apache.coyote.tomcat4.CoyoteProcessor.service(CoyoteProcessor.java:311) 

 at
 org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:305) 

 at
 org.apache.coyote.tomcat4.CoyoteProcessor.process(CoyoteProcessor.java:785) 

 at
 org.apache.coyote.tomcat4.CoyoteProcessor.run(CoyoteProcessor.java:864)
 at java.lang.Thread.run(Thread.java:484)



  


 Apache Tomcat/4.1-dev



 =
 # Lalit Nagpal #

 __
 Do you Yahoo!?
 New DSL Internet Access from SBC  Yahoo!
 http://sbc.yahoo.com

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


  




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






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




Exception management in the contextInitialized method of the HttpServletContextListener class

2002-09-24 Thread Heligon Sandra


I use the HttpServletContextListener class to make initializations
but if a problem arrives during this phase of initialization 
I do not know how to manage the exceptions and to inform the
customer of the problem.  
Would somebody have an example of exception's management in this
type of listener? 

public void contextInitialized(ServletContextEvent arg0) 
{
try
{
..
}
catch (??)
{
  ??
  return;
}
}

I wish that the contextInitialized method  not be called during
the deployment of the application (Tomcat being launched in service NT) 
but on the first request how is it possible?  

Thanks a lot in advance 
Sandra



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




So what database and script language do you use?

2002-09-24 Thread Keith Pemberton

Hi everyone...

 I have been trying to use MySQL and JSP,Servlets to interact with
my tomcat server.  So far I have had a lot of frustration and little
luck.  Anyway, I was just wonder what the majority of ppl are using as a
database and scripting language.  Your input is much appreciated!

Keith





RE: So what database and script language do you use?

2002-09-24 Thread Cato, Christopher

Apache + TomCat / MySQL / JSP
Apache + mod_perl / MySQL / Perl

are the two combinations I use

/christopher

 -Original Message-
 From: Keith Pemberton [mailto:[EMAIL PROTECTED]]
 Sent: den 24 september 2002 12:39
 To: [EMAIL PROTECTED]
 Subject: So what database and script language do you use?
 
 
 Hi everyone...
 
  I have been trying to use MySQL and JSP,Servlets to interact with
 my tomcat server.  So far I have had a lot of frustration and little
 luck.  Anyway, I was just wonder what the majority of ppl are 
 using as a
 database and scripting language.  Your input is much appreciated!
 
 Keith
 
 
 

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




Re: Cannot load JDBC driver class 'null'

2002-09-24 Thread John Walstra

Ok since I'm getting no where fast, is there way to debug a DataSource? Look 
it's settings?


On Sunday 22 September 2002 11:14 pm, Jacob Kjome wrote:
 Yes, it should find it.  Have you verified that the class in the
 driverClassName element actually does exist in that package in the jar file
 you just mentioned?

 Jake

 At 10:56 PM 9/22/2002 -0500, you wrote:
 I do have mysql-connector-java-2.0.14-bin.jar in the common/lib directory.
 Shouldn't it find the correct class being there?
 
 On Sunday 22 September 2002 10:39 pm, Kwok Peng Tuck wrote:
   Are you actually using the mysql driver? Cause if it says loading
   driver null, means there isn't one.
  
   John Walstra wrote:
   I'm trying to set up a JNDI connection to MySQL. I'm using the binary
release of 4.1.11 with 4.0.4's jasper-compiler.jar and
jasper-runtime.jar. I'm also using mysql-connector-java-2.0.14.
   
   It's very similar to this thread
   http://www.mail-archive.com/tomcat-user@jakarta.apache.org/msg64346.ht
   ml , however I still can't get mine working after reading that thread.
I've basically followed (cut and paste) the JNDI Datasource HOWTO,
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-datasource-examp
   les-h owto.html .
   
   Here is the Context section of my server.xml
   
   Context path=/jkw
docBase=/usr/local/web/meta-htdocs/JWALSTRA/htdocs/jsp
   debug=5 useNaming=true
   reloadable=true crossContext=true
   
Logger className=org.apache.catalina.logger.FileLogger
prefix=jkw_log. suffix=.txt
timestamp=true/
   
Resource name=jdbc/JKW
auth=Container
type=javax.sql.DataSource/
   
ResourceParams name=jdbc/JKW
parameter
namefactory/name
 
  valueorg.apache.commons.dbcp.BasicDataSourceFactory/value
 
/parameter
   
!-- Maximum number of dB connections in pool.
 
  Make sure you
 
configure your mysqld max_connections
 
  large enough to handle
 
all of your db connections. Set to 0 for
 
  no limit.
 
--
parameter
namemaxActive/name
value100/value
/parameter
   
!-- Maximum number of idle dB connections to
 
  retain in pool.
 
Set to 0 for no limit.
--
parameter
namemaxIdle/name
value30/value
/parameter
   
!-- Maximum time to wait for a dB connection to
 
  become available
 
in ms, in this example 10 seconds. An
 
  Exception is thrown if
 
this timeout is exceeded.  Set to -1 to
 
  wait indefinitely.
 
--
parameter
namemaxWait/name
value1/value
/parameter
   
!-- MySQL dB username and password for dB
 
  connections  --
 
parameter
nameusername/name
valuenobody/value
/parameter
parameter
namepassword/name
value/value
/parameter
   
!-- Class name for mm.mysql JDBC driver --
parameter
namedriverClassName/name
valuecom.mysql.jdbc.Driver/value
/parameter
   
!-- The JDBC connection url for connecting to
 
  your MySQL dB.
 
The autoReconnect=true argument to the
 
  url makes sure that the
 
mm.mysql JDBC Driver will automatically
 
  reconnect if mysqld closed the
 
connection.  mysqld by default closes
 
  idle connections after 8 hours.
 
--
   
parameter
nameurl/name
 
  valuejdbc:mysql://localhost:3306/jkw?autoReconnect=true/value
 
/parameter
/ResourceParams
   /Context
   
   Here is my web.xml
   
   ?xml version=1.0 encoding=ISO-8859-1?
   
   !DOCTYPE web-app
   PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN
   http://java.sun.com/dtd/web-app_2_3.dtd;
   
   web-app
   
 taglib
   taglib-uri
 /orataglib
   /taglib-uri

Web application deployment with .xml files with multiple virtual hosts

2002-09-24 Thread Raj Saini

 Hi,

I am using Tomcat 4.1.10. I integrated with Apache 1.3.x. I have
multiple virtual hosts configured on tomcat.

Tomcat 4.1.10 have a feature where we can deploy an application 
by
coping a .xml file in with webapps directory. There are examples
of admin and maanger applications.

I want to deploy the applications with the .xml file with 
multiple
virtual hosts and integrate with apache. In the server.xml file
contexts related to a virtual host are created under that
particular virtual host. How this can be achieved with .xml
file.

I feel, by default the applications deployed from .xml files are
assocaited with the defaulthost. Is there a way to associate 
these
applications to a virtual host other then default virtual hosts?

Thanks

Raj Saini 



RE: So what database and script language do you use?

2002-09-24 Thread Keith Pemberton

Do you use auto_increment fields in any of your tables in MySQL.  If so,
have you found a good way to put entries into the table that has an
auto_increment field.  Everything I try will not automatically generate
that field when I insert something from either a JSP page or servlet

Keith

On Tue, 2002-09-24 at 05:58, Cato, Christopher wrote:

Apache + TomCat / MySQL / JSP
Apache + mod_perl / MySQL / Perl

are the two combinations I use

/christopher

 -Original Message-
 From: Keith Pemberton [mailto:[EMAIL PROTECTED]]
 Sent: den 24 september 2002 12:39
 To: [EMAIL PROTECTED]
 Subject: So what database and script language do you use?
 
 
 Hi everyone...
 
  I have been trying to use MySQL and JSP,Servlets to interact with
 my tomcat server.  So far I have had a lot of frustration and little
 luck.  Anyway, I was just wonder what the majority of ppl are 
 using as a
 database and scripting language.  Your input is much appreciated!
 
 Keith
 
 
 

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





Re: So what database and script language do you use?

2002-09-24 Thread Carl

Keith,

I use MySQL with autincrement fields in essentailly all of my tables.  I
keep all database activities in beans associated with the jsp pages.  I use
a home rolled connection pooling process (actually copied from somewhere.)
Below is an insert from one of the beans:
String query=insert into assigning_preferences set 
+item_serial=+item_serial+,
+weeks_of_month=+weeks_of_month+,
+always_use_this=+always_use_this+,
+last_person_serial=+personSerial;


In this case the autoincrement field is called
assigning_preferences_serial... note that it is left out of the insert query
thereby telling MySQL to create a value for the field.  Works flawlessly and
has been very stable.

Thanks,

Carl Kabbe



- Original Message -
From: Keith Pemberton [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Tuesday, September 24, 2002 7:20 AM
Subject: RE: So what database and script language do you use?


 Do you use auto_increment fields in any of your tables in MySQL.  If so,
 have you found a good way to put entries into the table that has an
 auto_increment field.  Everything I try will not automatically generate
 that field when I insert something from either a JSP page or servlet

 Keith

 On Tue, 2002-09-24 at 05:58, Cato, Christopher wrote:

 Apache + TomCat / MySQL / JSP
 Apache + mod_perl / MySQL / Perl

 are the two combinations I use

 /christopher

  -Original Message-
  From: Keith Pemberton [mailto:[EMAIL PROTECTED]]
  Sent: den 24 september 2002 12:39
  To: [EMAIL PROTECTED]
  Subject: So what database and script language do you use?
 
 
  Hi everyone...
 
   I have been trying to use MySQL and JSP,Servlets to interact
with
  my tomcat server.  So far I have had a lot of frustration and little
  luck.  Anyway, I was just wonder what the majority of ppl are
  using as a
  database and scripting language.  Your input is much appreciated!
 
  Keith
 
 
 

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





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




RE: So what database and script language do you use?

2002-09-24 Thread Cato, Christopher

Yes I have.

Assuming your table looks like this:

id int auto_increment not null,
bla varchar(128),
blabla varchar(128)

My insert would be:
INSERT INTO tablename VALUES(\N,blablabla,blablabla)

The \N or NULL creates the auto_increment stuff. It can then be retrieved
like this:


org.gjt.mm.mysql.Statement stmt =
(org.gjt.mm.mysql.Statement)con.createStatement();
count = stmt.executeUpdate(INSERT INTO tablename
VALUES(NULL,'blablabla','blablabla'));
last_id = (int)stmt.getLastInsertID();
String str_last_id =  + last_id;


/Christopher

 -Original Message-
 From: Carl [mailto:[EMAIL PROTECTED]]
 Sent: den 24 september 2002 13:32
 To: Tomcat Users List
 Subject: Re: So what database and script language do you use?
 
 
 Keith,
 
 I use MySQL with autincrement fields in essentailly all of my 
 tables.  I
 keep all database activities in beans associated with the jsp 
 pages.  I use
 a home rolled connection pooling process (actually copied 
 from somewhere.)
 Below is an insert from one of the beans:
 String query=insert into assigning_preferences set 
 +item_serial=+item_serial+,
 +weeks_of_month=+weeks_of_month+,
 +always_use_this=+always_use_this+,
 +last_person_serial=+personSerial;
 
 
 In this case the autoincrement field is called
 assigning_preferences_serial... note that it is left out of 
 the insert query
 thereby telling MySQL to create a value for the field.  Works 
 flawlessly and
 has been very stable.
 
 Thanks,
 
 Carl Kabbe
 
 
 
 - Original Message -
 From: Keith Pemberton [EMAIL PROTECTED]
 To: Tomcat Users List [EMAIL PROTECTED]
 Sent: Tuesday, September 24, 2002 7:20 AM
 Subject: RE: So what database and script language do you use?
 
 
  Do you use auto_increment fields in any of your tables in 
 MySQL.  If so,
  have you found a good way to put entries into the table that has an
  auto_increment field.  Everything I try will not 
 automatically generate
  that field when I insert something from either a JSP page or servlet
 
  Keith
 
  On Tue, 2002-09-24 at 05:58, Cato, Christopher wrote:
 
  Apache + TomCat / MySQL / JSP
  Apache + mod_perl / MySQL / Perl
 
  are the two combinations I use
 
  /christopher
 
   -Original Message-
   From: Keith Pemberton [mailto:[EMAIL PROTECTED]]
   Sent: den 24 september 2002 12:39
   To: [EMAIL PROTECTED]
   Subject: So what database and script language do you use?
  
  
   Hi everyone...
  
I have been trying to use MySQL and JSP,Servlets 
 to interact
 with
   my tomcat server.  So far I have had a lot of 
 frustration and little
   luck.  Anyway, I was just wonder what the majority of ppl are
   using as a
   database and scripting language.  Your input is much 
 appreciated!
  
   Keith
  
  
  
 
  --
  To unsubscribe, e-mail:
 mailto:[EMAIL PROTECTED]
  For additional commands, e-mail:
 mailto:[EMAIL PROTECTED]
 
 
 
 
 
 --
 To unsubscribe, e-mail:   
 mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: 
 mailto:[EMAIL PROTECTED]
 

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




Re: So what database and script language do you use?

2002-09-24 Thread John Walstra

Just my preference. If you are taking user input, say from a HTML input box, 
you want to use PrepareStatment to formulate your SQL statement.

String query=SELECT info FROM superSecretTable WHERE password=?;
PreparedStatement pstmt = conn.prepareStatement( query );
pstmt.setString( 1, enteredPassword );

It's safer. A user, if they know your tables (angry ex-employee), could always 
enter SQL along with their data.

For exmaple, if I entered .. 'baddata OR password LIKE %' I'd get all the 
info from superSecretTable.

On Tuesday 24 September 2002 6:32 am, Carl wrote:
 Keith,

 I use MySQL with autincrement fields in essentailly all of my tables.  I
 keep all database activities in beans associated with the jsp pages.  I use
 a home rolled connection pooling process (actually copied from somewhere.)
 Below is an insert from one of the beans:
 String query=insert into assigning_preferences set 
 +item_serial=+item_serial+,
 +weeks_of_month=+weeks_of_month+,
 +always_use_this=+always_use_this+,
 +last_person_serial=+personSerial;


 In this case the autoincrement field is called
 assigning_preferences_serial... note that it is left out of the insert
 query thereby telling MySQL to create a value for the field.  Works
 flawlessly and has been very stable.

 Thanks,

 Carl Kabbe



 - Original Message -
 From: Keith Pemberton [EMAIL PROTECTED]
 To: Tomcat Users List [EMAIL PROTECTED]
 Sent: Tuesday, September 24, 2002 7:20 AM
 Subject: RE: So what database and script language do you use?

  Do you use auto_increment fields in any of your tables in MySQL.  If so,
  have you found a good way to put entries into the table that has an
  auto_increment field.  Everything I try will not automatically generate
  that field when I insert something from either a JSP page or servlet
 
  Keith
 
  On Tue, 2002-09-24 at 05:58, Cato, Christopher wrote:
 
  Apache + TomCat / MySQL / JSP
  Apache + mod_perl / MySQL / Perl
 
  are the two combinations I use
 
  /christopher
 
   -Original Message-
   From: Keith Pemberton [mailto:[EMAIL PROTECTED]]
   Sent: den 24 september 2002 12:39
   To: [EMAIL PROTECTED]
   Subject: So what database and script language do you use?
  
  
   Hi everyone...
  
I have been trying to use MySQL and JSP,Servlets to interact

 with

   my tomcat server.  So far I have had a lot of frustration and
   little luck.  Anyway, I was just wonder what the majority of ppl
   are using as a
   database and scripting language.  Your input is much appreciated!
  
   Keith
 
  --
  To unsubscribe, e-mail:

 mailto:[EMAIL PROTECTED]

  For additional commands, e-mail:

 mailto:[EMAIL PROTECTED]

-- 
John Walstra
1002 North Stanford Street
Port Washington, WI 53074
H: (262) 284-2395
C: (847) 858-2395

[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]

No one knows what he can do till he tries.
-- Publilius Syrus

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




[SECURITY] Apache Tomcat 4.x JSP source disclosure vulnerability

2002-09-24 Thread Remy Maucherat

A security vulnerability has been confirmed to exist in all Apache 
Tomcat 4.x releases (including Tomcat 4.0.4 and Tomcat 4.1.10), which 
allows to use a specially crafted URL to return the unprocessed source 
of a JSP page, or, under special circumstances, a static resource which 
would otherwise have been protected by security constraint, without the 
need for being properly authenticated.

The cause
-

Using the invoker servlet in conjunction with the default servlet 
(responsible for handling static content in Tomcat) triggers this 
vulnerability. This particular configuration is available in the default 
Tomcat configuration.

Workarounds
---

An easy workaround exists for existing Tomcat installations, by 
disabling the invoker servlet in the default webapp configuration.

In the $CATALINA_HOME/conf/web.xml file (on Windows, 
%CATALINA_HOME%\conf\web.xml), comment out or remove the following XML 
fragment:

 servlet-mapping
 servlet-nameinvoker/servlet-name
 url-pattern/servlet/*/url-pattern
 /servlet-mapping

Releases


The Apache Tomcat Team announces the immediate availability of new 
releases which include a fix to the invoker servlet.

Apache Tomcat 4.1.12 Stable:
http://jakarta.apache.org/builds/jakarta-tomcat-4.0/release/v4.1.12/

Apache Tomcat 4.0.5:
http://jakarta.apache.org/builds/jakarta-tomcat-4.0/release/v4.0.5/

Remy


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




Re: Antwort: Re: Tomcat 4.1.10 - JSP Compile Error

2002-09-24 Thread Sven Hoffmann

Hi,
thank you for your advice. Of course I imported the package in my JSP. But I
created the directory as Web-Inf and not WEB-INF. That was the fault.
Now it's running! Thank you again!

Buy
Sven.

 Hi,
 sorry, that I ask, but do you have imported your package or class in the
 JSP?
 i.e %@ page import=tracking.* % or %@ page import=tracking.TestBean
%

 Because, if I copy my application to the webapps directory everything
works.
 And my packages are under classes\de\porsche\...

 Another possibility for your problem might be, that you did not create the
directory
 WEB-INF with capital letters only.

 Best regards,
 Gunter





 Sven Hoffmann [EMAIL PROTECTED] am 24.09.2002 02:01:28

 Bitte antworten an Tomcat Users List [EMAIL PROTECTED]

 An:Tomcat Users List [EMAIL PROTECTED]
 Kopie:

 Thema: Re: Tomcat 4.1.10 - JSP Compile Error


 Hi,
 I've a similar problem with tomcat 4.1.10. I've stored all my JSP's in
 %Tomcat_Home%/webapps/ and the class-files (which belong to the package
 tracking) in %TOMCAT_Home%/webapps/Web-inf/classes/tracking. When Tomcat
 tries to compile a JSP that wants to use a Java class I get the following
 error:
 cannot resolve symbol
 symbol  : class TestBean
 location: package tracking
 import tracking.TestBean;
 ...

 In the mailing list I got the hint that this could be a bug in version
 4.1.10 when it isn't installed on drive C: and that I should install it on
 that drive or switch to version 4.1.11. So I installed version 4.1.11 in
 directory C:\Programme\Apache\Tomcat_4.1.11 but I already got the same
 error. Because of that I think that your error isn't caused by the fact
 that
 you haven't stored your web application under %TOMCAT_Home%/webapps/...

 If you have a solution for your problem please let me know!
 Thanks in advance!

 Bye
 Sven.



  Hi,
  I have installed Tomcat 4.1.10 on C:\Tomcat41. I have an application
 which
  is on d:\appdir\wws2Java.
  The CATALINA_HOME is set to C:\Tomcat41
  CATALINA_BASE is not set.
 
  I set the context Section in server.xml as follows:
  !Context path=/wws2Java
   docBase=d:\appdir\wws2Java
   crossContext=true
   debug=2
   reloadable=true
  !/Context
 
  All the files which belongs to the application reside in the wws2Java
 directory.
  The subdir structure is the same as in the standard webapps directory.
  (WEB-INF, classes and so on).
  Under Tomcat 3.2 this works perfectly.
  Now under Tomcat the compilation of the JSP fails because the compiler
  cannot find the imported packages of my application. This seems to
happen
  because Tomcat 4 is no longer using the information of the classpath
 environment
  setting.
  I read the documentation and searched the web to find out how I can
 convince
  Tomcat that my classes are also to be found under the docbase directory.
 
  In the classloader HowTo I found the following:
 
  /WEB-INF/classes of your web application
  /WEB-INF/lib/*.jar of your web application
  Bootstrap classes of your JVM
  System class loader classses (described above)
  $CATALINA_HOME/common/classes
  $CATALINA_HOME/common/endorsed/*.jar
  $CATALINA_HOME/common/lib/*.jar
  $CATALINA_HOME/shared/classes
  $CATALINA_HOME/shared/lib/*.jar
 
  From this I would expect that my WEB-INF/classes directory will be
 searched first.
 
  BTW - If I copy my wws2Java directory to the tomcat webapps directory on
 c-drive
  everything works - except for the following error:
 
  Generated servlet error:
  [javac] Compiling 1 source file
  C:\Tomcat41\work\Standalone\localhost\wws2Java\index_jsp.java:42:
 jspDestroy()
  is already defined in org.apache.jsp.index_jsp  public void jspDestroy()
 { ...
 
  What do I have to do, that the compiler finds the classes ?
 
  And - not my major problem - why is it no longer possible to have a own
 jspDestroy
  implementation
 
  TIA and best regards,
  Gunter
 
 
 
 
 
 
  --
  To unsubscribe, e-mail:
 mailto:[EMAIL PROTECTED]
  For additional commands, e-mail:
 mailto:[EMAIL PROTECTED]
 
 


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













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




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




RE: Special consideration of invoking native methods in Tomcat?

2002-09-24 Thread Cox, Charlie

you're going to have to provide the error message. Look in the tomcat logs
and post the stack trace.

Charlie

 -Original Message-
 From: Furlan Bojan ITWET2 [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, September 24, 2002 4:13 AM
 To: 'Tomcat Users List'
 Subject: RE: Special consideration of invoking native methods 
 in Tomcat?
 
 
 I may be wrong, but I believe I have set the socket for 
 Tomcat access to
 8080 since another web server is running on the same server. 
 The sockets
 used by the legacy system I'm trying to access are completely 
 different.
 
 -Original Message-
 From: Collins, Jim [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, September 24, 2002 10:06 AM
 To: 'Tomcat Users List'
 Subject: RE: Special consideration of invoking native methods 
 in Tomcat?
 
 
 A possibility is Tomcat is already using the socket.
 
  -Original Message-
  From: Furlan Bojan ITWET2 [mailto:[EMAIL PROTECTED]]
  Sent: 24 September 2002 09:01
  To: '[EMAIL PROTECTED]'
  Subject: Special consideration of invoking native methods in Tomcat?
  
  
  I am trying to access existing legacy system in our company 
  over JSP running
  on Tomcat. Using JNI, I am now able to call one of the C functions
  (something like connect to a server and select database) from 
  existing API.
  The call succeeds, but it results in error during execution of that
  function. The same call in a standalone java application is always
  successful.
  As far as I know, API communicates to server over socket 
  mechanism. What
  would be a difference between calling such a native function 
  in standalone
  Java application and using the same in JSP? I'm new in Java 
  environment,
  Tomcat and JSP, so I would appreciate any hint.
  
  Regards
  Bojan Furlan 
  
  --
  To unsubscribe, e-mail:   
  mailto:[EMAIL PROTECTED]
  For additional commands, e-mail: 
  mailto:[EMAIL PROTECTED]
  
 
 
 PLEASE READ: The information contained in this email is confidential
 and intended for the named recipient(s) only. If you are not 
 an intended
 recipient of this email you must not copy, distribute or take any 
 further action in reliance on it and you should delete it and 
 notify the
 sender immediately. Email is not a secure method of communication and 
 Nomura International plc cannot accept responsibility for the accuracy
 or completeness of this message or any attachment(s). Please 
 examine this
 email for virus infection, for which Nomura International plc accepts
 no responsibility. If verification of this email is sought then please
 request a hard copy. Unless otherwise stated any views or opinions
 presented are solely those of the author and do not represent those of
 Nomura International plc. This email is intended for informational
 purposes only and is not a solicitation or offer to buy or sell
 securities or related financial instruments. Nomura 
 International plc is
 regulated by the Financial Services Authority and is a member of the
 London Stock Exchange.
 
 
 
 --
 To unsubscribe, e-mail:
 mailto:[EMAIL PROTECTED]
 For additional commands, e-mail:
 mailto:[EMAIL PROTECTED]
 
 --
 To unsubscribe, e-mail:   
 mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: 
 mailto:[EMAIL PROTECTED]
 

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




Trouble shooting Tomcat 4.0.3 /SSL

2002-09-24 Thread Marie-Josée Demay


Hello

I am using tomcat 4.0.3 / jsdk 1.4.0 / openssl 0.9.6b.8 on linux redhat 7.2.

When i create a self signed certificate whith keytool -genkey -alias
omcat  -keyalg RSA  ...
it works fine .

When i build a CA and i generate a certificate whith the folowing openssl
command :
-1- Certificat Generation
openssl genrsa  -out server.key -des3 1024
openssl req -new   -days 365 -key server.key -out server.csr

-2- CA signature of the certificate
openssl ca  -out server.crt   -extensions SERVER_SSL

-3- export in X509 format
openssl x509-in server.crt  -out server.x509
-4- import into keystore :
keytool -import -alias tomcat -trustcacerts  -file server.x509

the tomcat engine start but when i call the starting jsp the page doesnt
appear, there's no error.

I register the ca.crt and the server.crt in my IE 5.5

Can you help me ?

Thanks

MJD


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




RE: Sharing multiple versions of jars

2002-09-24 Thread Cox, Charlie

no, there is no easy way to do this.

you can only have one version of a library opened at a time within a 
classloader. Since each webapp has its own classloader, you can put all
servlets requiring library.jar 1.0 into one context and the others into
another context. But then any other jars in /WEB-INF/lib will need to be
copied into both contexts or you will have to put them in /common/lib to
share them between contexts.

Charlie

 -Original Message-
 From: Matt Zimmerman [mailto:[EMAIL PROTECTED]]
 Sent: Monday, September 23, 2002 5:03 PM
 To: [EMAIL PROTECTED]
 Subject: Sharing multiple versions of jars
 
 
 [resending because apparently my subscribption request didn't 
 go through,
 and posts are not accepted from non-subscribers]
 
 In my environment, I need to support using different versions 
 of certain
 JARs with different webapps.  For example, servlet #1, #2 and 
 #4 require
 library.jar version 1.0, while #3, #5 and #6 require 
 library.jar version
 1.1.
 
 For various reasons, I want these jars to be loaded just 
 once, and shared
 between all servlets which require them.  The current 
 classloader hierarchy
 does not seem to support this in a straightforward way.  Is there a
 mechanism for this that I have missed, or is it something 
 that I would need
 to implement using a custom loader (or several)?
 
 -- 
  - mdz
 
 --
 To unsubscribe, e-mail:   
 mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: 
 mailto:[EMAIL PROTECTED]
 

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




RE: where to put mod_jk.conf

2002-09-24 Thread Turner, John


Agreed.  My assumption was a sys-admin assumption...that is, Tomcat is only
started if there is a change.  I can't think of a reason to stop/start it
otherwise.

John


 -Original Message-
 From: Milt Epstein [mailto:[EMAIL PROTECTED]]
 Sent: Monday, September 23, 2002 7:45 PM
 To: Tomcat Users List
 Subject: RE: where to put mod_jk.conf
 
 
 On Mon, 23 Sep 2002, Turner, John wrote:
 
  Yes, you need to copy the mod_jk.conf to the Apache box each time
  Tomcat is started.
 [ ... ]
 
 I don't think this is quite true -- I'd say it only needs to be copied
 if the Tomcat configuration changes -- and that's represented by
 server.xml, the directories under webapps, and perhaps some other
 things.  But if those are in a steady state, there shouldn't need to
 be any changes to the mod_jk conf -- and I'd even remove (or comment
 out) the Listener lines in server.xml that are creating it.
 
 So, it depends on what kind of environment the person is working in --
 production, where things change rarely, or development, where things
 may change much more often.
 
 
   -Original Message-
   From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
   Sent: Sunday, September 22, 2002 7:56 PM
   To: [EMAIL PROTECTED]
   Subject: where to put mod_jk.conf
  
  
   Hi all.
   Tomcat is generating
   /usr/local/jakarta-tomcat-4.0.4/conf/auto/mod_jk.conf
   everytime I start
   Tomcat on BoxAAA. Apache is intentionally disabled on this box .
   In BoxBBB , Apache2 is enable and its httpd.conf modified 
 to Include
   /usr/local/tomcat4/conf/auto/mod_jk.conf , do I need to copy
   the .conf
   file from BoxAAA to BoxBBB everytime Tomcat creates a new one ???
   Do I assume right that mod_jk.so is stays with Apache and
   does not need
   to be refreshed ???
  
   --
   To unsubscribe, e-mail:
   mailto:[EMAIL PROTECTED]
   For additional commands, e-mail:
   mailto:[EMAIL PROTECTED]
  
 
  --
  To unsubscribe, e-mail:   
 mailto:[EMAIL PROTECTED]
  For additional commands, e-mail: 
 mailto:[EMAIL PROTECTED]
 
 
 Milt Epstein
 Research Programmer
 Integration and Software Engineering (ISE)
 Campus Information Technologies and Educational Services (CITES)
 University of Illinois at Urbana-Champaign (UIUC)
 [EMAIL PROTECTED]
 
 
 --
 To unsubscribe, e-mail:   
 mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: 
 mailto:[EMAIL PROTECTED]
 

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




RE: jk_ajp errors in mod_jk.log ???

2002-09-24 Thread Turner, John


Ok, thanks.

John


 -Original Message-
 From: Anthony Milbourne [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, September 24, 2002 4:34 AM
 To: 'Tomcat Users List'
 Subject: RE: jk_ajp errors in mod_jk.log ???
 
 
 Hi John
 
 I onjy just noticed that this is in your HowTo (Apache 1.3.26 - Tomcat
 4.0.4, at least) as well as in the list archives.  The example
 wrokers.properties file you have given has a minor error.  It 
 should be:
 
   # BEGIN workers.properties
   #
   # Setup for apache system
   #
   # make this equal to CATALINA_HOME
   workers.tomcat_home=/usr/local/jakarta-tomcat-4.0.4
   #
   # make this equal to JAVA_HOME
   workers.java_home=/usr/java/j2sdk1.4.0_01
   #
   ps=/
   worker.list=ajp13
   
   # Definition for Ajp13 worker
   #
   worker.ajp13.port=8009
   
   # change this line to match apache ServerName and Host name in
 server.xml
   worker.ajp13.host=localhost
   
   worker.ajp13.type=ajp13
   #
   # END workers.properties
   I have removed ajp12 from line 12 as Tomcat 4.0.4 
 doesn't need it
 (as far as I know) and if you have it there without the appropriate
 connector defined in server.xml it causes communication errors.
   I hope that helps...
   Anthony.
 
 
  -Original Message-
  From:   Turner, John [SMTP:[EMAIL PROTECTED]]
  Sent:   23 September 2002 17:27
  To: 'Tomcat Users List'
  Subject:RE: jk_ajp errors in mod_jk.log ???
  
  
  Oops.  What's the fixed file, or the fix itself?  I will 
 gladly update
  things.
  
  John
  
  
   -Original Message-
   From: Anthony Milbourne [mailto:[EMAIL PROTECTED]]
   Sent: Monday, September 23, 2002 12:24 PM
   To: 'Tomcat Users List'
   Subject: RE: jk_ajp errors in mod_jk.log ???
   
   
   It looks to me like you may have an extra ajp entry in your 
   config file.
   Try getting rid of the ajp12 connector int the worker list.
   
   John accidentally posted a broken file to this list in a 
   reply to one of my
   questions.  It caused me loads of trouble, although I'm not 
   complaining as
   John (and his HowTo) has solved many problems for me.  
   Unfortunately a lot
   of people must have used it.
   
   Hope that helps,
   
 Anthony.
   
-Original Message-
From:   [EMAIL PROTECTED] [SMTP:[EMAIL PROTECTED]]
Sent:   23 September 2002 02:15
To: Tomcat Users List
Subject:Re: jk_ajp errors in mod_jk.log ???

snip
 Please post the contents of your workers.properties file.
 
 This error seems to indicate that your apache machine 
   cannot establish a
 connection to the tomcat machine.  You are running apache 
   and tomcat on
 different machines, correct?
Correct, I am running them on different machines.
Attached hereto the workers.properties in 
   /usr/local/tomcat4/conf/jk 
File: workers.propertiesFile: ATT553709.txt  
  
 
 
 **
 This email and any files transmitted with it are confidential and
 intended solely for the use of the individual or entity to whom they
 are addressed. If you have received this email in error please notify
 the system manager.
 This footnote also confirms that this email message has been swept by
 MIMEsweeper for the presence of computer viruses.
 www.mimesweeper.com
 **
 
 
 --
 To unsubscribe, e-mail:   
mailto:[EMAIL PROTECTED]
For additional commands, e-mail:
mailto:[EMAIL PROTECTED]

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




allowLinking option

2002-09-24 Thread John Walstra

From the 4.1.12 release notes

---
Symlinking static resources:
---

Unix symlinks will not work when used in a web application to link resources
located outside the web application root directory.

This behavior is optional, and the allowLinking flag may be used to disable
the check.
--

But where to use?

-- 
John Walstra
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]

Deflector shields just came on, Captain.

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




RE: So what database and script language do you use?

2002-09-24 Thread Miguel Angel Mulero Martinez

I use JSP, servlets and MySQL. What's your problem?

-Mensaje original-
De: Keith Pemberton [mailto:[EMAIL PROTECTED]]
Enviado el: martes, 24 de septiembre de 2002 12:39
Para: [EMAIL PROTECTED]
Asunto: So what database and script language do you use?

Hi everyone...

 I have been trying to use MySQL and JSP,Servlets to interact with
my tomcat server.  So far I have had a lot of frustration and little
luck.  Anyway, I was just wonder what the majority of ppl are using as a
database and scripting language.  Your input is much appreciated!

Keith



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




RE: 4.1.12 is out?

2002-09-24 Thread Turner, John


Yes, it's a security fix.  More details should be in the release notes,
something to do with the invoker servlet.  It effects all 4.x versions, so
the official 4.0 release is now 4.0.5.

John


 -Original Message-
 From: Robert L Sowders [mailto:[EMAIL PROTECTED]]
 Sent: Monday, September 23, 2002 10:43 PM
 To: Tomcat Users List
 Subject: 4.1.12 is out?
 
 
 I see that 4.1.12 is out.  Did I miss the announcement or 
 something?  I 
 assume this mainly is to correct a security exploit.
 
 The fun never stops.
 
 rls
 
 --
 To unsubscribe, e-mail:   
 mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: 
 mailto:[EMAIL PROTECTED]
 

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




Re: allowLinking option

2002-09-24 Thread Remy Maucherat

John Walstra wrote:
From the 4.1.12 release notes
 
 ---
 Symlinking static resources:
 ---
 
 Unix symlinks will not work when used in a web application to link resources
 located outside the web application root directory.
 
 This behavior is optional, and the allowLinking flag may be used to disable
 the check.
 --
 
 But where to use?

On a Resources element (child of a Context element).
We'll probably eventually propagate the flag to some of the top level 
components, like DefaultContext (if someone contributed it, it would be 
faster, of course).

Remy


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




Doubt-Tomcat service console

2002-09-24 Thread sathya

What is the difference between starting tomcat from service  starting from
a console...??? Because i have printing pgm which prints when tomcat  is
started from console but doesnt print when started thru the service..If u
know how to solve this pblm..tell me..
Kindly help me
thx
Sathya





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




Re: jk_ajp errors in mod_jk.log ???

2002-09-24 Thread Matthew Hannigan


Where in server.xml  do you put the matching ServerName and
Hostname?  I think this may be my problem.
My connection is getting tomcat to give some of the
examples pages, but anything further gives blank page in the
browser:

catalina_log.2002-09-24.txt:2002-09-24 17:36:32 Ajp13Processor[8009][4] 
 [Ajp13] [RequestHandler] status is:  400(Bad Request)

mod_jk.log:[Tue Sep 24 17:36:32 2002]  [jk_ajp_common.c (462)]: 
ajp_unmarshal_response: status = 400



My server.xml is:

Server port=8005 shutdown=SHUTDOWN debug=1

   Service name=Tomcat-Standalone

 !-- Define an AJP 1.3 Connector on port 8009 --
 Connector className=org.apache.ajp.tomcat4.Ajp13Connector
port=8009 minProcessors=5 maxProcessors=75
acceptCount=10 debug=1/

 !-- Define the top level container in our container hierarchy --
 Engine name=Standalone defaultHost=localhost debug=1

   !-- Global logger unless overridden at lower levels --
   Logger className=org.apache.catalina.logger.FileLogger
   prefix=catalina_log. suffix=.txt
   timestamp=true/

   Realm className=org.apache.catalina.realm.MemoryRealm /

 /Engine

   /Service

/Server

I have the same workers.properties.

Regards

Matt


Anthony Milbourne wrote:
 Hi John
 
 I onjy just noticed that this is in your HowTo (Apache 1.3.26 - Tomcat
 4.0.4, at least) as well as in the list archives.  The example
 wrokers.properties file you have given has a minor error.  It should be:
 
   # BEGIN workers.properties
   #
   # Setup for apache system
   #
   # make this equal to CATALINA_HOME
   workers.tomcat_home=/usr/local/jakarta-tomcat-4.0.4
   #
   # make this equal to JAVA_HOME
   workers.java_home=/usr/java/j2sdk1.4.0_01
   #
   ps=/
   worker.list=ajp13
   
   # Definition for Ajp13 worker
   #
   worker.ajp13.port=8009
   
   # change this line to match apache ServerName and Host name in
 server.xml
   worker.ajp13.host=localhost
   
   worker.ajp13.type=ajp13
   #
   # END workers.properties




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




Has anyone seen any problems with the Apache 1.3, Tomcat 4.0.3, JDK 1.4.0-b92 on Linux 7.2?

2002-09-24 Thread Francom, Kodie

Could anyone give me some direction on what we need to do to eliminate our
problem.

We have the Sun JDK1.4 and Tomcat 4.0.3 integrated with the Apache 
Server via mod_jk (Ajp13). The problem is that the Tomcat Server 
stalled after 2 days running our site and the only relevant information 
that I´ve found in the logs is this error:

---
2002-03-04 15:34:59 Ajp13Processor[8009][4] process: invoke
java.net.SocketException: Socket closed
at java.net.SocketOutputStream.socketWrite0(Native Method)
at 
java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
at java.net.SocketOutputStream.write(SocketOutputStream.java:126)
at org.apache.ajp.Ajp13.send(Ajp13.java:525)
at org.apache.ajp.RequestHandler.finish(RequestHandler.java:496)
at org.apache.ajp.Ajp13.finish(Ajp13.java:395)
at 
org.apache.ajp.tomcat4.Ajp13Response.finishResponse(Ajp13Response.java:192)
at 
org.apache.ajp.tomcat4.Ajp13Processor.process(Ajp13Processor.java:435)
at 
org.apache.ajp.tomcat4.Ajp13Processor.run(Ajp13Processor.java:495)
at java.lang.Thread.run(Thread.java:536)
---

Besides the SocketException errors, the pages are being served without 
any problem until the system eventually freezes and the box must be
rebooted. 


Thanks in advance,
Kodie Francom

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




tomcat 4 sessions - invalidate() does not seem to work

2002-09-24 Thread Jason . D . Karney

This is a followup post to my previous message, based on further
exploration. I've dug into the Tomcat sourcecode (latest stable release
now), and still don't understand the problem I'm having with sessions.

If I logon to my application and create a session, then logoff and
invalidate the session, then logon again, I seem to be getting a session
with old data. I am now adding a User object to the session at logon, so
the first logon creates this User object and calls setAttribute(user).
Then, at logoff, I do session.invalidate().

So I would expect this call to fail at the next logon (after the session is
invalid):

  HttpSession session = request.getSession(true);   // gives me a
SessionFacade

  if (session.getAttribute(Constants.USER_KEY) != null) { //
session should be new without any stored values after invalidate(), right?
  System.out.println(the user is already logged in);
  }


My understanding of sessions is that after invalidate() occurs, all data
stored is not available. However, my previously stored object does seem to
be available, although it may not itself have values. For example,
user.getUsername() may return null.

I would greatly appreciate if someone could explain this behavior to me. (I
don't see this problem when I use a different app server.)

Thanks.

--Jason

__

Hi all,

I am struggling to understand how Tomcat 4 creates and invalidates
sessions. In the app I'm writing, I used to use a straightforward method of
inserting a String into the session when the user was logged in, and
removing it when the user logged out. This was only a work-around for the
fact that I could never seem to get an invalid session object as expected.
I decided today to revisit my code, and rewrite it according to how I think
it should work. I'm not having any luck though, and this is driving me
crazy. Can somebody explain this to me? Here are some servlet code
fragments:

  // logon code
  // Make sure the user is not logging in twice
  HttpSession session = request.getSession(true);
  if (session.isNew() == false) {
session.invalidate();
session = request.getSession(true);
  }

This is straight out of the current issue of JDJ, actually. (I'd not used
isNew() before.) Now for the logoff:

  // logoff code
  // destroy this user's session
  HttpSession session = request.getSession(false);

  if (session != null) {
// remove the user object from the session
  session.removeAttribute(Constants.USER_KEY);
session.invalidate();
  } else
debug(No session object available for this user.);


One interesting thing I noticed is that, during logoff, I often get handed
a session from Tomcat, despite the getSession(false). This is supposed to
return either a valid session or null; but I usually get a
org.apache.catalina.session.StandardSessionFacade -- even if I logoff
twice, and the session.invalidate() has been called!

Then my logon code is subject to a similar issue. Even though I've just
called session.invalidate() in my logoff code, my next logon is not
recognizing my created session as a new one. Shouldn't it be new since I
just called invalidate?

I've poured through the archives, and many people have described a similar
issue to this, but I've not seen a satisfactory solution (except for an old
post of Craig's, which endorsed the String stored in a session).

Clarification of these issues would be appreciated. Thanks for any help.

--Jason




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




RE: jk_ajp errors in mod_jk.log ???

2002-09-24 Thread Turner, John


The name parameter of the Host element is where you define the hostname.
ServerName is an Apache directive.

John


 -Original Message-
 From: Matthew Hannigan [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, September 24, 2002 9:07 AM
 To: Tomcat Users List
 Subject: Re: jk_ajp errors in mod_jk.log ???
 
 
 
 Where in server.xml  do you put the matching ServerName and
 Hostname?  I think this may be my problem.
 My connection is getting tomcat to give some of the
 examples pages, but anything further gives blank page in the
 browser:
 
 catalina_log.2002-09-24.txt:2002-09-24 17:36:32 
 Ajp13Processor[8009][4] 
  [Ajp13] [RequestHandler] status is:  
 400(Bad Request)
 
 mod_jk.log:[Tue Sep 24 17:36:32 2002]  [jk_ajp_common.c (462)]: 
 ajp_unmarshal_response: status = 400
 
 
 
 My server.xml is:
 
 Server port=8005 shutdown=SHUTDOWN debug=1
 
Service name=Tomcat-Standalone
 
  !-- Define an AJP 1.3 Connector on port 8009 --
  Connector className=org.apache.ajp.tomcat4.Ajp13Connector
 port=8009 minProcessors=5 maxProcessors=75
 acceptCount=10 debug=1/
 
  !-- Define the top level container in our container 
 hierarchy --
  Engine name=Standalone defaultHost=localhost debug=1
 
!-- Global logger unless overridden at lower levels --
Logger className=org.apache.catalina.logger.FileLogger
prefix=catalina_log. suffix=.txt
timestamp=true/
 
Realm className=org.apache.catalina.realm.MemoryRealm /
 
  /Engine
 
/Service
 
 /Server
 
 I have the same workers.properties.
 
 Regards
 
 Matt
 
 
 Anthony Milbourne wrote:
  Hi John
  
  I onjy just noticed that this is in your HowTo (Apache 
 1.3.26 - Tomcat
  4.0.4, at least) as well as in the list archives.  The example
  wrokers.properties file you have given has a minor error.  
 It should be:
  
  # BEGIN workers.properties
  #
  # Setup for apache system
  #
  # make this equal to CATALINA_HOME
  workers.tomcat_home=/usr/local/jakarta-tomcat-4.0.4
  #
  # make this equal to JAVA_HOME
  workers.java_home=/usr/java/j2sdk1.4.0_01
  #
  ps=/
  worker.list=ajp13
  
  # Definition for Ajp13 worker
  #
  worker.ajp13.port=8009
  
  # change this line to match apache ServerName and Host name in
  server.xml
  worker.ajp13.host=localhost
  
  worker.ajp13.type=ajp13
  #
  # END workers.properties
 
 
 
 
 --
 To unsubscribe, e-mail:   
mailto:[EMAIL PROTECTED]
For additional commands, e-mail:
mailto:[EMAIL PROTECTED]

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




Re: Cannot load JDBC driver class 'null'

2002-09-24 Thread John Walstra

Ok, I kick on any and all debug statements I could find. Is the 
UserTransaction suspose to be null?

2002-09-24 07:52:43 NamingContextListener[/localhost/localhost/jkw]: Creating 
JNDI naming context
2002-09-24 07:52:43 NamingContextListener[/localhost/localhost/jkw]:   
Resource parameters for jdbc/JKW = ResourceParams[name=jdbc/JKW, 
parameters={factory=org.apache.commons.dbcp.BasicDataSourceFactory, 
url=jdbc:mysql://mysql.spoonserver.com:3306/jkw?autoReconnect=true, 
password=, maxWait=1, maxActive=100, 
driverClassName=org.gjt.mm.mysql.Driver, username=nobody, maxIdle=30}]
2002-09-24 07:52:43 NamingContextListener[/localhost/localhost/jkw]:   Adding 
resource ref jdbc/JKW
2002-09-24 07:52:43 NamingContextListener[/localhost/localhost/jkw]:   
ResourceRef[className=javax.sql.DataSource,factoryClassLocation=null,factoryClassName=org.apache.naming.factory.ResourceFactory,{type=scope,content=Shareable},{type=auth,content=Container},{type=factory,content=org.apache.commons.dbcp.BasicDataSourceFactory},{type=url,content=jdbc:mysql://mysql.spoonserver.com:3306/jkw?autoReconnect=true},{type=password,content=},{type=maxWait,content=1},{type=maxActive,content=100},{type=driverClassName,content=org.gjt.mm.mysql.Driver},{type=username,content=nobody},{type=maxIdle,content=30}]
2002-09-24 07:52:43 NamingContextListener[/localhost/localhost/jkw]:   
Resource parameters for UserTransaction = null



On Tuesday 24 September 2002 6:17 am, John Walstra wrote:
 Ok since I'm getting no where fast, is there way to debug a DataSource?
 Look it's settings?

 On Sunday 22 September 2002 11:14 pm, Jacob Kjome wrote:
  Yes, it should find it.  Have you verified that the class in the
  driverClassName element actually does exist in that package in the jar
  file you just mentioned?
 
  Jake
 
  At 10:56 PM 9/22/2002 -0500, you wrote:
  I do have mysql-connector-java-2.0.14-bin.jar in the common/lib
   directory. Shouldn't it find the correct class being there?
  
  On Sunday 22 September 2002 10:39 pm, Kwok Peng Tuck wrote:
Are you actually using the mysql driver? Cause if it says loading
driver null, means there isn't one.
   
John Walstra wrote:
I'm trying to set up a JNDI connection to MySQL. I'm using the
 binary release of 4.1.11 with 4.0.4's jasper-compiler.jar and
 jasper-runtime.jar. I'm also using mysql-connector-java-2.0.14.

It's very similar to this thread
http://www.mail-archive.com/tomcat-user@jakarta.apache.org/msg64346.
ht ml , however I still can't get mine working after reading that
 thread. I've basically followed (cut and paste) the JNDI Datasource
 HOWTO,
 http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-datasource-exa
mp les-h owto.html .

Here is the Context section of my server.xml

Context path=/jkw

 docBase=/usr/local/web/meta-htdocs/JWALSTRA/htdocs/jsp debug=5
 useNaming=true
reloadable=true crossContext=true

 Logger
 className=org.apache.catalina.logger.FileLogger prefix=jkw_log.
 suffix=.txt
 timestamp=true/

 Resource name=jdbc/JKW
 auth=Container
 type=javax.sql.DataSource/

 ResourceParams name=jdbc/JKW
 parameter
 namefactory/name
  
   valueorg.apache.commons.dbcp.BasicDataSourceFactory/value
  
 /parameter

 !-- Maximum number of dB connections in pool.
  
   Make sure you
  
 configure your mysqld max_connections
  
   large enough to handle
  
 all of your db connections. Set to 0
 for
  
   no limit.
  
 --
 parameter
 namemaxActive/name
 value100/value
 /parameter

 !-- Maximum number of idle dB connections to
  
   retain in pool.
  
 Set to 0 for no limit.
 --
 parameter
 namemaxIdle/name
 value30/value
 /parameter

 !-- Maximum time to wait for a dB connection
 to
  
   become available
  
 in ms, in this example 10 seconds. An
  
   Exception is thrown if
  
 this timeout is exceeded.  Set to -1 to
  
   wait indefinitely.
  
 --
 parameter
 namemaxWait/name
 value1/value
 /parameter

 !-- MySQL dB username and password for dB
  
   connections  --
  
  

Re: Tomcat 4.0 - SSL DOES NOT WORK!

2002-09-24 Thread achana

Hi All.
Don't know whether I should butt in on this thread.
Due to security reaosns, we use OpenSSL instead of telnet.
As Mr Ian pointed out, this is restricted to USA only - has been for a
long time.
Ergo : use OpenSSL ?

Ian McFarland wrote:
 
 The reason was license restrictions on the redistribution of the
 libraries. Someone from the team can speak more authoritatively on
 this, but basically, the security extensions (JSSE, et al.) are
 strictly export controlled, so just packaging them in with Tomcat
 wasn't possible, even though they could be freely downloaded from Sun.
 
 And I think I spoke in haste, (and under the influence of the pain
 killers they gave me for my wisdom tooth extraction today. Ouch!) It
 was 3.x that you needed to recompile yourself. Starting with Tomcat 4,
 you needed to install the JSSE library, but the binary is smart enough
 not to break if it's missing.
 
 Hmm... Sorry about the confusion. In any case, I assure you SSL works.
 I use it with Tomcat 4.0 and 4.1, and I used it with 3.2 and 3.3 before
 that (where I had to recompile it myself.) What errors are you getting?
 
 -Ian
 
 On Monday, September 23, 2002, at 06:32  PM, neal wrote:
 
  REALLY?!?!?!
 
  You actually have to build it yourself?!?!  Oh my gosh!  Why on earth
  would
  they do that?
 
  That's a very interesting tip though. I'll look into version 4.1.
  Perhaps
  that's the easiest solution.
 
  Thanks.
  Neal
 
 
  -Original Message-
  From: Ian McFarland [mailto:[EMAIL PROTECTED]]
  Sent: Monday, September 23, 2002 4:14 PM
  To: Tomcat Users List
  Cc: neal
  Subject: Re: Tomcat 4.0 - SSL DOES NOT WORK!
 
 
  Did you build it yourself, with the necessary libraries on the
  classpath? 4.0 doesn't support SSL out of the box; you have to compile
  it with the libraries on the classpath, and I forget what else. I've
  done it before, and it worked fine for me. Finding the docs on how to
  do it was the hard part. I count it working for me as a proof that it
  does work. ;-)
 
  4.1 works with SSL out of the box, so you might want to try that.
 
  -Ian
 
  On Monday, September 23, 2002, at 04:00  PM, neal wrote:
 
  Alright,
 
  Two solid days of troubleshooting between myself, a system admin, and
  a
  technical guy from Thawte and we've following the directions
  explicitly and
  tweaked everything we can think to tweak.  I think I am ready to
  declare
  that... SSL DOES NOT WORK WITH TOMCAT 4.0 ... unless someone can prove
  me
  wrong?!?!?!
 
 
 
 
  --
  To unsubscribe, e-mail:
  mailto:[EMAIL PROTECTED]
  For additional commands, e-mail:
  mailto:[EMAIL PROTECTED]
 
 
 
  --
  To unsubscribe, e-mail:
  mailto:[EMAIL PROTECTED]
  For additional commands, e-mail:
  mailto:[EMAIL PROTECTED]
 
 
  --
  To unsubscribe, e-mail:
  mailto:[EMAIL PROTECTED]
  For additional commands, e-mail:
  mailto:[EMAIL PROTECTED]
 
 
 --
 To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: mailto:[EMAIL PROTECTED]

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




Poolman Factory Class

2002-09-24 Thread Amitabh Dubey

Please can someone tell me what the factory class for PoolMan is?

Amitabh

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




Re: So what database and script language do you use?

2002-09-24 Thread Martin Jacobson

Keith Pemberton wrote:

 Hi everyone...
 
  I have been trying to use MySQL and JSP,Servlets to interact with
 my tomcat server.  So far I have had a lot of frustration and little
 luck.  Anyway, I was just wonder what the majority of ppl are using as a
 database and scripting language.  Your input is much appreciated!
 
 Keith
 


My set-up:
Development: Mac OS X + Tomcat 4.0.4 + Servlets + Velocity + MySQL
Production : Solaris8 + Tomcat 4.0.4 + Servlets + Velocity + Oracle8i

Martin



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




DBCP Question

2002-09-24 Thread Amitabh Dubey

Hello all,
   if i do not specify any factory in my server.xml, i believe that tomcat
uses DBCP by default. This is fine, but I have a few questions.

This is what my server.xml looks like

  ResourceParams name=SQLServerDS
  parameter
namevalidationQuery/name
value/value
  /parameter
  parameter
nameuser/name
valuesa/value
  /parameter
  parameter
namemaxWait/name
value5000/value
  /parameter
  parameter
namemaxActive/name
value5/value
  /parameter
  parameter
namepassword/name
valuesa/value
  /parameter
  parameter
nameurl/name

valuejdbc:microsoft:sqlserver://dnas07:1113;DatabaseName=Northwind/value
  /parameter
  parameter
namedriverClassName/name
valuecom.microsoft.jdbc.sqlserver.SQLServerDriver/value
  /parameter
  parameter
namemaxIdle/name
value10/value
  /parameter
/ResourceParams

If this file is correct, then why do i see the number of connections to the
database go more than 10, when maxActive is 10?

Does the driverClassName have to be a DataSource or is the above correct?

In my client code, after i lookup the name, do i have to cast my DataSource
to a ConnectionPoolDataSource?

Any kind of help would be great.

Thanks
Amitabh


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




RE: Poolman Factory Class

2002-09-24 Thread Turner, John


Might I suggest that you get familiar with a search engine such as Google?  

http://www.google.com

For example, a simple search on Google turned up this fairly comprehensive
link:

http://www.codestudio.com/PoolMan/UserGuide.html

John

 -Original Message-
 From: Amitabh Dubey [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, September 24, 2002 9:53 AM
 To: Tomcat
 Subject: Poolman Factory Class
 
 
 Please can someone tell me what the factory class for PoolMan is?
 
 Amitabh
 
 --
 To unsubscribe, e-mail:   
 mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: 
 mailto:[EMAIL PROTECTED]
 

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




RE: Poolman Factory Class

2002-09-24 Thread Amitabh Dubey

Thank u John.

-Original Message-
From: Turner, John [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, September 24, 2002 9:20 AM
To: 'Tomcat Users List'
Subject: RE: Poolman Factory Class



Might I suggest that you get familiar with a search engine such as Google?

http://www.google.com

For example, a simple search on Google turned up this fairly comprehensive
link:

http://www.codestudio.com/PoolMan/UserGuide.html

John

 -Original Message-
 From: Amitabh Dubey [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, September 24, 2002 9:53 AM
 To: Tomcat
 Subject: Poolman Factory Class


 Please can someone tell me what the factory class for PoolMan is?

 Amitabh

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


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



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




JSP source code exposure in Tomcat 4.x

2002-09-24 Thread Rossen Raykov

Tomcat 4.x JSP source exposure security advisory

1. Summary
Tomcat 4.0.4 and 4.1.10 (probably all other earlier versions also) are
vulnerable to source code exposure by using the default servlet
org.apache.catalina.servlets.DefaultServlet.


2. Details:
Let say you have valid URL like http://my.site/login.jsp, then an URL like
http://my.site/servlet/org.apache.catalina.servlets.DefaultServlet/login.jsp
will give you the source code of  the JSP page.

The full syntaxes of the exposure URL is:

http://{server}[:port]/[Context/]org.apache.catalina.servlets.DefaultServlet
/[context_relative_path/]file_name.jsp

For example to see the JSP source of Tomcat 4.1.10 admin application
http://localhost:8080/admin/index.jsp
execute
http://localhost:8080/admin/servlet/org.apache.catalina.servlets.DefaultServ
let/index.jsp


3. Solution:
3.1 Upgrade to the last releases 4.0.5 and 4.1.12
See
http://jakarta.apache.org/builds/jakarta-tomcat-4.0/release/ for the last
releases.

3.2 Workaround:
There are at least two ways to protect from this vulnerability.
A. Tomcat in tandem with HTTP server front-end:
a. If you are using front-end HTTP server you can filter all
requests with the pattern
*/servlet/org.apache.catalina.servlets.DefaultServlet*
b. If you are using mod_jk to connect tomcat to you
front-end server map to Tomcat only the URL's that are part from you
application but not all request. See the usage of JkMount directive.
B. If you are using standalone Tomcat then add protection for this
location in all you application descriptors - web.xml. Simple example:

security-constraint
  display-nameDefault Servlet/display-name
  !-- Disable direct alls on the Default Servlet/web-resource-name --
  web-resource-collection
web-resource-nameDisallowed Location/web-resource-name
 
url-pattern/servlet/org.apache.catalina.servlets.DefaultServlet/*/url-pat
tern
http-methodDELETE/http-method
http-methodGET/http-method
http-methodPOST/http-method
http-methodPUT/http-method
  /web-resource-collection
  auth-constraint
role-name/role-name
  /auth-constraint
/security-constraint

See the server's documentation for more details.

Regards,
Rossen Raykov

PS. Special thanks to the Tomcat development team for their quick response.

---
Rossen Raykov
COGNICASE U.S.A. Inc.
(908) 860-1100 Ext. 1140
[EMAIL PROTECTED]

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




Re: jk_ajp errors in mod_jk.log ???

2002-09-24 Thread Matthew Hannigan

John
Thanks, but I don't have a Host element in my server.xml.

Is my server.xml a little too minimal?

Regards,
Matt


Turner, John wrote:
 The name parameter of the Host element is where you define the hostname.
 ServerName is an Apache directive.
 
 John
 
 
 
-Original Message-
From: Matthew Hannigan [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, September 24, 2002 9:07 AM
To: Tomcat Users List
Subject: Re: jk_ajp errors in mod_jk.log ???



Where in server.xml  do you put the matching ServerName and
Hostname?  I think this may be my problem.
My connection is getting tomcat to give some of the
examples pages, but anything further gives blank page in the
browser:

catalina_log.2002-09-24.txt:2002-09-24 17:36:32 
Ajp13Processor[8009][4] 
 [Ajp13] [RequestHandler] status is:  
400(Bad Request)

mod_jk.log:[Tue Sep 24 17:36:32 2002]  [jk_ajp_common.c (462)]: 
ajp_unmarshal_response: status = 400



My server.xml is:

Server port=8005 shutdown=SHUTDOWN debug=1

   Service name=Tomcat-Standalone

 !-- Define an AJP 1.3 Connector on port 8009 --
 Connector className=org.apache.ajp.tomcat4.Ajp13Connector
port=8009 minProcessors=5 maxProcessors=75
acceptCount=10 debug=1/

 !-- Define the top level container in our container 
hierarchy --
 Engine name=Standalone defaultHost=localhost debug=1

   !-- Global logger unless overridden at lower levels --
   Logger className=org.apache.catalina.logger.FileLogger
   prefix=catalina_log. suffix=.txt
   timestamp=true/

   Realm className=org.apache.catalina.realm.MemoryRealm /

 /Engine

   /Service

/Server

I have the same workers.properties.

Regards

Matt


Anthony Milbourne wrote:

Hi John

I onjy just noticed that this is in your HowTo (Apache 

1.3.26 - Tomcat

4.0.4, at least) as well as in the list archives.  The example
wrokers.properties file you have given has a minor error.  

It should be:

 # BEGIN workers.properties
 #
 # Setup for apache system
 #
 # make this equal to CATALINA_HOME
 workers.tomcat_home=/usr/local/jakarta-tomcat-4.0.4
 #
 # make this equal to JAVA_HOME
 workers.java_home=/usr/java/j2sdk1.4.0_01
 #
 ps=/
 worker.list=ajp13
 
 # Definition for Ajp13 worker
 #
 worker.ajp13.port=8009
 
 # change this line to match apache ServerName and Host name in
server.xml
 worker.ajp13.host=localhost
 
 worker.ajp13.type=ajp13
 #
 # END workers.properties




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



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




RE: jk_ajp errors in mod_jk.log ???

2002-09-24 Thread Milt Epstein

On Tue, 24 Sep 2002, Anthony Milbourne wrote:

 Hi John

 I onjy just noticed that this is in your HowTo (Apache 1.3.26 - Tomcat
 4.0.4, at least) as well as in the list archives.  The example
 wrokers.properties file you have given has a minor error.  It should be:

   # BEGIN workers.properties
   #
   # Setup for apache system
   #
   # make this equal to CATALINA_HOME
   workers.tomcat_home=/usr/local/jakarta-tomcat-4.0.4
   #
   # make this equal to JAVA_HOME
   workers.java_home=/usr/java/j2sdk1.4.0_01
   #
   ps=/
   worker.list=ajp13

   # Definition for Ajp13 worker
   #
   worker.ajp13.port=8009

   # change this line to match apache ServerName and Host name in
 server.xml
   worker.ajp13.host=localhost

   worker.ajp13.type=ajp13
   #
   # END workers.properties
   I have removed ajp12 from line 12 as Tomcat 4.0.4 doesn't need it
 (as far as I know) and if you have it there without the appropriate
 connector defined in server.xml it causes communication errors.
   I hope that helps...

It was also pointed out that the lines defining workers.tomcat_home
and workers.java_home and ps are not needed (they're macros/variables
internal to this file, and the lines that used them have already been
removed).  So, after removing comments, this file can be reduced to:

worker.list=ajp13
worker.ajp13.port=8009
worker.ajp13.host=localhost
worker.ajp13.type=ajp13



  -Original Message-
  From:   Turner, John [SMTP:[EMAIL PROTECTED]]
  Sent:   23 September 2002 17:27
  To: 'Tomcat Users List'
  Subject:RE: jk_ajp errors in mod_jk.log ???
 
 
  Oops.  What's the fixed file, or the fix itself?  I will gladly update
  things.
 
  John
 
 
   -Original Message-
   From: Anthony Milbourne [mailto:[EMAIL PROTECTED]]
   Sent: Monday, September 23, 2002 12:24 PM
   To: 'Tomcat Users List'
   Subject: RE: jk_ajp errors in mod_jk.log ???
  
  
   It looks to me like you may have an extra ajp entry in your
   config file.
   Try getting rid of the ajp12 connector int the worker list.
  
   John accidentally posted a broken file to this list in a
   reply to one of my
   questions.  It caused me loads of trouble, although I'm not
   complaining as
   John (and his HowTo) has solved many problems for me.
   Unfortunately a lot
   of people must have used it.
  
   Hope that helps,
  
 Anthony.
  
-Original Message-
From:   [EMAIL PROTECTED] [SMTP:[EMAIL PROTECTED]]
Sent:   23 September 2002 02:15
To: Tomcat Users List
Subject:Re: jk_ajp errors in mod_jk.log ???
   
snip
 Please post the contents of your workers.properties file.

 This error seems to indicate that your apache machine
   cannot establish a
 connection to the tomcat machine.  You are running apache
   and tomcat on
 different machines, correct?
Correct, I am running them on different machines.
Attached hereto the workers.properties in
   /usr/local/tomcat4/conf/jk 
File: workers.propertiesFile: ATT553709.txt 
 


 **
 This email and any files transmitted with it are confidential and
 intended solely for the use of the individual or entity to whom they
 are addressed. If you have received this email in error please notify
 the system manager.
 This footnote also confirms that this email message has been swept by
 MIMEsweeper for the presence of computer viruses.
 www.mimesweeper.com
 **


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


Milt Epstein
Research Programmer
Integration and Software Engineering (ISE)
Campus Information Technologies and Educational Services (CITES)
University of Illinois at Urbana-Champaign (UIUC)
[EMAIL PROTECTED]


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




RE: jk_ajp errors in mod_jk.log ???

2002-09-24 Thread Turner, John


I've updated all the HOWTOs, noting that the macro lines are optional and
deleting ajp12 from the worker list.  Thanks for the heads-up.

John


 -Original Message-
 From: Milt Epstein [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, September 24, 2002 10:28 AM
 To: Tomcat Users List
 Subject: RE: jk_ajp errors in mod_jk.log ???
 
 
 On Tue, 24 Sep 2002, Anthony Milbourne wrote:
 
  Hi John
 
  I onjy just noticed that this is in your HowTo (Apache 
 1.3.26 - Tomcat
  4.0.4, at least) as well as in the list archives.  The example
  wrokers.properties file you have given has a minor error.  
 It should be:
 
  # BEGIN workers.properties
  #
  # Setup for apache system
  #
  # make this equal to CATALINA_HOME
  workers.tomcat_home=/usr/local/jakarta-tomcat-4.0.4
  #
  # make this equal to JAVA_HOME
  workers.java_home=/usr/java/j2sdk1.4.0_01
  #
  ps=/
  worker.list=ajp13
 
  # Definition for Ajp13 worker
  #
  worker.ajp13.port=8009
 
  # change this line to match apache ServerName and Host name in
  server.xml
  worker.ajp13.host=localhost
 
  worker.ajp13.type=ajp13
  #
  # END workers.properties
  I have removed ajp12 from line 12 as Tomcat 4.0.4 
 doesn't need it
  (as far as I know) and if you have it there without the appropriate
  connector defined in server.xml it causes communication errors.
  I hope that helps...
 
 It was also pointed out that the lines defining workers.tomcat_home
 and workers.java_home and ps are not needed (they're macros/variables
 internal to this file, and the lines that used them have already been
 removed).  So, after removing comments, this file can be reduced to:
 
   worker.list=ajp13
   worker.ajp13.port=8009
   worker.ajp13.host=localhost
   worker.ajp13.type=ajp13
 
 
 
   -Original Message-
   From: Turner, John [SMTP:[EMAIL PROTECTED]]
   Sent: 23 September 2002 17:27
   To:   'Tomcat Users List'
   Subject:  RE: jk_ajp errors in mod_jk.log ???
  
  
   Oops.  What's the fixed file, or the fix itself?  I will 
 gladly update
   things.
  
   John
  
  
-Original Message-
From: Anthony Milbourne [mailto:[EMAIL PROTECTED]]
Sent: Monday, September 23, 2002 12:24 PM
To: 'Tomcat Users List'
Subject: RE: jk_ajp errors in mod_jk.log ???
   
   
It looks to me like you may have an extra ajp entry in your
config file.
Try getting rid of the ajp12 connector int the worker list.
   
John accidentally posted a broken file to this list in a
reply to one of my
questions.  It caused me loads of trouble, although I'm not
complaining as
John (and his HowTo) has solved many problems for me.
Unfortunately a lot
of people must have used it.
   
Hope that helps,
   
Anthony.
   
 -Original Message-
 From: [EMAIL PROTECTED] [SMTP:[EMAIL PROTECTED]]
 Sent: 23 September 2002 02:15
 To:   Tomcat Users List
 Subject:  Re: jk_ajp errors in mod_jk.log ???

 snip
  Please post the contents of your workers.properties file.
 
  This error seems to indicate that your apache machine
cannot establish a
  connection to the tomcat machine.  You are running apache
and tomcat on
  different machines, correct?
 Correct, I am running them on different machines.
 Attached hereto the workers.properties in
/usr/local/tomcat4/conf/jk 
 File: workers.propertiesFile: ATT553709.txt 
  
 
 
  
 **
  This email and any files transmitted with it are confidential and
  intended solely for the use of the individual or entity to whom they
  are addressed. If you have received this email in error 
 please notify
  the system manager.
  This footnote also confirms that this email message has 
 been swept by
  MIMEsweeper for the presence of computer viruses.
  www.mimesweeper.com
  
 **
 
 
  --
  To unsubscribe, e-mail:   
mailto:[EMAIL PROTECTED]
 For additional commands, e-mail:
mailto:[EMAIL PROTECTED]


Milt Epstein
Research Programmer
Integration and Software Engineering (ISE)
Campus Information Technologies and Educational Services (CITES)
University of Illinois at Urbana-Champaign (UIUC)
[EMAIL PROTECTED]


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

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




RE: where to put mod_jk.conf

2002-09-24 Thread Milt Epstein

On Tue, 24 Sep 2002, Turner, John wrote:

 Agreed.  My assumption was a sys-admin assumption...that is, Tomcat
 is only started if there is a change.  I can't think of a reason to
 stop/start it otherwise.

Where do you find such nice, well-behaved systems? :-)


  -Original Message-
  From: Milt Epstein [mailto:[EMAIL PROTECTED]]
  Sent: Monday, September 23, 2002 7:45 PM
  To: Tomcat Users List
  Subject: RE: where to put mod_jk.conf
 
 
  On Mon, 23 Sep 2002, Turner, John wrote:
 
   Yes, you need to copy the mod_jk.conf to the Apache box each time
   Tomcat is started.
  [ ... ]
 
  I don't think this is quite true -- I'd say it only needs to be copied
  if the Tomcat configuration changes -- and that's represented by
  server.xml, the directories under webapps, and perhaps some other
  things.  But if those are in a steady state, there shouldn't need to
  be any changes to the mod_jk conf -- and I'd even remove (or comment
  out) the Listener lines in server.xml that are creating it.
 
  So, it depends on what kind of environment the person is working in --
  production, where things change rarely, or development, where things
  may change much more often.
 
 
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Sunday, September 22, 2002 7:56 PM
To: [EMAIL PROTECTED]
Subject: where to put mod_jk.conf
   
   
Hi all.
Tomcat is generating
/usr/local/jakarta-tomcat-4.0.4/conf/auto/mod_jk.conf
everytime I start
Tomcat on BoxAAA. Apache is intentionally disabled on this box .
In BoxBBB , Apache2 is enable and its httpd.conf modified
  to Include
/usr/local/tomcat4/conf/auto/mod_jk.conf , do I need to copy
the .conf
file from BoxAAA to BoxBBB everytime Tomcat creates a new one ???
Do I assume right that mod_jk.so is stays with Apache and
does not need
to be refreshed ???
   
--
To unsubscribe, e-mail:
mailto:[EMAIL PROTECTED]
For additional commands, e-mail:
mailto:[EMAIL PROTECTED]
   
  
   --
   To unsubscribe, e-mail:
  mailto:[EMAIL PROTECTED]
   For additional commands, e-mail:
  mailto:[EMAIL PROTECTED]
  
 
  Milt Epstein
  Research Programmer
  Integration and Software Engineering (ISE)
  Campus Information Technologies and Educational Services (CITES)
  University of Illinois at Urbana-Champaign (UIUC)
  [EMAIL PROTECTED]
 
 
  --
  To unsubscribe, e-mail:
  mailto:[EMAIL PROTECTED]
  For additional commands, e-mail:
  mailto:[EMAIL PROTECTED]
 

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


Milt Epstein
Research Programmer
Integration and Software Engineering (ISE)
Campus Information Technologies and Educational Services (CITES)
University of Illinois at Urbana-Champaign (UIUC)
[EMAIL PROTECTED]


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




Custom ErrorReportValve

2002-09-24 Thread Chris Read

Greetings all...

I've been digging around trying to find out an easy way to have a customized
ErrorReportValve for Tomcat 4.0.x. The only custom error type information
I've been able to find refers to setting the page-error tags in web.xml.
This is fine for error conditions within an application, but what if the
application is not available?

From my testing, I've seen that when the application is dead (simulated by
stopping it with the Manager app), and you try accessing the context of the
dead app, you get a 404 error page generated by Catalina. I see that in
Tomcat 4.1.x there is now an option in the Host entry of server.xml to
specify a custom ErrorReportValve, but is there something similar in
4.0.x???

Thanks in advance for the time...

Chris 

This message has been checked for all known viruses by the MessageLabs Virus Control 
Centre.


*

Notice:  This email is confidential and may contain copyright material of Ocado 
Limited (the Company). Opinions and views expressed in this message may not 
necessarily reflect the opinions and views of the Company.
If you are not the intended recipient, please notify us immediately and delete all 
copies of this message. Please note that it is your responsibility to scan this 
message for viruses.

Company reg. no. 3875000.  Swallowdale Lane, Hemel Hempstead HP2 7PY

*

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




RE: where to put mod_jk.conf

2002-09-24 Thread Turner, John


Not sure...uptime on my Tomcat 3.1 instances is 108 days.  Maybe I am just
overly strict, cranky, and paranoid. :) Then again, people more skilled than
I up the first few instances...the rest are just duplications.  108 days
will be the max, though, I think.  I'm due to apply an application patch to
all of them soon, which means a restart.

John

 -Original Message-
 From: Milt Epstein [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, September 24, 2002 10:30 AM
 To: Tomcat Users List
 Subject: RE: where to put mod_jk.conf
 
 
 On Tue, 24 Sep 2002, Turner, John wrote:
 
  Agreed.  My assumption was a sys-admin assumption...that is, Tomcat
  is only started if there is a change.  I can't think of a reason to
  stop/start it otherwise.
 
 Where do you find such nice, well-behaved systems? :-)
 
 
   -Original Message-
   From: Milt Epstein [mailto:[EMAIL PROTECTED]]
   Sent: Monday, September 23, 2002 7:45 PM
   To: Tomcat Users List
   Subject: RE: where to put mod_jk.conf
  
  

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




JSP source code exposure in Tomcat 4.x

2002-09-24 Thread Veniamin Fichin

Rossen Raykov wrote:

   Tomcat 4.x JSP source exposure security advisory
 
 1. Summary
 Tomcat 4.0.4 and 4.1.10 (probably all other earlier versions also) are
 vulnerable to source code exposure by using the default servlet
 org.apache.catalina.servlets.DefaultServlet.
--= [ cut ] =--
 3. Solution:
   3.1 Upgrade to the last releases 4.0.5 and 4.1.12
   See
 http://jakarta.apache.org/builds/jakarta-tomcat-4.0/release/ for the last
 releases.

I'm a newbie to Tomcat and JSP at all, so I have a question: can this upgrade be done 
by using new binaries only, not by upgrading an entire distribution including configs? 
I don't want to overwrite my configure files, because it took some time for me to 
understand its structure and meaning.



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




RE: DBCP w/ SQL Server

2002-09-24 Thread Turner, John


There's a free Type 4 JDBC implementation of TDS available at 

http://www.freetds.org

ftp://freetds.internetcds.com/pub/freetds_jdbc/

John

 -Original Message-
 From: Dennis Muhlestein [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, September 24, 2002 10:37 AM
 To: [EMAIL PROTECTED]
 Cc: [EMAIL PROTECTED]
 Subject: DBCP w/ SQL Server
 
 
 I'm not sure what we have applies.  We use a tds implemenation that is
 not provided by microsoft for the jdbc driver (www.inetsoftware.de). 
 All I've done is copy/paste the example config for dbcp and 
 replace the
 driver name/username/url etc with my own info and it all works good.
 
 
 On Mon, 2002-09-23 at 21:52, Amitabh Dubey wrote:
  If you have a snippet of the server.xml file that uses 
 DBCP, please could
  you post it here. Although I think i got DBCP to work with 
 SQLServer,
  pooling was not being used. The reason i say this is 
 because, i had set my
  maxActive to 7 and my pool kept growing.
  
  I would really appreciate it if you could post your server.xml here.
  
  Thanks
  Amitabh
  
  -Original Message-
  From: Dennis Muhlestein [mailto:[EMAIL PROTECTED]]
  Sent: Monday, September 23, 2002 3:33 PM
  To: [EMAIL PROTECTED]
  Subject: RE: Poolman Configuration
  
  
  We use DBCP with SQL Server and haven't had a single problem.  Am I
  missing something or are you?
  
  -Dennis
  
  On Mon, 2002-09-23 at 12:11, Amitabh Dubey wrote:
   DBCP does not work well with SQL Server, so i was told. I 
 guess i will
  have
   to look into some commercial product then. Any suggestions?
  
   Thank you
   Amitabh
  
   -Original Message-
   From: Rick Fincher [mailto:[EMAIL PROTECTED]]
   Sent: Monday, September 23, 2002 1:06 PM
   To: Tomcat Users List; [EMAIL PROTECTED]
   Subject: Re: Poolman Configuration
  
  
   Is anybody still developing Poolman?  I heard the 
 original developer
  retired
   it.  If you are just starting out you might want to use 
 another connection
   pooling package like DBCP in the Jakarta Commons project, 
 so you don't get
   locked into a defunct product.
  
   This is from the web site listed on SourceForge as 
 Poolman's home page
   (www.codestudio.com):
  
   PoolMan is no longer available or supported through this 
 site. It did
   exceedingly well during its lifetime, and I appreciate 
 the important role
  it
   played in so many distributed applications over the past 
 three years. If
  you
   are looking for connection and object pooling mechanisms, 
 they can now be
   found in application servers such as JRun, Tomcat and the 
 Jakarta Project,
   and other J2EE products and servers.
  
   -PS Neville
  
  
   Rick
  
   - Original Message -
  
Does anyone have poolman successfully configured. If 
 so, please could
  you
post your poolman.xml. If you have used it with SQL 
 Server, then that
   would
be perfect.
   
Thanks
Amitabh
  
  
  
   --
   To unsubscribe, e-mail:
   mailto:[EMAIL PROTECTED]
   For additional commands, e-mail:
   mailto:[EMAIL PROTECTED]
  
  
  
   --
   To unsubscribe, e-mail:
  mailto:[EMAIL PROTECTED]
   For additional commands, e-mail:
  mailto:[EMAIL PROTECTED]
  
  
  
  --
  To unsubscribe, e-mail:
  mailto:[EMAIL PROTECTED]
  For additional commands, e-mail:
  mailto:[EMAIL PROTECTED]
  
  
  
  --
  To unsubscribe, e-mail:   
mailto:[EMAIL PROTECTED]
 For additional commands, e-mail:
mailto:[EMAIL PROTECTED]
 


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

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




Re: JSP source code exposure in Tomcat 4.x

2002-09-24 Thread Remy Maucherat

Veniamin Fichin wrote:
 Rossen Raykov wrote:
 
 Tomcat 4.x JSP source exposure security advisory

 1. Summary
 Tomcat 4.0.4 and 4.1.10 (probably all other earlier versions also) are
 vulnerable to source code exposure by using the default servlet
 org.apache.catalina.servlets.DefaultServlet.
 
 --= [ cut ] =--
 
 3. Solution:
 3.1 Upgrade to the last releases 4.0.5 and 4.1.12
 See
 http://jakarta.apache.org/builds/jakarta-tomcat-4.0/release/ for the last
 releases.
 
 
 I'm a newbie to Tomcat and JSP at all, so I have a question: can this 
 upgrade be done by using new binaries only, not by upgrading an entire 
 distribution including configs? I don't want to overwrite my configure 
 files, because it took some time for me to understand its structure and 
 meaning.

No, you do not need to upgrade. Read the advisory I posted earlier, or 
the news item posted on the Jakarta website.

Remy


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




RE: JNDIRealm and 4.1.10 with iPlanet

2002-09-24 Thread Douglas L Stewart

Looks like you are using parentheses around the 0 rather than
brackets.  That is probably why it is being passed literal rather than
being expanded.

---
 Sorry to jump in on this discussion. But I think people with LDAP
 experience are having a look on it.
 
 Realm className=org.apache.catalina.realm.JNDIRealm
   debug=999
   connectionName=cn=Directory Manager
   connectionPassword=mypassword
   connectionURL=ldap://192.168.90.120:11592;
   roleBase=dc=my-company,dc=com
   roleName=uid
   roleSearch=(uid={0})
   roleSubtree=false
   userPassword=userPassword
   userPattern=uid={0}, ou=People, dc=my-company, 
   dc=com
 /
 
 As he has almost the same declaration like I, I'm wondering why in
my
 case the query gets sent to the OpenLDAP server, but uid=(0) is not
 changed to the users name.
 
 Realm className=org.apache.catalina.realm.JNDIRealm debug=99
 connectionURL=ldap://localhost;
 userPattern=uid=(0),ou=people,dc=yikester,dc=net
 roleBase=ou=groups,dc=yikester,dc=net
 roleName=cn
 roleSearch=(uniqueMember=(0))
 userPassword=userPassword /
 
 On the OpenLDAP server I see in the logfile:
 
 SRCH base=uid=(0),ou=people,dc=yikester,dc=net scope=0
 filter=(objectClass=*)
 
 Can it be that this code in Tomcat still is very new and not many
people
 are using it?
 
 Stephan
 
 --
 To unsubscribe, e-mail:  
mailto:[EMAIL PROTECTED]
 For additional commands, e-mail:
mailto:[EMAIL PROTECTED]
 
 
 

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




Re: JNDIRealm and 4.1.10 with iPlanet

2002-09-24 Thread Douglas L Stewart

This was exactly my problem.  I had not seen that I needed to do this
while reviewing the documentation.  With this help I was able to get
everything working.

It looks like LDAP dynamic groups aren't currently supported by
Tomcat.  Does anyone have information that conflicts this?  I ended up
using a static group.

---
 Did you protect the resource that you're trying to access with a
 security-constraint in your web.xml?
 
 Jon
 
 - Original Message -
 From: Douglas L Stewart [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Monday, September 23, 2002 11:31 AM
 Subject: JNDIRealm and 4.1.10 with iPlanet
 
 
  I'm using Tomcat 4.1.10 trying to authenticate against iPlanet
  Directory Server 5.0.
 
  I've created a Realm inside of the Engine declaration:
 
Realm className=org.apache.catalina.realm.JNDIRealm
  debug=999
  connectionName=cn=Directory Manager
  connectionPassword=mypassword
  connectionURL=ldap://192.168.90.120:11592;
  roleBase=dc=my-company,dc=com
  roleName=uid
  roleSearch=(uid={0})
  roleSubtree=false
  userPassword=userPassword
  userPattern=uid={0}, ou=People, dc=my-company,
  dc=com
/
 
  I'm getting this in the log when I start Tomcat:
 
  2002-09-23 11:09:49 JNDIRealm[Standalone]: Connecting to URL
  ldap://192.168.90.120:11592
 
  According to the documentation putting the Realm declaration in
the
  Engine section should make it used globally, but when I try to
view
  some of my servlets I see nothing in the log and I'm not prompted
for
  a login, it just shows the page.
 
  What am I missing?
 
  --
  To unsubscribe, e-mail:
 mailto:[EMAIL PROTECTED]
  For additional commands, e-mail:
 mailto:[EMAIL PROTECTED]
 
 
 
 --
 To unsubscribe, e-mail:  
mailto:[EMAIL PROTECTED]
 For additional commands, e-mail:
mailto:[EMAIL PROTECTED]
 
 
 

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




using servlet as index documentation

2002-09-24 Thread Douglas L Stewart

I saw that you cannot add a servlet as a welcome-file.  I've seen
suggestions to use an HTML page or a JSP to redirect to a servlet
(doing this currently), but is it possible to use a servlet to be your
opening page?

I tried using / as url-pattern, but it would redirect all URL's to the
servlet.  I tried ^/$ and that didn't work either.

Any ideas?

---
Douglas L Stewart
[EMAIL PROTECTED]

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




DBCP w/ SQL Server

2002-09-24 Thread Dennis Muhlestein

I'm not sure what we have applies.  We use a tds implemenation that is
not provided by microsoft for the jdbc driver (www.inetsoftware.de). 
All I've done is copy/paste the example config for dbcp and replace the
driver name/username/url etc with my own info and it all works good.


On Mon, 2002-09-23 at 21:52, Amitabh Dubey wrote:
 If you have a snippet of the server.xml file that uses DBCP, please could
 you post it here. Although I think i got DBCP to work with SQLServer,
 pooling was not being used. The reason i say this is because, i had set my
 maxActive to 7 and my pool kept growing.
 
 I would really appreciate it if you could post your server.xml here.
 
 Thanks
 Amitabh
 
 -Original Message-
 From: Dennis Muhlestein [mailto:[EMAIL PROTECTED]]
 Sent: Monday, September 23, 2002 3:33 PM
 To: [EMAIL PROTECTED]
 Subject: RE: Poolman Configuration
 
 
 We use DBCP with SQL Server and haven't had a single problem.  Am I
 missing something or are you?
 
 -Dennis
 
 On Mon, 2002-09-23 at 12:11, Amitabh Dubey wrote:
  DBCP does not work well with SQL Server, so i was told. I guess i will
 have
  to look into some commercial product then. Any suggestions?
 
  Thank you
  Amitabh
 
  -Original Message-
  From: Rick Fincher [mailto:[EMAIL PROTECTED]]
  Sent: Monday, September 23, 2002 1:06 PM
  To: Tomcat Users List; [EMAIL PROTECTED]
  Subject: Re: Poolman Configuration
 
 
  Is anybody still developing Poolman?  I heard the original developer
 retired
  it.  If you are just starting out you might want to use another connection
  pooling package like DBCP in the Jakarta Commons project, so you don't get
  locked into a defunct product.
 
  This is from the web site listed on SourceForge as Poolman's home page
  (www.codestudio.com):
 
  PoolMan is no longer available or supported through this site. It did
  exceedingly well during its lifetime, and I appreciate the important role
 it
  played in so many distributed applications over the past three years. If
 you
  are looking for connection and object pooling mechanisms, they can now be
  found in application servers such as JRun, Tomcat and the Jakarta Project,
  and other J2EE products and servers.
 
  -PS Neville
 
 
  Rick
 
  - Original Message -
 
   Does anyone have poolman successfully configured. If so, please could
 you
   post your poolman.xml. If you have used it with SQL Server, then that
  would
   be perfect.
  
   Thanks
   Amitabh
 
 
 
  --
  To unsubscribe, e-mail:
  mailto:[EMAIL PROTECTED]
  For additional commands, e-mail:
  mailto:[EMAIL PROTECTED]
 
 
 
  --
  To unsubscribe, e-mail:
 mailto:[EMAIL PROTECTED]
  For additional commands, e-mail:
 mailto:[EMAIL PROTECTED]
 
 
 
 --
 To unsubscribe, e-mail:
 mailto:[EMAIL PROTECTED]
 For additional commands, e-mail:
 mailto:[EMAIL PROTECTED]
 
 
 
 --
 To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: mailto:[EMAIL PROTECTED]
 


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




AW: DBCP w/ SQL Server

2002-09-24 Thread Ralph Einfeldt

There is an offspring of freetds at
http://jtds.sourceforge.net/

It looks more active than the java part of freetds.

Don't know which one is better. Haven't tried jtds, as 
we don't have a MS-SQL server in the field for two years 
now. (At that time freetds was of no use to us, because 
there was to much functionality missing)

 -Ursprüngliche Nachricht-
 Von: Turner, John [mailto:[EMAIL PROTECTED]]
 Gesendet: Dienstag, 24. September 2002 16:39
 An: 'Tomcat Users List'
 Betreff: RE: DBCP w/ SQL Server
 
 There's a free Type 4 JDBC implementation of TDS available at 
 
 http://www.freetds.org
 
 ftp://freetds.internetcds.com/pub/freetds_jdbc/
 

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




RE: Running multiple tomcat instances ?????

2002-09-24 Thread Ben Ricker

If that script works, then great.

A less elegant way to do it would be to utilize pgrep. Do a man on it
(not sure what platform you are running on). You can pgrep for the
earliest PID that was run with a number of options. I use it for a Jserv
installation and it works quite nice.

I have not tested it with Tomcat, though.

Good luck,

Ben Ricker
Wellinx, Inc.

On Mon, 2002-09-23 at 15:17, Raj Mettai wrote:
 Hi John,
 
 I have compiled the code and copied to $CATALINA_HOME$/bin
 then added the following snippet into server.xml
 
   !-- Define the Tomcat Stand-Alone Service --
   Service name=Tomcat-Standalone
 
 Listener className=PidLifeCycle /
 
 
 when I start the tomcat, I am not seeing any tomcat.pid and I am getting
 the following error in catalina.out
 
 ERROR reading /opt/tomcat1/conf/server.xml
 At Line 28 /Server/Service/Listener/ className=PidLifeCycle 
 
 Catalina.start: java.lang.ClassNotFoundException: PidLifeCycle
 java.lang.ClassNotFoundException: PidLifeCycle
 at
 
org.apache.catalina.loader.StandardClassLoader.loadClass(StandardClassLoader.java:1127)
 at
 
org.apache.catalina.loader.StandardClassLoader.loadClass(StandardClassLoader.java:992)
 at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:313)
 at java.lang.Class.forName0(Native Method)
 at java.lang.Class.forName(Class.java:120)
 at
 org.apache.catalina.util.xml.ObjectCreate.start(XmlMapper.java:616)
 at
 org.apache.catalina.util.xml.XmlMapper.matchStart(XmlMapper.java:412)
 at
 org.apache.catalina.util.xml.XmlMapper.startElement(XmlMapper.java:91)
 at
 org.xml.sax.helpers.XMLReaderAdapter.startElement(XMLReaderAdapter.java:329)
 at
 org.apache.xerces.parsers.SAXParser.startElement(SAXParser.java:1376)
 at
 
org.apache.xerces.validators.common.XMLValidator.callStartElement(XMLValidator.java:1284)
 at
 
org.apache.xerces.framework.XMLDocumentScanner.scanElement(XMLDocumentScanner.java:1806)
 at
 
org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatch(XMLDocumentScanner.java:1182)
 at
 org.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentScanner.java:381)
 at
 org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1098)
 at
 org.xml.sax.helpers.XMLReaderAdapter.parse(XMLReaderAdapter.java:223)
 at javax.xml.parsers.SAXParser.parse(SAXParser.java:362)
 at javax.xml.parsers.SAXParser.parse(SAXParser.java:301)
 at
 org.apache.catalina.util.xml.XmlMapper.readXml(XmlMapper.java:228)
 at org.apache.catalina.startup.Catalina.start(Catalina.java:725)
 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)
 
 
 thanks 
 
 -Raj
 
 
  [EMAIL PROTECTED] 09/23/02 12:50PM 
 
 Well, in that case, I will include here the content of a message posted
 by
 Tim Funk on 6/13/2002, which has his solution for this, which I find
 pretty
 neat.  Hopefully Tim doesn't mind, and I should add that this would
 break
 portability, most notably on Windows machines.
 
 On 6/13/2002, Tim Funk wrote:
 
 For what its worth - I created (and use) a LifecycleListener that runs 
 on startup which logs the process ID into a file called tomcat.pid. 
 Which is created by a shell script called writepid.sh. Below is all the 
 code to get this to work. This code also assumes your current working 
 directory is $CATALINA_HOME.
 
 --Begin code
 import org.apache.catalina.LifecycleEvent;
 
 /**
   * A helper for getting the PID of java so shutting down tomcat is MUCH
   * easier.
   */
 public class PidLifeCycle implements
 org.apache.catalina.LifecycleListener {
   public void lifecycleEvent(LifecycleEvent event)  {
  if (start.equals(event.getType())) {
 try {
  Runtime.getRuntime().exec(/bin/sh bin/writepid.sh);
 } catch(Throwable e) {
e.printStackTrace();
 }
  }
   }
 }
 --End Code
 
 The code above will launch the following shell script. Should be in the 
 bin/ directory of your tomcat installation.
 --Begin Shell script
 echo $PPID  logs/tomcat.pid
 --End Shell script
 
 Then add the following into server.xml
 --Begin server.xml snippet
 Listener className=PidLifeCycle /
 --End server.xml snippet
 
 -Tim
 
 == end ===
 
 Thanks, Tim!
 
 John
 
 
  -Original Message-
  From: Anthony Milbourne [mailto:[EMAIL PROTECTED]]
  Sent: Monday, September 23, 2002 12:45 PM
  To: 'Tomcat Users List'
  Subject: RE: Running multiple tomcat instances ?
  
  
  Hi John
  
  I don't think this option is available under Solaris :-(.
  
  Anthony.
  
   -Original Message-
   From:Turner, John [SMTP:[EMAIL PROTECTED]]
   Sent:23 

Locating Dynamically Generated Files...

2002-09-24 Thread postmaster

My JSP uses a bean that creates a file dynamically.
Unfortunately, the file ends up in the jakarta-tomcat\bin directory rather than 
in my web app directory where the JSP tries to get it from.

How do I make dynamically generated files end up in my web app directory?
Anyone run across any sample code that does this?

Thanks...

Jerry


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




Pager-taglib with Tomcat 4.1.12? Anyone got it working?

2002-09-24 Thread Ryan Cornia

I'm using the pager-taglib from http://jsptags.com/tags/navigation/pager/. The code 
worked fine in SilverStream and tomcat 4.0.4. When I try tomcat 4.1.12 however, the 
page displays correctly with the page tags the first time the page is loaded after 
compile. If I hit refresh, or try and navigate to a different pager offset, the page 
comes back with all the items blank.
 
Anyone have the pager-taglib working with tomcat 4.1.12? Did you have to make some 
changes to the taglib somewhere to get it to work?
 
Thanks,
Ryan
 




RE: Pager-taglib with Tomcat 4.1.12? Anyone got it working?

2002-09-24 Thread Geddes, Mark (ANTS)

Ryan,

Here is my patch, although it isn't well tested or verified yet.

Mark


Hi Mark,

Thanks for the info. Open-source saves the day, again. :-)

-James

On Mon, Sep 23, 2002 at 03:57:13PM +0100, Geddes, Mark (ANTS) wrote:
 James,
 
 Tomcat 4.1.11 is an improvement over 4.1.10 (the pages compile). However
 there were still some problems. I made a small change to PagerTag which
 solved the issue for me. I think Jasper is caching tag classes where
 possible. The variable itemCount was not being reset between page
 invocations, so I reset it to zero in doStartTag().
 
 regards
 
 Mark
 
   public int doStartTag() throws JspException {
   if (url == null) {
   url = ((HttpServletRequest)pageContext.getRequest())
   .getRequestURI();
   int i = url.indexOf('?');
   if (i != -1)
   url = url.substring(0, i);
   }
 
   itemCount = 0;
   String tmp =
 pageContext.getRequest().getParameter(id+OFFSET_PARAM);
   if (tmp != null) {
   try {
   offset = Integer.parseInt(tmp);
   if (offset  0)
   offset = 0;
   if (isOffset)
   itemCount = offset;
 
   } catch (NumberFormatException e) {
 e.printStackTrace();
   }
   }
 
   pageNumber = pageNumber(offset);
   pageNumberInteger = new Integer(1+pageNumber);
 
   pageContext.setAttribute(id+PAGE_NUMBER, pageNumberInteger);
   pageContext.setAttribute(id+OFFSET, new Integer(offset));
   pageContext.setAttribute(id+MAX_ITEMS, new
 Integer(maxItems));
 
   return EVAL_BODY_INCLUDE;
   }
 
 -Original Message-
 From: '[EMAIL PROTECTED]' [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, September 18, 2002 4:26 PM
 To: Geddes, Mark (ANTS)
 Subject: Re: tomcat 4.1.10
 
 
 Hi Mark,
 
 There was a bug discovered in in Tomcat 4.1.x which the pager tag library
 help ferret out. You might want to download a newer version of Tomcat,
they
 may have fixed it by now.
 
 Also, the source is included in the pager-taglib-1.1.jar.
 
 -James
 
 On Wed, Sep 18, 2002 at 02:25:03PM +0100, Geddes, Mark (ANTS) wrote:
  James,
   
  Not sure if jsptags.com is still active but I was wondering if you have
  tried the pager tags with tomcat 4.1.10 (Jasper2). My pages are failing
to
  compile if I include both a pg:prev and pg:next tag. I'm sure its an
  issue with the JSP compiler, but without access to the tag library
source,
  it is difficult to debug. Any help appreciated - we have enjoyed using
 them.
   
  Regards
   
  Mark

-Original Message-
From: Ryan Cornia [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, September 24, 2002 4:32 PM
To: 'Tomcat Users List'[EMAIL PROTECTED]
Subject: Pager-taglib with Tomcat 4.1.12? Anyone got it working?


I'm using the pager-taglib from http://jsptags.com/tags/navigation/pager/.
The code worked fine in SilverStream and tomcat 4.0.4. When I try tomcat
4.1.12 however, the page displays correctly with the page tags the first
time the page is loaded after compile. If I hit refresh, or try and navigate
to a different pager offset, the page comes back with all the items blank.
 
Anyone have the pager-taglib working with tomcat 4.1.12? Did you have to
make some changes to the taglib somewhere to get it to work?
 
Thanks,
Ryan
 



***
This communication (including any attachments) contains confidential information.  If 
you are not the intended recipient and you have received this communication in error, 
you should destroy it without copying, disclosing or otherwise using its contents.  
Please notify the sender immediately of the error.

Internet communications are not necessarily secure and may be intercepted or changed 
after they are sent.  Abbey National Treasury Services plc does not accept liability 
for any loss you may suffer as a result of interception or any liability for such 
changes.  If you wish to confirm the origin or content of this communication, please 
contact the sender by using an alternative means of communication.

This communication does not create or modify any contract and, unless otherwise 
stated, is not intended to be contractually binding.

Abbey National Treasury Services plc. Registered Office:  Abbey National House, 2 
Triton Square, Regents Place, London NW1 3AN.  Registered in England under Company 
Registration Number: 2338548.  Regulated by the Financial Services Authority (FSA).
***


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

Re: using servlet as index documentation

2002-09-24 Thread Jacob Kjome

Hello Douglas,

Well, you should be able to provide a servlet-mapping.

Try this

servlet
servlet-nameMyIndexPage/servlet-name
servlet-classcom.mycompany.MyDefaultServlet/servlet-class
/servlet
servlet-mapping
servlet-nameMyIndexPage/servlet-name
url-pattern/index.html/url-pattern
/servlet-mapping

welcome-file-list
welcome-fileindex.html/welcome-file
welcome-fileindex.htm/welcome-file
welcome-fileindex.jsp/welcome-file
/welcome-file-list


Jake


Tuesday, September 24, 2002, 9:56:49 AM, you wrote:

DLS I saw that you cannot add a servlet as a welcome-file.  I've seen
DLS suggestions to use an HTML page or a JSP to redirect to a servlet
DLS (doing this currently), but is it possible to use a servlet to be your
DLS opening page?

DLS I tried using / as url-pattern, but it would redirect all URL's to the
DLS servlet.  I tried ^/$ and that didn't work either.

DLS Any ideas?

DLS ---
DLS Douglas L Stewart
DLS [EMAIL PROTECTED]

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



-- 
Best regards,
 Jacobmailto:[EMAIL PROTECTED]


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




RE: Locating Dynamically Generated Files...

2002-09-24 Thread Adam Greene

You could use the servlet context's getRealPath().  I'm not sure the exact
name of the class (I use Tapestry for all my web development and it accesses
it as getServletContext().getRealPath()).

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, September 24, 2002 12:26 PM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: Locating Dynamically Generated Files...


My JSP uses a bean that creates a file dynamically.
Unfortunately, the file ends up in the jakarta-tomcat\bin directory rather
than
in my web app directory where the JSP tries to get it from.

How do I make dynamically generated files end up in my web app directory?
Anyone run across any sample code that does this?

Thanks...

Jerry


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



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




? java.net.BindException: Address already in use

2002-09-24 Thread Bill Blackmon

I'm getting to following error message when I start Tomcat on my Hosts
machine:


Catalina.start: LifecycleException:  Error creating server socket
(java.net.BindException):  java.net.BindException: Address already in use
LifecycleException:  Error creating server socket (java.net.BindException):
java.net.BindException: Address already in use
 at
org.apache.catalina.connector.warp.WarpConnector.initialize(WarpConnector.ja
va:491)
 at
org.apache.catalina.core.StandardService.initialize(StandardService.java:454
)
 at
org.apache.catalina.core.StandardServer.initialize(StandardServer.java:553)
 at org.apache.catalina.startup.Catalina.start(Catalina.java:780)
 at org.apache.catalina.startup.Catalina.execute(Catalina.java:681)
 at org.apache.catalina.startup.Catalina.process(Catalina.java:179)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
)
 at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
.java:25)
 at java.lang.reflect.Method.invoke(Method.java:324)
 at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:243)
- Root Cause -
java.net.BindException: Address already in use
 at java.net.PlainSocketImpl.socketBind(Native Method)
 at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:321)
 at java.net.ServerSocket.bind(ServerSocket.java:308)
 at java.net.ServerSocket.bind(ServerSocket.java:266)
 at java.net.ServerSocket.init(ServerSocket.java:182)
 at java.net.ServerSocket.init(ServerSocket.java:138)
 at
org.apache.catalina.net.DefaultServerSocketFactory.createSocket(DefaultServe
rSocketFactory.java:118)
 at
org.apache.catalina.connector.warp.WarpConnector.initialize(WarpConnector.ja
va:485)
 at
org.apache.catalina.core.StandardService.initialize(StandardService.java:454
)
 at
org.apache.catalina.core.StandardServer.initialize(StandardServer.java:553)
 at org.apache.catalina.startup.Catalina.start(Catalina.java:780)
 at org.apache.catalina.startup.Catalina.execute(Catalina.java:681)
 at org.apache.catalina.startup.Catalina.process(Catalina.java:179)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
)
 at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
.java:25)
 at java.lang.reflect.Method.invoke(Method.java:324)
 at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:243)


I've shutdown Tomcat and let it expire for quite a long period of time. What
else can cause this? A port conflict? All I have to
analyze it are the logs. Any suggestions?

Thanks,
Bill


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




Re: Locating Dynamically Generated Files...

2002-09-24 Thread Jacob Kjome


Are you saying that you want to create files and leave them in a place
on the web where someone can get them at a future date, or is this
just a dynamic file for this user for this particular download?  You
probably just want to stream the file to them and not create it on
disk.  You should avoid File IO as much as possible because there is
no guarantee in the servlet spec that you have write access to your
application other than the tempdir:
File temp = (File)context.getAttribute(javax.servlet.context.tempdir);

you can write it there, do stuff with it and then stream it to the
user.  If you really do have to write files to your webapp, then make
double sure that the user running Tomcat has permission to write files
to your webapp's directory and make sure that you deploy a directory
rather than a .war file.  If you run the app from a .war file, you
will have *no* file system access to your webapp.

Jake


Tuesday, September 24, 2002, 10:26:20 AM, you wrote:

ppc My JSP uses a bean that creates a file dynamically.
ppc Unfortunately, the file ends up in the jakarta-tomcat\bin directory rather than 
ppc in my web app directory where the JSP tries to get it from.

ppc How do I make dynamically generated files end up in my web app directory?
ppc Anyone run across any sample code that does this?

ppc Thanks...

ppc Jerry


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



-- 
Best regards,
 Jacobmailto:[EMAIL PROTECTED]


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




JBoss-2.4.8_Tomcat-4.0.4 not working by default

2002-09-24 Thread Rajeshkumar.R

Hello sir,

  I had down loaded JBoss-2.4.8_Tomcat-4.0.4.zip(jboss - catalina) , I 
installed it to my system.
but by default it is not working (inspite of all of its classpath settings)

I made settings for enviornment variables as follows:-

SET JBOSS_DIST=E:\JBoss-2.4.8_Tomcat-4.0.4\JBOSS

SET CATALINA_HOME=E:\JBoss-2.4.8_Tomcat-4.0.4\CATALINA

SET JAVA_HOME=E:\JDK1.3
 and other class path also i made .
 When i start my server and if i try to invoke the localhost:8080, the server 
is giving 
an error at the console as [INFO,Engine] StandardHost[localhost]: MAPPING 
configuration error for request uri
and also the internet explore is also giving an error as bellow



type Status report

message No Context configured to process this request

description The server encountered an internal error (No Context configured to process 
this request) that prevented it from fulfilling this request.


Please tell me what modification i have to make to my server inorder to 
make it work properly

with Regards

R.Rajeshkumar






Re: JBoss-2.4.8_Tomcat-4.0.4 not working by default

2002-09-24 Thread Jacob Kjome

Hello Rajeshkumar.R,

Try the JBoss 3.0 + Tomcat 4.0.4 combo.  It is pretty easy to set up
and I don't think it even involves settting environment variables.

Jake

Tuesday, September 24, 2002, 10:07:46 PM, you wrote:

RR Hello sir,

RR   I had down loaded JBoss-2.4.8_Tomcat-4.0.4.zip(jboss - catalina) , I 
installed it to my system.
RR but by default it is not working (inspite of all of its classpath settings)

RR I made settings for enviornment variables as follows:-

RR SET JBOSS_DIST=E:\JBoss-2.4.8_Tomcat-4.0.4\JBOSS

RR SET CATALINA_HOME=E:\JBoss-2.4.8_Tomcat-4.0.4\CATALINA

RR SET JAVA_HOME=E:\JDK1.3
RR  and other class path also i made .
RR  When i start my server and if i try to invoke the localhost:8080, the 
server is giving 
RR an error at the console as [INFO,Engine] StandardHost[localhost]: MAPPING 
configuration error for request uri
RR and also the internet explore is also giving an error as bellow

RR 

RR type Status report

RR message No Context configured to process this request

RR description The server encountered an internal error (No Context configured to 
process this request) that prevented it from fulfilling this request.


RR Please tell me what modification i have to make to my server inorder 
to make it work properly

RR with Regards

RR R.Rajeshkumar






-- 
Best regards,
 Jacobmailto:[EMAIL PROTECTED]


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




RE: ? java.net.BindException: Address already in use

2002-09-24 Thread Vincent . Gaboriau

Tomcat try to use a port already used by another application.
You must verify that a tomcat instance doesn't run.
You can see the opened port with an utility like netstat.

 -Message d'origine-
 De : Bill Blackmon [mailto:[EMAIL PROTECTED]]
 Envoyé : mardi 24 septembre 2002 17:44
 À : TOMCAT USERS GROUP
 Objet : ? java.net.BindException: Address already in use


 I'm getting to following error message when I start Tomcat on my Hosts
 machine:

 
 Catalina.start: LifecycleException:  Error creating server socket
 (java.net.BindException):  java.net.BindException: Address already in use
 LifecycleException:  Error creating server socket
 (java.net.BindException):
 java.net.BindException: Address already in use
  at
 org.apache.catalina.connector.warp.WarpConnector.initialize(WarpCo
 nnector.ja
 va:491)
  at
 org.apache.catalina.core.StandardService.initialize(StandardServic
 e.java:454
 )
  at
 org.apache.catalina.core.StandardServer.initialize(StandardServer.
 java:553)
  at org.apache.catalina.startup.Catalina.start(Catalina.java:780)
  at org.apache.catalina.startup.Catalina.execute(Catalina.java:681)
  at org.apache.catalina.startup.Catalina.process(Catalina.java:179)
  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  at
 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorIm
 pl.java:39
 )
  at
 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAc
 cessorImpl
 .java:25)
  at java.lang.reflect.Method.invoke(Method.java:324)
  at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:243)
 - Root Cause -
 java.net.BindException: Address already in use
  at java.net.PlainSocketImpl.socketBind(Native Method)
  at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:321)
  at java.net.ServerSocket.bind(ServerSocket.java:308)
  at java.net.ServerSocket.bind(ServerSocket.java:266)
  at java.net.ServerSocket.init(ServerSocket.java:182)
  at java.net.ServerSocket.init(ServerSocket.java:138)
  at
 org.apache.catalina.net.DefaultServerSocketFactory.createSocket(De
 faultServe
 rSocketFactory.java:118)
  at
 org.apache.catalina.connector.warp.WarpConnector.initialize(WarpCo
 nnector.ja
 va:485)
  at
 org.apache.catalina.core.StandardService.initialize(StandardServic
 e.java:454
 )
  at
 org.apache.catalina.core.StandardServer.initialize(StandardServer.
 java:553)
  at org.apache.catalina.startup.Catalina.start(Catalina.java:780)
  at org.apache.catalina.startup.Catalina.execute(Catalina.java:681)
  at org.apache.catalina.startup.Catalina.process(Catalina.java:179)
  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  at
 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorIm
 pl.java:39
 )
  at
 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAc
 cessorImpl
 .java:25)
  at java.lang.reflect.Method.invoke(Method.java:324)
  at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:243)
 

 I've shutdown Tomcat and let it expire for quite a long period of
 time. What
 else can cause this? A port conflict? All I have to
 analyze it are the logs. Any suggestions?

 Thanks,
 Bill


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



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




code separation with apache virtual hosts - tomcat hosts

2002-09-24 Thread Chris Price



Hi;

I have a system running Apache 1.3.26, mod_jk and Tomcat 4.1.12.

Apache has a number of name-based virtual hosts confgured, of which 2
are setup to route jsp and servlet requests to a ajp13 connector (called
'ajp13'). ajp13 is setup to use a single tomcat instance running on
localhost at port 8009. Tomcat itself is setup with seperate Host ...
/Host for each of the two corresponding front-end apache virtual
hosts.

My Question;

What kind of code seperation does the Tomcat Host../Host facility
provide?

In other words; what (if any) kind of safety and security mechanisms 
exist to ensure that code running under Host name=www.a.com .../Host
from Host name=www.b.com .../Host


I found the following excerpt in the Tomcat 3.2 doumentation;

We want different virtual hosts served by different Tomcat processes to
provide a clear separation between sites belonging to different
companies

Can anyone explain what this means?

Cheers  TIA

Chris

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




AW: ? java.net.BindException: Address already in use

2002-09-24 Thread Ralph Einfeldt

There are this options:
- at least one thread isn't dying so there is still
  a tomcat instance running
- the time between the end of tomcat and
  the restart was to short. So that the soccets have
  not closed completly.
- you have a port conflict.

Look if there are tomcat processes runing.
Look at the state of the ports.
Look who owns the ports.

If you wan't more help on how to achieve this
you have to supply your operating system as the
tools that answer this question are very different.

(For linux and other unik like systems is ps, netstat, lsof)

 -Ursprüngliche Nachricht-
 Von: Bill Blackmon [mailto:[EMAIL PROTECTED]]
 Gesendet: Dienstag, 24. September 2002 17:44
 An: TOMCAT USERS GROUP
 Betreff: ? java.net.BindException: Address already in use

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




Retrieving ServletContext Objects via PageContext

2002-09-24 Thread Jason Johnston

This may be a stupid question but I'm just starting to use custom tags and I'm running 
into a strange problem.  I'm using a DBCP for a mySQL database and my setup servlet 
places a handle to the pool in the ServletContext via the setAttribute() under the 
name dbPool.

Now other servlets can retrieve the pool handle fine and get a connection and do their 
business.  However my tag, which extends TagSupport can't seem to find the pool.  
Initially, I used getServletContext.getAttribute(dbPool).  Of course, I got a 
compile error telling me that there is no such method.

After some reading, it appeared that what I'm looking for should be available via 
the pageContext.getAttribute(dbPool,pageContext.APPLICATION_SCOPE);

However, I'm still not getting a handle on the DB Pool.  I know there's probably 
somethings fairly simple I'm missing here, either syntax or concept.  Could someone 
give me some insight.  Thanks.



Re: ? java.net.BindException: Address already in use

2002-09-24 Thread Bill Blackmon

The host machine is Linux, don't know which flavor. I have no idea how how
to:

Look if there are tomcat processes runing.
Look at the state of the ports.
Look who owns the ports.

from the SSH connection I have.

Thanks,
Bill



- Original Message -
From: Ralph Einfeldt [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Tuesday, September 24, 2002 12:04 PM
Subject: AW: ? java.net.BindException: Address already in use


There are this options:
- at least one thread isn't dying so there is still
  a tomcat instance running
- the time between the end of tomcat and
  the restart was to short. So that the soccets have
  not closed completly.
- you have a port conflict.

Look if there are tomcat processes runing.
Look at the state of the ports.
Look who owns the ports.

If you wan't more help on how to achieve this
you have to supply your operating system as the
tools that answer this question are very different.

(For linux and other unik like systems is ps, netstat, lsof)

 -Ursprüngliche Nachricht-
 Von: Bill Blackmon [mailto:[EMAIL PROTECTED]]
 Gesendet: Dienstag, 24. September 2002 17:44
 An: TOMCAT USERS GROUP
 Betreff: ? java.net.BindException: Address already in use

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



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




Re: tomcat 4.1.12

2002-09-24 Thread Tim Funk

There was a security flaw in 4.1.11 and earlier that so that /servlet/* 
could be used for bad things. The flaw was fixed in the invoker servlet 
for the obvious issues but it still leaves the door open for people to 
do other bad things if people aren't careful.

In $CATALINA_HOME/conf/web.xml - look for the invoker servlet and 
uncomment it to turn that functionality back on. My guess is it is now 
commented out by default (which is a good practice to have).

Personally - I hate the concept of /servlet/* being able to invoke a 
class. It may make development easier - but then you run into subtle 
security goofs.

-Tim



Dennis Muhlestein wrote:
 After using 4.1.10 for a bit, I see a few issues.  I think, ok we can
 wait for a few fixes.  Things worked ok though.
 
 So now I download 4.1.12.  Shouldn't the server.xml file from 4.1.10 be
 pretty much compatible with 4.1.12?  I tried that to start with but
 can't get the web app to recognize servlets.
 
 I then tried starting from scratch with the original 4.1.12 server.xml. 
 Same problem.  I can see all my jsps fine but any servlet request gives
 error 404 not found.
 
 Any suggestions?  I didn't change anthing but the tomcat version.
 
 Thanks
 Dennis
 
 --
 To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: mailto:[EMAIL PROTECTED]
 
 
 


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




OT: Help wanted

2002-09-24 Thread Bill Blackmon

Needed a Tomcat/MySql/Linux admin/developer in NYC to help with deploying a
weapp to host.
If you are local and can spare a few hours, I'm willing to pay up to $75 hr.
to get a site up and running
on a hosts Linux machine.

Thanks,
Bill
917-363-6766


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




RE: ? java.net.BindException: Address already in use

2002-09-24 Thread Turner, John


From a command prompt:

man ps (manual pages for the ps command, ps = process status)
man netstat (manual pages for the netstat command, netstat = network status,
including ports)

Also:

ps -ef --cols=300 |grep java |more (tells you all tomcat processes running)

If tomcat is shutdown, but java processes are still present in the output of
the ps command, then Tomcat is hung.  At that point, you'll need to use the
kill command to kill Tomcat, but you'll need to be root to do it (man kill).
You would use the output of the ps command to get the process ID (PID) of
the java process where the parent process ID (PPID) is 1.  If there are
other developers/tomcat processes on this box, you will have to be very
careful not to trash whatever it is they are doing.

John

 -Original Message-
 From: Bill Blackmon [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, September 24, 2002 12:23 PM
 To: Tomcat Users List
 Subject: Re: ? java.net.BindException: Address already in use
 
 
 The host machine is Linux, don't know which flavor. I have no 
 idea how how
 to:
 
 Look if there are tomcat processes runing.
 Look at the state of the ports.
 Look who owns the ports.
 
 from the SSH connection I have.
 
 Thanks,
 Bill
 
 
 
 - Original Message -
 From: Ralph Einfeldt [EMAIL PROTECTED]
 To: Tomcat Users List [EMAIL PROTECTED]
 Sent: Tuesday, September 24, 2002 12:04 PM
 Subject: AW: ? java.net.BindException: Address already in use
 
 
 There are this options:
 - at least one thread isn't dying so there is still
   a tomcat instance running
 - the time between the end of tomcat and
   the restart was to short. So that the soccets have
   not closed completly.
 - you have a port conflict.
 
 Look if there are tomcat processes runing.
 Look at the state of the ports.
 Look who owns the ports.
 
 If you wan't more help on how to achieve this
 you have to supply your operating system as the
 tools that answer this question are very different.
 
 (For linux and other unik like systems is ps, netstat, lsof)
 
  -Ursprüngliche Nachricht-
  Von: Bill Blackmon [mailto:[EMAIL PROTECTED]]
  Gesendet: Dienstag, 24. September 2002 17:44
  An: TOMCAT USERS GROUP
  Betreff: ? java.net.BindException: Address already in use
 
 --
 To unsubscribe, e-mail:
 mailto:[EMAIL PROTECTED]
 For additional commands, e-mail:
 mailto:[EMAIL PROTECTED]
 
 
 
 --
 To unsubscribe, e-mail:   
mailto:[EMAIL PROTECTED]
For additional commands, e-mail:
mailto:[EMAIL PROTECTED]

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




tomcat 4.1.12

2002-09-24 Thread Dennis Muhlestein


After using 4.1.10 for a bit, I see a few issues.  I think, ok we can
wait for a few fixes.  Things worked ok though.

So now I download 4.1.12.  Shouldn't the server.xml file from 4.1.10 be
pretty much compatible with 4.1.12?  I tried that to start with but
can't get the web app to recognize servlets.

I then tried starting from scratch with the original 4.1.12 server.xml. 
Same problem.  I can see all my jsps fine but any servlet request gives
error 404 not found.

Any suggestions?  I didn't change anthing but the tomcat version.

Thanks
Dennis

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




RE: Retrieving ServletContext Objects via PageContext

2002-09-24 Thread jon wingfield

The following will work:

pageContext.getServletContext().getAttribute(dbPool);

-Original Message-
From: Jason Johnston [mailto:[EMAIL PROTECTED]]
Sent: 24 September 2002 17:25
To: Tomcat Users List
Subject: Retrieving ServletContext Objects via PageContext


This may be a stupid question but I'm just starting to use custom tags and
I'm running into a strange problem.  I'm using a DBCP for a mySQL database
and my setup servlet places a handle to the pool in the ServletContext via
the setAttribute() under the name dbPool.

Now other servlets can retrieve the pool handle fine and get a connection
and do their business.  However my tag, which extends TagSupport can't seem
to find the pool.  Initially, I used
getServletContext.getAttribute(dbPool).  Of course, I got a compile error
telling me that there is no such method.

After some reading, it appeared that what I'm looking for should be
available via
the pageContext.getAttribute(dbPool,pageContext.APPLICATION_SCOPE);

However, I'm still not getting a handle on the DB Pool.  I know there's
probably somethings fairly simple I'm missing here, either syntax or
concept.  Could someone give me some insight.  Thanks.


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




Re: tomcat 4.1.12

2002-09-24 Thread William Lee

Tim Funk wrote:
 There was a security flaw in 4.1.11 and earlier that so that /servlet/* 
 could be used for bad things. The flaw was fixed in the invoker servlet 
 for the obvious issues but it still leaves the door open for people to 
 do other bad things if people aren't careful.
 
 In $CATALINA_HOME/conf/web.xml - look for the invoker servlet and 
 uncomment it to turn that functionality back on. My guess is it is now 
 commented out by default (which is a good practice to have).
 
 Personally - I hate the concept of /servlet/* being able to invoke a 
 class. It may make development easier - but then you run into subtle 
 security goofs.
 
 -Tim
 

Please excuse my ignorance, what's the preferred way to invoke a servlet 
class file then?

I have a servlet named smimc that I defined a web.xml inside the 
smimc/WEB-INF/ directory:

...
 servlet
 servlet-name
smimc
 /servlet-name
 servlet-class
 org.apache.turbine.Turbine
 /servlet-class
...

I used to be able to invoke it with the path /smimc/servlet/smimc

However, this doesn't seem to work anymore with the invoker turned off. 
I can turn the lines in tomcat's web.xml back on but that risks 
security (?).  So what's the proper way for this to work then?

Will


-- 
William Lee (Will)| Sendmail Inc.
Email:  [EMAIL PROTECTED] | http://www.sendmail.com
Tel:(510) 594-5505|


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




RE: Retrieving ServletContext Objects via PageContext

2002-09-24 Thread Jason Johnston

Ok, then I must be having another problem.  I'm running into a null pointer exception 
that I was assuming was the Tag's inability to retrieve a handle on the pool.

Here's my code:

/*
 * testTag.java
 *
 * Created on September 23, 2002, 3:21 PM
 */

package boa;
import sun.misc.*;
import javax.servlet.*;
import javax.servlet.http.*;
import java.io.*;
import java.sql.*;
import javax.servlet.jsp.tagext.*;
import javax.servlet.jsp.*;
import com.javaexchange.dbConnectionBroker.*;

/**
 *
 * @author  epa2466
 * @version 
 */
public class testTag extends BodyTagSupport {

/** Creates new testTag */
public int doStartTag() throws JspException {
JspWriter out = pageContext.getOut();
DbConnectionBroker 
pool=(DbConnectionBroker)pageContext.getServletContext().getAttribute(dbPool);
if(pool==null){
try{
  out.println(Couldn't find Pool);
  return SKIP_BODY;
}catch(IOException e){};
}else{
Connection conn=pool.getConnection();
  try{
if(conn==null)
{
//out.println(No Connection available);

}
 else
 {
 
   Statement stmt=conn.createStatement();
ResultSet rs=stmt.executeQuery(select * from names);
out.println(table);
while(rs.next()){
out.println(trtd
   + rs.getString(FirstName)
   + /tdtd
   + rs.getString(LastName)
   + /td/tr); 
}
out.println(/table);

   }
//out.println(/html);
}catch(SQLException e){throw new JspTagException(SQL Exception);}
 catch(IOException e2){throw new JspTagException(I/O Exception);}
  
}
return SKIP_BODY;
}
}

The error I'm getting is: 

java.lang.NullPointerException
at boa.testTag.doStartTag(testTag.java:28)
at org.apache.jsp.bob$jsp._jspService(bob$jsp.java:67)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
.
.
.
.

Line 28 of testTag is the line

DbConnectionBroker 
pool=(DbConnectionBroker)pageContext.getServletContext().getAttribute(dbPool);


If anyone has any insight, I would appreciate it.  Thanks




 [EMAIL PROTECTED] 09/24/02 11:48AM 
The following will work:

pageContext.getServletContext().getAttribute(dbPool);

-Original Message-
From: Jason Johnston [mailto:[EMAIL PROTECTED]]
Sent: 24 September 2002 17:25
To: Tomcat Users List
Subject: Retrieving ServletContext Objects via PageContext


This may be a stupid question but I'm just starting to use custom tags and
I'm running into a strange problem.  I'm using a DBCP for a mySQL database
and my setup servlet places a handle to the pool in the ServletContext via
the setAttribute() under the name dbPool.

Now other servlets can retrieve the pool handle fine and get a connection
and do their business.  However my tag, which extends TagSupport can't seem
to find the pool.  Initially, I used
getServletContext.getAttribute(dbPool).  Of course, I got a compile error
telling me that there is no such method.

After some reading, it appeared that what I'm looking for should be
available via
the pageContext.getAttribute(dbPool,pageContext.APPLICATION_SCOPE);

However, I'm still not getting a handle on the DB Pool.  I know there's
probably somethings fairly simple I'm missing here, either syntax or
concept.  Could someone give me some insight.  Thanks.


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



problem starting apache server

2002-09-24 Thread Ravishankar, CS





 Hello,
 
 I am having a problem with starting apache web server.
 
 when i try to start apache i get an error. which says
 
 '' error intializing protocol wrapper
 
 [12/092002 22:48:31:928] (ERROR) wrapper: cannot open
 ./conf/jserv.properties file
[12/09/2002 22:48:31:928] (ERROR) an error returned initializing
 protocol wrapper 
[12/09/2002 22:48:31:928] (ERROR) in init all protocols wrapper
 returned an error
   [12/09/2002 22:48:31:928] (EMERGENCY) Error initializing protocols 
  can u please tell me as to why this problem is coming
 
 do reply at the earliest.
 
   thanking you,
 
  Ravishankar.

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




Re: Re[2]: Cannot load JDBC driver class 'null'

2002-09-24 Thread John Walstra

I'm actually on the full version of 4.1.12 now, and still the same problem. 

For now I'm not using a pool, which makes my pages load like a dog. I'm 
thinking I'm going to have to try some other type of pooling if DBCP won't 
work for me or try something beside Tomcat.

On Tuesday 24 September 2002 10:18 am, Jacob Kjome wrote:
 Hello John,

 Unfortunately, I can't find anything wrong with your configuration.
 If your .jar file is common/lib and the driver that you reference is
 named correctly and actually exists in your jar file, then I'm at a
 loss.

 One question... You are using the *full* release of Tomcat-4.1.11,
 right?  If you are using the JDK-1.4 lite version, then remove that
 and install the full version.  The light version doesn't come with all
 the stuff you need for JNDI datasources.

 That's about all I can think of.  Sorry I can't be of more help.  If
 you solve your problem, let me know how you solved it.

 Jake

 Tuesday, September 24, 2002, 8:18:01 AM, you wrote:

 JW Ok, I kick on any and all debug statements I could find. Is the
 JW UserTransaction suspose to be null?

 JW 2002-09-24 07:52:43 NamingContextListener[/localhost/localhost/jkw]:
 Creating JW JNDI naming context
 JW 2002-09-24 07:52:43 NamingContextListener[/localhost/localhost/jkw]:
 JW Resource parameters for jdbc/JKW = ResourceParams[name=jdbc/JKW,
 JW parameters={factory=org.apache.commons.dbcp.BasicDataSourceFactory,
 JW url=jdbc:mysql://mysql.spoonserver.com:3306/jkw?autoReconnect=true,
 JW password=, maxWait=1, maxActive=100,
 JW driverClassName=org.gjt.mm.mysql.Driver, username=nobody, maxIdle=30}]
 JW 2002-09-24 07:52:43 NamingContextListener[/localhost/localhost/jkw]:  
 Adding JW resource ref jdbc/JKW
 JW 2002-09-24 07:52:43 NamingContextListener[/localhost/localhost/jkw]:
 JW
 ResourceRef[className=javax.sql.DataSource,factoryClassLocation=null,factor
yClassName=org.apache.naming.factory.ResourceFactory,{type=scope,content=Sha
reable},{type=auth,content=Container},{type=factory,content=org.apache.commo
ns.dbcp.BasicDataSourceFactory},{type=url,content=jdbc:mysql://mysql.spoonse
rver.com:3306/jkw?autoReconnect=true},{type=password,content=},{type=maxWait
,content=1},{type=maxActive,content=100},{type=driverClassName,content=o
rg.gjt.mm.mysql.Driver},{type=username,content=nobody},{type=maxIdle,content
=30}] JW 2002-09-24 07:52:43
 NamingContextListener[/localhost/localhost/jkw]: JW Resource parameters
 for UserTransaction = null

 JW On Tuesday 24 September 2002 6:17 am, John Walstra wrote:
  Ok since I'm getting no where fast, is there way to debug a DataSource?
  Look it's settings?
 
  On Sunday 22 September 2002 11:14 pm, Jacob Kjome wrote:
   Yes, it should find it.  Have you verified that the class in the
   driverClassName element actually does exist in that package in the jar
   file you just mentioned?
  
   Jake
  
   At 10:56 PM 9/22/2002 -0500, you wrote:
   I do have mysql-connector-java-2.0.14-bin.jar in the common/lib
directory. Shouldn't it find the correct class being there?
   
   On Sunday 22 September 2002 10:39 pm, Kwok Peng Tuck wrote:
 Are you actually using the mysql driver? Cause if it says loading
 driver null, means there isn't one.

 John Walstra wrote:
 I'm trying to set up a JNDI connection to MySQL. I'm using the
  binary release of 4.1.11 with 4.0.4's jasper-compiler.jar and
  jasper-runtime.jar. I'm also using mysql-connector-java-2.0.14.
 
 It's very similar to this thread
 http://www.mail-archive.com/tomcat-user@jakarta.apache.org/msg643
 46. ht ml , however I still can't get mine working after reading
  that thread. I've basically followed (cut and paste) the JNDI
  Datasource HOWTO,
  http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-datasource-
 exa mp les-h owto.html .
 
 Here is the Context section of my server.xml
 
 Context path=/jkw
 
  docBase=/usr/local/web/meta-htdocs/JWALSTRA/htdocs/jsp
  debug=5 useNaming=true
 reloadable=true crossContext=true
 
  Logger
  className=org.apache.catalina.logger.FileLogger
  prefix=jkw_log. suffix=.txt
  timestamp=true/
 
  Resource name=jdbc/JKW
  auth=Container
  type=javax.sql.DataSource/
 
  ResourceParams name=jdbc/JKW
  parameter
  namefactory/name
   
valueorg.apache.commons.dbcp.BasicDataSourceFactory/value
   
  /parameter
 
  !-- Maximum number of dB connections in
  pool.
   
Make sure you
   
  configure your mysqld
  max_connections
   
large enough to handle
   
  all of your db connections. Set to 0
  for
   
no limit.
   
  --

  1   2   >