Re: no UserTransaction in jndi

2007-11-08 Thread Peter Fischer

Hello mgainty,


mgainty wrote:
 
 took a quick gander at
 http://twiki.atomikos-support.com/bin/view.pl/Main/Tomcat55SelfContainedWar
 and dont see any auth or name attributes specified
 
 Perhaps you are interacting with an EJB server???
 
What do you mean? I have only one tomcat running. No own webapp deployed or
ejb server running. I plan to use XA-transactions with Atomikos
transactions. Therefore I need a UserTransaction provided per jndi. This is
what I'm testing, but I have problems on the first setup.

regards,
Peter

-- 
View this message in context: 
http://www.nabble.com/no-UserTransaction-in-jndi-tf4763485.html#a13643926
Sent from the Tomcat - User mailing list archive at Nabble.com.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: no UserTransaction in jndi

2007-11-08 Thread Peter Fischer

Hello Chuck,


Caldarale, Charles R wrote:
 
 According to the Tomcat doc, the only valid attribute is factory; I'm
 only speculating, but the presence of the name and auth attributes may
 be causing the element to be rejected.
 
 Is there anything shown in the logs about this at Tomcat startup?
 

You'r right, so I tried
Transaction factory=com.atomikos.icatch.jta.UserTransactionFactory /

But there is no change in the result:
- http://localhost:8080/manager/resources; lists only the UserDatabase
- lambdaprobe says that the resource-ref to UserTransaction is not working

manager.log:
08.11.2007 10:07:16 org.apache.catalina.session.StandardSession readObject
FEIN: readObject() loading session EF0E6D1AFB09EB9770363511F24A1FE4
08.11.2007 10:07:16 org.apache.catalina.core.StandardContext listenerStart
FEIN: Sending application start events
08.11.2007 10:07:16 org.apache.catalina.core.StandardContext filterStart
FEIN: Starting filters
08.11.2007 10:07:20 org.apache.catalina.core.ApplicationContext log
INFO: Manager: init: Associated with Deployer
'Catalina:type=Deployer,host=localhost'
08.11.2007 10:07:20 org.apache.catalina.core.ApplicationContext log
INFO: Manager: init: Global resources are available
08.11.2007 10:07:20 org.apache.catalina.core.ApplicationContext log
INFO: Manager: resources:  Listing resources of all types


probe.log:
08 Nov 2007 10:26:00 [http-8080-1] INFO 
org.jstripe.tomcat.probe.ProbeServlet  - setWrapper() called
08 Nov 2007 10:26:00 [http-8080-1] INFO 
org.jstripe.tomcat.probe.ProbeServlet  - Initializing servlet 'probe'
08 Nov 2007 10:26:00 [http-8080-1] INFO 
org.springframework.core.CollectionFactory  - JDK 1.4+ collections available
08 Nov 2007 10:26:00 [http-8080-1] INFO 
org.springframework.core.CollectionFactory  - Commons Collections 3.x
available
08 Nov 2007 10:26:00 [http-8080-1] INFO 
org.jstripe.tomcat.probe.ProbeServlet  - FrameworkServlet 'probe':
initialization started
08 Nov 2007 10:26:00 [http-8080-1] INFO 
org.springframework.beans.factory.xml.XmlBeanDefinitionReader  - Loading XML
bean definitions from ServletContext resource
[/WEB-INF/spring-controllers.xml]
08 Nov 2007 10:26:00 [http-8080-1] INFO 
org.springframework.beans.factory.xml.XmlBeanDefinitionReader  - Loading XML
bean definitions from ServletContext resource
[/WEB-INF/spring-resources.xml]
08 Nov 2007 10:26:00 [http-8080-1] INFO 
org.springframework.beans.factory.xml.XmlBeanDefinitionReader  - Loading XML
bean definitions from ServletContext resource [/WEB-INF/spring-stats.xml]
08 Nov 2007 10:26:00 [http-8080-1] INFO 
org.springframework.beans.factory.xml.XmlBeanDefinitionReader  - Loading XML
bean definitions from ServletContext resource
[/WEB-INF/spring-probe-servlet.xml]
08 Nov 2007 10:26:00 [http-8080-1] INFO 
org.springframework.ui.context.support.UiApplicationContextUtils  - Unable
to locate ThemeSource with name 'themeSource': using default
[EMAIL PROTECTED]
08 Nov 2007 10:26:01 [http-8080-1] INFO 
org.jstripe.tomcat.probe.model.stats.StatsCollection  - stats data read in
234ms.
08 Nov 2007 10:26:01 [http-8080-1] INFO  org.quartz.simpl.SimpleThreadPool 
- Job execution threads will use class loader of thread: http-8080-1
08 Nov 2007 10:26:01 [http-8080-1] INFO  org.quartz.core.QuartzScheduler  -
Quartz Scheduler v.1.5.1 created.
08 Nov 2007 10:26:01 [http-8080-1] INFO  org.quartz.simpl.RAMJobStore  -
RAMJobStore initialized.
08 Nov 2007 10:26:01 [http-8080-1] INFO  org.quartz.impl.StdSchedulerFactory 
- Quartz scheduler 'DefaultQuartzScheduler' initialized from default
resource file in Quartz package: 'quartz.properties'
08 Nov 2007 10:26:01 [http-8080-1] INFO  org.quartz.impl.StdSchedulerFactory 
- Quartz scheduler version: 1.5.1
08 Nov 2007 10:26:01 [http-8080-1] INFO 
org.springframework.scheduling.quartz.SchedulerFactoryBean  - Starting
Quartz scheduler now
08 Nov 2007 10:26:01 [http-8080-1] INFO  org.quartz.core.QuartzScheduler  -
Scheduler DefaultQuartzScheduler_$_NON_CLUSTERED started.
08 Nov 2007 10:26:01 [http-8080-1] INFO 
org.jstripe.tomcat.probe.ProbeServlet  - Using context class
[org.springframework.web.context.support.XmlWebApplicationContext] for
servlet 'probe'
08 Nov 2007 10:26:01 [http-8080-1] INFO 
org.jstripe.tomcat.probe.ProbeServlet  - Unable to locate MultipartResolver
with name 'multipartResolver': no multipart request handling provided
08 Nov 2007 10:26:01 [http-8080-1] INFO 
org.jstripe.tomcat.probe.ProbeServlet  - Unable to locate LocaleResolver
with name 'localeResolver': using default
[EMAIL PROTECTED]
08 Nov 2007 10:26:01 [http-8080-1] INFO 
org.jstripe.tomcat.probe.ProbeServlet  - Using ThemeResolver
[EMAIL PROTECTED]
08 Nov 2007 10:26:01 [http-8080-1] INFO 
org.jstripe.tomcat.probe.ProbeServlet  - No HandlerAdapters found in servlet
'probe': using default
08 Nov 2007 10:26:01 [http-8080-1] INFO 
org.jstripe.tomcat.probe.ProbeServlet  - FrameworkServlet 'probe':
initialization completed in 1607 ms
08 Nov 2007 10:26:01 [http-8080-1] INFO 

Re: Tomcat 6.0.14 and UTF-8 POST form problem

2007-11-08 Thread Michael

Yigal Lazarev wrote:

Hi,

I'm deploying a JSF WAR onto Tomcat 6.0.14 under Windows 2003 with JVM
version 1.6.0_03-b05, and using MySQL db.
When I submit a form using POST method, and in the server side take the
fields and send them as an email using JavaMail- i lose the UTF-8 encoded
characters sent in the form.

I suspect it's something with the Tomcat configuration because it does not
happen when I deploy to Sun Application Server 8.2
And another thing, UTF-8 characters hardcoded in the sending email method
are sent just fine.


Shalom Yigal,

all your efforts are useless. Just do the following thing and you'll be 
happy:


open up the server.xml

search for the Connector node which works for HTTP and add the attribute 
URIEncoding=UTF-8

restart tomcat and go on using:

String string = request.getParamter(name);

that's it. Works perfectly here.

Some reference for you: 
http://confluence.atlassian.com/display/DOC/Configuring+Tomcat's+URI+encoding


Lehitraot,

Michael
--
NO OOXML - Say NO To Microsoft Office broken standard
http://www.noooxml.org

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat 6.0.14 and UTF-8 POST form problem

2007-11-08 Thread Michael

Yigal Lazarev wrote:

Shalom Michael,
Thanks for your reply, but as you can see in my first post, this was the
second thing I tried..
Inserting URIEncoding=UTF-8 to the HTTP and the AJP/1.3 connectors in
server.xml didn't help.
More suggestions?


did you tell the JVM to use UTF-8 as file encoding?

-Dfile.enconding=UTF-8

--
NO OOXML - Say NO To Microsoft Office broken standard
http://www.noooxml.org

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat 6.0.14 and UTF-8 POST form problem

2007-11-08 Thread Yigal Lazarev
Well Michael you've just solved the problem!
Thank you very much ! :)

On Nov 8, 2007 12:46 PM, Michael [EMAIL PROTECTED] wrote:

 Michael wrote:
  Yigal Lazarev wrote:
  Shalom Michael,
  Thanks for your reply, but as you can see in my first post, this was
 the
  second thing I tried..
  Inserting URIEncoding=UTF-8 to the HTTP and the AJP/1.3 connectors in
  server.xml didn't help.
  More suggestions?
 
  did you tell the JVM to use UTF-8 as file encoding?
 
  -Dfile.enconding=UTF-8
 
 -Dfile.encoding=UTF-8

 --
 NO OOXML - Say NO To Microsoft Office broken standard
 http://www.noooxml.org

 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




Re: Comet: response.sendRedirect() Problem

2007-11-08 Thread Jens Hagel
Hello Filip,

I've tried it with the current release candidate but still nothing happens.

jens


On Nov 7, 2007 6:13 PM, Filip Hanik - Dev Lists [EMAIL PROTECTED] wrote:
 there is a bug in 6.0.14 regarding pipelining HTTP events on a comet
 connection, your code is correct, try with our current release candidate
 http://people.apache.org/~remm/tomcat-6/v6.0.15/bin/

 Filip


 Jens Hagel wrote:
  Hello,
 
  I'm trying to use the sendRedirect() function in the begin event of a
  simple CometServlet,
  but nothing happens. Does anyone has an idea what's going wrong?
 
  kind regards,
  jens hagel
 
  --
  import org.apache.catalina.CometProcessor;
  import org.apache.catalina.CometEvent;
 
  import javax.servlet.http.*;
  import javax.servlet.ServletException;
  import java.io.IOException;
 
  public class CometServlet extends HttpServlet implements CometProcessor {
 
  public void event(CometEvent cometEvent) throws IOException,
  ServletException {
 
  HttpServletResponse response = cometEvent.getHttpServletResponse();
 
  // don't want timeout events
  cometEvent.setTimeout(100);
 
  if (cometEvent.getEventType() == CometEvent.EventType.BEGIN) {
 
  log(Begin for session);
  response.sendRedirect(http://www.heise.de;);
  cometEvent.close();
 
  } else if (cometEvent.getEventType() == CometEvent.EventType.ERROR) 
  {
  log(Error for session:  + cometEvent.getEventSubType());
  cometEvent.close();
  } else if (cometEvent.getEventType() == CometEvent.EventType.END) {
  log(End for session);
  cometEvent.close();
  } else if (cometEvent.getEventType() == CometEvent.EventType.READ) {
  log(Read for session);
  }
  }
  }
  -
 
  -
  To start a new topic, e-mail: users@tomcat.apache.org
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 


 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat 6.0.14 and UTF-8 POST form problem

2007-11-08 Thread Michael

Yigal Lazarev wrote:

Well Michael you've just solved the problem!
Thank you very much ! :)


You are welcome!

Try to avoid top posting in future: 
http://en.wikipedia.org/wiki/Posting_style

Which barely impossible to read

Cheers to israel,

