mod_jk and ajp14 / ajp13++

2002-10-13 Thread David Cassidy

Dear All,

I'm wanting to get the ajp14 proposed secret key login / validation 
thingy going
and I wanted to know if anyone had had any success / how's it going ...

Look forward to any replies

Ta

David


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




Re: Performance testing

2002-10-02 Thread David Cassidy

Web Performance trainer.

It's very good You train it in the actions that you want it to perform
and then it replicates it **alot of times ** over.

It's easy to use and very good.

http://www.webperformanceinc.com/

And I'm saying this as one who has used it to make a big difference ...

David



Kaltwasser, Jonathan LT (OP 09WN5B) wrote:

Saw a couple of posts recommending testing performance over weeks...what
program do ya'll recommend to load test a portal system I'm building.
Its a servlet/jsp based portal, with login and workplaces (that pull in
remote content).

What program do ya'll recommend to simulate a log on, move around the
site a little, then log off after a period of time...and then simulate
1,000-50,000 users doing the same thing?


Jon

  





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




Re: Apache access log

2002-10-02 Thread David Cassidy

how does your apache config differ between the http and https
sections ?

ie do you have logging turned on for that virtual host ?

There are no problems that I know of ...

D

Ago Meister wrote:

Hello,

I have Apache 1.3.26, Tomcat 4.0.5 connected with
mod_jk. My problem is, that Apache does not generate
access.log file for one virtual host. Strange thing
is, that it generates it when accessing site using HTTPS.
Apache config is quite usual, containing virtual host
definitions, also virtual hosts are defined in Tomcat
server.xml. Does anybody have met similar problem,
or know, is it caused by mod_jk somehow? Please let
me know if you need more information.

br, Ago

--
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: Simple Bean not working but Servlet/JSP Working

2002-09-26 Thread David Cassidy

Manoj,

the error message says it all...
'java.util.MissingResourceException: Can't find bundle for base name 
forms, locale en_US'

Where is your file that you reference ...

bundle = ResourceBundle.getBundle(forms);

The error message is 'I can't find this file'

you don't list the forms file in your directory listing ...

David



Manoj Kithany wrote:

 Hi Everyone!

 As you all mentioned, I tried to use package for my beans/servlets. My 
 modified directory structure is :

 /kithany (root)
 /kithany/register.html
 /kithany/success.jsp
 /kithany/retry.jsp
 /kithany/process.jsp (bean)
 /kithany/WEB-INF/web.xml
 /kithany/WEB-INF/classes/mybean/FormBean.java   (package mybean)
 /kithany/WEB-INF/classes/mybean/FormBean.class  (package mybean)
 /kithany/META-INF/application.xml

 Then, I create the kithany.war file as shown below:

 #cd /kithany
 #jar -cvfM kithany.war .

 I then put the kithany.war file in /jboss/server/default/deploy 
 directory
 and  In your browser type:

 http://IP_ADDR_ESS:8080/kithany/register.html

 which works fine. In my register.html file my action is form
 action=/kithany/process.jsp method=post
 When I click the SUBMIT button in register.html form (which then calls
 bean and servelte), I get following Error - wonder why.

  

 Apache Tomcat/4.0.3 - HTTP Status 500 - Internal Server Error - that
 prevented it from fulfilling this request

 java.util.MissingResourceException: Can't find bundle for base name 
 forms, locale en_US
 at 
 java.util.ResourceBundle.throwMissingResourceException(ResourceBundle.java(Compiled 
 Code))
 at 
 java.util.ResourceBundle.getBundleImpl(ResourceBundle.java(Compiled 
 Code))
 at java.util.ResourceBundle.getBundle(ResourceBundle.java:534)
 at org.apache.jsp.process$jsp.jspInit(process$jsp.java:17)
 at org.apache.jasper.runtime.HttpJspBase.init(HttpJspBase.java:90)
 at 
 org.apache.jasper.servlet.JspServlet$JspServletWrapper.load(JspServlet.java:142) 

 at 
 
org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary(JspServlet.java:178)
 

 at 
 org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:188) 

 at 
 org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:381)
 at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:473)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
  


 My process.jsp file is:
  

 %@ page import=java.util.*, mybean.* %

 %!
 ResourceBundle bundle =null;
 public void jspInit() {
 bundle = ResourceBundle.getBundle(forms);
 }
 %

 jsp:useBean id=formHandler class=mybean.FormBean 
 scope=request  ** THIS
 IS MY LINE 10
 jsp:setProperty name=formHandler property=*/
 /jsp:useBean

 %
  if (formHandler.validate()) {
 %
 jsp:forward page=%=bundle.getString(\/kithany/process.success\)%/
 %
  }  else {
 %
 jsp:forward page=%=bundle.getString(\/kithany/process.retry\)%/
 %
  }
 %
  


 My web.xml file is as shown below:
 --- 

 web-app
   servlet
   servlet-nameFormBean/servlet-name
   servlet-classFormBean/servlet-class
   /servlet
   servlet
   servlet-nameHelloWorldExample/servlet-name
   servlet-classHelloWorldExample/servlet-class
   /servlet
 servlet-mapping
   servlet-nameHelloWorldExample/servlet-name
   url-pattern/HelloWorldExample/*/url-pattern
 /servlet-mapping
 servlet-mapping
   servlet-nameFormBean/servlet-name
   url-pattern/FormBean/*/url-pattern
 /servlet-mapping
 web-app
 --- 


 I would really appreciate if any of you Experts could put some light onto
 this error.

 THANKS!

 Manoj G. Kithany
 [EMAIL PROTECTED]





 From: Ron Day [EMAIL PROTECTED]
 Reply-To: Tomcat Users List [EMAIL PROTECTED]
 To: Tomcat Users List [EMAIL PROTECTED]
 Subject: RE: Simple Bean not working but Servlet/JSP Working
 Date: Mon, 23 Sep 2002 10:20:30 -0400

 You have to put your java classes in a package. If you do not, and put
 the class files in WEB-INF/classes then Tomcat cannot find them because
 this is not the default package location for Tomcat.

 Bottom line: always use pacjages for your classes !

 ron



 _
 Send and receive Hotmail on your mobile device: http://mobile.msn.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: Simple Bean not working but Servlet/JSP Working

2002-09-26 Thread David Cassidy

Manoj,

the error message says it all...
'java.util.MissingResourceException: Can't find bundle for base name 
forms, locale en_US'

Where is your file that you reference ...

bundle = ResourceBundle.getBundle(forms);

The error message is 'I can't find this file'

you don't list the forms file in your directory listing ...

David



Manoj Kithany wrote:

 Hi Everyone!

 As you all mentioned, I tried to use package for my beans/servlets. My 
 modified directory structure is :

 /kithany (root)
 /kithany/register.html
 /kithany/success.jsp
 /kithany/retry.jsp
 /kithany/process.jsp (bean)
 /kithany/WEB-INF/web.xml
 /kithany/WEB-INF/classes/mybean/FormBean.java   (package mybean)
 /kithany/WEB-INF/classes/mybean/FormBean.class  (package mybean)
 /kithany/META-INF/application.xml

 Then, I create the kithany.war file as shown below:

 #cd /kithany
 #jar -cvfM kithany.war .

 I then put the kithany.war file in /jboss/server/default/deploy 
 directory
 and  In your browser type:

 http://IP_ADDR_ESS:8080/kithany/register.html

 which works fine. In my register.html file my action is form
 action=/kithany/process.jsp method=post
 When I click the SUBMIT button in register.html form (which then calls
 bean and servelte), I get following Error - wonder why.

  

 Apache Tomcat/4.0.3 - HTTP Status 500 - Internal Server Error - that
 prevented it from fulfilling this request

 java.util.MissingResourceException: Can't find bundle for base name 
 forms, locale en_US
 at 
 java.util.ResourceBundle.throwMissingResourceException(ResourceBundle.java(Compiled 
 Code))
 at 
 java.util.ResourceBundle.getBundleImpl(ResourceBundle.java(Compiled 
 Code))
 at java.util.ResourceBundle.getBundle(ResourceBundle.java:534)
 at org.apache.jsp.process$jsp.jspInit(process$jsp.java:17)
 at org.apache.jasper.runtime.HttpJspBase.init(HttpJspBase.java:90)
 at 
 org.apache.jasper.servlet.JspServlet$JspServletWrapper.load(JspServlet.java:142) 

 at 
 
org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary(JspServlet.java:178)
 

 at 
 org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:188) 

 at 
 org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:381)
 at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:473)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
  


 My process.jsp file is:
  

 %@ page import=java.util.*, mybean.* %

 %!
 ResourceBundle bundle =null;
 public void jspInit() {
 bundle = ResourceBundle.getBundle(forms);
 }
 %

 jsp:useBean id=formHandler class=mybean.FormBean 
 scope=request  ** THIS
 IS MY LINE 10
 jsp:setProperty name=formHandler property=*/
 /jsp:useBean

 %
  if (formHandler.validate()) {
 %
 jsp:forward page=%=bundle.getString(\/kithany/process.success\)%/
 %
  }  else {
 %
 jsp:forward page=%=bundle.getString(\/kithany/process.retry\)%/
 %
  }
 %
  


 My web.xml file is as shown below:
 --- 

 web-app
   servlet
   servlet-nameFormBean/servlet-name
   servlet-classFormBean/servlet-class
   /servlet
   servlet
   servlet-nameHelloWorldExample/servlet-name
   servlet-classHelloWorldExample/servlet-class
   /servlet
 servlet-mapping
   servlet-nameHelloWorldExample/servlet-name
   url-pattern/HelloWorldExample/*/url-pattern
 /servlet-mapping
 servlet-mapping
   servlet-nameFormBean/servlet-name
   url-pattern/FormBean/*/url-pattern
 /servlet-mapping
 web-app
 --- 


 I would really appreciate if any of you Experts could put some light onto
 this error.

 THANKS!

 Manoj G. Kithany
 [EMAIL PROTECTED]





 From: Ron Day [EMAIL PROTECTED]
 Reply-To: Tomcat Users List [EMAIL PROTECTED]
 To: Tomcat Users List [EMAIL PROTECTED]
 Subject: RE: Simple Bean not working but Servlet/JSP Working
 Date: Mon, 23 Sep 2002 10:20:30 -0400

 You have to put your java classes in a package. If you do not, and put
 the class files in WEB-INF/classes then Tomcat cannot find them because
 this is not the default package location for Tomcat.

 Bottom line: always use pacjages for your classes !

 ron



 _
 Send and receive Hotmail on your mobile device: http://mobile.msn.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: 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: Simple Bean not working but Servlet/JSP Working

2002-09-23 Thread David Cassidy

Manoj,

the error message says it all...
'java.util.MissingResourceException: Can't find bundle for base name 
forms, locale en_US'

Where is your file that you reference ...

bundle = ResourceBundle.getBundle(forms);

The error message is 'I can't find this file'

you don't list the forms file in your directory listing ...

David



Manoj Kithany wrote:

 Hi Everyone!

 As you all mentioned, I tried to use package for my beans/servlets. My 
 modified directory structure is :

 /kithany (root)
 /kithany/register.html
 /kithany/success.jsp
 /kithany/retry.jsp
 /kithany/process.jsp (bean)
 /kithany/WEB-INF/web.xml
 /kithany/WEB-INF/classes/mybean/FormBean.java   (package mybean)
 /kithany/WEB-INF/classes/mybean/FormBean.class  (package mybean)
 /kithany/META-INF/application.xml

 Then, I create the kithany.war file as shown below:

 #cd /kithany
 #jar -cvfM kithany.war .

 I then put the kithany.war file in /jboss/server/default/deploy 
 directory
 and  In your browser type:

 http://IP_ADDR_ESS:8080/kithany/register.html

 which works fine. In my register.html file my action is form
 action=/kithany/process.jsp method=post
 When I click the SUBMIT button in register.html form (which then calls
 bean and servelte), I get following Error - wonder why.

  

 Apache Tomcat/4.0.3 - HTTP Status 500 - Internal Server Error - that
 prevented it from fulfilling this request

 java.util.MissingResourceException: Can't find bundle for base name 
 forms, locale en_US
 at 
 java.util.ResourceBundle.throwMissingResourceException(ResourceBundle.java(Compiled 
 Code))
 at 
 java.util.ResourceBundle.getBundleImpl(ResourceBundle.java(Compiled 
 Code))
 at java.util.ResourceBundle.getBundle(ResourceBundle.java:534)
 at org.apache.jsp.process$jsp.jspInit(process$jsp.java:17)
 at org.apache.jasper.runtime.HttpJspBase.init(HttpJspBase.java:90)
 at 
 org.apache.jasper.servlet.JspServlet$JspServletWrapper.load(JspServlet.java:142) 

 at 
 
org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary(JspServlet.java:178)
 

 at 
 org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:188) 

 at 
 org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:381)
 at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:473)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
  


 My process.jsp file is:
  

 %@ page import=java.util.*, mybean.* %

 %!
 ResourceBundle bundle =null;
 public void jspInit() {
 bundle = ResourceBundle.getBundle(forms);
 }
 %

 jsp:useBean id=formHandler class=mybean.FormBean 
 scope=request  ** THIS
 IS MY LINE 10
 jsp:setProperty name=formHandler property=*/
 /jsp:useBean

 %
  if (formHandler.validate()) {
 %
 jsp:forward page=%=bundle.getString(\/kithany/process.success\)%/
 %
  }  else {
 %
 jsp:forward page=%=bundle.getString(\/kithany/process.retry\)%/
 %
  }
 %
  


 My web.xml file is as shown below:
 --- 

 web-app
   servlet
   servlet-nameFormBean/servlet-name
   servlet-classFormBean/servlet-class
   /servlet
   servlet
   servlet-nameHelloWorldExample/servlet-name
   servlet-classHelloWorldExample/servlet-class
   /servlet
 servlet-mapping
   servlet-nameHelloWorldExample/servlet-name
   url-pattern/HelloWorldExample/*/url-pattern
 /servlet-mapping
 servlet-mapping
   servlet-nameFormBean/servlet-name
   url-pattern/FormBean/*/url-pattern
 /servlet-mapping
 web-app
 --- 


 I would really appreciate if any of you Experts could put some light onto
 this error.

 THANKS!

 Manoj G. Kithany
 [EMAIL PROTECTED]





 From: Ron Day [EMAIL PROTECTED]
 Reply-To: Tomcat Users List [EMAIL PROTECTED]
 To: Tomcat Users List [EMAIL PROTECTED]
 Subject: RE: Simple Bean not working but Servlet/JSP Working
 Date: Mon, 23 Sep 2002 10:20:30 -0400

 You have to put your java classes in a package. If you do not, and put
 the class files in WEB-INF/classes then Tomcat cannot find them because
 this is not the default package location for Tomcat.

 Bottom line: always use pacjages for your classes !

 ron



 _
 Send and receive Hotmail on your mobile device: http://mobile.msn.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: Simple Bean not working but Servlet/JSP Working

2002-09-23 Thread David Cassidy

What's in this properties file ?
The error message mentions a

java.util.MissingResourceException: Can't find resource for bundle 
java.util.PropertyResourceBundle, key /kithany/retry.jsp

Like it's trying to use /kithany/retry.jsp as a key within the resources 
file ?.

David



Manoj Kithany wrote:

 Hi David,

 THANKS for your reply.

 I have the following directory struct (it had forms.properties file in 
 my directory which I missed to mention in email). It is still giving 
 me same error:
 /kithany (root)
 /kithany/register.html
 /kithany/success.jsp
 /kithany/retry.jsp
 /kithany/process.jsp (bean)
 /kithany/WEB-INF/web.xml
 /kithany/WEB-INF/classes/mybean/FormBean.java (package mybean)
 /kithany/WEB-INF/classes/mybean/FormBean.class(package mybean)
 /kithany/WEB-INF/classes/forms.properties
 /kithany/WEB-INF/classes/mybean/forms.properties
 /kithany/META-INF/application.xml

 The error it gives is:
 --
 java.util.MissingResourceException: Can't find resource for bundle 
 java.util.PropertyResourceBundle, key /kithany/retry.jsp
 at java.util.ResourceBundle.getObject(ResourceBundle.java(Compiled 
 Code))
 at java.util.ResourceBundle.getString(ResourceBundle.java(Compiled 
 Code))
 at org.apache.jsp.process$jsp._jspService(process$jsp.java:142)
 at 
 org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
 at 
 org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:201) 

 at 
 org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:381)
 at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:473)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
 --

 THANKS again.

 Manoj G. Kithany


 From: David Cassidy [EMAIL PROTECTED]
 Reply-To: Tomcat Users List [EMAIL PROTECTED]
 To: Tomcat Users List [EMAIL PROTECTED]
 Subject: Re: Simple Bean not working but Servlet/JSP Working
 Date: Mon, 23 Sep 2002 16:13:57 +0100

 Manoj,

 the error message says it all...
 'java.util.MissingResourceException: Can't find bundle for base name 
 forms, locale en_US'

 Where is your file that you reference ...

 bundle = ResourceBundle.getBundle(forms);

 The error message is 'I can't find this file'

 you don't list the forms file in your directory listing ...

 David





 _
 Send and receive Hotmail on your mobile device: http://mobile.msn.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: IE browser doesn't give error

2002-09-20 Thread David Cassidy

Robert i think you are missing what he's asking. (Or I am...)

Tomcat / Apache will not be able to send **ANY** error message as he has 
unplugged the network cable.

the problem ( or bug ) that he has noticed is that if he clicks on an 
HREF when the servers not there ( ie unplugged turned off etc) IE gives 
an error message. But if IE is posting the data back in a form then 
there is no error message what so ever.

ergo 

:)

D


Robert Sanders wrote:

 Actual, in IE go to Tools  Internet Options  Advanced .  Find and 
 uncheck the boxes that say Show friendly HTTP error messages and 
 Show friendly URLs. 
 For a different solution, setup Tomcat to use a custom error page.  
 Then ensure that the error page inserts a lot of garbage text (can 
 be in an HTML comment), there is some magic value, I think something 
 like 512 bytes or such, if the page is bigger than this it will tend 
 to over ride IE's not so friendly error messages.

 David Cassidy wrote:

 flippant answer but ...

 Don't use IE :)

 unless you have the source code of IE you're a little buggered

 David


 randie ursal wrote:

 hi,

   sorry for asking about this but i still haven't found a solution 
 on why this is happening.

   i try to make an abnormal scenario on my web application, here it is:

   I first access my web application and do some operation, then in 
 the middle of my
   transaction i disconnect the network cable to see if an error 
 would be displayed by IE
   browser if i click on a link that needs to request to my servlet. 
 This doesn't seem
   to work normally, because if i'm going to click on a button which 
 is basically an HTML
   Formthe IE browser wont display its error page like  display 
 that network is down or
   DNS unavailable.   But if i click on links that is using href to 
 point to its server
resource that IE browser can give the error message.

   any idea about this, and any possible solution?

   p.s  really need it as soon as possible.

 thanks a lot in advance
 randie



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

 tsdok

 -- 
 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: Problems connecting Tomcat with Apache using ajp13

2002-09-19 Thread David Cassidy

John,

Where's the definition for ajp12 ?  :o)

David


Turner, John wrote:

I would remove the load-balancing lines from workers.properties.  Here is a
plain-vanilla, working workers.properties file:

# Setup for apache system
#
workers.tomcat_home=/usr/local/jakarta-tomcat-4.1.10
workers.java_home=/usr/java/j2sdk1.4.0_01
ps=/
worker.list=ajp12, ajp13

# Definition for Ajp13 worker
#
worker.ajp13.port=8009
worker.ajp13.host=localhost
worker.ajp13.type=ajp13

John

  

