question on tomcat's JSESSIONID

2004-07-02 Thread Yassine_Hinnach

Hi,
I have 2 questions regarding tomcat:

1- I am wondering if it is possible to rename the JSESSIONID cookie to something else. I am interseted in renaming it __JSESSIONID this way JSESSION ids generated by webservers on the same domain (domain.com) will not conflict with each other. (I have a special setup with a portal webserver which relays cookies to other webservers in the same domain)
I know this can be done with WebLogic : you can customize the name of the JSESSIONID cookie in weblogic.xml. Is it possible to do this with tomcat?

2- An alternate solution for me would be to be able to have a tomcat server accept a JSESSIONID cookie generated by another tomcat webserver.
In other words is there a way to reuse JSESSIONID cookies with tomcat. I tried this simple test case: I overwrote the HelloWorld servlet with the code I attached (I attached the java and the class in the zip file). This simply creates a session if one does not already exist and prints out info about that session. I copied the class file to 2 tomcat webservers on the same host. Then with a clean browser (cookies deleted ) I targetted the servlet on the first server which generated a JSESSIONID. Then I targetted the servlet on the second server which failed to accept that cookie and reuse to create an httpsession with the same id. 
I know that WebSphere allows you to reuse JSESSIONID cookies. I think resin does too. Is there a config setting for tomcat to enable this 'reuse' feature?



Please reply to [EMAIL PROTECTED] and [EMAIL PROTECTED]

Thanks for your help,
Yassine -
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Service Temporarily Unavailable

2004-07-02 Thread Michael Sullivan
Hi.  I'm a newbie at Tomcat - I had my most successful install atempt
last night - but I've run into a small problem.  I'm using the jk2
connector running Apache as a frontend for Tomcat on a PC running Fedora
Core 1.  My workers2.properties file is:

[shm]
info=Scoreboard. Required for reconfiguration and status with
multiprocess servers.
file=anon

# Defines a load balancer named lb. Use even if you only have one
machine.
[lb:lb]

# Example socket channel, override port and host.
[channel.socket:localhost:8009]
info=Ajp13 forwarding over socket
tomcatId=localhost:8009

port=8009
host=127.0.0.1

# define the worker
[ajp13:localhost:8009]
channel=channel.socket:localhost:8009
group=lb