Mike
--
NO OOXML - Say NO To Microsoft Office broken standard
http://www.noooxml.org

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: I want two application web like root in the same Tomcat

2007-11-08 Thread Mikolaj Rydzewski

Joan Monplet Ortega wrote:

Into webapps I have app1 and app2, and both I want hidden their name_context in 
the url.
 
How I do it?
  
Configure separate virtual host for each application. Every virtual host 
has its own ROOT application.




--
Mikolaj Rydzewski [EMAIL PROTECTED]



smime.p7s
Description: S/MIME Cryptographic Signature


Re: I want two application web like root in the same Tomcat

2007-11-08 Thread Johnny Kewl


---
HARBOR: http://coolharbor.100free.com/index.htm
Now Tomcat is also a cool pojo application server
---

Snookered ;)
Dont think you can do that..

Choices are...
Multiple virtual hosts with their own appBase so you have multiple roots

You have everything in its own context and have root application that 
redirects to the right context.

Effectively ROOT is the index page for all contexts

You have a servlet in the root app that does Cross Context dispatch, ie its 
URL looks like a root but it calls the real webapps reference. Thing I'm not 
sure about is what sessions will do across, so even that I would restrict to 
TOP pages.


Cant think of another way

- Original Message - 
From: Joan Monplet Ortega [EMAIL PROTECTED]

To: users@tomcat.apache.org
Sent: Thursday, November 08, 2007 1:26 PM
Subject: I want two application web like root in the same Tomcat


Hi,

I want to install two application web like ROOT application, because I need:

- Hidden context's name of url like:

   http://domain/ where domain is a virtual host and its source code is 
in application web into webapps, so now when I try to show this domain I 
have to write http://domain/name_context/index.jsp (for example) and I 
don't want it.


If I move source code from my context to ROOT context, It runs.

But I have a problem because I have other application and I want make the 
same, but I have only ROOT application.


Resume:

Into webapps I have app1 and app2, and both I want hidden their name_context 
in the url.


How I do it?

Thanks

Joan




Joan Monplet Ortega -SoloStocks-
Departament Tècnic
Tel. 902 024 312 - Fax. 93 504 56 05
[EMAIL PROTECTED] mailto:[EMAIL PROTECTED]
[EMAIL PROTECTED] mailto:[EMAIL PROTECTED]

Este mensaje y los documentos que, en su caso, lleve anexos, pueden contener 
información confidencial. Por ello, se informa a quien lo reciba por error 
que la información contenida en el mismo es reservada y su uso no autorizado 
está prohibido legalmente, por lo que en tal caso le rogamos que nos lo 
comunique por la misma vía o por teléfono (+34 93 504 5639) , se abstenga de 
realizar copias del mensaje o remitirlo o entregarlo a terceras personas y 
proceda a borrarlo de inmediato.




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat 6.0.14 and UTF-8 POST form problem

2007-11-08 Thread Michael

Michael wrote:

Yigal Lazarev wrote:

Shalom Michael,
Thanks for your reply, but as you can see in my first post, this was the
second thing I tried..
Inserting URIEncoding=UTF-8 to the HTTP and the AJP/1.3 connectors in
server.xml didn't help.
More suggestions?


did you tell the JVM to use UTF-8 as file encoding?

-Dfile.enconding=UTF-8


-Dfile.encoding=UTF-8

--
NO OOXML - Say NO To Microsoft Office broken standard
http://www.noooxml.org

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: APR installation Question

2007-11-08 Thread sorin.silaghi

Hello,

  have you posted that tutorial anywhere ? because I am in great need of
it :)..


thank you
   Sorin.


Dhaval Patel wrote:
 
 Hi Richard,
 
 I made small tutorial about how to enable APR and SSL. I have it in word
 file. If you don't mind I
 can email it to you on your email.
 
 I have question for this mailing list about attaching document. I can
 generate small size PDF from
 it. But am I allowed to attach document on this list? I want to make that
 document available on
 this list as well so that everyone can able to see it.
 
 Thanks.
 
 Regards,
 Dhaval
 --- Richard Kaye [EMAIL PROTECTED] wrote:
 
 Hi
 
 I also get 
   The Apache Tomcat Native library which allows optimal performance in
   production environments was not found on the java.library.path:
 
 I'm using tomcat 5.5 installed from debian debs, and I think I
 understand the instructions I have read so far and have all the
 prerequisites to compile the necessary libraries, but I have not
 got past stage 1 yet.  The docs at
  http://tomcat.apache.org/tomcat-5.5-doc/apr.html
 tells me to look for tomcat-native.tar.gz which I have done.
 The result is I don't have this file or anything remotely
 similar, nor is it provided in any of the debs I think.  So 
 I can't unpack it and compile it.  What should I do now?
 
 Richard
 
 
 On Fri, 2007-06-15 at 13:52 +0300, Ilja S. wrote:
  Hi
  Your tomcat should start with option:
 -Djava.library.path=/usr/local/apr/lib
  in this case APR libs are in /usr/local/apr/lib, change to wherever you 
  got your libs
  
  Usually you add this line to tomcat startup script...
  
  
  
  *
  Best Regards
  Ilja
  
  
  Andre Prasetya wrote:
   I got this :
   
   The Apache Tomcat Native library which allows optimal performance in
   production environments was not found on the java.library.path:
   
   I already compiled the tcnative, where can i add the path to
   java.library.path ?
   
  
  
  -
  To start a new topic, e-mail: users@tomcat.apache.org
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  
 
 
 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 
 

 
 Looking for a deal? Find great prices on flights and hotels with Yahoo!
 FareChase.
 http://farechase.yahoo.com/
 
 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/APR-installation-Question-tf3152929.html#a13645920
Sent from the Tomcat - User mailing list archive at Nabble.com.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



I want two application web like root in the same Tomcat

2007-11-08 Thread Joan Monplet Ortega
Hi,
 
I want to install two application web like ROOT application, because I need:
 
- Hidden context's name of url like:
 
http://domain/ where domain is a virtual host and its source code is in 
application web into webapps, so now when I try to show this domain I have to 
write http://domain/name_context/index.jsp (for example) and I don't want it.
 
If I move source code from my context to ROOT context, It runs.
 
But I have a problem because I have other application and I want make the same, 
but I have only ROOT application.
 
Resume:
 
Into webapps I have app1 and app2, and both I want hidden their name_context in 
the url.
 
How I do it?
 
Thanks
 
Joan
 
 
 

Joan Monplet Ortega -SoloStocks-
Departament Tècnic
Tel. 902 024 312 - Fax. 93 504 56 05
[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] 
[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] 

Este mensaje y los documentos que, en su caso, lleve anexos, pueden contener 
información confidencial. Por ello, se informa a quien lo reciba por error que 
la información contenida en el mismo es reservada y su uso no autorizado está 
prohibido legalmente, por lo que en tal caso le rogamos que nos lo comunique 
por la misma vía o por teléfono (+34 93 504 5639) , se abstenga de realizar 
copias del mensaje o remitirlo o entregarlo a terceras personas y proceda a 
borrarlo de inmediato.
 


Re: Tomcat 6.0.14 and UTF-8 POST form problem

2007-11-08 Thread Yigal Lazarev
Shalom Michael,
Thanks for your reply, but as you can see in my first post, this was the
second thing I tried..
Inserting URIEncoding=UTF-8 to the HTTP and the AJP/1.3 connectors in
server.xml didn't help.
More suggestions?

On Nov 8, 2007 11:28 AM, Michael [EMAIL PROTECTED] wrote:

 Yigal Lazarev wrote:
  Hi,
 
  I'm deploying a JSF WAR onto Tomcat 6.0.14 under Windows 2003 with JVM
  version 1.6.0_03-b05, and using MySQL db.
  When I submit a form using POST method, and in the server side take the
  fields and send them as an email using JavaMail- i lose the UTF-8
 encoded
  characters sent in the form.
 
  I suspect it's something with the Tomcat configuration because it does
 not
  happen when I deploy to Sun Application Server 8.2
  And another thing, UTF-8 characters hardcoded in the sending email
 method
  are sent just fine.

 Shalom Yigal,

 all your efforts are useless. Just do the following thing and you'll be
 happy:

 open up the server.xml

 search for the Connector node which works for HTTP and add the attribute
 URIEncoding=UTF-8
 restart tomcat and go on using:

 String string = request.getParamter(name);

 that's it. Works perfectly here.

 Some reference for you:

 http://confluence.atlassian.com/display/DOC/Configuring+Tomcat's+URI+encodinghttp://confluence.atlassian.com/display/DOC/Configuring+Tomcat%27s+URI+encoding

 Lehitraot,

 Michael
 --
 NO OOXML - Say NO To Microsoft Office broken standard
 http://www.noooxml.org

 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




Re: Tomcat 6.0.14 and UTF-8 POST form problem

2007-11-08 Thread Yigal Lazarev
Thanks for the reply Chuck,
I read in the documentation that the default encoding in Tomcat for incoming
requests like from a form submission is Latin-1 (ISO-8859-1).
So the text in nameTextField (which is of type TextField) is UTF-8 text that
was 'treated' like Latin-1.
What I did is as suggested here:
http://www.jguru.com/faq/view.jsp?EID=1030399
to take the value (getValue() which returns an Object) and cast into String,
then take the bytes as Latin-1 and
construct a new String to return it to UTF-8.
Please correct me if I'm wrong.

I've changed the code a bit and it looks like this:
String nameText = (String)nameTextField.getText();
String convText = new String(ntft.getBytes(ISO-8859-1), UTF-8);
 String subj = קורות חיים של +convText;
message.setSubject(subj, utf-8);

getText() returns an Object so it has to be casted to String.
Still doesn't work.
Any suggestions are welcome..