-Original Message-
From: Marc Vila Pérez [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, September 18, 2002 8:22 PM
To: Tomcat Users List
Subject: Problems connecting Tomcat with Apache using ajp13


Hi everybody!
I'm trying to connect tomcat 4.1.10 with apache 1.3.22, on 
Linux RH. In
the server I want to install several hosts (using virtual hosting).
I'm using org.apache.ajp.tomcat4.Ajp13Connector, I've 
downloaded several
mod_jk.so (tried different versions), ...
On every virtual host in httpd.conf there is a directive
JkMount /*.jsp ajp13
Seems than apache finds the connector, but tomcat cannot create the
servlet to serve the jsp page.
This is the output of the mod_jk log file (JkLogFile):




--
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: Problems connecting Tomcat with Apache using ajp13

2002-09-19 Thread David Cassidy

it was one of the problems that another user had.
had it in the list and it wasn't there 8-)

ah good old 'dd' no command more useful ...

:)

David


Turner, John wrote:

Good point.  I don't have one.  Guess I was a little ruthless with the
delete line command in vi. :)

John


  

-Original Message-
From: David Cassidy [mailto:[EMAIL PROTECTED]]
Sent: Thursday, September 19, 2002 9:57 AM
To: Tomcat Users List
Subject: Re: Problems connecting Tomcat with Apache using ajp13


John,

Where's the definition for ajp12 ?  :o)

David


Turner, John wrote:



I would remove the load-balancing lines from 
  

workers.properties.  Here is a


plain-vanilla, working workers.properties file:

# Setup for apache system
#
workers.tomcat_home=/usr/local/jakarta-tomcat-4.1.10
workers.java_home=/usr/java/j2sdk1.4.0_01
ps=/
worker.list=ajp12, ajp13

# Definition for Ajp13 worker
#
worker.ajp13.port=8009
worker.ajp13.host=localhost
worker.ajp13.type=ajp13

John

 

  

-Original Message-
From: Marc Vila Pérez [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, September 18, 2002 8:22 PM
To: Tomcat Users List
Subject: Problems connecting Tomcat with Apache using ajp13


Hi everybody!
I'm trying to connect tomcat 4.1.10 with apache 1.3.22, on 
Linux RH. In
the server I want to install several hosts (using virtual hosting).
I'm using org.apache.ajp.tomcat4.Ajp13Connector, I've 
downloaded several
mod_jk.so (tried different versions), ...
On every virtual host in httpd.conf there is a directive
JkMount /*.jsp ajp13
Seems than apache finds the connector, but tomcat cannot create the
servlet to serve the jsp page.
This is the output of the mod_jk log file (JkLogFile):

   



--
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: IE browser doesn't give error

2002-09-19 Thread David Cassidy

flippant answer but ...

Don't use IE :)

unless you have the source code of IE you're a little buggered

David


randie ursal wrote:

hi,

   sorry for asking about this but i still haven't found a solution on 
why this is happening.

   i try to make an abnormal scenario on my web application, here it is:

   I first access my web application and do some operation, then in the 
middle of my
   transaction i disconnect the network cable to see if an error would 
be displayed by IE
   browser if i click on a link that needs to request to my servlet. 
 This doesn't seem
   to work normally, because if i'm going to click on a button which is 
basically an HTML
   Formthe IE browser wont display its error page like  display that 
network is down or
   DNS unavailable.   But if i click on links that is using href to 
point to its server
resource that IE browser can give the error message.

   any idea about this, and any possible solution?
 
   p.s  really need it as soon as possible.

thanks a lot in advance
 randie



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

tsdok

--
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: Apache+Tomcat+JBoss Error (No Context configured)

2002-09-18 Thread David Cassidy

Manoj,

Whats in your application.xml file ?
(it defines what the context is ...)

When you deploy are there any error messages in the log file (JBoss one?)

David


Manoj Kithany wrote:

 Hi Mr. Phil,

 I am using Jboss+Tomcat Bundle.

 Thanks!

 Manoj G. Kithany



 From: Philippe de M. Sevestre [EMAIL PROTECTED]
 Reply-To: Tomcat Users List [EMAIL PROTECTED]
 To: Tomcat Users List [EMAIL PROTECTED]
 Subject: Re: Apache+Tomcat+JBoss Error (No Context configured)
 Date: Tue, 17 Sep 2002 14:22:09 -0300

 Are you running the JBoss+Tomcat bundle or running
 them in two distinct VMs ?

 The drop-in deployment feature of wars in JBoss is
 only available when running the whole thing in a single VM.


 - Original Message -
 From: Manoj Kithany [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: segunda-feira, 16 de setembro de 2002 20:16
 Subject: Apache+Tomcat+JBoss Error (No Context configured)


  Hi Experts,
 
  Greetings!
 
  Can you provide me with the Simple HellowWorld JSP/Servlet?
  I want to TEST is my servers are working fine. I am using Apache
  1.3.26, Tomcat 4.0.4, JBoss 3.0.3
 
  Also, can you list the Directory structure of placing Class 
 files, JSP
  files, Servlet files, WAR/EAR/JAR files?
 
  In httpd.conf I have following for Apache to know about Tomcat:
  
  LoadModule jk_module  libexec/mod_jk.so
  JkWorkersFile /usr/local/apache1326/conf/workers.properties
  JKMount /examples/servlet/* ajp13
  JKMount /examples/*.jsp ajp13
  JKMount /uno/* ajp13
  
 
  In workers.properties I have following:
  
  workers.tomcat_home=/jboss/catalina
  workers.java_home=/usr/java130
  ps=/
  worker.list=ajp12, ajp13, ajp14
  worker.ajp13.port=8009
  worker.ajp13.host=168.179.100.241
  worker.ajp13.type=ajp13
  
 
  I have a simple JSP file uno.jsp as follows:
  
  %@ page import=java.text.*,java.util.*%
 
  Greetings from Manoj
 
  
  I created the WAR/EAR file (uno.ear; uno.war) and put those in
  /jboss/server/default/deploy directory.
 
  I then start my JBoss (Tomcat)first and then Apache and then point 
 my URL
 to
  http://IPADDRESS:8080/uno/uno.jsp on which I get following Error:
  
  Apache Tomcat/4.0.3 - HTTP Status 500 - No Context configured to 
 process
  this request
  
 
  Do I have to follow the same procedure for Servlets?
 
  Do you know what this Error is about and how to tackle that.
 
  THANKS!
 
  Manoj G. Kithany



 _
 Join the worlds largest e-mail service with MSN Hotmail. 
 http://www.hotmail.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: Apache2 and Tomcat4 on different boxes

2002-09-18 Thread David Cassidy

Raj,

I hope something fell out of your workers file on it's way to me ...

You define the workers.list as using ajp12 and ajp13
But there is no definition for ajp12...

Also the host IP you give from the list below is the apache box.

Your httpd.conf file seems OK though.

David


Raj Mettai wrote:

 thanks Daniel for you response, I have tried the options you 
 suggested, tested telnet from apche to tomcat on port 8009, that 
 worked fine and also configured apache/tomcat on each box(and they are 
 working fine), then I have changed the host in workers.properties on 
 apache box to point to tomcat box, but that didn't work for me. Can 
 you please send me the config files(httpd.conf, workers.properties, 
 mod_jk.conf and server.xml) from both machines, may be I am missing 
 some simpe thingAlso I am attaching my config 
 files(httpd.conf,workers.properties from apache and server.xml from 
 tomcat box.
  
 apache server 10.103.2.30(neptune.broward.edu)
 tomcat server 10.103.2.4(morpheus.broward.edu)
 (both are running on solaris 8)
  
 thanks again
  
 -Raj

  [EMAIL PROTECTED] 09/15/02 07:53AM 
 I had all kinds of problems getting apache to speak to a remote tomcat,
 and most of them were on the apache side.
 The only problem I had on the app (tomcat) server was having the
 firewalls (yes there are 2 firewalls between the web and app server, a
 dedicated firewall box and the iptables/chains running on the actual app
 server) blocking port 8009.
 You should also make sure that port 8009 is not blocked on the tomcat
 box. An easy way to test this is have tomcat running and from your web
 server just telnet into port 8009 of your tomcat box. You should
 connect, otherwise you need to sort out firewall rules first.

 The problems I had on the apache side were basically not having mod_jk
 work properly.
 I found out that the best way of approaching the apache/tomcat on
 different boxes task is to install and test apache/tomcat on each box
 individually. When they both work, then just change your apache-side
 workers.properties to point at the right host (by IP address worked for
 me).

 Also, try just JkMount'ing /examples outside the Virtual Server block.
 It's best to troubleshoot a pure mod_jk connectivity issue, excluding
 stuff like vhost context mismatches.

 I now have apache 2.0.40 speak with a remote tomcat 4.1.10 via mod_jk2,
 which I must say was easier to accomplish, simply because the 4.1.10
 connectors source compiles a lot better.

 Regards

 Daniel Farinha

 -Original Message-
 From: Raj Mettai [mailto:[EMAIL PROTECTED]] 
 mailto:[EMAIL PROTECTED]%5D
 Sent: 13 September 2002 20:56
 To: [EMAIL PROTECTED]
 Subject: RE: Apache2 and Tomcat4 on different boxes


 Hi,

 I had hostname on server.xml and IP in workers.properties, I have
 changed both to IP. But still, apache does not talk to tomcat. They work
 fine when they are on the same box, also, do I need to stutdown port
 8080 on tomcat, because tomcat is accessible thru his port.

 Here are my latest config files..

 workers.properties
 
 --
 worker.ajp13.port=8009
 worker.ajp13.host=neptune.broward.edu
 worker.ajp13.type=ajp13
 
 --
 httpd.conf
 
 -
 IfModule !mod_jk.c
   LoadModule jk_module /usr/local/apache/modules/mod_jk.so
 /IfModule

 JkWorkersFile /usr/local/apache/conf/workers.properties
 JkLogFile /usr/local/apache/logs/mod_jk.log

 JkLogLevel debug

 VirtualHost morpheus.broward.edu
 ServerName morpheus.broward.edu

 JkMount /examples ajp13
 JkMount /examples/* ajp13

 JkMount /manager ajp13
 JkMount /manager/* ajp13

 JkMount /FCCSC ajp13
 JkMount /FCCSC/* ajp13

 JkMount / ajp13
 JkMount /* ajp13
 /VirtualHost
 
 -

 server.xml(host param)
 
 -
   Host name=neptune.broward.edu debug=0 appBase=webapps
 unpackWARs=true

 Listener className=org.apache.ajp.tomcat4.config.ApacheConfig
 append=
 true /
 
 -

 Thanks a lot

 -Raj

  [EMAIL PROTECTED] 09/13/02 03:18PM 

 You have to have the hostnames the same, all the way through. Don't mix
 IP addresses and hostnames.

 Does worker.ajp13.host equal the Host element's name parameter in
 server.xml on the Tomcat box?

 Also, does this app work with Tomcat on the same box? 

 John


  -Original Message-
  From: Raj Mettai [mailto:[EMAIL PROTECTED]] 
 mailto:[EMAIL PROTECTED]%5D
  Sent: Friday, September 13, 2002 3:12 PM
  To: [EMAIL PROTECTED]
  Subject: Apache2 and Tomcat4 on different boxes
 
 
  Hi all,
 
  Here is my apache and tomcat 

Re: integrating apache-tomcat-jboss

2002-09-18 Thread David Cassidy

Nanijon,

Make sure that you have uncommented the ajp12 / ajp13 connector in your 
server.xml file.
it's inside the catalina directory inside conf.

This might help !

David


Nani Jon wrote:

Hi all:

I have the latest jboss-3.0.0_tomcat-4.0.3 bundle installed on a windows 2000 box. 
Everything is working fine. Now I want to throw apache into the mix to serve static 
content. I am having a heck of time integrating these guys. The info I found was 
basically for the integration of the stand alone version of tomcat and apache. I have 
not been able to find much of anything on jboss-tomcat with apache. The steps for the 
stand alone tomcat and apache don't seem to be working for the bundled catalina 
version with jboss. If any one can help or point me to the proper instructions, I 
would appreciate it.

Thanks,

Nanijon



-
Do You Yahoo!?
Yahoo! Finance - Get real-time stock quotes
  





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




Re: Communicating with Tomcat3 through shell scripts.

2002-09-10 Thread David Cassidy

why not use something like wget or curl or perl's network stuff to 
access your jsp.

D

Srinadh Karumuri wrote:

 Help! Help! Help!

 Can I use 'handle' parameter in server.xml to do this task as below:

 Connector className=com.mycom.TCCommunicator
 Parameter name=handler value=com.mycom.TCCommunicatorHandle/
 Parameter name=port value=9090/ /Connector

 OR
 Is there any other way.

 I appreciate any help.
 Thank you,
 Sri
 At 05:11 PM 9/6/2002, Srinadh Karumuri wrote:

 Hi,

 I used Tomcat 3 for a while but didn't work on customizing it.

 We need to disable the user input sometimes and typically we store a 
 flag in the session. To modify this flag we use a jsp page.
 If I can communicate with tomcat from shell scripts while it is 
 running, I will be able to able to set it up in crontab etc.


 Thanks for any help from you all,

 -Sri


 -- 
 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: a 'one-click' j_securty_check question

2002-09-05 Thread David Cassidy

i think that unless Im completly missing your point your missing the 
Realm's point. (Or I am)

When you log in using the realm it takes from the database all your 
associated roles. ie
if you have admin, editor and journo roles but you only need 'editor' 
role for the area you want
to go into TC gets all the roles and associates it with your principle.


Have a look at RealmBase

http://jakarta.apache.org/tomcat/tomcat-4.1-doc/catalina/docs/api/index.html

You can then get the principle for that user then check if that user is 
in a
given role. You can then build your page based on those roles. ( which is
what I think you are trying to do )

Hope this helps

D


jfc wrote:

 Hi,

 I would like to structure my application so that the user can choose 
 to login instead of being enexpectedly prompted to be logged in.

 It seems declarative form-based security comes with the philosophy 
 that your URL has to explicilty request a resource which is secured 
 under the role you wish to log in under in order for the container to 
 know you belong to that particular role(i.e. request.getRemoteUser()). 
 So you have to know before hand who you'd like to be logged in as.

 I could force the user to choose from a list of valid roles before he 
 gets propmted by the j_security_check login form but I'm trying not to 
 have force the user to identify himself to the container twice in 
 order to be thoroughly recognized by the container.

 My question:

 Is the following possible under the latest spec and tomcat's 
 implementation (using j2ee, declarative form-based authentication
 ):

 1.user issues a request to manually log in with the custom html 
 login form containing the users username and password;
 2.server extracts role-leaf from this user's registration 
 information from a persistent store i.e. the application holds roles 
 in a hierarchy;
 3.server does a redirect to a welcome page secured in web.xml 
 under that role-leaf role value;
 4.the configured login page has the j_security_check form 
 prepopulated with username and password;
 5.the configured login page also has an 'onload' javascript 
 directive which automatically submits j_security_check on loading of 
 the body.

 I haven't tried this yet but does anyone have any experience of 
 something like this working?

 If so it would mean that an application would not have to show links 
 whose appropriateness would only become apparent once that link had 
 been followed(clicked) and the user had possibly failed at his 
 attempted login.

 Sorry if this is not clear enough.

 jfc

 (the container needs to first know what role you want to log in under 
 in order for it to successfully authenticate you under that role. It 
 can't determine for itself which role you registered under and attempt 
 to authenticate you under that role instead)


 -- 
 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 Clustering.

2002-09-03 Thread David Cassidy

really your cookie shouldn't change. ie you should stay
stuck to a given worker.

But it's sounding at least as though we going in the right direction :)

D


Luminous Heart wrote:

Ok. I made the modifications you suggested. As you saw
in my workers file I have 3 tcs; tc13, extra13, and
intra13.
I turned cookies on with IE. When I go to
http://mySite.com I see a cookie being set by let us
say tc13. Then I click on the link to my application
on the front page and sometimes I get another cookie
sent by tc13, other times by another worker. And of
course I am using tc13 as an example, but I saw this
behavior with the three.

Does that mean I am in good shape now? Clustering is a
great thing. I am thinking to move next to Oriely's
memory space clustering model. Has anyone tried it?

Thank, David, for your help.

--- David Cassidy [EMAIL PROTECTED] wrote:
  

helps only good if it works ...

let us know if it does !

you might want to see what jsessionid gets set to.
if the loadbalancer is working correctly it'll
append the servers name 
to the
jsessionid cookie.

If you've got mozilla you can examine the cookies
easily

D


Luminous Heart wrote:



I will try your suggestion and hope it works for
  

me.


Thanks a million for your help.

--- David Cassidy [EMAIL PROTECTED] wrote:
 

  

I think i can see what it is :)

Your workers.list defines for mod_jk what servers


to


use.

In the case below it will use tc13 until it


doesn't


work / too overworked.

Change the line so it's

worker.list=loadbalancer

Now your balanced_workers will work as the
loadbalancer is in control.

worker.loadbalancer.balanced_workers=tc13,


intra13,


extra13

Hope this works

David


Luminous Heart wrote:

   



Here is my workers file. Please notice that I
 

  

mounting
   



tomcat context as such in my mod_jk.conf file:
 JkMount /* loadbalancer
 JkMount /servlet/* loadbalancer

loadbalancer is defined in the following workers
 

  

file.
   



Thank you in advance.

=== workers.properties =
workers.tomcat_home=/usr/local/tomcat
workers.java_home=/usr/local/j2sdk1.4.0
ps=/

worker.list=tc13,intra13, extra13, loadbalancer

worker.tc13.port=8039
worker.tc13.host=localhost
worker.tc13.type=ajp13
worker.tc13.lbfactor=1

worker.intra13.port=8049
worker.intra13.host=localhost
worker.intra13.type=ajp13
worker.intra13.lbfactor=1

worker.extra13.port=8059
worker.extra13.host=localhost
worker.extra13.type=ajp13
worker.extra13.lbfactor=1

worker.tc41Intra.port=9009
worker.tc41Intra.host=localhost
worker.tc41Intra.type=ajp13
worker.tc41Intra.lbfactor=1


worker.loadbalancer.type=lb
worker.loadbalancer.balanced_workers=tc13,
  

intra13,


extra13

worker.inprocess.type=jni
 

  

worker.inprocess.class_path=$(workers.tomcat_home)$(ps)lib$(ps)tomcat.jar
  

   



worker.inprocess.cmd_line=start
 

  

worker.inprocess.jvm_lib=$(workers.java_home)$(ps)jre$(ps)bin$(ps)classic$(ps)libjvm.so
  

worker.inprocess.stdout=$(workers.tomcat_home)$(ps)logs$(ps)inprocess.stdout
  

worker.inprocess.stderr=$(workers.tomcat_home)$(ps)logs$(ps)inprocess.stderr
  

   



== End workers.properties ==
--- David Cassidy [EMAIL PROTECTED] wrote:


 

  

Would you like to post your workers file

D


Luminous Heart wrote:

  

   



Greetings,

I have a cluster of 3 tomcats running on linux
 

  

box.
   





 

  

I
  

   



have the three tc4.0.4 instances in a
 

  

loadbalancing
   



mode. The problem is when one fails none of the


 

  

others
  

   



pick up and my app wont serve any requests
  

untill


 

  

I
   



shut the faulty tc. Only at that point one of
  

the


other two will work. And if I restart the
  

faulty




 

  

one
  

   



it will start working again.

Should there be a failover behavior or
 

  

loadbalance
   




  

=== message truncated ===


__
Do You Yahoo!?
Yahoo! Finance - Get real-time stock quotes
http://finance.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: JDBC Realm - changing password

2002-09-03 Thread David Cassidy

to quote ...

http://jakarta.apache.org/tomcat/tomcat-4.1-doc/realm-howto.html

* Once a user has been authenticated, the user (and his or her
  associated roles) are cached within Tomcat for the duration of the
  user's login. (For FORM-based authentication, that means until the
  session times out or is invalidated; for BASIC authentication,
  that means until the user closes their browser). Any changes to
  the database information for an already authenticated user will
  *not* be reflected until the next time that user logs on again.

has this user 'logged out' / had their session invalidated ?

Very interrested as I want to use this myself and if things like pw 
change don't work then 

Let us know

D



Alex Kachanov wrote:

OK, a user wants to change his password for the Tomcat protected folder.
The protection is done using JDBCRealm (or MemoryRealm).
The password is changed using a special servlet.

OK, password is changed in the database, BUT, 
you have to restrat Tomcat or restart the context to make new password working!

That's sad, unless I'm missing something.

with best wishes
Alexander Kachanov


--
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: HA: JDBC Realm - changing password

2002-09-03 Thread David Cassidy

do you have anyway to trace what actions are being performed on the 
database ?

I know that MySQL will let you trace **every** call that is made so you 
can see all of
the database statements. This would be rather useful in trying to find 
out when tomcat
gets the data from the database ...

I take it that there are no proxies involved and you have your cache 
settings in your
browser set to no caching ?

Can you try this with the newer version of TC and let us know if that 
fixes it ?

D


Alex Kachanov wrote:

It looks as it is not working.
 
I log into protected area as /m
Then logout.
Close all browser windows
Change the password to qq
Launch new browser 
Open the protected area
Still /m is valid combination but /qq is not.
 
Restart Tomcat
Launch new browser 
Open the protected area
/qq is now a valid login combination
 
Using Tomcat 4.0.4 English
Tried both MemoryRealm and JDBCRealm
 
 
-Исходное сообщение- 
От: David Cassidy [mailto:[EMAIL PROTECTED]] 
Отправлено: Вт 03.09.2002 18:08 
Кому: Tomcat Users List 
Копия: 
Тема: Re: JDBC Realm - changing password



   to quote ...
   
   http://jakarta.apache.org/tomcat/tomcat-4.1-doc/realm-howto.html
   
   * Once a user has been authenticated, the user (and his or her
 associated roles) are cached within Tomcat for the duration of the
 user's login. (For FORM-based authentication, that means until the
 session times out or is invalidated; for BASIC authentication,
 that means until the user closes their browser). Any changes to
 the database information for an already authenticated user will
 *not* be reflected until the next time that user logs on again.
   
   has this user 'logged out' / had their session invalidated ?
   
   Very interrested as I want to use this myself and if things like pw
   change don't work then 
   
   Let us know
   
   D
   
   
   
   Alex Kachanov wrote:
   
   OK, a user wants to change his password for the Tomcat protected folder.
   The protection is done using JDBCRealm (or MemoryRealm).
   The password is changed using a special servlet.
   
   OK, password is changed in the database, BUT,
   you have to restrat Tomcat or restart the context to make new password 
working!
   
   That's sad, unless I'm missing something.
   
   with best wishes
   Alexander Kachanov
   
   
   --
   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: Tomcat Clustering.

2002-09-02 Thread David Cassidy

Would you like to post your workers file

D


Luminous Heart wrote:

Greetings,

I have a cluster of 3 tomcats running on linux box. I
have the three tc4.0.4 instances in a loadbalancing
mode. The problem is when one fails none of the others
pick up and my app wont serve any requests untill I
shut the faulty tc. Only at that point one of the
other two will work. And if I restart the faulty one
it will start working again.

Should there be a failover behavior or loadbalance on
tc does not support that?

Thank you.

__
Do You Yahoo!?
Yahoo! Finance - Get real-time stock quotes
http://finance.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 Clustering.

2002-09-02 Thread David Cassidy

I think i can see what it is :)

Your workers.list defines for mod_jk what servers to use.

In the case below it will use tc13 until it doesn't work / too overworked.

Change the line so it's

worker.list=loadbalancer

Now your balanced_workers will work as the loadbalancer is in control.

worker.loadbalancer.balanced_workers=tc13, intra13, extra13

Hope this works

David


Luminous Heart wrote:

Here is my workers file. Please notice that I mounting
tomcat context as such in my mod_jk.conf file:
   JkMount /* loadbalancer
   JkMount /servlet/* loadbalancer

loadbalancer is defined in the following workers file.

Thank you in advance.

=== workers.properties =
workers.tomcat_home=/usr/local/tomcat
workers.java_home=/usr/local/j2sdk1.4.0
ps=/
 
worker.list=tc13,intra13, extra13, loadbalancer
 
worker.tc13.port=8039
worker.tc13.host=localhost
worker.tc13.type=ajp13
worker.tc13.lbfactor=1
 
worker.intra13.port=8049
worker.intra13.host=localhost
worker.intra13.type=ajp13
worker.intra13.lbfactor=1
 
worker.extra13.port=8059
worker.extra13.host=localhost
worker.extra13.type=ajp13
worker.extra13.lbfactor=1
 
worker.tc41Intra.port=9009
worker.tc41Intra.host=localhost
worker.tc41Intra.type=ajp13
worker.tc41Intra.lbfactor=1
 
 
worker.loadbalancer.type=lb
worker.loadbalancer.balanced_workers=tc13, intra13,
extra13
 
worker.inprocess.type=jni
worker.inprocess.class_path=$(workers.tomcat_home)$(ps)lib$(ps)tomcat.jar
worker.inprocess.cmd_line=start
worker.inprocess.jvm_lib=$(workers.java_home)$(ps)jre$(ps)bin$(ps)classic$(ps)libjvm.so
worker.inprocess.stdout=$(workers.tomcat_home)$(ps)logs$(ps)inprocess.stdout
worker.inprocess.stderr=$(workers.tomcat_home)$(ps)logs$(ps)inprocess.stderr

== End workers.properties ==
--- David Cassidy [EMAIL PROTECTED] wrote:
  

Would you like to post your workers file

D


Luminous Heart wrote:



Greetings,

I have a cluster of 3 tomcats running on linux box.
  

I


have the three tc4.0.4 instances in a loadbalancing
mode. The problem is when one fails none of the
  

others


pick up and my app wont serve any requests untill I
shut the faulty tc. Only at that point one of the
other two will work. And if I restart the faulty
  

one


it will start working again.

Should there be a failover behavior or loadbalance
  

on


tc does not support that?

Thank you.

__
Do You Yahoo!?
Yahoo! Finance - Get real-time stock quotes
http://finance.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]





__
Do You Yahoo!?
Yahoo! Finance - Get real-time stock quotes
http://finance.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: Server memory usage

2002-09-02 Thread David Cassidy

if you use the ps command with the 'f' switch you will see how the 
processes
are related to each other

D


Tim Funk wrote:

 In linux - threaded processes show up multiple times in top (or ps). 
 Once entry for each thread. Summing the entries in top will yield an 
 incorrect memory usage. Just take one of the entries to get the amount 
 of memory used by java. (Unless you have multiple real java processes 
 running, in which case, use the parent process id to figure things out)

 Mihai Gheorghiu wrote:

 TC4.0.4, jdk1.4.0_01, RH7.3 on P3-633MHz, 256MB RAM
 When I start TC, I find 28 Java processes for a total of 829MB used.
 Is there a way to make it use less memory, so that it runs only out 
 of RAM?
 Thank you all.


  



 -- 
 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 Clustering.

2002-09-02 Thread David Cassidy

helps only good if it works ...

let us know if it does !

you might want to see what jsessionid gets set to.
if the loadbalancer is working correctly it'll append the servers name 
to the
jsessionid cookie.

If you've got mozilla you can examine the cookies easily

D


Luminous Heart wrote:

I will try your suggestion and hope it works for me.
Thanks a million for your help.

--- David Cassidy [EMAIL PROTECTED] wrote:
  

I think i can see what it is :)

Your workers.list defines for mod_jk what servers to
use.

In the case below it will use tc13 until it doesn't
work / too overworked.

Change the line so it's

worker.list=loadbalancer

Now your balanced_workers will work as the
loadbalancer is in control.

worker.loadbalancer.balanced_workers=tc13, intra13,
extra13

Hope this works

David


Luminous Heart wrote:



Here is my workers file. Please notice that I
  

mounting


tomcat context as such in my mod_jk.conf file:
  JkMount /* loadbalancer
  JkMount /servlet/* loadbalancer

loadbalancer is defined in the following workers
  

file.


Thank you in advance.

=== workers.properties =
workers.tomcat_home=/usr/local/tomcat
workers.java_home=/usr/local/j2sdk1.4.0
ps=/

worker.list=tc13,intra13, extra13, loadbalancer

worker.tc13.port=8039
worker.tc13.host=localhost
worker.tc13.type=ajp13
worker.tc13.lbfactor=1

worker.intra13.port=8049
worker.intra13.host=localhost
worker.intra13.type=ajp13
worker.intra13.lbfactor=1

worker.extra13.port=8059
worker.extra13.host=localhost
worker.extra13.type=ajp13
worker.extra13.lbfactor=1

worker.tc41Intra.port=9009
worker.tc41Intra.host=localhost
worker.tc41Intra.type=ajp13
worker.tc41Intra.lbfactor=1


worker.loadbalancer.type=lb
worker.loadbalancer.balanced_workers=tc13, intra13,
extra13

worker.inprocess.type=jni
  

worker.inprocess.class_path=$(workers.tomcat_home)$(ps)lib$(ps)tomcat.jar


worker.inprocess.cmd_line=start
  

worker.inprocess.jvm_lib=$(workers.java_home)$(ps)jre$(ps)bin$(ps)classic$(ps)libjvm.so

worker.inprocess.stdout=$(workers.tomcat_home)$(ps)logs$(ps)inprocess.stdout

worker.inprocess.stderr=$(workers.tomcat_home)$(ps)logs$(ps)inprocess.stderr


== End workers.properties ==
--- David Cassidy [EMAIL PROTECTED] wrote:
 

  

Would you like to post your workers file

D


Luminous Heart wrote:

   



Greetings,

I have a cluster of 3 tomcats running on linux
  

box.


 

  

I
   



have the three tc4.0.4 instances in a
  

loadbalancing


mode. The problem is when one fails none of the
 

  

others
   



pick up and my app wont serve any requests untill
  

I


shut the faulty tc. Only at that point one of the
other two will work. And if I restart the faulty
 

  

one
   



it will start working again.

Should there be a failover behavior or
  

loadbalance


 

  

on
   



tc does not support that?

Thank you.

  

__


Do You Yahoo!?
Yahoo! Finance - Get real-time stock quotes
http://finance.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]

   



__
Do You Yahoo!?
Yahoo! Finance - Get real-time stock quotes
http://finance.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]





__
Do You Yahoo!?
Yahoo! Finance - Get real-time stock quotes
http://finance.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: Run Tomcat as tomcat user

2002-08-16 Thread David Cassidy

Urtzi

Exactly what error message are you getting in the tomcat logs ?

David


Urtzi Larrazabal wrote:


My situation is:
   -Tomcat running as tomcat user.
   -JDBC connection thought a mysql user with a especific privileges in a 
database.

then why ?

If I run tomcat as root the connection to mysql can be done.

If I run tomact as tomcat user the connection to mysql can't be done.



-Original Message-
From: Capr1ce [mailto:[EMAIL PROTECTED]]
Sent: viernes 16 de agosto de 2002 13:17
To: Tomcat Users List
Subject: RE: Run Tomcat as tomcat user



Nearly...

The mysql user can be called anything you want.
I usually have a user set up in MySql specifically for Java called 
'javaUser'. I give them select, insert, delete and update privileges.

The UNIX mysql user is very separate than the mysql users. You shouldn't 
need to do anything with the UNIX mysql user. I believe this is used by 
mysql so it can the correct privileges to read and write the databases.
Users for mysql are so you can set up who is allowd to connect to the mysql 
and what they can do when they connect. ie. can they create databases, 
update databases, which databases they can update etc.


At 01:02 PM 16/08/2002 +0200, you wrote:

  

Let me Understand,

To run tomcat as tomcat user and be able to connect to mysql thought JDBC 
I need:


On my unix machine have a user named tomcat which runs tomcat.
On mysql have other user named tomcat.
And the connection thought JDBC must be done with the user and password 
created in mysql.

-Original Message-
From: Capr1ce [mailto:[EMAIL PROTECTED]]
Sent: viernes 16 de agosto de 2002 12:57
To: Tomcat Users List
Subject: RE: Run Tomcat as tomcat user



No they don't need to have the same password.
When your JSP/Java code connects to the MySql database using JDBC, you
should use the mysql user to connect.


At 12:48 PM 16/08/2002 +0200, you wrote:


¿the unix tomcat user and the mysql tomcat user must have the same password?

-Original Message-
From: Capr1ce [mailto:[EMAIL PROTECTED]]
Sent: viernes 16 de agosto de 2002 12:40
To: Tomcat Users List
Subject: RE: Run Tomcat as tomcat user



A password is not necessary, but certainly recommended.

See these sections of the mysql documentation:
http://www.mysql.com/doc/en/GRANT.html
http://www.mysql.com/doc/en/Adding_users.html


At 12:31 PM 16/08/2002 +0200, you wrote:
  

Hi Andy !

Thanks for your response.

I have created a user named tomcat in mysql and I have granted acccess
but...I haven't created any password for this user, is necesary a 


password??


Urtzi

-Original Message-
From: Andy Eastham [mailto:[EMAIL PROTECTED]]
Sent: viernes 16 de agosto de 2002 12:25
To: Tomcat Users List
Subject: RE: Run Tomcat as tomcat user


Urtzi,

You need to grant access to the tomcat user.  See the section in the GRANT
command in the mysql manual (available online at the www.mysql.com site).
By default, root can connect without a password, but other users need 


to be


granted access.

You'll need to execute something like:
GRANT ALL PRIVILEGES on *.* to nobody@yourhostname identified by
'nobodyspassword';

The password is not the unix password - its mysql specific and set by this
command.

I recommend you read up to make sure you're only grant what you need - 


after


all there's no point running as nobody if it can do everything root can...

Test it by doing
su - nobody
then check that you can connect with the password you've set.

Andy



-Original Message-
From: Urtzi Larrazabal [mailto:[EMAIL PROTECTED]]
Sent: 16 August 2002 11:04
To: [EMAIL PROTECTED]
Subject: Run Tomcat as tomcat user



Hi !

I am trying to run tomcat as tomcat user. When I start it, it
seems to start without any problem. I execute some jsp and it
works fine but when I execute a page tha require to connect to
mysql database it cant't connect to the database and an empty log
named something like DCB_1029483253596.log is generated. Running
tomcat as root I haven't any problem.

¿any idea?

Regards,

Urtzi.


--
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]

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

Re: Start tomcat as tomcat user

2002-08-13 Thread David Cassidy

Can you tell us what the problems are ?

You might find that some of the files belong to root and so
cannot be written to by your tomcat user. You might want to
change the ownership over to your tomcat user.

David

Urtzi Larrazabal wrote:

Hi friends !

I have installed Tomcat 3.3.1 on a solaris 8 with apache 1.3.23 and mysql. If I start 
Tomcat as root there isn't any problem but when I try to run it as tomcat user there 
are several problems. 
Could anybody tell me  the requierements that this user must have to start tomcat? 
Tomcat is running on 8080.

Regards,

Urtzi.

--
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: Start tomcat as tomcat user

2002-08-13 Thread David Cassidy

Can you as the tomcat user using the CLI tools access the MySQL
database ?

What error message do you get when the website tries to use the DB ?

Are you using the same user in both cases ?(ie root user and tomcat user )

David



Urtzi Larrazabal wrote:

I have changed some permissions:
   
   chown -R tomcat $TOMCAT_HOME/conf
   chown -R tomcat $TOMCAT_HOME/logs
   chown -R tomcat $TOMCAT_HOME/work

I can start tomcat without any problem but for example the aplicatins cant't 
access to mysql database.Any idea?


-Original Message-
From: David Cassidy [mailto:[EMAIL PROTECTED]]
Sent: martes 13 de agosto de 2002 11:18
To: Tomcat Users List
Subject: Re: Start tomcat as tomcat user


Can you tell us what the problems are ?

You might find that some of the files belong to root and so
cannot be written to by your tomcat user. You might want to
change the ownership over to your tomcat user.

David

Urtzi Larrazabal wrote:

  

Hi friends !

I have installed Tomcat 3.3.1 on a solaris 8 with apache 1.3.23 and mysql. If I 
start Tomcat as root there isn't any problem but when I try to run it as tomcat user 
there are several problems. 
Could anybody tell me  the requierements that this user must have to start tomcat? 
Tomcat is running on 8080.

Regards,

Urtzi.

--
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: Feasibility question

2002-07-08 Thread David Cassidy

Iain

Put bluntly if these use a different WEB-INF directory then the long and 
short of it
is no.

sorry

D


Iain Downie wrote:

Hi List,

relatively new to Tomcat, so excuse the possible repetition / naivety of
this posting. We currently have an expanding web application running. We are
thinking of dividing it up into more user-friendly chunks (different
applications), allowing us to control each application more easily (stop one
without affecting others etc.). My question is, is it possible to pass
session info between many different applications?

For example, these are our surveys, which we want as different apps.
1. Login and generic registration
2. Spring birdwatch
3. Garden birdwatch
4. Other survey and so on.
They will all be attached to one Oracle installation.

Currently, 1 and 2 are combined, so no problem with session info. But is it
possible to transfer the user details between these apps, so that someone
who is in Spring, can move over to Garden without having to login again?

I'm not looking for the solution (for now), just to know if it is possible
or not.

Thanks, hope someone can suggest some pointers
Iain


--
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: Reading Address Book

2002-06-13 Thread David Cassidy

Lets see if I understand ...

You have registered users of your application.

When your user (lets call him fred) comes to your site and
wants to send a message to his friend (bill) he clicks on EMAIL THIS

You want a form that has fred's address book, so that fred only need 
click on
'bill' to send the message to bill 

If I understand this correctly ?

Question ( if I have the above correct...)
Does your application have fred's address book ?

Lets assume that it does...

Assuming that the address book is in the database you could then display 
the address book as

FORM ACTION=..

SELECT NAME=addressBookEntries
OPTION VALUE=[EMAIL PROTECTED]Bill/OPTION
OPTION VALUE=[EMAIL PROTECTED]Mary/OPTION
etc 
/SELECT

INPUT TYPE=TEXT NAME=emailAddress VALUE=

/FORM

You could ouput the address book into the html page with just a simple 
print from the address book
object

Does this help ?

D

RNivas wrote:

Oh No not at all.
Let me tell you my exact problem.

My Web based Application running on Tomcat+WinNT4.0.  Application is having
facility to email document to the other users(This is same like 'Email This'
on some other portal also).
Right now sender (Register User) of document type full address of receiver.
What I want is If application can read the address book of registered
sender, he can only select the email from that list in browser popup...so
not much typing, only few clicks for selecting receivers.

Did you got what I my problem is exacly.

RNivas




- Original Message -
From: Ilya Khandamirov [EMAIL PROTECTED]
To: 'Tomcat Users List' [EMAIL PROTECTED]
Sent: Thursday, June 13, 2002 1:41 PM
Subject: RE: Reading Address Book


  

Are you asking on how to write your own nimda virus or something in that
art? Funny question, but this isn't the right mailing list for that, i
think.

Regards,
Ilya


-Original Message-
From: RNivas [mailto:[EMAIL PROTECTED]]
Sent: Montag, 24. Juni 2002 08:25
To: Tomcat Users List
Subject: Re: Reading Address Book


Ravi,

I want something so that user no need to export in any formay. In some
cases user may be slow...i might not be aware of exporting idea. I want
to run some code (JavaScript) to read the address book.

RNivas


- Original Message -
From: Ravishankar S [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Thursday, June 13, 2002 11:50 AM
Subject: Re: Reading Address Book




one way is  to export the address book to CSV file format..u can
then parse this CSV file using either the regexp package or the custom
  

jdk1.4 classeseven better if u know  a perl guru tell him to write
  

a  script
  

to


get the job done..after all
TMTOWTDI:-))

try this sample class... from JGURU...


How can I correctly parse CSV ( comma separated values ) files?
StringTokenizer doesn't seem to fit many conditions.
Location: http://www.jguru.com/faq/view.jsp?EID=809266
Created: Mar 23, 2002
Author: Joe Sam Shirah
(http://www.jguru.com/guru/viewbio.jsp?EID=42100)
Question originally posed by steven mccartey
(http://www.jguru.com/guru/viewbio.jsp?EID=792888

Ian Darwin has two classes ( CSV.java and CSVRE.java ) to handle CSV
files in his Java Cookbook, including a way with regular expressions.
You can download the code from his site, probably best to do so from
the examples
  

by


chapter ( see Chapter 3, Strings and Things ) page. Not a bad idea
to
  

buy


the book, either.
Comments and alternative answers

 use this class
Author: Amardeep Singh
(http://www.jguru.com/guru/viewbio.jsp?EID=811616),
Mar 25, 2002

import java.util.*;

public class WStringTokenizer extends StringTokenizer
{
 private String tbt;
 private String d;
 private int startpos=0;

 public WStringTokenizer(String str,String delim)
 {
  super(str,delim);
  tbt=new String(str);
  d=new String(delim);
 }
 public int countTokens()
 {
  int tokens=0;
  int temp=startpos;
 while(true)
 {
  try
  {
  nextToken();
  tokens++;
  }
  catch(NoSuchElementException e) {break;}
 }
 startpos=temp;
 return tokens;
 }

 public boolean hasMoreElements() {
 return hasMoreTokens();
 }

 public boolean hasMoreTokens() {
 if(countTokens()0) return true;
 else return false;
 }

 public Object nextElement() {
 return (Object) d;
 }

 public String nextToken() throws NoSuchElementException {  int
result=0;  String s;

 if(startpostbt.length()) throw(new NoSuchElementException ());
result=tbt.indexOf(d,startpos);
 if(result0) result=tbt.length();
 s=new String(tbt.substring(startpos,result));
 startpos=result+d.length();
 return s;
 }

 public String nextToken (String delim) throws NoSuchElementException
{  d=delim;  return nextToken();
 }
}



 Another CSVReader
Author: Roshan Shrestha
  

(http://www.jguru.com/guru/viewbio.jsp?EID=130068),


Mar 26, 2002
Ian Darwin's class parses the file one line at a time. Many times, a
field may span multiple lines. I think a better class is the CSVReader
  

described in 

Re: Security - Attack

2002-06-13 Thread David Cassidy

It's the usual muppet that has been infected...

Apart from cloging up your logs they do nothing on an apache server

:)

Of course if you are daft enough to run IIS ..


 :-

D


Stuart Stephen wrote:

I think they are code red attacks. These shouldn't be anything to worry
about on a Tomcat server if I am correct in my thinking. They only affect
IIS.

-Original Message-
From: Laura [mailto:[EMAIL PROTECTED]]
Sent: 13 June 2002 09:35
To: Tomcat Users List
Subject: Security - Attack


Hi all,

well I have, in my opinion, a very interesting question.

Last week we went in a production enviroment: we have apache + tomcat with
an important web application xxx (http.conf has JkMount /xxx worker).

Well, this morning I have discovered that somebody has tried to attack my
server: in the Apache error log I have found calls as
/scripts/..%5c%5c../winnt/system32/cmd.exe, /scripts/., and so on.

My question is: is Tomcat secure? How can I do Tomcat secure? Is all my
system secure? ( my machine is a solaris 8).


Thanks



Laura




--
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: Other question

2002-06-13 Thread David Cassidy

Laura,

there are at least 2 ways...

have a look in the ps list - there should be mention of a process 
running with a
name that includes Tomcat  (?!!!)

The other way - far better as it actually tests that the system is 
working ...

use wget or curl - use your fave and make an access to your site...

eg wget http://www.myserver.com/

this will then actually get something from the server...

You could make a page called say testTheServer.jsp which tests that the 
database
is running etc. Your script that runs wget / curl can then email /SMS 
etc you
if it doesn't get something it's expecting

for example if the words SYSTEM UP AND OK don't come out in the output
then you know your system is stuffed ...

Hope this helps

D




Laura wrote:

Hi all,

thanks for your reply (Security - Attack): you are telling me that I
shouldn't worry because Apache is secure. (I hope it)

I have one other question: If Tomcat shouts down for some cause, how can
I know it?
For example, Apache has a PID and so you can control if the apache
process, with that PID,  is alive.

But Tomcat doesn't write any PID: how can I know if Tomcat is alive or
not? Is there any script for that?

Thanks for your help


Laura

  

 

  




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




Re: Other question

2002-06-13 Thread David Cassidy

Hey Ravi,


Try doing ps auxwwwf

it'll give you alot more detail 

the ps -ax won't let you actually see what java is running

David


Ravishankar S wrote:

hi Laura,

when tomcat runs an instance of java is always running..try

ps -ax | grep 'java*'

it should give a bunch of java instances depending on the no of
threadshere's what my redhat 6.2 said

21619 pts/3S  0:14
/usr/java/jdk1.3.1/bin/i386/native_threads/java -clas
21664 pts/3S  0:08
/usr/java/jdk1.3.1/bin/i386/native_threads/java -clas
21665 pts/3S  0:21
/usr/java/jdk1.3.1/bin/i386/native_threads/java -clas
21666 pts/3S  0:00
/usr/java/jdk1.3.1/bin/i386/native_threads/java -clas
21667 pts/3S  0:00
/usr/java/jdk1.3.1/bin/i386/native_threads/java -clas
21668 pts/3S  0:34
/usr/java/jdk1.3.1/bin/i386/native_threads/java -clas
21669 pts/3S  0:00
/usr/java/jdk1.3.1/bin/i386/native_threads/java -clas
21670 pts/3S  0:00
/usr/java/jdk1.3.1/bin/i386/native_threads/java -clas
21671 pts/3S  0:00
/usr/java/jdk1.3.1/bin/i386/native_threads/java -clas
21672 pts/3S  0:00
/usr/java/jdk1.3.1/bin/i386/native_threads/java -clas
21673 pts/3S  0:01
/usr/java/jdk1.3.1/bin/i386/native_threads/java -clas
21674 pts/3S  0:00
/usr/java/jdk1.3.1/bin/i386/native_threads/java -clas
21675 pts/3S  0:00
/usr/java/jdk1.3.1/bin/i386/native_threads/java -clas
21676 pts/3S  0:00
/usr/java/jdk1.3.1/bin/i386/native_threads/java -clas
21677 pts/3S  0:00
/usr/java/jdk1.3.1/bin/i386/native_threads/java -clas
21678 pts/3S  0:00
/usr/java/jdk1.3.1/bin/i386/native_threads/java -clas
21679 pts/3S  0:00
/usr/java/jdk1.3.1/bin/i386/native_threads/java -clas
21680 pts/3S  0:00
/usr/java/jdk1.3.1/bin/i386/native_threads/java -clas
 9085 pts/8S  0:00 grep java

ravi

- Original Message -
From: Laura [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Thursday, June 13, 2002 2:56 PM
Subject: Other question


Hi all,

thanks for your reply (Security - Attack): you are telling me that I
shouldn't worry because Apache is secure. (I hope it)

I have one other question: If Tomcat shouts down for some cause, how can I
know it?
For example, Apache has a PID and so you can control if the apache process,
with that PID,  is alive.

But Tomcat doesn't write any PID: how can I know if Tomcat is alive or not?
Is there any script for that?

Thanks for your help


Laura







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

  




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




Re: How good is Tomcat to Attacks

2002-06-13 Thread David Cassidy

it's really one of those 'what type of attack' questions.

Tomcat / Apache / IIS / IPlanet / etc
are all open to attack ( some -IIS- more than others :-^)  )

You can for example generate a DOS attack that will take down any/all of 
them.

You can try various buffer overflow attacks to take down some
etc
etc...

Of course if **your** code has security issues then there's really 
nothing that
any of them can do 


D


[EMAIL PROTECTED] wrote:

Hi All

I was reading the security attack posting and I was very interested to know 
also;

1) How good is Tomcat to attacks? 
2) Is their a web site which rates web servers on how robust a server is to 
attacks?
3)Is it possible to attack tomcat if you have Apache as the web server on one 
machine and tomcat as the jsp/servlet handler on a separate machine with 
mod_jk?

I would be most interested to see how Tomcat weights upto some of its 
commercial counterparts. Is Tomcat any good or should we just use it to test 
our jsp/servlets and so on? thanxs. 

Regards
Amran

--
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 3.2 : Include File Paths

2002-06-05 Thread David Cassidy

Try 

%@ include file=/common/copyright.html %


This will then include the file from your docbase

eg tomcat will add in the /net/webapps/ bit for you ...

Try it ;-}

D



Steve wrote:

I checked for typos

thanks

--- Larry Isaacs [EMAIL PROTECTED] wrote:
  

I don't know why it wouldn't work other than due
to a simple typo.

Larry



-Original Message-
From: Steve [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, June 05, 2002 10:48 AM
To: Tomcat Users List
Subject: RE: Tomcat 3.2 : Include File Paths


My docbase is set to /net/webapps

Still gives me bad argument to include file

Steve
--- Larry Isaacs [EMAIL PROTECTED] wrote:
  

If your docBase is set to /net/webapps then what
you describe should work.  If your docBase is set to
/net/webapps/test, then the .. in your include
is trying to go outside of the webapp, which is not
allowed.

Cheers,
Larry



-Original Message-
From: Steve [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, June 05, 2002 7:12 AM
To: [EMAIL PROTECTED]
Subject: Tomcat 3.2 : Include File Paths


Hi;

I'm using Tomcat 3.2

I have a webapp defined on my system to be:
/net/webapps

Under the directory webapps I have several subdirectories 
for jsps and various
resources.

In one file, /net/webapps/test/test.jsp, I am trying to use 
this include directive
%@ include file=../common/copyright.html %
to include
/net/webapps/common/copyright.html

I keep getting error code 500 and the message bad file 
argument to include

Anyone have any idea of what is going on and how I can back 
up with file paths?

Thanks in advance

Steve



__
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com

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

  

--
To unsubscribe, e-mail:   


mailto:tomcat-user- [EMAIL PROTECTED]
  

For 


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

__
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com

--
To unsubscribe, e-mail:   
mailto:tomcat-user- [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]





__
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.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: Apcahe's CPU goes to 100%

2002-05-24 Thread David Cassidy

please post it !

I have seen this with ajp12 (not using ajp13)

D

Costas Stergiou wrote:

I have exactly the same experience on this. Actually, If this
problem is not solved you cannot use tomcat load-balancing features;
thus you cannot setup a real production stable environment!!

ajp12 does not have this problem though (I think because it does
not keep open sockets).
After some minor investigation on the problem, I think that the bug
has to do with an infinite loop that the ajp goes in waiting for some
data from tomcat whereas tomcat has nothing else to send.
I have traced the exact method that this error occurs (a simple while
loop) and I think it shouldn't be that hard for someone that knows
the code to figure out a solution or a work around...but noone has
responded... If someone is interested I can repost my mail where
I even give a stack trace of the runaway process.

Hope someone gives some time into this, it is a pitty having such
a good software such as tomcat and not being able to use it in
critical cases.
Costas



- Original Message -
From: Cammy Ng [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Thursday, May 23, 2002 10:22 AM
Subject: Re: Apcahe's CPU goes to 100%


  

I like Tomcat a lot personally, however, if I cannot get any solution of
this problem, I think I need to start testing other commercial software


like
  

Jrun, etc. Since they have there own connector, it may solve this problem.


.
  

I was spending 2 months and look over the internet everywhere,(all news
group, all site talking apache, tomcat, mod_jk) and come up with no
solution. If anyone has solution or answer on this problem Please help and
post it so that all people can share it..

Thanks

- Original Message -
From: Costas Stergiou [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Thursday, May 23, 2002 11:56 PM
Subject: Re: Apcahe's CPU goes to 100%




Many of use have posted this problem here but I see that nobody
can come up with an answer...

- Original Message -
From: Cammy Ng [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Thursday, May 23, 2002 9:39 AM
Subject: Re: Apcahe's CPU goes to 100%


  

Hi,

I have this problem too, but no one seems to answer this problem, I


believe
  

it is the mod_jk connector problem. Hope someone will find the


solution
  

for
  

this.

Thanks
Cammy
- Original Message -
From: Rajesh Mishra [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, May 22, 2002 9:36 PM
Subject: Apcahe's CPU goes to 100%




I'm using Apache1.3.12 and Tomcat3.2 for my application.After stress
  

testing


for 4 hours , CPU utilization of Apache.exe process goes to 100%. As
  

a
  

result when I try to access the website , I'm getting timeouts. But
  

I
  

could


still access the website with tomcat port.

Has anyone experienced this problem .I'm using mod_jk for this
  

purpose
  

Regards
Rajesh

--
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: Linux - high cpu usage/seg faults - SOLVED

2002-05-24 Thread David Cassidy

Was the reason you tried the IBM JDK because of performance ?

I'm rather interrested in knowing if there is any difference in speed...

Ta

D


Joakim Ryden wrote:

It was a rookie thing. :(

The two servers were of course not identical. :) The problem machine did not
have the libc compat libs installed. The funny thing is that IBM's jdk
didn't give any indications about this whatosever. When I installed the sun
jdk the catalina log immediately showed the error in loading the shared libs
and things were easy from there... Oh well, at least it's resolved. :)
thanks for your replies guys!

--Jo  

  

From: Phillip Morelock [EMAIL PROTECTED]
Reply-To: Tomcat Users List [EMAIL PROTECTED]
Date: Thu, 23 May 2002 22:05:47 -0700
To: Tomcat Users List [EMAIL PROTECTED]
Subject: Re: Linux - high cpu usage/seg faults

try the sun jdk and find if there's a difference, would be the first thing
on my list.  Should be an easy sniff test or whatever.

fillup


On 5/23/02 3:09 PM, Joakim Ryden [EMAIL PROTECTED] wrote:



Hey guys - 

I just installed tomcat 4.0.3 on two identical (software wise) spanking new
servers. One is working a treat and the other is completely hosed. :(

I'm using the IBMJava2-131 jdk on both machines - the one machine having
problems is an SMP machine. They are both running RedHat 7.2 - the only file
touched after the rpm installation is /etc/tomcat4/tomcat4.conf to set up
the correct paths. Starting up tomcat gives no errors in any logs but CPU
usage immediately runs high - stays in the mid-upper 20's. Attaching strace
to any of the running java processes shows a constant stream of:

--- SIGSEGV (Segmentation fault) ---

So I go to stop tomcat. Shut down script says OK but the processes don't go
away although the catalina logs say otherwise. I'm not sure what else to
look for? Can anyone point me in some sort of direction?

Many thanks!

--Jo


--
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: increase performance dual processor board

2002-05-23 Thread David Cassidy

only if it's got 2 processors

;-^)

ROTFL



Günter Kukies wrote:

Hi,

is it possible to increase performance of tomcat using linux and a dual
processor bord ? 

Günter Kukies

  




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




Re: ideas invited

2002-05-02 Thread David Cassidy

following in the standard 'and here's one I made earlier' line

here's one that works - really rather well !

Install it in /etc/rc.d/init.d

then ( if you have linux ) run
chkconfig --add tomcat

or if you use some other unix varient see what run level you are running at

( have a look in inittab )

and then cd to /etc/rc.d/rcx.d
ln -s /etc/rc.d/init.d/tomcat .

if you don't have the /etc/rc.d directory you can miss that bit out ...

this will run Tomcat as the user tomcat - so you might want to add that 
user or change it ...

Let us know

David Cassidy




David Kavanagh wrote:

 Well, it sounds like you are running on some flavor of unix. I've set up

 tomcat servers on solaris and linux. For Solaris you can put the startup

 script in /etc/rc2.d or /etc/rc3.d. If you run on Linux. I found you 
 need to put it in /etc/rc5.d. If you don't use linux, don't worry 
 about rc5.d.

 The commands I've put in the top of the tomcat.sh are to set environment

 variables. An alternative would be write your own script that sets the 
 variables, then calls tomcat.sh (forwarding the commandline 
 arguments). That way, tomcat.sh won't be altered. Come to think of it, 
 I'll probably

 start doing this myself...

 David

 # Lalit Nagpal # wrote:

 so sorry,
 i did not understand what u meant ... where did rc5.d come from
  David Kavanagh [EMAIL PROTECTED] wrote: What I've done is to insert

 some commands at the top of tomcat.sh, then

 link it from /etc/rc2.d/S99tomcat to /bin/tomcat.sh (if on solaris).
 on Linux, I put it in /etc/rc5.d

 David

 # Lalit Nagpal # wrote:

 hi,

 i want tomcat 4 to startup up auto whenever the
 machine is rebooted so i have put the entry
 /startup.sh. As suggested by some i have
 set the java path and tomcat home also in rc.local
 file before running the startup.sh file. still it does
 not seem to work. any bright ideas on this.

 thanx a lot




 # Lalit Nagpal #


 -
 Do You Yahoo!?
 Yahoo! Health - your guide to health and wellness




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

 # Lalit Nagpal #


 -
 Do You Yahoo!?
 Yahoo! Health - your guide to health and wellness







tomcat
Description: application/java-vm

--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]


Re: OutofMemoryError

2002-05-02 Thread David Cassidy

I found exactly the same thing ( memory usage climbing)
but when I removed the -Xincgc it's all OK
memory useage fine etc etc etc ...


D


Matthew Boeckman wrote:

 We have figured this out, although for the life of me I can't 
 understand   why. We had been running with java -server -Xms128m 
 -Xmx256m -Xincgc and saw the VM climb way up to 2GB, then drop the 
 tomcat process.

 By removing the -server flag, everything is fine. I realise this means 
 that the JVM is defaulting to 'client'... so I guess is anyone aware 
 of memory holes in the 1.3.1 JVM on linux? I've dug around deja c and 
 seen  a few references to this suspicion but nothing concrete.

 I'm going to start working on Tomcat 4 and jdk1.4.0 in my lab this 
 morning, hopefully the problem is fixed in 1.4.0!

 Thanks for all the responses!


 Jari Ikavalko wrote:

 Hi Matthew and co.,

 have you tried to examine tomcat -behaviour with a profiler? I tried 
 with
 OptimizeIt, and it seems to me that the Garbage Collector doesn't free
 memory that is reserved for sessions. I mean that session itself ends 
 ok,
 but the gc just won't free the memory.

 Does anyone else have noticed something similar?

 My system:
 Windows 2000
 JDK 1.4.0
 Tomcat 4.0

 -- Jari Ikävalko --


 On Wed, 1 May 2002, Matthew Boeckman wrote:


 Are you running java 1.3 or 1.4 ? We're really trying to nail this 
 down. We've had the Xms and Xmx options in place now for some time, 
 and the java proc just grows right past Xmx, up to nearly full 
 system memory, then tomcat dies.

 I'm ready to hear any suggestions, but I want to try to narrow the 
 scope somewhat.

 Laurent Féral-Pierssens wrote:

 Hi Matthew,

 I have been experiencing the same problems but with T3.2.x.

 You should try to use Tomcat options -Xms and -Xmx

 I added those 2 lines:

 TOMCAT_OPTS=-server -Xms256m -Xmx256m -Xincgc
 export TOMCAT_OPTS

 in my /etc/init.d/tomcat script
 This increase the default heap size of the JVM to 256Meg (from 64Meg)
 and make sure incremental Garbage collection is done. Since I changed
 those, I have no more OutOfMemory errors.

 Hope it helps,
 Laurent




 -Original Message-
 From: Matthew Boeckman [mailto:[EMAIL PROTECTED]] Sent: May 1, 
 2002 12:08 PM
 To: [EMAIL PROTECTED]
 Subject: OutofMemoryError


 Hello List.

 I'm running tomcat 3.1.1 on RH7.1, kernel 2.4.9-31 with JDK1.3.1, 
 mysql 3.23.43
 I am occasionally seeing tomcat go postal with the following errors:
 Exception in thread CompileThread0 java.lang.OutOfMemoryError: 
 requested 32760 bytes


 
 Another exception has been detected while we were handling last error.
 No information available. Please check ERROR REPORT FILE for further
 information, if there is any. Good bye.

 An unexpected exception has been detected in native code outside 
 the VM.
 Unexpected Signal : 11 occurred at PC=0x419852cb Function name=(N/A)
 Library=(N/A)

 NOTE: We are unable to locate the function name symbol for the error
   just occurred. Please refer to release documentation for 
 possible
   reason and solutions.


 Current Java thread:


 
 Another exception has been detected while we were handling last error.
 Dumping information about last error: ERROR REPORT FILE = (N/A)
 PC= 0x0x419852cb
 SIGNAL= 11
 FUNCTION NAME = (N/A)
 LIBRARY NAME  = (N/A)
 Please check ERROR REPORT FILE for further information, if there is 
 any.
 Good bye.

 Any thoughts on what might be the cause? There is nothing in the 
 log files to tell me more than this, which gets dumped to the console.

 -Thanks!



 -- 
 Matthew Boeckman(816) 777-2160
 Manager - Systems IntegrationSaepio Technologies
 == ==
 ...Many say that DOS is the dark side, but actually UNIX is more 
 like the dark side: It's less likely to find the one way to destroy 
 your incredibly powerful machine, and more likely to make upper 
 management choke.
 -Lore Sjoberg


 -- 
 To unsubscribe:   mailto:[EMAIL PROTECTED]
 For additional commands: mailto:[EMAIL PROTECTED]
 Troubles with the list: mailto:[EMAIL PROTECTED]



 -- 
 To unsubscribe:   mailto:[EMAIL PROTECTED]
 For additional commands: mailto:[EMAIL PROTECTED]
 Troubles with the list: mailto:[EMAIL PROTECTED]







--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Re: JSP's GzippedOutputStream

2002-05-02 Thread David Cassidy

You can always use mod_gzip on apache to send compressed
 data... I take it you're trying to reduce your bandwidth usage ?

PS mod_gzip does very well

:)

Larry Meadors wrote:

I do not think so. The JSPWriter is not able to send a byte array
(something I found while trying to output a pdf 2 weeks ago...the hard
way). 
 
It converts byte values to char values which are double bytes in java.
 
Your byte array may look like this {01 02 03}, but the JSPWriter sends
out something like this {01 00 02 00 03 00} instead.
 
Larry

  

[EMAIL PROTECTED] 05/02/02 07:38AM 


Hi!
Afaik servlets may produce Gzipped template output something like
this:
  ...
  OutputStream out1 = response.getOutputStream();
  out = new PrintWriter(new GZIPOutputStream(out1), false);
  response.setHeader(Content-Encoding, gzip);
  .

But how we can do that with JspWriter? Is it possible to do similar
with JSP?


  




--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Re: Session Tacking across hostnames?

2002-04-15 Thread David Cassidy

How about this ...

don't use encodeIURL just emulate it ...

ie do the ;jsessionid= sessionID
yourself .

David


Neil Aggarwal wrote:

Jan:

I am using repsonse.encodeURL, but it does not add the session id
when the hostname is different.

Thanks,
   Neil.

--
Neil Aggarwal
JAMM Consulting, Inc.(972) 612-6056, http://www.JAMMConsulting.com
Custom Internet DevelopmentWebsites, Ecommerce, Java, databases


-Original Message-
From: Pekník Jan [mailto:[EMAIL PROTECTED]]
Sent: Monday, April 15, 2002 8:53 AM
To: 'Tomcat Users List'
Subject: RE: Session Tacking across hostnames?


I think this would help :

when you switch from HTTP to HTTPS, add JSESSIONID to that url by calling
response.encodeURL(url)

  -Jan

-Original Message-
From: Neil Aggarwal [mailto:[EMAIL PROTECTED]]
Sent: Sunday, April 14, 2002 6:49 AM
To: Tomcat-User
Subject: Session Tacking across hostnames?


Hello:

I am using Apache 1.3 and Tomcat 4.0.3.

For an application we are building, we are using a shared SSL certificate
so the hostname has to be different for http and https.  For example,
public pages are loaded from http://www.futurescope.com/fscope/myPage.jsp
and private pages are loaded from
http://www.JAMMConsulting.com/fscope/privatePage.jsp

Unforutnately, when we switch from http to https or vice versa, we lose
track of the session.  Is there a way to keep the session is this
instance?

Thanks,
  Neil.

--
Neil Aggarwal
JAMM Consulting, Inc.(972) 612-6056, http://www.JAMMConsulting.com
Custom Internet DevelopmentWebsites, Ecommerce, Java, databases





---
Odchozí zpráva neobsahuje viry.
Zkontrolováno antivirovým systémem AVG (http://www.grisoft.cz).
Verze: 6.0.346 / Virová báze: 194 - datum vydání: 10.4. 2002


--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]



--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Re: Session Tacking across hostnames?

2002-04-15 Thread David Cassidy

both of these two urls do actually speak to the same tomcat don't they ?

Does TC get passed the headers of what server actually brought the request
to it ?

ajp12 vs 13 ?

Have you tried virtual hosts in TC ?

David...

Neil Aggarwal wrote:

David:

I tried that too.  It did not work.  I still get a new session.

Thanks,
   Neil.

--
Neil Aggarwal
JAMM Consulting, Inc.(972) 612-6056, http://www.JAMMConsulting.com
Custom Internet DevelopmentWebsites, Ecommerce, Java, databases


-Original Message-
From: David Cassidy [mailto:[EMAIL PROTECTED]]
Sent: Monday, April 15, 2002 10:10 AM
To: Tomcat Users List
Subject: Re: Session Tacking across hostnames?


How about this ...

don't use encodeIURL just emulate it ...

ie do the ;jsessionid= sessionID
yourself .

David


Neil Aggarwal wrote:

Jan:

I am using repsonse.encodeURL, but it does not add the session id
when the hostname is different.

Thanks,
 Neil.

--
Neil Aggarwal
JAMM Consulting, Inc.(972) 612-6056, http://www.JAMMConsulting.com
Custom Internet DevelopmentWebsites, Ecommerce, Java, databases


-Original Message-
From: Pekník Jan [mailto:[EMAIL PROTECTED]]
Sent: Monday, April 15, 2002 8:53 AM
To: 'Tomcat Users List'
Subject: RE: Session Tacking across hostnames?


I think this would help :

when you switch from HTTP to HTTPS, add JSESSIONID to that url

by calling

response.encodeURL(url)

-Jan

-Original Message-
From: Neil Aggarwal [mailto:[EMAIL PROTECTED]]
Sent: Sunday, April 14, 2002 6:49 AM
To: Tomcat-User
Subject: Session Tacking across hostnames?


Hello:

I am using Apache 1.3 and Tomcat 4.0.3.

For an application we are building, we are using a shared SSL

certificate

so the hostname has to be different for http and https.  For example,
public pages are loaded from

http://www.futurescope.com/fscope/myPage.jsp

and private pages are loaded from
http://www.JAMMConsulting.com/fscope/privatePage.jsp

Unforutnately, when we switch from http to https or vice versa, we lose
track of the session.  Is there a way to keep the session is this
instance?

Thanks,
Neil.

--
Neil Aggarwal
JAMM Consulting, Inc.(972) 612-6056, http://www.JAMMConsulting.com
Custom Internet DevelopmentWebsites, Ecommerce, Java, databases





---
Odchozí zpráva neobsahuje viry.
Zkontrolováno antivirovým systémem AVG (http://www.grisoft.cz).
Verze: 6.0.346 / Virová báze: 194 - datum vydání: 10.4. 2002


--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]


--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]



--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]



--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Re: Clustering HTTP Sessions in Tomcat

2002-04-10 Thread David Cassidy

anyone got anything like this for the tomcat 3 series ?

Ta

D


Dion Almaer wrote:

Filip Hanik has written a great article on HTTP Session Replication using Tomcat 4.
http://www.theserverside.com/resources/index.jsp

In this article we will cover one of the clustering technologies, HTTP session 
replication, that is used within the J2EE model. In
the second half of the article, an example is provided of how session replication can 
be implemented using Tomcat in conjunction
with JavaGroups, a communication protocol which can perform reliable multicast 
operations to transfer session state between nodes.

Dion

--
 \\|//
 (o o)
+oOOo-(_)-oOOo--+
|   [EMAIL PROTECTED]   | Dew knot trussed yore spell chequer two|
| www.almaer.com/dion |  fined awl yore mistakes   |
+---+


--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Re: mounting a hard disk to linux

2002-04-10 Thread David Cassidy

2 daft questions ...

1) whats a post like this doing in the tomcat forum ?

2) why WHY WHY   would you format a disk to be used by
 linux as a windows format ?

Try ext2 / ext3 / any of the other native formats !
They are alot better !

NTFS is an 'experimental' filing system under linux ATM IIRC

good luck !

D

Murat Buyukkal ([EMAIL PROTECTED]) wrote:

If possible, you can format it as FAT32 then mount it as VFAT.
Murat.

-Original Message-
From: Lalit Nagpal [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 10, 2002 12:40 PM
To: [EMAIL PROTECTED]
Subject: mounting a hard disk to linux



hello,

i am trying to mount a hard disk of 2 gb onto linux. what should i do to
mount it

i did try to format it with ntfs file system and then entered the entry
into
the fstab

file and specified the file system as ntfs, but i got the message that
the
file

system is not supported by kernel. although the books says linux
supports
ntfs

plz tell me how to go about. 

i could have also specified the file system as dos, but then how to dos
format the

disk and is it necessary to have a dos partition on linux then ?

thanx in advance

Lalit Nagpal.



-
Do You Yahoo!?
Yahoo! Tax Center - online filing with TurboTax




--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Re: Please help me on a question about TOMCAT OR APACHE + TOMCAT

2002-04-10 Thread David Cassidy

I would suggest a minor addition to the below ...

where a.fieldname1= b.fieldname1

otherwise the results could be eerrr well rather large 
( select what you want ...)


Nicholson, Dale wrote:

Try something like this:

select a.fieldname1, b.fieldname1 
from table1 a, table2 b

Where you put the a after the first table name and the b after the second
table name.  Then you refer to the fieldnames with those letters first so
sql knows which table to look in for that field.


Dale Nicholson 

-Original Message-
From: Lee Chin Khiong [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 10, 2002 1:43 AM
To: 'Tomcat Users List'
Subject: RE: Please help me on a question about TOMCAT OR APACHE +
TOMCAT



Anybody familiar with sql ?
I have a question here, how to link 2 tables from JSP when 
they have a same
field name ?

 


--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Re: integrating TOMCAT 4.0 with APACHE 2.0 - or Tomcat 3.3.1

2002-04-09 Thread David Cassidy

I'd really quite like to try Tomcat 3.3.1 with apache 2.0

I've tried the binaries for apache 2 - for linux

http://jakarta.apache.org/builds/jakarta-tomcat/release/v3.3.1/bin/linux/i386/ 
mod_jk-3.3-ap20.so 
http://jakarta.apache.org/builds/jakarta-tomcat/release/v3.3.1/bin/linux/i386/mod_jk-3.3-ap20.so

Apache says 'httpd: module mod_jk.c is not compatible with this 
version of Apache.'

If I try to build the version from source - There isn't an apache2 
version in the source
distro of Tomcat 3.3.1

Help 

Thanks

David


Mike Dewhirst wrote:

has anybody successfully integrated Apache 2 with Tomcat 4? If yes, how
did
you do it, I can't figure it out. If it's RTFM -  which part, I couldn't
find it in the docs...


=**




--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Re: why so many processes running for tomcat

2002-04-04 Thread David Cassidy

Let me guess 
a Linux newbie running tomcat for the first time ?

There has been **MANY** long discussions about this...
the end is don't worry - it's Linux making threads into processes
( On linux all threads are lightweight processes)

Try ps auxfwww

the 'f' is the forest param..

:)

D



Lalit Nagpal wrote:

hi

when i give the command ps -aux i see atleast 32 processes of tomcat

something like /usr/java/jdk1.3.1_02/bin/i386/native_threads/java -D
/usr/java/jdk1.3

can anybody tell me what these 32 entries are for

running



-
Do You Yahoo!?
Yahoo! Tax Center - online filing with TurboTax




--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Re: Apache Tomcat response.setHeader(WWW-Authenticate,BASIC

2002-03-21 Thread David Cassidy

can you send the full set of headers that you get back ?

wget -s
will do this ..

D



mh wrote:

I use Apache 1.3.19  Tomcat 4.0.1 via mod_jk on Linux platform.

I try to do this in a servlet :

String authHeader = request.getHeader(Authorization);
if (authHeader != null) {
 AuthInternaute ai = new AuthInternaute(authHeader);
 String username = ai.getUsername();
 String password = ai.getPassword();
 allow = (validUsername.equals(username) 
validPassword.equals(password));
}
else
{
 response.setHeader(WWW-Authenticate, BASIC realm=\+realm+\);
 response.sendError(response.SC_UNAUTHORIZED, Identification required /
Autorisation nécessaire.); 
}

but Apache doesn't respond correctly and send an Internal Server Error
instead of authentication dialog box.

It works fine with tomcat standalone. Perhaps a mod_jk problem, I don't
know how to solve this problem.

Can someone have ideas ?

M.H.




--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Re: Apache Tomcat response.setHeader(WWW-Authenticate,BASIC

2002-03-21 Thread David Cassidy


What do you get if you connect to the tomcat 8080 port and
do the same thing ?

D


mh wrote:

--16:17:44--  http://dev.cerib.reflexe.fr/cerib_BD
   = `cerib_BD'
Connexion vers dev.cerib.reflexe.fr:80...Connecté!
requête HTTP transmise, en attente de la réponse...302 Found
2 Date: Thu, 21 Mar 2002 15:17:44 GMT
3 Server: Apache/1.3.19 (Unix)  (Red-Hat/Linux) mod_jk PHP/4.0.1pl2
mod_ssl/2.8.1 OpenSSL/0.9.6 DAV/1.0.2 mod_gzip/1.3.19.1a
4 Location: http://dev.cerib.reflexe.fr/cerib/cerib_BD
5 Connection: close
6 Content-Type: text/html; charset=iso-8859-1
7
Location: http://dev.cerib.reflexe.fr/cerib/cerib_BD [suivant]
--16:17:44--  http://dev.cerib.reflexe.fr/cerib/cerib_BD
   = `cerib_BD'
Connexion vers dev.cerib.reflexe.fr:80...Connecté!
requête HTTP transmise, en attente de la réponse...500 Internal Server Error
2 Date: Thu, 21 Mar 2002 15:17:44 GMT
3 Server: Apache/1.3.19 (Unix)  (Red-Hat/Linux) mod_jk PHP/4.0.1pl2
mod_ssl/2.8.1 OpenSSL/0.9.6 DAV/1.0.2 mod_gzip/1.3.19.1a
4 Connection: close
5 Content-Type: text/html; charset=iso-8859-1
6
16:17:44 ERREUR 500: Internal Server Error.


- Original Message -
From: David Cassidy [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Thursday, March 21, 2002 4:11 PM
Subject: Re: Apache Tomcat response.setHeader(WWW-Authenticate,BASIC


can you send the full set of headers that you get back ?

wget -s
will do this ..

D



mh wrote:

I use Apache 1.3.19  Tomcat 4.0.1 via mod_jk on Linux platform.

I try to do this in a servlet :

String authHeader = request.getHeader(Authorization);
if (authHeader != null) {
AuthInternaute ai = new AuthInternaute(authHeader);
String username = ai.getUsername();
String password = ai.getPassword();
allow = (validUsername.equals(username) 
validPassword.equals(password));
}
else
{
response.setHeader(WWW-Authenticate, BASIC realm=\+realm+\);
response.sendError(response.SC_UNAUTHORIZED, Identification required /
Autorisation nécessaire.);
}

but Apache doesn't respond correctly and send an Internal Server Error
instead of authentication dialog box.

It works fine with tomcat standalone. Perhaps a mod_jk problem, I don't
know how to solve this problem.

Can someone have ideas ?

M.H.



--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]



--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Re: Apache Tomcat response.setHeader(WWW-Authenticate,BASIC

2002-03-21 Thread David Cassidy


Can I see the headers ?

mh wrote:

It works fine with tomcat standalone tomcat port 8080

- Original Message -
From: David Cassidy [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Thursday, March 21, 2002 4:40 PM
Subject: Re: Apache Tomcat response.setHeader(WWW-Authenticate,BASIC


What do you get if you connect to the tomcat 8080 port and
do the same thing ?

D


mh wrote:

--16:17:44--  http://dev.cerib.reflexe.fr/cerib_BD
  = `cerib_BD'
Connexion vers dev.cerib.reflexe.fr:80...Connecté!
requête HTTP transmise, en attente de la réponse...302 Found
2 Date: Thu, 21 Mar 2002 15:17:44 GMT
3 Server: Apache/1.3.19 (Unix)  (Red-Hat/Linux) mod_jk PHP/4.0.1pl2
mod_ssl/2.8.1 OpenSSL/0.9.6 DAV/1.0.2 mod_gzip/1.3.19.1a
4 Location: http://dev.cerib.reflexe.fr/cerib/cerib_BD
5 Connection: close
6 Content-Type: text/html; charset=iso-8859-1
7
Location: http://dev.cerib.reflexe.fr/cerib/cerib_BD [suivant]
--16:17:44--  http://dev.cerib.reflexe.fr/cerib/cerib_BD
  = `cerib_BD'
Connexion vers dev.cerib.reflexe.fr:80...Connecté!
requête HTTP transmise, en attente de la réponse...500 Internal Server

Error

2 Date: Thu, 21 Mar 2002 15:17:44 GMT
3 Server: Apache/1.3.19 (Unix)  (Red-Hat/Linux) mod_jk PHP/4.0.1pl2
mod_ssl/2.8.1 OpenSSL/0.9.6 DAV/1.0.2 mod_gzip/1.3.19.1a
4 Connection: close
5 Content-Type: text/html; charset=iso-8859-1
6
16:17:44 ERREUR 500: Internal Server Error.


- Original Message -
From: David Cassidy [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Thursday, March 21, 2002 4:11 PM
Subject: Re: Apache Tomcat response.setHeader(WWW-Authenticate,BASIC


can you send the full set of headers that you get back ?

wget -s
will do this ..

D



mh wrote:

I use Apache 1.3.19  Tomcat 4.0.1 via mod_jk on Linux platform.

I try to do this in a servlet :

String authHeader = request.getHeader(Authorization);
if (authHeader != null) {
AuthInternaute ai = new AuthInternaute(authHeader);
String username = ai.getUsername();
String password = ai.getPassword();
allow = (validUsername.equals(username) 
validPassword.equals(password));
}
else
{
response.setHeader(WWW-Authenticate, BASIC realm=\+realm+\);
response.sendError(response.SC_UNAUTHORIZED, Identification required /
Autorisation nécessaire.);
}

but Apache doesn't respond correctly and send an Internal Server

Error

instead of authentication dialog box.

It works fine with tomcat standalone. Perhaps a mod_jk problem, I don't
know how to solve this problem.

Can someone have ideas ?

M.H.


--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]


--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]



--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]



--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Re: Repost: Finding Tomcat PID (Was Figuring out which Unix processis which)

2002-03-20 Thread David Cassidy

Ralph,

you could always use something like wget that will actually get a page from catalina
then if you get no output then trigger an alert.

that will check that the service is actually able to serve requests rather
than just running ...

You could make the page that it requests a 'lets check all the services' type
page so that you can check that the connection to the database etc are still
all working ...

D





camccuk wrote:

Hello all,

Sorry to repost but this seems to be relevant and something some people are
having a problem with. My original post was:

-
I've had a small script running for a while that
basically runs ps -auxfwww and greps the output for
'catalina', mailing me if the process has fallen over.
(The extra w options make the process name long enough
to fit in the whole catalina command line).

However, this only works until the java process gets
swapped out, at which point ps reports the process as
[java] - there is no way around this that I know of
despite several posts to groups etc. 

So I think I need a script to launch catalina and
store the pid somewhere that I can use killall 0 on -
this is apparently the 'correct' way to check a
process is running. 
-

If this swapping out problem doesn't happen for you Toav, perhaps this is the
way to go: use extra 'w's in your ps command - they accumulate (despite there
being no clue to this in the manpage).

Can anyone who knows Tomcat well comment on these other possibilities?

--- Ralph Einfeldt [EMAIL PROTECTED] wrote:

What we do, is to define a command line option that shows 
up at the beginning of the command string that identifies
the site for which this vm is running.

As we don't use tomcat, I can't tell you how to achieve 
this with tomcat.


jserv.properties:
  wrapper.bin.parameters=-DName=sitename


Another way to identify: 
  look for a VM that connects to a given port.

Under linux it lsof -i :port.
Don't know how if lsof is part of the standard 
distribution for solaris. (Last time I've worked 
with that is over 3 years ago)


lsof only shows a plain command (e.g. java) in the left hand column...

-Ursprüngliche Nachricht-
Von: Yoav Shapira [mailto:[EMAIL PROTECTED]]
Gesendet: Dienstag, 19. März 2002 21:52
An: [EMAIL PROTECTED]
Betreff: Figuring out which Unix process is which

snip/

We run multiple instance of tomcat using the same JAVA_HOME,
so when we run a ps command (Solaris 2.8) we see a bunch
of java processes, but can't tell which one is which instance
of tomcat.  Does anyone have any ideas to help this problem?

snip/


It seems to me that storing the pid is probably the most robust method - I just
haven't had a chance to try writing a script yet. Can anyone suggest other ways
to approach this? 

Cheers,
cam

__
Do You Yahoo!?
Yahoo! Sports - live college hoops coverage
http://sports.yahoo.com/

--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Re: Garbage showing up when trying to download a word doc in TC 4.0.1

2002-03-19 Thread David Cassidy

Mehjabin,

Don't know if you are using windows or Unix but ...

( works nicer in a unix term rather than windows telnet but ..)

easiest way to test this is to fake a web request. So

telnet hostname port

where hostname is your machine's name or IP address and the port is the port
on which you are running Tomcat.

Then ...

HEAD /path to word doc / servlet HTTP/1.0
return
return

Before you see lots of garbage you should get what everyone is talking 
about - the headers.

Let us know what the Content-type: header says

D





Kapasi, Mehjabin wrote:

Thanks Joel,
I have been trying what you said. I did not understand what you meant by 
Check the http headers you are sending for the download. There's a tool
forthis floating around somewhere I think. Compare the headers 3.2.1 sends
with the headers 4.0.1 sends.
How do I check that?

Here is the garbage that I get when i try to download the word documen.Sorry
for the long email but can you help me out here? I am not understanding
where to start looking for the problem.
Thanks,
Mehjabin

ÐÏࡱáþÿ
‹þÿÿÿ‰Š




ì¥ÁW
ø¿Âbjbjªyªy ŠdÈÈõÌÿÿÿÿÿÿl       4Ž 
®!®!®!hDZ´Ž
1v(#Æà$¦†%†%†%†%¢ (0,T3˜°u²u²u²u²u²u²u$Yx yzŒÖu 
ì4†%†%ì4ì4Öun:Â Â
†%†%ëun:n:n:ì4 †% †%°un:ì4°un:2n: A^¨jà  |q†%# 
€¿mÚBÁŽ
®!7ˆph|q4v01vðpŒ{,9B{|qn:ö XN @    Ù  SUBJECT \* MERGEFORMAT
ClassicsCD Web Shop title \* Mergeformat Vision Version 2.1 Revision
History DateRevisionDescriptionAuthor20/Oct/20011.0Initial VersionP
Murphy10/Nov/20012.0Updated based on Requirements WorkshopP
Murphy15/Nov/20012.1Editorial RevisionsS. Chandler
[contractor]
 Table of Contents TOC \o 1-3 1. Introduction  PAGEREF
_Toc523131581 \h 1 1.1 Purpose of the Vision Requirements Document (VRD)
 PAGEREF _Toc523131582 \h 1 1.2 Product Overview  PAGEREF _Toc523131583
\h 1 2. User Description  PAGEREF _Toc523131584 \h 1 2.1 User/Market
Demographics  PAGEREF _Toc523131585 \h 1 2.2 User Profiles  PAGEREF
_Toc523131586 \h 1 2.3 User Environment  PAGEREF _Toc523131587 \h 1
2.4 Key User Needs  PAGEREF _Toc523131588 \h 2 2.5 Alternatives and
Competition  ...




-Original Message-
From: Joel Rees [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 07, 2002 9:51 PM
To: Kapasi, Mehjabin
Subject: Re: Garbage showing up when trying to download a word doc in TC
4.0.1


Kapasi, Mehjabin wrote (off list):

Subject: RE: Garbage showing up when trying to download a word doc in TC

4.0.1

Woops. I didn't read the title line well enough. I was thinking of text
files, which are a real pain to force downloads with.


(I haven't seen any follow-up on the list, and I have a moment to try to
respond again.)

The problem is i want it to show me the browser dialog instead of the
showing garbage on the page. I have tried it on different browsers on
different machines and it still gives me the same result. If I try

accessing

the webapp using Tomcat 3.2.1 using the same browser, the dialog shows up
but as soon as I use Tomcat 4.0.1 I get the problem.
What else can i do?


Check the http headers you are sending for the download. There's a tool for
this floating around somewhere I think. Compare the headers 3.2.1 sends with
the headers 4.0.1 sends.

But we would like more information, like a snippet of the code you are using
to send the .doc files, and a sample of the garbage that gets sent with TC
4.0.1, and also relevant server settings. Otherwise, we can only jump to
conclusions (like I did the first time).

You might also want to check whether you have something set to drop the high
bit and send only seven bits per octet, but I don't think so.

I apologize for the slow response. Had some work to do, you know. Anyway,
give us more information, and _post_ _to_ _the_ _list_. That way, other
people more qualified than I will be able respond.

Joel Rees
Alps Giken Kansai Systems Develoment
Suita, Osaka


-Original Message-
From: Joel Rees [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, March 05, 2002 7:39 PM
To: Tomcat Users List
Cc: [EMAIL PROTECTED]
Subject: Re: Garbage showing up when trying to download a word doc in TC
4.0.1


Kapasi, Mehjabin wrote:

However, when i click on the download icon I get garbage on the page

instead

of a browser dialog giving me options to save/open the document.

This is usually a browser settings related problem, not a Tomcat issue..

This problem i am experiencing when running Tomcat 4.0.1 with 

Re: Off Topic: Free J2EE IDE: Which one?

2002-03-19 Thread David Cassidy

I think when you want the J2EE bits for forte it costs :(

I'm just starting to get going into the EJB areana and so $1995 doesn't
seem very nice :(

D

Matt Egyhazy wrote:

i havent done ejb in forte community edition, however, it comes with tc 3.3
and you can debug servlets internally.  i have not tried remote debugging.

matt

- Original Message -
From: Bing Zhang [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, March 19, 2002 11:34 AM
Subject: Off Topic: Free J2EE IDE: Which one?


I am trying to use a free IDE to do J2EE development, mainly servlet and
EJB. The development will be on Windows NT/2000. Deployment is on linux.
Three tools come to my mind: Forte Java Community Edition (I am supprised
that almost nobody mention this tool), Eclipse from IBM and NetBean.

I feel short time evaluation does not give me enough insight, though I

have

downloaded both Forte and Eclopse. Hope anyone ever used the above tools

in

real life give me some guidance. Any of the above tools let me debug

servlet

or even EJB locally? How about remotely? Any other server I need to set up
beside the IDE to effectively do J2EE?



Thanks,

Bing Zhang


--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]



--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Re: Tomcat Memory usage(Urgent!)

2002-03-08 Thread David Cassidy

within your program you might want to check out

Runtime runtime = Runtime.getRuntime;
runtime.freeMemory() vs
runtime.totalMemory()

This will let you know what it's really using..
But as top says it's only 59M then I'd be looking at
other processes in your ps list

Hope this helps

D



Boily Sylvain wrote:

 hi all ,

 Well how is possible to give back memory ? Because after 2 days the
 memory is full.
 thx

 Chris Pheby wrote:

 Each of these processes correlates to a /thread/. The processes are
 sharing
 memory for the most part - something that ps or top don't make clear.
 
 Chris
 
 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED]
 ]
 On Behalf Of Galbayar
 Sent: 08 March 2002 09:24
 To: Tomcat Users List
 Subject: Tomcat Memory usage(Urgent!)
 
 
 Hello all
 
 Here is part of top output. Is it usual that java processes eat all of
 memory? ? At now there are 50 java processes started that running
 tomcat and
 each of them uses 59M memory. There is running apache server with
 tomcat 4
 and mysql. OS is Redhat7.2 x86 . JDK 1.4 is installed.
 
 Thx
 
 106 processes: 105 sleeping, 1 running, 0 zombie, 0 stopped
 CPU states: 0.3% user, 3.4% system, 0.0% nice, 96.1% idle
 Mem: 1028860K av, 1022352K used, 6508K free, 116K shrd, 129004K buff
 Swap: 1020116K av, 0K used, 1020116K free 762320K cached
 
 3201 root 9 0 60692 59M 28164 S 0.0 5.8 0:03 java
 3202 root 8 0 60692 59M 28164 S 0.0 5.8 0:00 java
 3203 root 9 0 60692 59M 28164 S 0.0 5.8 0:35 java
 3204 root 9 0 60692 59M 28164 S 0.0 5.8 0:00 java
 3205 root 9 0 60692 59M 28164 S 0.0 5.8 0:01 java
 3206 root 9 0 60692 59M 28164 S 0.0 5.8 0:00 java
 3207 root 9 0 60692 59M 28164 S 0.0 5.8 0:00 java
 3208 root 9 0 60692 59M 28164 S 0.0 5.8 0:00 java
 3209 root 9 0 60692 59M 28164 S 0.0 5.8 0:03 java
 .
 .
 .
 
 
 
 --
 To unsubscribe:   mailto:[EMAIL PROTECTED]
 For additional commands: mailto:[EMAIL PROTECTED]
 Troubles with the list: mailto:[EMAIL PROTECTED]
 

 --

 */Sylvain Boily/*
 /Administrateur Linux/

 cid:[EMAIL PROTECTED]

 /*Adresse :* 39, bd Anatole France -  93200 St-Denis -  France/
 /*tel :*0148131814/
 /*mail :*[EMAIL PROTECTED] mailto:[EMAIL PROTECTED]
 *web:*http://www.linkbynet.fr/


--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Re: AW: IE 5 on Mac is incompatible with TC 4?

2002-03-08 Thread David Cassidy

sounds to me that this whole line of conversation could be
summed up as

If you want users without cookies to use your site then use
encodeURL
if not tough.

This isn't a tomcat issue, it's a lazy ( web site) programmer issue ;-^)

(honest not flame bait :

D



Joe Laffey wrote:

 On Fri, 8 Mar 2002, Ralph Einfeldt wrote:

  I don't copletly agree with that.
 
  As long as you don't break specs it is possible to do
  something in tomcat to deal with errors in browsers.
  (Like missbehavior in the headers of a http request)
 
  If a browser has a bug that you can't deal with, without
  breaking the spec there isn't much you can do.

 I understand your concern over the specs. But users don't care about
 specs, neither do manager, CEOs, or the bean counters. They care about
 profits.  And alienating users with your website is NOT a way to increase
 profits ;-)

  There might also be browser bugs that you can't avoid at
  all. E.G. if a browser doesn't send a cookie under certain
  conditions, what would you suggest to change on the server
  side to change that. (I don't know if this happens here)
 

 I too know nothing about the issue, and have not tested it to see if it
 even exists. (Perhaps I should have kept my mouth shut in the first
 place.) I simply wanted to point out that hold spec up as Holy Grail
 doesn't do any users any good at all. There will always be
 incompatibilities. The industry has tried forever to have specs,
 guidelines, and requirements. There have always been exceptions.
 Unless you control ALL the software involved, or have the full cooperation
 of those who do (MS, cooperate? yeah, sure...) things will have to be
 adjusted to fit.

 If this is indeed a bug in IE5 Mac then it should be documented as an
 incompatibility prominently on the Tomcat website. This way developers
 won't look like idiots when their clients call screaming that their
 daughter can't even order products from their website from her iMac! The
 prudent developer will find a workaround or choose something other than
 Tomcat.

  In this case you don't have to alienate all Mac IE5
  users because there is workaround: using encodeUrl().
  Which should be used anyway, because otherwise you will
  alienate all users that disable cookies. (Which will be
  more than Mac OS 9 users with IE 5)

 If this works then yes, it is a good solution. (Not requiring cookies is
 always a good solution, but it costs more time/money.) However, IMHO, the
 Tomcat docs ought to reflect this incompatibility prominently so the
 developer know that they will have to waste hours working around it.

 Again, I have no idea if a bug really exists. I am simply making noise
 because I think that money is more important than specs to most developers
 and definitely to most suits.

 I will now be quiet. I hope I haven't offended you or anyone on the Tomcat
 team. I think Tomcat is a good project.

 --
 Joe Laffey  |  Want to convert subnet masks between different
 LAFFEY Computer Imaging |  notations, or figure the number of IPs in a block?
 St. Louis, MO   |  Whatmask-It's FREE - www.laffeycomputer.com/wm.html
 --

 --
 To unsubscribe:   mailto:[EMAIL PROTECTED]
 For additional commands: mailto:[EMAIL PROTECTED]
 Troubles with the list: mailto:[EMAIL PROTECTED]


--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Re: java.lang.UnsatisfiedLinkError: no ocijdbc8 in shared library path

2002-03-04 Thread David Cassidy

Brian,

For a very large number of reasons it's probably best not to run
tomcat under the super user account...

You might want to try setting the LD_LIBRARY_PATH
env in your startup / shutdown scripts...

Or you might want to look at ldconfig ...

D


brian ally wrote:

 Are you starting tomcat as root? On my linux box, if i su to root, all
 manner of LD_LIBRARY_PATH problems begin. i need to su - (with the
 dash). Could this be your problem?

 /b

 Abhishek Pamecha wrote:

 it is there..
 
 -Original Message-
 From: Toru Watanabe [mailto:[EMAIL PROTECTED]]
 Sent: Monday, March 04, 2002 2:34 PM
 To: Tomcat Users List
 Subject: Re: java.lang.UnsatisfiedLinkError: no ocijdbc8 in shared
 library path
 
 
 
 First, please make sure that Oracle client is installed
 in your machine.
 
 Abhishek Thanks buddy!
 Abhishek but ..i already did that
 Abhishek but i have a a requirement which says i have to use oci client only
 Abhishek any other solution ???
 
 UnsatisfiedLinkError means JVM can't find shared library.
 You need to add shared library path to environment variable.
 
 If you use solaris or linux, then you should add following
 statement in your tomcat.sh.
 
 LD_LIBRARY_PATH=$ORACLE_HOME/lib:$LD_LIBRARY_PATH
 export LD_LIBRARY_PATH
 
 if you use HP-UX, then
 
 SHLIB_PATH=$ORACLE_HOME/lib:$SHLIB_PATH
 export SHLIB_PATH
 
 if you use Windows, then you should add following to tomcat.bat.
 
 set PATH=%ORACLE_HOME%\lib;%PATH%
 
 
 then it will be able to find shared library.
 
 regards,
 Watanabe.
 
 --
 To unsubscribe:   mailto:[EMAIL PROTECTED]
 For additional commands: mailto:[EMAIL PROTECTED]
 Troubles with the list: mailto:[EMAIL PROTECTED]
 
 
 --
 To unsubscribe:   mailto:[EMAIL PROTECTED]
 For additional commands: mailto:[EMAIL PROTECTED]
 Troubles with the list: mailto:[EMAIL PROTECTED]
 
 

 --
 To unsubscribe:   mailto:[EMAIL PROTECTED]
 For additional commands: mailto:[EMAIL PROTECTED]
 Troubles with the list: mailto:[EMAIL PROTECTED]


--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Re: JSP not returning full page problem

2002-02-22 Thread David Cassidy

Ian,

On comment
custom tags... Have a **big** read. they make jsp alot more readable.

is this visible on the net ? - ie can I see it in action ?

On which statement does the data finish ?
could you attach the output ?

Are there any exceptions generated in the tomcat logs ?

you might find rs.getString(column_name)  easier to read than  rs.getString(1)

It's a little more important when it's the data back from a view - where your DBA
can 'move' things around - as they want (bit me in the ass - view change not the DBA!)



Just a little one ...

   td align=center nowrapselect
STYLE=font-family:Verdana,Helvetica,Arial;font-size:7pt
name=dayDateDay%=checkBoxCount%
OPTION % if (day == 1){%SELECTED %}% VALUE=0101
OPTION % if (day == 2){%SELECTED %}% VALUE=0202
OPTION % if (day == 3){%SELECTED %}% VALUE=0303
OPTION % if (day == 4){%SELECTED %}% VALUE=0404

would be easier as ..

for (int a=1;a32;a++)
{
if ( a==day )
out.write(OPTION SELECTED  VALUE=\ + a +\ +a+/OPTION\n);
else
  out.write(OPTION  VALUE=\ + a +\ +a+/OPTION\n);
 }

Although i'm sure there are faster ways :) - anyone ?

D



Ian Hilliard wrote:

 Thanks for the prompt reply,  here is the JSP that I am having problems
 with,

 as I say it is not returning any more than a certain amount of the page, if
 I decrease the amount of data per line the output becomes more but still
 hits the limit, I have a screen shot if it will make it clearer,

 %@ page import=java.sql.* %
 %! protected String driver=sun.jdbc.odbc.JdbcOdbcDriver;
 protected String url=jdbc:odbc:ian;
 protected String userid=system;
 protected String password=manager; %

 %! public static String FIRST_QUERY =
 SELECT row_id,  +
 timesheet,  +
 emp_no,  +
 expense_date,  +
 customer_no,  +
 rechargeable,  +
 receipt_no,  +
 expense_type,  +
 expense_amount,  +
 foreign_exchange_rate_type,  +
 foreign_exchange_rate,  +
 actual_amount,  +
 vat,  +
 vat_rate_type,  +
 vat_rate,  +
 amount_vatable,  +
 amount_of_vat,  +
 oracle_work,  +
 mileage_from,  +
 mileage_to,  +
 mileage_rate_ee,  +
 mileage_rate_er,  +
 description  +
 FROM   expenses  +
 WHERE  emp_no=? and timesheet=?  +
 ORDER BY expense_date, customer_no, to_number(receipt_no);
 %
 %! public static String SECOND_QUERY =
 SELECT customer_no, customer_description  +
 FROM   customer_no  +
 ORDER BY customer_no;
 %
 %! public static String THIRD_QUERY =
 SELECT expense_type  +
 FROM   expense_type  +
 ORDER BY expense_type;
 %
 %! public static String FORTH_QUERY =
 SELECT rate_type, rate_value  +
 FROM   foreign_exchange_rate  +
 ORDER BY rate_type;
 %
 %! public static String FIFTH_QUERY =
 SELECT vat_type, vat_rate_value  +
 FROM   vat_rate  +
 ORDER BY vat_type;
 %
 %
 String empNo = (String) session.getAttribute(empNo);
 String Timesheet = request.getParameter(Timesheet);
 String _template = (String) session.getAttribute(_template);
 String customerNo = ;
 String customerDesc = ;
 String expenseType = ;
 String foreignExchangeRateType = ;
 String foreignExchangeRateValue = ;
 String vatType = ;
 String vatRateValue = ;
 String comment = ;
 String mileageFrom = ;
 String mileageTo = ;
 %
 %
 PreparedStatement stmt;
 ResultSet rs;
 PreparedStatement stmt1;
 ResultSet rs1;
 PreparedStatement stmt2;
 ResultSet rs2;
 PreparedStatement stmt3;
 ResultSet rs3;
 PreparedStatement stmt4;
 ResultSet rs4;
 %
 html
 head
 titleSymatrix Ltd./title
 meta http-equiv=Content-Type content=text/html; charset=iso-8859-1\
 script language=JavaScript
 /script
 /head
 FORM name=ConfirmDeleteForm method=POST
 action=/symatrix/update_row_ex.jsp target=mainFrame
 %
 Class.forName(driver);
 Connection conn = DriverManager.getConnection(url, userid, password);

 stmt = conn.prepareStatement(FIRST_QUERY);
 stmt.setString(1, empNo);
 stmt.setString(2, Timesheet);

 rs = stmt.executeQuery();
 %
 table width=% border=0
 STYLE=font-family:Verdana,Helvetica,Arial;font-size:7pt
   tr bgcolor=#99
 td align=center nowrapUpdate/td
 td align=center nowrapDate/td
 td align=center nowrapCustomer/td
 td align=center nowrapRechargeable/td
 td align=center nowrapReceipt No/td
 td align=center nowrapType/td
 td align=center nowrapNet Amount/td
 td align=center nowrapExchange Rate/td
 td align=center nowrapVAT/td
 td align=center nowrapVAT Rate Type/td
 td align=center nowrapVATable Amount/td
 td align=center nowrapOracle 

Re: Input from a FORM - encoding problem

2002-02-18 Thread David Cassidy

try this ...

quote
FORM attribute

accept-charset = charset list [CI]
This attribute specifies the list of character encodings for input data that is 
accepted by the server processing this form. The value is a space- and/or 
comma-delimited list of charset values. The client must interpret this list as an
exclusive-or list, i.e., the server is able to accept any single character encoding 
per entity received.

The default value for this attribute is the reserved string UNKNOWN. User agents 
may interpret this value as the character encoding that was used to transmit the 
document containing this FORM element.
/quote

URLhttp://www.w3.org/TR/html401/interact/forms.html#h-17.3


Let us know ...

Thanks

D




Nikola Milutinovic wrote:

 Hi all.

 I have a HTML FORM that I'd like to use to update data in my database. DB 
(PostgreSQL + Unicode) is configured and correctly loaded with Unicode data. 
Translations from UTF-8 - Win-1250 works like a charm (and so does UTF-8 - 
ISO-8859-2).

 In other words, displaying the data is OK.

 Now I want to update fields and there is a problem. If I enter some of win-1250 
chars in a textfield it gets translated to ?.

 A simple investigation shows that the loathed Win1250 - '?' occurs within the 
HTTPRequest object creation.

 How do I specify that the data coming from a FORM is Win1250 encoded?
 Do I do that in HTML FORM that submits the data (most likely)?
 Or do I do that in the JSP/Servlet accepting the data (highly unlikely)?

 I'm looking at HTML 4.01 specification, but so far I'm unlucky - nothing seams to 
work.

 Nix.


--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Re: Tomcat and Apache load-balancing ?

2002-02-14 Thread David Cassidy

Indeed it does...

Ensure that the name of the TC server in your workers.properties files
are the same and bingo !

as the session ID leaves mod_jk the session ID has the abbreviated
name of the TC server appended to it so that mod_jk knows where it's
going !

D

Vjeran Marcinko wrote:

 - Original Message -
 From: [EMAIL PROTECTED]
 To: Tomcat Users List [EMAIL PROTECTED]
 Sent: Wednesday, February 13, 2002 9:28 PM
 Subject: Re: Tomcat and Apache load-balancing ?

  On Wed, Feb 13, 2002 at 01:00:31PM +0100, Vjeran Marcinko wrote:
 
  It should work as long as the load-balancer for the apache's has session
  afinity. That is, if the load-balancer can spot out going sessions and
  direct any request with that session id to the apache that created it.
 
  Each tomcat will only be able to be served by a single apache.

 But I thought I've read somewhere that mod_jk is responsible for
 determining which Tomcat instance is to be picked based upon request's
 session ID ? Or, was I wrong ?

 -Vjeran

 --
 To unsubscribe:   mailto:[EMAIL PROTECTED]
 For additional commands: mailto:[EMAIL PROTECTED]
 Troubles with the list: mailto:[EMAIL PROTECTED]


--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Re: Tomcat + Weblogic 6.1 sp2 + Petstore

2002-02-14 Thread David Cassidy

in your TC class path do you have the WL classes ?

if not there is no way that TC will talk to WL...

ie how does your servlet do a lookup to get a WL object


D



Steve Earl wrote:

 Yep... I'm very familiar with looking up objects from weblogic... I just
 cannot get the Tomcat side of things to talk to WL... AT ALL.

 Steve...

 -Original Message-
 From: David Cassidy [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, February 13, 2002 10:37 AM
 To: Tomcat Users List
 Subject: Re: Tomcat + Weblogic 6.1 sp2 + Petstore

 I take it it's one of those the company has got weblogic 

 I think you'll need to include the weblogic jars so that you can do a
 lookup

 Have a look on how to get a hold of the weblogic jndi connector ...

 hope it helps

 D

 Steve Earl wrote:

  Yep... I know about the Tomcat  JBoss stuff.  What I'm really having
  problems with is the Tomcat  Weblogic stuff.
 
  Steve...
 
  -Original Message-
  From: David Cassidy [mailto:[EMAIL PROTECTED]]
  Sent: Wednesday, February 13, 2002 10:24 AM
  To: Tomcat Users List
  Subject: Re: Tomcat + Weblogic 6.1 sp2 + Petstore
 
  They use the petStore as a example for getting JBoss and TC to talk
 together
  
 
  jboss.org ...
 
  David
 
  Steve Earl wrote:
 
   Hi,
   I've been pounding my head against the wall for a couple of days now
  trying
   to configure the pet store application. What I need / want to do is have
   Weblogic 6.1 sp2 handle the database connections and EJB's while having
   Tomcat 4.0.2 serve up the servlets and jsps.
   Has anyone gotten this configuration to work successfully? If so could
 you
   please post instructions on how you did it.
   Any help is greatly appreciated,
   Thanks in advance...
   Stephen Earl
  
   --
   To unsubscribe:   mailto:[EMAIL PROTECTED]
   For additional commands: mailto:[EMAIL PROTECTED]
   Troubles with the list: mailto:[EMAIL PROTECTED]
 
  --
  To unsubscribe:   mailto:[EMAIL PROTECTED]
  For additional commands: mailto:[EMAIL PROTECTED]
  Troubles with the list: mailto:[EMAIL PROTECTED]
 
  --
  To unsubscribe:   mailto:[EMAIL PROTECTED]
  For additional commands: mailto:[EMAIL PROTECTED]
  Troubles with the list: mailto:[EMAIL PROTECTED]

 --
 To unsubscribe:   mailto:[EMAIL PROTECTED]
 For additional commands: mailto:[EMAIL PROTECTED]
 Troubles with the list: mailto:[EMAIL PROTECTED]

 --
 To unsubscribe:   mailto:[EMAIL PROTECTED]
 For additional commands: mailto:[EMAIL PROTECTED]
 Troubles with the list: mailto:[EMAIL PROTECTED]


--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Re: Redirect after session expires?

2002-02-13 Thread David Cassidy

is there a session.isInvalid() method ?

If so ... :)

D



Michael Molloy wrote:

 I've got an application that builds menus when a user logs in and sticks the menus 
in an object which I then put inside the session. All subsequent jsps get their menu 
from that object in the session.

 However, when their session expires and they try to access a jsp, they get a 
NullPointerException, as expected.

 How can I catch that error and redirect them to the logon page? Or is their some 
other way to handle it? Is there a better way than putting some if else statements in 
the jsp to check the session for the menu object?

 Thanks
 --Michael

 --
 To unsubscribe:   mailto:[EMAIL PROTECTED]
 For additional commands: mailto:[EMAIL PROTECTED]
 Troubles with the list: mailto:[EMAIL PROTECTED]


--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Re: Tomcat + Weblogic 6.1 sp2 + Petstore

2002-02-13 Thread David Cassidy

They use the petStore as a example for getting JBoss and TC to talk together


jboss.org ...

David

Steve Earl wrote:

 Hi,
 I've been pounding my head against the wall for a couple of days now trying
 to configure the pet store application. What I need / want to do is have
 Weblogic 6.1 sp2 handle the database connections and EJB's while having
 Tomcat 4.0.2 serve up the servlets and jsps.
 Has anyone gotten this configuration to work successfully? If so could you
 please post instructions on how you did it.
 Any help is greatly appreciated,
 Thanks in advance...
 Stephen Earl

 --
 To unsubscribe:   mailto:[EMAIL PROTECTED]
 For additional commands: mailto:[EMAIL PROTECTED]
 Troubles with the list: mailto:[EMAIL PROTECTED]


--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Re: Tomcat + Weblogic 6.1 sp2 + Petstore

2002-02-13 Thread David Cassidy

I take it it's one of those the company has got weblogic 

I think you'll need to include the weblogic jars so that you can do a
lookup

Have a look on how to get a hold of the weblogic jndi connector ...

hope it helps

D

Steve Earl wrote:

 Yep... I know about the Tomcat  JBoss stuff.  What I'm really having
 problems with is the Tomcat  Weblogic stuff.

 Steve...

 -Original Message-
 From: David Cassidy [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, February 13, 2002 10:24 AM
 To: Tomcat Users List
 Subject: Re: Tomcat + Weblogic 6.1 sp2 + Petstore

 They use the petStore as a example for getting JBoss and TC to talk together
 

 jboss.org ...

 David

 Steve Earl wrote:

  Hi,
  I've been pounding my head against the wall for a couple of days now
 trying
  to configure the pet store application. What I need / want to do is have
  Weblogic 6.1 sp2 handle the database connections and EJB's while having
  Tomcat 4.0.2 serve up the servlets and jsps.
  Has anyone gotten this configuration to work successfully? If so could you
  please post instructions on how you did it.
  Any help is greatly appreciated,
  Thanks in advance...
  Stephen Earl
 
  --
  To unsubscribe:   mailto:[EMAIL PROTECTED]
  For additional commands: mailto:[EMAIL PROTECTED]
  Troubles with the list: mailto:[EMAIL PROTECTED]

 --
 To unsubscribe:   mailto:[EMAIL PROTECTED]
 For additional commands: mailto:[EMAIL PROTECTED]
 Troubles with the list: mailto:[EMAIL PROTECTED]

 --
 To unsubscribe:   mailto:[EMAIL PROTECTED]
 For additional commands: mailto:[EMAIL PROTECTED]
 Troubles with the list: mailto:[EMAIL PROTECTED]


--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Re: Propgating setting to a rack of machines using tomcat

2002-02-12 Thread David Cassidy

Have a look at rsync ?
You can tunnel rsync over ssh so it can be quite secure.

You would then need some script that would restart TC
etc etc

Hope this helps

D


Donie Kelly wrote:

 Hi all

 We have a rack of sun servers and we have run into a small problem with
 configuration. All the machine will have the same settings (more or less)
 and these settings are currently read from a file which is distributed in
 the WAR.

 If we need to change settings we need to update the settings file on each
 machine, which is becoming a pain. There is a load balancer controlling the
 load on the rack so we have little control over which machine is chosen when
 we submit a request.

 My question is: How do we replicate the settings throughout the rack after
 modifying one machine in the rack?

 I appreciate your time...
 Donie

 --
 To unsubscribe:   mailto:[EMAIL PROTECTED]
 For additional commands: mailto:[EMAIL PROTECTED]
 Troubles with the list: mailto:[EMAIL PROTECTED]


--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Re: How can I customize the apache 404

2002-02-06 Thread David Cassidy

of course you could make your 404 page a jsp page
then you could do a search of your site for the object that they were
really after ...

;0

D

Liam Holohan wrote:

 Clay Mitchell wrote:

  http://builder.cnet.com/webbuilding/pages/Servers/Apache/ss02d.html
 
  -Original Message-
  From: Galbayar [mailto:[EMAIL PROTECTED]]
  Sent: Tuesday, February 05, 2002 11:19 PM
  To: Tomcat Users List
  Subject: How can I customize the apache 404
 
 
 
  How can I customize the apache 404
 
 
 
  --
  To unsubscribe:   mailto:[EMAIL PROTECTED]
  For additional commands: mailto:[EMAIL PROTECTED]
  Troubles with the list: mailto:[EMAIL PROTECTED]
 
 Not a difficult problem ...

 In apache httpd.conf you can use the ErrorDocument directive

 I have a number of virtual hosts in a conf file linking off my main
 httpd.conf...

 i.e

 the last line in httpd.conf is ...
 Include /home/wasp/modules/apache/1.3.22/conf/vhosts.conf
 (this keeps httpd.conf clean and adding a new virtual host means
 ammending vhosts.conf not the main server configuration...

 the entry for a virtual host (e.g www.test.com) in vhosts.conf is ...

 VirtualHost 10.20.32.13
  ServerAdmin [EMAIL PROTECTED]
  DocumentRoot /home/wasp/vhosts/www.test.com/htdocs
  ServerName www.test.com
  TransferLog /home/wasp/vhosts/www.test.com/logs/www.test.com-xferlog
  ErrorLog /home/wasp/vhosts/www.test.com/logs/www.test.com-errorlog

 # these lines are for linking tomcat to apache for serving jsp pages
  WebAppConnection www.test.com.warpConnection-8009 warp 10.20.32.13:8009
  WebAppDeploy app-example www.test.com.warpConnection-8009 /app-example

 # this is what you have to do for custom error pages etc..
  ErrorDocument 500 /errors/500.html
  ErrorDocument 404 /errors/404.html
  ErrorDocument 401 /errors/401.html
  ErrorDocument 403 /errors/403.html
 /VirtualHost

 in /home/wasp/vhosts/www.test.com/htdocs create a directory called
 errors and put your custom html files in there and call them 404.html
 500.html etc...  bounce the server and type in a url for the site that
 you know will generate a 404

 hope this helps ...
 Liam :-)

 --
 To unsubscribe:   mailto:[EMAIL PROTECTED]
 For additional commands: mailto:[EMAIL PROTECTED]
 Troubles with the list: mailto:[EMAIL PROTECTED]


--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Re: Get Document.Url

2002-02-06 Thread David Cassidy

wouldn't that come across as the basic auth username ?

getRemoteUser()

;-}

D

Odo wrote:

 I know.
 ...Actually I wanted to process URLs with '@' in Servlet
 ex: http:[EMAIL PROTECTED]

 

 Galbayar wrote:

  JavaScript is Server Side
  Servlet is Server Side use getRequestURI()
 
 
  - Original Message -
  From: Odo [EMAIL PROTECTED]
  To: Tomcat Users List [EMAIL PROTECTED]
  Sent: Wednesday, February 06, 2002 18:28
  Subject: Get Document.Url
 
 
 
 How can I get in my servlet Javascript's document.URL variable?
 How it be scripted in servlet?
 
 
 
 
 --
 To unsubscribe:   mailto:[EMAIL PROTECTED]
 For additional commands: mailto:[EMAIL PROTECTED]
 Troubles with the list: mailto:[EMAIL PROTECTED]
 
 
 
 
 
 
  --
  To unsubscribe:   mailto:[EMAIL PROTECTED]
  For additional commands: mailto:[EMAIL PROTECTED]
  Troubles with the list: mailto:[EMAIL PROTECTED]
 
 
 

 --
 To unsubscribe:   mailto:[EMAIL PROTECTED]
 For additional commands: mailto:[EMAIL PROTECTED]
 Troubles with the list: mailto:[EMAIL PROTECTED]


--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Re: 64k limit on POST variables?

2002-01-30 Thread David Cassidy

64k ???

are you uploading files ?

D

Kirby Vandivort wrote:

 I have some forms set up that can accept a rather large amount of
 data, and I'm finding that my data is getting truncated after 64k.

 What is causing this limitation?  I can't find anything on the web
 about POST variables being limited by the SPEC.  Is this a tomcat
 thing?  and is there any way that it can be changed?

 Thanks!

 --

 Kirby Vandivort  Theoretical Biophysics Group
 Email: [EMAIL PROTECTED]  3051 Beckman Institute
 http://www.ks.uiuc.edu/~kvandivo/University of Illinois
 Phone: (217) 244-5711405 N. Mathews Ave
 Fax  : (217) 244-6078Urbana, IL  61801, USA

 --
 To unsubscribe:   mailto:[EMAIL PROTECTED]
 For additional commands: mailto:[EMAIL PROTECTED]
 Troubles with the list: mailto:[EMAIL PROTECTED]


--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Re: cached jsp pages when no cache specified still there after page is gone

2002-01-30 Thread David Cassidy

Do you mean that TC has compiled a jsp page into a .java file, compiled
it into a servlet and left the resulting .class file in your work directory

But you'd rather it recompiled ***each*** time a user accessed the page

Or do you mean that when a users browser accesses the jsp page their
browser gets sent the Cache-Control header and is ignoring it's plea to
not cache the output from the jsp page ?

If the former then you're stuffed. (as to do this would be suicide )

If the latter then you need to add some extra headers like

  h.addHeader(Pragma, No-cache);
  h.addHeader(Cache-Control, no-cache, must-revalidate);
  h.addDateHeader(Expires,  new java.util.Date().getTime() );
  h.addDateHeader(Last-Modified, new java.util.Date().getTime());


:)

D



Joel Rees wrote:

 Hello,

 I dug into the archives and the on-line docs, but couldn't find anything
 that turned a light on 

 I have some jsp pages with

 response.setHeader(Cache-Control, no-Cache);

 specified, yet they have been cached, and remain in the work directory after
 the actual pages have been deleted, and the server has been re-booted
 several times.

 (These are test pages on a test server.)

 Is this normal? Are there some settings I should look for?

 Joel
 Alps Giken Kansai Kaihatsubu
 Suita, Osaka, Japan

 --
 To unsubscribe:   mailto:[EMAIL PROTECTED]
 For additional commands: mailto:[EMAIL PROTECTED]
 Troubles with the list: mailto:[EMAIL PROTECTED]


--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Re: Recall: BLOB FROM JSP PAGE

2002-01-25 Thread David Cassidy

Mehmet,

I think you missed my message :

you could try something like 

%@page contentType=image/gif
%%@page import=java.io.BufferedInputStream,
java.io.ObjectOutputStream,java.io.OutputStream,java.io.File 
%%
OutputStream f = response.getOutputStream();
File logo= new File(tester.gif);
BufferedInputStream bis = new BufferedInputStream (new
FileInputStream(logo));
int a=0;
while ( (a=bis.read()) != -1 )
{
f.write(a);
}
bis.close();
%

obviously this is from a file but essentially it's the same thing.
Just get an input stream from your blob and bingo !

I would suggest that you re-consider serving graphics from a blob.

Many reasons but primarily
- it will knacker your database - performance
- databases wern't designed to store files - filing systems were

But other than that hey have fun !

You must however make sure that there are no spaces / end of line
markers
either above or below the % % markers...

Hope this works for you

David

Mehmet Ugur Kuzu (LinkPlus) wrote:

 thanks at all
 but i read documentation
 i think this component  is about uploading files
 but i want to display binary data such as images from database

 -Original Message-
 From: Kemp Randy-W18971 [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, January 24, 2002 8:19 PM
 To: 'Tomcat Users List'
 Subject: Recall: BLOB FROM JSP PAGE

 Kemp Randy-W18971 would like to recall the message, BLOB FROM JSP
 PAGE.

 --
 To unsubscribe:   mailto:[EMAIL PROTECTED]
 For additional commands: mailto:[EMAIL PROTECTED]
 Troubles with the list: mailto:[EMAIL PROTECTED]


--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Re: BLOB FROM JSP PAGE

2002-01-24 Thread David Cassidy

Of course you could try something like 

%@page contentType=image/gif
%%@page import=java.io.BufferedInputStream,
java.io.ObjectOutputStream,java.io.OutputStream,java.io.File 
%%
OutputStream f = response.getOutputStream();
File logo= new File(tester.gif);
BufferedInputStream bis = new BufferedInputStream (new
FileInputStream(logo));
int a=0;
while ( (a=bis.read()) != -1 )
{
f.write(a);
}
bis.close();
%

obviously this is from a file but essentially it's the same thing.
Just get an input stream from your blob and bingo !

I would suggest that you re-consider serving graphics from a blob.

Many reasons but primarily
- it will knacker your database - performance
- databases wern't designed to store files - filing systems were

But other than that hey have fun !

Hope this works for you

David


David Wall wrote:

  Is there a way to display images from database blob fields within only
 jsp,
  i know that it is impossible because of you can not handle an another
  outputstream
  within jsp.

 Your JSP needs to output an IMG tag with a 'src' that points back to your
 application as another GET that will then return the image of interest.,
 generally from a simple servlet that sets the content-type to image/gif or
 whatever the image format is.

 David

 --
 To unsubscribe:   mailto:[EMAIL PROTECTED]
 For additional commands: mailto:[EMAIL PROTECTED]
 Troubles with the list: mailto:[EMAIL PROTECTED]


--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Re: security issue!

2002-01-24 Thread David Cassidy

there's only one 

turn off your web server and your application server.

It's a request onto your site.
Try getting apache to re-direct it to something else



Henry Lu wrote:

 I need a solution to orevent from its happenning!

 Any ideas?

 Thanks,

  [EMAIL PROTECTED] 01/24/02 12:21PM 
 looks like good old nimda. but it does not affect your tomcat, since it
 only attacks iis on win-systems

  -Original Message-
  From: Henry Lu [mailto:[EMAIL PROTECTED]]
  Sent: Thursday, January 24, 2002 6:16 PM
  To: [EMAIL PROTECTED]
  Subject: security issue!
 
 
  In the CATALINA_HOME/logs/catalina_log.2002-01-24.txt file, there
  are a lot of
  log information like the followings:
 
  2002-01-24 09:29:48 HttpProcessor[80][3]  Invalid request URI:
  '/scripts/..%255c../winnt/system32/cmd.exe'
  2002-01-24 09:29:48 HttpProcessor[80][3]  Invalid request URI:
  '/_vti_bin/..%255c../..%255c../..%255c../winnt/system32/cmd.exe'
  2002-01-24 09:29:48 HttpProcessor[80][3]  Invalid request URI:
  '/_mem_bin/..%255c../..%255c../..%255c../winnt/system32/cmd.exe'
  2002-01-24 09:29:48 HttpProcessor[80][3]  Invalid request URI:
  '/msadc/..%255c../..%255c../..%255c/..%c1%1c../..%c1%1c../..%c1%1c
  ../winnt/system32/cmd.exe'
  2002-01-24 09:29:48 HttpProcessor[80][3]  Invalid request URI:
  '/scripts/..%c0%2f../winnt/system32/cmd.exe'
  2002-01-24 09:29:48 HttpProcessor[80][3]  Invalid request URI:
  '/scripts/..%25%35%63../winnt/system32/cmd.exe'
  2002-01-24 09:29:48 HttpProcessor[80][3]  Invalid request URI:
  '/scripts/..%252f../winnt/system32/cmd.exe'
 
  Are these from the Tomcat 4.o internal?
  Are these from the out side hacker?
  What we can do to prevent from these happen?
  Can we use Valve? How?
 
  Thanks, Henry
 
 
  --
  To unsubscribe:   mailto:[EMAIL PROTECTED]
  For additional commands: mailto:[EMAIL PROTECTED]
  Troubles with the list: mailto:[EMAIL PROTECTED]
 
 

 --
 To unsubscribe:   mailto:[EMAIL PROTECTED]
 For additional commands: mailto:[EMAIL PROTECTED]
 Troubles with the list: mailto:[EMAIL PROTECTED]

 --
 To unsubscribe:   mailto:[EMAIL PROTECTED]
 For additional commands: mailto:[EMAIL PROTECTED]
 Troubles with the list: mailto:[EMAIL PROTECTED]


--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Re: Tomcat 3.2.4, Java 1.3.1, linux, and process usage

2002-01-22 Thread David Cassidy

If your OS has it have a try with pstree
its very illustrative on this ...


Denny Chambers wrote:

 They are not really seperate processes. They are threads off of a
 running process. Linux just shows them as process. Use this command here
 ( ps -faux | grep java )and you can see who is the parent and who is the
 child. As far as the memory usage, all of these threads are sharing this
 14% of memory, so each one is not using that amount seperately.

 Brandon Cruz wrote:
 
  I am using the configuration above, and whenever someone accesses a jsp
  page, it seems that several processes are created.  I am not an expert with
  linux, but it seems that multiple processes are created, which are each
  taking up the exact same amount of memory (around 14%).  Is this normal, and
  does it mean that 3 processes taking 14% are using up 42% of my memory every
  time someone accesses a jsp on my machine?
 
  Thanks in advance for any information!
 
  Brandon
 
  --
  To unsubscribe:   mailto:[EMAIL PROTECTED]
  For additional commands: mailto:[EMAIL PROTECTED]
  Troubles with the list: mailto:[EMAIL PROTECTED]

 --
 Denny Chambers
 Quantum Corporation, Inc.
 Network Attached Storage Division
 Java Linux Engineer
 Phone: 251-478-5730
 Cell: 251-605-3446
 IM: [EMAIL PROTECTED]

 --
 To unsubscribe:   mailto:[EMAIL PROTECTED]
 For additional commands: mailto:[EMAIL PROTECTED]
 Troubles with the list: mailto:[EMAIL PROTECTED]


--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Re: Running Microsoft Stress Tool (WAS) with Tomcat

2002-01-22 Thread David Cassidy

what does the source code of the affected page look like ?

Does this happen with a 'HelloWorld.jsp' type page ?

D

Sanjeev Joshi wrote:

 Hi all,

 On running  this stress tool with Tomcat I get these errors ;

 2002-01-22 22:11:31 - Ctx( /uii-example ): Exception in: R( /uii-example
 + /index.jsp + null) -
  java.lang.IllegalArgumentException: Cookie name Path is a reserved
 token
 at javax.servlet.http.Cookie.init(Cookie.java:185)
 at
 org.apache.tomcat.util.RequestUtil.processCookies(RequestUtil.java:189)
 at
 org.apache.tomcat.core.RequestImpl.getCookieCount(RequestImpl.java:510)
 at
 org.apache.tomcat.session.StandardSessionInterceptor.requestMap(StandardSessionInter

 ceptor.java:145)
 at
 org.apache.tomcat.core.ContextManager.processRequest(ContextManager.java:835)

 at
 org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:786)

 at
 org.apache.tomcat.core.ContextManager.service(ContextManager.java:758)
 at
 org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectio

 nHandler.java:213)
 at
 org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)

 at
 org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:501)

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

 The result in the Stress Tool show as   500 Inrenal Server Error !!!

 Any ideas  what  is the reason ?? Is it a Bug with Tomcat   ( not able
 to handle multiple requests ! )

 -Joshi

 --
 To unsubscribe:   mailto:[EMAIL PROTECTED]
 For additional commands: mailto:[EMAIL PROTECTED]
 Troubles with the list: mailto:[EMAIL PROTECTED]


--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Re: Running Microsoft Stress Tool (WAS) with Tomcat

2002-01-22 Thread David Cassidy

your cookie isn't called 'path' by any chance ?

  Cookie name Path is a reserved token



Sanjeev Joshi wrote:

 There is no problem with the code .  Using the Browser  the pages are rendered 
without any
 problem. Also the Same   web-app when deployed with Jrun  and WAS is run on that 
works
 just fine 

 -Joshi

 David Cassidy wrote:

  what does the source code of the affected page look like ?
 
  Does this happen with a 'HelloWorld.jsp' type page ?
 
  D
 
  Sanjeev Joshi wrote:
 
   Hi all,
  
   On running  this stress tool with Tomcat I get these errors ;
  
   2002-01-22 22:11:31 - Ctx( /uii-example ): Exception in: R( /uii-example
   + /index.jsp + null) -
java.lang.IllegalArgumentException: Cookie name Path is a reserved
   token
   at javax.servlet.http.Cookie.init(Cookie.java:185)
   at
   org.apache.tomcat.util.RequestUtil.processCookies(RequestUtil.java:189)
   at
   org.apache.tomcat.core.RequestImpl.getCookieCount(RequestImpl.java:510)
   at
   
org.apache.tomcat.session.StandardSessionInterceptor.requestMap(StandardSessionInter
  
   ceptor.java:145)
   at
   org.apache.tomcat.core.ContextManager.processRequest(ContextManager.java:835)
  
   at
   org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:786)
  
   at
   org.apache.tomcat.core.ContextManager.service(ContextManager.java:758)
   at
   
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectio
  
   nHandler.java:213)
   at
   org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
  
   at
   org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:501)
  
   at java.lang.Thread.run(Thread.java:484)
  
   The result in the Stress Tool show as   500 Inrenal Server Error !!!
  
   Any ideas  what  is the reason ?? Is it a Bug with Tomcat   ( not able
   to handle multiple requests ! )
  
   -Joshi
  
   --
   To unsubscribe:   mailto:[EMAIL PROTECTED]
   For additional commands: mailto:[EMAIL PROTECTED]
   Troubles with the list: mailto:[EMAIL PROTECTED]
 
  --
  To unsubscribe:   mailto:[EMAIL PROTECTED]
  For additional commands: mailto:[EMAIL PROTECTED]
  Troubles with the list: mailto:[EMAIL PROTECTED]

 --
 To unsubscribe:   mailto:[EMAIL PROTECTED]
 For additional commands: mailto:[EMAIL PROTECTED]
 Troubles with the list: mailto:[EMAIL PROTECTED]


--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Re: servlet/jsp executing twice at the same moment

2002-01-04 Thread David Cassidy

Robin,

Have you put explorer through a proxy so that you can see if it is doing
2 requests ?

Could (unix / mozilla users here so I dunno) explorer be doing a
HEAD request and then immediately a GET request ?

Could you get the JSP page to dump out the request method ?

D

Robin Lee wrote:

 So, by the lack of response, I can assume no one has figured out how to
 solve this problem?I know there were a few others who had dealt with
 this problem, but no solution...  I hope someone can here can try and help
 out with this.

 Thanks to anyone who responds...
 - Original Message -
 From: Robin Lee [EMAIL PROTECTED]
 To: Tomcat Users List [EMAIL PROTECTED]
 Sent: Thursday, January 03, 2002 9:37 AM
 Subject: Re: servlet/jsp executing twice at the same moment

  Is it just JSP's or Servlets too?  My problem is just servlets (although i
  have yet to see any jsp's run twice)...
 
  I'm still looking on solutions myself, but none so far.  Anyone?
 
  I have noticed though, if i tried it in Netscape (6+), it is ok.  Also
 tried
  it on the server computer (localhost), and it doesn't do it there either.
 I
  figured it might be IE5.5, and it may have to do with the computer speed?
  (On the server, i used IE5.5 as well)...
  - Original Message -
  From: [EMAIL PROTECTED]
  To: Tomcat Users List [EMAIL PROTECTED]
  Sent: Thursday, January 03, 2002 9:18 AM
  Subject: RE: servlet/jsp executing twice at the same moment
 
 
  
   It is not that my code continues to run, but that the ENTIRE jsp runs
   twice.  Spent 3 hours last night on this and still could not find a
   resolve.  I'm not sure if it is a bug or some configuration problem.
 Some
   jsp's run once and some run twice.  Fortunately for debugging purposes,
  the
   same ones run once and the same ones run twice.  If anyone has any
   suggestions or experienced the same behavior, please advise on
 solutions.
  
   I've not noticed that you need to place an explicit return after the
   forward, but I'll make a mental note.
  
   Thanks,
   kb
  
  
  
   Cox,
   Charlie To: Tomcat Users List
  [EMAIL PROTECTED]
   ccox@cincom.cc:
   com Subject: RE: Servlet
 running
  twice at the same moment.
  
 
   01/03/02
   04:54 AM
   Please
   respond to
   Tomcat Users
   List
  
  
  
  
  
   did you put a
return;
   after your forward? If not the jsp will continue running...
  
   Charlie
  
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 02, 2002 2:30 PM
To: Tomcat Users List
Subject: Re: Servlet running twice at the same moment.
   
   
   
Glad someone brought this up.  Seems as though some of my jsp
pages are
being executed twice.  It doesn't seem to send information to
the browser
twice, but it is causing havoc on my logic.  I can see
System.outs being
executed twice and any logic / methods are being executed
twice.  In my
case it seems as though the jsp:forward is in some way causing the
behavior.
   
If anyone else has run across this situation, I would
definitely like to
know what is going on and how to resolve this issue.
   
I'm also using IE 5.x, tomcat 3.2.x and linux.  If code is
needed, I'll
have to send tomorrow.
   
Thanks in advance
   
kb
   
   
   
   
   
Robin Lee
   
tech_supportTo: Tomcat Users
List [EMAIL PROTECTED]
@uls.comcc:
   
 Subject: Re:
Servlet running twice at the same moment.
01/02/02
   
11:12 AM
   
Please
   
respond to
   
Tomcat Users
   
List
   
   
   
   
   
   
   
   
Well, that depends on which code you would like to see?  The
login code is
pretty basic...
   
Here's is my validateLoginServlet...
I am using a type4 jdbc driver (thinweb.tds driver).
   
import Common.dbfiles.*;
   
import java.io.*;
import java.util.*;
import java.sql.*;
import javax.servlet.*;
import javax.servlet.http.*;
   
public class ValidateLoginServlet extends HttpServlet
{
 public void service(HttpServletRequest req, HttpServletResponse res)
throws IOException
 {
  String errorCode = ;
   
  try
  {
   // get a connection
   Class c = Class.forName(com.thinweb.tds.Driver);
   Connection dbConn =
DriverManager.getConnection(jdbc:twtds:sqlserver://[removed];user
=[removed]
;password=[removed];TDS=7.0);
   // 

Re: How to logout

2002-01-02 Thread David Cassidy

the remote user is http protocol specific.
It does not use anything in the users session.

If you want to log out a user who has used basic auth you need
to send them a page with a status of not authorised.
The browser will then get the message that the user is
'logged out'

Hope this helps !

Of course basic auth isn't very secure as the users username/password
gets passed in the clear on every transfer...

D



[EMAIL PROTECTED] wrote:

 Hi!

 I have understood that logging out the current user should be done by
 calling

  session.invalidate()

 .. however, this does not seem to work: the session is emptied, but for
 instance request.getRemoteUser() will still return the same user as
 before invalidation..

 Is this a Tomcat bug or have I misunderstood something here?

 I'm using Tomcat 4.0.1 and HTTP basic authenticationg without SSL.

 Thanks in advance.

 -juha-

 --
 To unsubscribe:   mailto:[EMAIL PROTECTED]
 For additional commands: mailto:[EMAIL PROTECTED]
 Troubles with the list: mailto:[EMAIL PROTECTED]


--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Re: somebody trying hack me, what they really wanted?

2001-12-13 Thread David Cassidy

NIMDA
 ...

Just put a file there for it to get ;-)

D


Evgeniy Strokin wrote:

 Hi,
 tonight, somebody had tried hack our Tomcat 3.2.3 in win2000.
 Here is the log:

 2001-12-13 01:18:35 - Ctx(  ): 404 R(  + /scripts/root.exe + null) null
 2001-12-13 01:18:36 - Ctx(  ): 404 R(  + /MSADC/root.exe + null) null
 2001-12-13 01:18:42 - Ctx(  ): 404 R(  + /c/winnt/system32/cmd.exe + null)
 null
 2001-12-13 01:18:46 - Ctx(  ): 404 R(  + /d/winnt/system32/cmd.exe + null)
 null
 2001-12-13 01:18:47 - Ctx(  ): 404 R(
 /scripts/..%255c../winnt/system32/cmd.exe)
  null
 2001-12-13 01:18:50 - Ctx(  ): 404 R(
 /_vti_bin/..%255c../..%255c../..%255c../wi
 nnt/system32/cmd.exe) null
 2001-12-13 01:18:51 - Ctx(  ): 404 R(
 /_mem_bin/..%255c../..%255c../..%255c../wi
 nnt/system32/cmd.exe) null
 2001-12-13 01:19:00 - Ctx(  ): 404 R(
 /msadc/..%255c../..%255c../..%255c/..%c1%1
 c../..%c1%1c../..%c1%1c../winnt/system32/cmd.exe) null
 2001-12-13 01:19:00 - Ctx(  ): 404 R(  +
 /scripts/..??../winnt/system32/cmd.exe
 + null) null
 2001-12-13 01:19:01 - Ctx(  ): 404 R(
 /scripts/..%c0%2f../winnt/system32/cmd.exe
 ) null
 2001-12-13 01:19:31 - ContextManager: SocketException reading request,
 ignored -
  java.net.SocketException: Connection reset by peer: JVM_recv in socket
 input st
 ream read
 at java.net.SocketInputStream.socketRead(Native Method)
 at java.net.SocketInputStream.read(Unknown Source)
 at java.io.BufferedInputStream.fill(Unknown Source)
 at java.io.BufferedInputStream.read(Unknown Source)
 at
 org.apache.tomcat.service.http.HttpRequestAdapter.doRead(HttpRequestA
 dapter.java:115)
 at
 org.apache.tomcat.core.BufferedServletInputStream.doRead(BufferedServ
 letInputStream.java:106)
 at
 org.apache.tomcat.core.BufferedServletInputStream.read(BufferedServle
 tInputStream.java:128)
 at
 javax.servlet.ServletInputStream.readLine(ServletInputStream.java:138
 )
 at
 org.apache.tomcat.service.http.HttpRequestAdapter.readNextRequest(Htt
 pRequestAdapter.java:129)
 at
 org.apache.tomcat.service.http.HttpConnectionHandler.processConnectio
 n(HttpConnectionHandler.java:198)
 at
 org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:
 416)
 at
 org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java
 :501)
 at java.lang.Thread.run(Unknown Source)

 2001-12-13 01:50:41 - Ctx(  ): 404 R(  + /scripts/root.exe + null) null
 2001-12-13 01:50:41 - Ctx(  ): 404 R(  + /MSADC/root.exe + null) null
 2001-12-13 01:51:09 - ContextManager: SocketException reading request,
 ignored -
  java.net.SocketException: Connection reset by peer: JVM_recv in socket
 input st
 ream read
 at java.net.SocketInputStream.socketRead(Native Method)
 at java.net.SocketInputStream.read(Unknown Source)
 at java.io.BufferedInputStream.fill(Unknown Source)
 at java.io.BufferedInputStream.read(Unknown Source)
 at
 org.apache.tomcat.service.http.HttpRequestAdapter.doRead(HttpRequestA
 dapter.java:115)
 at
 org.apache.tomcat.core.BufferedServletInputStream.doRead(BufferedServ
 letInputStream.java:106)
 at
 org.apache.tomcat.core.BufferedServletInputStream.read(BufferedServle
 tInputStream.java:128)
 at
 javax.servlet.ServletInputStream.readLine(ServletInputStream.java:138
 )
 at
 org.apache.tomcat.service.http.HttpRequestAdapter.readNextRequest(Htt
 pRequestAdapter.java:129)
 at
 org.apache.tomcat.service.http.HttpConnectionHandler.processConnectio
 n(HttpConnectionHandler.java:198)
 at
 org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:
 416)
 at
 org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java
 :501)
 at java.lang.Thread.run(Unknown Source)

 2001-12-13 06:08:24 - Ctx(  ): 404 R(  + /scripts/root.exe + null) null
 2001-12-13 06:08:24 - Ctx(  ): 404 R(  + /MSADC/root.exe + null) null
 2001-12-13 06:08:25 - Ctx(  ): 404 R(  + /c/winnt/system32/cmd.exe + null)
 null
 2001-12-13 06:08:25 - Ctx(  ): 404 R(  + /d/winnt/system32/cmd.exe + null)
 null
 2001-12-13 06:08:25 - Ctx(  ): 404 R(
 /scripts/..%255c../winnt/system32/cmd.exe)
  null
 2001-12-13 06:08:25 - Ctx(  ): 404 R(
 /_vti_bin/..%255c../..%255c../..%255c../wi
 nnt/system32/cmd.exe) null
 2001-12-13 06:08:26 - Ctx(  ): 404 R(
 /_mem_bin/..%255c../..%255c../..%255c../wi
 nnt/system32/cmd.exe) null
 2001-12-13 06:08:26 - Ctx(  ): 404 R(
 /msadc/..%255c../..%255c../..%255c/..%c1%1
 c../..%c1%1c../..%c1%1c../winnt/system32/cmd.exe) null
 2001-12-13 06:08:26 - Ctx(  ): 404 R(  +
 /scripts/..??../winnt/system32/cmd.exe
 + null) null
 2001-12-13 06:08:26 - Ctx(  ): 404 R(
 /scripts/..%c0%2f../winnt/system32/cmd.exe
 ) null
 2001-12-13 06:08:26 - Ctx(  ): 404 R(  +
 /scripts/..?»../winnt/system32/cmd.exe
 + null) null
 2001-12-13 06:08:27 - Ctx(  ): 404 R(  +
 /scripts/..??../winnt/system32/cmd.exe
 + null) null
 2001-12-13 06:08:27 - 

Re: request.getParameter problem

2001-12-04 Thread David Cassidy

Or you could try

if ( yes.equals(request.getParameter(modify) ) )
{
 out.write(modify listings);
 }

it gets around modify being null and lovely exceptions ...

:)

David


Cato, Christopher wrote:

 You should put it like this

 if (request.getParameter(modify) != NULL)
 {
 if (request.getParameter(modify).equals(yes) {
  your action here 
 } else {
  your action here 
 }
 } else {
  your action if the parameter is empty here 
 }

 Otherwise you can end up with a NullPointerException from reading a NULL
 parameter.

 /Christopher

  -Original Message-
  From: Rama [mailto:[EMAIL PROTECTED]]
  Sent: den 4 december 2001 11:17
  To: [EMAIL PROTECTED]
  Subject: request.getParameter problem
 
 
  Hi,
 
  it seems that request.getParameter does not always successful in POST
  method.
  is there any way to make it 100% successful?
 
  i'm using tomcat 4.01.
 
  if (request.getParameter(modify).equals(yes)) {
  out.write(modify listings);
  }
 
 
  Rama
 
 
  _
  Do You Yahoo!?
  Get your free @yahoo.com address at http://mail.yahoo.com
 
 
  --
  To unsubscribe:   mailto:[EMAIL PROTECTED]
  For additional commands: mailto:[EMAIL PROTECTED]
  Troubles with the list: mailto:[EMAIL PROTECTED]
 

 --
 To unsubscribe:   mailto:[EMAIL PROTECTED]
 For additional commands: mailto:[EMAIL PROTECTED]
 Troubles with the list: mailto:[EMAIL PROTECTED]


--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Re: How to prevent access to the content of a folder?

2001-12-04 Thread David Cassidy


you might want to look at obj.conf

Service method=(GET|HEAD) type=magnus-internal/directory fn=index-common

I guess that that makes a directory listing.
What happens if it isn't there I don't know 

David

Justin Rowles wrote:

  If I direct the browser to http://localhost:8080/app1/images
  I'll have access to the contents of this directory.
  Is there a way to prevent this from happenning?

 Include an absolute path reference and file in the default page list:

 default.htm index.htm /other_stuff/sod_off.htm

 This means that in the absence of a specified file, the server will look for
 default.htm, then index.htm, then will go to /other_stuff/ and show the file
 sod_off.htm which should say something like We don't allow directory
 listings here.

 Justin.
 --
 You're only jealous cos the little penguins are talking to me.

 ***
 For more information on Ordnance Survey products and services,
 visit our web site at http://www.ordnancesurvey.co.uk
 ***

 --
 To unsubscribe:   mailto:[EMAIL PROTECTED]
 For additional commands: mailto:[EMAIL PROTECTED]
 Troubles with the list: mailto:[EMAIL PROTECTED]


--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Re: Access from the web instead of localhost

2001-11-28 Thread David Cassidy

As long as your machine is listening on
0.0.0.0 rather than 127.0.0.1

..

If you are using unix use netstat -an | grep LISTEN to check

David

Barry L. White wrote:

 Yes you can.

 - Original Message -
 From: Scott and Michele Young [EMAIL PROTECTED]
 To: Tomcat Users List [EMAIL PROTECTED]
 Sent: Wednesday, November 28, 2001 7:46 AM
 Subject: Access from the web instead of localhost

  if my ip is 12.34.567.890 and my localhost path to my servlet is:
  http://localhost:8080/index.html
 
  Can I simply type :http://12.34.567.890:8080/index.html to access my
 servlet
  from the internet (a remote location)?
 
  Thanks/
 
 
  --
  To unsubscribe:   mailto:[EMAIL PROTECTED]
  For additional commands: mailto:[EMAIL PROTECTED]
  Troubles with the list: mailto:[EMAIL PROTECTED]
 

 --
 To unsubscribe:   mailto:[EMAIL PROTECTED]
 For additional commands: mailto:[EMAIL PROTECTED]
 Troubles with the list: mailto:[EMAIL PROTECTED]


--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Re: Configuring tomcat to serve static content

2001-11-26 Thread David Cassidy

Check that tomcat has the correct mime type for your .doc files

have a look in web.xml.

then add one for excel / word :)



Aditya Sharma wrote:

 Hi,

 We have an installation of Tomcat 3.3 on Windows 2000, and are using Tomcat to serve 
our static content (as a web-server).

 I have issues with serving binary documents (word and excel files).  The files are 
viewed correctly (by the respective plug-ins) in Internet Explorer, but Netscape 
displays garbled information in the browser.  I use the standard a 
href=../docs/name_of_file.doc File /a html comand to provide a link to the file.

 I am curious to find out what do I need to do to resolve this issue.

 Should I use Apache as the web-server, instead of Tomcat?

 Thanks in advance,

 Cheers,
 Aditya Sharma

 [EMAIL PROTECTED]

 --
 To unsubscribe:   mailto:[EMAIL PROTECTED]
 For additional commands: mailto:[EMAIL PROTECTED]
 Troubles with the list: mailto:[EMAIL PROTECTED]


--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Re: tomcat 4.0.1 under Apache 2 betas

2001-11-23 Thread David Cassidy

If you find out I would love to know...

Thanks

David


Ed Nixon wrote:

 Is it possible yet to run Tomcat 4 under Apache 2 betas? If so, could you
 please point me at some info on configuration. I'm not having much success
 with anything I've found that relates to Apache 1.2 and Tomcat 4.

 Alternately, if I'm wasting my time, that would be useful information too.

 Thanks a lot for your help.  ...edN

 --
 To unsubscribe:   mailto:[EMAIL PROTECTED]
 For additional commands: mailto:[EMAIL PROTECTED]
 Troubles with the list: mailto:[EMAIL PROTECTED]


--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Re: Is Tomcat 4.0.1 taglib integration buggy?

2001-11-16 Thread David Cassidy

try

return EVAL_BODY_TAG

...

Why not just do

%=  response.encodeURL( /page/you/want/to/go/to.jsp ) %



David




Thomas Rickal, IOP Unternehmensberatung GmbH wrote:



 Hi again,

 i' am trying to upgrade from Tomcat 3.2.3/ Apache 1.3.19 to Tomcat
 4.0.1/ Apache 1.3.19 on Linux.

 All the urls in the jsps of my application are rewritten by a
 UrlTag. The UrlTag Class takes the url between the tags and rewrites
 it if necessary.

 It works with Tomcat 4.0.1 if the url is placed in the jsp file
 statically. It works not if the url is get by using the get-method
 of a bean.

 In Tomcat 3.2.3 it worked fine in both cases. Maybe this is a Tomcat
 4.0.1 bug? Who can help?

 Thomas

 Example:

 ### example.jsp ###

 A href=myLib:url%= myBean.getURL() %/myLib:urltext/A

 ### output Tomcat 3.2.3 (right) ###

 A href=http://localhost/target.jsp;text/A

 ### output Tomcat 4.0.1 (wrong) ###

 A href=%= myBean.getURL() %text/A

 ### example.tld ###

 tag
   nameurl/name
   tagclassde.iop.webrun.shared.taglib.UrlTag/tagclass
   bodycontenttagdependent/bodycontent
   inforewrite url/info
 /tag

 ### UrlTag-Code ###

 import javax.servlet.http.HttpServletResponse;
 import javax.servlet.jsp.tagext.*;
 import javax.servlet.jsp.*;
 import java.io.IOException;

 public class UrlTag extends BodyTagSupport
 {
   public int doAfterBody() throws JspException
   {
 BodyContent bodyContent = getBodyContent();
 String baseURL  = bodyContent.getString();
 bodyContent.clearBody();
 try
 {
   HttpServletResponse response = (HttpServletResponse)
 pageContext.getResponse();
   String encodedURL = response.encodeURL(baseURL);
   this.getPreviousOut().print(encodedURL);
 }
 catch(IOException e)
 {
   throw new JspTagException(I/O exception  + e.getMessage());
 }
 return SKIP_BODY;
   }
 }


 --
 To unsubscribe:   mailto:[EMAIL PROTECTED]
 For additional commands: mailto:[EMAIL PROTECTED]
 Troubles with the list: mailto:[EMAIL PROTECTED]


--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Re: Benchmark

2001-11-15 Thread David Cassidy

Try

http://webperformanceinc.com

We've used it here and its really rather good.

You 'train' it by setting your browser to use it as a
proxy and then go through the bits of the site you want
to test. You login and it records the data you sent
Then you can get it to give your site alot of pain.
it will simulate alot of users doing standard user
type activity or you can get it just to blast your
site...

hope it helps

David


Laurent Michenaud wrote:



 Hi,

 I would like to bench my web server( apache/tomcat )
 What's the best ?

 I would like to indicate a list of urls( with somes params in it )
 and that it takes care of sessions.

 Michenaud Laurent
 - Adeuza -
 [ Développeur Web - Administrateur Réseau ]

 --
 To unsubscribe:   mailto:[EMAIL PROTECTED]
 For additional commands: mailto:[EMAIL PROTECTED]
 Troubles with the list: mailto:[EMAIL PROTECTED]


--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Re: non-serializable objects in sessions

2001-11-13 Thread David Cassidy

Make sure that when the user leaves that area of the site
you remove the result objects from the users session.

Otherwise your memory consumption could go up
rather quickly !!!

Marko Asplund wrote:

 thanks for pointing out the database resource consumption problem!

 i'll probably define an upper limit for result rows shown to the user
 in
 my application. then i'll use one query to get all the object ids of
 the
 result objects, store them (instead of the ResultSet) in the user's
 session. then the object data can be fetched from the database
 page-by-page as the user browses through the list of result objects.

 best regards,
 --
 aspa


 --
 To unsubscribe:   mailto:[EMAIL PROTECTED]
 For additional commands: mailto:[EMAIL PROTECTED]
 Troubles with the list: mailto:[EMAIL PROTECTED]


--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Re: Does Tomcat-3.2.3 supports Distributed Sessions ?

2001-10-02 Thread David Cassidy

when you get one let me know !

Thanks

David


Lomesh Contractor wrote:



 Hi,

 I am in need of distributed session. I am using tomcat 3.2.3,
 but in its
 document, I could not find out about its support for distributed
 sessions.

 Does anybody knows, whether Tomcat-3.2.3 supports Distributed
 sessions
 across multiple web servers and Tomcat integration on each web server
 ?

 Waiting for kind reply...

 Lomesh.




Re: AW: Does Tomcat-3.2.3 supports Distributed Sessions ?

2001-10-02 Thread David Cassidy

Umm situation where you would want them

in a multi server situation.

where you want to assure your boss that no he won't loose
customers and their money.

If you look at things like dynamo and weblogic they
provide ( I know more about dynamo than weblogic)
a comple fail over protected etc etc sessions.
(distributed too)



Ralph Einfeldt wrote:



 Just out of interest: what is the reason for this requirement?

 I can hardly imagine a case where the benefit of distributed
 sessions justifies the amount of work to implement them (and
 the amount of problems you will have if you got them)

 Be carefull what you desire, you might get it.

  -Ursprüngliche Nachricht-
  Von: Lomesh Contractor [mailto:[EMAIL PROTECTED]]
  Gesendet: Dienstag, 2. Oktober 2001 10:48
  An: Tomcat-User
  Betreff: Does Tomcat-3.2.3 supports Distributed Sessions ?
 
 
  Hi,
 
I am in need of distributed session. I am using tomcat
  3.2.3, but in its
  document, I could not find out about its support for
  distributed sessions.
 
Does anybody knows, whether Tomcat-3.2.3 supports
  Distributed sessions
  across multiple web servers and Tomcat integration on each
  web server ?
 
Waiting for kind reply...
 
  Lomesh.
 
 
 




Re: Loadbalancing with mod_jk and stickiness ?

2001-09-21 Thread David Cassidy

lets see your worker.properties file ;-)

David

Hans-Erik Skyttberg wrote:
 
 Hi!
 
 We just encontered a problem, when a session is started on one tomcat
 and then through a load balancer it ends up on the another webserver
 that webserver dosen't direct the session to correct tomcat ?
 
 Is this a bug or isn't mod_jk supposed to work that way ?
 
 This is working with mod_jserv...
 
 JkMount /*.jsp p
 
 JkMount /html/admin/* ba
 
 If the client requests /html/admin/login.jsp will this request be sent
 to worker p or worker ba ?
 
 Regards!
 Hans - Erik Skyttberg
 Boxer TV Access AB
 Tegluddsv. 64
 115 28 Stockholm
 +46 (0)8 587 899 64
 +46 (0)733 35 70 64
 
 -Ursprungligt meddelande-
 Från: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED]]
 Skickat: den 21 september 2001 09:12
 Till: Hans-Erik Skyttberg
 Ämne: WELCOME to [EMAIL PROTECTED]
 
 Hi! This is the ezmlm program. I'm managing the
 [EMAIL PROTECTED] mailing list.
 
 I'm working for my owner, who can be reached
 at [EMAIL PROTECTED]
 
 Acknowledgment: I have added the address
 
[EMAIL PROTECTED]
 
 to the tomcat-user mailing list.
 
 Welcome to [EMAIL PROTECTED]!
 
 Please save this message so that you know the address you are
 subscribed under, in case you later want to unsubscribe or change your
 subscription address.
 
 --- Administrative commands for the tomcat-user list ---
 
 I can handle administrative requests automatically. Please
 do not send them to the list address! Instead, send
 your message to the correct command address:
 
 To subscribe to the list, send a message to:
[EMAIL PROTECTED]
 
 To remove your address from the list, send a message to:
[EMAIL PROTECTED]
 
 Send mail to the following for info and FAQ for this list:
[EMAIL PROTECTED]
[EMAIL PROTECTED]
 
 Similar addresses exist for the digest list:
[EMAIL PROTECTED]
[EMAIL PROTECTED]
 
 To get messages 123 through 145 (a maximum of 100 per request), mail:
[EMAIL PROTECTED]
 
 To get an index with subject and author for messages 123-456 , mail:
[EMAIL PROTECTED]
 
 They are always returned as sets of 100, max 2000 per request,
 so you'll actually get 100-499.
 
 To receive all messages with the same subject as message 12345,
 send an empty message to:
[EMAIL PROTECTED]
 
 The messages do not really need to be empty, but I will ignore
 their content. Only the ADDRESS you send to is important.
 
 You can start a subscription for an alternate address,
 for example [EMAIL PROTECTED], just add a hyphen and your
 address (with '=' instead of '@') after the command word:
 [EMAIL PROTECTED]
 
 To stop subscription for this address, mail:
 [EMAIL PROTECTED]
 
 In both cases, I'll send a confirmation message to that address. When
 you receive it, simply reply to it to complete your subscription.
 
 If despite following these instructions, you do not get the
 desired results, please contact my owner at
 [EMAIL PROTECTED] Please be patient, my owner is a
 lot slower than I am ;-)
 
 --- Enclosed is a copy of the request I received.
 
 Return-Path: [EMAIL PROTECTED]
 Received: (qmail 11788 invoked from network); 21 Sep 2001 07:11:57 -
 Received: from unknown (HELO boxer-exch.ad.boxer.se) (195.163.10.171)
   by daedalus.apache.org with SMTP; 21 Sep 2001 07:11:57 -
 content-class: urn:content-classes:message
 MIME-Version: 1.0
 Content-Type: text/plain;
 charset=iso-8859-1
 Subject:
 Content-Transfer-Encoding: quoted-printable
 X-MimeOLE: Produced By Microsoft Exchange V6.0.4417.0
 Date: Fri, 21 Sep 2001 09:13:14 +0200
 Message-ID:
 [EMAIL PROTECTED]
 X-MS-Has-Attach:
 X-MS-TNEF-Correlator:
 Thread-Topic: confirm subscribe to [EMAIL PROTECTED]
 Thread-Index: AcFCbJSivjfi/3mIRViPUvx7Efj+nwAAA1NA
 From: Hans-Erik Skyttberg [EMAIL PROTECTED]
 To:
 tomcat-user-sc.1001056157.bdincojdmngfhdojeppf-Hans-Erik.Skyttberg=boxe
 [EMAIL PROTECTED]
 X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N



Tomcat 4 and session persistance ...

2001-09-20 Thread David Cassidy

A little while ago I looked at the tomcat 4 docs and 
there was a howto on how to store the sessions and 
persistance failover etc etc

link 

http://jakarta.apache.org/tomcat/tomcat-4.0-doc/JDBCStore-howto.html


What happened to it ?

Thanks

David



Re: Fallbacks for load-balanced mod_jk workers

2001-09-06 Thread David Cassidy

What you might find the easiest is to use apache's
ErrorDocument 500 url

command very useful.

If tomcat is down apache generates a 500 error.

Apache can then intercept that and use a page ( static HTML/CGI/Other
URL)
to generate a 'we've gone walkies for a bit - back soon' type message

David
PS I know this - it bit me in the ass.

Scott Jones wrote:
 
 Hello,
 
 I am setting up a set of boxes as follows.  There are two machines
 running Apache 1.3.19 and then there are three machines running tomcat
 3.2.3.  I have a worker linking each of the apache machines to each
 tomcat server (for a total of 6 tomcat instances).
 
 What I'm wondering is say for some awful reason that all three of my
 tomcat servers are down.  Is there any way that I can have mod_jk link
 to something else that might just say we're down right now, please
 check back soon or something like that?  Does the lb worker type have
 any kind of mechanism for this?
 
 Thanks for any suggestions!
 
 Cheers,
 
 Scott



Re: Load balancing tomcat and webapp directory location

2001-08-24 Thread David Cassidy

I'm sure a million people are going to say

RTFM

But I'm nice :)

Have a look at mod_jk . It is a very nice module and allows 
apache to send requests through to tomcat.
You can have more than one apache and more than tomcat - depending
on how many machines you have :)

Your webapps setup is a tomcat thing. I tend to copy zero length
files ( ie blank .jsp pages) onto the area that apache serves from
so that it can do the checks for index.jsp etc and be happy !

Happy reading

David


Rick Anderson wrote:
 
 We're using tomcat 3.2.3 at the moment and are attempting to configure
 tomcat so that it can be load balanced behind an apache web server.
 
 Where should the webapps directory be located? Does it need to copied
 onto
 each machine running tomcat or can it be located on the apache server?
 
 I haven't found docs on this yet. If some one could point me in the
 right
 direction I'd appreciate it.
 
 Thanks,
 -Rick Anderson
 
 __
 Rick Anderson   | [EMAIL PROTECTED]
 |_
 Rutgers University, Continuous Education  Outreach
 Consulting System Administrator,  (732)932-3938
 __



Re: suppressing white space in jsps

2001-08-22 Thread David Cassidy

Would you like to let us see the jsp - we might spot something...

David

Matt Hudson wrote:
 
 The only solution I have heard of is to remove the newline from your
 JSP.
 That's right -- one long line for the entire JSP.
 
 On Wed, Aug 22, 2001 at 07:59:16AM -0500, [EMAIL PROTECTED] wrote:
  Is there any way to suppress the whitespace that is output by jsp's in
 
  Tomcat/Catalina?  I have a simple jsp that generates a .csv, and sets
 the
  HTTP headers so that it opens in Excel (intranet app).  Even with
 cramming
  all the jsp intro stuff on one line, I still end up with one blank
 line as
  the first line of output.  (actually, one newline code).  I know that
  jasper must be converting every newline in the source .jsp to
 something
  like println(\n) in the servlet --- that's what I'd like to turn off
 
  (selectively)
 
  Is this possible?
 
  -jason
 
 --
 
 A weird imagination is most useful to gain full advantage of all the
 features.
 
   matt hudson   [EMAIL PROTECTED]http://www.spaceship.com/~matt



Re: Why and How Tomcat before Apache?

2001-08-17 Thread David Cassidy

unless you want to run your tomcat as root ( Very unwise )
makesure that you use a 'su' command in your
call to tomcat's start script...



David

Rui Miguel Seabra wrote:
 
 Just hack apachectl script to launch tomcat just before apache, and to
 shut it down right aftwards.
 
 On 17 Aug 2001 16:43:41 +0200, Roberto B. wrote:
  Ok ! but.. do you know the way to make this in automatic ( with
 scripts at
  system start ) ??
 
  - Original Message -
  From: Barnabas Yohannes [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Sent: Friday, August 17, 2001 3:39 PM
  Subject: Re: Why and How Tomcat before Apache?
 
 
   I cannot answer your why question, because, I am not one of the
  developers
   of apache or tomcat.  But here is the answer to your how question:
  
   *To stop and start your tomcat:
  
   cd /usr/local/tomcat
  
   bin/shutdown.sh
  
   bin/startup.sh
  
   *Exit from tomcat and go to your apache server:
  
   su
  
   /usr/local/apache/bin/apachectl restart
  
   exit
  
   * Another way of stopping and starting apache:
  
   bin/apachectl stop
   bin/apachectl start
  
  
  
   - Original Message -
   From: Roberto B. [EMAIL PROTECTED]
   To: [EMAIL PROTECTED]
   Sent: Friday, August 17, 2001 4:50 AM
   Subject: Why and How Tomcat before Apache?
  
  
I have a Linux/Debian system.
I want to use Apache as web-server and Tomcat only for JSP file.
   
Is it true that it is necessary to make start Tomcat before
 Apache?
  Why?..
and if it is true.. how??
   
Thanks!
Roberto.
   
   
 
 --
 + No matter how much you do, you never do enough -- unknown
 + Whatever you do will be insignificant,
 | but it is very important that you do it -- Ghandi
 + So let's do it...?



Re: Why and How Tomcat before Apache?

2001-08-17 Thread David Cassidy

Ah what the hell try this ...
( works for me !)


Watch out for the line wraps !


- 8 -- snip 
#!/bin/sh

# Init file for Jakarta Tomcat
#
# chkconfig: 345 98 00
# description: Jakarta tomcat daemon
#
# processname: 
# config: /usr/local/tomcat/conf/server.xml

RETVAL=0

TOMCAT_HOME=/usr/local/tomcat
export TOMCAT_HOME

case $1 in
  start)
F=`$0 status`
if [ $? = 255 ] ; then
echo -n Starting Tomcat : 
su - tomcat -c cd $TOMCAT_HOME/bin;
$TOMCAT_HOME/bin/startup.sh  $TOMCAT_HOME/logs/tomcat_stdout.log 2
$TOMCAT_HOME/logs/tomcat_stderr.log
echo   [ OK ] 
else
echo Tomcat is already running
fi
echo
;;
  stop)
F=`$0 status`
if [ $? = 255 ] ; then
echo Tomcat isn't running
else
echo -n Shutting down Tomcat : 
su - tomcat -c cd $TOMCAT_HOME/bin ;
$TOMCAT_HOME/bin/shutdown.sh  $TOMCAT_HOME/logs/tomcat_down_stdout.log
2 $TOMCAT_HOME/logs/tomcat_down_stderr.log
echo   [ OK ] 
fi
echo
;;
  restart)
$0 stop
sleep 2
$0 start
RETVAL=$?
;;
  status)
S=`ps auxww | grep org.apache.tomcat.startup.Tomca[t] | wc -l`
E=`expr $S` 
if [ $E = 0 ] ;then 
echo Tomcat is stopped
RETVAL=-1
else
PIDS=`ps auxww | grep org.apache.tomcat.startup.Tomca[t]
| awk '{FS= }{print $2}'`
P=`echo $PIDS` 
echo Tomcat ( $P ) is running
RETVAL=0
fi
;;
  *)
echo Usage: tomcat {start|stop|restart|status}
exit 1
esac

exit $RETVAL

- 8 -- snip 


David Cassidy wrote:
 
 unless you want to run your tomcat as root ( Very unwise )
 makesure that you use a 'su' command in your
 call to tomcat's start script...
 
 David
 
 Rui Miguel Seabra wrote:
 
  Just hack apachectl script to launch tomcat just before apache, and to
  shut it down right aftwards.
 
  On 17 Aug 2001 16:43:41 +0200, Roberto B. wrote:
   Ok ! but.. do you know the way to make this in automatic ( with
  scripts at
   system start ) ??
  
   - Original Message -
   From: Barnabas Yohannes [EMAIL PROTECTED]
   To: [EMAIL PROTECTED]
   Sent: Friday, August 17, 2001 3:39 PM
   Subject: Re: Why and How Tomcat before Apache?
  
  
I cannot answer your why question, because, I am not one of the
   developers
of apache or tomcat.  But here is the answer to your how
 question:
   
*To stop and start your tomcat:
   
cd /usr/local/tomcat
   
bin/shutdown.sh
   
bin/startup.sh
   
*Exit from tomcat and go to your apache server:
   
su
   
/usr/local/apache/bin/apachectl restart
   
exit
   
* Another way of stopping and starting apache:
   
bin/apachectl stop
bin/apachectl start
   
   
   
- Original Message -
From: Roberto B. [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, August 17, 2001 4:50 AM
Subject: Why and How Tomcat before Apache?
   
   
 I have a Linux/Debian system.
 I want to use Apache as web-server and Tomcat only for JSP file.

 Is it true that it is necessary to make start Tomcat before
  Apache?
   Why?..
 and if it is true.. how??

 Thanks!
 Roberto.


  
  --
  + No matter how much you do, you never do enough -- unknown
  + Whatever you do will be insignificant,
  | but it is very important that you do it -- Ghandi
  + So let's do it...?



Re: Why and How Tomcat before Apache?

2001-08-17 Thread David Cassidy


check out if you can do a rm -rf * from within java...

Don't know if you can, don't know how well the JVM will
protect you but

I run mine as a different user.

Do you run your apache as root ?

David


Martin van den Bemt wrote:
 
 Please tell me what is dangerous about running tomcat as root? I've
 taken
 the following security measures :
 port 8007 and 8009 is blocked from the outside (firewall)
 tomcat is not running on 8080 and only allowing communications from
 localhost (127.0.0.1).
 The only potential problem is that if a tomcat /apache bug is exploited,
 you potentially have a problem.
 
 Looks pretty solid to me though..
 
 Mvgr,
 martin
 
  -Original Message-
  From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On
 Behalf
  Of David Cassidy
  Sent: Friday, August 17, 2001 4:54 PM
  To: [EMAIL PROTECTED]
  Subject: Re: Why and How Tomcat before Apache?
 
 
  unless you want to run your tomcat as root ( Very unwise )
  makesure that you use a 'su' command in your
  call to tomcat's start script...
 
 
 
  David
 
  Rui Miguel Seabra wrote:
  
   Just hack apachectl script to launch tomcat just before apache, and
 to
   shut it down right aftwards.
  
   On 17 Aug 2001 16:43:41 +0200, Roberto B. wrote:
Ok ! but.. do you know the way to make this in automatic ( with
   scripts at
system start ) ??
   
- Original Message -
From: Barnabas Yohannes [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, August 17, 2001 3:39 PM
Subject: Re: Why and How Tomcat before Apache?
   
   
 I cannot answer your why question, because, I am not one of
 the
developers
 of apache or tomcat.  But here is the answer to your how
 question:

 *To stop and start your tomcat:

 cd /usr/local/tomcat

 bin/shutdown.sh

 bin/startup.sh

 *Exit from tomcat and go to your apache server:

 su

 /usr/local/apache/bin/apachectl restart

 exit

 * Another way of stopping and starting apache:

 bin/apachectl stop
 bin/apachectl start



 - Original Message -
 From: Roberto B. [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Friday, August 17, 2001 4:50 AM
 Subject: Why and How Tomcat before Apache?


  I have a Linux/Debian system.
  I want to use Apache as web-server and Tomcat only for JSP
 file.
 
  Is it true that it is necessary to make start Tomcat before
   Apache?
Why?..
  and if it is true.. how??
 
  Thanks!
  Roberto.
 
 
   
   --
   + No matter how much you do, you never do enough -- unknown
   + Whatever you do will be insignificant,
   | but it is very important that you do it -- Ghandi
   + So let's do it...?
 



Re: Why and How Tomcat before Apache?

2001-08-17 Thread David Cassidy

better you than me 

I take it you are the only one in the wide wide world who can
upload a cgi program to your site...


Roberto B. wrote:
 
 Yes.. as root!
 
 R.
 
 - Original Message -
 From: David Cassidy [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Friday, August 17, 2001 5:08 PM
 Subject: Re: Why and How Tomcat before Apache?
 
 
  check out if you can do a rm -rf * from within java...
 
  Don't know if you can, don't know how well the JVM will
  protect you but
 
  I run mine as a different user.
 
  Do you run your apache as root ?
 
  David
 
 
  Martin van den Bemt wrote:
  
   Please tell me what is dangerous about running tomcat as root? I've
   taken
   the following security measures :
   port 8007 and 8009 is blocked from the outside (firewall)
   tomcat is not running on 8080 and only allowing communications from
   localhost (127.0.0.1).
   The only potential problem is that if a tomcat /apache bug is
 exploited,
   you potentially have a problem.
  
   Looks pretty solid to me though..
  
   Mvgr,
   martin
  
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On
   Behalf
Of David Cassidy
Sent: Friday, August 17, 2001 4:54 PM
To: [EMAIL PROTECTED]
Subject: Re: Why and How Tomcat before Apache?
   
   
unless you want to run your tomcat as root ( Very unwise )
makesure that you use a 'su' command in your
call to tomcat's start script...
   
   
   
David
   
Rui Miguel Seabra wrote:

 Just hack apachectl script to launch tomcat just before apache,
 and
   to
 shut it down right aftwards.

 On 17 Aug 2001 16:43:41 +0200, Roberto B. wrote:
  Ok ! but.. do you know the way to make this in automatic (
 with
 scripts at
  system start ) ??
 
  - Original Message -
  From: Barnabas Yohannes [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Sent: Friday, August 17, 2001 3:39 PM
  Subject: Re: Why and How Tomcat before Apache?
 
 
   I cannot answer your why question, because, I am not one
 of
   the
  developers
   of apache or tomcat.  But here is the answer to your how
   question:
  
   *To stop and start your tomcat:
  
   cd /usr/local/tomcat
  
   bin/shutdown.sh
  
   bin/startup.sh
  
   *Exit from tomcat and go to your apache server:
  
   su
  
   /usr/local/apache/bin/apachectl restart
  
   exit
  
   * Another way of stopping and starting apache:
  
   bin/apachectl stop
   bin/apachectl start
  
  
  
   - Original Message -
   From: Roberto B. [EMAIL PROTECTED]
   To: [EMAIL PROTECTED]
   Sent: Friday, August 17, 2001 4:50 AM
   Subject: Why and How Tomcat before Apache?
  
  
I have a Linux/Debian system.
I want to use Apache as web-server and Tomcat only for JSP
   file.
   
Is it true that it is necessary to make start Tomcat
 before
 Apache?
  Why?..
and if it is true.. how??
   
Thanks!
Roberto.
   
   
 
 --
 + No matter how much you do, you never do enough -- unknown
 + Whatever you do will be insignificant,
 | but it is very important that you do it -- Ghandi
 + So let's do it...?
   



Re: Why and How Tomcat before Apache?

2001-08-17 Thread David Cassidy

The usual thing is to save it to init.d and then link to the rc[235].d
of 
your choice.

If you've got redhat you can use the chkconfig program on it.

Note though that you'll need to add a user 'tomcat' and make
sure that at least the conf and logs directories are
availible for writing by that user.

You might want to make a 'web' group...

i've also added

--- 8   snip  

DATE=`date +%Y-%m-%d-%H-%M-%S`
mkdir $TOMCAT/logs/$DATE
mv $TOMCAT/logs/*.log $TOMCAT/logs/$DATE

---8  snip  

into my shutdown.sh script. This then saves all of your logs when you
do a shutdown - which can be useful !

David



Roberto B. wrote:
 
 Do I have to insert this script in my rc2.d dir. and link it in init.d ?
 
 R.
 
 - Original Message -
 From: David Cassidy [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Friday, August 17, 2001 5:06 PM
 Subject: Re: Why and How Tomcat before Apache?
 
  Ah what the hell try this ...
  ( works for me !)
 
 
  Watch out for the line wraps !
 
 
  - 8 -- snip
  #!/bin/sh
 
  # Init file for Jakarta Tomcat
  #
  # chkconfig: 345 98 00
  # description: Jakarta tomcat daemon
  #
  # processname:
  # config: /usr/local/tomcat/conf/server.xml
 
  RETVAL=0
 
  TOMCAT_HOME=/usr/local/tomcat
  export TOMCAT_HOME
 
  case $1 in
start)
  F=`$0 status`
  if [ $? = 255 ] ; then
  echo -n Starting Tomcat : 
  su - tomcat -c cd $TOMCAT_HOME/bin;
  $TOMCAT_HOME/bin/startup.sh  $TOMCAT_HOME/logs/tomcat_stdout.log 2
  $TOMCAT_HOME/logs/tomcat_stderr.log
  echo   [ OK ] 
  else
  echo Tomcat is already running
  fi
  echo
  ;;
stop)
  F=`$0 status`
  if [ $? = 255 ] ; then
  echo Tomcat isn't running
  else
  echo -n Shutting down Tomcat : 
  su - tomcat -c cd $TOMCAT_HOME/bin ;
  $TOMCAT_HOME/bin/shutdown.sh 
 $TOMCAT_HOME/logs/tomcat_down_stdout.log
  2 $TOMCAT_HOME/logs/tomcat_down_stderr.log
  echo   [ OK ] 
  fi
  echo
  ;;
restart)
  $0 stop
  sleep 2
  $0 start
  RETVAL=$?
  ;;
status)
  S=`ps auxww | grep org.apache.tomcat.startup.Tomca[t] | wc -l`
  E=`expr $S`
  if [ $E = 0 ] ;then
  echo Tomcat is stopped
  RETVAL=-1
  else
  PIDS=`ps auxww | grep
 org.apache.tomcat.startup.Tomca[t]
  | awk '{FS= }{print $2}'`
  P=`echo $PIDS`
  echo Tomcat ( $P ) is running
  RETVAL=0
  fi
  ;;
*)
  echo Usage: tomcat {start|stop|restart|status}
  exit 1
  esac
 
  exit $RETVAL
 
  - 8 -- snip
 
 
  David Cassidy wrote:
  
   unless you want to run your tomcat as root ( Very unwise )
   makesure that you use a 'su' command in your
   call to tomcat's start script...
  
   David
  
   Rui Miguel Seabra wrote:
   
Just hack apachectl script to launch tomcat just before apache,
 and to
shut it down right aftwards.
   
On 17 Aug 2001 16:43:41 +0200, Roberto B. wrote:
 Ok ! but.. do you know the way to make this in automatic ( with
scripts at
 system start ) ??

 - Original Message -
 From: Barnabas Yohannes [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Friday, August 17, 2001 3:39 PM
 Subject: Re: Why and How Tomcat before Apache?


  I cannot answer your why question, because, I am not one of
 the
 developers
  of apache or tomcat.  But here is the answer to your how
   question:
 
  *To stop and start your tomcat:
 
  cd /usr/local/tomcat
 
  bin/shutdown.sh
 
  bin/startup.sh
 
  *Exit from tomcat and go to your apache server:
 
  su
 
  /usr/local/apache/bin/apachectl restart
 
  exit
 
  * Another way of stopping and starting apache:
 
  bin/apachectl stop
  bin/apachectl start
 
 
 
  - Original Message -
  From: Roberto B. [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Sent: Friday, August 17, 2001 4:50 AM
  Subject: Why and How Tomcat before Apache?
 
 
   I have a Linux/Debian system.
   I want to use Apache as web-server and Tomcat only for JSP
 file.
  
   Is it true that it is necessary to make start Tomcat before
Apache?
 Why?..
   and if it is true.. how??
  
   Thanks!
   Roberto.
  
  

--
+ No matter how much you do, you never do enough -- unknown
+ Whatever you do will be insignificant,
| but it is very important that you do it -- Ghandi
+ So let's do it...?



Re: Why and How Tomcat before Apache?

2001-08-17 Thread David Cassidy

Martin van den Bemt wrote:
 
  check out if you can do a rm -rf * from within java...
 
 Yep works cool.. It saves a lot of work if I'm the admin, integrator and
 programmer at the same time ;-)), so those things don't slip through (we
 have a small team of programmers and all things are tested first.. a
 nice
 form to type in rm -f that also gets invoked will never get through ;-))

ouch !

  Don't know if you can, don't know how well the JVM will
  protect you but
 
 Nope, if I want to do that, then it must work ;).. (we use all system
 options quite heavily, also admin of /etc/passwd etc, so we need access
 sometimes..)
 
  I run mine as a different user.
 
 I you don't block 8007 and 8009 for unautharized access, you will get a
 lot
 of bad packets (at least in 3.3 and ajp13, don't know what happens with
 older versions though). Someone eventually could find a bug and exploit
 and
 down your server or delete your webapp or other data. You don't solve
 that
 problem with running as a seperate user..

Tomcats ports are not visible from the outside. Only access is through 
apache - ie mod_jk ...

  Do you run your apache as root ?
 
 Nope as nobody (which is also not completely safe on default installs,
 since it also used by some daemons..)
 

It's an interresting world isn't it !

Same programs, same os's but so many different ways ...

 Mvgr,
 Martin
 
  David
 
 
  Martin van den Bemt wrote:
  
   Please tell me what is dangerous about running tomcat as root? I've
   taken
   the following security measures :
   port 8007 and 8009 is blocked from the outside (firewall)
   tomcat is not running on 8080 and only allowing communications from
   localhost (127.0.0.1).
   The only potential problem is that if a tomcat /apache bug is
 exploited,
   you potentially have a problem.
  
   Looks pretty solid to me though..
  
   Mvgr,
   martin
  
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On
   Behalf
Of David Cassidy
Sent: Friday, August 17, 2001 4:54 PM
To: [EMAIL PROTECTED]
Subject: Re: Why and How Tomcat before Apache?
   
   
unless you want to run your tomcat as root ( Very unwise )
makesure that you use a 'su' command in your
call to tomcat's start script...
   
   
   
David
   
Rui Miguel Seabra wrote:

 Just hack apachectl script to launch tomcat just before apache,
 and
   to
 shut it down right aftwards.

 On 17 Aug 2001 16:43:41 +0200, Roberto B. wrote:
  Ok ! but.. do you know the way to make this in automatic (
 with
 scripts at
  system start ) ??
 
  - Original Message -
  From: Barnabas Yohannes [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Sent: Friday, August 17, 2001 3:39 PM
  Subject: Re: Why and How Tomcat before Apache?
 
 
   I cannot answer your why question, because, I am not one
 of
   the
  developers
   of apache or tomcat.  But here is the answer to your how
   question:
  
   *To stop and start your tomcat:
  
   cd /usr/local/tomcat
  
   bin/shutdown.sh
  
   bin/startup.sh
  
   *Exit from tomcat and go to your apache server:
  
   su
  
   /usr/local/apache/bin/apachectl restart
  
   exit
  
   * Another way of stopping and starting apache:
  
   bin/apachectl stop
   bin/apachectl start
  
  
  
   - Original Message -
   From: Roberto B. [EMAIL PROTECTED]
   To: [EMAIL PROTECTED]
   Sent: Friday, August 17, 2001 4:50 AM
   Subject: Why and How Tomcat before Apache?
  
  
I have a Linux/Debian system.
I want to use Apache as web-server and Tomcat only for JSP
   file.
   
Is it true that it is necessary to make start Tomcat
 before
 Apache?
  Why?..
and if it is true.. how??
   
Thanks!
Roberto.
   
   
 
 --
 + No matter how much you do, you never do enough -- unknown
 + Whatever you do will be insignificant,
 | but it is very important that you do it -- Ghandi
 + So let's do it...?
   
 



Re: Tomcat before Apache

2001-08-17 Thread David Cassidy

dos2unix ...

Or use vi ...

Martin van den Bemt wrote:
 
 If you created the bash script not in vi, but eg adjusted stuff in write
 and
 saved it, you need to fix the lineendings.. (there is a util for that
 which
 was added again on rh7.1, but I forgot the name).. You can test if this
 is
 the problem by moving the script to eg tomcat_old do a vi tomcat and do
 something that show up at the screen.. If that works, you know for sure
 that
 your bash file is messed up.. Also a hint : try running it after startup
 and
 see if it works..
 
 Mvgr,
 Martin
 
  -Original Message-
  From: Roberto B. [mailto:[EMAIL PROTECTED]]
  Sent: Friday, August 17, 2001 5:37 PM
  To: [EMAIL PROTECTED]
  Subject: Tomcat before Apache
 
 
  I use Linux/Debian as root, Apache 1.3 and Tomcat 4 b6
 
  I want to start automatically Tomcat before Apache.
  I made this things :
 
  1) I created this script named tomcat:
 
  #! /bin/sh
  TOMCAT_HOME=/usr/tomcat4b6
  # Test tomcat.sh
   if [ ! -x $TOMCAT_HOME/bin/tomcat.sh ]
   then
  echo Tomcat not found
  exit
   fi
   case $1 in
   start)
  # Start service
   $TOMCAT_HOME/bin/startup.sh
   echo -ne Tomcat started \n
   ;;
   stop)
   $TOMCAT_HOME/bin/shutdown.sh
   ;;
   esac
 
  2) I insert this script in dir /etc/init.d
  3) chmod u+x tomcat
  4) in /etc/rc2.d (because default runlever is 2 in file inittab) this
  command (because i have @S91apache):
  ln -s ../init.d/tomcat S90tomcat
 
  5) I rebooted the system and this is the result:
 
  :
  :
  etc/init.d/rc: /etc/rc2.d/S90tomcat: No such file or directory
  apache started
  :
 
  Why??
 
  Roberto
 
 
 
 



Re: passing parameter to a jsp tag

2001-08-16 Thread David Cassidy

You might want to 

try using single quotes   '

and in your tag definition check that it has 
got the runtime expression attirbute set to true...

:)

Bit me in the behind as well !

David



Bernier, Melanie wrote:
 
 Hi!
 
 I'm having troubles with the following code:
 
 tblListe:tabListe dBms=%= dbms % dBuser=TABSERV ordnung=FaVeNa
 
 /tblListe:tabListe
 
 Instead of setting dBms to dbms, it's setting dBms to %= dbms %
 
 What is the problem?  I looked on several newsgroups and examples on JSP
 Custom Tag and what I'm doing seems to be right.
 
 Thanks.
 Melanie.



  1   2   >