# Map the Tomcat examples webapp to the Web server uri space
[uri:/servlet-examples/*]
group=lb
info=Map the whole webapp

#[uri:/home/tomcat/webapps/*]  I don't think this is really needed

[status:]
info=Status worker, displays runtime information

[uri:/jkstatus/*]
info=The Tomcat /jkstatus handler
group=status:

but everytime I go to www.espersunited.com/servlet-examples/  I get:

Service Temporarily Unavailable
The server is temporarily unable to service your request due to
maintenance downtime or capacity problems. Please try again later.



Apache/2.0.49 (Fedora) Server at www.espersunited.com Port 80

I can get to the jkstatus page just fine.  I've searched for the cause
of this error on Dogpile and I've come across several forums where
people have tried to find out how to fix this error, but none have given
solutions.  Please help!

-Michael Sullivan-



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



Re: logging

2004-07-02 Thread Bill Barker
This is planned for a future release of TC 5 (it's available in the
'nightly' now).  And, no, I have absolutely no idea at all, not even a
guess, as to when this version will have an official release.

"Charles Baker" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
I'm using tomcat 4.1.30 on Red Hat Linux w/ Sun JDK 1.4.2_03. In
catalina.sh one of the other admins has redirected standard out to a log
file so that we can capture some info that would ordinarily only be seen
at the console. What we would like to do is have the tomcat container
itself, not just a particular web application, use log4j to log it's
messages. Also, after the container is up and all webapps have been
deployed, we would like to lower the logging level of the container from
say INFO to FATAL. We are already doing this with JBoss but haven't been
able to figure a way to do this with tomcat. I've googled and looked at
the archives w/o finding anything relevant. Does anyone have a clue?


Charles H. Baker
O: 864.422.5349 C: 864.201.8456
[EMAIL PROTECTED]
Whatever you vividly imagine, ardently desire, sincerely believe and
enthusiastically act upon must inevitably come to pass! -- Paul J. Meyer




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



Is Tomcat part of this product?

2004-07-02 Thread Howler D. Wolfe
*Hello Everyone,
Pardon my ignorance, its been a while since, I've been on this list.  I 
have a question and I'm not trying to start a flame war or anything like 
that I really am just interested in the differences.  I would like to 
know what the differences are between Tomcat 5.x and Sun Java System 
Application Server Platform Edition 8 Update 1. 

I know that the Sun product allows EJBs and such. I guess what I'm after 
is besides that, is there any real value to using Tomcat over it or 
vice-versa? Either technically or legally (licensing)?

Its my understanding that part of the Sun product comes with a  version 
of Tomcat, is it version 5.x?  Can I get the same functionality from 
Tomcat that I can from the Sun product? Is Tomcat better?

I know I'm asking a lot of questions about this, but I want to setup an 
Apache 2, PHP and Java website with MySQL.  Any insight that can be 
provided would be much appreciated.

Thanks,
John
*
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: Deploying onto a specific host...

2004-07-02 Thread Ivan Jouikov
Then how would you access that specific manager?  www.host.com/manager ?

-Original Message-
From: Emerson Cargnin [mailto:[EMAIL PROTECTED] 
Sent: Friday, July 02, 2004 4:16 PM
To: Tomcat Users List
Subject: Re: Deploying onto a specific host...

I think you have to have an manager per virtualhost, someone correct me 
if I'm wrong

Emerson Cargnin
Floripa/Brasil

Ivan Jouikov wrote:
> When using manager application, how can you specify which virtual host 
> you want to deploy your application onto?
> 
>  
> 
>  
> 
> 
> 
> Best Regards,
> 
> Ivan V. Jouikov
> (206) 228-6670
> 
> 
>  
> 
> 
> ---
> Outgoing mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.701 / Virus Database: 458 - Release Date: 07.06.2004
> 


-- 
Emerson Cargnin
Analista de Sistemas - Gerente Regional - Tubarao
Setor de Desenvolvimento de Sistemas - TRE-SC
tel : (048) - 251-3700 - Ramal 3181

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

---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.701 / Virus Database: 458 - Release Date: 07.06.2004
 

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.701 / Virus Database: 458 - Release Date: 07.06.2004
 


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



Re: Deploying onto a specific host...

2004-07-02 Thread Emerson Cargnin
I think you have to have an manager per virtualhost, someone correct me 
if I'm wrong

Emerson Cargnin
Floripa/Brasil
Ivan Jouikov wrote:
When using manager application, how can you specify which virtual host 
you want to deploy your application onto?

 

 


Best Regards,
Ivan V. Jouikov
(206) 228-6670

 

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.701 / Virus Database: 458 - Release Date: 07.06.2004

--
Emerson Cargnin
Analista de Sistemas - Gerente Regional - TubarÃo
Setor de Desenvolvimento de Sistemas - TRE-SC
tel : (048) - 251-3700 - Ramal 3181
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Deploying onto a specific host...

2004-07-02 Thread Ivan Jouikov








When using manager application,
how can you specify which virtual host you want to deploy your application
onto?

 

 










 
  
  Best Regards,
  
  Ivan V. Jouikov
  (206) 228-6670
  
  
 




 








---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.701 / Virus Database: 458 - Release Date: 07.06.2004
 

  


RE: RE-PROBLEM: Problems moving from server.xml to web.xml ...

2004-07-02 Thread Ivan Jouikov
Ok turns out there is a problem with Manager application - it doesn't read folders 
properly when you deploy as a folder or WAR, but it reads XML fine when you deploy is 
XML.

Check it out:

http://issues.apache.org/bugzilla/show_bug.cgi?id=29895



-Original Message-
From: Lorenzo A. Jimenez Briceno [mailto:[EMAIL PROTECTED] 
Sent: Friday, July 02, 2004 3:25 PM
To: Tomcat Users List
Subject: RE: RE-PROBLEM: Problems moving  from server.xml to web.xml ...
Importance: High

Look at one of mine:



  
  

  factory
  org.apache.commons.dbcp.BasicDataSourceFactory


  url
  jdbc:mckoi://localhost/


  driverClassName
  com.mckoi.JDBCDriver


  username
  sa


  password
  admin


  maxActive
  100


  maxWait
  1


  maxIdle
  30


  removeAbandoned
  true


  removeAbandonedTimeout
  300


  logAbandoned
  true

  





























-Mensaje original-
De: Ivan Jouikov [mailto:[EMAIL PROTECTED]
Enviado el: Viernes, 02 de Julio de 2004 04:12 p.m.
Para: 'Tomcat Users List'
Asunto: RE-PROBLEM: Problems moving  from server.xml to web.xml
..


Ok, I put the following into my META-INF/context.xml:

 







maxActive5

maxIdle5

usernameivan

passwordkittiesrcute


driverClassNamecom.mysql.jdbc.Driver


urljdbc:mysql://192.168.0.1:3306/school?autoReconnect=true




When I deploy the application using tomcat manager, it seems to deploy it correctly, 
because path /ablogic is automatically assigned to it.  However, I still can't get a 
hold of my DB info:

Error message: Cannot create JDBC driver of class '' for connect URL 'null'

org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:750)

org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:518)

org.ablogic.db.Manager.getConnection(Manager.java:41)

org.ablogic.db.Manager.testQuery(Manager.java:85)

org.apache.jsp.init._2_jsp._jspService(_2_jsp.java:78)

org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)

javax.servlet.http.HttpServlet.service(HttpServlet.java:810)

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:298)

org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)

org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)

javax.servlet.http.HttpServlet.service(HttpServlet.java:810)

org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)

org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)

com.jspbook.GZIPFilter.doFilter(GZIPFilter.java:37)

org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:186)

org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)

org.ablogic.web.CacheFilter.doFilter(CacheFilter.java:130)

org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:186)

org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)

org.ablogic.web.IPBlockFilter.doFilter(IPBlockFilter.java:135)

org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:186)

org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)

org.ablogic.web.TraceFilter.doFilter(TraceFilter.java:69)

org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:186)

org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)

org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValvejava:214)

org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)

org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)

org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)

org.apache.catalina.core.StandardContextValve.invoke(StandardContextValvejava:152)

org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)

org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)

org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)

org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)

org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)

org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)

org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)

org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)

org.

RE: RE-PROBLEM: Problems moving from server.xml to web.xml ...

2004-07-02 Thread Lorenzo A. Jimenez Briceno
Look at one of mine:



  
  

  factory
  org.apache.commons.dbcp.BasicDataSourceFactory


  url
  jdbc:mckoi://localhost/


  driverClassName
  com.mckoi.JDBCDriver


  username
  sa


  password
  admin


  maxActive
  100


  maxWait
  1


  maxIdle
  30


  removeAbandoned
  true


  removeAbandonedTimeout
  300


  logAbandoned
  true

  





























-Mensaje original-
De: Ivan Jouikov [mailto:[EMAIL PROTECTED]
Enviado el: Viernes, 02 de Julio de 2004 04:12 p.m.
Para: 'Tomcat Users List'
Asunto: RE-PROBLEM: Problems moving  from server.xml to web.xml
..


Ok, I put the following into my META-INF/context.xml:

 







maxActive5

maxIdle5

usernameivan

passwordkittiesrcute


driverClassNamecom.mysql.jdbc.Driver


urljdbc:mysql://192.168.0.1:3306/school?autoReconnect=true




When I deploy the application using tomcat manager, it seems to deploy it correctly, 
because path /ablogic is automatically assigned to it.  However, I still can't get a 
hold of my DB info:

Error message: Cannot create JDBC driver of class '' for connect URL 'null'

org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:750)

org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:518)

org.ablogic.db.Manager.getConnection(Manager.java:41)

org.ablogic.db.Manager.testQuery(Manager.java:85)

org.apache.jsp.init._2_jsp._jspService(_2_jsp.java:78)

org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)

javax.servlet.http.HttpServlet.service(HttpServlet.java:810)

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:298)

org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)

org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)

javax.servlet.http.HttpServlet.service(HttpServlet.java:810)

org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)

org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)

com.jspbook.GZIPFilter.doFilter(GZIPFilter.java:37)

org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:186)

org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)

org.ablogic.web.CacheFilter.doFilter(CacheFilter.java:130)

org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:186)

org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)

org.ablogic.web.IPBlockFilter.doFilter(IPBlockFilter.java:135)

org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:186)

org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)

org.ablogic.web.TraceFilter.doFilter(TraceFilter.java:69)

org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:186)

org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)

org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValvejava:214)

org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)

org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)

org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)

org.apache.catalina.core.StandardContextValve.invoke(StandardContextValvejava:152)

org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)

org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)

org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)

org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)

org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)

org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)

org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)

org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)

org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)

org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)

org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)

org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)

org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:793)

org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:702

RE-PROBLEM: Problems moving from server.xml to web.xml ...

2004-07-02 Thread Ivan Jouikov
Ok, I put the following into my META-INF/context.xml:

 







maxActive5

maxIdle5

usernameivan

passwordkittiesrcute


driverClassNamecom.mysql.jdbc.Driver


urljdbc:mysql://192.168.0.1:3306/school?autoReconnect=true




When I deploy the application using tomcat manager, it seems to deploy it correctly, 
because path /ablogic is automatically assigned to it.  However, I still can't get a 
hold of my DB info:

Error message: Cannot create JDBC driver of class '' for connect URL 'null'

org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:750)

org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:518)

org.ablogic.db.Manager.getConnection(Manager.java:41)

org.ablogic.db.Manager.testQuery(Manager.java:85)

org.apache.jsp.init._2_jsp._jspService(_2_jsp.java:78)

org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)

javax.servlet.http.HttpServlet.service(HttpServlet.java:810)

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:298)

org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)

org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)

javax.servlet.http.HttpServlet.service(HttpServlet.java:810)

org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)

org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)

com.jspbook.GZIPFilter.doFilter(GZIPFilter.java:37)

org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:186)

org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)

org.ablogic.web.CacheFilter.doFilter(CacheFilter.java:130)

org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:186)

org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)

org.ablogic.web.IPBlockFilter.doFilter(IPBlockFilter.java:135)

org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:186)

org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)

org.ablogic.web.TraceFilter.doFilter(TraceFilter.java:69)

org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:186)

org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)

org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)

org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)

org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)

org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)

org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)

org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)

org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)

org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)

org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)

org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)

org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)

org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)

org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)

org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)

org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)

org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)

org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)

org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:793)

org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:702)

org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:571)

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

java.lang.Thread.run(Unknown Source)



 C A U S E --

Error message: No suitable driver

java.sql.DriverManager.getDriver(Unknown Source)

org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:743)

org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:518)

org.ablogic.db.Manager.getConnection(Manager.java:41)

org.ablogic.db.Manager.testQuery(Manager.java:85)

org.apache.jsp.init._2_jsp._jspService(_2_jsp.java:78)

org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)

javax.servlet.http.HttpServlet.service(HttpServlet.java:8

RE: Fresh install of 5.0.25 running but not responding

2004-07-02 Thread SANTOS, DANIEL (SBCSI)
Actually, all machines have 127.0.0.1 with the name of "localhost"
unless they are alternately configured.  So if you have a network card
or PPP connection they will have an IP address and you will still have
"localhost".  So you can actually configure Tomcat to only listen on
localhost if you chose to.

But back to your problem, have you made any changes at all to any
configuration files?  And are you sure that you aren't seeing any errors
in the log file?  The line would start with "SEVERE" and might not be
conspicuous if you are looking for a huge explosion.  Also, telnet to
localhost 8079 and make sure that you get "connection refused" (I just
want to validate the issue) and make sure that telneting to 8080 just
hangs (no "connection refused").  That is what I understand the
situation as at least, just wanted to make sure.

If none of this gets you anywhere you can always debug the tomcat
process and suspend all threads and take a snapshot while your request
is timing out.  Another sanity check on this is to try to connect to
losthost:8080 both when tomcat is running and not.  If you don't get
connection refused when tomcat is down then I would venture to tell you
to look at your OS.  But if you get connection refused while tomcat is
down and a no response when it's up, then a snapshot of all of the
threads ("where all" if you are using sun's jdb) has to tell you
something about what it's doing.

If this doesn't help send me your log file (pls zip it if it's big) and
any config files you have changed and I'll try to help ya.


Daniel

-Original Message-
From: Scott D. Anderson [mailto:[EMAIL PROTECTED] 
Sent: Friday, July 02, 2004 3:52 PM
To: Tomcat Users List
Subject: Re: Fresh install of 5.0.25 running but not responding


"Tomcat Users List" <[EMAIL PROTECTED]> writes:
>I just looked at your link.  Since your tutorial says to set the domain
>name I imagine that that's just what you did.  If you did so, you wont
>be able to get to it with the address "localhost".  I'm not sure, but
>I'm thinking that you can omit the name attribute of the  tag and
>Tomcat will listen on *all* IP addresses the machine has.  I know that
>it's the default for sure.

Thanks for your lightning-fast response.  I searched 
the tutorial for "domain" and I see that it doesn't mention
setting the domain name until step 4.2 (Server XML).  I'm 
getting stuck at the end of step 3.4 (Tomcat Standalone).
Sorry I wasn't more clear about where I was getting stuck.

So, I don't think the hostname is the problem, unless the
directions are seriously out of order, which doesn't seem
likely.

Oh, and this machine only has one IP address.

Any other ideas?

Scott

--
Scott D. Anderson
Computer Science Department
Wellesley College
[EMAIL PROTECTED]

 






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


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



Re: Apache -> tomcat connections grow very fast

2004-07-02 Thread Stephen Carville
On Wed June 30 2004 4:08 pm, Wade Chandler wrote:
> Stephen Carville wrote:
> > Every once in  a while, the number of connections between apache and
> > tomcat grows very rapidally, going from 12 or so up to over 150 in a
> > matter of about 10 minutes.  This quickly causes the number of httpd
> > processes to exceed MaxClients and apache stops accepting new
> > connections.  Restarting tomcat relieves the symptom.  This is a recent
> > development that first came to my attention abtu two weeks ago.
> >
> > When the problem happens, 'netstat -natp' shows a bunch of connections
> > like:
> >
> > tcp0  0 127.0.0.1:39164 127.0.0.1:8009
> > ESTABLISHED 21886/httpd
> >
> > with a corresponding connection for the tomcat end:
> >
> > tcp0  0 127.0.0.1:8009  127.0.0.1:39164
> > ESTABLISHED 31723/java
> >
> > Normally there are about 8 to 12 connections between apache and tomcat. 
> > I cannot figure out why the number suddenly peaks like this.  I've
> > scoured the http logs and turned on debugging for mod_jk but nothing I've
> > tried so far fixes it.  I've had the developers do some extra logging to
> > see if any recent code changes could be causing it but that too has
> > proved fruitless.
> >
> > Suggestions are welcome.
>
> Do you know what is initiating the connections?  

Customers accessing our web site. :-)
 
> 8009 is the connection
> between mod_jk and the server.  MaxConnections will be on your port 80
> or what ever port you are running on.  Do you not know the origin of the
> other connections?  

By using /server-status page in apache I have a pretty good idea who is 
connecting when the problem happens.  They are legitimate connections.  This 
does not appear to be a DOS.

> Surely you have connections on the other port 80 or
> what ever you are using?  Are you using some type of an http protocol
> test tool and are you using keep connection?

Yes.  The customer connects on port 80 and, if the requested page is a .jsp or 
servlet the request is sent along to tomcat via mod_jk on port 8009.  Apache 
sends the html the JSP generates back to the customers browser.  Then the 
connection is dropped.  It is the next-to-last step where things don't behave 
as expected.  

I just don't know why nor where to start looking.

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

-- 
Stephen Carville
Unix and Network Adminstrator
DPSI
6033 W.Century Blvd.
Los Angeles, CA 90045
310-342-3602

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



RE: logging

2004-07-02 Thread Ivan Jouikov
I'm having the same issue.  Any suggestions would be welcome.

-Original Message-
From: Charles Baker [mailto:[EMAIL PROTECTED] 
Sent: Friday, July 02, 2004 7:04 AM
To: [EMAIL PROTECTED]
Subject: logging

I'm using tomcat 4.1.30 on Red Hat Linux w/ Sun JDK 1.4.2_03. In
catalina.sh one of the other admins has redirected standard out to a log
file so that we can capture some info that would ordinarily only be seen
at the console. What we would like to do is have the tomcat container
itself, not just a particular web application, use log4j to log it's
messages. Also, after the container is up and all webapps have been
deployed, we would like to lower the logging level of the container from
say INFO to FATAL. We are already doing this with JBoss but haven't been
able to figure a way to do this with tomcat. I've googled and looked at
the archives w/o finding anything relevant. Does anyone have a clue?


Charles H. Baker
O: 864.422.5349 C: 864.201.8456
[EMAIL PROTECTED] 
Whatever you vividly imagine, ardently desire, sincerely believe and
enthusiastically act upon must inevitably come to pass! -- Paul J. Meyer


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

---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.701 / Virus Database: 458 - Release Date: 07.06.2004
 

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.701 / Virus Database: 458 - Release Date: 07.06.2004
 


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



Re: Fresh install of 5.0.25 running but not responding

2004-07-02 Thread Scott D. Anderson
"Tomcat Users List" <[EMAIL PROTECTED]> writes:
>I just looked at your link.  Since your tutorial says to set the domain
>name I imagine that that's just what you did.  If you did so, you wont
>be able to get to it with the address "localhost".  I'm not sure, but
>I'm thinking that you can omit the name attribute of the  tag and
>Tomcat will listen on *all* IP addresses the machine has.  I know that
>it's the default for sure.

Thanks for your lightning-fast response.  I searched 
the tutorial for "domain" and I see that it doesn't mention
setting the domain name until step 4.2 (Server XML).  I'm 
getting stuck at the end of step 3.4 (Tomcat Standalone).
Sorry I wasn't more clear about where I was getting stuck.

So, I don't think the hostname is the problem, unless the
directions are seriously out of order, which doesn't seem
likely.

Oh, and this machine only has one IP address.

Any other ideas?

Scott

--
Scott D. Anderson
Computer Science Department
Wellesley College
[EMAIL PROTECTED]

 






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



utf-8 with tomcat 5

2004-07-02 Thread Asher Tarnopolski
hey folks,

to show you what is it all about i wrote a small app which shows the
html utf-8 codes of the entered string. this is the jsp code:

  <%if(request.getParameter("source")!=null){  
request.setCharacterEncoding("UTF-8");   
out.println(request.getParameter("source").length()+"");   
out.println(request.getParameter("source"));   StringBuffer sb = new StringBuffer();  
for(int i=0; i"+ 
sb.toString());}%> 

well, as you see, this code block gets a utf-8 encoded parameter from
a request, outputs its length, the parameter itself, and its html
utf-8 codes.
to test it i send a hebrew letter ALEF. on tomcat 4.xx everything
works perfect and i get the following response:

7
א
א

(in case you don't see it here, it's 7 , alef's utf-8 code and alef's utf-8
code parsed to be visible in browser)

cool. then i run the same code on tomcat 5.0.16 and KABOOM. this is
what i get:

2
א
א

(in case you don't see it here: it's 2, and twice alef as it would be
passed in windows-1255 or iso... where the hell utf-8 is gone?)

all this makes me understand that tomcat 5 has some bug influenting
its utf-8 support. how comes the parameter length of one char is 2?!

thanks in advance.


RE: Fresh install of 5.0.25 running but not responding

2004-07-02 Thread SANTOS, DANIEL (SBCSI)
I just looked at your link.  Since your tutorial says to set the domain
name I imagine that that's just what you did.  If you did so, you wont
be able to get to it with the address "localhost".  I'm not sure, but
I'm thinking that you can omit the name attribute of the  tag and
Tomcat will listen on *all* IP addresses the machine has.  I know that
it's the default for sure.

GL!
Daniel

-Original Message-
From: Scott D. Anderson [mailto:[EMAIL PROTECTED] 
Sent: Friday, July 02, 2004 2:45 PM
To: [EMAIL PROTECTED]
Subject: Fresh install of 5.0.25 running but not responding


I just installed tomcat 5.0.25 on my RedHat 9 server.  I followed the
instructions in

http://www.meritonlinesystems.com/docs/apache_tomcat_redhat.html

which is linked from the Jakarta home page.  I got smoothly (no error
messages during installation or startup) to the step that says 
"test that tomcat is working by starting it and typing 
http://localhost:8080 into your browser.  When
I did that, I didn't get a response.  That is, the browser said
"waiting for localhost" but I never got a reply.  I also tried the real
name of the server, both locally and from another machine.

I thought it might be a firewall thing, but the firewall is turned off
on my server.  I used nmap and it says that port 8080 is open for
http/proxy.  To make sure it was Tomcat and not my web browser,
I used telnet:  When I telnet to port 80 and say "GET /index.html"; I
get
the desired page back from Apache, but if I telnet to port 8080 
and say the same thing, I get no response.  (I have to use the escape
character to exit telnet.)

I checked the logs, but I don't see any error messages there, either
in ~tomcat/logs or in /var/log/messages.  I used "ps" to find the
process, and there is indeed a java process running as expected:

tomcat   30722 1  0 10:34 pts/100:00:23 /usr/java/sdk/bin/java
-Djava.endorsed.dirs=/usr/local/jakarta-tomcat-5.0.25/common/endorsed
-classpath
/usr/java/sdk/lib/tools.jar:/usr/local/jakarta-tomcat-5.0.25/bin/bootstr
ap.jar:/usr/local/jakarta-tomcat-5.0.25/bin/commons-logging-api.jar
-Dcatalina.base=/usr/local/j

I'm running out of ideas.  I googled for info and also searched 
one of the mailing list archives, but since there's no
error message to search for, I'm coming up empty.  Can anyone
suggest any more tests I can run to narrow this down?

Thanks very much,

Scott

--
Scott D. Anderson
Computer Science Department
Wellesley College
[EMAIL PROTECTED]

 






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


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



Virtual Hosts on Tomcat 5

2004-07-02 Thread Steve Beaman
I'm using Tomcat 5 standalone.
Everything works just fine, but now
I need to enter my virtual hosts information
in the server.xml file.

Does anybody have a server.xml file
that uses virtual hosts that I could use as an 
example?

Thanks.


Steve Beaman   [EMAIL PROTECTED]  
Altura International
http://SHOP.COM
http://www.catalogcity.com

Fresh install of 5.0.25 running but not responding

2004-07-02 Thread Scott D. Anderson
I just installed tomcat 5.0.25 on my RedHat 9 server.  I followed the
instructions in

http://www.meritonlinesystems.com/docs/apache_tomcat_redhat.html

which is linked from the Jakarta home page.  I got smoothly (no error
messages during installation or startup) to the step that says 
"test that tomcat is working by starting it and typing 
http://localhost:8080 into your browser.  When
I did that, I didn't get a response.  That is, the browser said
"waiting for localhost" but I never got a reply.  I also tried the real
name of the server, both locally and from another machine.

I thought it might be a firewall thing, but the firewall is turned off
on my server.  I used nmap and it says that port 8080 is open for
http/proxy.  To make sure it was Tomcat and not my web browser,
I used telnet:  When I telnet to port 80 and say "GET /index.html"; I get
the desired page back from Apache, but if I telnet to port 8080 
and say the same thing, I get no response.  (I have to use the escape
character to exit telnet.)

I checked the logs, but I don't see any error messages there, either
in ~tomcat/logs or in /var/log/messages.  I used "ps" to find the
process, and there is indeed a java process running as expected:

tomcat   30722 1  0 10:34 pts/100:00:23 /usr/java/sdk/bin/java
-Djava.endorsed.dirs=/usr/local/jakarta-tomcat-5.0.25/common/endorsed
-classpath
/usr/java/sdk/lib/tools.jar:/usr/local/jakarta-tomcat-5.0.25/bin/bootstrap.jar:/usr/local/jakarta-tomcat-5.0.25/bin/commons-logging-api.jar
-Dcatalina.base=/usr/local/j

I'm running out of ideas.  I googled for info and also searched 
one of the mailing list archives, but since there's no
error message to search for, I'm coming up empty.  Can anyone
suggest any more tests I can run to narrow this down?

Thanks very much,

Scott

--
Scott D. Anderson
Computer Science Department
Wellesley College
[EMAIL PROTECTED]

 






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



RE: How to use oracle pool instead of using DBCP pool?

2004-07-02 Thread SANTOS, DANIEL (SBCSI)
Yes, that would be better.  As it is, I have one pool instantiated in my app and then 
one at the server level for my auth realm :(

-Original Message-
From: Emerson Cargnin [mailto:[EMAIL PROTECTED] 
Sent: Friday, July 02, 2004 2:13 PM
To: Tomcat Users List
Subject: Re: How to use oracle pool instead of using DBCP pool?


I use another pool, but I have some context params, as I put below, and 
a pool servlet that instantiate all the pools and centralizes the 
connections. So you can see the connection state from a central point. 
If some is interested i can make it available. The only think you have 
to change is the pool creation.

This way, apps can share pools (I know that dbcp can do it too, it 
didn't exist at that time) and to add a new one, just change this file.
Beyond that, you have to put the jar with the lib in common lib, so 
every app will get the same pool manager.

Names of parameters are in portuguese, but i think you can get the idea.


 
 alias1
 ca...
   
   
 host1
 hostvalue1
   
   
 senha1
 thepassword1
   
   
 sid1
 databasename1
   
   
 user1
 username
   


   
 alias2
 descartaweb
   
   
   user2
   usename2
   
   
 senha2
 pass2
   
   
 host2
 hostname2
   
 
 sid2
 adm
   

SANTOS, DANIEL (SBCSI) wrote:
> I use a method similar to this as well.  I don't use a servlet listener however.  I 
> use a javax.servlet.ServletContextListener instead however.  I store the jdbd url in 
> my web.xml also as a context-param (I just just cram it all into one paramater 
> however) and put the pool as an attribute of the Context.  Here is the shorthand for 
> that below:
> 
> public void contextInitialized(ServletContextEvent sce) {
> String dbUrl = sce.getServletContext().getInitParameter("dbUrl")
> OracleDataSource pool = new OracleDataSource();
> pool.setURL(dbUrl);
> sce.getServletContext().setAttribute("dbConnectionPool", pool);
> }
> 
> and I have my classes12.zip (renamed to .jar) in my WEB-INF/lib folder
> -Original Message-
> From: David Short [mailto:[EMAIL PROTECTED]
> Sent: Friday, July 02, 2004 12:40 PM
> To: 'Tomcat Users List'
> Subject: RE: How to use oracle pool instead of using DBCP pool?
> 
> 
> I'm sure there's another way.  This is how I use it.  You can extract the
> connection pool logic and embed in your framework.
> 
> -Original Message-
> From: Claudio Carvalho [mailto:[EMAIL PROTECTED]
> Sent: Friday, July 02, 2004 10:33 AM
> To: Tomcat Users List; [EMAIL PROTECTED]
> Subject: Re: How to use oracle pool instead of using DBCP pool?
> 
> 
> Hi Davi,
> 
> Thanks, but I'm trying to solve this problem without changing my J2EE
> framework... using JNDI,etc...
> Do you know any other approach?
> 
> Claudio Carvalho.
> 
> - Original Message -
> From: "David Short" <[EMAIL PROTECTED]>
> To: "'Tomcat Users List'" <[EMAIL PROTECTED]>
> Sent: Friday, July 02, 2004 1:55 PM
> Subject: RE: How to use oracle pool instead of using DBCP pool?
> 
> 
> 
>>Try this.
>>
>>Here's how I do it using Struts on W2K.  Modify names and paths to suit
> 
> your
> 
>>needs.
>>
>>Upon startup, a listener servlet (ResourceManagerListener) is called (See
>> tag in the included web.xml source).
>>
>>The listener servlet will create the connection pool based on your web.xml
>>parameters (See ResourceManagerListener.java).  Once started, the listener
>>servlet initializes an application scope variable (appDataSource), which
>>when called from your servlets/JSPs will return a DB DataSource object (DB
>>connection).
>>
>>--
> 
> --
> 
>>---
>>
>>In your main servlet:
>>
>>try
>>  {
>>  DataSource ds = (DataSource)
>>getServlet().getServletContext().getAttribute("appDataSource");
>>  xxxProcess = new xxxProcessBean();
>>  xxxInfo = new xxxInfoBean();
>>  xxxProcess.setDataSource(ds);
>>  xxxInfo = xxxProcess.getUser(userName, customerId);
>>  }
>>
>>In your process bean:
>>
>>public class xxxProcessBean implements Serializable
>>  {
>>  private DataSource dataSource;
>>
>>  /**
>>   * Sets the dataSource property value.
>>   */
>>  public void setDataSource(DataSource dataSource)
>>{
>>this.dataSource = dataSource;
>>}
>>
>>
>>  public xxxInfoBean getUser(String userName, String customerId)
>>throws SQLException
>>{
>>// Get the user info from the database
>>Connection conn = dataSource.getConnection();
>>xxxInfoBean xxxResult = null;
>>
>>try
>>  {
>>  xxxResult = getUserName(userName, customerId, conn);  // Execute
>>actual SQL statement.
>>  }
>>
>>finally
>>  {
>>  try
>>{
>>conn.close();
>>conn = null;
>>}
>>
>>catch (SQLException e)
>>  {} // Ignore
>>
>>return xxxResult;
>>
>>--
> 
> --
> 
>>--

Re: How to use oracle pool instead of using DBCP pool?

2004-07-02 Thread Emerson Cargnin
I use another pool, but I have some context params, as I put below, and 
a pool servlet that instantiate all the pools and centralizes the 
connections. So you can see the connection state from a central point. 
If some is interested i can make it available. The only think you have 
to change is the pool creation.

This way, apps can share pools (I know that dbcp can do it too, it 
didn't exist at that time) and to add a new one, just change this file.
Beyond that, you have to put the jar with the lib in common lib, so 
every app will get the same pool manager.

Names of parameters are in portuguese, but i think you can get the idea.

alias1
ca...
  
  
host1
hostvalue1
  
  
senha1
thepassword1
  
  
sid1
databasename1
  
  
user1
username
  
  
alias2
descartaweb
  
  
  user2
  usename2
  
  
senha2
pass2
  
  
host2
hostname2
  

sid2
adm
  
SANTOS, DANIEL (SBCSI) wrote:
I use a method similar to this as well.  I don't use a servlet listener however.  I 
use a javax.servlet.ServletContextListener instead however.  I store the jdbd url in 
my web.xml also as a context-param (I just just cram it all into one paramater 
however) and put the pool as an attribute of the Context.  Here is the shorthand for 
that below:
public void contextInitialized(ServletContextEvent sce) {
String dbUrl = sce.getServletContext().getInitParameter("dbUrl")
OracleDataSource pool = new OracleDataSource();
pool.setURL(dbUrl);
sce.getServletContext().setAttribute("dbConnectionPool", pool);
}
and I have my classes12.zip (renamed to .jar) in my WEB-INF/lib folder
-Original Message-
From: David Short [mailto:[EMAIL PROTECTED]
Sent: Friday, July 02, 2004 12:40 PM
To: 'Tomcat Users List'
Subject: RE: How to use oracle pool instead of using DBCP pool?
I'm sure there's another way.  This is how I use it.  You can extract the
connection pool logic and embed in your framework.
-Original Message-
From: Claudio Carvalho [mailto:[EMAIL PROTECTED]
Sent: Friday, July 02, 2004 10:33 AM
To: Tomcat Users List; [EMAIL PROTECTED]
Subject: Re: How to use oracle pool instead of using DBCP pool?
Hi Davi,
Thanks, but I'm trying to solve this problem without changing my J2EE
framework... using JNDI,etc...
Do you know any other approach?
Claudio Carvalho.
- Original Message -
From: "David Short" <[EMAIL PROTECTED]>
To: "'Tomcat Users List'" <[EMAIL PROTECTED]>
Sent: Friday, July 02, 2004 1:55 PM
Subject: RE: How to use oracle pool instead of using DBCP pool?

Try this.
Here's how I do it using Struts on W2K.  Modify names and paths to suit
your
needs.
Upon startup, a listener servlet (ResourceManagerListener) is called (See
 tag in the included web.xml source).
The listener servlet will create the connection pool based on your web.xml
parameters (See ResourceManagerListener.java).  Once started, the listener
servlet initializes an application scope variable (appDataSource), which
when called from your servlets/JSPs will return a DB DataSource object (DB
connection).
--
--
---
In your main servlet:
try
 {
 DataSource ds = (DataSource)
getServlet().getServletContext().getAttribute("appDataSource");
 xxxProcess = new xxxProcessBean();
 xxxInfo = new xxxInfoBean();
 xxxProcess.setDataSource(ds);
 xxxInfo = xxxProcess.getUser(userName, customerId);
 }
In your process bean:
public class xxxProcessBean implements Serializable
 {
 private DataSource dataSource;
 /**
  * Sets the dataSource property value.
  */
 public void setDataSource(DataSource dataSource)
   {
   this.dataSource = dataSource;
   }
 public xxxInfoBean getUser(String userName, String customerId)
   throws SQLException
   {
   // Get the user info from the database
   Connection conn = dataSource.getConnection();
   xxxInfoBean xxxResult = null;
   try
 {
 xxxResult = getUserName(userName, customerId, conn);  // Execute
actual SQL statement.
 }
   finally
 {
 try
   {
   conn.close();
   conn = null;
   }
   catch (SQLException e)
 {} // Ignore
   return xxxResult;
--
--
---
Change MachineNameHere to your machine name.
Change OracleSIDHere to your DB SID.
Change DBUserNameHere to your DB username.
Change DBPasswordHere to your DB password
Change ApplicationNameHere to a meaningful application designator.
Change xxx to your object name.
Copy Oracle's classes12.zip and nls_charset12.zip files (should live in
C:\OraHome\jdbc\lib) to C:\Tomcat\common\lib.  Depending on the version of
Tomcat, you may need to rename the .zip files to .jar.
I'll let you read/learn about Struts on your own.
Hoe this helps.
Dave
--
--
---
web.xml

http://java.sun.com//dtd

Re: Como funciona tomcat en Fedora Core 2

2004-07-02 Thread Emerson Cargnin
It happened to me some time ago with Suse.
If you try the host name, does it work?? that was my case...
Emerson
Chris Alvarez wrote:
 
Hi List 
 
I installed Fedora Core 2, I see that the Tomcat service is in there and
 it even sets it up OK. But how do I access it? 
 
I thought that normally it was http://localhost:8080 but it doesn't
work. My question is: what do I need to do so that it works or how do I
test in order to get it to run JSP. 
 
 
Thanks so much 
 
 
It is hard to get an answer unless you post in the language of the list.

 
 

Chris Alvarez
[EMAIL PROTECTED]
ext. 1-3837
IS&T Web Applications Services
Novell, Inc., the leading provider of information solutions
http://www.novell.com

[EMAIL PROTECTED] 07/02 9:40 am >>> 
 
Hola Lista 
 
 
Instale Fedora Core 2, veo que viene el servicio tomcat e inclusive sube
el servicio tomcat OK. Pero como lo acceso? 
 
Yo pense que era por lo normal http://localhost:8080 pero no funciona.
Mi pregunta es que tengo que hacer para que funcione o como tengo que
hacer la prueba para correr JSP. 
 
 
Muchas Gracias. 


--
Emerson Cargnin
Analista de Sistemas - Gerente Regional - Tubarão
Setor de Desenvolvimento de Sistemas - TRE-SC
tel : (048) - 251-3700 - Ramal 3181
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


PDF File on Documentation Web Site Corrupted?

2004-07-02 Thread SANTOS, DANIEL (SBCSI)
When attempting to view a PDF on the Tomcat Architecture at
http://jakarta.apache.org/tomcat/tomcat-5.0-doc/architecture/requestProc
ess/requestProcess.pdf I get errors in Acrobat Reader.  Same thing for
http://jakarta.apache.org/tomcat/tomcat-5.0-doc/architecture/startup/ser
verStartup.pdf.  Does anybody know who is responsible for these and if
there is any way to correct them?

Thanks
Daniel

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



RE: How to use oracle pool instead of using DBCP pool?

2004-07-02 Thread SANTOS, DANIEL (SBCSI)
I use a method similar to this as well.  I don't use a servlet listener however.  I 
use a javax.servlet.ServletContextListener instead however.  I store the jdbd url in 
my web.xml also as a context-param (I just just cram it all into one paramater 
however) and put the pool as an attribute of the Context.  Here is the shorthand for 
that below:

public void contextInitialized(ServletContextEvent sce) {
String dbUrl = sce.getServletContext().getInitParameter("dbUrl")
OracleDataSource pool = new OracleDataSource();
pool.setURL(dbUrl);
sce.getServletContext().setAttribute("dbConnectionPool", pool);
}

and I have my classes12.zip (renamed to .jar) in my WEB-INF/lib folder
-Original Message-
From: David Short [mailto:[EMAIL PROTECTED]
Sent: Friday, July 02, 2004 12:40 PM
To: 'Tomcat Users List'
Subject: RE: How to use oracle pool instead of using DBCP pool?


I'm sure there's another way.  This is how I use it.  You can extract the
connection pool logic and embed in your framework.

-Original Message-
From: Claudio Carvalho [mailto:[EMAIL PROTECTED]
Sent: Friday, July 02, 2004 10:33 AM
To: Tomcat Users List; [EMAIL PROTECTED]
Subject: Re: How to use oracle pool instead of using DBCP pool?


Hi Davi,

Thanks, but I'm trying to solve this problem without changing my J2EE
framework... using JNDI,etc...
Do you know any other approach?

Claudio Carvalho.

- Original Message -
From: "David Short" <[EMAIL PROTECTED]>
To: "'Tomcat Users List'" <[EMAIL PROTECTED]>
Sent: Friday, July 02, 2004 1:55 PM
Subject: RE: How to use oracle pool instead of using DBCP pool?


> Try this.
>
> Here's how I do it using Struts on W2K.  Modify names and paths to suit
your
> needs.
>
> Upon startup, a listener servlet (ResourceManagerListener) is called (See
>  tag in the included web.xml source).
>
> The listener servlet will create the connection pool based on your web.xml
> parameters (See ResourceManagerListener.java).  Once started, the listener
> servlet initializes an application scope variable (appDataSource), which
> when called from your servlets/JSPs will return a DB DataSource object (DB
> connection).
>
> --
--
> ---
>
> In your main servlet:
>
> try
>   {
>   DataSource ds = (DataSource)
> getServlet().getServletContext().getAttribute("appDataSource");
>   xxxProcess = new xxxProcessBean();
>   xxxInfo = new xxxInfoBean();
>   xxxProcess.setDataSource(ds);
>   xxxInfo = xxxProcess.getUser(userName, customerId);
>   }
>
> In your process bean:
>
> public class xxxProcessBean implements Serializable
>   {
>   private DataSource dataSource;
>
>   /**
>* Sets the dataSource property value.
>*/
>   public void setDataSource(DataSource dataSource)
> {
> this.dataSource = dataSource;
> }
>
>
>   public xxxInfoBean getUser(String userName, String customerId)
> throws SQLException
> {
> // Get the user info from the database
> Connection conn = dataSource.getConnection();
> xxxInfoBean xxxResult = null;
>
> try
>   {
>   xxxResult = getUserName(userName, customerId, conn);  // Execute
> actual SQL statement.
>   }
>
> finally
>   {
>   try
> {
> conn.close();
> conn = null;
> }
>
> catch (SQLException e)
>   {} // Ignore
>
> return xxxResult;
>
> --
--
> ---
>
> Change MachineNameHere to your machine name.
> Change OracleSIDHere to your DB SID.
> Change DBUserNameHere to your DB username.
> Change DBPasswordHere to your DB password
> Change ApplicationNameHere to a meaningful application designator.
> Change xxx to your object name.
>
> Copy Oracle's classes12.zip and nls_charset12.zip files (should live in
> C:\OraHome\jdbc\lib) to C:\Tomcat\common\lib.  Depending on the version of
> Tomcat, you may need to rename the .zip files to .jar.
>
>
> I'll let you read/learn about Struts on your own.
>
> Hoe this helps.
>
> Dave
>
> --
--
> ---
> web.xml
> 
>
>PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
>   "http://java.sun.com//dtd/web-app_2_3.dtd";>
>
> 
>   
>   
> javax.servlet.jsp.jstl.fmt.fallbackLocale
> en
>   
>
>   
>
>   
>   
>   
> jdbcURL
> 
> jdbc:oracle:oci8:@OracleSIDHere
>   
>
>   
> user
> DBUserNameHere
>   
>
>   
> password
> DBPasswordHere
>   
>
>   
> maxLimit
> 50
>   
>
>   
>   
> minLimit
> 10
>   
>
>   
>   
> accessControl
> 
>   com.ApplicationNameHere.servlets.AccessControlFilter
> 
> 
>   loginPage
>   /jsp/login.jsp
> 
>   
>
>   
> accessControl
> /protected/*
>   
>
>   
> 
>   com.ApplicationNameHere.servlets.ResourceManagerListener
> 
>   

RE: How to use oracle pool instead of using DBCP pool?

2004-07-02 Thread David Short
I'm sure there's another way.  This is how I use it.  You can extract the
connection pool logic and embed in your framework.

-Original Message-
From: Claudio Carvalho [mailto:[EMAIL PROTECTED]
Sent: Friday, July 02, 2004 10:33 AM
To: Tomcat Users List; [EMAIL PROTECTED]
Subject: Re: How to use oracle pool instead of using DBCP pool?


Hi Davi,

Thanks, but I'm trying to solve this problem without changing my J2EE
framework... using JNDI,etc...
Do you know any other approach?

Claudio Carvalho.

- Original Message -
From: "David Short" <[EMAIL PROTECTED]>
To: "'Tomcat Users List'" <[EMAIL PROTECTED]>
Sent: Friday, July 02, 2004 1:55 PM
Subject: RE: How to use oracle pool instead of using DBCP pool?


> Try this.
>
> Here's how I do it using Struts on W2K.  Modify names and paths to suit
your
> needs.
>
> Upon startup, a listener servlet (ResourceManagerListener) is called (See
>  tag in the included web.xml source).
>
> The listener servlet will create the connection pool based on your web.xml
> parameters (See ResourceManagerListener.java).  Once started, the listener
> servlet initializes an application scope variable (appDataSource), which
> when called from your servlets/JSPs will return a DB DataSource object (DB
> connection).
>
> --
--
> ---
>
> In your main servlet:
>
> try
>   {
>   DataSource ds = (DataSource)
> getServlet().getServletContext().getAttribute("appDataSource");
>   xxxProcess = new xxxProcessBean();
>   xxxInfo = new xxxInfoBean();
>   xxxProcess.setDataSource(ds);
>   xxxInfo = xxxProcess.getUser(userName, customerId);
>   }
>
> In your process bean:
>
> public class xxxProcessBean implements Serializable
>   {
>   private DataSource dataSource;
>
>   /**
>* Sets the dataSource property value.
>*/
>   public void setDataSource(DataSource dataSource)
> {
> this.dataSource = dataSource;
> }
>
>
>   public xxxInfoBean getUser(String userName, String customerId)
> throws SQLException
> {
> // Get the user info from the database
> Connection conn = dataSource.getConnection();
> xxxInfoBean xxxResult = null;
>
> try
>   {
>   xxxResult = getUserName(userName, customerId, conn);  // Execute
> actual SQL statement.
>   }
>
> finally
>   {
>   try
> {
> conn.close();
> conn = null;
> }
>
> catch (SQLException e)
>   {} // Ignore
>
> return xxxResult;
>
> --
--
> ---
>
> Change MachineNameHere to your machine name.
> Change OracleSIDHere to your DB SID.
> Change DBUserNameHere to your DB username.
> Change DBPasswordHere to your DB password
> Change ApplicationNameHere to a meaningful application designator.
> Change xxx to your object name.
>
> Copy Oracle's classes12.zip and nls_charset12.zip files (should live in
> C:\OraHome\jdbc\lib) to C:\Tomcat\common\lib.  Depending on the version of
> Tomcat, you may need to rename the .zip files to .jar.
>
>
> I'll let you read/learn about Struts on your own.
>
> Hoe this helps.
>
> Dave
>
> --
--
> ---
> web.xml
> 
>
>PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
>   "http://java.sun.com//dtd/web-app_2_3.dtd";>
>
> 
>   
>   
> javax.servlet.jsp.jstl.fmt.fallbackLocale
> en
>   
>
>   
>
>   
>   
>   
> jdbcURL
> 
> jdbc:oracle:oci8:@OracleSIDHere
>   
>
>   
> user
> DBUserNameHere
>   
>
>   
> password
> DBPasswordHere
>   
>
>   
> maxLimit
> 50
>   
>
>   
>   
> minLimit
> 10
>   
>
>   
>   
> accessControl
> 
>   com.ApplicationNameHere.servlets.AccessControlFilter
> 
> 
>   loginPage
>   /jsp/login.jsp
> 
>   
>
>   
> accessControl
> /protected/*
>   
>
>   
> 
>   com.ApplicationNameHere.servlets.ResourceManagerListener
> 
>   
>
>   
>   
> action
> org.apache.struts.action.ActionServlet
> 1
>   
>
>   
>   
> errorDispatcher
>
>
com.ApplicationNameHere.servlets.ErrorDispatcherServlet let-class>
> 
>   errorPage
>   /jsp/error/errorpage.jsp?debug=log
> 
>   
>
>   
>   
> action
> *.do
>   
>
>   
> errorDispatcher
> /errorDispatcher
>   
>
>   
>   
> 1
>   
>
>   
>   
> java.lang.Throwable
> /errorDispatcher
>   
>
>   
> 500
> /errorDispatcher
>   
>
>   
> java.sql.SQLException
> /errorDispatcher
>   
>
>   
> jdbc/ApplicationNameHere
> javax.sql.DataSource
> Container
>   
>
> 
>
> --
--
> ---
> ResourceManagerListener.java
> package com.ApplicationNameHere.servlets;
>
> import javax.servlet.*;
> import javax.servlet

Re: How to use oracle pool instead of using DBCP pool?

2004-07-02 Thread Claudio Carvalho
Hi Davi,

Thanks, but I'm trying to solve this problem without changing my J2EE
framework... using JNDI,etc...
Do you know any other approach?

Claudio Carvalho.

- Original Message - 
From: "David Short" <[EMAIL PROTECTED]>
To: "'Tomcat Users List'" <[EMAIL PROTECTED]>
Sent: Friday, July 02, 2004 1:55 PM
Subject: RE: How to use oracle pool instead of using DBCP pool?


> Try this.
>
> Here's how I do it using Struts on W2K.  Modify names and paths to suit
your
> needs.
>
> Upon startup, a listener servlet (ResourceManagerListener) is called (See
>  tag in the included web.xml source).
>
> The listener servlet will create the connection pool based on your web.xml
> parameters (See ResourceManagerListener.java).  Once started, the listener
> servlet initializes an application scope variable (appDataSource), which
> when called from your servlets/JSPs will return a DB DataSource object (DB
> connection).
>
> --
--
> ---
>
> In your main servlet:
>
> try
>   {
>   DataSource ds = (DataSource)
> getServlet().getServletContext().getAttribute("appDataSource");
>   xxxProcess = new xxxProcessBean();
>   xxxInfo = new xxxInfoBean();
>   xxxProcess.setDataSource(ds);
>   xxxInfo = xxxProcess.getUser(userName, customerId);
>   }
>
> In your process bean:
>
> public class xxxProcessBean implements Serializable
>   {
>   private DataSource dataSource;
>
>   /**
>* Sets the dataSource property value.
>*/
>   public void setDataSource(DataSource dataSource)
> {
> this.dataSource = dataSource;
> }
>
>
>   public xxxInfoBean getUser(String userName, String customerId)
> throws SQLException
> {
> // Get the user info from the database
> Connection conn = dataSource.getConnection();
> xxxInfoBean xxxResult = null;
>
> try
>   {
>   xxxResult = getUserName(userName, customerId, conn);  // Execute
> actual SQL statement.
>   }
>
> finally
>   {
>   try
> {
> conn.close();
> conn = null;
> }
>
> catch (SQLException e)
>   {} // Ignore
>
> return xxxResult;
>
> --
--
> ---
>
> Change MachineNameHere to your machine name.
> Change OracleSIDHere to your DB SID.
> Change DBUserNameHere to your DB username.
> Change DBPasswordHere to your DB password
> Change ApplicationNameHere to a meaningful application designator.
> Change xxx to your object name.
>
> Copy Oracle's classes12.zip and nls_charset12.zip files (should live in
> C:\OraHome\jdbc\lib) to C:\Tomcat\common\lib.  Depending on the version of
> Tomcat, you may need to rename the .zip files to .jar.
>
>
> I'll let you read/learn about Struts on your own.
>
> Hoe this helps.
>
> Dave
>
> --
--
> ---
> web.xml
> 
>
>PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
>   "http://java.sun.com//dtd/web-app_2_3.dtd";>
>
> 
>   
>   
> javax.servlet.jsp.jstl.fmt.fallbackLocale
> en
>   
>
>   
>
>   
>   
>   
> jdbcURL
> 
> jdbc:oracle:oci8:@OracleSIDHere
>   
>
>   
> user
> DBUserNameHere
>   
>
>   
> password
> DBPasswordHere
>   
>
>   
> maxLimit
> 50
>   
>
>   
>   
> minLimit
> 10
>   
>
>   
>   
> accessControl
> 
>   com.ApplicationNameHere.servlets.AccessControlFilter
> 
> 
>   loginPage
>   /jsp/login.jsp
> 
>   
>
>   
> accessControl
> /protected/*
>   
>
>   
> 
>   com.ApplicationNameHere.servlets.ResourceManagerListener
> 
>   
>
>   
>   
> action
> org.apache.struts.action.ActionServlet
> 1
>   
>
>   
>   
> errorDispatcher
>
>
com.ApplicationNameHere.servlets.ErrorDispatcherServlet let-class>
> 
>   errorPage
>   /jsp/error/errorpage.jsp?debug=log
> 
>   
>
>   
>   
> action
> *.do
>   
>
>   
> errorDispatcher
> /errorDispatcher
>   
>
>   
>   
> 1
>   
>
>   
>   
> java.lang.Throwable
> /errorDispatcher
>   
>
>   
> 500
> /errorDispatcher
>   
>
>   
> java.sql.SQLException
> /errorDispatcher
>   
>
>   
> jdbc/ApplicationNameHere
> javax.sql.DataSource
> Container
>   
>
> 
>
> --
--
> ---
> ResourceManagerListener.java
> package com.ApplicationNameHere.servlets;
>
> import javax.servlet.*;
> import javax.servlet.http.*;
>
> import oracle.jdbc.pool.*;
>
> import javax.naming.*;
> import javax.sql.*;
>
> import java.sql.*;
> import java.math.*;
> import java.util.*;
>
> /**
>  * This class manages the DataSource resource for an application,
>  * creating an Oracle DataSource with pooling capabilities
>  * and makes it available when the application sta

RE: LDAP - newbee help

2004-07-02 Thread Ross Rankin


-Original Message-
From: Ross Rankin [mailto:[EMAIL PROTECTED] 
Sent: Friday, July 02, 2004 1:23 PM
To: 'Kal Govindu'; 'Tomcat Users List (E-mail)'
Subject: RE: LDAP - newbee help

To authenticate users you will need an account / password that has read
privileges and a base DN.  You will need to configure Tomcat with that info
in the server.xml.   

So you will need to ask for an account that has access to the group you will
to authenticate from and the user needs to be a member.  

Here's a good idea of what need to be configured:
ldap://[Windows 2000 Domain Controller]:389"
userBase="CN=Users,dc=[domain name],dc=com"
userSearch="(userPrincipalName={0})"
userRoleName="member"
roleBase="CN=Users,dc=[domain name],dc=com"
roleName="cn"
roleSearch="(member={0})"
connectionName="CN=[jndi account username],CN=Users,DC=[domain name],DC=com"
connectionPassword="[jndi account password]"
roleSubtree="true"
userSubtree="true" />

Replace [Windows 2000 Domain Controller] with the name of one of your domain
controller
Replace [domain name] with the name of your network domain. If you aren't
sure about what your domain name is, open up ADSI edit, choose the defaults,
and look at what it says next to the Domain NC icon.
Replace [jndi account username] with the name of the user you requested
Replace [jndi account password] with the password of user you requested



-Original Message-
From: Kal Govindu [mailto:[EMAIL PROTECTED] 
Sent: Friday, July 02, 2004 8:50 AM
To: Tomcat Users List (E-mail)
Subject: RE: LDAP - newbee help

Thank you for clearing that up.

I will take a look at that document. I have made a connection to the Active
Directory, but am not able to authenticate users yet, probably since I don't
know details about how user or members and their corresponding role
information is store in our Directory Server. I will need to contact the
tech guys for that. In Microsoft Active Directory terms, where is this
information stored? and what is called? so I can ask the right questions.

Thanks
Kal

-Original Message-
From: Ross Rankin [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 01, 2004 2:09 PM
To: Kal Govindu; 'Tomcat Users List (E-mail)'
Subject: RE: LDAP - newbee help



LDAP, Lightweight Directory Access Protocol, is a protocol that other
programs use to look up contact information from a server, such as Microsoft
Active Directory.  It is a service provided by a server, not a server.  An
LDAP server is a server that provides LDAP services...  The Microsft AD
service is LDAP-compatible.  

http://www.microsoft.com/windowsserver2003/techinfo/overview/ldapcomp.mspx

Ross

-Original Message-
From: Kal Govindu [mailto:[EMAIL PROTECTED] 
Sent: Thursday, July 01, 2004 1:51 PM
To: Tomcat Users List (E-mail)
Subject: LDAP - newbee help

Hello all,

I am trying to setup tomcat 5 to authenticate against Microsoft Directory
Server through LDAP. I have found a very detailed document for tomcat 5 and
JNDI realm. One question before I go any further: Is LDAP server a server
that needs to be started separately from directory server? If so, where can
I get that?

Thanks
Kal


CONFIDENTIALITY NOTE:  All e-mail sent to or from this address will be
received by the Waterfield Group corporate e-mail system and is subject to
archival, monitoring, and/or review by someone other than the recipient or
the sender.

This e-mail and any of its attachments may contain proprietary information,
which is privileged and confidential.  This e-mail is intended solely for
the use of the individual or entity to which it is addressed.  If you are
not the intended recipient of this e-mail, you are hereby notified that any
dissemination, distribution, copying, or action taken in relation to the
contents of and attachments to this e-mail is strictly prohibited and may be
unlawful.  If you have received this e-mail in error, please notify the
sender immediately and permanently delete the original and any copy of this
e-mail and any printout.  Thank you.






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



RE: Tomcat -> MySQL = No suitable driver ERROR

2004-07-02 Thread Jan Behrens
Good to hear that it is finally working. I am sorry, but I have never used
any sql tag-lib so I can't really help you with this problem. I would
suggest though, to google for a simple example - if that doesn't help open a
new thread here in the list and ask specifically for help with your new
problem. I am sure that someone will know...

Jan

-Original Message-
From: Briggs, Patrick [mailto:[EMAIL PROTECTED] 
Sent: Friday, July 02, 2004 6:36 PM
To: 'Tomcat Users List'
Subject: RE: Tomcat -> MySQL = No suitable driver ERROR


David had me do this following proceedure and that seemed to work, but my
JSP does not return any data so far.  The database finally connected though.

When I view this JSP page, all it prints is:

${row.foo} ${row.bar}

instead of the data that should be contained inside those variables.

test.jsp:

<%@ taglib uri="http://java.sun.com/jsp/jstl/sql"; prefix="sql" %> <%@ taglib
uri="http://java.sun.com/jsp/jstl/core"; prefix="c" %>


select * from testdata



  
DB Test
  
  

  Results
  





  



>From David:

Here's first what should be in 
{TOMCAT_HOME}/conf/Catalina/localhost/DBTest.xml:



  

  



  factory
  org.apache.commons.dbcp.BasicDataSourceFactory



  maxActive
  100



  maxIdle
  30



  maxWait
  10




  username
  DBTestUser




  password
  *


  driverClassName
  com.mysql.jdbc.Driver




  url
  jdbc:mysql://localhost:3306/DBTest?autoReconnect=true

  



-
Ok, now what should be in {TOMCAT_HOME}/webapps/DBTest/WEB-INF/web.xml:



http://java.sun.com/j2ee/dtds/web-app_2_2.dtd";>


  DbTest Application

  

  
  
DBTest Database
jdbc/DbTest
javax.sql.DataSource
Container
  



-
This exact formula has worked for me in I can't even count how many apps 
I've setup.

--David

-Original Message-
From: Jan Behrens [mailto:[EMAIL PROTECTED]
Sent: Friday, July 02, 2004 1:50 AM
To: 'Tomcat Users List'
Subject: RE: Tomcat -> MySQL = No suitable driver ERROR


yes patrick,

i guess that is what david and i want so your dbtest works. allthough the
posted contents of web.xml lack a doctype or schema definition (see hassans
post). now, have you tried this?

cheers, jan

This e-mail message, including any attachments, is for the sole use of the
intended recipient(s) and may contain confidential or privileged
information.  Any unauthorized review, use, disclosure or distribution is
prohibited.  If you are not the intended recipient, please contact the
sender by reply e-mail and destroy the message.


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



RE: How to use oracle pool instead of using DBCP pool?

2004-07-02 Thread David Short
Try this.

Here's how I do it using Struts on W2K.  Modify names and paths to suit your
needs.

Upon startup, a listener servlet (ResourceManagerListener) is called (See
 tag in the included web.xml source).

The listener servlet will create the connection pool based on your web.xml
parameters (See ResourceManagerListener.java).  Once started, the listener
servlet initializes an application scope variable (appDataSource), which
when called from your servlets/JSPs will return a DB DataSource object (DB
connection).


---

In your main servlet:

try
  {
  DataSource ds = (DataSource)
getServlet().getServletContext().getAttribute("appDataSource");
  xxxProcess = new xxxProcessBean();
  xxxInfo = new xxxInfoBean();
  xxxProcess.setDataSource(ds);
  xxxInfo = xxxProcess.getUser(userName, customerId);
  }

In your process bean:

public class xxxProcessBean implements Serializable
  {
  private DataSource dataSource;

  /**
   * Sets the dataSource property value.
   */
  public void setDataSource(DataSource dataSource)
{
this.dataSource = dataSource;
}


  public xxxInfoBean getUser(String userName, String customerId)
throws SQLException
{
// Get the user info from the database
Connection conn = dataSource.getConnection();
xxxInfoBean xxxResult = null;

try
  {
  xxxResult = getUserName(userName, customerId, conn);  // Execute
actual SQL statement.
  }

finally
  {
  try
{
conn.close();
conn = null;
}

catch (SQLException e)
  {} // Ignore

return xxxResult;


---

Change MachineNameHere to your machine name.
Change OracleSIDHere to your DB SID.
Change DBUserNameHere to your DB username.
Change DBPasswordHere to your DB password
Change ApplicationNameHere to a meaningful application designator.
Change xxx to your object name.

Copy Oracle's classes12.zip and nls_charset12.zip files (should live in
C:\OraHome\jdbc\lib) to C:\Tomcat\common\lib.  Depending on the version of
Tomcat, you may need to rename the .zip files to .jar.


I'll let you read/learn about Struts on your own.

Hoe this helps.

Dave


---
web.xml


http://java.sun.com//dtd/web-app_2_3.dtd";>


  
  
javax.servlet.jsp.jstl.fmt.fallbackLocale
en
  

  

  
  
  
jdbcURL

jdbc:oracle:oci8:@OracleSIDHere
  

  
user
DBUserNameHere
  

  
password
DBPasswordHere
  

  
maxLimit
50
  

  
  
minLimit
10
  

  
  
accessControl

  com.ApplicationNameHere.servlets.AccessControlFilter


  loginPage
  /jsp/login.jsp

  

  
accessControl
/protected/*
  

  

  com.ApplicationNameHere.servlets.ResourceManagerListener

  

  
  
action
org.apache.struts.action.ActionServlet
1
  

  
  
errorDispatcher

com.ApplicationNameHere.servlets.ErrorDispatcherServlet

  errorPage
  /jsp/error/errorpage.jsp?debug=log

  

  
  
action
*.do
  

  
errorDispatcher
/errorDispatcher
  

  
  
1
  

  
  
java.lang.Throwable
/errorDispatcher
  

  
500
/errorDispatcher
  

  
java.sql.SQLException
/errorDispatcher
  

  
jdbc/ApplicationNameHere
javax.sql.DataSource
Container
  




---
ResourceManagerListener.java
package com.ApplicationNameHere.servlets;

import javax.servlet.*;
import javax.servlet.http.*;

import oracle.jdbc.pool.*;

import javax.naming.*;
import javax.sql.*;

import java.sql.*;
import java.math.*;
import java.util.*;

/**
 * This class manages the DataSource resource for an application,
 * creating an Oracle DataSource with pooling capabilities
 * and makes it available when the application starts and removes it
 * when the application is shut down.
 *
 * @author David Short, Relational Concepts, Inc.
 * @version David Short 01/10/2004 initial release.
 */
public class ResourceManagerListener implements ServletContextListener
  {
  private OracleConnectionCacheImpl ds = null;
  private Context ctx = null;

  public void contextInitialized(ServletContextEvent sce)
{
ServletContext application  = sce.getServletContext();

/*
 * Get the JDBC URL, user, password and limits from the web.xml
 * context init parameters
 */
String jdbcURL  = application.getInitParameter("jdbcURL");
String user = application.getInitParameter("user");
String password = application.getInitParameter("password");
String minLimit = application.getInitParameter("minLimit");
String maxLimit = application.getInitParameter("maxLimit");

try

RE: Tomcat -> MySQL = No suitable driver ERROR

2004-07-02 Thread Briggs, Patrick
David had me do this following proceedure and that seemed to work, but my
JSP does not return any data so far.  The database finally connected though.

When I view this JSP page, all it prints is:

${row.foo} ${row.bar}

instead of the data that should be contained inside those variables.

test.jsp:

<%@ taglib uri="http://java.sun.com/jsp/jstl/sql"; prefix="sql" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core"; prefix="c" %>


select * from testdata



  
DB Test
  
  

  Results
  





  



>From David:

Here's first what should be in 
{TOMCAT_HOME}/conf/Catalina/localhost/DBTest.xml:



  

  



  factory
  org.apache.commons.dbcp.BasicDataSourceFactory



  maxActive
  100



  maxIdle
  30



  maxWait
  10




  username
  DBTestUser




  password
  *


  driverClassName
  com.mysql.jdbc.Driver




  url
  jdbc:mysql://localhost:3306/DBTest?autoReconnect=true

  



-
Ok, now what should be in {TOMCAT_HOME}/webapps/DBTest/WEB-INF/web.xml:



http://java.sun.com/j2ee/dtds/web-app_2_2.dtd";>


  DbTest Application

  

  
  
DBTest Database
jdbc/DbTest
javax.sql.DataSource
Container
  



-
This exact formula has worked for me in I can't even count how many apps 
I've setup.

--David

-Original Message-
From: Jan Behrens [mailto:[EMAIL PROTECTED]
Sent: Friday, July 02, 2004 1:50 AM
To: 'Tomcat Users List'
Subject: RE: Tomcat -> MySQL = No suitable driver ERROR


yes patrick,

i guess that is what david and i want so your dbtest works. allthough the
posted contents of web.xml lack a doctype or schema definition (see hassans
post). now, have you tried this?

cheers, jan

This e-mail message, including any attachments, is for the sole use of the
intended recipient(s) and may contain confidential or privileged
information.  Any unauthorized review, use, disclosure or distribution is
prohibited.  If you are not the intended recipient, please contact the
sender by reply e-mail and destroy the message.


Re: Como funciona tomcat en Fedora Core 2

2004-07-02 Thread Chris Alvarez
 
Hi List 
 
I installed Fedora Core 2, I see that the Tomcat service is in there and
 it even sets it up OK. But how do I access it? 
 
I thought that normally it was http://localhost:8080 but it doesn't
work. My question is: what do I need to do so that it works or how do I
test in order to get it to run JSP. 
 
 
Thanks so much 
 
 
It is hard to get an answer unless you post in the language of the list.

 
 

Chris Alvarez
[EMAIL PROTECTED]
ext. 1-3837
IS&T Web Applications Services
Novell, Inc., the leading provider of information solutions
http://www.novell.com


>>>[EMAIL PROTECTED] 07/02 9:40 am >>> 
 
Hola Lista 
 
 
Instale Fedora Core 2, veo que viene el servicio tomcat e inclusive sube
el servicio tomcat OK. Pero como lo acceso? 
 
Yo pense que era por lo normal http://localhost:8080 pero no funciona.
Mi pregunta es que tengo que hacer para que funcione o como tengo que
hacer la prueba para correr JSP. 
 
 
Muchas Gracias. 


Re: Como funciona tomcat en Fedora Core 2

2004-07-02 Thread Paul Gregoire
The internet provides many options for translation.
El Internet proporciona muchas opciones para la traducción.
http://babelfish.altavista.com/
or
http://www.google.com/language_tools
Randall Svancara wrote:
make that port 8080
-Original Message-
From: Randall Svancara [mailto:[EMAIL PROTECTED]
Sent: Friday, July 02, 2004 10:06 AM
To: Tomcat Users List
Subject: RE: Como funciona tomcat en Fedora Core 2
If you have everything set up correctly, you should see the index.html file in the ROOT webapp of the tomcat servlet engine.  On fedora core2, look at your firewall rules to see if you have port 80 enabled.  

Sorry, my spanish is horribleno hablo espanol, que mal me amigo!!
Later.
-Original Message-
From: Dale, Matt [mailto:[EMAIL PROTECTED]
Sent: Friday, July 02, 2004 10:01 AM
To: Tomcat Users List
Subject: RE: Como funciona tomcat en Fedora Core 2

This is an english list, you may have more luck if you can get someone to translate.
Ta
Matt
-Original Message-
From: Sergio E. Triviño I. [mailto:[EMAIL PROTECTED]
Sent: 02 July 2004 16:40
To: Tomcat Users List
Subject: Como funciona tomcat en Fedora Core 2
Hola Lista
Instale Fedora Core 2, veo que viene el servicio tomcat e inclusive sube el servicio tomcat OK. Pero como lo acceso? 
Yo pense que era por lo normal http://localhost:8080 pero no funciona. Mi pregunta es que tengo que hacer para que funcione o como tengo que hacer la prueba para correr JSP.

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

 

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


RE: apache2 crashes when using connectors - nobody?

2004-07-02 Thread Cox, Charlie
Please do not "flag" messages for follow-up. I would try to help, but your
message flag tells me that I am 222 years late (year=1782) - your project
has probably moved on since then. 

I think I'm more amazed that Outlook didn't crash. Wow.

Charlie

> -Original Message-
> From: Andy Spiegl [mailto:[EMAIL PROTECTED]
> Sent: Friday, July 02, 2004 4:46 AM
> To: [EMAIL PROTECTED]
> Subject: apache2 crashes when using connectors - nobody?
> 
> Hm, nobody out there who has seen this problem before and might
> be able to help me?
> 
> 
> I installed tomcat-4.1.30 on a SuSE 9 box.  So far so good.
> But then I tried to install the connector modules into the apache
> (version 2.0.49-23) but didn't succeed.
> 
> I find this type of lines in the apache error.log:
>  [notice] child pid 21721 exit signal Segmentation fault (11)
> 
> and these lines in the mod_jk.log:
>  [jk_uri_worker_map.c (485)]: Into jk_uri_worker_map_t::map_uri_to_worker
>  [jk_uri_worker_map.c (619)]: In jk_uri_worker_map_t::map_uri_to_worker,
wrong
> parameters
> 
> I checked all available documentation and web resources but couldn't find
> any pointers to why that is so.  I have tried pretty much all versions of
> the connector modules I could find but apache always crashes like this.
> 
> For now I chose the mod_proxy method to serve the jsp files, but I'd
prefer
> the connectors.  Could some kind soul please point me to the solution.
> 
> Thanks in advance,
>  Andy.
> 
> --
>   o  _ _ _
>   --- __o   __o  /\_   _ \\o  (_)\__/o  (_)  -o)
>   - _`\<,__`\<,__>(_) (_)/<_\_| \   _|/' \/   /\\
>    (_)/ (_)  (_)/ (_)  (_)(_)   (_)(_)'  _\o__\_v
>  
>  Programmers - Use Safer Hex !
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]


RE: Como funciona tomcat en Fedora Core 2

2004-07-02 Thread Randall Svancara
make that port 8080

-Original Message-
From: Randall Svancara [mailto:[EMAIL PROTECTED]
Sent: Friday, July 02, 2004 10:06 AM
To: Tomcat Users List
Subject: RE: Como funciona tomcat en Fedora Core 2


If you have everything set up correctly, you should see the index.html file in the 
ROOT webapp of the tomcat servlet engine.  On fedora core2, look at your firewall 
rules to see if you have port 80 enabled.  

Sorry, my spanish is horribleno hablo espanol, que mal me amigo!!

Later.

-Original Message-
From: Dale, Matt [mailto:[EMAIL PROTECTED]
Sent: Friday, July 02, 2004 10:01 AM
To: Tomcat Users List
Subject: RE: Como funciona tomcat en Fedora Core 2



This is an english list, you may have more luck if you can get someone to translate.

Ta
Matt

-Original Message-
From: Sergio E. Triviño I. [mailto:[EMAIL PROTECTED]
Sent: 02 July 2004 16:40
To: Tomcat Users List
Subject: Como funciona tomcat en Fedora Core 2


Hola Lista

Instale Fedora Core 2, veo que viene el servicio tomcat e inclusive sube el servicio 
tomcat OK. Pero como lo acceso? 
Yo pense que era por lo normal http://localhost:8080 pero no funciona. Mi pregunta es 
que tengo que hacer para que funcione o como tengo que hacer la prueba para correr JSP.

Muchas Gracias.

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


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



RE: Como funciona tomcat en Fedora Core 2

2004-07-02 Thread Randall Svancara
If you have everything set up correctly, you should see the index.html file in the 
ROOT webapp of the tomcat servlet engine.  On fedora core2, look at your firewall 
rules to see if you have port 80 enabled.  

Sorry, my spanish is horribleno hablo espanol, que mal me amigo!!

Later.

-Original Message-
From: Dale, Matt [mailto:[EMAIL PROTECTED]
Sent: Friday, July 02, 2004 10:01 AM
To: Tomcat Users List
Subject: RE: Como funciona tomcat en Fedora Core 2



This is an english list, you may have more luck if you can get someone to translate.

Ta
Matt

-Original Message-
From: Sergio E. Triviño I. [mailto:[EMAIL PROTECTED]
Sent: 02 July 2004 16:40
To: Tomcat Users List
Subject: Como funciona tomcat en Fedora Core 2


Hola Lista

Instale Fedora Core 2, veo que viene el servicio tomcat e inclusive sube el servicio 
tomcat OK. Pero como lo acceso? 
Yo pense que era por lo normal http://localhost:8080 pero no funciona. Mi pregunta es 
que tengo que hacer para que funcione o como tengo que hacer la prueba para correr JSP.

Muchas Gracias.

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



RE: Como funciona tomcat en Fedora Core 2

2004-07-02 Thread Dale, Matt

This is an english list, you may have more luck if you can get someone to translate.

Ta
Matt

-Original Message-
From: Sergio E. Triviño I. [mailto:[EMAIL PROTECTED]
Sent: 02 July 2004 16:40
To: Tomcat Users List
Subject: Como funciona tomcat en Fedora Core 2


Hola Lista

Instale Fedora Core 2, veo que viene el servicio tomcat e inclusive sube el servicio 
tomcat OK. Pero como lo acceso? 
Yo pense que era por lo normal http://localhost:8080 pero no funciona. Mi pregunta es 
que tengo que hacer para que funcione o como tengo que hacer la prueba para correr JSP.

Muchas Gracias.
Any opinions expressed in this E-mail may be those of the individual and not 
necessarily the company. This E-mail and any files transmitted with it are 
confidential and solely for the use of the intended recipient. If you are not the 
intended recipient or the person responsible for delivering to the intended recipient, 
be advised that you have received this E-mail in error and that any use or copying is 
strictly prohibited. If you have received this E-mail in error please notify the 
beCogent postmaster at [EMAIL PROTECTED]
Unless expressly stated, opinions in this email are those of the individual sender and 
not beCogent Ltd. You must take full responsibility for virus checking this email and 
any attachments.
Please note that the content of this email or any of its attachments may contain data 
that falls within the scope of the Data Protection Acts and that you must ensure that 
any handling or processing of such data by you is fully compliant with the terms and 
provisions of the Data Protection Act 1984 and 1998.


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

Re: Apache auth on JBoss 3.2.4

2004-07-02 Thread Nikola Milutinovic
Eulogio Robles wrote:
There is no "jk2.config" or "jk2.properties" file on any JBoss 
directory. Where should it be located?

(Apache does communicate with JBoss over port 8009 for all JSP 
requests and they are displayed correctly).

That exactly IS the problem - I don't know. JBoss has changed Tomcat a 
bit, some of the config files are more integrated into JBoss' configs. I 
would still bet that jk2.config should be in ${CATALINA_HOME}. Trouble 
is, I'm not really sure where that is under JBoss. Try one of the JBoss 
forums.

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


Security constraints for different contexts

2004-07-02 Thread Rahman Syed
Hello,
I'm using Tomcat 5.0.25 and I'd like to use container-based security to 
restrict access to one specific page.  The problem is that this page exists 
in different contexts, but using the same docbase.  You can get a better 
idea by looking at the first snippet included below.

You can see that the application itself is installed by default at context 
"/wiki", and there will be additional copies at "/wiki/wikione" and so 
on.  My goal is to restrict /wiki/Edit.jsp to one role, 
/wiki/wikione/Edit.jsp to another role, etc.  The web.xml I'm using right 
now doesn't even prompt for authentication at all; the only time I can get 
it to authorize anything is when I only have one security constraint, for 
url-pattern "/Edit.jsp".

Is there an easy to way to achieve this?  Thanks...
Rahman
Server.xml snippet:
 
  
 override="false"/>
 


The application's web.xml snippet:
   
   
   Protected Area
   /wiki/Edit.jsp
   DELETE
   GET
   POST
   PUT
   
   
   wikiadmin
   
   
   
   
   Protected Area
   /wiki/wikione/Edit.jsp
   DELETE
   GET
   POST
   PUT
   
   
   wikioneadmin
   
   
   
  BASIC
  JSPWiki Editor
   

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


Como funciona tomcat en Fedora Core 2

2004-07-02 Thread Sergio E . Triviño I .
Hola Lista

Instale Fedora Core 2, veo que viene el servicio tomcat e inclusive sube el servicio 
tomcat OK. Pero como lo acceso? 
Yo pense que era por lo normal http://localhost:8080 pero no funciona. Mi pregunta es 
que tengo que hacer para que funcione o como tengo que hacer la prueba para correr JSP.

Muchas Gracias.

Re: How to use oracle pool instead of using DBCP pool?

2004-07-02 Thread Tim Funk
Nope. (Oracle's technical support /bulletin boards might be of more help)
-Tim
Claudio Carvalho wrote:
Hi Tim,
I'm looking for an alternative directly on the application server, something
like putting an "oracle-pool" jar into tomcat/common/lib directory, have you
heard anything like that?
Claudio Carvalho.
- Original Message - 
From: "Tim Funk" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <[EMAIL PROTECTED]>
Sent: Friday, July 02, 2004 10:52 AM
Subject: Re: How to use oracle pool instead of using DBCP pool?


An alternative is to look at the DBCP java-docs. Cast your Connection to a
DBCP's ppoled connection class (or approrpiate). That class has a method
called getDelegate() which returns the real connection from Oracle. Then
cast
that to the appropriate Oracle class.
-Tim
Claudio Carvalho wrote:

Cláudio CarvalhoHi,
I'm trying to get the CLOB working in my application and I'm having
problems
with the Connection, so, does anybody knows how to use in Tomcat 5 the
oracle pool instead of using the DBCP pool?

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


Re: Apache auth on JBoss 3.2.4

2004-07-02 Thread Eulogio Robles
There is no "jk2.config" or "jk2.properties" file on any JBoss 
directory. Where should it be located?

(Apache does communicate with JBoss over port 8009 for all JSP requests 
and they are displayed correctly).

regards,
E. Robles
Nikola Milutinovic wrote:
Eulogio Robles wrote:
I am migrating an application from Tomcat 4 to JBoss 4.2.4. It is 
being used from with Apache 2/JK2.
However it is failing because request.getRemoteUser() is returning 
null in some password protected pages. All the auth configuratoion 
(login and passwords) is based on Apache.

The problem was solved in Tomcat4 by adding a line on 
$tomcat_home/conf/jk2.properties 
(request.tomcatAuthentication=false), but I have been unable to get 
the same result on JBoss.

Please any hint?

Is JBoss/Tomcat seeing your "jk2.config"? It might be in a different 
place with JBoss' as a wrapper.

Test it - add some garble to "jk2.config" and see if Tomcat complains.
Nix.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

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


RE: Apache2 SSL with client authentication jk2 tomcat 5 - no user certificate in request

2004-07-02 Thread Summers, Bert W.
I tried to get that working but failed so I went back to mod_jk which does
pass the cert.


SSLVerifyClient optional
SSLVerifyDepth  5
SSLRequireSSL
SSLOptions +FakeBasicAuth +ExportCertData +StdEnvVars
Options Indexes FollowSymLinks
DirectoryIndex index.jsp 


-Original Message-
From: Radu Radutiu [mailto:[EMAIL PROTECTED] 
Sent: Friday, July 02, 2004 7:49 AM
To: Tomcat Users List
Subject: Apache2 SSL with client authentication jk2 tomcat 5 - no user
certificate in request


Hi,

I'm running Tomcat 5 + jdk 1.4.2_02 + Apache 2.0.49 (Fedora 1) with mod_jk2.
I can access the  web app through SSL (with client authentication enabled in
Apache) but the following attributes are not set in the request:
"javax.servlet.request.cipher_suite",
"javax.net.ssl.peer_certificates" and
"javax.servlet.request.X509Certificate"
If I access the Tomcat server directly on a port configured with SSL with
client authentication, "javax.servlet.request.cipher_suite"  and
"javax.servlet.request.X509Certificate" are set correctly.

I've tried different versions of tomcat (5.0.25 and 4.1.27), mod_jk2 from
the binary distribution and  self compiled and get the same result. Running
a traffic sniffer it seems that the certificate information is never sent to
the tomcat server.

The jk2 configuration (in httpd.conf) is the following:

LoadModule jk2_module modules/mod_jk2.so
JkSet config.file /etc/httpd/conf/workers2.properties
# default value
JkSet2 workerEnv sslEnable 1
JkSet2 workerEnv forwardKeySize  1

The workers2.properties is the default file from the binary distribution
with the updated uri for the web application.

Is it possible to get the user certificate in Tomcat when using Apache
+ mod_jk2 as a front end?

Regards,

Radu

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

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



Re: Apache auth on JBoss 3.2.4

2004-07-02 Thread Nikola Milutinovic
Eulogio Robles wrote:
I am migrating an application from Tomcat 4 to JBoss 4.2.4. It is 
being used from with Apache 2/JK2.
However it is failing because request.getRemoteUser() is returning 
null in some password protected pages. All the auth configuratoion 
(login and passwords) is based on Apache.

The problem was solved in Tomcat4 by adding a line on 
$tomcat_home/conf/jk2.properties (request.tomcatAuthentication=false), 
but I have been unable to get the same result on JBoss.

Please any hint?

Is JBoss/Tomcat seeing your "jk2.config"? It might be in a different 
place with JBoss' as a wrapper.

Test it - add some garble to "jk2.config" and see if Tomcat complains.
Nix.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Apache2 SSL with client authentication jk2 tomcat 5 - no user certificate in request

2004-07-02 Thread Radu Radutiu
Hi,

I'm running Tomcat 5 + jdk 1.4.2_02 + Apache 2.0.49 (Fedora 1) with
mod_jk2. I can access the  web app through SSL (with client
authentication enabled in Apache) but the following attributes are not
set in the request: "javax.servlet.request.cipher_suite",
"javax.net.ssl.peer_certificates" and
"javax.servlet.request.X509Certificate"
If I access the Tomcat server directly on a port configured with SSL
with client authentication, "javax.servlet.request.cipher_suite"  and
"javax.servlet.request.X509Certificate" are set correctly.

I've tried different versions of tomcat (5.0.25 and 4.1.27), mod_jk2
from the binary distribution and  self compiled and get the same
result. Running a traffic sniffer it seems that the certificate
information is never sent to the tomcat server.

The jk2 configuration (in httpd.conf) is the following:

LoadModule jk2_module modules/mod_jk2.so
JkSet config.file /etc/httpd/conf/workers2.properties
# default value
JkSet2 workerEnv sslEnable 1
JkSet2 workerEnv forwardKeySize  1

The workers2.properties is the default file from the binary
distribution with the updated uri for the web application.

Is it possible to get the user certificate in Tomcat when using Apache
+ mod_jk2 as a front end?

Regards,

Radu

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



Re: HttpSession

2004-07-02 Thread Trond Hersløv
Thanks alot Mike,
I will try this out during the day and let you if I was successfull or not.

\trond


-Opprinnelig melding-
Fra: Mike Fowler [mailto:[EMAIL PROTECTED]
Sendt: Friday, July 02, 2004 11:04
Til: Tomcat Users List
Emne: Re: HttpSession


Trond-

HttpSession.class in servlet-api.jar is an interface as is implemented 
in several places in the Tomcat source. To add new functionality I would 
make changes to the following classes and recompile Tomcat:

-javax.servlet.http.HttpSession.java
 add your new methods:

 public void myHelperMethod();

-org.apache.catalina.session.StandardSession.java
 implement your new method:

 public void myHelperMethod()
 {
 //useful code
 }

-org.apache.catalina.session.StandardSessionFacade.java
 add the lines:

 public void myHelperMethod()
 {
 this.session.myHelperMethod();
 }

-org.apache.catalina.cluster.session.DeltaSession.java
 implement your new method:

 public void myHelperMethod()
 {
 //useful code
 }

-org.apache.catalina.cluster.session.DeltaSessionFacade.java
 add the lines:

 public void myHelperMethod()
 {
 this.session.myHelperMethod();
 }

Hope this helps!


-Mike Fowler
"I could be a genius if I just put my mind to it, and I,
I could do anything, if only I could get 'round to it"


Trond Hersløv wrote:
> Hi!
> What do I have to do if want to use a modified HttpSession class? Can I do
> one of the following:
>  
> Hope I don't have to do it this way:
> 1) extract $CATALINA_HOME/common/lib/servlet-api.jar
> 2) decompile HttpSession.class --> HttpSession.java
> 3) make my modifications on HttpSession.java and compile -->
> HttpSession.class
> 4) build a new servlet-api.jar containing the modified HttpSession.class
> instead of the original one.
>  
> It would be nice if this was possible.
> 1) create a new class MyHttpSession which extends HttpSession
> 2) add my extra funcionality to MyHttpSession.
> 3) compile MyHttpSession --> MyHttpSession.class and putt it into
> $CATALINA_HOME/common/classes
> 4)The big QUESTION: How do I config tomcat to use MyHttpSession.class
> instead of HttpSession.
>  
> Thanks in advance
> \trond
>  
>  
>  
> 
> 
> **
> This email message has been swept by
> MIMEsweeper for the presence of computer viruses.
> **
> 
> 

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


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



Re: Logging in Apache Tomcat

2004-07-02 Thread Kunthar
Try System.out.println("your variable" or your error thrown);
in your application for critical parts.
And follow the results from catalina.out file under /tomcat/logs
Hope this helps...
Gokhan

Robert Einsle wrote:
Hello List,
How do i make logging in JAkarta Tomcat applications??
Does it exists an Howto for it??
Thanks for help
\Robert

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


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


Re: How to use oracle pool instead of using DBCP pool?

2004-07-02 Thread Claudio Carvalho
Hi Tim,

I'm looking for an alternative directly on the application server, something
like putting an "oracle-pool" jar into tomcat/common/lib directory, have you
heard anything like that?

Claudio Carvalho.

- Original Message - 
From: "Tim Funk" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <[EMAIL PROTECTED]>
Sent: Friday, July 02, 2004 10:52 AM
Subject: Re: How to use oracle pool instead of using DBCP pool?


> An alternative is to look at the DBCP java-docs. Cast your Connection to a
> DBCP's ppoled connection class (or approrpiate). That class has a method
> called getDelegate() which returns the real connection from Oracle. Then
cast
> that to the appropriate Oracle class.
>
> -Tim
>
> Claudio Carvalho wrote:
>
> > Cláudio CarvalhoHi,
> >
> > I'm trying to get the CLOB working in my application and I'm having
problems
> > with the Connection, so, does anybody knows how to use in Tomcat 5 the
> > oracle pool instead of using the DBCP pool?
> >
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


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



logging

2004-07-02 Thread Charles Baker
I'm using tomcat 4.1.30 on Red Hat Linux w/ Sun JDK 1.4.2_03. In
catalina.sh one of the other admins has redirected standard out to a log
file so that we can capture some info that would ordinarily only be seen
at the console. What we would like to do is have the tomcat container
itself, not just a particular web application, use log4j to log it's
messages. Also, after the container is up and all webapps have been
deployed, we would like to lower the logging level of the container from
say INFO to FATAL. We are already doing this with JBoss but haven't been
able to figure a way to do this with tomcat. I've googled and looked at
the archives w/o finding anything relevant. Does anyone have a clue?


Charles H. Baker
O: 864.422.5349 C: 864.201.8456
[EMAIL PROTECTED] 
Whatever you vividly imagine, ardently desire, sincerely believe and
enthusiastically act upon must inevitably come to pass! -- Paul J. Meyer


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



Re: JSP updates leading to OutOfMemoryErrors and Tomcat Crashes

2004-07-02 Thread Peter Lin
have you tried handling it this way?

1. compile the jsp on a staging server
2. tar up the files
3. upload to the production servers
4. untar
5. touch jsp files
6. touch compiled classes in the working directory

I used that approach in the past to handle updates to the production servers.

peter


- Original Message -
From: Dale, Matt <[EMAIL PROTECTED]>
Date: Fri, 2 Jul 2004 14:49:21 +0100
Subject: JSP updates leading to OutOfMemoryErrors and Tomcat Crashes
To: "Tomcat Users List (E-mail)" <[EMAIL PROTECTED]>




We have a webapp that consists of >1000 jsps that are code generated
from another application. What we are experiencing is within an hour
or two of uploading some updated jsps OutOfMemoryErrors start
happening and Tomcat crashes.

Once restarted, it seems fine and survives until we next do an update
when once again after a couple of hours the same problems reoccur.

We tried forking the Jsp compliation, but this hasn't resolved the problem. 
I was wondering if anybody has ever come accross similar behaviour and
if there are any known issues that may relate to it.

Ta
Matt 


InterScan_Disclaimer.txt - 1K Download 
noname - 1K Download

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



RE: Problems moving from server.xml to web.xml ...

2004-07-02 Thread Lorenzo A. Jimenez Briceno
Ivan:
 
If you are using TC5, you can move server.xml info not to web.xml but to context.xml 
in META-INF directory.
I have used it with Netbeans 3.6 where the software creates this dir and the file. So 
context.xml contains:
 
 

 
Change it properly:
 
 



maxActive5

maxIdle5

usernameivan

passwordkittiesrcute


driverClassNamecom.mysql.jdbc.Driver


urljdbc:mysql://192.168.0.1:3306/school?autoReconnect=true



Try it,
Happy computing,
 
Lorenzo
 


 
 
 
 
 
 
-Mensaje original-
De: Ivan Jouikov [mailto:[EMAIL PROTECTED]
Enviado el: Viernes, 02 de Julio de 2004 02:33 a.m.
Para: 'Tomcat Users List'
Asunto: Problems moving  from server.xml to web.xml ...


I want to move  element from server.xml to web.xml, so I can add new 
applications without restarting the server.

Everything works fine, my DB and all, until I move this entry:
code: 

  _  

  

   
   
   
   
   
   maxActive5
   
   maxIdle5
   
   usernameivan
   
   
passwordkittiesrcute
   
   
driverClassNamecom.mysql.jdbc.Driver
   
   
urljdbc:mysql://192.168.0.1:3306/school?autoReconnect=true
   
 
 

  _  



As soon as I move this thing, and try to use my DB, I get the following error:

Error message: Cannot create JDBC driver of class '' for connect URL 'null'

My mysql connector is both in my /common/lib and my /WEB-INF/lib/, just to keep it 
safe. Also, to my web.xml I added these two entries:
code: 

  _  

 


   DB Connection
   jdbc/ablogic
   javax.sql.DataSource
   Container
 

  _  



I have no idea what the hell is wrong. Theoretically, I am not changing anything by 
simply copying  element, yet, it seems to stop working .

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.701 / Virus Database: 458 - Release Date: 07.06.2004




_ 
Lorenzo A. Jimenez Briceno
WebMaster
Banco Internacional de Costa Rica
( (506) 243-1077
1 (506) 243-1075
- [EMAIL PROTECTED]

BICSA ÂUn mundo de servicios financieros a su alcance! 
http://www.bicsa.com
7/2/2004 8:01 AM
Este mensaje puede ser confidencial. Si usted no es la persona a quien se debià 
dirigir por favor notifÃquenos de inmediato y borre el mensaje. BICSA no acepta 
responsabilidad legal por ningÃn daÃo causado por virus, errores u omisiones en el 
contenido de este mensaje. Todo uso o divulgaciÃn no autorizado està prohibido. 
Gracias. 

This message may be confidential. If you are not the intended recipient, please notify 
us immediately and delete this message. BICSA does not accept liability for any damage 
caused by virus, errors, or omissions in the contents of this message. Any 
unauthorized use or disclosure of its contents is prohibited. Thank you. 


RE: JSP updates leading to OutOfMemoryErrors and Tomcat Crashes

2004-07-02 Thread Kannan Sundararajan
It depends on your hardware and memory settings. 
 

-Original Message-
From: Dale, Matt [mailto:[EMAIL PROTECTED]
Sent: Friday, July 02, 2004 9:49 AM
To: Tomcat Users List (E-mail)
Subject: JSP updates leading to OutOfMemoryErrors and Tomcat Crashes



We have a webapp that consists of >1000 jsps that are code generated from
another application. What we are experiencing is within an hour or two of
uploading some updated jsps OutOfMemoryErrors start happening and Tomcat
crashes. 

Once restarted, it seems fine and survives until we next do an update when
once again after a couple of hours the same problems reoccur. 

We tried forking the Jsp compliation, but this hasn't resolved the problem. 
I was wondering if anybody has ever come accross similar behaviour and if
there are any known issues that may relate to it. 

Ta
Matt 



Re: How to use oracle pool instead of using DBCP pool?

2004-07-02 Thread Tim Funk
An alternative is to look at the DBCP java-docs. Cast your Connection to a 
DBCP's ppoled connection class (or approrpiate). That class has a method 
called getDelegate() which returns the real connection from Oracle. Then cast 
that to the appropriate Oracle class.

-Tim
Claudio Carvalho wrote:
Cláudio CarvalhoHi,
I'm trying to get the CLOB working in my application and I'm having problems
with the Connection, so, does anybody knows how to use in Tomcat 5 the
oracle pool instead of using the DBCP pool?
 
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


JSP updates leading to OutOfMemoryErrors and Tomcat Crashes

2004-07-02 Thread Dale, Matt
Title: JSP updates leading to OutOfMemoryErrors and Tomcat Crashes






We have a webapp that consists of >1000 jsps that are code generated from another application. What we are experiencing is within an hour or two of uploading some updated jsps OutOfMemoryErrors start happening and Tomcat crashes. 

Once restarted, it seems fine and survives until we next do an update when once again after a couple of hours the same problems reoccur. 

We tried forking the Jsp compliation, but this hasn't resolved the problem. 

I was wondering if anybody has ever come accross similar behaviour and if there are any known issues that may relate to it. 

Ta
Matt



Any opinions expressed in this E-mail may be those of the individual and not 
necessarily the company. This E-mail and any files transmitted with it are 
confidential and solely for the use of the intended recipient. If you are not the 
intended recipient or the person responsible for delivering to the intended recipient, 
be advised that you have received this E-mail in error and that any use or copying is 
strictly prohibited. If you have received this E-mail in error please notify the 
beCogent postmaster at [EMAIL PROTECTED]
Unless expressly stated, opinions in this email are those of the individual sender and 
not beCogent Ltd. You must take full responsibility for virus checking this email and 
any attachments.
Please note that the content of this email or any of its attachments may contain data 
that falls within the scope of the Data Protection Acts and that you must ensure that 
any handling or processing of such data by you is fully compliant with the terms and 
provisions of the Data Protection Act 1984 and 1998.


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

How to use oracle pool instead of using DBCP pool?

2004-07-02 Thread Claudio Carvalho
Cláudio CarvalhoHi,

I'm trying to get the CLOB working in my application and I'm having problems
with the Connection, so, does anybody knows how to use in Tomcat 5 the
oracle pool instead of using the DBCP pool?

Thanks.

Claudio Carvalho.


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



Re: apache2 crashes when using connectors - nobody?

2004-07-02 Thread David Smith
Someone might be able to help if you would be so kind as to provide more 
information like relevant parts of your Apache config and the 
workers.properties file.  Also was the mod_jk connector package you 
installed built for this version of Apache?

--David
Andy Spiegl wrote:
Hm, nobody out there who has seen this problem before and might
be able to help me?
I installed tomcat-4.1.30 on a SuSE 9 box.  So far so good.
But then I tried to install the connector modules into the apache
(version 2.0.49-23) but didn't succeed.
I find this type of lines in the apache error.log:
[notice] child pid 21721 exit signal Segmentation fault (11)
and these lines in the mod_jk.log:
[jk_uri_worker_map.c (485)]: Into jk_uri_worker_map_t::map_uri_to_worker
[jk_uri_worker_map.c (619)]: In jk_uri_worker_map_t::map_uri_to_worker, wrong 
parameters
I checked all available documentation and web resources but couldn't find
any pointers to why that is so.  I have tried pretty much all versions of
the connector modules I could find but apache always crashes like this.
For now I chose the mod_proxy method to serve the jsp files, but I'd prefer
the connectors.  Could some kind soul please point me to the solution.
Thanks in advance,
Andy.
 

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


Re: Change to Port 80

2004-07-02 Thread Mark Lowe
was apache already running on linux by any remote chance?
did the log say that 80 was already in use?
On 2 Jul 2004, at 00:01, Steve Beaman wrote:
I'm also on Linux,
and when I tried to
mod 8080 to 80 via "vi",
it crashed the server at startup.
I finally gave up, made the mods
on a Windows box, copied to Linux,
and it all worked.
Beats me.
- Original Message -
From: "Ryan McCain" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, July 01, 2004 1:50 PM
Subject: Change to Port 80

How do I configure Tomcat to run on port 80 as opposed to 8080? I
changed a few parameters in the xml config file, but nothing seemed to
have took.
OS=SUSE Linux
Tomcat=4.x
Thanks,
Ryan
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

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


RE: Change to Port 80

2004-07-02 Thread Yanbin Ma
Did you run tomcat from root? I am running AIX, I remember somewhere it
says you must be root in order to start a program using port 80.

Hope it helps.

Yanbin

-Original Message-
From: Steve Beaman [mailto:[EMAIL PROTECTED] 
Sent: Thursday, July 01, 2004 6:01 PM
To: Tomcat Users List
Subject: Re: Change to Port 80

I'm also on Linux,
and when I tried to
mod 8080 to 80 via "vi", 
it crashed the server at startup.

I finally gave up, made the mods 
on a Windows box, copied to Linux,
and it all worked.

Beats me.

- Original Message - 
From: "Ryan McCain" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, July 01, 2004 1:50 PM
Subject: Change to Port 80


> 
> How do I configure Tomcat to run on port 80 as opposed to 8080? I
> changed a few parameters in the xml config file, but nothing seemed to
> have took.
> OS=SUSE Linux
> Tomcat=4.x
> 
> Thanks,
> Ryan
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]

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




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



RE: LDAP - newbee help

2004-07-02 Thread Kal Govindu
Thank you for clearing that up.

I will take a look at that document. I have made a connection to the Active Directory, 
but am not able to authenticate users yet, probably since I don't know details about 
how user or members and their corresponding role information is store in our Directory 
Server. I will need to contact the tech guys for that. In Microsoft Active Directory 
terms, where is this information stored? and what is called? so I can ask the right 
questions.

Thanks
Kal

-Original Message-
From: Ross Rankin [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 01, 2004 2:09 PM
To: Kal Govindu; 'Tomcat Users List (E-mail)'
Subject: RE: LDAP - newbee help



LDAP, Lightweight Directory Access Protocol, is a protocol that other
programs use to look up contact information from a server, such as Microsoft
Active Directory.  It is a service provided by a server, not a server.  An
LDAP server is a server that provides LDAP services...  The Microsft AD
service is LDAP-compatible.  

http://www.microsoft.com/windowsserver2003/techinfo/overview/ldapcomp.mspx

Ross

-Original Message-
From: Kal Govindu [mailto:[EMAIL PROTECTED] 
Sent: Thursday, July 01, 2004 1:51 PM
To: Tomcat Users List (E-mail)
Subject: LDAP - newbee help

Hello all,

I am trying to setup tomcat 5 to authenticate against Microsoft Directory
Server through LDAP. I have found a very detailed document for tomcat 5 and
JNDI realm. One question before I go any further: Is LDAP server a server
that needs to be started separately from directory server? If so, where can
I get that?

Thanks
Kal


CONFIDENTIALITY NOTE:  All e-mail sent to or from this address will be
received by the Waterfield Group corporate e-mail system and is subject to
archival, monitoring, and/or review by someone other than the recipient or
the sender.

This e-mail and any of its attachments may contain proprietary information,
which is privileged and confidential.  This e-mail is intended solely for
the use of the individual or entity to which it is addressed.  If you are
not the intended recipient of this e-mail, you are hereby notified that any
dissemination, distribution, copying, or action taken in relation to the
contents of and attachments to this e-mail is strictly prohibited and may be
unlawful.  If you have received this e-mail in error, please notify the
sender immediately and permanently delete the original and any copy of this
e-mail and any printout.  Thank you.




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



Re: AW: How to increase memory

2004-07-02 Thread Thilo Krawietz
Hi Gunnar,
if you added these options in CATALINA_OPTS, its not necessary to place 
it also in JAVA_OPTS. Both variables are attached to 'java' command at 
the bottom of catalina.bat (you can see this in the bottom of 
catalina.bat at the line commencing with the %EXECJAVA% statement)

But if this command did not increase performance, i guess that your 
problem is not related to a lack of memory. What type of machine are you 
using?

Regards,
Thilo

Where do I have to add this? Also in the catalina.bat?
I tested set CATALINA_OPTS=%CATALINA_OPTS% -Xms1024m -Xmx2048m in
Catalona.bat as mentioned from Thilo Krawietz' email.
Still it seems to be very slow.
Thank you
Gunnar
-Ursprüngliche Nachricht-
Von: alu, artifex [mailto:[EMAIL PROTECTED] 
Gesendet: Donnerstag, 1. Juli 2004 16:59
An: Tomcat Users List
Betreff: Re: How to increase memory

by setting the environment variable JAVA_OPTS to something like this: 
-Xms32m -Xmx512m
this will cause the vm to allocate 32m at startup and limits the maximum
java heap memory size to 512mb.

you can set the environment variable by adding the following command
somewhere at the beginning of startup.bat:
set JAVA_OPTS=-Xms32m -Xmx512m
art
Gunnar Pörschke wrote:
 

where and how do I increase memory (win2003Srv) for tomcat (4.1.30)?


   


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

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


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


Issue with JK2 IIS 5.0 and Tomcat 4.1.30

2004-07-02 Thread Sudhir Sudhir
Hello All,

I am having a strange issue in that when I user Jk2 connector for IIS
(isapi_redirector2.dll). Everything works fine in the sense that all my
requests are by redirected to tomcat from the web server etc.

 

But my app passes chunks of XML back and forth between requests and when I
reach that part of the application the request for some reason the XML block
is being truncated? And as the XML block gets bigger it sometimes brings
down the IIS server!!!

 

So I was wondering if there are any known issues with Jk2 connector in terms
of size of data. Or is there some other setting that I am missing? The
application works fine if I by pass IIS and hit the Tomcat directly.

 

Help will be appreciated.

 

Thanks,

Sudhir

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



Re: AW: How to increase memory

2004-07-02 Thread alu, artifex
as i stated before: try adding the following line in the startup.bat file
set JAVA_OPTS=-Xms32m -Xmx512m
you can add it at the very first line, before (or shortly after) the 
"@echo off" statement.

>Still it seems to be very slow.
maybe you don't face memory problems.
you can use windows task manager to determine the memory usage of 
tomcat. look for a process
called "java.exe" and see how much memory it is using.

art
ps: falls du noch ausführlichere hilfe auf deutsch brauchst -> mail an 
mich =)

Gunnar Pörschke wrote:
Where do I have to add this? Also in the catalina.bat?
I tested set CATALINA_OPTS=%CATALINA_OPTS% -Xms1024m -Xmx2048m in
Catalona.bat as mentioned from Thilo Krawietz' email.
Still it seems to be very slow.
Thank you
Gunnar
-Ursprüngliche Nachricht-
Von: alu, artifex [mailto:[EMAIL PROTECTED] 
Gesendet: Donnerstag, 1. Juli 2004 16:59
An: Tomcat Users List
Betreff: Re: How to increase memory

by setting the environment variable JAVA_OPTS to something like this: 
-Xms32m -Xmx512m
this will cause the vm to allocate 32m at startup and limits the maximum
java heap memory size to 512mb.

you can set the environment variable by adding the following command
somewhere at the beginning of startup.bat:
set JAVA_OPTS=-Xms32m -Xmx512m
art
Gunnar Pörschke wrote:
 

where and how do I increase memory (win2003Srv) for tomcat (4.1.30)?


   


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

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


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


Re: HttpSession

2004-07-02 Thread Mike Fowler
Trond-
HttpSession.class in servlet-api.jar is an interface as is implemented 
in several places in the Tomcat source. To add new functionality I would 
make changes to the following classes and recompile Tomcat:

-javax.servlet.http.HttpSession.java
add your new methods:
public void myHelperMethod();
-org.apache.catalina.session.StandardSession.java
implement your new method:
public void myHelperMethod()
{
//useful code
}
-org.apache.catalina.session.StandardSessionFacade.java
add the lines:
public void myHelperMethod()
{
this.session.myHelperMethod();
}
-org.apache.catalina.cluster.session.DeltaSession.java
implement your new method:
public void myHelperMethod()
{
//useful code
}
-org.apache.catalina.cluster.session.DeltaSessionFacade.java
add the lines:
public void myHelperMethod()
{
this.session.myHelperMethod();
}
Hope this helps!
-Mike Fowler
"I could be a genius if I just put my mind to it, and I,
I could do anything, if only I could get 'round to it"
Trond Hersløv wrote:
Hi!
What do I have to do if want to use a modified HttpSession class? Can I do
one of the following:
 
Hope I don't have to do it this way:
1) extract $CATALINA_HOME/common/lib/servlet-api.jar
2) decompile HttpSession.class --> HttpSession.java
3) make my modifications on HttpSession.java and compile -->
HttpSession.class
4) build a new servlet-api.jar containing the modified HttpSession.class
instead of the original one.
 
It would be nice if this was possible.
1) create a new class MyHttpSession which extends HttpSession
2) add my extra funcionality to MyHttpSession.
3) compile MyHttpSession --> MyHttpSession.class and putt it into
$CATALINA_HOME/common/classes
4)The big QUESTION: How do I config tomcat to use MyHttpSession.class
instead of HttpSession.
 
Thanks in advance
\trond
 
 
 

**
This email message has been swept by
MIMEsweeper for the presence of computer viruses.
**

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


RE: Tomcat -> MySQL = No suitable driver ERROR

2004-07-02 Thread Jan Behrens
yes patrick,

i guess that is what david and i want so your dbtest works. allthough the
posted contents of web.xml lack a doctype or schema definition (see hassans
post). now, have you tried this?

cheers, jan

-Original Message-
From: Briggs, Patrick [mailto:[EMAIL PROTECTED] 
Sent: Thursday, July 01, 2004 7:59 PM
To: 'Tomcat Users List'
Cc: '[EMAIL PROTECTED]'
Subject: RE: Tomcat -> MySQL = No suitable driver ERROR


Ok, the contents of {TOMCAT_HOME}/conf/Catalina/localhost/DBTest.xml is:



  
  

  url
jdbc:mysql://cir-ops:3306/javatest?autoReconnect=true


  maxIdle
  15


  maxActive
  50


  driverClassName
  com.mysql.jdbc.Driver


  maxWait
  1


  removeAbandoned
  true


  username
  javauser


  factory
  org.apache.commons.dbcp.BasicDataSourceFactory


  removeAbandonedTimeout
  60


  password
  javadude

  


Contents of {TOMCAT_HOME}/webapps/DBTest/WEB-INF/web.xml is:


  MySQL Test App
  
  DB Connection
  jdbc/DBTest
  javax.sql.DataSource
  Container
  


Is this what you wanted?



-Original Message-
From: David Smith [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 01, 2004 10:25 AM
To: Tomcat Users List
Subject: Re: Tomcat -> MySQL = No suitable driver ERROR


Hold on a minute.  I think we have a communication problem here.  I 
wasn't recommending you do that.  Slow down, take a breath and read my 
posts VERY carefully.

We are looking at two different files here.  DBTest.xml as a file 
containing the ... stuff should be in 
{TOMCAT_HOME}/conf/Catalina/localhost.  Leave that alone.

I was recommending you take the ... stuff 
you put in {TOMCAT_HOME}/webapps/DBTest/WEB-INF/DBTest.xml and put that 
in {TOMCAT_HOME}/webapps/DBTest/WEB-INF/web.xml.

Both files are needed with their respective parts.  The context 
definition needs to have the  and 
... sections to define a connection 
pool and make it available in tomcat's JNDI name space.  web.xml needs 
the ... stuff to make the connection pool 
avialable to your application.

--David

Briggs, Patrick wrote:

>Ok, I tried as you suggested, I deleted DBTest.xml out of the 
>conf/Catalina/localhost directory and placed it inside my web.xml for 
>the webapp itself.  I rebooted my machine, restarted Tomcat, same 
>error.  Still nothing.
>
>Here is what my web.xml looks like now:
>
>
>Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd";>
>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";
>version="2.4">
>  MySQL Test App
>  
>  DB Connection
>  jdbc/DBTest
>  javax.sql.DataSource
>  Container
>  
>
>reloadable="true" workDir="work\Catalina\localhost\DBTest">
>
>  type="javax.sql.DataSource"/>
>  
>
>  url
>   
>jdbc:mysql://cir-ops:3306/javatest?autoReconnect=true
>
>
>  maxIdle
>  15
>
>
>  maxActive
>  50
>
>
>  driverClassName
>  com.mysql.jdbc.Driver
>
>
>  maxWait
>  1
>
>
>  removeAbandoned
>  true
>
>
>  username
>  javauser
>
>
>  factory
>  org.apache.commons.dbcp.BasicDataSourceFactory
>
>
>  removeAbandonedTimeout
>  60
>
>
>  password
>  javadude
>
>  
>
>  
>
>-Original Message-
>From: David Smith [mailto:[EMAIL PROTECTED]
>Sent: Wednesday, June 30, 2004 6:56 PM
>To: Tomcat Users List
>Subject: Re: Tomcat -> MySQL = No suitable driver ERROR
>
>
>Ok.  I think I'm seeing your trouble.  The stuff you have in
>WEB-INF/DB-Test.xml should be in web.xml instead.  In mine, the 
>... stuff is at the end of the file just 
>before the closing  tag.  In tomcat versions 3 and 4, the 
>order of elements in web.xml was important.  I believe that requirement 
>has been lifted in tomcat 5.
>
>--David
>
>Try that and see what happens.
>
>--David
>
>Briggs, Patrick wrote:
>
>  
>
>>I'm using an example someone else on this list gave me.
>>
>>So inside of {CATALINA_HOME}/conf/Catalina/localhost/DBTest.xml
>>
>>
>>>path="/DBtest" reloadable="true" 
>>workDir="work\Catalina\localhost\DBTest">
>>
>> >type="javax.sql.DataSource"/>  
>>   
>> url
>>  jdbc:mysql://cir-ops:3306/javatest?autoReconnect=true
>>   
>>   
>> maxIdle
>> 15
>>   
>>   
>> maxActive
>> 50
>>   
>>   
>> driverClassName
>> com.mysql.jdbc.Driver
>>   
>>   
>> maxWait
>> 1
>>   
>>   
>> removeAbandoned
>> true
>>   
>>   
>> username
>> javauser
>>   
>>   
>> factory
>> org.apache.commons.dbcp.BasicDataSourceFactory
>>   
>>   
>> removeAbandonedTimeout
>> 60
>>   
>>   
>> password
>> javadude
>>   
>> 
>>
>>
>>The contents of {Catalina_Home}/webapps/DBTe

apache2 crashes when using connectors - nobody?

2004-07-02 Thread Andy Spiegl
Hm, nobody out there who has seen this problem before and might
be able to help me?


I installed tomcat-4.1.30 on a SuSE 9 box.  So far so good.
But then I tried to install the connector modules into the apache
(version 2.0.49-23) but didn't succeed.

I find this type of lines in the apache error.log:
 [notice] child pid 21721 exit signal Segmentation fault (11)

and these lines in the mod_jk.log:
 [jk_uri_worker_map.c (485)]: Into jk_uri_worker_map_t::map_uri_to_worker
 [jk_uri_worker_map.c (619)]: In jk_uri_worker_map_t::map_uri_to_worker, wrong 
parameters

I checked all available documentation and web resources but couldn't find
any pointers to why that is so.  I have tried pretty much all versions of
the connector modules I could find but apache always crashes like this.

For now I chose the mod_proxy method to serve the jsp files, but I'd prefer
the connectors.  Could some kind soul please point me to the solution.

Thanks in advance,
 Andy.

-- 
  o  _ _ _
  --- __o   __o  /\_   _ \\o  (_)\__/o  (_)  -o)
  - _`\<,__`\<,__>(_) (_)/<_\_| \   _|/' \/   /\\
   (_)/ (_)  (_)/ (_)  (_)(_)   (_)(_)'  _\o__\_v
 
 Programmers - Use Safer Hex !

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



Problems moving from server.xml to web.xml ...

2004-07-02 Thread Ivan Jouikov








I want to move  element
from server.xml to web.xml, so I can add new applications without restarting
the server.

Everything works fine, my DB and all, until I move this entry:

code: 







 
ÂÂ Â
ÂÂ 
ÂÂ 
ÂÂ 
ÂÂ 
ÂÂ 
ÂÂ maxActive5
ÂÂ 
ÂÂ maxIdle5
ÂÂ 
ÂÂ usernameivan
ÂÂ 
ÂÂ ÂÂÂ passwordkittiesrcute
ÂÂ 
ÂÂ ÂÂÂ driverClassNamecom.mysql.jdbc.Driver
ÂÂ 
ÂÂ ÂÂÂ urljdbc:mysql://192.168.0.1:3306/school?autoReconnect=true
ÂÂ 
Â
ÂÂÂ  









As soon as I move this thing, and try to use my DB, I get the following error:

Error message: Cannot create JDBC driver of
class '' for connect URL 'null'

My mysql connector is both in my /common/lib and my /WEB-INF/lib/, just to keep
it safe. Also, to my web.xml I added these two entries:

code: 







Â
ÂÂÂ 
ÂÂÂ 
ÂÂ DB
Connection
ÂÂ jdbc/ablogic
ÂÂ javax.sql.DataSource
ÂÂ Container
ÂÂÂ  









I have no idea what the hell is wrong. Theoretically, I am not changing
anything by simply copying  element, yet, it seems to stop working .








---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.701 / Virus Database: 458 - Release Date: 07.06.2004
 

  


struts tomcat turkish character problem

2004-07-02 Thread Eyup TEKIN
hi
there is a webapp including oracledatabase(datas are hold with turkish
character) ejbs on borlandapplicationserver ,tomcat,struts and jsps.
i can write turkish character in jsp page side.but dynaaction form creates a
selection list.and that list cant show turkish character.in tomcat's
catalina.sh file there is a "-Dfile encoding=1254" parameter.and i wrote in
the struts part below convertion

"
byte[] s0_byte = satirArray[0].getBytes("Cp1254");
satirArray [1]= new String(s1_byte, "Cp1252");
"
i solved problem but how can i solve this problem in another way? maybe
general solution will be beter.

sincerely


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



HttpSession

2004-07-02 Thread Trond Hersløv
Hi!
What do I have to do if want to use a modified HttpSession class? Can I do
one of the following:
 
Hope I don't have to do it this way:
1) extract $CATALINA_HOME/common/lib/servlet-api.jar
2) decompile HttpSession.class --> HttpSession.java
3) make my modifications on HttpSession.java and compile -->
HttpSession.class
4) build a new servlet-api.jar containing the modified HttpSession.class
instead of the original one.
 
It would be nice if this was possible.
1) create a new class MyHttpSession which extends HttpSession
2) add my extra funcionality to MyHttpSession.
3) compile MyHttpSession --> MyHttpSession.class and putt it into
$CATALINA_HOME/common/classes
4)The big QUESTION: How do I config tomcat to use MyHttpSession.class
instead of HttpSession.
 
Thanks in advance
\trond
 
 
 


**
This email message has been swept by
MIMEsweeper for the presence of computer viruses.
**



RE: How to increase memory

2004-07-02 Thread PATTUS Jean-Philippe
I put the java_opts at the beginning of my startup.bat
set JAVA_OPTS= -Xms"40m" -Xmx"1536m"

-Message d'origine-
De : Gunnar Pörschke [mailto:[EMAIL PROTECTED]
Envoyé : vendredi 2 juillet 2004 08:35
À : 'Tomcat Users List'
Objet : AW: How to increase memory


Where do I have to add this? Also in the catalina.bat?
I tested set CATALINA_OPTS=%CATALINA_OPTS% -Xms1024m -Xmx2048m in
Catalona.bat as mentioned from Thilo Krawietz' email.

Still it seems to be very slow.

Thank you

Gunnar

-Ursprüngliche Nachricht-
Von: alu, artifex [mailto:[EMAIL PROTECTED] 
Gesendet: Donnerstag, 1. Juli 2004 16:59
An: Tomcat Users List
Betreff: Re: How to increase memory


by setting the environment variable JAVA_OPTS to something like this: 
-Xms32m -Xmx512m
this will cause the vm to allocate 32m at startup and limits the maximum
java heap memory size to 512mb.

you can set the environment variable by adding the following command
somewhere at the beginning of startup.bat:

set JAVA_OPTS=-Xms32m -Xmx512m

art

Gunnar Pörschke wrote:

>where and how do I increase memory (win2003Srv) for tomcat (4.1.30)?
> 
> 
>
>  
>


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




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]--- Interscan -- (on antivirus)

email-body was scanned and no virus found
-  Traite Par   Interscan -- (on antivirus)--

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

Re: AW: How to increase memory

2004-07-02 Thread Pete Stokes
CATALINA_OPTS="%CATALINA_OPTS% -Xms1024m -Xmx2048m"   note quotes (need that 
ammendment in Linux, try something similar for Window$e if needed..)
Also, if you put a -Xloggc:/usr/local/tomcat/logs/gc.log (check syntax with java 
-X help)
do Xloggc before and after changing memory size, then have a look if gc cycles change. 
You can use HPjtune to graphically see the cycles. Do you need to include the -server 
in the above string depending on your JVM ?  You want 3-10% max of cpu time in gc and 
periodic cycles. I'd say start from very low initial heap with a decent max setting 
and look at gc.
Anyway, 1GIG initial heap is massive - why u need it so big? I've got a very intensive 
app, and initial heap of 80m, max heap of 768 works fine. Remember, it's a combination 
of initial heap and max heap that determine your apps gc cycles.
Try look at using incremental gc ?? 

Whilst you are testing your app, check cpu usage to see it's not being killed, if so 
get better box.
Pete.



Gunnar Pörschke wrote:
Where do I have to add this? Also in the catalina.bat?
I tested set CATALINA_OPTS=%CATALINA_OPTS% -Xms1024m -Xmx2048m in
Catalona.bat as mentioned from Thilo Krawietz' email.
Still it seems to be very slow.
Thank you
Gunnar
-Ursprüngliche Nachricht-
Von: alu, artifex [mailto:[EMAIL PROTECTED] 
Gesendet: Donnerstag, 1. Juli 2004 16:59
An: Tomcat Users List
Betreff: Re: How to increase memory

by setting the environment variable JAVA_OPTS to something like this: 
-Xms32m -Xmx512m
this will cause the vm to allocate 32m at startup and limits the maximum
java heap memory size to 512mb.

you can set the environment variable by adding the following command
somewhere at the beginning of startup.bat:
set JAVA_OPTS=-Xms32m -Xmx512m
art
Gunnar Pörschke wrote:
 

where and how do I increase memory (win2003Srv) for tomcat (4.1.30)?


   


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

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


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