On Nov 8, 2007 6:25 AM, Caldarale, Charles R  [EMAIL PROTECTED]
wrote:

  From: Yigal Lazarev [mailto: [EMAIL PROTECTED]
  Subject: Tomcat 6.0.14 and UTF-8 POST form problem
 
  * * Converting from ISO to UTF: *
  String subj = קורות חיים של +new
  String(((String)nameTextField.getValue()).
  getBytes(ISO-8859-1), UTF-8);

 I'm confused: if the text is already in UTF-8, why are you taking an
 apparent text field (already a String, perhaps?), doing a getValue() - a NOP
 for a String, then casting it to a String (another NOP), converting the
 String to a set of Latin-1 (or Hebrew) bytes, and then lying to a String
 constructor by telling it the byte array is in UTF-8?

 Even if nameTextField is not a String, there's an awful lot of conflicting
 machinations going on here.

 Perhaps I'm missing something...

  - Chuck


 THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
 MATERIAL and is thus for use only by the intended recipient. If you received
 this in error, please contact the sender and delete the e-mail and its
 attachments from all computers.

 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




Re: no UserTransaction in jndi

2007-11-08 Thread Peter Fischer

Hello,

under 5.5.9 the configuration has to be
Resource
name=UserTransaction
type=com.atomikos.icatch.jta.UserTransactionImp
factory=org.apache.naming.factory.BeanFactory/ 

With this, the 5.5.9 manager lists the UserTransaction. But I want to use a
actual version of tomcat.

Should the manager list the UserTransaction if it is configured under 5.5.25
or 6.0.14 with
Transaction factory=com.atomikos.icatch.jta.UserTransactionFactory /?

regards,
Peter
-- 
View this message in context: 
http://www.nabble.com/no-UserTransaction-in-jndi-tf4763485.html#a13644275
Sent from the Tomcat - User mailing list archive at Nabble.com.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: I want two application web like root in the same Tomcat

2007-11-08 Thread Joan Monplet Ortega
Thanks 



Joan Monplet Ortega -SoloStocks-
Departament Tècnic
Tel. 902 024 312 - Fax. 93 504 56 05
[EMAIL PROTECTED]
[EMAIL PROTECTED]

Este mensaje y los documentos que, en su caso, lleve anexos, pueden contener 
información confidencial. Por ello, se informa a quien lo reciba por error que 
la información contenida en el mismo es reservada y su uso no autorizado está 
prohibido legalmente, por lo que en tal caso le rogamos que nos lo comunique 
por la misma vía o por teléfono (+34 93 504 5639) , se abstenga de realizar 
copias del mensaje o remitirlo o entregarlo a terceras personas y proceda a 
borrarlo de inmediato.

-Mensaje original-
De: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Enviado el: jueves, 08 de noviembre de 2007 15:02
Para: Tomcat Users List
Asunto: Re: I want two application web like root in the same Tomcat

Hi Joan-

with apache front end you can use mod_rewrite to rewrite the URL 
http://httpd.apache.org/docs/1.3/mod/mod_rewrite.html

With Tomcat you will need to put on the architect's hat to determine why have 2 
webapps when you only need one webapp(ROOT) If the 2 webapps accomplish the 
same functionality and have basically the same startup parameters and same 
access capabilities then merge otherwise keep the apps separate..

Anyone else?
M--

- Original Message -
Wrom: WLSZLKBRNVWWCUFPEGAUTFJMVRESKPNKMBIPBARHDMNNSKV
To: users@tomcat.apache.org
Sent: Thursday, November 08, 2007 6:26 AM
Subject: I want two application web like root in the same Tomcat


Hi,

I want to install two application web like ROOT application, because I need:

- Hidden context's name of url like:

http://domain/ where domain is a virtual host and its source code is in 
application web into webapps, so now when I try to show this domain I have to 
write http://domain/name_context/index.jsp (for example) and I don't want it.

If I move source code from my context to ROOT context, It runs.

But I have a problem because I have other application and I want make the same, 
but I have only ROOT application.

Resume:

Into webapps I have app1 and app2, and both I want hidden their name_context in 
the url.

How I do it?

Thanks

Joan




Joan Monplet Ortega -SoloStocks-
Departament Tècnic
Tel. 902 024 312 - Fax. 93 504 56 05
[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] [EMAIL PROTECTED] mailto:[EMAIL 
PROTECTED]

Este mensaje y los documentos que, en su caso, lleve anexos, pueden contener 
información confidencial. Por ello, se informa a quien lo reciba por error que 
la información contenida en el mismo es reservada y su uso no autorizado está 
prohibido legalmente, por lo que en tal caso le rogamos que nos lo comunique 
por la misma vía o por teléfono (+34 93 504 5639) , se abstenga de realizar 
copias del mensaje o remitirlo o entregarlo a terceras personas y proceda a 
borrarlo de inmediato.



-
To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: 
[EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Tomcat native lib on OS X

2007-11-08 Thread Lorenzo Schoovaerts

Hi guys,

Isn't there anyone who got the native stuff working on a Mac?

I followed all the steps. I compiled the source without any erros. The  
resulting libraries were copied to every place I can possibly imagine  
(/usr/bin, /usr/local/bin, JAVA_HOME dir, CATALINE_HOME dir,  
TOMCAT_HOME dir, CATALINA_HOME/common/lib, CATALINA_HOME/native etc etc)
but no matter what, tomcat keeps complaining that it can't find  
them... That sucks. The solver of this problem will be highly rewarded  
with a bag of white rice ;-)


PS: For thos interested, I installed Leopard and tomcat still runs.  
Cool huh?


Thanks
Regards
Lorenzo.

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: no UserTransaction in jndi

2007-11-08 Thread Martin Gainty
Hi Peter

The immediate answer is no as you would be losing JNDI lookup capability

Read this quote from one of the atomikos staff

Tomcat JNDI configuration can be a pain to set up, mainly due to the way
Tomcat requires several XML elements to agree on the same naming parts. The
easiest way to get Tomcat to work is by subscribing: subscribers get access
to Atomikos control panel web app, making it easy to configure everything.

At first blush this does'nt seem to answer the question posed
personally I would be extremely careful about committing business
functionality using proprietary software where no source is available
http://twiki.atomikos-support.com/bin/view.pl/Main/KnownProblems#Tomcat_JNDI
_Configuration

Perhaps Rainier has input?

Martin--
- Original Message -
From: Peter Fischer [EMAIL PROTECTED]
To: users@tomcat.apache.org
Sent: Thursday, November 08, 2007 5:09 AM
Subject: Re: no UserTransaction in jndi



 Hello,

 under 5.5.9 the configuration has to be
 Resource
 name=UserTransaction
 type=com.atomikos.icatch.jta.UserTransactionImp
 factory=org.apache.naming.factory.BeanFactory/

 With this, the 5.5.9 manager lists the UserTransaction. But I want to use
a
 actual version of tomcat.

 Should the manager list the UserTransaction if it is configured under
5.5.25
 or 6.0.14 with
 Transaction factory=com.atomikos.icatch.jta.UserTransactionFactory /?

 regards,
 Peter
 --
 View this message in context:
http://www.nabble.com/no-UserTransaction-in-jndi-tf4763485.html#a13644275
 Sent from the Tomcat - User mailing list archive at Nabble.com.


 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: I want two application web like root in the same Tomcat

2007-11-08 Thread mgainty
Hi Joan-

with apache front end you can use mod_rewrite to rewrite the URL
http://httpd.apache.org/docs/1.3/mod/mod_rewrite.html

With Tomcat you will need to put on the architect's hat to determine why
have 2 webapps when you only need one webapp(ROOT)
If the 2 webapps accomplish the same functionality and have basically the
same startup parameters and same access capabilities then merge
otherwise keep the apps separate..

Anyone else?
M--

- Original Message -
Wrom: WLSZLKBRNVWWCUFPEGAUTFJMVRESKPNKMBIPBARHDMNNSKV
To: users@tomcat.apache.org
Sent: Thursday, November 08, 2007 6:26 AM
Subject: I want two application web like root in the same Tomcat


Hi,

I want to install two application web like ROOT application, because I need:

- Hidden context's name of url like:

http://domain/ where domain is a virtual host and its source code is
in application web into webapps, so now when I try to show this domain I
have to write http://domain/name_context/index.jsp (for example) and I
don't want it.

If I move source code from my context to ROOT context, It runs.

But I have a problem because I have other application and I want make the
same, but I have only ROOT application.

Resume:

Into webapps I have app1 and app2, and both I want hidden their name_context
in the url.

How I do it?

Thanks

Joan




Joan Monplet Ortega -SoloStocks-
Departament Tècnic
Tel. 902 024 312 - Fax. 93 504 56 05
[EMAIL PROTECTED] mailto:[EMAIL PROTECTED]
[EMAIL PROTECTED] mailto:[EMAIL PROTECTED]

Este mensaje y los documentos que, en su caso, lleve anexos, pueden contener
información confidencial. Por ello, se informa a quien lo reciba por error
que la información contenida en el mismo es reservada y su uso no autorizado
está prohibido legalmente, por lo que en tal caso le rogamos que nos lo
comunique por la misma vía o por teléfono (+34 93 504 5639) , se abstenga de
realizar copias del mensaje o remitirlo o entregarlo a terceras personas y
proceda a borrarlo de inmediato.



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat - threads / throughput limits?

2007-11-08 Thread Andrew Miehs

On 08/11/2007, at 4:51 PM, Jim Cox wrote:


On Nov 8, 2007 10:41 AM,  [EMAIL PROTECTED] wrote:

In resolving our current bottleneck i used JProfiler to see what the
tomcat applications were doing and when under high load there are a  
lot of

threads which are blocked on this:

org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run()

This suggests that they are spending all their time waiting for  
tomcat to

run them, either way they're not runnable anyway.



http80-Processor131 daemon prio=5 tid=0x00baa7c0 nid=0x10f9 in
Object.wait() [0xa5e81000..0xa5e819c8]
   at java.lang.Object.wait(Native Method)
   - waiting on 0xc9d99d20 (a
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable)

FWIW, I always interpreted those as HTTP servicing threads waiting for
something to do (i.e. not a bad thing at all).


Have you tried running your profiler against a tomcat not doing ANY  
requests?


I agree with Jim on this one - These are threads WAITING on a  
connection...

and not doing anything.

Have a look in tomcat manager, and then you can see how many 'free'  
connections

you have.


Cheers

Andrew

smime.p7s
Description: S/MIME cryptographic signature


Re: Tomcat - threads / throughput limits?

2007-11-08 Thread David kerber
It doesn't answer your question in general, but I increased mine from 
300 to 900 threads on a dual-processor, dual-core machine, and saw 
significantly increased throughput with short, simple requests.  I 
didn't try any in-between settings, though, so I don't know if there 
might be a sweet spot somewhere between those settings, and I don't know 
if going higher would help or not, because the setting it's at right now 
handles the full load with no waiting.


D

[EMAIL PROTECTED] wrote:

Hi,

We have an architecture where we have many tomcat app servers load
balanced by apache at the front.

In resolving our current bottleneck i used JProfiler to see what the
tomcat applications were doing and when under high load there are a lot of
threads which are blocked on this:

org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run()

This suggests that they are spending all their time waiting for tomcat to
run them, either way they're not runnable anyway.

Our app pushes through huge quantites of very quick requests - typically
each request takes a total of 50ms.  We have a limit of 300 connections on
our AJP connector.

The point of blocked threads occurs way before we hit that limit.  At the
same time neither the machine is busy, nor are there any obvious problems
with memory usage for the instance.

And indeed; Adding more app servers keeps the load to each one down and
does resolve the problem - i.e. we can increase throughput.

So; My question is, is there a reccomended limit to how many threads
tomcat can handle before it spends more time managing threads than it does
doing real work?

Thanks!
Dan


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



  




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat - threads / throughput limits?

2007-11-08 Thread Jim Cox
On Nov 8, 2007 10:41 AM,  [EMAIL PROTECTED] wrote:
 Hi,

 We have an architecture where we have many tomcat app servers load
 balanced by apache at the front.

 In resolving our current bottleneck i used JProfiler to see what the
 tomcat applications were doing and when under high load there are a lot of
 threads which are blocked on this:

 org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run()

 This suggests that they are spending all their time waiting for tomcat to
 run them, either way they're not runnable anyway.

 Our app pushes through huge quantites of very quick requests - typically
 each request takes a total of 50ms.  We have a limit of 300 connections on
 our AJP connector.

 The point of blocked threads occurs way before we hit that limit.  At the
 same time neither the machine is busy, nor are there any obvious problems
 with memory usage for the instance.

 And indeed; Adding more app servers keeps the load to each one down and
 does resolve the problem - i.e. we can increase throughput.

 So; My question is, is there a reccomended limit to how many threads
 tomcat can handle before it spends more time managing threads than it does
 doing real work?

 Thanks!
 Dan

Not quite answering your question, but re your blocked threads, do
you mean something like the following in a stack dump?

http80-Processor131 daemon prio=5 tid=0x00baa7c0 nid=0x10f9 in
Object.wait() [0xa5e81000..0xa5e819c8]
at java.lang.Object.wait(Native Method)
- waiting on 0xc9d99d20 (a
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable)
at java.lang.Object.wait(Object.java:429)
at 
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:660)
- locked 0xc9d99d20 (a
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable)
at java.lang.Thread.run(Thread.java:534)

FWIW, I always interpreted those as HTTP servicing threads waiting for
something to do (i.e. not a bad thing at all).

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



JNDIRealm AlternateURLs

2007-11-08 Thread Shelley
I have configured a JNDIRealm for LDAP authentication, and actually
have multiple alternateURLs for the LDAP directory.  Is it possible to
specify more than a single connectionURL and alternateURL?

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Tomcat - threads / throughput limits?

2007-11-08 Thread lists
Hi,

We have an architecture where we have many tomcat app servers load
balanced by apache at the front.

In resolving our current bottleneck i used JProfiler to see what the
tomcat applications were doing and when under high load there are a lot of
threads which are blocked on this:

org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run()

This suggests that they are spending all their time waiting for tomcat to
run them, either way they're not runnable anyway.

Our app pushes through huge quantites of very quick requests - typically
each request takes a total of 50ms.  We have a limit of 300 connections on
our AJP connector.

The point of blocked threads occurs way before we hit that limit.  At the
same time neither the machine is busy, nor are there any obvious problems
with memory usage for the instance.

And indeed; Adding more app servers keeps the load to each one down and
does resolve the problem - i.e. we can increase throughput.

So; My question is, is there a reccomended limit to how many threads
tomcat can handle before it spends more time managing threads than it does
doing real work?

Thanks!
Dan


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: I want two application web like root in the same Tomcat

2007-11-08 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Johnny,

Johnny Kewl wrote:
 Cant think of another way

Two Tomcat instances with separate ROOT webapps, plus something like
Apache httpd out front. This is basically the same as the two virtual
hosts suggestion.

- -chris

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHMzR79CaO5/Lv0PARAg8dAKCBRrHne3vCJfd4I70ennX+VNhO7wCeJjRB
oTJ5Uf8+OCbY3Dj6zacGYjE=
=oCD7
-END PGP SIGNATURE-

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: I want two application web like root in the same Tomcat

2007-11-08 Thread Mikolaj Rydzewski

Christopher Schultz wrote:

Two Tomcat instances with separate ROOT webapps, plus something like
Apache httpd out front. This is basically the same as the two virtual
hosts suggestion.
  

With exception of additional memory wasted.

--
Mikolaj Rydzewski [EMAIL PROTECTED]



smime.p7s
Description: S/MIME Cryptographic Signature


Re: I want two application web like root in the same Tomcat

2007-11-08 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Mikolaj,

Mikolaj Rydzewski wrote:
 Christopher Schultz wrote:
 Two Tomcat instances with separate ROOT webapps, plus something like
 Apache httpd out front. This is basically the same as the two virtual
 hosts suggestion.

 With exception of additional memory wasted.

I prefer to think of it as increased flexibility.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHMzgW9CaO5/Lv0PARAuj3AJ4iZHMMQeqf4GCAkMccdt6LHuPLrgCffhLU
xC054sg+bZ2nFq6oGT3ngqg=
=zG/b
-END PGP SIGNATURE-

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



SSL Virtual Hosts

2007-11-08 Thread Carl Vorster
Hi,

I'm trying to set up the following config, but am not sure how to do it.

I want to run virtual hosts through one IP on port 80 - this is easy enough
by looking at the docs.
I then want to run SSL hosts; but every SSL host must map to its own IP due
to SSL configs.

Example:

192.168.0.1 - http://www.host1.com
192.168.0.1 - http://www.host2.com
192.168.0.1 - http://www.host3.com

192.168.0.2 - https://www.host4.com
192.168.0.3 - https://www.host5.com

I can't seem to find any examples or docs on how to do this in server.xml,
can someone please point me in the right direction.

Thanks

Carl


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: j_security_check redirect after login

2007-11-08 Thread Caldarale, Charles R
 From: Andrew R Feller [mailto:[EMAIL PROTECTED] 
 Subject: j_security_check redirect after login
 
 How does j_security_check know where to redirect users to after they
 have logged in?

Read the servlet spec; to quote from SRV.12.5.3.1:
If the form based login is invoked because of an HTTP request, the
original request parameters must be preserved by the container for use
if, on successful authentication, it redirects the call to the requested
resource.

Unless you are going to muck around with Tomcat internals, what
difference does it make how the above is accomplished?

 nor am I able to find out where in the Tomcat source 
 code j_security_check is declared or invoked.

Start with org/apache/catalina/authenticator/AuthenticatorBase.java, in
the invoke() method.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Clustering Tomcat with multiple machines

2007-11-08 Thread Steven Crosley

Thanks Clifford,

So if I'm setting up 3 servers, each tomcat instance needs to have  
this element twice?  Is the mcastAddr, the IP for the other machines?


Membership
className=org.apache.catalina.cluster.mcast.McastService
mcastAddr=228.0.0.4
mcastBindAddress=127.0.0.1
mcastClusterDomain=d10
mcastPort=45564
mcastFrequency=1000
mcastDropTime=3
recoveryCounter=10
recoveryEnabled=true
recoverySleepTime=5000/
Thanks,
Steven

On Nov 8, 2007, at 11:04 AM, Clifford Bryant wrote:


Here are some links that I used to cluster 2 machines.

http://www.ja-sig.org/wiki/display/CASUM/Clustering+CAS
http://tomcat.apache.org/tomcat-5.5-doc/cluster-howto.html

Basically, you need to set up multicast on your network, so that the
machines can share session information.

-Original Message-
From: Steven Crosley [mailto:[EMAIL PROTECTED]
Sent: Thursday, November 08, 2007 12:00 PM
To: users@tomcat.apache.org
Subject: Clustering Tomcat with multiple machines

Hi,

I've been scouring the web for documentation regarding clustering
Tomcat on 3 machines.  The only documentation I can find contains
information about clustering 3 instances of Tomcat on the same  
machine.


Can anyone tell me what exactly would need to be changed in order to
use Tomcat on 3 machines instead of 3 instances on 1 machine?

Thanks,
Steven


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



This e-mail and any files transmitted with it are confidential and  
are intended solely for the use of the individual or entity to whom  
they are addressed.  This communication may contain information that  
is protected from disclosure by applicable law.  If you are not the  
intended recipient, or the employee or agent responsible for  
delivering this communication to the intended recipient, be advised  
that you have received this e-mail in error and any use,  
dissemination, forwarding, printing or copying of this e-mail is  
strictly prohibited.  If you believe that you have received this e- 
mail in error, please immediately notify Edgewater Technology by  
telephone at (781) 246-3343 and delete the communication from all e- 
mail files.



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





Re: SSL Virtual Hosts

2007-11-08 Thread Hassan Schroeder
On Nov 8, 2007 8:27 AM, Carl Vorster [EMAIL PROTECTED] wrote:

 I then want to run SSL hosts; but every SSL host must map to its own IP due
 to SSL configs.

You need a separate Connector for each SSL IP.

-- 
Hassan Schroeder  [EMAIL PROTECTED]

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: I want two application web like root in the same Tomcat

2007-11-08 Thread BuildSmart


On Nov 8, 2007, at 11:41:17, Mikolaj Rydzewski wrote:


Christopher Schultz wrote:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Mikolaj,

Mikolaj Rydzewski wrote:


Christopher Schultz wrote:

Two Tomcat instances with separate ROOT webapps, plus something  
like
Apache httpd out front. This is basically the same as the two  
virtual

hosts suggestion.


With exception of additional memory wasted.



I prefer to think of it as increased flexibility.

If webapps do not need any very special treatment (like complex  
JNDI configuration, some other weird options) there's no need to  
have two tomcats just for that.


Anyway, memory is cheap, but it's wise to know other ways also.


I currently run two webapps from a single installation without any  
issues, the initial configuration was complicated but the end results  
are that  two webapps share the same context and react/respond based  
on the file extension.


JNDI is minimal in both cases (one is a template engine) but I'm not  
convinced that a more complicated configuration couldn't exists  
provided the rules are defined well enough to prevent cross- 
contamination.




--
Mikolaj Rydzewski [EMAIL PROTECTED]



-- Dale





PGP.sig
Description: This is a digitally signed message part


RE: [OT] Tomcat causing high CPU load

2007-11-08 Thread Bob Riaz
Thanks. StringBuilder seems to be the most popular suggestion! I'm going to 
implement this and report on any changes I see in Tomcat's behavior. 
I'm also looking at other possiblities, such as Tomcat's I/O activities causing 
thrashing if I/O is excessive. Would anybody know how I could monitor Tomcat's 
I/O activities? 
Also, is there a way to configure Tomcat so that a connection times out after a 
certain period of time?
Thanks to everyone for your attention and help.

Bob 

-Original Message-
From: Kev Jackson [mailto:[EMAIL PROTECTED]
Sent: Wednesday, November 07, 2007 11:14 PM
To: Tomcat Users List
Subject: Re: [OT] Tomcat causing high CPU load


Hi,
 From a programmatic point of view


 Many thanks for all the suggestions. I found a simple tool called StackTrace 
 from http://www.adaptj.com/root/main/tracehowtos#ht0 to help me take thread 
 dumps from Tomcat. I found when the CPU load was high that there was a thread 
 from the suspect web app running. In contrast, thread dumps taken when CPU 
 load was normal showed no such threads. The line that the web app thread was 
 running at is a simple - data += \n; - this is in a loop collecting form 
 data from hidden vars created by JavaScript code. It's been suggested by ny 
 colleagues that the JVM could be running out of memory since a new String 
 object is created for each +=. The String data ends up being very long 
 anyway. Any thoughts on this would be appreciated.
 Also, would anyone know how to monitor Tomcat's I/O activities? I understand 
 that thrashing could be a drain on memory resources.
 Thanks again for everybody's help!

You could replace the data += \n code with a StringBuilder (Java6) or 
a StringBuffer - this would reduce the number of intermediate objects 
being created quite significantly

Kev

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [OT] Tomcat causing high CPU load

2007-11-08 Thread Andrew Miehs

On 08/11/2007, at 6:29 PM, Bob Riaz wrote:

Thanks. StringBuilder seems to be the most popular suggestion! I'm  
going to implement this and report on any changes I see in Tomcat's  
behavior.
I'm also looking at other possiblities, such as Tomcat's I/O  
activities causing thrashing if I/O is excessive. Would anybody know  
how I could monitor Tomcat's I/O activities?
Also, is there a way to configure Tomcat so that a connection times  
out after a certain period of time?

Thanks to everyone for your attention and help.

Bob



Hi Bob,

You should really have a look at

http://tomcat.apache.org/tomcat-6.0-doc/config/http.html

I will leave how to configure the timeout as an exercise for the  
reader. :-)


Regards


Andrew

smime.p7s
Description: S/MIME cryptographic signature


Re: Tomcat - threads / throughput limits?

2007-11-08 Thread lists


 Have you tried running your profiler against a tomcat not doing ANY
 requests?

 I agree with Jim on this one - These are threads WAITING on a
 connection...
 and not doing anything.

 Have a look in tomcat manager, and then you can see how many 'free'
 connections
 you have.



We only see the blocked threads when the instance is under heavy load. 
When the instances is clean and newly started most threads are idel. 
when it's under medium load you see a few are processing and the vast
majority of the rest are all in net i/o

Then under very heavy load you start to see the blocking...

Well thats what we see anyway!


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Clustering Tomcat with multiple machines

2007-11-08 Thread Steven Crosley

Hi,

I've been scouring the web for documentation regarding clustering  
Tomcat on 3 machines.  The only documentation I can find contains  
information about clustering 3 instances of Tomcat on the same machine.


Can anyone tell me what exactly would need to be changed in order to  
use Tomcat on 3 machines instead of 3 instances on 1 machine?


Thanks,
Steven


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: j_security_check redirect after login

2007-11-08 Thread David Smith
You never directly call j_security_check.  Here's how the process flow 
works:


1. browser attempts to load a protected page
2. tomcat saves the request and redirects the client to j_security_check 
for authentication

3. on successful authentication, tomcat restores the original request.

So basically it knows where because it remembers the protected 
resource requested just before authentication.  This process is defined 
in the servlet spec as pointed out by Chuck Caldarale.


--David

Andrew R Feller wrote:


How does j_security_check know where to redirect users to after they
have logged in?  I have searched for any documentation related to how
j_security_check works but to no avail nor am I able to find out where
in the Tomcat source code j_security_check is declared or invoked.



Thanks,



Andrew R Feller, Analyst

Subversion Administrator

University Information Systems

Louisiana State University

[EMAIL PROTECTED]

(office) 225.578.3737




 




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Clustering Tomcat with multiple machines

2007-11-08 Thread Clifford Bryant
No, just once.  The multicast address is a broadcast address.  It is a
single address.  All servers on the network will listen for it.  You put
the distributable/ tag in the web.xml of the applications that want to
be clustered.

1. You will need to open the multicast port 45564 for UDP, and the TCP
listen port 4001 for TCP.
2. The network interfaces should be enabled for multicast.
ifconfig eth0 multicast
3. Create a multicast route for each network interface.
route add -host 239.255.0.1 dev eth0
(Run these commands as root.)

You can check if multicast is working with,
ping 239.255.0.1
You should get multiple responses back.

Here is the Cluster tag that I am using.  It is slightly modified from
the one on the CAS clustering web page.  (I changed the mcastTTL.)
There is also already a Cluster tag in the Tomcat server.xml that you
can uncomment.  You can try either one.


Cluster
className=org.apache.catalina.cluster.tcp.SimpleTcpCluster
 
managerClassName=org.apache.catalina.cluster.session.DeltaManager
 expireSessionsOnShutdown=false
 useDirtyFlag=true

Membership
 
className=org.apache.catalina.cluster.mcast.McastService
mcastAddr=239.255.0.1
mcastPort=45564
mcastFrequency=500
mcastDropTime=3000
mcastTTL=250/

Receiver
 
className=org.apache.catalina.cluster.tcp.ReplicationListener
tcpListenAddress=10.10.10.96
tcpListenPort=4001
tcpSelectorTimeout=100
tcpThreadCount=6/

Sender
 
className=org.apache.catalina.cluster.tcp.ReplicationTransmitter
replicationMode=pooled/

Valve
className=org.apache.catalina.cluster.tcp.ReplicationValve
 
filter=.*\.gif;.*\.js;.*\.jpg;.*\.htm;.*\.html;.*\.txt; /

ClusterListener
className=org.apache.catalina.cluster.session.ClusterSessionListener/

/Cluster



-Original Message-
From: Steven Crosley [mailto:[EMAIL PROTECTED] 
Sent: Thursday, November 08, 2007 12:16 PM
To: Tomcat Users List
Subject: Re: Clustering Tomcat with multiple machines

Thanks Clifford,

So if I'm setting up 3 servers, each tomcat instance needs to have  
this element twice?  Is the mcastAddr, the IP for the other machines?

Membership
className=org.apache.catalina.cluster.mcast.McastService
mcastAddr=228.0.0.4
mcastBindAddress=127.0.0.1
mcastClusterDomain=d10
mcastPort=45564
mcastFrequency=1000
mcastDropTime=3
recoveryCounter=10
recoveryEnabled=true
recoverySleepTime=5000/
Thanks,
Steven

On Nov 8, 2007, at 11:04 AM, Clifford Bryant wrote:

 Here are some links that I used to cluster 2 machines.

 http://www.ja-sig.org/wiki/display/CASUM/Clustering+CAS
 http://tomcat.apache.org/tomcat-5.5-doc/cluster-howto.html

 Basically, you need to set up multicast on your network, so that the
 machines can share session information.

 -Original Message-
 From: Steven Crosley [mailto:[EMAIL PROTECTED]
 Sent: Thursday, November 08, 2007 12:00 PM
 To: users@tomcat.apache.org
 Subject: Clustering Tomcat with multiple machines

 Hi,

 I've been scouring the web for documentation regarding clustering
 Tomcat on 3 machines.  The only documentation I can find contains
 information about clustering 3 instances of Tomcat on the same  
 machine.

 Can anyone tell me what exactly would need to be changed in order to
 use Tomcat on 3 machines instead of 3 instances on 1 machine?

 Thanks,
 Steven


 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



 This e-mail and any files transmitted with it are confidential and  
 are intended solely for the use of the individual or entity to whom  
 they are addressed.  This communication may contain information that  
 is protected from disclosure by applicable law.  If you are not the  
 intended recipient, or the employee or agent responsible for  
 delivering this communication to the intended recipient, be advised  
 that you have received this e-mail in error and any use,  
 dissemination, forwarding, printing or copying of this e-mail is  
 strictly prohibited.  If you believe that you have received this e- 
 mail in error, please immediately notify Edgewater Technology by  
 telephone at (781) 246-3343 and delete the communication from all e- 
 mail files.


 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




This e-mail and any files transmitted with it are confidential and are intended 
solely for the use of the individual or entity to whom they are addressed.  
This communication may contain information that is protected 

specify class name in environment or system property...?

2007-11-08 Thread Asare Samuel
Making a web application sort of following:

http://www.netbeans.org/kb/55/mysql-webapp.html#preparingDB

I made a class that connects to the DB ie accessDB and have put two methods 
inside: 

public void insert(a,c) inserts record into database
public String getContent() gets content

I then put in little tester Main method to test the 2 methods thats when i get 
this error

Need to specify class name in environment or system property, or as an applet 
parameter, or in an application resource file: java.naming.factory.initial
null

Please can anyone help me???

Thanks in advance.

   
-
 Yahoo! Answers - Get better answers from someone who knows. Tryit now.

Re: Clustering Tomcat with multiple machines

2007-11-08 Thread Filip Hanik - Dev Lists

remove the mcastBindAddress attribute

Filip


Steven Crosley wrote:

Thanks Clifford,

So if I'm setting up 3 servers, each tomcat instance needs to have 
this element twice?  Is the mcastAddr, the IP for the other machines?


Membership
className=org.apache.catalina.cluster.mcast.McastService
mcastAddr=228.0.0.4
mcastBindAddress=127.0.0.1
mcastClusterDomain=d10
mcastPort=45564
mcastFrequency=1000
mcastDropTime=3
recoveryCounter=10
recoveryEnabled=true
recoverySleepTime=5000/
Thanks,
Steven

On Nov 8, 2007, at 11:04 AM, Clifford Bryant wrote:


Here are some links that I used to cluster 2 machines.

http://www.ja-sig.org/wiki/display/CASUM/Clustering+CAS
http://tomcat.apache.org/tomcat-5.5-doc/cluster-howto.html

Basically, you need to set up multicast on your network, so that the
machines can share session information.

-Original Message-
From: Steven Crosley [mailto:[EMAIL PROTECTED]
Sent: Thursday, November 08, 2007 12:00 PM
To: users@tomcat.apache.org
Subject: Clustering Tomcat with multiple machines

Hi,

I've been scouring the web for documentation regarding clustering
Tomcat on 3 machines.  The only documentation I can find contains
information about clustering 3 instances of Tomcat on the same machine.

Can anyone tell me what exactly would need to be changed in order to
use Tomcat on 3 machines instead of 3 instances on 1 machine?

Thanks,
Steven


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



This e-mail and any files transmitted with it are confidential and 
are intended solely for the use of the individual or entity to whom 
they are addressed.  This communication may contain information that 
is protected from disclosure by applicable law.  If you are not the 
intended recipient, or the employee or agent responsible for 
delivering this communication to the intended recipient, be advised 
that you have received this e-mail in error and any use, 
dissemination, forwarding, printing or copying of this e-mail is 
strictly prohibited.  If you believe that you have received this 
e-mail in error, please immediately notify Edgewater Technology by 
telephone at (781) 246-3343 and delete the communication from all 
e-mail files.



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






No virus found in this incoming message.
Checked by AVG Free Edition. 
Version: 7.5.503 / Virus Database: 269.15.25/1118 - Release Date: 11/8/2007 9:29 AM
  



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: I want two application web like root in the same Tomcat

2007-11-08 Thread Mikolaj Rydzewski

Christopher Schultz wrote:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Mikolaj,

Mikolaj Rydzewski wrote:
  

Christopher Schultz wrote:


Two Tomcat instances with separate ROOT webapps, plus something like
Apache httpd out front. This is basically the same as the two virtual
hosts suggestion.
  

With exception of additional memory wasted.



I prefer to think of it as increased flexibility.
  
If webapps do not need any very special treatment (like complex JNDI 
configuration, some other weird options) there's no need to have two 
tomcats just for that.


Anyway, memory is cheap, but it's wise to know other ways also.

--
Mikolaj Rydzewski [EMAIL PROTECTED]



smime.p7s
Description: S/MIME Cryptographic Signature


j_security_check redirect after login

2007-11-08 Thread Andrew R Feller
How does j_security_check know where to redirect users to after they
have logged in?  I have searched for any documentation related to how
j_security_check works but to no avail nor am I able to find out where
in the Tomcat source code j_security_check is declared or invoked.

 

Thanks,

 

Andrew R Feller, Analyst

Subversion Administrator

University Information Systems

Louisiana State University

[EMAIL PROTECTED]

(office) 225.578.3737

 



Problem configuring JDBC DataSource Tomcat 5.5.23 / MySQL 5.0

2007-11-08 Thread NBW
Hi, I'm having difficulty configuring a container managed JDBC
resource. I've read several posts in the tomcat-users archives
(discussing similar issues) as well as the documentation at:

http://tomcat.apache.org/tomcat-5.5-doc/jndi-resources-howto.html

My environments looks like this:

Tomcat 5.5.23 (Windows XP)
MySQL 5.0.45
MySQL Connector/J 5.1.5
JDK 1.6.0_02

My context.xml is deployed in %TOMCAT_HOME%/webapps/myApp/META-INF and
contains the following:

?xml version=1.0 encoding=UTF-8?
Context path=/myApp docBase=myApp debug=5 reloadable=true
crossContext=true

Resource name=jdbc/MyDB auth=Container
type=javax.sql.DataSource maxActive=100 maxIdle=30
  maxWait=1 username=mydbuser password=mydbuser
driverClassName=com.mysql.jdbc.Driver
  validationQuery=/* ping */ logAbandoned=true
removeAbandoned=true removeAbandonedTimeout=60
  url=jdbc:mysql://localhost:3306/myApp_db1/

/Context

My web.xml file is located in %TOMCAT_HOME%/webapps/myApp/WEB-INF and
contains among other things the following:

?xml version=1.0 encoding=UTF-8?
web-app version=2.4
 xmlns=http://java.sun.com/xml/ns/j2ee;
 xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
 xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd; 

resource-ref
descriptionDB Connection/description
res-ref-namejdbc/MyDB/res-ref-name
res-typejavax.sql.DataSource/res-type
res-authContainer/res-auth
/resource-ref

...
/web-app

The MySQL driver JAR is deployed in %TOMCAT_HOME%/webapps/myApp/WEB-INF/lib

Finally, my code trying to load the resource is the following:

Context initCtx = new InitialContext();
Context envCtx = (Context) initCtx.lookup(java:comp/env);
DataSource myDataSource = (DataSource) envCtx.lookup(jdbc/MyDB);

When I deploy and run I am getting the following exception:

2007-11-08 12:41:31,593 [Thread-1] ERROR Unable get a SQL connection:
org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC
driver of class '' for connect URL 'null'
at 
org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:780)
at 
org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSource.java:540)
[SNIP]
at com.myApp.InitServlet.init(InitServlet.java:56)
at 
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1139)
at 
org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:966)
at 
org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3956)
at 
org.apache.catalina.core.StandardContext.start(StandardContext.java:4230)
at 
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:760)
at 
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:740)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:544)
at 
org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:626)
at 
org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:553)
at 
org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:488)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1138)
at 
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
at 
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:120)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1022)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:736)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
at 
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
at 
org.apache.catalina.core.StandardService.start(StandardService.java:448)
at 
org.apache.catalina.core.StandardServer.start(StandardServer.java:700)
at org.apache.catalina.startup.Catalina.start(Catalina.java:552)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433)
Caused by: java.lang.NullPointerException
at sun.jdbc.odbc.JdbcOdbcDriver.getProtocol(JdbcOdbcDriver.java:507)
at sun.jdbc.odbc.JdbcOdbcDriver.knownURL(JdbcOdbcDriver.java:476)
at sun.jdbc.odbc.JdbcOdbcDriver.acceptsURL(JdbcOdbcDriver.java:307)
at java.sql.DriverManager.getDriver(DriverManager.java:253)
at 

replacement for XDoclet?

2007-11-08 Thread Edoardo Panfili
Hi,

I am using Xdoclet 1.2.3 for web.xml generation.
Now I am starting to use java5 annotations and seems that Xdoclet
dislikes annotations.

Are there other tools for web.xml generation? I can't find solutions
searching on the net.
Can I use annotaions as a partial replacement of web.xml?

thank you
Edoardo

-- 
Jabber: [EMAIL PROTECTED]
tel: 075 9142766

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: specify class name in environment or system property...?

2007-11-08 Thread David kerber
Any of those methods will likely work; I prefer the java.util.Properties 
object and its various methods, and read the settings from a disk file.


For settings that I don't need to change much (or ever), I usually use 
system.properties, and set them in the jvm startup properties.



Asare Samuel wrote:

Making a web application sort of following:

http://www.netbeans.org/kb/55/mysql-webapp.html#preparingDB

I made a class that connects to the DB ie accessDB and have put two methods inside: 


public void insert(a,c) inserts record into database
public String getContent() gets content

I then put in little tester Main method to test the 2 methods thats when i get 
this error

Need to specify class name in environment or system property, or as an applet 
parameter, or in an application resource file: java.naming.factory.initial
null

Please can anyone help me???

Thanks in advance.

   
-

 Yahoo! Answers - Get better answers from someone who knows. Tryit now.
  




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Problem configuring JDBC DataSource Tomcat 5.5.23 / MySQL 5.0

2007-11-08 Thread Gabe Wong

NBW wrote:

Hi, I'm having difficulty configuring a container managed JDBC
resource. I've read several posts in the tomcat-users archives
(discussing similar issues) as well as the documentation at:

http://tomcat.apache.org/tomcat-5.5-doc/jndi-resources-howto.html
  
The MySQL driver JAR is deployed in %TOMCAT_HOME%/webapps/myApp/WEB-INF/lib

2007-11-08 12:41:31,593 [Thread-1] ERROR Unable get a SQL connection:
org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC
driver of class '' for connect URL 'null'
at 
org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:780)
at 
org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSource.java:540)
[SNIP]
at com.myApp.InitServlet.init(InitServlet.java:56)


Refer to the following topic in the same URL you provided above:
1. Install Your JDBC Driver
Use of the /JDBC Data Sources/ JNDI Resource Factory requires that you 
make an appropriate JDBC driver available to both Tomcat internal 
classes and to your web application. This is most easily accomplished by 
installing the driver's JAR file(s) into the |$CATALINA_HOME/common/lib| 
directory, which makes the driver available both to the resource factory 
and to your application.


--
Regards

Gabe Wong
NGASI AppServer Manager
Application server installation and configuration AUTOMATION
http://www.ngasi.com


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Issue finding Worker using mod_jk ...

2007-11-08 Thread Filip Hanik - Dev Lists
you must define the JkMount directive inside your httpd.conf file to map 
a worker to a  URL


in this case I believe it would be

JkMount / ein1
JkMount /* ein1

Filip

Kim Albee wrote:

We are having an issue when setting up integration between Apache 2.0.52 and
Tomcat 6.0.14...

Here are the mod_jk.log entries:

[Wed Nov 07 14:31:25 2007]  [jk_uri_worker_map.c (445)]: Into
jk_uri_worker_map_t::map_uri_to_worker
[Wed Nov 07 14:31:25 2007]  [jk_uri_worker_map.c (459)]: Attempting to map
URI '/'
[Wed Nov 07 14:31:25 2007]  [jk_uri_worker_map.c (473)]:
jk_uri_worker_map_t::map_uri_to_worker, Found an exact match ein1 - /
[Wed Nov 07 14:31:25 2007]  [mod_jk.c (1689)]: Into handler r-proxyreq=0
r-handler=jakarta-servlet r-notes=158639048 worker=ein1
[Wed Nov 07 14:31:25 2007]  [jk_worker.c (90)]: Into wc_get_worker_for_name
ein1
[Wed Nov 07 14:31:25 2007]  [jk_worker.c (94)]: wc_get_worker_for_name, done
did not find a worker

The workers.properties file looks like this:

workers.tomcat_home=/usr/local/tomcat6
workers.java_home=$JAVA_HOME
ps=/
worker.list=ein1


worker.ein1.port=8109
worker.ein1.host=localhost
worker.ein1.type=ajp13
worker.ein1.info=Ajp13 forwarding
worker.ein1.debug=2
worker.ein1.tomcatId=ein1

We have the jvmRoute set in the Engine parameter for the server.xml in
tomcat as well...

Any suggestions on how to get this working?

thanks,
Kim :-)

  



No virus found in this incoming message.
Checked by AVG Free Edition. 
Version: 7.5.503 / Virus Database: 269.15.25/1118 - Release Date: 11/8/2007 9:29 AM
  



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



apache intermittently returning 503 errors from tomcat

2007-11-08 Thread Tom H


Hi,

On my RHEL4 ES box, with tomcat 5.5.9 from the redhat Application Server 
subscription package - I am seeing these messages in the catalina.out 
and these correspond to a 503 error displayed to the browser;

08-Nov-2007 20:34:45 org.apache.jk.common.ChannelSocket processConnection
WARNING: processCallbacks status 2
08-Nov-2007 20:34:49 org.apache.jk.server.JkCoyoteHandler action
WARNING: Unable to send headers
java.net.SocketException: Broken pipe
   at java.net.SocketOutputStream.socketWrite0(Native Method)
   at 
java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:105)

   at java.net.SocketOutputStream.write(SocketOutputStream.java:149)
   at org.apache.jk.common.ChannelSocket.send(ChannelSocket.java:509)
   at 
org.apache.jk.server.JkCoyoteHandler.appendHead(JkCoyoteHandler.java:410)
   at 
org.apache.jk.server.JkCoyoteHandler.action(JkCoyoteHandler.java:425)


Any idea what the cause/solution to this is?

Thanks,

Tom

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Issue finding Worker using mod_jk ...

2007-11-08 Thread Kim Albee
Filip,

Yep, we're doing that...it's in the Virtual Host directive.

Thanks,
Kim ;-)

On Nov 8, 2007 12:21 PM, Filip Hanik - Dev Lists [EMAIL PROTECTED] wrote:
 you must define the JkMount directive inside your httpd.conf file to map
 a worker to a  URL

 in this case I believe it would be

 JkMount / ein1
 JkMount /* ein1

 Filip


 Kim Albee wrote:
  We are having an issue when setting up integration between Apache 2.0.52 and
  Tomcat 6.0.14...
 
  Here are the mod_jk.log entries:
 
  [Wed Nov 07 14:31:25 2007]  [jk_uri_worker_map.c (445)]: Into
  jk_uri_worker_map_t::map_uri_to_worker
  [Wed Nov 07 14:31:25 2007]  [jk_uri_worker_map.c (459)]: Attempting to map
  URI '/'
  [Wed Nov 07 14:31:25 2007]  [jk_uri_worker_map.c (473)]:
  jk_uri_worker_map_t::map_uri_to_worker, Found an exact match ein1 - /
  [Wed Nov 07 14:31:25 2007]  [mod_jk.c (1689)]: Into handler r-proxyreq=0
  r-handler=jakarta-servlet r-notes=158639048 worker=ein1
  [Wed Nov 07 14:31:25 2007]  [jk_worker.c (90)]: Into wc_get_worker_for_name
  ein1
  [Wed Nov 07 14:31:25 2007]  [jk_worker.c (94)]: wc_get_worker_for_name, done
  did not find a worker
 
  The workers.properties file looks like this:
 
  workers.tomcat_home=/usr/local/tomcat6
  workers.java_home=$JAVA_HOME
  ps=/
  worker.list=ein1
 
 
  worker.ein1.port=8109
  worker.ein1.host=localhost
  worker.ein1.type=ajp13
  worker.ein1.info=Ajp13 forwarding
  worker.ein1.debug=2
  worker.ein1.tomcatId=ein1
 
  We have the jvmRoute set in the Engine parameter for the server.xml in
  tomcat as well...
 
  Any suggestions on how to get this working?
 
  thanks,
  Kim :-)
 
 
  
 
  No virus found in this incoming message.
  Checked by AVG Free Edition.
  Version: 7.5.503 / Virus Database: 269.15.25/1118 - Release Date: 11/8/2007 
  9:29 AM
 


 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Problem configuring JDBC DataSource Tomcat 5.5.23 / MySQL 5.0

2007-11-08 Thread NBW
For the record I discovered the problem. Somehow there was a
context.xml file located in %TOMCAT_HOME%\conf\Catalina\localhost for
my web apps context which contained an empty context node. Once I
deleted that one and redeployed the correct context.xml was put in
there.  Not sure why the one from my webapps META-INF directory wasn't
replacing that one to begin with like it did after I deleted it.

On Nov 8, 2007 2:07 PM, NBW [EMAIL PROTECTED] wrote:
 Hi Gabe,

 I'd seen those instructions and that was one of the first things I
 tried but I'm still getting the same exception. I've tried placing
 mysql-connector-java-5.1.5-bin.jar in %TOMCAT_HOME%/common/lib. I've
 also tried with it just in my web app's lib directory and I've tried
 with it in both locations.

 Based on what I am seeing in Catalina's MBean attributes for the
 DataSource (see my original post)  I feel like this has something to
 do with the Resource configuration but since it agrees with the
 documentation I'm at a bit of a loss.


 On Nov 8, 2007 1:18 PM, Gabe Wong [EMAIL PROTECTED] wrote:

  Refer to the following topic in the same URL you provided above:
  1. Install Your JDBC Driver
  Use of the /JDBC Data Sources/ JNDI Resource Factory requires that you
  make an appropriate JDBC driver available to both Tomcat internal
  classes and to your web application. This is most easily accomplished by
  installing the driver's JAR file(s) into the |$CATALINA_HOME/common/lib|
  directory, which makes the driver available both to the resource factory
  and to your application.
 


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: apache intermittently returning 503 errors from tomcat

2007-11-08 Thread Caldarale, Charles R
 From: Tom H [mailto:[EMAIL PROTECTED] 
 Subject: Re: apache intermittently returning 503 errors from tomcat
 
 On my RHEL4 ES box, with tomcat 5.5.9 from the redhat Application 
 Server subscription package

What happens if you try it with a real - and current - Tomcat download
from http://tomcat.apache.org?  There are numerous reports of problems
with 3rd-party repackaged versions.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat native lib on OS X

2007-11-08 Thread Stephen Caine

Lorenzo,

We use Tomcat on OS X 10.5 and not only does it run great, the  
improvements in memory management (true 64 bit) are impressive.


Stephen Caine
Soft Breeze Systems, LLC


Isn't there anyone who got the native stuff working on a Mac?

I followed all the steps. I compiled the source without any erros.  
The resulting libraries were copied to every place I can possibly  
imagine (/usr/bin, /usr/local/bin, JAVA_HOME dir, CATALINE_HOME dir,  
TOMCAT_HOME dir, CATALINA_HOME/common/lib, CATALINA_HOME/native etc  
etc)
but no matter what, tomcat keeps complaining that it can't find  
them... That sucks. The solver of this problem will be highly  
rewarded with a bag of white rice ;-)


PS: For thos interested, I installed Leopard and tomcat still runs.  
Cool huh?


Thanks
Regards
Lorenzo.

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: j_security_check redirect after login

2007-11-08 Thread Andrew R Feller
Christopher,

Please accept my apologies for my poor reactions.  Thank you and others
(Chuck, Matthias) for taking more time than you had to help me with this
issue.

Regards,

Andrew R Feller, Analyst
Subversion Administrator
University Information Systems
Louisiana State University
[EMAIL PROTECTED]
(office) 225.578.3737

-Original Message-
From: Christopher Schultz [mailto:[EMAIL PROTECTED] 
Sent: Thursday, November 08, 2007 3:07 PM
To: Tomcat Users List
Subject: Re: j_security_check redirect after login

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Andrew,

Andrew R Feller wrote:
 I'm sorry but maybe I am reading a different version of the servlet 
 specification than you: it only explains the case where you access a 
 container-managed resource and then login.

That would be the only case covered by the servlet specification. Your
question about what happens when drive-by logins are attempted (trying
to submit directly to j_security_check with no prior request for a
protected resource) can easily be answered by trying it: you'll find
that Tomcat responds with either a 404 NOT FOUND error or something else
entirely unhelpful.

The specification only provides for a request / challenge /
authentication / re-process request cycle.

Anything else the servlet container chooses to support is outside of the
specification. Since Tomcat does not implement anything outside the
specification in this area, there is no further documentation to
provide.

 The question I had was what happens when you directly request the
 login form and successfully login.  As you never requested a
 container-managed resource, then how does it know where to send you.

Not only will it not know where to send you, but it will not work at
all. If you want to do unsolicited logins, you will need to use a
3rd-party authentication scheme like securityfilter or ACEGI.

 David Smith atleast understood it well enough to answer with the
 thought that the servlet container wouldn't allow you to access the
 login form directly.

I understood. Perhaps my reply was terse, but anything not covered by
the servlet specification should be considered undefined behavior by
definition. I was trying to point that out, perhaps a bit too subtly.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHM3pk9CaO5/Lv0PARAhzTAKCnK8uLLP1FMcWD50WQ3penMLFKPwCgq4rA
gNMqGdTMdSjFRA7CFHe8dUw=
=24DQ
-END PGP SIGNATURE-

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: j_security_check redirect after login

2007-11-08 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Andrew,

Andrew R Feller wrote:
 I'm sorry but maybe I am reading a different version of the servlet 
 specification than you: it only explains the case where you access a 
 container-managed resource and then login.

That would be the only case covered by the servlet specification. Your
question about what happens when drive-by logins are attempted (trying
to submit directly to j_security_check with no prior request for a
protected resource) can easily be answered by trying it: you'll find
that Tomcat responds with either a 404 NOT FOUND error or something else
entirely unhelpful.

The specification only provides for a request / challenge /
authentication / re-process request cycle.

Anything else the servlet container chooses to support is outside of the
specification. Since Tomcat does not implement anything outside the
specification in this area, there is no further documentation to provide.

 The question I had was what happens when you directly request the
 login form and successfully login.  As you never requested a
 container-managed resource, then how does it know where to send you.

Not only will it not know where to send you, but it will not work at
all. If you want to do unsolicited logins, you will need to use a
3rd-party authentication scheme like securityfilter or ACEGI.

 David Smith atleast understood it well enough to answer with the
 thought that the servlet container wouldn't allow you to access the
 login form directly.

I understood. Perhaps my reply was terse, but anything not covered by
the servlet specification should be considered undefined behavior by
definition. I was trying to point that out, perhaps a bit too subtly.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHM3pk9CaO5/Lv0PARAhzTAKCnK8uLLP1FMcWD50WQ3penMLFKPwCgq4rA
gNMqGdTMdSjFRA7CFHe8dUw=
=24DQ
-END PGP SIGNATURE-

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: j_security_check redirect after login

2007-11-08 Thread Caldarale, Charles R
 From: Andrew R Feller [mailto:[EMAIL PROTECTED] 
 Subject: RE: j_security_check redirect after login
 
 I'm sorry but maybe I am reading a different version of the servlet
 specification than you: it only explains the case where you access a
 container-managed resource and then login.

Form-based login is still container-managed, so the description in the
servlet spec still applies.

 The question I had was what happens when you directly request 
 the login form and successfully login.

That certainly wasn't clear from your original question - there was no
mention of accessing the login form directly.

In any event, the Tomcat 5.5 admin app uses form-based login, so it's a
convenient tool to experiment with.  Attempting to access the form
directly (/admin/login.jsp) results in the form being displayed
properly, but when it's submitted, a 404 is returned with the
description The requested resource (/admin/j_security_check) is not
available.  This makes sense, since Tomcat didn't do a save of the the
original request and generate an internal one for the login page, so it
doesn't know that login processing is going on.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: j_security_check redirect after login

2007-11-08 Thread Propes, Barry L
if you're talking about someone bookmarking the login page or something, then 
yes, this will not work!

They can't just arbirtarily go to it -- it only gets served from redirect I 
believe. It would -- I believe -- be trying to redirect, and would not know 
where to redirect.


-Original Message-
From: Andrew R Feller [mailto:[EMAIL PROTECTED]
Sent: Thursday, November 08, 2007 2:42 PM
To: Tomcat Users List
Subject: RE: j_security_check redirect after login


Christopher,

I'm sorry but maybe I am reading a different version of the servlet
specification than you: it only explains the case where you access a
container-managed resource and then login.

The question I had was what happens when you directly request the login
form and successfully login.  As you never requested a container-managed
resource, then how does it know where to send you.  David Smith atleast
understood it well enough to answer with the thought that the servlet
container wouldn't allow you to access the login form directly.  If that
is the case, then my worries are eased.  If not, then I will deal with
it then.

I've got enough information that I can work out the rest from here;
thanks to those that have given some useful information and not just
witty remarks.

Andrew R Feller, Analyst
Subversion Administrator
University Information Systems
Louisiana State University
[EMAIL PROTECTED]
(office) 225.578.3737

-Original Message-
From: Christopher Schultz [mailto:[EMAIL PROTECTED] 
Sent: Thursday, November 08, 2007 1:40 PM
To: Tomcat Users List
Subject: Re: j_security_check redirect after login

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Andrew,

Andrew R Feller wrote:
 3. It is unclear what happens in the event when a user requests the
 form-
login-page directly instead of going through a container-managed 
resource.
 
How does j_security_check know where to redirect the user once he
has
authenticated successfully?

If you're still asking, please read section 12.5.3 of the servlet
specification: it tells you exactly what the servlet container is
expected to do. It's available online from Sun's website.

If you want to see /how/ it's done, you're going to have to dig around
in the Tomcat source code.

Th reason the code is not documented is because the specification
outlines the behavior: there's no reason to document the code, etc.

- -chris

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHM2Yq9CaO5/Lv0PARAhzaAJ99NhIYjUUlY0seR/GDElFtDiklJQCfZrDb
5ouywvbE1WtVoKVzOKrV0II=
=B+j0
-END PGP SIGNATURE-

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: serving files through SSL

2007-11-08 Thread Roger Parkinson

I obviously did not look hard enough in the right places, sorry.
That worked. Specifically:
 response.setHeader(Pragma, cache);
 response.setHeader(Cache-Control, cache);
fixed it.

Thanks for the help.
Roger


Caldarale, Charles R wrote:
From: Roger Parkinson [mailto:[EMAIL PROTECTED] 
Subject: Re: serving files through SSL


I've identified that the cache headers are being set by 
default on the dynamic file. I don't know that they are

the issue but it is the one difference I can spot.



As you've been told before, it definitely is the issue.  To repeat:

This is a known problem with IE.  A search of the archives
(http://marc.info/?l=tomcat-user) for pdf cache turns up numerous
hits, including this one:

http://marc.info/?l=tomcat-userm=108431336725309w=2

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


  


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: j_security_check redirect after login

2007-11-08 Thread Andrew R Feller
Christopher,

I'm sorry but maybe I am reading a different version of the servlet
specification than you: it only explains the case where you access a
container-managed resource and then login.

The question I had was what happens when you directly request the login
form and successfully login.  As you never requested a container-managed
resource, then how does it know where to send you.  David Smith atleast
understood it well enough to answer with the thought that the servlet
container wouldn't allow you to access the login form directly.  If that
is the case, then my worries are eased.  If not, then I will deal with
it then.

I've got enough information that I can work out the rest from here;
thanks to those that have given some useful information and not just
witty remarks.

Andrew R Feller, Analyst
Subversion Administrator
University Information Systems
Louisiana State University
[EMAIL PROTECTED]
(office) 225.578.3737

-Original Message-
From: Christopher Schultz [mailto:[EMAIL PROTECTED] 
Sent: Thursday, November 08, 2007 1:40 PM
To: Tomcat Users List
Subject: Re: j_security_check redirect after login

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Andrew,

Andrew R Feller wrote:
 3. It is unclear what happens in the event when a user requests the
 form-
login-page directly instead of going through a container-managed 
resource.
 
How does j_security_check know where to redirect the user once he
has
authenticated successfully?

If you're still asking, please read section 12.5.3 of the servlet
specification: it tells you exactly what the servlet container is
expected to do. It's available online from Sun's website.

If you want to see /how/ it's done, you're going to have to dig around
in the Tomcat source code.

Th reason the code is not documented is because the specification
outlines the behavior: there's no reason to document the code, etc.

- -chris

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHM2Yq9CaO5/Lv0PARAhzaAJ99NhIYjUUlY0seR/GDElFtDiklJQCfZrDb
5ouywvbE1WtVoKVzOKrV0II=
=B+j0
-END PGP SIGNATURE-

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Detecting whether Win Service or Console App

2007-11-08 Thread Normen Ruhrus
Hi there,

 

iam deploying a servlet app via Tomcat sometimes as a Windows Service and
sometimes as a standard Windows Console App.

Since I need to implement different behavior in the servlet, I would need a
way from inside the Servlet code to detect if the Tomcat this Servlet runs
in, runs as Windows Service or Win Console App.

 

Hope someone is so kind to help me out with this one.

 

Thanks in advance

 

Normen



Re: serving files through SSL

2007-11-08 Thread Roger Parkinson

Gabe:
1) response.setContentLength(10115);
Yep, hard coded value figured by checking the length of my test pdf file 
manually. I believe it is correct. I don't want to add the code that 
would figure the length unless I have some evidence that it makes any 
difference and it hasn't yet.
2) I changed the ETag to add the extra quote but that made no 
difference. I believe that the ETag is just a semi-random string ('semi' 
meaning it is the same value for the same file but otherwise randomly 
generated). So the actual content should make no difference.


I'm still looking for the difference between the response for the static 
file and the response for the dynamic file. I've identified that the 
cache headers are being set by default on the dynamic file. Is there a 
way to turn these off? I don't know that they are the issue but it is 
the one difference I can spot.


Thanks
Roger

Gabe Wong wrote:

Roger Parkinson wrote:
I'm opening the PDF in a new window (as the javascript shows) so what 
I see for the dynamic pdf is:

1) the new window (empty)
2) the download progress dialog
3) an error dialog referring the file name with the message 'cannot 
write the file to the cache'


On the static PDF I don't see 2 or 3 and the new window has the PDF 
displayed.
(I' using the terms dynamic and static as referred to in my initial 
question, ie static is the PDF in the war file that always works and 
dynamic is the one fetched from outside the war file by a servlet and 
this is the one with the problem).


I did search on that cache message and all the solutions told me to 
either upgrade my browser from 5.5 (I'm using 6), change the browser 
config, or set the cache headers that seem to be already set. It was 
when I realised that the static PDF was always just fine that I 
concluded that the problem did not need to be solved at the browser end.

1)response.setContentLength(10115);
Is 10115 a hard coded number or just there as an illustration. If it 
is hard coded then the content length should be set to the

correct value.
2)   response.addHeader(ETag,W/\963288-1194247031062);
Perhaps the missing \ at the end could be a problem?





-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: j_security_check redirect after login

2007-11-08 Thread Andrew R Feller
Thank you Chuck, Matthias; I appreciate the direction.  The reasons why
I ask are:

1. There were no apparent connections between requesting a
container-managed 
   resource, logging in via the form-login-page, and receiving the 
   originally requested container-managed resource.

2. Little documentation on j_security_check from vendors; just assumes 
   people know it is part of the servlet specification.

3. It is unclear what happens in the event when a user requests the
form-
   login-page directly instead of going through a container-managed 
   resource.

   How does j_security_check know where to redirect the user once he has

   authenticated successfully?

4. I appreciate understanding exactly what is going on in a system.

Andrew R Feller, Analyst
Subversion Administrator
University Information Systems
Louisiana State University
[EMAIL PROTECTED]
(office) 225.578.3737

-Original Message-
From: Reich, Matthias [mailto:[EMAIL PROTECTED] 
Sent: Thursday, November 08, 2007 12:08 PM
To: Tomcat Users List
Subject: RE: j_security_check redirect after login


 You should also have a look at
/org/apache/catalina/authenticator/FormAuthenticator.java
 
In this class you can find the details about how requests are saved and
restored.

When I once digged into the details I wondered whether it is correct to
restore all the headers of the original request.
E.g., if a user clears the browser cache while the browser shows the
login dialog,
the resubmit of the original request will not include an
'if-modified-since' header,
which was available in the stored request.
In such a situation the servlet will see the header from the original
request and could decide to return NOT MODIFIED status.

The servlet spec does not tell you if this is correct behavior or not,
but it may be interesting to know about this behavior.
(And that's why we like open source projects where we can look how it
really works :-)


Regards,
Matthias

-Original Message-
From: Caldarale, Charles R [mailto:[EMAIL PROTECTED] 
Sent: Thursday, November 08, 2007 6:02 PM
To: Tomcat Users List
Subject: RE: j_security_check redirect after login

 From: Andrew R Feller [mailto:[EMAIL PROTECTED] 
 Subject: j_security_check redirect after login
 
 How does j_security_check know where to redirect users to after they
 have logged in?

Read the servlet spec; to quote from SRV.12.5.3.1:
If the form based login is invoked because of an HTTP request, the
original request parameters must be preserved by the container for use
if, on successful authentication, it redirects the call to the requested
resource.

Unless you are going to muck around with Tomcat internals, what
difference does it make how the above is accomplished?

 nor am I able to find out where in the Tomcat source 
 code j_security_check is declared or invoked.

Start with org/apache/catalina/authenticator/AuthenticatorBase.java, in
the invoke() method.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Problem configuring JDBC DataSource Tomcat 5.5.23 / MySQL 5.0

2007-11-08 Thread NBW
Hi Gabe,

I'd seen those instructions and that was one of the first things I
tried but I'm still getting the same exception. I've tried placing
mysql-connector-java-5.1.5-bin.jar in %TOMCAT_HOME%/common/lib. I've
also tried with it just in my web app's lib directory and I've tried
with it in both locations.

Based on what I am seeing in Catalina's MBean attributes for the
DataSource (see my original post)  I feel like this has something to
do with the Resource configuration but since it agrees with the
documentation I'm at a bit of a loss.

On Nov 8, 2007 1:18 PM, Gabe Wong [EMAIL PROTECTED] wrote:

 Refer to the following topic in the same URL you provided above:
 1. Install Your JDBC Driver
 Use of the /JDBC Data Sources/ JNDI Resource Factory requires that you
 make an appropriate JDBC driver available to both Tomcat internal
 classes and to your web application. This is most easily accomplished by
 installing the driver's JAR file(s) into the |$CATALINA_HOME/common/lib|
 directory, which makes the driver available both to the resource factory
 and to your application.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: serving files through SSL

2007-11-08 Thread Caldarale, Charles R
 From: Roger Parkinson [mailto:[EMAIL PROTECTED] 
 Subject: Re: serving files through SSL
 
 I've identified that the cache headers are being set by 
 default on the dynamic file. I don't know that they are
 the issue but it is the one difference I can spot.

As you've been told before, it definitely is the issue.  To repeat:

This is a known problem with IE.  A search of the archives
(http://marc.info/?l=tomcat-user) for pdf cache turns up numerous
hits, including this one:

http://marc.info/?l=tomcat-userm=108431336725309w=2

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: specify class name in environment or system property...?

2007-11-08 Thread Asare Samuel
yes but why am i getting the error:
   
  Need to specify class name in environment or system property, or as an applet 
parameter, or in an application resource file: java.naming.factory.initial
null
   
   when i try to run it???


David kerber [EMAIL PROTECTED] wrote:
  Any of those methods will likely work; I prefer the java.util.Properties 
object and its various methods, and read the settings from a disk file.

For settings that I don't need to change much (or ever), I usually use 
system.properties, and set them in the jvm startup properties.


Asare Samuel wrote:
 Making a web application sort of following:

 http://www.netbeans.org/kb/55/mysql-webapp.html#preparingDB

 I made a class that connects to the DB ie accessDB and have put two methods 
 inside: 

 public void insert(a,c) inserts record into database
 public String getContent() gets content

 I then put in little tester Main method to test the 2 methods thats when i 
 get this error

 Need to specify class name in environment or system property, or as an applet 
 parameter, or in an application resource file: java.naming.factory.initial
 null

 Please can anyone help me???

 Thanks in advance.

 
 -
 Yahoo! Answers - Get better answers from someone who knows. Tryit now.
 



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



   
-
 For ideas on reducing your carbon footprint visit Yahoo! For Good this month.

Re: Detecting whether Win Service or Console App

2007-11-08 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Normen,

Normen Ruhrus wrote:
 iam deploying a servlet app via Tomcat sometimes as a Windows Service and
 sometimes as a standard Windows Console App.
 
 Since I need to implement different behavior in the servlet, I would need a
 way from inside the Servlet code to detect if the Tomcat this Servlet runs
 in, runs as Windows Service or Win Console App.

Are you able to modify the deployment environment? If so, consider
setting a system property (using -DserviceType=CONSOLE or
- -DserviceType=SERVICE) and then using that from your apps.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHM3LZ9CaO5/Lv0PARAhN9AJ9ra+11SaFhxS10UEVGTzSZVB2VSgCdGVgo
QAJgeCLqRKQ48ccKMqId/fc=
=9lDH
-END PGP SIGNATURE-

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: j_security_check redirect after login

2007-11-08 Thread Propes, Barry L
I have gotten (not me, but several users) an error sometimes citing invalid 
direct reference to login form in the browser window.

This has happened with certain elements within the XML attribs of the container.

Not sure why it occurs, as these same users can access other parts of the 
container that are protected, but it's likely they would get this error if they 
tried to do what you're describing below.

-Original Message-
From: David Smith [mailto:[EMAIL PROTECTED]
Sent: Thursday, November 08, 2007 1:45 PM
To: Tomcat Users List
Subject: Re: j_security_check redirect after login




3. It is unclear what happens in the event when a user requests the
form-
   login-page directly instead of going through a container-managed 
   resource.

   How does j_security_check know where to redirect the user once he has

   authenticated successfully?
  


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Issue finding Worker using mod_jk ...

2007-11-08 Thread Rainer Jung
Hi Kim,

as Filip indicated it would be helpful, to also see your other JK
configuration options, i.e. the JK Apache directives you used.

Fron the log output I guess, that your JK version is something around
1.2.6. We are now at 1.2.25, so I would suggest to do an update before
into digging into the problem (I'm not saying your problem comes from
the old version).

Your log output looks, like the JkMount worked, but the
workers.properties entry didn't work. Are you sure, that you configured
the workers.properties correctly in your httpd.conf?

Newer versions of mod_jk log quite a lot of details in debug level
during startup and configuration parsing, so it would be easier for us
to find out the reason for your problem.

Regards,

Rainer

Kim Albee schrieb:
 We are having an issue when setting up integration between Apache 2.0.52 and
 Tomcat 6.0.14...
 
 Here are the mod_jk.log entries:
 
 [Wed Nov 07 14:31:25 2007]  [jk_uri_worker_map.c (445)]: Into
 jk_uri_worker_map_t::map_uri_to_worker
 [Wed Nov 07 14:31:25 2007]  [jk_uri_worker_map.c (459)]: Attempting to map
 URI '/'
 [Wed Nov 07 14:31:25 2007]  [jk_uri_worker_map.c (473)]:
 jk_uri_worker_map_t::map_uri_to_worker, Found an exact match ein1 - /
 [Wed Nov 07 14:31:25 2007]  [mod_jk.c (1689)]: Into handler r-proxyreq=0
 r-handler=jakarta-servlet r-notes=158639048 worker=ein1
 [Wed Nov 07 14:31:25 2007]  [jk_worker.c (90)]: Into wc_get_worker_for_name
 ein1
 [Wed Nov 07 14:31:25 2007]  [jk_worker.c (94)]: wc_get_worker_for_name, done
 did not find a worker
 
 The workers.properties file looks like this:
 
 workers.tomcat_home=/usr/local/tomcat6
 workers.java_home=$JAVA_HOME
 ps=/
 worker.list=ein1
 
 
 worker.ein1.port=8109
 worker.ein1.host=localhost
 worker.ein1.type=ajp13
 worker.ein1.info=Ajp13 forwarding
 worker.ein1.debug=2
 worker.ein1.tomcatId=ein1
 
 We have the jvmRoute set in the Engine parameter for the server.xml in
 tomcat as well...
 
 Any suggestions on how to get this working?
 
 thanks,
 Kim :-)
 

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: speed up the server

2007-11-08 Thread tbt

Hi,

The OS is windows XP
tomcat version 6
java version 1.5
database mysql
memory: 3GB
processor: 2.3GHz

it was working very fast before being deployed. About 30 people login
simultaneously to this application. Once this happens the application is
very slow.



ben short-2 wrote:
 
 So your webapp ran pretty fast before it was deployed?
 
 Your going to need to provide much more information. Like OS and
 versions of tomcat, java, database etc and maybe some metrics on how
 long it takes to process the requests.
 
 Also you will want to use a profiler to figure out what part of the
 app is 'taking' so long.
 
 With out knowing such things all we can really say is...
 
 Buy a faster machine.
 Code you app so it works faster.
 
 ;)
 
 Ben
 
 
 On Nov 7, 2007 10:21 AM, tbt [EMAIL PROTECTED] wrote:

 Hi

 I'm a newbie to tomcat and i'm using it for a web application. But
 currently
 the application is running a bit slow once deployed. Are there any ways
 to
 speed up the request/response time in tomcat.

 Thanks
 --
 View this message in context:
 http://www.nabble.com/speed-up-the-server-tf4763782.html#a13624531
 Sent from the Tomcat - User mailing list archive at Nabble.com.


 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]


 
 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/speed-up-the-server-tf4763782.html#a13661817
Sent from the Tomcat - User mailing list archive at Nabble.com.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



virtual host for subdomains

2007-11-08 Thread Kwok Ng
Hi folks,

I notice some BLOG websites assign the subdomains to the registered users, like

user1.mydomain.com
user2.mydomain.com

If I use the tomcat to do this, do I use the virtual host
configuration?  If so, do I use the same docBase to point to one war
file with different host names?

Thanks!

Billy

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: j_security_check redirect after login

2007-11-08 Thread Nicholas Sushkin
On Thursday 08 November 2007, you wrote: 

 The question I had was what happens when you directly request the login
 form and successfully login.

Tomcat will give you an error page saying something along the lines the 
login page was accessed directly. It won't let you login successfully. 
Tomcat does not know where to redirect you.

-- 
Nicholas Sushkin, Senior Software Engineer
http://www.openfinance.com http://www.wealthinformationexchange.com


smime.p7s
Description: S/MIME cryptographic signature