tomcat 3.2.4

2005-10-11 Thread Steve Souza

Hi folks,

I'm new to the list, so I apologize in advance for any
faux pas I may commit here!

The question is simple - we'd like to get the 3.2.4
release of Tomcat, but do not see a download link on
the Apache site.  Is it archived somewhere?  I know
it's old, but we haven't moved to the new architecture
yet.

Many many thanks!

Regards,
Steve

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



RE: NoSuchElementException in DeltaRequest

2005-10-03 Thread Steve Mactaggart
When do we expect 5.0.30 to be release as final?

I need to deploy the fix to production and I'm a not able to deploy beta
versions.

Steve

 -Original Message-
 From: Rainer Jung [mailto:[EMAIL PROTECTED] 
 Sent: Saturday, 10 September 2005 8:41 PM
 To: Tomcat Users List
 Subject: Re: NoSuchElementException in DeltaRequest
 
 Hi,
 
 that should be fixed in 5.0.30 and in 5.5. Compare
 
 http://cvs.apache.org/viewcvs.cgi/jakarta-tomcat-catalina/modu
les/cluster/src/share/org/apache/catalina/cluster/session/DeltaR
equest.java?r1=1.7r2=1.7.2.1diff_format=h
 
 and
 
 http://issues.apache.org/bugzilla/show_bug.cgi?id=31328.
 
 We use a very similar fix on top of 5.0.28 without further problems.
 
  Hi all,
 
  We have just moved to using Tomcat in a clustered 
 environment, and now on
  a
  farily regular basis we are getting the following error 
 occur from within
  the clustering logic.
 
  java.util.NoSuchElementException
   at java.util.LinkedList.remove(LinkedList.java:579)
   at java.util.LinkedList.removeFirst(LinkedList.java:131)
   at
  
 org.apache.catalina.cluster.session.DeltaRequest.addAction(Del
 taRequest.java
  :102)
   at
  
 org.apache.catalina.cluster.session.DeltaRequest.setAttribute(
 DeltaRequest.j
  ava:69)
   at
  
 org.apache.catalina.cluster.session.DeltaSession.setAttribute(
 DeltaSession.j
  ava:1265)
   at
  
 org.apache.catalina.cluster.session.DeltaSession.setAttribute(
 DeltaSession.j
  ava:1246)
   at
  
 org.apache.catalina.cluster.session.DeltaSessionFacade.setAttr
 ibute(DeltaSes
  sionFacade.java:130)
   at
  
 au.com.bestbets.central.command.user.BaseUserLoginCmd.innerExe
 cute(BaseUserL
  oginCmd.java:111)
 
  I believe we are using tomcat 5.0.29 running under Linux.
 
  Any ideas on what is causing this one?
 
  
  Steve Mactaggart
  Best Bets
 
 
  
 -
  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: Options to prevent web app from being available if DB not available?

2005-09-26 Thread Steve Dodge

Mike,

Doing this with pure J2EE Servlet  code, I would use three components.  
First, use the Context Listener to check the Database on start up, if no 
DB connectivity set a ApplicationContext attribute to that effect.  The 
second part would be a javax.servlet.Filter which checks the status of 
the ApplicationContext attribute forwarding to an error page if the 
attribute indicates database connectivity issues.  Third, instead of 
just a String, I'd use a self-updating object as the attribute in the 
ApplicationContext.  This self updating object runs an internal timer 
thread which tests connectivity at a fixed interval setting the DB 
status to up or down.  This third component is optional.


Regarding your issue not wanting to start certain servlets if the 
Database is down, you could carry out a DB connectivity test in the base 
class to all your servlets, skipping initialization if no connectivity.


Steve

Mike Miller wrote:

Hi, 


I am looking for options to prevent my web application from being
available if our database is not available. I've used context listeners
in the past, but since you can return a bad return code they don't like
the cleanest approach.  




I have tried registering a context listener and then throwing a
RuntimeException if the database is not available but that seems like a
kludge.

Any other options?



Thanks in advance,

Mike


 




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



Re: classloader issue on jboss3.2.2 for tomcat4.1

2005-09-16 Thread Steve Dodge
It doesn't see any classes in any of your jars?  I was using JBoss 3.2.2 
back in 2003 and had the same issue.  Once I set the web loader to 
false, I realized that some utility classes were getting loaded from 
jars deployed in other wars.   Effectively, now each webapp has its own 
classloader.  So, I had to add those same jars into all my wars. 


On a side note, JBoss 4.0.x does a much better job with this.

Steve

lio tomcat wrote:


Hello world,
For some reason, i had to change default conf of my jboss 3.2.2 in order to 
avoid the use of jboss class loader.

It's now set in [jboss]\deploy\jbossweb-
tomcat41.sar\META-INF\jboss-service.xml in this way :

attribute name=UseJBossWebLoaderfalse/attribute 

The problem is now my webapp does not even see/load my jars in my 
war/WEB-INF/lib


What's the hint?

Please help,

thx

 




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



Unable to redirect from Windows 2003 server 64 bit and IIS 6.0 to Tomcat 4.1.31 using JK2 ajp1.3

2005-09-15 Thread Theby, Steve
Hi everyone,

 

Problem

We believe we have all components installed properly but requests for Tomcat
are not redirected.  There are no errors in the Tomcat stderr or stdout
logs, nor are any errors found in either the Windows application or system
event logs.  Requests to IIS root work and requests directly to Tomcat via
8080 work.  We have the same environment working ok on Windows 2003 server
32 bit.

 

Has anyone got Tomcat, JK2/ajp1.3 OR JK 1.2.14 working with IIS 6.0 under
Microsoft 2003 Windows 64 bit?

 

Thanks for your experience and ideas!

 

Steve

 

Environment Installed

 

Microsoft Windows 2003 server SP1 in 64 bit mode w/ all patches

IIS 6.0 - enabled for 32 bit child processes (instead of the default 64 bit
mode)

IIS 6.0 not in IIS 5.0 isolation mode (can't load isapi_redirector2.dll when
set on)

Tomcat 4.1.31

Tomcat connector - JK2 AJP/1.3 isapi_redirector2.dll (32 bit)

ISAPII filter (Isapi_redirector2.dll) loaded and green under IIS manager for
websites node

ISAPI web service extension set to ALLOWED

Registry entries under both 64 bit and 32 bit nodes are correct

HKLM\SOFTWARE\Apache Software Foundation\Jakarta Isapi Redirector 2.0

HKLM\SOFTWARE\Wow6432bitnode\Apache Software Foundation\Jakarta Isapi
Redirector 2.0

Virtual directory created and working

Workers2.properties:

file=c:\Apache Group\Tomcat 4.1\logs\jk2.log

[shm]

info=Shared memory file. Required for multiprocess servers

file=c:\Apache Group\Tomcat 4.1\work\jk2.shm

size=100

[channel.socket:localhost:8009]

info=Ajp13 worker, connects to tomcat instance using AJP 1.3 protocol

tomcatId=localhost:8009

[uri:/examples/*]

info=JSP examples, map requests for all JSP pages to Tomcat.

[uri:/servlets/*]

info=Map the whole webapp.

[uri:/srvConfig/*]

info= map server's config servlet to outside

[uri:/ae/GlmServlet/*]

info=Company.com azAccess

context=/ae/GlmServlet



Re: Two Service elements problems

2005-09-15 Thread Steve Dodge
I couldn't find it in your post, so let me ask.  Do you have 2 network 
interfaces on the machine?  How are you establishing 2 ip addresses?


This topic sparked my interest because I will also be doing the same 
thing. Now, to answer your question more definitively.I put together 
a mock setup using a 5.0.30 distro I had laying around (WinXP).
I took the default server.xml listening on localhost and added the 
following service element:


Service name=Catalina2
   Connector port=8081 address=littlehost
  maxThreads=150 minSpareThreads=25 maxSpareThreads=75
  enableLookups=false redirectPort=8443 acceptCount=100
  debug=0 connectionTimeout=2
  disableUploadTimeout=true /
   
   !-- Define the top level container in our container hierarchy --

   Engine name=Catalina2 defaultHost=littlehost debug=0

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

 Host name=littlehost debug=0 appBase=l_webapps
  unpackWARs=true autoDeploy=true
  xmlValidation=false xmlNamespaceAware=false

   Logger className=org.apache.catalina.logger.FileLogger
directory=logs  prefix=littlehost_log. suffix=.txt
   timestamp=true/

 /Host

   /Engine
/Service
I don't have a second network interface, so created a second host name 
littlehost to my actual ip address through /etc/hosts. 
Started tomcat . , my netstat confirmed that I was listening to port 
8080 on localhost and port 8081 on littlehost.
But, when I go to http://littlehost:8081/ nothing happened.  Then I 
followed the directions at 
http://www.ex-parrot.com/~pete/tomcat-vhost.html for setting up a 
virtual host. 


Using that reference I did this:
1. Added a ROOT.xml file in conf/Catalina2/littlehost
2  Created the l_webapps directory specified by my Host element.
3. Created a web application deployment structure in the l_webapps directory
4. Created an index.jsp at the root of l_webapps

Restarted tomcat .. now http://littlehost:8081/ servers up content.

Good Luck
Steve

Barnett, Brian W. wrote:


netstat -an results (snippet)

Proto  Local Address  Foreign AddressState
TCP166.70.163.138:80  0.0.0.0:0  LISTENING
TCP166.70.163.138:139 0.0.0.0:0  LISTENING
TCP166.70.163.138:2109166.70.163.131:2433ESTABLISHED
TCP166.70.163.138:2110166.70.163.138:8093ESTABLISHED
TCP166.70.163.138:2113166.70.163.138:8093ESTABLISHED
TCP166.70.163.138:2115166.70.163.138:8093ESTABLISHED
TCP166.70.163.138:2117166.70.163.138:8093ESTABLISHED
TCP166.70.163.138:2119166.70.163.138:8093ESTABLISHED
TCP166.70.163.138:2122166.70.163.138:8093ESTABLISHED
TCP166.70.163.138:2125166.70.163.131:2433ESTABLISHED
TCP166.70.163.138:338963.253.57.180:4881 ESTABLISHED
TCP166.70.163.138:8093166.70.163.138:2110ESTABLISHED
TCP166.70.163.138:8093166.70.163.138:2113ESTABLISHED
TCP166.70.163.138:8093166.70.163.138:2115ESTABLISHED
TCP166.70.163.138:8093166.70.163.138:2117ESTABLISHED
TCP166.70.163.138:8093166.70.163.138:2119ESTABLISHED
TCP166.70.163.138:8093166.70.163.138:2122ESTABLISHED
UDP166.70.163.138:123 *:*
UDP166.70.163.138:137 *:*
UDP166.70.163.138:138 *:*
UDP166.70.163.138:520 *:*
UDP166.70.163.140:123 *:*
UDP166.70.163.140:520 *:*
UDP166.70.163.140:1900*:*

No TCP info for 166.70.163.140, only UDP info. Not sure where to turn for
help on this one. I'm not a network guy :(
Any suggestions?


-Original Message-
From: Steve Dodge [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, September 14, 2005 12:32 PM

To: Tomcat Users List
Subject: Re: Two Service elements problems


If you do a netstat -ln (cygwin)  do you see two network sockets 
listening on port 80? 


166.70.163.138:80
166.70.163.140:80

If not, the problem is at a lower level than tomcat.

Steve




Barnett, Brian W. wrote:

 

I have two Service elements defined like this in my server.xml file, 
each one listening to a different IP address and serving requests for 
different web sites. (Using 5.0.28)


Service name=MyService1 
	Connector port=80 
		maxThreads=150 minSpareThreads=25 maxSpareThreads=75 
		enableLookups=false redirectPort=443 acceptCount=100 
		debug=0 connectionTimeout=2 
		disableUploadTimeout=true 
		address=166.70.163.138 / 
	Connector port=443 
		maxThreads=150 minSpareThreads=25 maxSpareThreads=75 
		enableLookups=false disableUploadTimeout=true 
		acceptCount=100 debug=0 scheme=https secure=true 
		clientAuth=false sslProtocol=TLS 
		address=166.70.163.138 / 
	Engine name=Catalina1 defaultHost=host1 debug=0 
		Host name=host1 debug=0 appBase=/webapps/host1 
			unpackWARs=true autoDeploy=true

Re: Virtual Hosts

2005-09-15 Thread Steve Dodge
You probably want to change the appBase. You can control the contexts by 
creating a context snippet in conf/[Engine name]/[Host name]  or add it 
to META-INF/context.xml in each war.


Hope that helps,
Steve

Durfee, Bernard wrote:


Okay, so I created two host elements in my server.xml...

 Host name=app01.myserver.com
   appBase=webapps
   autoDeploy=true
   deployOnStartup=true
   deployXML=true
   unpackWARs=true
   xmlValidation=false
   xmlNamespaceAware=false /

 Host name=app02.myserver.com
   appBase=webapps
   autoDeploy=true
   deployOnStartup=true
   deployXML=true
   unpackWARs=true
   xmlValidation=false
   xmlNamespaceAware=false /

...but how do I tell Tomcat which context to process? There will be no
context correct? Do I need a separate appBase directory for each host
element?

Thanks,
Bernie



 


-Original Message-
From: Allistair Crossley [mailto:[EMAIL PROTECTED] 
Sent: Thursday, September 15, 2005 12:10 PM

To: Tomcat Users List
Subject: RE: Virtual Hosts


Simplistically ...

Configure Host elements inside your Engine. Create a folder 
for each application within webapps. Set the Host docBase to each. 


Check out the online ref.

   


-Original Message-
From: Durfee, Bernard [mailto:[EMAIL PROTECTED]
Sent: 15 September 2005 17:07
To: tomcat-user@jakarta.apache.org
Subject: Virtual Hosts


I am having trouble configuring virtual hosts in Tomcat 
 

5.5.9. I have 
   

two applications app01 and app02. I have 2 DNS entries 
app01.myserver.com and app02.myserver.com that both point to the 
machine on which Tomcat is running. How do I configure 
 

Tomcat to serve 
   


from app01.war when app01.myserver.com is hit and app02.war when
app02.myserver.com is hit.

Thanks,
Bernie



 


-
   


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


 

FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE 
---

QAS Ltd.
Registered in England: No 2582055
Registered in Australia: No 082 851 474
---
/FONT FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLACK 
Disclaimer:  The information contained within this e-mail is 
confidential and may be privileged. This email is intended 
solely for the named recipient only; if you are not 
authorised you must not disclose, copy, distribute, or retain 
this message or any part of it. If you have received this 
message in error please contact the sender at once so that we 
may take the appropriate action and avoid troubling you 
further.  Any views expressed in this message are those of 
the individual sender.  QAS Limited has the right lawfully to 
record, monitor and inspect messages between its employees 
and any third party.  Your messages shall be subject to such 
lawful supervision as QAS Limited deems to be necessary in 
order to protect its information, its interests and its reputation.  

Whilst all efforts are made to safeguard Inbound and Outbound 
emails, QAS Limited cannot guarantee that attachments are 
virus free or compatible with your systems and does not 
accept any liability in respect of viruses or computer 
problems experienced. /FONT



-
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: Two Service elements problems

2005-09-15 Thread Steve Dodge

Brian,

On more follow up.  I found a usb wireless network adapter that I forgot 
I had.  The server.xml snippet below stayed the same, except I had to 
add the address attribute on the original http connector element.  I 
opted to use the Ip addresses instead of messing with /etc/hosts this time.


Now I have .

Service name=Catalina
   Connector port=8080 address=192.168.0.2
  etc etc...

Service name=Catalina2
   Connector port=8080 address=192.168.0.5
  etc etc...

netstat -an (snippet)
 TCP192.168.0.2:8080   0.0.0.0:0  LISTENING
 TCP192.168.0.5:1390.0.0.0:0  LISTENING
 TCP192.168.0.5:8080   0.0.0.0:0  LISTENING

It serves content on both IP addresses with the same port.

Steve

Barnett, Brian W. wrote:


Thanks Steve. I will try that. Regarding your question to me, I have tried
two different approaches. My first approach was to bind an additional IP
address to the one NIC I had in the XP box using the Advanced button in
TCP/IP setup for the NIC. I struggled through that for a few days, then
decided to put in a second NIC. I struggled to get that working for a few
days and ended up going to back to two IPs bound to a single NIC.

Since I have not yet got it working the way I want it to work, I can not say
definitively whether either of those approaches worked, although from my
research either *should* work. There are advantages/disadvantages to each.
Things to consider are bandwidth sharing, if a NIC goes down you lose both
IPs or just one, etc.

Again, thanks for your input!

Brian

-Original Message-
From: Steve Dodge [mailto:[EMAIL PROTECTED] 
Sent: Thursday, September 15, 2005 2:40 PM

To: Tomcat Users List
Subject: Re: Two Service elements problems


I couldn't find it in your post, so let me ask.  Do you have 2 network 
interfaces on the machine?  How are you establishing 2 ip addresses?


This topic sparked my interest because I will also be doing the same 
thing. Now, to answer your question more definitively.I put together 
a mock setup using a 5.0.30 distro I had laying around (WinXP). I took the
default server.xml listening on localhost and added the 
following service element:


Service name=Catalina2
   Connector port=8081 address=littlehost
  maxThreads=150 minSpareThreads=25 maxSpareThreads=75
  enableLookups=false redirectPort=8443 acceptCount=100
  debug=0 connectionTimeout=2
  disableUploadTimeout=true /
   
   !-- Define the top level container in our container hierarchy --

   Engine name=Catalina2 defaultHost=littlehost debug=0

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

 Host name=littlehost debug=0 appBase=l_webapps
  unpackWARs=true autoDeploy=true
  xmlValidation=false xmlNamespaceAware=false

   Logger className=org.apache.catalina.logger.FileLogger
directory=logs  prefix=littlehost_log. suffix=.txt
   timestamp=true/

 /Host

   /Engine
/Service
I don't have a second network interface, so created a second host name 
littlehost to my actual ip address through /etc/hosts. 
Started tomcat . , my netstat confirmed that I was listening to port 
8080 on localhost and port 8081 on littlehost.
But, when I go to http://littlehost:8081/ nothing happened.  Then I 
followed the directions at 
http://www.ex-parrot.com/~pete/tomcat-vhost.html for setting up a 
virtual host. 


Using that reference I did this:
1. Added a ROOT.xml file in conf/Catalina2/littlehost
2  Created the l_webapps directory specified by my Host element. 3.
Created a web application deployment structure in the l_webapps directory 4.
Created an index.jsp at the root of l_webapps

Restarted tomcat .. now http://littlehost:8081/ servers up content.

Good Luck
Steve

Barnett, Brian W. wrote:

 


netstat -an results (snippet)

Proto  Local Address  Foreign AddressState
TCP166.70.163.138:80  0.0.0.0:0  LISTENING
TCP166.70.163.138:139 0.0.0.0:0  LISTENING
TCP166.70.163.138:2109166.70.163.131:2433ESTABLISHED
TCP166.70.163.138:2110166.70.163.138:8093ESTABLISHED
TCP166.70.163.138:2113166.70.163.138:8093ESTABLISHED
TCP166.70.163.138:2115166.70.163.138:8093ESTABLISHED
TCP166.70.163.138:2117166.70.163.138:8093ESTABLISHED
TCP166.70.163.138:2119166.70.163.138:8093ESTABLISHED
TCP166.70.163.138:2122166.70.163.138:8093ESTABLISHED
TCP166.70.163.138:2125166.70.163.131:2433ESTABLISHED
TCP166.70.163.138:338963.253.57.180:4881 ESTABLISHED
TCP166.70.163.138:8093166.70.163.138:2110ESTABLISHED
TCP166.70.163.138:8093166.70.163.138:2113ESTABLISHED
TCP166.70.163.138:8093166.70.163.138:2115

Re: Two Service elements problems

2005-09-14 Thread Steve Dodge
If you do a netstat -ln (cygwin)  do you see two network sockets 
listening on port 80? 


166.70.163.138:80
166.70.163.140:80

If not, the problem is at a lower level than tomcat.

Steve




Barnett, Brian W. wrote:


I have two Service elements defined like this in my server.xml file, each
one listening to a different IP address and serving requests for different
web sites. (Using 5.0.28)

Service name=MyService1 
	Connector port=80 
		maxThreads=150 minSpareThreads=25 maxSpareThreads=75 
		enableLookups=false redirectPort=443 acceptCount=100 
		debug=0 connectionTimeout=2 
		disableUploadTimeout=true 
		address=166.70.163.138 / 
	Connector port=443 
		maxThreads=150 minSpareThreads=25 maxSpareThreads=75 
		enableLookups=false disableUploadTimeout=true 
		acceptCount=100 debug=0 scheme=https secure=true 
		clientAuth=false sslProtocol=TLS 
		address=166.70.163.138 / 
	Engine name=Catalina1 defaultHost=host1 debug=0 
		Host name=host1 debug=0 appBase=/webapps/host1 
			unpackWARs=true autoDeploy=true 
			xmlValidation=false xmlNamespaceAware=false 
		/Host 
	/Engine 
/Service


Service name=MyService2 
	Connector port=80 
		maxThreads=150 minSpareThreads=25 maxSpareThreads=75 
		enableLookups=false redirectPort=443 acceptCount=100 
		debug=0 connectionTimeout=2 
		disableUploadTimeout=true 
		address=166.70.163.140 / 
	Connector port=443 
		maxThreads=150 minSpareThreads=25 maxSpareThreads=75 
		enableLookups=false disableUploadTimeout=true 
		acceptCount=100 debug=0 scheme=https secure=true 
		clientAuth=false sslProtocol=TLS 
		address=166.70.163.140 / 
	Engine name=Catalina2 defaultHost=host2 debug=0 
		Host name=host2 debug=0 appBase=/webapps/host2 
			unpackWARs=true autoDeploy=true 
			xmlValidation=false xmlNamespaceAware=false 
		/Host 
	/Engine 
/Service 


My Tomcat folder structure looks like this:

conf
--Catalina1
host1
--[various .xml files (context files)]
--Catalina2
host2
--[various .xml files (context files)]
webapps
--host1
[various webapps]
--host2
[various webapps]

I can browse successfully to all the web apps that are deployed in
webapps/host1 but when I browse to host 2 I get the following error:

(Error message from Firefox when browsing to http://166.70.163.140)

The connection was refused when attempting to contact 166.70.163.140.

In the stdout.log file, mention is made of the context files in
/Catalina1/host1 but no mention is made of context files in
/Catalina2/host2.

Sep 14, 2005 10:53:04 AM org.apache.catalina.core.StandardHostDeployer
install
INFO: Processing Context configuration file URL file:C:\Program Files\Apache
Software Foundation\Tomcat 5.0\conf\Catalina1\host1\admin.xml
Sep 14, 2005 10:53:12 AM org.apache.struts.util.PropertyMessageResources
init
INFO: Initializing, config='org.apache.struts.util.LocalStrings',
returnNull=true
Sep 14, 2005 10:53:12 AM org.apache.struts.util.PropertyMessageResources
init
INFO: Initializing, config='org.apache.struts.action.ActionResources',
returnNull=true
Sep 14, 2005 10:53:13 AM org.apache.struts.util.PropertyMessageResources
init
INFO: Initializing, config='org.apache.webapp.admin.ApplicationResources',
returnNull=true
Sep 14, 2005 10:53:18 AM org.apache.catalina.core.StandardHostDeployer
install
INFO: Processing Context configuration file URL file:C:\Program Files\Apache
Software Foundation\Tomcat 5.0\conf\Catalina1\host1\balancer.xml
Sep 14, 2005 10:53:19 AM org.apache.catalina.core.StandardHostDeployer
install
INFO: Processing Context configuration file URL file:C:\Program Files\Apache
Software Foundation\Tomcat 5.0\conf\Catalina1\host1\gapay.xml
Sep 14, 2005 10:53:23 AM org.apache.catalina.core.StandardHostDeployer
install
INFO: Processing Context configuration file URL file:C:\Program Files\Apache
Software Foundation\Tomcat 5.0\conf\Catalina1\host1\manager.xml
Sep 14, 2005 10:53:23 AM org.apache.catalina.core.StandardHostDeployer
install
INFO: Processing Context configuration file URL file:C:\Program Files\Apache
Software Foundation\Tomcat 5.0\conf\Catalina1\host1\webshare.xml

I wondered if 166.70.163.140 was accessible at all, so I just tried having
one Service defined without specifying an IP address. Both IPs were
accessible in this case, so I assumed 166.70.163.140 was configured
correctly.

I tried it with and without Windows XP firewall enabled and got same
results.

Can someone shed some light on what could be the problem(s)?

Thanks,
Brian Barnett

 
This email may contain confidential material. 
If you were not an intended recipient, 
Please notify the sender and delete all copies. 
We may monitor email to and from our network. 



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

Re: workers.properties load balancing

2005-09-10 Thread Steve Dodge
Thanks for the answer.  In the future, I'm wondering if you know where I 
could find some debug output that will tell me my workers.properties was 
misconfigured.   The only output I was getting was through the 
mod_jk.log which told me JkMount was handling the request but could not 
find the worker.


Thanks,
Steve

Rainer Jung wrote:


Hi Steve,

not a bug in 1.2.6 either:

You have used the attribute balance_workers:

 


worker.router.balance_workers=worker1,worker2
   



Version 1.2.6 only knew about balanced_workers. See the tiny difference?
In 1.2.14 you can use either of both and balance_workers take precendence.

 


Steve Dodge wrote:

   


JK 1.2.14 with Tomcat 5.0.28 and Apache 2.0.52 on Linux RH AS4,
Tomcats are installed on different machines.   I cannot get a load
balancing worker to work. mod_jk forwards request to tomcat just fine
as long as I don't try and use a load balancing worker in my
worker.list. The mod_jk.log says did not find a worker.

==workers.properties
worker.list=router

# Set properties for worker1 (ajp13)
worker.worker1.type=ajp13
worker.worker1.host=server.ip1
worker.worker1.port=8009
worker.worker1.lbfactor=1
worker.worker1.cachesize=10

# Set properties for worker2 (ajp13)
worker.worker2.type=ajp13
worker.worker2.host=server.ip2
worker.worker2.port=8009
worker.worker2.lbfactor=1
worker.worker2.cachesize=10


worker.router.type=lb
worker.router.balance_workers=worker1,worker2
#worker.router.sticky_seesion=True

worker.status.type=status

=mod_jk.config==
JkWorkersFile /etc/httpd/conf.d/workers.properties
JkLogFile /var/log/httpd/mod_jk.log
JkLogLeveltrace
JkLogStampFormat [%a %b %d %H:%M:%S %Y] 
JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories
JkRequestLogFormat %w %V %T

JkMount /jmx-console/*.jsp router
JkMount /jkstatus/* status


When I use worker.list=worker1,worker1 and replace JkMount
/jmx-console/*.jsp worker1 requests are forwarded, but I loose load
balancing.  Its like the minute I put the load balancer worker into
the list, the whole workers configuration is bad.

Thanks in advance,
Steve


 


I have some clarification on my workers.properties issue.  It's not an
Issue!  The version of JK connectors was not JK 1.2.14, it was JK
1.2.6.  Sorry to leave anyone scratching their head.   I told my system
admin to build from source JK 1.2.14, but to save time he found a
pre-packaged rpm from RedHat containing JK 1.2.6.  I wasn't aware of the
fact that I had debugged version 6 instead of 14.  So for those who are
interested, JK 1.2.6 had BUGS.

-Building mod_jk 
On another note, compiling JK connectors went very smooth on a stock
redhat box with RPM devel packages.  All we had to do was install the
httpd-devel-2.0.52-12.2.ent.i386.rpm and any rpm's required by it (to
get a list type  rpm -qp --requires httpd-devel-2.0.52-12.2.ent.i386.rpm
)  Then download and extract the JK source code.  Navigate to the native
directory type in |*./configure --with-apxs=/usr/sbin/apxs, the
corresponding Apache2.0.x mod_jk.so resulted. Instructions are found at
http://jakarta.apache.org/tomcat/connectors-doc/howto/apache.html

Steve
*|

-
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: JSP on RHEL4 with Apache httpd RPM?

2005-09-09 Thread Steve Dodge

Peter Flynn wrote:


On Fri, 2005-09-09 at 06:13, Nikola Milutinovic wrote:
 


Peter Flynn wrote:

   


I need to add JSP ability to a RHEL4 server running the
current Apache httpd from the Red Hat RPM. 
 


[...]
 


Has anyone managed to serve JSP with Tomcat on a RHEL4
machine running their stock httpd? 
 

You're looking for mod_jk RPM or mod_jk2 (which has been dropped from 
development). 
   



I found mod_jk-ap20-1.2.10-1jpp.i386.rpm at http://www.jpackage.org and
It installed without error on RHEL4 running stock httpd-2.0.52-9.ent.rpm

So far, so good. So I added the suggested element

   Listener className=org.apache.jk.config.ApacheConfig 
 modJk=/usr/lib/httpd/modules/mod_jk.so /


to the Engine name=Catalina ... container in server.xml and 
restarted Tomcat. 

This created /usr/local/jakarta-tomcat-5.5.9/conf/auto/mod_jk.conf 
(NOT mod_jk.conf.auto as the Jakarta Tomcat Connector Apache HowTo 
documentation says). 


The mod_jk.conf was pretty skeletal, so I added:

  JkWorkersFile /usr/local/jakarta-tomcat-5.5.9/conf/workers.properties

and edited workers.properties to reflect the locations

  workers.tomcat_home=/usr/local/jakarta-tomcat-5.5.9
  workers.java_home=/usr/java/jdk1.5.0_03

and added this line to /etc/httpd/conf/httpd.conf

  Include /usr/local/jakarta-tomcat-5.5.9/conf/auto/mod_jk.conf

and finally restarted Apache. No error, but it doesn't do anything
meaningful with my JSP files: it just serves them through Apache. 

Looking in mod_jk.conf I see it mentions all the subdirectories in 
Tomcat's webapps directory, but nowhere does it reference any 
directories in my Apache document tree. 

I've obviously missed how to get it configured to serve JSP files 
from the Apache web server directories. I have no interest in serving 
any JSPs from the Tomcat directories, as all I use Tomcat:8080 for is 
serving Cocoon, which already works fine.


The JkMount directives in mod_jk.conf all refer to /directory being
in Tomcat's webapps directory. How do I reference directories which
are actually below /var/www/html so that they get handled by Tomcat?

In mod_jk.conf, what does this refer to:

  VirtualHost localhost
   ServerName localhost

The Tomcat:8080 server or the Apache httpd:80 server? 

If it's Tomcat, then I can understand why JkMount /directory refers 
to Tomcat's webapps, but it seems very weird that the autoconf should 
configure mod_jk.conf to mount only Tomcat's directories, when the 
entire point of the operation is to enable serving of Apache's own

JSP files.

If it's Apache's httpd, which it is presumably intended for, as this
file gets Include'd from Apache's httpd.conf, then why does it still
refer to localhost instead of picking up the ServerName from the
httpd.conf?

Should I change both localhost's to my server's FQDN?

///Peter


 


Peter,

1. VirtualHostis an apache http server directive.
2. With JkMount you're not actually mapping a physical directory, it's a 
url pattern.  If you have a tomcat webapp that serves jsp's such as 
http://localhost:8080/mywebapp, then you can map jsp requests to that 
webapp using JkMount /mywebapp/*.jsp


Hope that helps,
Steve

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



Re: workers.properties load balancing

2005-09-09 Thread Steve Dodge

Steve Dodge wrote:

JK 1.2.14 with Tomcat 5.0.28 and Apache 2.0.52 on Linux RH AS4, 
Tomcats are installed on different machines.   I cannot get a load 
balancing worker to work. mod_jk forwards request to tomcat just fine 
as long as I don't try and use a load balancing worker in my 
worker.list. The mod_jk.log says did not find a worker.


==workers.properties
worker.list=router

# Set properties for worker1 (ajp13)
worker.worker1.type=ajp13
worker.worker1.host=server.ip1
worker.worker1.port=8009
worker.worker1.lbfactor=1
worker.worker1.cachesize=10

# Set properties for worker2 (ajp13)
worker.worker2.type=ajp13
worker.worker2.host=server.ip2
worker.worker2.port=8009
worker.worker2.lbfactor=1
worker.worker2.cachesize=10


worker.router.type=lb
worker.router.balance_workers=worker1,worker2
#worker.router.sticky_seesion=True

worker.status.type=status

=mod_jk.config==
JkWorkersFile /etc/httpd/conf.d/workers.properties
JkLogFile /var/log/httpd/mod_jk.log
JkLogLeveltrace
JkLogStampFormat [%a %b %d %H:%M:%S %Y] 
JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories
JkRequestLogFormat %w %V %T

JkMount /jmx-console/*.jsp router
JkMount /jkstatus/* status


When I use worker.list=worker1,worker1 and replace JkMount 
/jmx-console/*.jsp worker1 requests are forwarded, but I loose load 
balancing.  Its like the minute I put the load balancer worker into 
the list, the whole workers configuration is bad.


Thanks in advance,
Steve


I have some clarification on my workers.properties issue.  It's not an 
Issue!  The version of JK connectors was not JK 1.2.14, it was JK 
1.2.6.  Sorry to leave anyone scratching their head.   I told my system 
admin to build from source JK 1.2.14, but to save time he found a 
pre-packaged rpm from RedHat containing JK 1.2.6.  I wasn't aware of the 
fact that I had debugged version 6 instead of 14.  So for those who are 
interested, JK 1.2.6 had BUGS. 


-Building mod_jk 
On another note, compiling JK connectors went very smooth on a stock 
redhat box with RPM devel packages.  All we had to do was install the  
httpd-devel-2.0.52-12.2.ent.i386.rpm and any rpm's required by it (to 
get a list type  rpm -qp --requires httpd-devel-2.0.52-12.2.ent.i386.rpm 
)  Then download and extract the JK source code.  Navigate to the native 
directory type in |*./configure --with-apxs=/usr/sbin/apxs, the 
corresponding Apache2.0.x mod_jk.so resulted. Instructions are found at

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

Steve
*|

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



workers.properties load balancing

2005-09-08 Thread Steve Dodge
JK 1.2.14 with Tomcat 5.0.28 and Apache 2.0.52 on Linux RH AS4, Tomcats 
are installed on different machines.   I cannot get a load balancing 
worker to work. mod_jk forwards request to tomcat just fine as long as I 
don't try and use a load balancing worker in my worker.list. The 
mod_jk.log says did not find a worker.


==workers.properties
worker.list=router

# Set properties for worker1 (ajp13)
worker.worker1.type=ajp13
worker.worker1.host=server.ip1
worker.worker1.port=8009
worker.worker1.lbfactor=1
worker.worker1.cachesize=10

# Set properties for worker2 (ajp13)
worker.worker2.type=ajp13
worker.worker2.host=server.ip2
worker.worker2.port=8009
worker.worker2.lbfactor=1
worker.worker2.cachesize=10


worker.router.type=lb
worker.router.balance_workers=worker1,worker2
#worker.router.sticky_seesion=True

worker.status.type=status

=mod_jk.config==
JkWorkersFile /etc/httpd/conf.d/workers.properties
JkLogFile /var/log/httpd/mod_jk.log
JkLogLeveltrace
JkLogStampFormat [%a %b %d %H:%M:%S %Y] 
JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories
JkRequestLogFormat %w %V %T

JkMount /jmx-console/*.jsp router
JkMount /jkstatus/* status


When I use worker.list=worker1,worker1 and replace JkMount 
/jmx-console/*.jsp worker1 requests are forwarded, but I loose load 
balancing.  Its like the minute I put the load balancer worker into the 
list, the whole workers configuration is bad.


Thanks in advance,
Steve


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



NoSuchElementException in DeltaRequest

2005-09-08 Thread Steve Mactaggart
Hi all,

We have just moved to using Tomcat in a clustered environment, and now on a
farily regular basis we are getting the following error occur from within
the clustering logic.

java.util.NoSuchElementException
 at java.util.LinkedList.remove(LinkedList.java:579)
 at java.util.LinkedList.removeFirst(LinkedList.java:131)
 at
org.apache.catalina.cluster.session.DeltaRequest.addAction(DeltaRequest.java
:102)
 at
org.apache.catalina.cluster.session.DeltaRequest.setAttribute(DeltaRequest.j
ava:69)
 at
org.apache.catalina.cluster.session.DeltaSession.setAttribute(DeltaSession.j
ava:1265)
 at
org.apache.catalina.cluster.session.DeltaSession.setAttribute(DeltaSession.j
ava:1246)
 at
org.apache.catalina.cluster.session.DeltaSessionFacade.setAttribute(DeltaSes
sionFacade.java:130)
 at
au.com.bestbets.central.command.user.BaseUserLoginCmd.innerExecute(BaseUserL
oginCmd.java:111)

I believe we are using tomcat 5.0.29 running under Linux.

Any ideas on what is causing this one?


Steve Mactaggart
Best Bets


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



isapi_redirect dll location

2005-09-03 Thread Steve Ochani
To whomever was looking for isapi_redirect dll:

As much as I hate to promote IIS:

isapi_redirect dll can be found here

http://apache.towardex.com/jakarta/tomcat-connectors/jk/binaries/win32/jk-1.2.14




«¤»¥«¤»§«¤»¥«¤»§«¤»¥«¤»§«¤»¥«¤»§«¤»¥«¤»§«¤»¥«¤»§«¤»¥«¤»
Education is what remains after one has forgotten everything he
learned in school. -Albert Einstein

Steve O.
http://www.steveo.us

New pics: B17G and B24
http://www.steveo.us/B17-B24/

B17G WWII Bomber Yankee Lady Flight I took
http://www.steveo.us/b17ride

SUNY NCC Physical Sciences Dept. Network Admin
SUNY NCC MATH/COMPUTER Unix Admin
http://www.matcmp.ncc.edu


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



Re: get is not supported

2005-08-24 Thread Steve Ochani
Hi,
I'm not sure if this is the answer but
You have both parameters for doGet method as HttpServletRequest, the 2nd 
parameter
is supposed to be of type HttpServletResponse

-Steve O.


On 24 Aug 2005 at 14:17, Christian Stalp wrote:

 Hello out there,
 I working on a new servlet and it is very simple so far. But I cannot
 start it!?! I get this error dumped on my browser: [quote] HTTP Status
 405 - HTTP method GET is not supported by this URL

 type Status report

 message HTTP method GET is not supported by this URL

 description The specified HTTP method is not allowed for the requested
 resource (HTTP method GET is not supported by this URL). Apache
 Tomcat/5.5.9 [/quote]

 The sourcecode is very simple so far...
 [code]
 import java.io.*;
 import javax.servlet.*;
 import javax.servlet.http.*;
 import com.softwareag.tamino.db.api.accessor.TAccessLocation;


 public class Dialog extends HttpServlet {

public void doGet ( HttpServletRequest req, HttpServletRequest res
) throws
 ServletException, IOException
{
   res.setContentType ( text/html );
   PrintWriter out = res.getWriter();

   String name= req.getParameter( name );
   String vorname = req.getParameter( vorname );

   out.println( HTML);
   out.println( HEADTITLEAntwort/TITLE/HEAD );
   out.println( BODY);
   out.println( Name  + vorname +   + name );
   out.println( /BODY/HTML);
}

 }
 [/code]

 and the service-descriptor:
 [code]
 ?xml version=1.0 encoding=UTF-8?
 !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web
 Application 2.3//EN
   http://java.sun.com/dtd/web-app_2_3.dtd;
 web-app
   display-nameEingabe Ihrer Daten/display-name
   servlet
 servlet-namehello/servlet-name
 servlet-classDialog/servlet-class
   /servlet
   servlet-mapping
 servlet-namehello/servlet-name
 url-pattern/hello/url-pattern
   /servlet-mapping
 /web-app
 [/code]

 Its really not complex so far, but I cannot find the problem.
 Can anybody help me?

 Gruss Christian

 --
 Christian Stalp
 Institut für Medizinische Biometrie, Epidemiologie und Informatik
 Johannes-Gutenberg-Universität Mainz Tel.: 06131 / 17-3107 E-Mail:
 [EMAIL PROTECTED]

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


«¤»¥«¤»§«¤»¥«¤»§«¤»¥«¤»§«¤»¥«¤»§«¤»¥«¤»§«¤»¥«¤»§«¤»¥«¤»
There's no obfuscated Perl contest because it's pointless.
 - Jeff Polk

Steve O.
http://www.steveo.us

New pics: B17G and B24
http://www.steveo.us/B17-B24

B17G WWII Bomber Yankee Lady Flight
http://www.steveo.us/b17ride

SUNY NCC MATH/COMPUTER Dept.
http://www.matcmp.ncc.edu




OutOfMemoryError

2005-08-05 Thread Steve Sheerin
 

 

 
From: Steve Sheerin 
Sent: Thursday, August 04, 2005 2:29 PM
To: '[EMAIL PROTECTED]'
Subject: OutOfMemoryError

 

I have a new Tomcat based server that is coming up with this error  when
communicating with the server. Most of the time it works great, but
every now and then we get this message. In checking the server, it's
memory looks fine - base is 1 gig, with 600 meg avail.

 

Any ideas

 

Steve Sheerin

Clark Public Utilities

360-992-3243



RE: Newbie: Installing Admin on Tomcat

2005-08-03 Thread Steve Delaney
Assuming you are configured to use folder names when you unzip, doing so
will essentially create a directory structure that is parallel to the
default Tomcat installation (C:\Program Files\Apache Software
Foundation\Tomcat 5.5) Just unzip the Admin files into their own, separate
directory, then copy everything from its 'root' and overwrite the existing
TomCat installation directories...it really is that simple.

If you are comfortable enough and you know what you are doing, you can
extract straight into the TomCat Installation directories, but I'm more
comfortable taking the extra steps and then cut-and-paste. 

-Original Message-
From: Bruce E. Stemplewski [mailto:[EMAIL PROTECTED] 
Sent: Friday, July 29, 2005 9:25 PM
To: Tomcat Users List
Subject: Newbie: Installing Admin on Tomcat



I am running Tomcat 5.5.9 on XP.   I want to install  Admin.  I think I 
found the correct download here:

http://www.mirrormonster.com/apache.org/jakarta/tomcat-5/v5.5.10-alpha/bin/j
akarta-tomcat-5.5.10-admin.zip


But how do I install it?   Waht directory should I unzip it to?  

The server is installed in:

D:\Program Files\Apache Software Foundation\Tomcat 5.5




Bruce Stemplewski
www.stempsoft.com


We are all in the same boat in a stormy sea, 
and we owe each other a terrible loyalty. 
G. K. Chesterton




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



Newbie Virtual Host Question

2005-07-25 Thread Steve Delaney
Help! I'm sure my problem boils down to simple syntax, but I've been
wrestling with it for days so its time to ask...

I'm running a default installation of Tomcat 5.5.9 on Windows XP purely for
development/training purposes. As a matter of principal I like to keep all
my data separate from my other files, so my web sites are all stored under
C:\Data\CurrentProjects\ProjectName. All I want to do is to configure Tomcat
to see these sites in their current location rather than deploy them into
the Tomcat file structure, but I can't seem to get it edited correctly in
the server.xml file. For now these are basic web sites with some SSI and
CGI. I had this all running smoothly with an earlier version of Tomcat, but
hardware problems wiped out that configuration and I can't seem to get it
working again.

I've edited my hosts file to reference my local development sites, but the
best I've been able to manage so far is to get my own site address to return
the default Tomcat pages. Everything else returns some variation of a page
not found error. An example of the correct Virtual Host definition
(context/apBase/docBase syntax, and anything else I might be missing) to
point Tomcat at sites in another directory (under Windows) would be greatly
appreciated.

Thanks


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



Re: Apache + Tomcat with Mod_jk

2005-07-08 Thread Steve Ochani
 Shailendra Gatade wrote:
  Hi All,
 
  I am trying to connect Apache 2 ( Linux ) with Tomcat 5.0 ( Win2K )
  using mod_jk. I'm facing several problems regarding this ...
 
  Initially i was using mod_jk2.so which is deprecated and also not
  recomended for Production Environment.
 
  I am not able to find the proper mod_jk.so for Apache.
 
I downloaded ...
 
  jakarta-tomcat-connectors-jk-1.2.10-linux-sles8-ppc-apache-2.0.53-pr
  efork.so
  and
 
  jakarta-tomcat-connectors-jk-1.2.10-linux-sles8-ppc-apache-2.0.53-wo
  rker.so
 
Which file should i rename to mod_jk.so ?
 
When i rename the first one and use it, i am getting the
following
  error ...
   Cannot load /usr/local/apache2/lib/mod_jk.so into server:
  /usr/local/apache2/lib/mod_jk.so: ELF file data encoding not
  little-endian.
 
   Can somebody point me to a location where i can find the proper
  mod_jk.so for my setup ?
 
  Also there is no extensive tutorial available on the same issue ...
  Is anyone aware of a tutorial which guides you step by step in
  configuring Apache 2 + Tomcat 5.0 using mod_jk.so ?
 
  Thanks in advance ...
 
  Shailendra
 


 Try here.

 http://www.apache.org/dist/jakarta/tomcat-connectors/jk/binaries/win32
 /


Those are for windows, he is running linux (for the webserver at least).

http://www.apache.org/dist/jakarta/tomcat-connectors/jk/binaries/linux/

If you are not running a ppc (power pc) architecture based machine don't use 
the ppc
module.

-Steve O.

«¤»¥«¤»§«¤»¥«¤»§«¤»¥«¤»§«¤»¥«¤»§«¤»¥«¤»§«¤»¥«¤»§«¤»¥«¤»
Education is what remains after one has forgotten everything he
learned in school. -Albert Einstein

Steve O.
http://www.steveo.us


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



Re: Apache2+jk+tomcat5.028+uri utf-8 [NOT] SOLVED

2005-07-01 Thread Steve Chen, Fu-Hsiang

Paul:

I got the same error as you did and I posted my problem the other day 
but no response at all. Seems not many people have this problem. I have 
two machines both running fedora 3 and use the same configuration but 
strangly, one of them have no problem using jk but the other just keep 
giving same error. The only difference is the hardware but I doubt 
hardware would cause jk malfunctioning. I attached the post I sent few 
days back for you reference. Maybe we can discuss more about this later.



Regards

Steve

Here is my post:

I have searched every where and I don't find many people having the same 
problem as me and I have installed JK and jboss on many machines and 
only this one has problem. Here is the problem description:


I installed mod_jk1.2.10 on apache 2 to redirect dynamic contenet to 
jboss 4. I followed a guide on jboss site and it works well on other 
machine but this specific machine running fedora 3 just does not work. I 
have verified that tomcat works well if I add port 8080 to the web 
address. (for example http://localhost:8080/jspPage works but not 
http://localhost/jspPage. The directory mapping is defied in 
uriworkermap.properties) I attached all the configuration files and 
error log in this post and hope some one can give me some idea.




Sorry for the long email ;) and thanks for your help


Steve


The jk error log message is as follows:

[Mon Jun 27 15:58:23 2005][info]  jk_open_socket::jk_connect.c (433): 
connect to 127.0.0.1:8009 failed with

errno=13
[Mon Jun 27 15:58:23 2005][info]  
ajp_connect_to_endpoint::jk_ajp_common.c (877): Failed connecting to tomca
t. Tomcat is probably not started or is listening on the wrong host/port 
(127.0.0.1:8009). Failed errno = 13
[Mon Jun 27 15:58:23 2005][info]  ajp_send_request::jk_ajp_common.c 
(1227): Error connecting to the Tomcat p

rocess.
[Mon Jun 27 15:58:23 2005][info]  ajp_service::jk_ajp_common.c (1724): 
Sending request to tomcat failed,  re

coverable operation attempt=3
[Mon Jun 27 15:58:23 2005][error] ajp_service::jk_ajp_common.c (1733): 
Error connecting to tomcat. Tomcat is

probably not started or is listening on the wrong port. worker=node2 failed
[Mon Jun 27 15:58:23 2005][info]  service::jk_lb_worker.c (627): service 
failed, worker node2 is in error st

ate
[Mon Jun 27 15:58:23 2005][info]  service::jk_lb_worker.c (677): All 
tomcat instances are busy or in error s

tate
[Mon Jun 27 15:58:23 2005]loadbalancer localhost 0.001220

[Mon Jun 27 15:58:23 2005][info]  jk_handler::mod_jk.c (1975): Service 
error=0 for worker=loadbalancer


httpd conf file:

# Include mod_jk configuration file
Include conf/mod-jk.conf

mod_jk.conf file
 # Load mod_jk module
 # Specify the filename of the mod_jk lib
 LoadModule jk_module modules/mod_jk.so

 # Where to find workers.properties
 JkWorkersFile conf/workers.properties

 # Where to put jk logs
 JkLogFile logs/mod_jk.log

 # Set the jk log level [debug/error/info]
 JkLogLevel info
 # Select the log format
 JkLogStampFormat  [%a %b %d %H:%M:%S %Y]

 # JkOptions indicates to send SSK KEY SIZE
 JkOptions +ForwardKeySize +ForwardURICompat 
-ForwardDirectories


 # JkRequestLogFormat
 JkRequestLogFormat %w %V %T
   # Mount your applications
 JkMount /application/* loadbalancer

 # You can use external file for mount points.
 # It will be checked for updates each 60 seconds.
 # The format of the file is: /url=worker
 # /examples/*=loadbalancer
 JkMountFile conf/uriworkermap.properties  
 # Add shared memory.

 # This directive is present with 1.2.10 and
 # later versions of mod_jk, and is needed for
 # for load balancing to work properly
 JkShmFile logs/jk.shm# Add 
jkstatus for managing runtime data

 Location /jkstatus/
 JkMount status
 Order deny,allow
 Deny from all
 Allow from 127.0.0.1


 /Location   
*workers.properties file

*

 # Define list of workers that will be used
 # for mapping requests
 worker.list=loadbalancer,status
 # Define Node1
 worker.node1.port=8009
 worker.node1.host=localhost
 worker.node1.type=ajp13
 worker.node1.lbfactor=1
 #worker.node1.local_worker=1 (1)
 worker.node1.cachesize=10

 # Define Node2
 worker.node2.port=8009
 worker.node2.host= localhost
 worker.node2.type=ajp13
 worker.node2.lbfactor=1
 #worker.node2.local_worker=1 (1)
 worker.node2.cachesize

Re: New user, help!

2005-06-22 Thread Steve
I am a newbie at this stuff also, and as I understand, for development I 
do not need to install Apache at all. Tomcat will act as a static web 
page server. I am using eclipse so I dont even want Apache installed. 
Just redirect everything to localhost:8080


Steve

Jon Wingfield wrote:

You need some JkMount directives to tell Apache which requests to 
forward to Tomcat.


http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jk2/config/apache.html

Jon

Katherine Faella wrote:

I am a new user of Apache and of Tomcat.  I am using a Redhat AS 4.0 
system.  I am running Apache V2.0.54  and my version of Tomcat is 
5.5.9. I believe my apache installation is okay because when I go to 
localhost I see the apache welcome screen.  When I go to 
localhost:8080 I see the Tomcat welcome screen.   For a short while, 
when I went to localhost I actually saw the Tomcat welcome screen and 
could run the samples there. The only thing missing were the Tomcat 
icons etc.


However,  I have improved my installation to the point where tomcat 
is no longer serving for apache, ie. at localhost I see the apache 
welcome screen.  When I peer around at various log files I do not see 
any obvious errors.  Needless to say - I am going nowhere!


Can anyone help me?  Point me in the right direction at least?!

Thanks in advance,
Kathy Faella
University of Rhode Island

a netstat -ln returns:
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address   Foreign Address State
tcp0  0 0.0.0.0:111 0.0.0.0:* LISTEN
tcp0  0 127.0.0.1:631   0.0.0.0:* LISTEN
tcp0  0 127.0.0.1:250.0.0.0:* LISTEN
tcp0  0 :::127.0.0.1:8005   :::* LISTEN
tcp0  0 :::8009 :::* LISTEN
tcp0  0 :::80   :::* LISTEN
tcp0  0 :::8080 :::* LISTEN
tcp0  0 :::22   :::* LISTEN
udp0  0 0.0.0.0:111 0.0.0.0:*
udp0  0 0.0.0.0:631 0.0.0.0:*
udp0  0 198.168.1.76:1230.0.0.0:*
udp0  0 131.128.1.76:1230.0.0.0:*
udp0  0 127.0.0.1:123   0.0.0.0:*
udp0  0 0.0.0.0:123 0.0.0.0:*
udp0  0 :::123  :::*
Active UNIX domain sockets (only servers)
Proto RefCnt Flags   Type   State I-Node Path
unix  2  [ ACC ] STREAM LISTENING 5899   /dev/gpmctl
unix  2  [ ACC ] STREAM LISTENING 5986 
/tmp/.font-unix/fs7100
unix  2  [ ACC ] STREAM LISTENING 5515 
/var/run/acpid.socket
unix  2  [ ACC ] STREAM LISTENING 6062 
/var/run/dbus/system_bus_socket



***  To the default httpd.conf I added:

LoadModule jk_module modules/mod_jk.so

#
# Configure mod_jk*** kmf ***
#


JkWorkersFile /usr/local/apache2/conf/workers.properties
JkLogFile /usr/local/apache2/logs/mod_jk.log
JkLogLevel info

JkShmFile /var/log/httpd/jkshmfile
JkShmSize 20M

*** my workers.properties  ***

# workers.properties.minimal -
#
# This file provides minimal jk configuration properties needed to
# connect to Tomcat.
#
# The workers that jk should create and work with
#
worker.list=loadbalancer

#
# Defining a worker named ajp13w and of type ajp13
# Note that the name and the type do not have to match.
#
worker.ajp13w.type=ajp13
worker.ajp13w.host=localhost
worker.ajp13w.port=8009

# add any new workers to the list here to have them balanced
worker.loadbalancer.type=lb
worker.loadbalancer.balanced_workers=ajp13w

workers.tomcat_home=/usr/local/src/jakarta-tomcat-5.5.9
workers.java_home=/usr/java/jdk1.5.0_03



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






--
Rowan Cottage, Main Road, Littleton, Winchester, SO22 6QS
cellular 07791766560, 
landline: 01962 881924



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



Re: New user, help!

2005-06-22 Thread Steve

Thanks
Mind you though, the introduction to this document says


 *Prerequisites for this tutorial.*

Before you start this tutorial, you should ideally have a working 
knowledge of *Java technology, XML, J2EE technology and some exposure to 
SQL, JDBC concepts, and Xdoclet (Attribute Oriented Programming)*. Even 
if you are new to a lot of this then don't panic – just expect to do a 
bit more learning along the way!




Raghupathy,Gurumoorthy wrote:

Firtst read java / j2ee / jsp and some tutorials ... 
http://www.tusc.com.au/tutorial/html is a good place to start 


Guru


-Original Message-
From: Steve [mailto:[EMAIL PROTECTED] 
Sent: 22 June 2005 16:49

To: Tomcat Users List
Subject: Re: New user, help!


I am a newbie at this stuff also, and as I understand, for development I 
do not need to install Apache at all. Tomcat will act as a static web 
page server. I am using eclipse so I dont even want Apache installed. 
Just redirect everything to localhost:8080


Steve

Jon Wingfield wrote:

 

You need some JkMount directives to tell Apache which requests to 
forward to Tomcat.


http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jk2/config/apache.html

Jon

Katherine Faella wrote:

   

I am a new user of Apache and of Tomcat.  I am using a Redhat AS 4.0 
system.  I am running Apache V2.0.54  and my version of Tomcat is 
5.5.9. I believe my apache installation is okay because when I go to 
localhost I see the apache welcome screen.  When I go to 
localhost:8080 I see the Tomcat welcome screen.   For a short while, 
when I went to localhost I actually saw the Tomcat welcome screen and 
could run the samples there. The only thing missing were the Tomcat 
icons etc.


However,  I have improved my installation to the point where tomcat 
is no longer serving for apache, ie. at localhost I see the apache 
welcome screen.  When I peer around at various log files I do not see 
any obvious errors.  Needless to say - I am going nowhere!


Can anyone help me?  Point me in the right direction at least?!

Thanks in advance,
Kathy Faella
University of Rhode Island

a netstat -ln returns:
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address   Foreign Address State
tcp0  0 0.0.0.0:111 0.0.0.0:* LISTEN
tcp0  0 127.0.0.1:631   0.0.0.0:* LISTEN
tcp0  0 127.0.0.1:250.0.0.0:* LISTEN
tcp0  0 :::127.0.0.1:8005   :::* LISTEN
tcp0  0 :::8009 :::* LISTEN
tcp0  0 :::80   :::* LISTEN
tcp0  0 :::8080 :::* LISTEN
tcp0  0 :::22   :::* LISTEN
udp0  0 0.0.0.0:111 0.0.0.0:*
udp0  0 0.0.0.0:631 0.0.0.0:*
udp0  0 198.168.1.76:1230.0.0.0:*
udp0  0 131.128.1.76:1230.0.0.0:*
udp0  0 127.0.0.1:123   0.0.0.0:*
udp0  0 0.0.0.0:123 0.0.0.0:*
udp0  0 :::123  :::*
Active UNIX domain sockets (only servers)
Proto RefCnt Flags   Type   State I-Node Path
unix  2  [ ACC ] STREAM LISTENING 5899   /dev/gpmctl
unix  2  [ ACC ] STREAM LISTENING 5986 
/tmp/.font-unix/fs7100
unix  2  [ ACC ] STREAM LISTENING 5515 
/var/run/acpid.socket
unix  2  [ ACC ] STREAM LISTENING 6062 
/var/run/dbus/system_bus_socket



***  To the default httpd.conf I added:

LoadModule jk_module modules/mod_jk.so

#
# Configure mod_jk*** kmf ***
#


JkWorkersFile /usr/local/apache2/conf/workers.properties
JkLogFile /usr/local/apache2/logs/mod_jk.log
JkLogLevel info

JkShmFile /var/log/httpd/jkshmfile
JkShmSize 20M

*** my workers.properties  ***

# workers.properties.minimal -
#
# This file provides minimal jk configuration properties needed to
# connect to Tomcat.
#
# The workers that jk should create and work with
#
worker.list=loadbalancer

#
# Defining a worker named ajp13w and of type ajp13
# Note that the name and the type do not have to match.
#
worker.ajp13w.type=ajp13
worker.ajp13w.host=localhost
worker.ajp13w.port=8009

# add any new workers to the list here to have them balanced
worker.loadbalancer.type=lb
worker.loadbalancer.balanced_workers=ajp13w

workers.tomcat_home=/usr/local/src/jakarta-tomcat-5.5.9
workers.java_home=/usr/java/jdk1.5.0_03



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



   




 




--
Rowan Cottage, Main Road, Littleton, Winchester, SO22 6QS
cellular 07791766560, 
landline: 01962 881924

Re: Apache-Tomcat Servlet Mapping Issues

2005-06-22 Thread Steve Ochani
Hi,

As you test, can you load a servlet through apache httpd? Such as

http://www.xyz.com/testservlet

You should make a simple servlet that just has the doGet method to test.

-Steve O.



 System: Solaris SunOS 5.9
 Apache: 2.0.52
 Tomcat: 4.1.31
 Mod JK: 1.2.6
 The problem: Apache/mod_jk cannot resolve servlet URL mappings
 
 When Tomcat is running stand-alone, it can resolve servlet mappings
 without any problems; so that a page with this form definition: FORM
 name=login method=POST action=loginhandler correctly invokes
 the com.company.LoginHandler servlet (which suggests there's nothing
 syntactically wrong with the servlet and servlet-mapping entries
 in web.xml);
 
 When Tomcat stand-alone is turned off and Apache is turned on, that
 same page always throws a 404 error for site/loginhandler; these are
 the error messages in mod_jk.log:
 
 [Wed Jun 22 09:04:08 2005]  [mod_jk.c (2313)]: mod_jk::jk_translate,
 check alias_dir: /usr/apache/tomcat/webapps [Wed Jun 22 09:04:08 2005]
  [mod_jk.c (2337)]: mod_jk::jk_translate, AutoAlias child_dir:
 loginhandler [Wed Jun 22 09:04:08 2005]  [mod_jk.c (2363)]:
 mod_jk::jk_translate, AutoAlias OK for file:
 /usr/apache/tomcat/webapps/aiwosc/loginhandler [Wed Jun 22 09:04:08
 2005]  [jk_uri_worker_map.c (445)]: Into
 jk_uri_worker_map_t::map_uri_to_worker [Wed Jun 22 09:04:08 2005] 
 [jk_uri_worker_map.c (459)]: Attempting to map URI
 '/aiwosc/loginhandler' [Wed Jun 22 09:04:08 2005] 
 [jk_uri_worker_map.c (577)]: jk_uri_worker_map_t::map_uri_to_worker,
 done without a match
 
 What terribly simple configuration error have I made here?
 
 These are the web.xml entries for this servlet:
servlet
  servlet-nameloginhandler/servlet-name
  servlet-classcom.company.aiwosc.LoginHandler/servlet-class
/servlet
servlet-mapping
  servlet-nameloginhandler/servlet-name
  url-pattern/loginhandler/url-pattern
/servlet-mapping
 
 This is the workers.properties file:
 worker.list=ajp13
 worker.ajp13.port=8009
 worker.ajp13.host=server.org
 worker.ajp13.type=ajp13
 
 
 This is the app section from mod_jk.conf:
   server.org:/aiwosc 
 
  # Static files
  Alias /aiwosc /var/apache/tomcat/webapps/aiwosc
 
  Directory /var/apache/tomcat/webapps/aiwosc
  Options Indexes FollowSymLinks
  DirectoryIndex index.html
  /Directory
 
 
  # Deny direct access to WEB-INF and META-INF
  #
  Location /aiwosc/WEB-INF/*
  AllowOverride None
  deny from all
  /Location
 
  Location /aiwosc/META-INF/*
  AllowOverride None
  deny from all
  /Location
 
  JkMount /aiwosc/addtitleservlet  ajp13
  JkMount /aiwosc/submittitleservlet  ajp13
  JkMount /aiwosc/transfertitleservlet  ajp13
  JkMount /aiwosc/saveoscservlet  ajp13
  JkMount /aiwosc/reordercastservlet  ajp13
  JkMount /aiwosc/loginhandler  ajp13
  JkMount /aiwosc/editcategoryservlet  ajp13
  JkMount /aiwosc/edittitleservlet  ajp13
  JkMount /aiwosc/addaddendumservlet  ajp13
  JkMount /aiwosc/*.jsp  ajp13
  JkMount /aiwosc/addcategoryservlet  ajp13
 
 This is the Context entry for the app in server.xml:
  !-- Oscars OSC Context --
  Context path=/aiwosc docBase=aiwosc debug=5
   reloadable=true crossContext=true
   Logger className=org.apache.catalina.logger.FileLogger
   prefix=aiwosc_log. suffix=.txt
   timestamp=true/
 
   Resource name=jdbc/oscars auth=Container
 type=javax.sql.DataSource/
 
ResourceParams name=jdbc/oscars
 parameter
  namefactory/name
  valueorg.apache.commons.dbcp.BasicDataSourceFactory/va
  lue
 /parameter
 parameter
  namedriverClassName/name
  valueoracle.jdbc.driver.OracleDriver/value
 /parameter
 parameter
  nameurl/name
  valuejdbc:oracle:thin:@gtsora2.gtsgraphics.com:1521:ACA
  D/value
 /parameter
 parameter
  nameusername/name
  valueIMPC_ADMIN/value
 /parameter
 parameter
  namepassword/name
  valuePIRANHA/value
 /parameter
 parameter
  namemaxActive/name
  value20/value
 /parameter
 parameter
  namemaxIdle/name
  value10/value
 /parameter
 parameter
  namemaxWait/name
  value-1/value
 /parameter
/ResourceParams
  /Context
 
 And these are the mod_jk load/configuration entries from httpd.conf:
 IfModule !mod_jk.c
  LoadModule jk_module modules/mod_jk.so
 /IfModule
 
 Include /usr/apache/tomcat/conf/auto/mod_jk.conf
 JkWorkersFile /usr/apache/tomcat/conf

Re: got an error for a admi-entry

2005-06-20 Thread Steve Ochani
Hi,

You don't have the admin rolename defined.


On 20 Jun 2005 at 18:17, Christian Stalp wrote:

 Hello out there.
 I have the really weirdest Tomcat-installation ever!!!
 I installed it for a new time on Debian-Linux. With the stable
 Debian-Packages! But then I try to make a new entry into the
 tomcat-users.xml:

 [code]
 ?xml version='1.0' encoding='utf-8'?
 tomcat-users
   role rolename=tomcat/
   role rolename=role1/
   role rolename=manager/
   user username=Adminstrator password=blabla roles=manager,admin/
   user username=tomcat password=tomcat roles=tomcat/
   user username=both password=tomcat roles=tomcat,role1/
   user username=role1 password=tomcat roles=role1/
 /tomcat-users
 [/code]

 This is I think a really easy busyness. Isn't it? The last time the problems
 begann much later. Anyway...

 When I called these manager or admin sites I got an compiler error:
 [quote]
 HTTP Status 500 -

 type Exception report

 message

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

 exception

 org.apache.jasper.JasperException: Unable to compile class for JSP

 An error occurred at line: -1 in the jsp file: null

 Generated servlet error:
 [javac] Compiling 1 source file



   at
 org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:85)
   at
 org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:248)
   at org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:315)
   at org.apache.jasper.compiler.Compiler.compile(Compiler.java:328)
   at
 org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:427)
   at
 org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:142)
   at 
 org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:240)
   at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:187)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
   at
 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:200)
   at org.apache.catalina.core.ApplicationFilterChain.access$000
 (ApplicationFilterChain.java:51)
   at
 org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:129)
   at java.security.AccessController.doPrivileged(Native Method)
   at
 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:125)
   at
 org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:209)
   at
 org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
   at
 org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
   at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
   at
 org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:144)
   at
 org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
   at
 org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:504)
   at
 org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:594)
   at
 org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
   at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
   at 
 org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2358)
   at
 org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:133)
   at
 org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
   at
 org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:118)
   at
 org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:594)
   at
 org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:116)
   at
 org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:594)
   at
 org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
   at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
   at
 org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:127)
   at
 org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
   at
 org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
   at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
   at 
 org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:152)
   at 
 org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
   at
 

Tomcat Version detection

2005-06-20 Thread Steve Vanspall
Hi there,

I am running tomcat under linux, unfortunately can't remember whether it is 
4.1.24 or 4.1.31, which made me relise, I don't know how to find out.

When i look at the logs it jsut says Tomcat 4.1 unlike on windows where it 
actually gives the full version number.

So where would i look to find the tomcat version?

Regards

Steve

Welcome file list

2005-06-06 Thread Steve Forster
Hi, this is probably a basic question but I could really use a hand.

Is there a way to simply read/display www.mydomain.com without
redirecting to index.jsp?

I found out how to do the opposite in web.xml
welcome-file-list
welcome-fileindex.jsp/welcome-file
welcome-fileindex.html/welcome-file
welcome-fileindex.htm/welcome-file
/welcome-file-list


TIA

Steve


Re: tomcat newbie : cant make a simple servlet work

2005-06-04 Thread Steve Ochani
Hi,

This servlet worked for me:

http://www.matcmp.ncc.edu/~steve/servlets/simpleservlet

I used the following inside my web.xml

servlet
  servlet-nameSimpleServlet/servlet-name
  servlet-classservlets.SimpleServlet/servlet-class
/servlet
servlet-mapping
 servlet-nameSimpleServlet/servlet-name
 url-pattern/servlets/simpleservlet/url-pattern
/servlet-mapping

(I compiled it as part of package servlets but that doesn't matter)

I think the key part that you are missing is the servlet mapping.

also make sure that your class file is inside a subdir called chapter2

-Steve O.


 Greetings everyone!
 I'm a newbie with Tomcat and i've already been trying out a simple
 server example for about 2 days now and still it wouldnt work. I
 really hope someone would help me out.


«¤»¥«¤»§«¤»¥«¤»§«¤»¥«¤»§«¤»¥«¤»§«¤»¥«¤»§«¤»¥«¤»§«¤»¥«¤»
Education is what remains after one has forgotten everything he
learned in school. -Albert Einstein

Steve O.
http://www.steveo.us

B17G WWII Bomber Yankee Lady Flight
http://www.steveo.us/b17ride




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



Repeated logging problem on 5.5

2005-06-02 Thread Steve Kirk

I have a double-logging problem, by which I mean that 
some of my log messages get logged to two logfiles.  I have only one 
logfile configured using java.util.logging, but in some cases, the 
same log message gets logged to the TC stdout log as well, which I don't 
want.  It's not the end of the world, but I'd like to understand what's 
happening in case I've misunderstood something.

This problem only happens when there is a java.util.logging call 
from either: 
- the init() method of my own servlet
- a class created during that init() method, that persists in the VM after 
  the init() method has returned, through a static field reference.

I asked about this approx 1 days ago, but got no replies, probably because 
my original post was too wordy.  More detail, incl my versions and config 
setup, are in my original post here: 
http://article.gmane.org/gmane.comp.jakarta.tomcat.user/113877 

Does anyone have any ideas what the cause might be, please?



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



RE: tomcat 5.5.9 does not read context.xml

2005-06-02 Thread Steve Kirk

yes context.xml is fine in META-INF.  in fact it is preferred over having it
in server.xml.  your alternative is to put it in
conf/enginename/hostname/yourwebappname.xml (which is in fact what TC will
do for you when it unpacks the war).

I don't know that you can have the context path name different to the war
file.  I'm not 100% sure, but can't see how to do it.  in fact I can see it
being a source of potential confusion.  can you explain why you want to do
that?

 OK, I am totally confused. Is or is it not best practice to provide a 
 context.xml in META-INF. I thought this was required for hot 
 deployment 
 to work. If I want my context path to have a different name to my war 
 file, how do I achieve this?
 
 thank you
 



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



RE: invoking Thread.Sleep() from a servlet instance

2005-06-01 Thread Steve Kirk

I have used Thread.sleep() in a webapp, but not within a servlet as such.  I
wrote Runnable classes that were started in their own thread of execution
when the webapp started up.  This worked fine.

 -Original Message-
 From: Tim Funk [mailto:[EMAIL PROTECTED] 
 Sent: Tuesday 31 May 2005 18:50
 To: Tomcat Users List
 Subject: Re: invoking Thread.Sleep() from a servlet instance
 
 
 It's allowed and typically a bad idea.
 
 
 -Tim
 
 Clark O'Brien wrote:
 
  I am looking for insight on invoking Thread.sleep()
  from a Tomcat Servlet. I understand it is explicitly
  prohibited in the J2EE spec and it is not hard to 
  comprehend that invoking sleep on a thread that is
  processing multiple requests could cause serious side
  effects. Still I hear rumors that Tomcat allows sleep
  invocations and I occasionally see it done.
 clark
  
 
 -
 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: Where is the compatibility package to download?

2005-05-31 Thread Steve Kirk
Main downloads page 
http://jakarta.apache.org/site/downloads/downloads_tomcat-5.cgi 
See links at bottom of 5.5.9 section

 -Original Message-
 From: Dave Guzda [mailto:[EMAIL PROTECTED] 
 Sent: Tuesday 31 May 2005 15:42
 To: tomcat-user@jakarta.apache.org
 Subject: Where is the compatibility package to download?
 
 
 Hello, 
 
 I'm trying to get Tomcat 5.5 running and I need to use Java 
 1.4.2. It seems I require the 'compatibility package' to make 
 this happen. Exactly where is this available to download, i 
 can't seem to find it.
 
 Thanks
 Dave
 



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



RE: Are we required to move to Tomcat 5.5 in order to move to JDK 1.5

2005-05-27 Thread Steve Kirk

I think these are both in the release/changes notes that I posted a link to
earlier in this thread - so yes these are real issues.

 -Original Message-
 From: Mark Leone [mailto:[EMAIL PROTECTED] 
 Sent: Friday 27 May 2005 02:14
 To: Tomcat Users List
 Subject: Re: Are we required to move to Tomcat 5.5 in order 
 to move to JDK 1.5
 
 
 Sounds like the consensus is that Tomcat 5.0.x will work with 
 jdk 1.5. 
 FWIW I found the following two problems trying to run code 
 built for jre 
 1.4 in a 1.5 jvm.
 
 1. A couple DOM classes (don't remember which ones, but 
 you'll know it 
 if you run in to them) had some methods added in jdk 1.5. If 
 you try to 
 load an implementation class for one of these that was 
 developed in jdk 
 1.4, you'll get missing method implementation errors. To resolve, you 
 can add empty method specifications for the classes that 
 require them, 
 or upgrade to an XML parser that was written for jdk 1.5.
 
 2. JDK 1.5 uses the symbol enum as a reserved keyword. 
 You'll have to 
 change any and all occurrences of this symbol in your code 
 (where it is 
 used as a variable name) to something else, e.g. enumer.
 
 There may be other backward compatibility issues, but these 
 are the two 
 that I've run into.
 
 -Mark
 
 Tim Diggins wrote:
 
  And, oops, I'm sorry for spreading the original FUD - 
 Following this 
  thread, I've just tried again to get everything working on 
  tc5.0/jdk1.5 and hey-presto, everything ok - guess I must've had TC 
  running on jdk1.4 after all...
 
  But planning to migrate to 5.5 anyway.
 
  thanks everyone
 
  T
 
 
  Steve Kirk wrote:
 
  Yes sorry, david is correct, I got it backwards.
 
 
  -Original Message-
  From: David Smith [mailto:[EMAIL PROTECTED] Sent: Thursday 26 May 
  2005 12:59
  To: Tomcat Users List
  Subject: Re: Are we required to move to Tomcat 5.5 in 
 order to move 
  to JDK 1.5
 
 
  Small correction -- 5.5 needs the compat package to work 
 on jdk l.4, 
  not 5.0 needs it to work on jdk 1.5. I've used TC 5.0  jdk 1.5 
  together no problem.
 
  --David
 
  Steve Kirk wrote:
 
 
  You can run 5.0.28 on jdk1.5 but you need to add a 
 
 
  compatibility package
 
  which is available from the tc downloads page.  Basically it 
 
 
  adds 3 jars to
 
  fix issues with xml compatibility with the 1.4 vm.
 
  I haven't done it myself (I upgraded both at once) but 
 
 
  google some of these
 
  words and you can read all about it.
 
  PS if you do go to 5.5 and have DBCP, be sure to change your 
 
 
  context.xml to
 
  the new format required by TC5.5.  I spent nearly 3 days 
 
 
  working that out.
 
 
 
 
  -Original Message-
  From: Raverkar, Sachin (Sachin) 
 [mailto:[EMAIL PROTECTED] Sent: 
  Thursday 26 May 2005 08:58
  To: tomcat-user@jakarta.apache.org
  Subject: Are we required to move to Tomcat 5.5 in order 
 to move to 
  JDK 1.5
 
 
  Hi all,
  We are currently using Tomcat-5.0.28 and JDK 1.4.2_03.
  We need to move onto JDK 1.5. We would build our war file using 
  JDK 1.5.
  Can we continue to use Tomcat-5.0.28 with  JDK 1.5? Do 
 you see any 
  problem? Are there any known issues?
  Since Tomcat 5.5 is designed to run on J2SE 5.0 [JDK 
 1.5] and later,
  are we required to move to Tomcat 5.5 in order to move 
 to JDK 1.5?
 
  - Sachin
 



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



RE: Error filterStart in org.apache.catalina.core.StandardContext start

2005-05-27 Thread Steve Kirk

Are you by any chance running on a server that has no video card/monitor?  A
few years ago a colleague mentioned that the headless=true is required in
this situation, something to do with whether the AWT classes need to be
loaded, my memory is a bit vague on it.

You have 4 forward slashes but then only single slashes afterwards, is that
right?  Looks odd, / cannot be an escape if used alone, so why 4?

 -Original Message-
 From: Strauss, Alexandra [mailto:[EMAIL PROTECTED] 
 Sent: Friday 27 May 2005 12:07
 To: 'tomcat-user@jakarta.apache.org'
 Subject: Error filterStart in 
 org.apache.catalina.core.StandardContext start
 
 
 Hi,
 
 I'm getting This Error while starting Tomcat. I searched the 
 web an found
 out that this error can occur if starting Tomcat misses this param in
 CATALINA_OPTS:  -Djava.awt.headless=true
 I checked the starting procedure and found out, that this param is set
 properly in the call looking like this:
 
 CATALINA_OPTS=-Xmx1024m -Xms256m -Djava.awt.headless=true 
 -DTomcat_hale
 -Dlog4j.configuration=file:opt/jakarta-tomcat-5.0.28_hale/
 log4j.lcf
 -server; export CATALINA_OPTS
 
 Not having much experience with tomcat I have no idea what 
 else could be the
 reason for this error. Could anyone help me? Thank you.
 
 
 Greetings
 Alexandra Strauß
 
 Oberlandesgericht München
 Gemeinsame IT-Stelle der bayerischen Justiz
 Referat IT-4 Serverbetrieb/Rechenzentrum SG4.3
 Infanteriestr. 5
 80797 München
 
 
 
 
 --
 --
 --
 --
 --
 
 Catalina-out
 --
 --
 --
 --
 --
 
 27.05.2005 11:04:52 org.apache.catalina.core.StandardContext start
 SCHWERWIEGEND: Error filterStart
 27.05.2005 11:04:52 org.apache.catalina.core.StandardContext start
 SCHWERWIEGEND: Context startup failed due to previous errors
 27.05.2005 11:04:52 
 org.apache.catalina.core.StandardHostDeployer install
 INFO: Installing web application at context path 
 /servlets-examples from URL
 file:/opt/jakarta-tomcat-5.0.28_hale/webapps/servlets-examples
 27.05.2005 11:04:52 org.apache.catalina.core.StandardContext start
 SCHWERWIEGEND: Error filterStart
 27.05.2005 11:04:52 org.apache.catalina.core.StandardContext start
 SCHWERWIEGEND: Context startup failed due to previous errors
 27.05.2005 11:04:52 
 org.apache.catalina.core.StandardHostDeployer install
 INFO: Installing web application at context path /tomcat-docs from URL
 file:/opt/jakarta-tomcat-5.0.28_hale/webapps/tomcat-docs
 27.05.2005 11:04:52 
 org.apache.catalina.core.StandardHostDeployer install
 INFO: Installing web application at context path /webdav from URL
 file:/opt/jakarta-tomcat-5.0.28_hale/webapps/webdav
 27.05.2005 11:04:52 
 org.apache.catalina.core.StandardHostDeployer install
 INFO: Installing web application at context path 
 /archive_sich from URL
 file:/opt/jakarta-tomcat-5.0.28_hale/webapps/archive_sich
 27.05.2005 11:04:52 org.apache.coyote.http11.Http11Protocol start
 INFO: Starting Coyote HTTP/1.1 on http-8090
 27.05.2005 11:04:52 org.apache.jk.common.ChannelSocket init
 INFO: Port busy 8009 java.net.BindException: Adresse wird 
 bereits benutzt
 27.05.2005 11:04:52 org.apache.jk.common.ChannelSocket init
 INFO: Port busy 8010 java.net.BindException: Adresse wird 
 bereits benutzt
 27.05.2005 11:04:52 org.apache.jk.common.ChannelSocket init
 INFO: Port busy 8011 java.net.BindException: Adresse wird 
 bereits benutzt
 27.05.2005 11:04:52 org.apache.jk.common.ChannelSocket init
 INFO: Port busy 8012 java.net.BindException: Adresse wird 
 bereits benutzt
 27.05.2005 11:04:52 org.apache.jk.common.ChannelSocket init
 INFO: JK2: ajp13 listening on /0.0.0.0:8013
 27.05.2005 11:04:52 org.apache.jk.server.JkMain start
 INFO: Jk running ID=4 time=0/39
 config=/opt/jakarta-tomcat-5.0.28_hale/conf/jk2.properties
 27.05.2005 11:04:53 org.apache.catalina.startup.Catalina start
 INFO: Server startup in 6516 ms
 
 
 -
 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 into rational database....

2005-05-27 Thread Steve Kirk

I think there is a DBCP logger, but this is for the Java code logging
statements, rather than for the access log AFAIK.

Can't remember where I read this.  Probably on the TC site, try starting
here: 
http://jakarta.apache.org/tomcat/tomcat-5.5-doc/index.html 

 -Original Message-
 From: David [mailto:[EMAIL PROTECTED] 
 Sent: Friday 27 May 2005 12:14
 To: tomcat-user@jakarta.apache.org
 Subject: Logging into rational database
 
 
 Hallo,
 
  
 
 I have sent this question yesterday but nobody responded. It's a short
 question so please send me some information.
 
  
 
 Is it possible to configure tomcat to log the access log into 
 a rational
 database? Is there an existing tutorial?
 
  
 
 Thanks
 
  
 
 David
 
 



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



RE: my build structure..opinions wanted

2005-05-27 Thread Steve Kirk

Don't leave the source on the production server, but it's fine in
development.  Strictly speaking your source files are inaccessible by web
clients if they are under WEB-INF, but better safe than sorry.  Why not
store the src in another folder altogether - eclipse won't care where it is
presumably, and this is slightly better practice.

The other approach is to build a jarfile from a build script (e.g. using
ant), then copy the jar to the webapps/ directory, TC will auto-deply it.
Some would say this is the only way to do it.  However it does slow things
down when you are making frequent small changes to code.  For my money, the
value of a jar is ease of portability, which is a factor if you are writing
for true cross-container support.

I built classes direct to classes/ for a long time, then made the effort to
switch to jar deployment in development, after being persuaded by people on
this list.  I'm glad I've done both, but to be honest I think I do prefer
building to classes, as it's quicker and I can't see a disadvantage to it
during dev.

Your approach that sounds a quite practical solution to me.  Does eclipse
precompile JSPs for you too?

One other thing to watch is that logging.properties and properties files go
in the classes/ folder, so if you use these, be careful that eclipse does
not delete them when rebuilding your classes.

 -Original Message-
 From: gabor [mailto:[EMAIL PROTECTED] 
 Sent: Friday 27 May 2005 13:16
 To: tomcat-user@jakarta.apache.org
 Subject: my build structure..opinions wanted
 
 
 
 hi,
 
 i'm starting a project using jsp + javaBeans..
 i've worked with java a lot, but i have not much experience with web
 applications..
 
 for now my idea is that the application will be using 
 javabeans, and jsp
 for displaying the data...
 
 i use eclipse for the development, which nicely compiles every source
 file automatically when i edit them.
 
 that's why i came up with the following idea:
 
 i'll create a directory in tomcat/webapps (let's call it 'mywebapp').
 put my source files into mywebapp/WEB-INF/src, and instruct eclipse to
 put the compiled .class files into mywebapp/WEB-INF/classes.
 
 this way, i simply edit the files, press ctrl-s (to save them),
 switch to the browser window, and press refresh, and already i get the
 new results (because eclipse already compiled the file, and tomcat
 detected the change).
 
 i tested this approach, and it works ok.
 
 is this a suitable approach? are there any dangers with this approach?
 
 gabor
 
 
 -
 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: jspServlet runs out of memory while compiling some jsp files using fork=true

2005-05-27 Thread Steve Kirk
Is the problem caused because you redeploy the whole webapp each time?
Could you just deploy only those files that have changed?  I can't imagine
that this leads to overloading unless the numbers are massive...?

 -Original Message-
 From: Vesa Varimo [mailto:[EMAIL PROTECTED] 
 Sent: Friday 27 May 2005 13:34
 To: Tomcat Users List
 Subject: Re: jspServlet runs out of memory while compiling 
 some jsp files using fork=true
 
 
 
 Yes, that would be one solution, but not suitable for our 
 case because our 
 webmasters are constantly updating jsp pages on our 
 production servers.
 Btw. I'm using tomcat 5.0.28.
 
 Thx,
 
 Vesa
 
 - Original Message - 
 From: Bernhard Slominski [EMAIL PROTECTED]
 To: 'Tomcat Users List' tomcat-user@jakarta.apache.org
 Sent: Friday, May 27, 2005 3:25 PM
 Subject: AW: jspServlet runs out of memory while compiling 
 some jsp files 
 using fork=true
 
 
 Hi,
 
 I would suggest that you do a precompilation of your jsps on 
 a deployment
 machine which is separate from the live machine.
 So your compilation is not done on the live server, which 
 might be on heavy
 load.
 Also you don't have the problem that the first visitor has to 
 wait an awful
 long time until the page get's displayed.
 
 Cheers
 
 Bernhard
 
  -Ursprüngliche Nachricht-
  Von: Vesa Varimo [mailto:[EMAIL PROTECTED]
  Gesendet: Freitag, 27. Mai 2005 12:45
  An: tomcat-user@jakarta.apache.org
  Betreff: jspServlet runs out of memory while compiling some 
 jsp files
  using fork=true
 
 
  Hi,
 
  I'm having OutOfMemory error while Tomcat tries to compile
  jsp files. The problem occures few times in day so it's quite
  hard to repeat.
  Tomcat is configured to run javac in separate JVM with
  fork=true option. I tried to give more memory for ant using
  ANT_OPTS, but it didn't help.
  I read source code for the jasper compiler and there are
  variables that configure how much memory is given to ant, but
  I'm not able to configure them
  with jspServlet init parameters.
 
  How should I resolved this? Is the Jikes compiler a solution
  worth of trying?
 
  Stacktrace included below. I have hundreds of jars in
  classpath... so I can't paste the whole compiler output.
 
  BR,
 
  Vesa Varimo
  [EMAIL PROTECTED]
 
  --
  --
 
  2005-05-26 21:42:53 StandardWrapperValve[jsp]:
  Servlet.service() for servlet jsp threw exception
  java.lang.OutOfMemoryError
 
  May 7, 2005 12:21:42 PM org.apache.jasper.compiler.Compiler
  generateClass
  SEVERE: Javac exception
  Compile failed; see the compiler error output for details.
  at 
 org.apache.tools.ant.taskdefs.Javac.compile(Javac.java:944)
  at 
 org.apache.tools.ant.taskdefs.Javac.execute(Javac.java:764)
  at
  org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:379)
  at
  org.apache.jasper.compiler.Compiler.compile(Compiler.java:472)
  at
  org.apache.jasper.compiler.Compiler.compile(Compiler.java:451)
  at
  org.apache.jasper.compiler.Compiler.compile(Compiler.java:439)
  at
  org.apache.jasper.JspCompilationContext.compile(JspCompilation
  Context.java:511)
  at
  org.apache.jasper.servlet.JspServletWrapper.service(JspServlet
  Wrapper.java:295)
  at
  org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet
  .java:292)
  at
  org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
  at
  javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
  at
  org.apache.catalina.core.ApplicationFilterChain.internalDoFilt
  er(ApplicationFilterChain.java:237)
  at
  org.apache.catalina.core.ApplicationFilterChain.doFilter(Appli
  cationFilterChain.java:157)
  at
  org.apache.catalina.core.StandardWrapperValve.invoke(StandardW
  rapperValve.java:214)
 
 
 -
 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: jspServlet runs out of memory while compiling some jsp files using fork=true

2005-05-27 Thread Steve Kirk
When you say this: 

  The jsp pages are quite large, 5000-1 rows and there are
  many of them.

I take it that you mean that the page can display 5-10k rows of data from a
database, rather than the JSP has 10k lines of code in it.  I hope so.  If
not, it's no wonder that the compiler is struggling!!

If you do mean DB rows rather than lines of code, I still don't see a
particular reason why compiling the JSPs should present such a heavy load
if, as you say, you are only changing a few at a time.  It sounds more
likely to me that it is the processing of the request by the JSPs that is
probably eating up the server resources.  If compilation is happening in
parallel with this, maybe the two together are enough to push the
performance off the edge?

 -Original Message-
 From: Vesa Varimo [mailto:[EMAIL PROTECTED] 
 Sent: Friday 27 May 2005 14:16
 To: Tomcat Users List
 Subject: Re: jspServlet runs out of memory while compiling 
 some jsp files using fork=true
 
 
 
 Hmh.. how does you deployment script work? Do you compile jsp 
 pages in some 
 other server than the live server?
 
 Well, I didn't write those pages :), I just have to live with 
 legacy code :D
 
 
 Vesa
 
 - Original Message - 
 From: Bernhard Slominski [EMAIL PROTECTED]
 To: 'Tomcat Users List' tomcat-user@jakarta.apache.org
 Sent: Friday, May 27, 2005 4:02 PM
 Subject: AW: jspServlet runs out of memory while compiling 
 some jsp files 
 using fork=true
 
 
 Hi,
 
 I think it happens randomly because it depends on the actual 
 load on the
 server.
 Where there is not much traffic it's OK, but with more 
 traffic the server
 runs out of memomry.
 I see your point that you cannot control the webmasters.
 But still with the problems you have and the obvious very big 
 application
 with 1 lines in a JSP (this must we a horror to maintain 
 the code) and
 hundreds of jars you should have a proper deployment process 
 and not just
 copying JSPs across.
 It does not mean that it's more complicated, I implemented this in my
 company with an ant script and it's really simple, stable and 
 secure. Nobody
 want's to go back to the old copy solution.
 
 Cheers
 
 Bernhard
 
  -Ursprüngliche Nachricht-
  Von: Vesa Varimo [mailto:[EMAIL PROTECTED]
  Gesendet: Freitag, 27. Mai 2005 14:59
  An: Tomcat Users List
  Betreff: Re: jspServlet runs out of memory while compiling some jsp
  files using fork=true
 
 
 
  Hi,
 
  no the webapp is running whole time without redeployments.
  The jsp pages are quite large, 5000-1 rows and there are
  many of them.
  Can this affect to memory usage of javac compiler?
  This is a strange problem, because sometimes these same pages
  compile just
  fine, sometimes they don't.
 
 
  Thx,
 
  Vesa
 
  - Original Message - 
  From: Steve Kirk [EMAIL PROTECTED]
  To: 'Tomcat Users List' tomcat-user@jakarta.apache.org
  Sent: Friday, May 27, 2005 3:32 PM
  Subject: RE: jspServlet runs out of memory while compiling
  some jsp files
  using fork=true
 
 
  Is the problem caused because you redeploy the whole webapp 
 each time?
  Could you just deploy only those files that have changed?  I
  can't imagine
  that this leads to overloading unless the numbers are massive...?
 
   -Original Message-
   From: Vesa Varimo [mailto:[EMAIL PROTECTED]
   Sent: Friday 27 May 2005 13:34
   To: Tomcat Users List
   Subject: Re: jspServlet runs out of memory while compiling
   some jsp files using fork=true
  
  
  
   Yes, that would be one solution, but not suitable for our
   case because our
   webmasters are constantly updating jsp pages on our
   production servers.
   Btw. I'm using tomcat 5.0.28.
  
   Thx,
  
   Vesa
  
   - Original Message - 
   From: Bernhard Slominski [EMAIL PROTECTED]
   To: 'Tomcat Users List' tomcat-user@jakarta.apache.org
   Sent: Friday, May 27, 2005 3:25 PM
   Subject: AW: jspServlet runs out of memory while compiling
   some jsp files
   using fork=true
  
  
   Hi,
  
   I would suggest that you do a precompilation of your jsps on
   a deployment
   machine which is separate from the live machine.
   So your compilation is not done on the live server, which
   might be on heavy
   load.
   Also you don't have the problem that the first visitor has to
   wait an awful
   long time until the page get's displayed.
  
   Cheers
  
   Bernhard
  
-Ursprüngliche Nachricht-
Von: Vesa Varimo [mailto:[EMAIL PROTECTED]
Gesendet: Freitag, 27. Mai 2005 12:45
An: tomcat-user@jakarta.apache.org
Betreff: jspServlet runs out of memory while compiling some
   jsp files
using fork=true
   
   
Hi,
   
I'm having OutOfMemory error while Tomcat tries to compile
jsp files. The problem occures few times in day so it's quite
hard to repeat.
Tomcat is configured to run javac in separate JVM with
fork=true option. I tried to give more memory for ant using
ANT_OPTS, but it didn't help.
I read source code

RE: my build structure..opinions wanted

2005-05-27 Thread Steve Kirk

Precompiled JSPs do 2 steps - JSP to Java, then Java to pcode, which can
then be run by TC.  The compiled JSPs end up as class files, mine end up in
in the
%catalina_home%\work\[enginename]\[hostname]\[webappname]\org\apache\jsp\WEB
_INF\jsp directory (because the source JSP files are in WEB-INF\jsp).

Without precomp, TC compiles each JSP on the fly, the first time that it is
accessed, which slows down execution.

I've never used Eclipse so was just interested.  NetBeans does not by
default do precomp, or even auto compile of servlets on save, although
because it is based on Ant, most things are possible with a little
scripting.

 -Original Message-
 From: gabor [mailto:[EMAIL PROTECTED] 
 Sent: Friday 27 May 2005 15:12
 To: Tomcat Users List
 Subject: Re: my build structure..opinions wanted
 
 
 On Fri, May 27, 2005 at 01:29:50PM +0100, Steve Kirk wrote:
  
  
  Your approach that sounds a quite practical solution to me. 
  Does eclipse
  precompile JSPs for you too?
 
 no.. well, i don't know.. where should the compiled jsp files? be 
 (so i can check :)..
 
 but anyway, as long as tomcat recompiles them on change, it's ok :)
 
 gabor
 
  
 
 -
 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: Adding content/JSPs on the fly

2005-05-27 Thread Steve Kirk

It sounds reasonable, but probably isn't tested or by design, so probably
best to just have a go.  Re portability, the best advice I can offer is an
old chestnut: read the servlet spec.  This is particularly relevant in this
case.  The spec is generally pretty good at telling you you pretty
accurately if (a) what you want to do should/must be supported or (b) what
you want do do is forbidden.  Of course there are some areas that it does
not have a view either way on, but I find it to be an invaluable document -
I have it on shortcut from my taskbar and consult it often.  It's at least
as useful as the javadocs or TC docs.

For those of you that don't know where to find it, it's here, under
specifications.  
http://java.sun.com/products/servlet/reference/api/index.html 

Choose the servlet spec version appropriate to your TC version as described
in the table on the tomcat home page: 
http://jakarta.apache.org/tomcat/index.html

Just one more specific point on your note Will - I would have thought if
anything that you want it to be a precondition that the webapp NOT be
deployed as a war.  I've a feeling that if TC explodes the war, then it
might not check the exploded FS for changes.  Don't take this as gospel
though, this is a hazy half-remembered bit of info.

 -Original Message-
 From: Will Hartung [mailto:[EMAIL PROTECTED] 
 Sent: Friday 27 May 2005 18:31
 To: Tomcat Users List
 Subject: Adding content/JSPs on the fly
 
 
 I'm scheming on a little project, and one of the things I 
 want to be able to
 do is simply add content to the application.
 
 The typical way to add content is also rather static -- add 
 it to the WAR
 and redeploy.
 
 That's not particularly dynamic tho, and doesn't really 
 facilitate changing
 content from the web app.
 
 One of the things I'd like to be able to create on the fly 
 are JSPs that are
 then served by the container.
 
 Now, Kenneth Jensen may have answered my question for me by 
 providing this
 snippet:
 
 ServletContext context = getServletConfig().getServletContext();
 String slash = System.getProperty(file.separator);
 keystore = context.getRealPath(/) + WEB-INF + slash +
 getInitParameter(keystorefile);
 
 The key being the getRealPath(/) code.
 
 So, my question is do you think that it's reasonable and 
 fairly portable to
 leverage that technique to find where on the system a webapp 
 is deployed and
 use that as a base path to create new resources to be served by the
 container?
 
 I'm aware that it is possible for a web app to be deployed in 
 an unexploded
 WAR, and I would simply make it a precondition that this not 
 be the case
 (and for 99% of most systems, it simply isn't an issue).
 
 But, shouldn't this pretty much work with most common servlet 
 containers?
 
 Thanx for any insight...
 
 Regards,
 
 Will Hartung
 ([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: Question: Steve Kirk

2005-05-27 Thread Steve Kirk

Thanks for saying that LOL :) but I'm afraid that you flatter me ;-)

I've been using TC on and off for about 4 years, I have a working knowledge
of the features that I actually use in my webapps, and answer Qs on those
when I can, but that really is about it - there are many others on this list
who are far more knowledgeable than I am about TC.  Perhaps I'm talking too
much at the moment and the volume is giving a false impression of quality ;)

I did read your post, but unfortunately precomp JSPs are not something I
use, I'm just aware of what the general benefits are, as I've worked on a
project where someone else set up the precomp code for our production
environment.  It's on the list of things I want to learn about next, because
it is good practice for production servers, and I have to set one up very
soon.

However I bet that someone will be along soon who can help you.

I have no role in the project - I am just another web developer, the same as
most people on the list.  I am quite active at the moment, mainly because I
just rejoined after a few months' absence, and I've just done upgrades to
the latest versions of JDK/TC/NetBeans, so have read a lot of docs, and
received help from list members, so have some fairly current knowledge to
share.  When on the list, and I have a few mins to spare, I try to help
people if I know anything relevant.  I think this is in the spirit of the
community - give some help where you can, and what goes around comes around.

Most of the real expertise and hard work in TC is provided by the team of
volunteers behind the scenes.

 -Original Message-
 From: Mike Baliel [mailto:[EMAIL PROTECTED] 
 Sent: Friday 27 May 2005 19:58
 To: Tomcat Users List
 Subject: Question: Steve Kirk
 
 
 Hi Steve,
 
   You seem to be one of the more experienced users of the 
 Tomcat  user 
 mail-list.  Any thoughts on my precompiled JSP problem?
 
 Any feedback is welcomed.
 
 Best,
 
 
 -- 
 No virus found in this outgoing message.
 Checked by AVG Anti-Virus.
 Version: 7.0.322 / Virus Database: 267.1.0 - Release Date: 5/27/2005
 
 
 -
 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: Adding content/JSPs on the fly

2005-05-27 Thread Steve Kirk

OK glad you've got that off yr chest ;)

I can sort of see yr point, but these are not issues that have troubled me
personally.  I tend to look at TC from the point of view of I'm just
pleased that someone else wrote TC for me for free and it works v well at
what it is designed for.  Every product has limitations, and can't cover
every feature that we would all like, and I find it amazing that TC has so
few limitations given that it is produced on the backs of volunteer
contributions.  I'd rather have one TC that 2 IIS's ;)

If you're serious about pursuing a solution for this, Maybe there's an
alternative, how about this. (It's not pretty but saves some of the
reinvention that you describe).

Let's say it's an acceptable limitatio to create all your new JSPs to a
separate webapp folder.  This webapp only has a single servlet initially,
which is a type of Invoker that you write yourself, eg
/dynamicWebApp/JspInvoker, which could be mapped to serve all request URIs
of the form /dynamicWebApp/*.jsp

Now, when /dynamicWebApp/dnynamicFile.jsp is invoked, the JspInvoker looks
to see if a JSP called dynamicFile.jsp exists under that special folder.  If
it does, then your code translates/compiles/instantiates it (if not done
already) and the request is forwarded to it's doPost method.

I'm not saying this is easy, but it could be done.  You'd be reinventing the
classloading and service methods rather than all the other stuff.  You might
be forced to use SingleSignOn depending on your app, which could be a
negative.  Perhaps my answer is worse than yours ;)

If its any consolation, one of the annoyances I have encountered in the last
few months is that I have a particular webapp feature that I can't code well
because Java does not provide multiple inheritance.  I've done it, but the
code is ugly.  I've tried 99 ways of doing it different but don't have a
better one.  However, I realise that full multiple inheritance was
deliberately excluded from Java for specific reasons, so I have to decide
whether to stop using Java or accept it as good at what it is designed for.
And that's an easy choice to make :)

 -Original Message-
 From: Will Hartung [mailto:[EMAIL PROTECTED] 
 Sent: Friday 27 May 2005 20:38
 To: Tomcat Users List
 Subject: Re: Adding content/JSPs on the fly
 
 
  From: Steve Kirk [EMAIL PROTECTED]
  Sent: Friday, May 27, 2005 11:44 AM
 
  It sounds reasonable, but probably isn't tested or by design, so
 probably
  best to just have a go.  Re portability, the best advice I 
 can offer is an
  old chestnut: read the servlet spec.  This is particularly 
 relevant in
 this
  case.  The spec is generally pretty good at telling you you pretty
  accurately if (a) what you want to do should/must be 
 supported or (b) what
  you want do do is forbidden.  Of course there are some 
 areas that it does
  not have a view either way on, but I find it to be an invaluable
 document -
  I have it on shortcut from my taskbar and consult it often. 
  It's at least
  as useful as the javadocs or TC docs.
 
  For those of you that don't know where to find it, it's here, under
  specifications.
  http://java.sun.com/products/servlet/reference/api/index.html
 
  Choose the servlet spec version appropriate to your TC version as
 described
  in the table on the tomcat home page:
  http://jakarta.apache.org/tomcat/index.html
 
 I'm reasonably familiar with the specification. One of the 
 notable bits
 about it is simply the fact that within the spec, you're 
 pretty much not
 guaranteed writeable access to the file system at all (save 
 for a temporary
 area, and it's simply that -- temporary). But the reality is that most
 engines give you access to the disk that way.
 
  Just one more specific point on your note Will - I would 
 have thought if
  anything that you want it to be a precondition that the 
 webapp NOT be
  deployed as a war.  I've a feeling that if TC explodes the 
 war, then it
  might not check the exploded FS for changes.  Don't take 
 this as gospel
  though, this is a hazy half-remembered bit of info.
 
 As far as I know, the Servlet spec doesn't have a deployment 
 method outside
 of a WAR. It's pretty much a container behavior to actually 
 explode the WAR
 on to the file system, yet, most obviously do for performance reasons.
 
 But it does bring up a basic problem, for example, if by some 
 fluke the app
 is redeployed, all of that new data is blasted away by the 
 WAR..that would
 be Bad.
 
 But I can't see another (easy) way to create JSPs on the fly, 
 or in fact to
 create any other content that can be served directly the server.
 
 It's an annoying nit of the spec, to me, that it doesn't expose this
 behavior to the developer. For example, unlike EJBs (which 
 has a specified
 limitation on accessing the disk), the Servlet spec does 
 allow you to access
 the disk, though perhaps not within the WAR hierarchy. But, 
 there is no way
 to, say, forward to a static resource that the server can

RE: Showing Tomcat Icon rather than DOS icon

2005-05-26 Thread Steve Kirk
Right click, choose properties, click change icon, browse to tc dir, choose
tomcat.exe.

 -Original Message-
 From: Dakota Jack [mailto:[EMAIL PROTECTED] 
 Sent: Thursday 26 May 2005 08:47
 To: Tomcat Users List
 Subject: Showing Tomcat Icon rather than DOS icon
 
 
 How can I write my Tomcat startup script to show the Tomcat icon on a
 PC bar rather than the DOS icon?  Thanks
 
 -- 
 You can lead a horse to water but you cannot make it float 
 on its back.
 ~Dakota Jack~
 
 -
 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: Force Non-SSL

2005-05-26 Thread Steve Kirk

Not dreaming for a second of contradicting Tim ;) but wouldn't this work? 

Switch on SingleSignOn. Install two hosts on the same engine.  First host
has non-ssl connector only, second has ssl only. Install main webapp on
non-ssl host, without the login code.  Install just the login code on a
simplified webapp on the other host, and add a simple invoker servlet (or
similar) to redirect all other requests to urls on the main host.

It's not exactly trivial or elegant, and having to switch on SingleSignOn
might be a problem in some apps, but could it work?

I have been advised by a trusted friend experienced in these matters that
these sorts of config are better tackled by fronting your site with apache,
and using mod_rewrite to enforce the ssl vs no-ssl requirements.

 -Original Message-
 From: August Detlefsen [mailto:[EMAIL PROTECTED] 
 Sent: Thursday 26 May 2005 01:43
 To: Tomcat Users List
 Subject: Re: Force Non-SSL
 
 
 Is there no way to do it? SSL creates a lot of overhead for a 
 site that
 is serving up 100MB image files. 
 
 
 
 
 --- Tim Funk [EMAIL PROTECTED] wrote:
  no
  
  -Tim
  
  August Detlefsen wrote:
   In my webapp I force clients to use SSL encryption for logins with
  a
   security constraint and transport-guarantee elements like this: 
   
   security-constraint
 web-resource-collection
   web-resource-nameLogin/web-resource-name
   url-pattern/login/*/url-pattern
 /web-resource-collection
   
 user-data-constraint
   transport-guaranteeCONFIDENTIAL/transport-guarantee
 /user-data-constraint
   /security-constraint
   
   However, once a user hits the login page, every subsequent page
  also
   uses https. Is there a way to force them back to regular http once
  they
   leave the login section? 
  
  
  
 -
  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: Tomcat/Personal Web Server Problem

2005-05-26 Thread Steve Kirk

Looks like TC cannot start.  If you have fresh installed it, then hazarding
a guess, I'd say it might be because the port might be in use.  You can't
have 2 servers on the same port. Did you have them configured to run on the
same port (8080)?

One thing to check is to open a dos window then type netstat -a, this will
list all ports in use on your machine.  Give it a while to run, this can
sometimes take up to a minute depending on what's running on your machine.
If 8080 is listed there and tomcat is not started, you know that the old
config of PWS still has the port.  You need to take further steps to
uninstall it.

Or, change the port that either TC or PWS runs on.  Then you can run both at
once if you like.

 -Original Message-
 From: Robin Rembish [mailto:[EMAIL PROTECTED] 
 Sent: Wednesday 25 May 2005 23:03
 To: tomcat-user@jakarta.apache.org
 Subject: Tomcat/Personal Web Server Problem
 
 
 I had both Tomcat 4.1 and Microsoft Personal Web Server 
 installed on my laptop ( an IBM Thinkpad - Windows NT 
 operating system). It had been several months since I used Tomcat. 
 
 When I started the Tomcat server and typed in localhost:8080 
 in the Internet Explorer address window, it brought me to 
 Personal Web Server rather than bringing up the Tomcat page.
 
 I then decided to uninstall both Personal Web Server and the 
 Java Web Services Developers Pack. But after reinstalling the 
 latter, I am getting a page not found condition. (Details are below).
 
 On the advice of someone at a technical forum, I started 
 Tomcat (Start/Programs/Java Web Services Developer Pack 
 1.1/Start Tomcat)
 
 and then checked 
 
 Start/Programs/Administrative Tools/Windows NT Diagnostics/Services
 
 It had:
 
 JavaWebServer Stopped
 
 although the services log file (and all other log files) 
 under jwsdp-1_1 indicated Tomcat was running
 
 If anyone can help, I'd really appreciate it.
 
 Robin
 
 Type in Address Window:
 http://localhost:8080
 
 Error message:
 
 Page cannot be displayed
 The page you are looking for is currently unavailable
 
 
 In Internet Explorer
 Above Address Window:
 res://C:\WINNT\System32\shdoclc.dll/dnserror.htm#http://localh
 ost:8080/
 
 
 
 
 
 



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



RE: Are we required to move to Tomcat 5.5 in order to move to JDK 1.5

2005-05-26 Thread Steve Kirk

 The main problem which could arise is if tomcat 5.0.x uses a 
 java class or 
 method which disappeared on jvm1.5

This would be doc'd in 1.5 release notes, didn't notice anything relevant
when I upgraded: 
http://java.sun.com/j2se/1.5.0/compatibility.html 

Also, why would the TC team release a compatibility package for 5.5 on 1.4
if they thought it wouldn't run anyway?

As delbd says, give it a try.



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



RE: [OT] RE: DNS Request distribution and TCP NAT distribution For Tomcat Cluster

2005-05-26 Thread Steve Kirk

Thanks Peter, interesting.  Your experience of it sounds similar to other
experiences I've had when changing from one ISP to another (there seems to
be a cutover time of up to 3 days where some 3rd party ISPs clearly still
cached and served the old IP for our domain name).  It was because of this
that I investigated more at the time, but as you say, it's each ISP to their
own practice.

  I would expect any DNS server run by an ISP
  (such as AOL) to receive the zone records from SOA intact, 
  i.e. these
  major dns servers should know about all rr Ips for a given 
  dns name, and
  would therefore be able to RR distribute them to lower-tier 
  DNS servers.
 
 Your expectation is incorrect, I think - even the large DNS 
 servers make
 standard requests for A records for the given FQDN, and cache the
 result.  

Yes you're probably right there now I think about it.  I think these are
referred to as caching servers as opposed to secondary.  It's the
secondaries that receive the zone transfers.

Having said that, I'd have thought that a large ISP such as AOL would have
secondaries, (inaccesible by joe public), but would also have caching
servers, which are the ones they make public.  Since they typically have
several caching DNS servers, in theory there is a good chance that each of
them will get a different one of the RR Ips from their secondary server, so
in theory the RR goal is often achieved?  For example I just used DOS
nslookup to query my ISPs 2 main dns servers for www.microsoft.com - they
each returned a different address, although repeatedly querying each one
returns the same answer every time.  If I go through a local caching DNS on
my LAN, that returns a third address for MS - again, the same one every
time.

 If the result contains a set of IP addresses in a particular
 order, then that's what is obtained.  To my knowledge (my reasoning
 falls down if this is not the case, so this is the bit to check!)
 neither the returned A records themselves nor the returned SOA record
 contain any indication that they should be handed out in a round-robin
 fashion; and the SOA record would not typically be requested 
 by another
 server.

AFAIK that is correct, the DNS protocol does not say anything about how DNS
servers should respond to clients when there are multiple Ips registered in
DNS for a host.  Likewise if the DNS server only returns one IP all the
time, the client protocol provides no way for the client to say give me the
next one or give me number 3 or give me them all.  So some caching DNS
servers will always return the first one in the list, others will order Ips
according to their own rule (which meets the spec) but then always serve the
first one in that order.  And others will cycle through them in turn (which
is RR).  Basically, it's internal feature of the DNS server to decide how
it treats hostnames for which is has more than one IP.  

Of these 3 basic approaches, the first gives no RR, the second is slightly
better, the 3rd is the best.  Of course they are all only rudimentary load
balancing methods, and of course even the 3rd falls down if ISPs with
millions of users happen to cache a single IP for a site, as you say. 

Someone please correct me if any of this is wrong, as I'd like to understand
this area better :)

PS this has rekindled my interest so I just googled to refresh my mind on
the basics, this seems a useful page that explains what we are talking about
above.
http://www.onjava.com/pub/a/onjava/2001/09/26/load.html 



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



RE: Are we required to move to Tomcat 5.5 in order to move to JDK 1.5

2005-05-26 Thread Steve Kirk
You can run 5.0.28 on jdk1.5 but you need to add a compatibility package
which is available from the tc downloads page.  Basically it adds 3 jars to
fix issues with xml compatibility with the 1.4 vm.

I haven't done it myself (I upgraded both at once) but google some of these
words and you can read all about it.

PS if you do go to 5.5 and have DBCP, be sure to change your context.xml to
the new format required by TC5.5.  I spent nearly 3 days working that out.

 -Original Message-
 From: Raverkar, Sachin (Sachin) [mailto:[EMAIL PROTECTED] 
 Sent: Thursday 26 May 2005 08:58
 To: tomcat-user@jakarta.apache.org
 Subject: Are we required to move to Tomcat 5.5 in order to 
 move to JDK 1.5
 
 
 Hi all, 
  
 We are currently using Tomcat-5.0.28 and JDK 1.4.2_03.
 We need to move onto JDK 1.5. We would build our war file 
 using JDK 1.5.
 Can we continue to use Tomcat-5.0.28 with  JDK 1.5? 
 Do you see any problem? Are there any known issues?
 Since Tomcat 5.5 is designed to run on J2SE 5.0 [JDK 1.5] and later,
 are we required to move to Tomcat 5.5 in order to move to JDK 1.5?
  
 - Sachin
 



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



RE: JPDA and Tomcat 5.5.9 Service on Windows

2005-05-26 Thread Steve Kirk

I've been running tomcat on windows for 5 years, as a service for 2 years,
and I didn't know that screen existed !!  What a revelation.  :)

 -Original Message-
 From: Philippe Johan [mailto:[EMAIL PROTECTED] 
 Sent: Thursday 26 May 2005 08:09
 To: tomcat-user@jakarta.apache.org
 Cc: cam r
 Subject: RE: JPDA and Tomcat 5.5.9 Service on Windows
 
 
 Hi cam,
 
 When running tomcat as a windows service, there is also a 
 configuration
 screen.  If you do not yet have the small icon in the 
 notification area,
 you can use the Configure Tomcat option from the Start menu (or
 tomcat5w.exe //ES//Tomcat5).
 In this screen you can add the parameters on the Java tab 
 (see attached
 image)
 
 Regards,
 
 Johan
 
 -Original Message-
 From: cam r [mailto:[EMAIL PROTECTED] 
 Sent: dinsdag 24 mei 2005 16:04
 To: Tomcat Users List
 Subject: JPDA and Tomcat 5.5.9 Service on Windows
 
 Hi all,
 
   I am trying to set up debugging on Tomcat while it is running as a
 Windows service. The requirements of the project negate me from being
 able to run it as a script.
 
   I have tried adding;
 
-Xdebug 
 -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=y
 
   to the Java Options in the Java tab of the Apache Tomcat Properties
 gui screen. I have also added;
 
jpda start
 
   to the Arguments in the Startup tab of the Apache Tomcat Proeprties
 gui screen. But have had no luck getting Tomcat to run.
 
  I have also tried setting the arguments for Tomcat through
 environment variablesin;
 
My Computer  Properties  Environment Variables  System Variables
  CATALINA_OPTS
 
  but this has not worked either.
 
  Has anyone set up debugging for Tomcat 5.5.9 while it is running as a
 service? Any tips would be most welcome.
 
 
 cam
 
 
 



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



RE: Are we required to move to Tomcat 5.5 in order to move to JDK 1.5

2005-05-26 Thread Steve Kirk

I was not looking forward to reconfiguring logging, as it'd always been an
area that generated some confusion, but if anything logging is easier on 5.5
than 5.0 IMHO.

I had Loggers configured in 5.0, but these are redundant in 5.5, so I have
no logging config at all now - I just use the java.util.logging classes in
my servlet code (no changes at all since it ran on 5.0), and it works
perfectly for my needs without any config file at all.

 -Original Message-
 From: Tim Diggins [mailto:[EMAIL PROTECTED] 
 Sent: Thursday 26 May 2005 10:28
 To: Tomcat Users List
 Subject: Re: Are we required to move to Tomcat 5.5 in order 
 to move to JDK 1.5
 
 
 I'm not an expert, but I believe (from experience  previous 
 googling) 
 that tomcat 5.0.x will respond with an exception 
 (IncorrectClassFileFormat or something) when it encounters 
 class files 
 compiled with jdk1.5, and that thus yes you need 5.5.
 
 There are some recent threads about migrating from 5.0 to 5.5, in 
 particular I recall discussion of change of default logging library.
 
 -- Tim
 
 Raverkar, Sachin (Sachin) wrote:
  Hi all, 
   
  We are currently using Tomcat-5.0.28 and JDK 1.4.2_03.
  We need to move onto JDK 1.5. We would build our war file 
 using JDK 1.5.
  Can we continue to use Tomcat-5.0.28 with  JDK 1.5? 
  Do you see any problem? Are there any known issues?
  Since Tomcat 5.5 is designed to run on J2SE 5.0 [JDK 1.5] and later,
  are we required to move to Tomcat 5.5 in order to move to JDK 1.5?
   
  - Sachin
  
 
 
 -
 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: Are we required to move to Tomcat 5.5 in order to move to JDK 1.5

2005-05-26 Thread Steve Kirk
Yes sorry, david is correct, I got it backwards.

 -Original Message-
 From: David Smith [mailto:[EMAIL PROTECTED] 
 Sent: Thursday 26 May 2005 12:59
 To: Tomcat Users List
 Subject: Re: Are we required to move to Tomcat 5.5 in order 
 to move to JDK 1.5
 
 
 Small correction -- 5.5 needs the compat package to work on 
 jdk l.4, not 
 5.0 needs it to work on jdk 1.5. I've used TC 5.0  jdk 1.5 
 together no 
 problem.
 
  --David
 
 Steve Kirk wrote:
 
 You can run 5.0.28 on jdk1.5 but you need to add a 
 compatibility package
 which is available from the tc downloads page.  Basically it 
 adds 3 jars to
 fix issues with xml compatibility with the 1.4 vm.
 
 I haven't done it myself (I upgraded both at once) but 
 google some of these
 words and you can read all about it.
 
 PS if you do go to 5.5 and have DBCP, be sure to change your 
 context.xml to
 the new format required by TC5.5.  I spent nearly 3 days 
 working that out.
 
   
 
 -Original Message-
 From: Raverkar, Sachin (Sachin) [mailto:[EMAIL PROTECTED] 
 Sent: Thursday 26 May 2005 08:58
 To: tomcat-user@jakarta.apache.org
 Subject: Are we required to move to Tomcat 5.5 in order to 
 move to JDK 1.5
 
 
 Hi all, 
  
 We are currently using Tomcat-5.0.28 and JDK 1.4.2_03.
 We need to move onto JDK 1.5. We would build our war file 
 using JDK 1.5.
 Can we continue to use Tomcat-5.0.28 with  JDK 1.5? 
 Do you see any problem? Are there any known issues?
 Since Tomcat 5.5 is designed to run on J2SE 5.0 [JDK 1.5] and later,
 are we required to move to Tomcat 5.5 in order to move to JDK 1.5?
  
 - Sachin
 
 
 
 
 
 
 -
 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: [OT] RE: DNS Request distribution and TCP NAT distribution For Tomcat Cluster

2005-05-26 Thread Steve Kirk

 Yup.  So anyone using your ISP's DNS servers will get one of 
 two IPs for
 www.microsoft.com at present, out of the however many they 
 have.  Lumpy
 load balancing in action :-).

Yes true, hadn't thought of it like that.  Where a site has more Ips for a
host than an ISP has DNS servers, this is going to lead to lumpiness.

I guess this is one of the key reasons why RR DNS is only ever a poor man's
load balancer.  OK-ish if you have 2 Ips, gets worse if you have more.

 You likely haven't set up your own caching DNS to forward requests to
 your ISP's DNS servers; otherwise you'd have had one of the same
 answers.

Funnily enough I have, and I use Demon too.  I think my local DNS has maybe
kept an MS entry cached and it's refresh TTL is out of sync with the demon
DNS caches.  But what you say is right - if I restart that local DNS, it
will then get a fresh MS entry from one of the 2 cached at the Demon
servers.  In fact I just have, and it did.

Thanks again, that's clarified a few things I was a bit fuzzy on.

Sorry John for the slight off-topic diversion but I hope this diversion on
RR DNS might have been of interest to you too.



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



RE: Context Class with Tomcat 5.5.7

2005-05-26 Thread Steve Kirk

You might not need code/docs to do that, you might be OK just reading the
JNDI how-to:
http://jakarta.apache.org/tomcat/tomcat-5.5-doc/jndi-resources-howto.html 

See also this page. 
http://jakarta.apache.org/tomcat/tomcat-5.5-doc/config/context.html 

If you do need the docs, you could maybe use the docs for
javax.servlet.ServletContext which is the interface that
org.apache.tomcat.core.Context implements.  Docs here: 
http://java.sun.com/products/servlet/2.2/javadoc/javax/servlet/ServletContex
t.html 

 -Original Message-
 From: [EMAIL PROTECTED] 
 [mailto:[EMAIL PROTECTED] 
 Sent: Thursday 26 May 2005 13:41
 To: tomcat-user@jakarta.apache.org
 Subject: Context Class with Tomcat 5.5.7
 
 
 I'm developping on Tomcat 5.5.7 and I want to use the 
 Environment Entries with my servers.
 
  
 
 To access those entries, it seems like I need to use the 
 Context class located in the package org.apache.tomcat.core.Context.
 
  
 
 I cannot find this package or the source code for this class. 
 Is there :
 
  
 
 1.Another way to access the entrie's value; 
 2.A precompiled package available; 
 3.Source code available; 
 
  
 
 Thanks !
 
  
 
 Luc Boudreau
 
 Université du Québec
 
 Canada
 
  
 
 



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



Logging to two logfiles by classes instantiated by init

2005-05-26 Thread Steve Kirk

I have always used 2 ways of logging.  Mainly I use java.util.logging
classes, including a custom Formatter that I wrote myself.  I do not use
log4j.  When my webapp first starts, the init() method of my own custom
Invoker servlet loads the config for my main logging code is loaded from
web.xml using getInitParameter(), so if for any reason that config is bad,
or some other exception happens during init(), I use the bogstandard
javax.servlet.GenericServlet#log() method to log any problems to TC's own
loggers.  All of this works fine.

Once initialised, my main logging code works by providing a static method
that any servlet in the webapp inherits.

Now, here is the weird thing.  When Invoker.writeToLog is called by a class
that was instantiated during Invoker#init(), it writes the log message to
both its own logfile and the TC stdout log.  These two files have quite
different formatters, and the message appears in the appropriate format in
each file.  When double-logging happens, the TC log clearly shows that
Invoker.writeToLog was the calling method, so it's not just that my code is
calling both methods.  Servlets and classes loaded/instantiated later log
correctly to my main log only.

Can anyone suggest what might be causing this please?  More details on setup
below.

I have been running TC5.0.x on JDK1.4.x for about a year, and previous
versions before that.  I just upgraded to TC5.5.9/jdk1.5.0_02.  Have made
the config changes required and it all works swimmingly.  Only one problem
persists, a small logging issue, which in fact was there before, but I
ignored it.  Basically some of my log statements get written to two files at
the same time.

However, given that logging has moved on a bit in 5.5, this is a chance to
clean things up, so I have decided to take a look at it.  I have removed the
Logger that used to be in conf/server.xml in TC5.0.  I therefore have the
bogstandard logging that ships in a standard 5.5 TC install.  (I do have a
FastCommonAccessLogValve and a RequestDumperValve configured but I'm
assuming that those are separate issues).



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



RE: Tomcat/Personal Web Server Problem

2005-05-26 Thread Steve Kirk
Well based on your netstat output below, this proves that something is
listening on 8080 and 8081.  It doesn't indicate what is (not sure if there
is a way to find out).

If you are accessing http://localhost:8080 and still getting PWS, then it is
still starting on 8080, before TC is, so TC is probably failing to start.
If TC cannot start for this reasons, it will say so in its logs - look at
any files under the logs directory under your tomcat install directory.
Read carefully for any error logged.

I realise that you have repeated that PWS is uninstalled, but you do also
say that you can still access it at 8080.  Perhaps it would help if you said
why you think you are accessing PWS not TC.  Do they serve completely
different pages?  If they serve the same pages is it possible that you just
think you are seeing PWS?

PS I should point out that I have not run JWS myself so am best-guessing
based on TC experience.

 -Original Message-
 From: Robin Rembish [mailto:[EMAIL PROTECTED] 
 Sent: Thursday 26 May 2005 12:59
 To: Tomcat Users List
 Subject: Re: Tomcat/Personal Web Server Problem
 
 
 Steve,
 
 Thanks for responding.  The results of netstat -a include the 
 following:
 
 Active Connections
 
   Proto  Local Address  Foreign AddressState
   TCP4e317:8080 0.0.0.0:0  LISTENING
   TCP4e317:8081 0.0.0.0:0  LISTENING
 
 According to the jwsdp launcher server log, Tomcat is using 
 ports 8080 and
 8081.
 How would I change the port that Personal Web Server runs on? 
  Please keep
 in mind that PWS was uninstalled.  However, when this problem 
 is resolved, I
 want to re-install it.  So what is the best plan of attack 
 and how do I
 accomplish it?
 
 Clearly, I know nothing about technical support.  So I need a 
 step-by-step
 process.
 
 Thanks,
 
 Robin
 
 
 
 - Original Message -
 From: Steve Kirk [EMAIL PROTECTED]
 To: 'Tomcat Users List' tomcat-user@jakarta.apache.org
 Sent: Thursday, May 26, 2005 5:06 AM
 Subject: RE: Tomcat/Personal Web Server Problem
 
 
 
 Looks like TC cannot start.  If you have fresh installed it, 
 then hazarding
 a guess, I'd say it might be because the port might be in 
 use.  You can't
 have 2 servers on the same port. Did you have them configured 
 to run on the
 same port (8080)?
 
 One thing to check is to open a dos window then type netstat 
 -a, this will
 list all ports in use on your machine.  Give it a while to 
 run, this can
 sometimes take up to a minute depending on what's running on 
 your machine.
 If 8080 is listed there and tomcat is not started, you know 
 that the old
 config of PWS still has the port.  You need to take further steps to
 uninstall it.
 
 Or, change the port that either TC or PWS runs on.  Then you 
 can run both at
 once if you like.
 
  -Original Message-
  From: Robin Rembish [mailto:[EMAIL PROTECTED]
  Sent: Wednesday 25 May 2005 23:03
  To: tomcat-user@jakarta.apache.org
  Subject: Tomcat/Personal Web Server Problem
 
 
  I had both Tomcat 4.1 and Microsoft Personal Web Server
  installed on my laptop ( an IBM Thinkpad - Windows NT
  operating system). It had been several months since I used Tomcat.
 
  When I started the Tomcat server and typed in localhost:8080
  in the Internet Explorer address window, it brought me to
  Personal Web Server rather than bringing up the Tomcat page.
 
  I then decided to uninstall both Personal Web Server and the
  Java Web Services Developers Pack. But after reinstalling the
  latter, I am getting a page not found condition. (Details 
 are below).
 
  On the advice of someone at a technical forum, I started
  Tomcat (Start/Programs/Java Web Services Developer Pack
  1.1/Start Tomcat)
 
  and then checked
 
  Start/Programs/Administrative Tools/Windows NT Diagnostics/Services
 
  It had:
 
  JavaWebServer Stopped
 
  although the services log file (and all other log files)
  under jwsdp-1_1 indicated Tomcat was running
 
  If anyone can help, I'd really appreciate it.
 
  Robin
  
  Type in Address Window:
  http://localhost:8080
 
  Error message:
 
  Page cannot be displayed
  The page you are looking for is currently unavailable
 
 
  In Internet Explorer
  Above Address Window:
  res://C:\WINNT\System32\shdoclc.dll/dnserror.htm#http://localh
  ost:8080/
 
 
 
 
 
 
 
 
 
 -
 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: Showing Tomcat Icon rather than DOS icon

2005-05-26 Thread Steve Kirk
Jack, You accidentally replied direct to me rather than to the list.  It's
best to reply to the list so that everyone gets to see the answer.  I'm
replying to you via the list now.

If you mean by the run bar/pc bar the bar at the top of the window that
TC runs in, then I think what you are trying to do is what used to be done
via a PIF file.  These no longer exist in more recent versions of windows
AFAIK.  Sorry, not sure how to do it.

 -Original Message-
 From: Dakota Jack [mailto:[EMAIL PROTECTED] 
 Sent: Thursday 26 May 2005 13:43
 To: Steve Kirk
 Subject: Re: Showing Tomcat Icon rather than DOS icon
 
 
 I perhaps should say that I have the Tomcat icon on the Start menu
 with no difficulties.  The problem is the run bar.  Thanks, again.
 
 On 5/26/05, Dakota Jack [EMAIL PROTECTED] wrote:
  That works if you are talking about changing the icon for a 
 file.  How
  does that work here.  What file are you talking about right clicking
  on?  Right clicking on the bar on the window won't do this.  Thanks
  for helping.
  
  On 5/26/05, Steve Kirk [EMAIL PROTECTED] wrote:
   Right click, choose properties, click change icon, browse 
 to tc dir, choose
   tomcat.exe.
  
-Original Message-
From: Dakota Jack [mailto:[EMAIL PROTECTED]
Sent: Thursday 26 May 2005 08:47
To: Tomcat Users List
Subject: Showing Tomcat Icon rather than DOS icon
   
   
How can I write my Tomcat startup script to show the 
 Tomcat icon on a
PC bar rather than the DOS icon?  Thanks
   
--
You can lead a horse to water but you cannot make it float
on its back.
~Dakota Jack~
   

 -
To unsubscribe, e-mail: 
 [EMAIL PROTECTED]
For additional commands, e-mail: 
 [EMAIL PROTECTED]
   
   
  
  
  
  
  
  --
  You can lead a horse to water but you cannot make it float 
 on its back.
  ~Dakota Jack~
  
 
 
 -- 
 You can lead a horse to water but you cannot make it float 
 on its back.
 ~Dakota Jack~
 



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



RE: Tomcat/Personal Web Server Problem

2005-05-26 Thread Steve Kirk
Sorry, my mistake - you said that clearly the first time but I misread it.
I'm struggling to make any further suggestions I'm afraid.

You could try the bood old fashioned reboot.  Is the problem persists,
verify that 8080/8081 are still in LISTENING state.

Then maybe can you install TC on another port (by stopping it, changing it's
config settings, reboot the PC so that you are sure you've cleared any
network ports, then restating it).  Again repeat the netstat -a command to
see if that new port is open and there is nothing on 8080/8081.  This at
least gives you the clue that TC is starting and running on the ports that
you think it is.

What version OS are you on?

 -Original Message-
 From: Robin Rembish [mailto:[EMAIL PROTECTED] 
 Sent: Thursday 26 May 2005 15:21
 To: Tomcat Users List
 Subject: Re: Tomcat/Personal Web Server Problem
 
 
 Steve,
 
 After uninstalling Personal Web Server, I was not getting PWS 
 when typing
 http://localhost:8080 in the address window of Internet Explorer.
 
 I got the following error message:
 
 Page cannot be displayed
 The page you are looking for is currently unavailable
 
 Above Address Window:
 res://C:\WINNT\System32\shdoclc.dll/dnserror.htm#http://localh
 ost:8080/
 
 I checked the jwsdp-1_1 logs and didn't find any errors.  The 
 output from
 the launcher server log is below.
 
 Robin
 
 Launcher.server.log
 
 [INFO] Registry - -Loading registry information
 [INFO] Registry - -Creating new Registry instance
 [INFO] Registry - -Creating MBeanServer
 [INFO] Http11Protocol - -Attribute port: 8081
 [INFO] Http11Protocol - -Attribute maxThreads: 75
 [INFO] Http11Protocol - -Attribute backlog: 10
 [INFO] Http11Protocol - -Attribute tcpNoDelay: true
 [INFO] Http11Protocol - -Attribute soTimeout: 6
 [INFO] Http11Protocol - -Attribute timeout: 6
 [INFO] Http11Protocol - -Attribute secure: false
 [INFO] Http11Protocol - -Initializing Coyote HTTP/1.1 
 protocol handler on
 port 8081
 [INFO] Http11Protocol - -Attribute port: 8080
 [INFO] Http11Protocol - -Attribute maxThreads: 75
 [INFO] Http11Protocol - -Attribute backlog: 10
 [INFO] Http11Protocol - -Attribute tcpNoDelay: true
 [INFO] Http11Protocol - -Attribute soTimeout: 6
 [INFO] Http11Protocol - -Attribute timeout: 6
 [INFO] Http11Protocol - -Attribute secure: false
 [INFO] Http11Protocol - -Initializing Coyote HTTP/1.1 
 protocol handler on
 port 8080
 Starting service Internal Services
 Java Web Services Developer Pack/1.1-fcs
 [INFO] Http11Protocol - -Starting Coyote HTTP/1.1 protocol 
 handler on port
 8081
 Starting service Java Web Services Developer Pack
 Java Web Services Developer Pack/1.1-fcs
 [INFO] Http11Protocol - -Starting Coyote HTTP/1.1 protocol 
 handler on port
 8080
 
 
 - Original Message -
 From: Steve Kirk [EMAIL PROTECTED]
 To: 'Tomcat Users List' tomcat-user@jakarta.apache.org
 Sent: Thursday, May 26, 2005 9:17 AM
 Subject: RE: Tomcat/Personal Web Server Problem
 
 
 Well based on your netstat output below, this proves that 
 something is
 listening on 8080 and 8081.  It doesn't indicate what is (not 
 sure if there
 is a way to find out).
 
 If you are accessing http://localhost:8080 and still getting 
 PWS, then it is
 still starting on 8080, before TC is, so TC is probably 
 failing to start.
 If TC cannot start for this reasons, it will say so in its 
 logs - look at
 any files under the logs directory under your tomcat 
 install directory.
 Read carefully for any error logged.
 
 I realise that you have repeated that PWS is uninstalled, but 
 you do also
 say that you can still access it at 8080.  Perhaps it would 
 help if you said
 why you think you are accessing PWS not TC.  Do they serve completely
 different pages?  If they serve the same pages is it possible 
 that you just
 think you are seeing PWS?
 
 PS I should point out that I have not run JWS myself so am 
 best-guessing
 based on TC experience.
 
  -Original Message-
  From: Robin Rembish [mailto:[EMAIL PROTECTED]
  Sent: Thursday 26 May 2005 12:59
  To: Tomcat Users List
  Subject: Re: Tomcat/Personal Web Server Problem
 
 
  Steve,
 
  Thanks for responding.  The results of netstat -a include the
  following:
 
  Active Connections
 
Proto  Local Address  Foreign AddressState
TCP4e317:8080 0.0.0.0:0  LISTENING
TCP4e317:8081 0.0.0.0:0  LISTENING
 
  According to the jwsdp launcher server log, Tomcat is using
  ports 8080 and
  8081.
  How would I change the port that Personal Web Server runs on?
   Please keep
  in mind that PWS was uninstalled.  However, when this problem
  is resolved, I
  want to re-install it.  So what is the best plan of attack
  and how do I
  accomplish it?
 
  Clearly, I know nothing about technical support.  So I need a
  step-by-step
  process.
 
  Thanks,
 
  Robin
 
 
 
  - Original Message -
  From: Steve Kirk [EMAIL PROTECTED]
  To: 'Tomcat Users List' tomcat

RE: Implementing custom session expiration rule

2005-05-26 Thread Steve Kirk
You could implement a filter that checked the time since last visit, and if
the session had expired according to your custom rule, invalidate the
session and redirect to appropriate page such as login.  You'd have to make
sure that the default session time set in server.xml was longer than the
max session time you wanted in your custom method, otherwise the browser
would time out the session for you if based on cookies.

I haven't used Filters, but as far as I understand the principles, I don't
think a redirect from within the filter code would upset anything.  I think
you can break out of the filter chain like this without problems.

 -Original Message-
 From: Marc Vaillancourt [mailto:[EMAIL PROTECTED] 
 Sent: Thursday 26 May 2005 17:29
 To: tomcat-user@jakarta.apache.org
 Subject: Implementing custom session expiration rule
 
 
 I have a requirement to implement different session timeout values for
 different user roles. What would be the most straightforward way to
 accomplish this?
 
 -
 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: servlet request time out ?!

2005-05-26 Thread Steve Kirk

I haven't tested this myself, so I'm only going on what the docs say (5.5): 
http://jakarta.apache.org/tomcat/tomcat-5.5-doc/config/http.html 

If I've understood correctly, this doc seems to say that the
connectionTimeout param doesn't have the effect Angelov is looking for - it
sets the max time between a connection (socket) being opened by the client,
and the client sending a request url to TC.

 -Original Message-
 From: Mike Baliel [mailto:[EMAIL PROTECTED] 
 Sent: Thursday 26 May 2005 19:49
 To: Tomcat Users List
 Subject: Re: servlet request time out ?!
 
 
 Hi Angelov,
 
   I am new to Tomcat (Just started using Tomcat5.0 
 yesterday), but the 
 problem you mentioned sounds like a typical connnection timout.
 
 Have you tried to setting the connectionTimeout value to 0 in the 
 server.xml?
 
 Here is to location in server.xml.  Where there is currently 
 a value of 
 [connectionTimeout=2] change to [connectionTimeout=0].
 
 
 
   Service name=Catalina
 
  !-- A Connector represents an endpoint by which requests are 
 received
   and responses are returned.  Each Connector passes 
 requests on 
 to the
   associated Container (normally an Engine) for processing.
 
   By default, a non-SSL HTTP/1.1 Connector is established on 
 port 8080.
   You can also enable an SSL HTTP/1.1 Connector on 
 port 8443 by
   following the instructions below and uncommenting 
 the second 
 Connector
   entry.  SSL support requires the following steps 
 (see the SSL 
 Config
   HOWTO in the Tomcat 5 documentation bundle for more detailed
   instructions):
   * If your JDK version 1.3 or prior, download and 
 install JSSE 
 1.0.2 or
 later, and put the JAR files into 
 $JAVA_HOME/jre/lib/ext.
   * Execute:
   %JAVA_HOME%\bin\keytool -genkey -alias tomcat 
 -keyalg RSA 
 (Windows)
   $JAVA_HOME/bin/keytool -genkey -alias tomcat 
 -keyalg RSA 
 (Unix)
 with a password value of changeit for both the 
 certificate and
 the keystore itself.
 
   By default, DNS lookups are enabled when a web 
 application calls
   request.getRemoteHost().  This can have an adverse impact on
   performance, so you can disable it by setting the
   enableLookups attribute to false.  When DNS lookups are 
 disabled,
   request.getRemoteHost() will return the String 
 version of the
   IP address of the remote client.
  --
 
  !-- Define a non-SSL Coyote HTTP/1.1 Connector on the 
 port specified
   during installation  --
  Connector
 port=8080   maxThreads=150 minSpareThreads=25 
 maxSpareThreads=75
 enableLookups=false redirectPort=8443 
 acceptCount=100
 debug=0 connectionTimeout=2
 disableUploadTimeout=true /
  !-- Note : To disable connection timeouts, set 
 connectionTimeout value
   to 0 --
 
 
 Mike
 
 Angelov, Rossen wrote:
  Hi,
  Does anybody know about a time out on a servlet request 
 with Tomcat 5?
  
  The problem is that I have a request that takes about 30 
 minutes but the
  browser keeps waiting for the response forever. I tried 
 different browsers
  but it's the same behavior.
  
  I put debug statements in the doPost method and it's 
 finishing correctly.
  The last debug statement is printed out but the browser is 
 still waiting for
  the response.
  
  Ross
  
  This communication is intended solely for the addressee and is
  confidential and not for third party unauthorized distribution.
  
  
  
  
  
 --
 --
  
  No virus found in this incoming message.
  Checked by AVG Anti-Virus.
  Version: 7.0.322 / Virus Database: 266.11.17 - Release 
 Date: 5/25/2005
 
 
 -- 
 No virus found in this outgoing message.
 Checked by AVG Anti-Virus.
 Version: 7.0.322 / Virus Database: 266.11.17 - Release Date: 5/25/2005
 
 
 -
 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: servlet request time out ?!

2005-05-26 Thread Steve Kirk
Sorry Ross, got yr name wrong :)

Would be interested to know how to do it though, if you find out could you
please post, thanks.

 -Original Message-
 From: Angelov, Rossen [mailto:[EMAIL PROTECTED] 
 Sent: Thursday 26 May 2005 21:20
 To: 'Tomcat Users List'; [EMAIL PROTECTED]
 Subject: RE: servlet request time out ?!
 
 
 That's exactly how I understood it too. The request will be 
 dropped if after
 certain number of milliseconds the request's URI hasn't been received.
 
 In my case the URI comes directly with the request and based 
 on my log I can
 see the request is being processed but there is no response 
 after the doPost
 method is finished.
 
 I can still give it try with connectionTimeout=0, but don't 
 expect it to
 help.
 
 Ross
 
 -Original Message-
 From: Steve Kirk [mailto:[EMAIL PROTECTED]
 Sent: Thursday, May 26, 2005 3:09 PM
 To: 'Tomcat Users List'; [EMAIL PROTECTED]
 Subject: RE: servlet request time out ?!
 
 
 
 I haven't tested this myself, so I'm only going on what the 
 docs say (5.5): 
 http://jakarta.apache.org/tomcat/tomcat-5.5-doc/config/http.html 
 
 If I've understood correctly, this doc seems to say that the
 connectionTimeout param doesn't have the effect Angelov is 
 looking for - it
 sets the max time between a connection (socket) being opened 
 by the client,
 and the client sending a request url to TC.
 
  -Original Message-
  From: Mike Baliel [mailto:[EMAIL PROTECTED] 
  Sent: Thursday 26 May 2005 19:49
  To: Tomcat Users List
  Subject: Re: servlet request time out ?!
  
  
  Hi Angelov,
  
  I am new to Tomcat (Just started using Tomcat5.0 
  yesterday), but the 
  problem you mentioned sounds like a typical connnection timout.
  
  Have you tried to setting the connectionTimeout value to 0 in the 
  server.xml?
  
  Here is to location in server.xml.  Where there is currently 
  a value of 
  [connectionTimeout=2] change to [connectionTimeout=0].
  
  
  
Service name=Catalina
  
   !-- A Connector represents an endpoint by which 
 requests are 
  received
and responses are returned.  Each Connector passes 
  requests on 
  to the
associated Container (normally an Engine) for 
 processing.
  
By default, a non-SSL HTTP/1.1 Connector is 
 established on 
  port 8080.
You can also enable an SSL HTTP/1.1 Connector on 
  port 8443 by
following the instructions below and uncommenting 
  the second 
  Connector
entry.  SSL support requires the following steps 
  (see the SSL 
  Config
HOWTO in the Tomcat 5 documentation bundle for 
 more detailed
instructions):
* If your JDK version 1.3 or prior, download and 
  install JSSE 
  1.0.2 or
  later, and put the JAR files into 
  $JAVA_HOME/jre/lib/ext.
* Execute:
%JAVA_HOME%\bin\keytool -genkey -alias tomcat 
  -keyalg RSA 
  (Windows)
$JAVA_HOME/bin/keytool -genkey -alias tomcat 
  -keyalg RSA 
  (Unix)
  with a password value of changeit for both the 
  certificate and
  the keystore itself.
  
By default, DNS lookups are enabled when a web 
  application calls
request.getRemoteHost().  This can have an 
 adverse impact on
performance, so you can disable it by setting the
enableLookups attribute to false.  When DNS 
 lookups are 
  disabled,
request.getRemoteHost() will return the String 
  version of the
IP address of the remote client.
   --
  
   !-- Define a non-SSL Coyote HTTP/1.1 Connector on the 
  port specified
during installation  --
   Connector
  port=8080   maxThreads=150 minSpareThreads=25 
  maxSpareThreads=75
  enableLookups=false redirectPort=8443 
  acceptCount=100
  debug=0 connectionTimeout=2
  disableUploadTimeout=true /
   !-- Note : To disable connection timeouts, set 
  connectionTimeout value
to 0 --
  
  
  Mike
  
  Angelov, Rossen wrote:
   Hi,
   Does anybody know about a time out on a servlet request 
  with Tomcat 5?
   
   The problem is that I have a request that takes about 30 
  minutes but the
   browser keeps waiting for the response forever. I tried 
  different browsers
   but it's the same behavior.
   
   I put debug statements in the doPost method and it's 
  finishing correctly.
   The last debug statement is printed out but the browser is 
  still waiting for
   the response.
   
   Ross
   
   This communication is intended solely for the addressee and is
   confidential and not for third party unauthorized distribution.
   
   
   
   
   
  --
  --
   
   No virus found in this incoming message.
   Checked by AVG Anti-Virus.
   Version: 7.0.322 / Virus Database: 266.11.17 - Release 
  Date: 5/25/2005

RE: Mysterious failures

2005-05-25 Thread Steve Kirk
Sorry but I don't use apache-httpd so can't help you there, although would
comment that if you have mod_jk compilation warnings they sound worth
looking at.  My only experience of httpd with tc gave me the impression that
it was unreliable.  Although to be fair that was a few versions back, on
windoze.

Do you have a logger configured in tc at all?  For example on my 5.0.28 I
had this within the Engine.../Engine tag of in my webapp's context.xml

Logger className=org.apache.catalina.logger.FileLogger
timestamp=true/

See http://jakarta.apache.org/tomcat/tomcat-5.0-doc/config/logger.html for
more details for 5.0

Your alternative to Logger is to move to commons-logging and/or log4j,
which is what I am about to do myself.

 -Original Message-
 From: Grant Ingersoll [mailto:[EMAIL PROTECTED] 
 Sent: Wednesday 25 May 2005 02:29
 To: Tomcat Users List
 Subject: Re: Mysterious failures
 
 
 Thanks for the ideas.  I cranked my debugging up to 99.
 
 There are a couple of things that I see, but don't know if they are 
 serious:
 1. SEVERE: The scratchDir you specified: 
 /development/jakarta-tomcat-5.0.28/work/Catalina/localhost/admin is 
 unusable.
   -- I never set this, I am assuming it is the default
 
 2. WARNING: Duplicate name in Manifest: Class-Path
  -- I think this is due to some JAR in struts
 
 3. In the apache log I get warnings about compiling mod_jk 
 with EAPI on
 
 I am mapping through mod_jk, so the error I get is the Apache 
 Internal 
 Server Error.  The Tomcat process is dead, so there is no 
 tomcat error 
 page.
 
 I am using struts, I will am pretty sure I am returning everything to 
 the pool.  I have a top level servlet filter that logs all 
 exceptions, 
 including Throwable all to no avail.
 
 It seems to crash at random, but mostly b/c I am not always aware of 
 when it crashes.  Today, after rebooting, it didn't even 
 start up, but 
 then started fine when I called startup.sh
 
 -Grant
 
 On May 22, 2005, at 9:51 PM, Steve Kirk wrote:
 
 
  What is your actual logging config?
 
  Hazy memory, but don't you want debug=99 rather than debug=1 to get 
  more
  detail?
 
  If you really can't get logging to work, you could insert
  System.out.println(blah) statements at key points around 
 where you 
  think
  the crash might be caused, in lieu of your log statements.  
 Not pretty 
  but
  it can get you results.
 
  Some Qs to narrow it down a bit:
 
  Is the crash triggered by a single type of request, or 
 maybe a burst of
  traffic, or will it crash even with no requests?
 
  Is the crashing request direct to TC or via apache httpd?
 
  Is a TC html error page generated, what does it say?
 
  Do you start any of your own threads?
 
  Does your code always return pooled objects to the pool?
 
  Is there some app that people use to make sure the server 
 stays up by
  checking it every so often and restarting if needed?
 
  I've never come across that.  TC is pretty reliable, 
 shouldn't need it 
  IMHE.
 
  -Original Message-
  From: Grant Ingersoll [mailto:[EMAIL PROTECTED]
  Sent: Monday 23 May 2005 02:39
  To: tomcat-user@jakarta.apache.org
  Subject: Mysterious failures
 
 
  Hi,
 
  Have been a long time user of TC, but first time poster.
 
  I am running 5.0.28 on OS X with PostgreSQL and Struts and 
 connecting
  to Apache using mod_jk.  I have a webapp deployed that is pretty
  mature.  However, I am having some mysterious crashes of 
 Tomcat that I
  haven't been able to get my head around.  The whole 
 process is dying
  w/o so much as a peep.  Not one single log/exception is 
 being written
  anywhere (as far as I know) that gives even the most 
 remote clue as to
  why and I am at a loss for how to get at the problem.
 
  Here is what I have done to date:
  1. Put a catch (Throwable) with a log message at my top 
 level part of
  the servlet that logs the exception and then throws it out.
 
  2. I have turned on DEBUG level logging for every piece of
  the application
 
  3. I have set debug=1 everywhere I could in server.xml
 
  Anyone have any suggestions on what else to do for debugging this?
  Part of me feels that it might be JDBC related as I am not 
 using the
  Tomcat JNDI lookup methods for getting connections (but am 
 managing a
  pool myself).  Should I be using the JNDI lookup methods 
 for getting
  connections?  My only other guess was that it seems to 
 happen after it
  has been running for a little while and I thought it might have
  something to do with the session timeout stuff, but I can't see why
  that would cause the process to exit.
 
  Is there some app that people use to make sure the server 
 stays up by
  checking it every so often and restarting if needed?
 
  Thanks for any advice,
  Grant
 
  
 -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: 
 [EMAIL PROTECTED

RE: log files with servlets ?

2005-05-25 Thread Steve Kirk

For how to set up logging of your Java servlet code on 5.0.28, you need to
add a Logger to your conf/server.xml file, inserting it inside your
Host.../Host or Engine.../Engine tags will probably get you going.

To get apache-httpd type logging going, you need a Valve, again insert it
within your Engine or Host tags, looks a bit like this:

  Valve className=org.apache.catalina.valves.FastCommonAccessLogValve
directory=logs  prefix=access_log_ suffix=.log
pattern=common resolveHosts=false/

Do you have doPost method() implemented in your servlet class?  If you only
have doGet(), that is most likely your problem.

 -Original Message-
 From: Jean-Luc Douville [mailto:[EMAIL PROTECTED] 
 Sent: Wednesday 25 May 2005 09:53
 To: tomcat-user@jakarta.apache.org
 Subject: log files with servlets ?
 
 
 I am testing MIDlets connection to servlet. I am using Netbeans 4.1 
 with mobility pack,
 Tomcat bundled with NB (5.5.7) or external Tomcat (5.028). I 
 have added 
 an EchoServlet
 under TomcatServletExample (Servlet v 2.3). My EchoServlet 
 can respond 
 to POST and GET methods.
 It is OK when i send parameters from a browser with GET method.
 With POST method from a MIDlet, i cannot reach the servlet (the 
 HttpConnexion seems no
 connect ...)
 My first question : how can i find or trace log events which 
 relate to 
 that servlet or tomcat ?
 I want to trace the access of my MIDlet to tomcat and to the 
 servlet... 
 but i don't find any log file
 about, except the 
 TOMCAT_HOME/logs/TomcatServletExample.2005-05-xx.log  
 (which describes
 the starting of the servlet).
 Can i find or initiate any log file similar to the 
 .../httpd/access_log 
 of my apache web site ?
 Thanks.
 --
 
 Jean-Luc Douville
 
 
 -
 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: Problem with Tomcat 5.5.9

2005-05-25 Thread Steve Kirk

Have you moved your config files across?
 conf/web.xml
 conf/server.xml
 conf/tomcat-users.xml
 conf/[engineName]/[hostName]/contextName.xml

Do you have the welcome files configured in web.xml (either in conf/ or in
the webapp's WEB-INF folder) ?  What do they point to for /test/?  If a
servlet, are the servlet and its mapping both config'd in web.xml?  If a
JSP, is the jsp servlet and mapping config's in web.xml?

Put a Logger and Valve in your server.xml's Host tag and see if you
get any more clues from the extra logging.  Se my earlier posts today and
yesterday for details on those.

Hope this helps.

 -Original Message-
 From: Aleksandar Valchev [mailto:[EMAIL PROTECTED] 
 Sent: Wednesday 25 May 2005 13:19
 To: tomcat-user@jakarta.apache.org
 Subject: Problem with Tomcat 5.5.9
 
 
 Hi,
 please advise possible reason for:
 We have a java web application running under Tomcat 5.0.19 
 without problems.  
 After upgrade to Tomcat 5.5.9 we encountered the following:
   When requesting http://localhost:8080/test/;(where 
 test is our webapp 
 context) an empty page with the following content is returned:
 htmlbody/body/html
   All .jsp files are compiled correctly in the work 
 directory but the result is 
 always as written above.
   When testing with a .html file everything is OK. When 
 testing with a .jsp 
 file with no jsp code in it - blank page again.
   The Tomcat logs do not indicate any problems during 
 startup or loading of the 
 webapp. We tried to put something in the standard 
 output(System.out) but 
 nothing was written. It seems that the generated servlets are 
 created but not 
 executed at all.
 
 Thank you in advance,
 Alexander
 
 P.S.
 System parameters:
   OS - Slackware Linux, Windows XP
   Browser - Mozilla Firefox 1.0.4, Mozilla 1.7.6, IE 6.0
   JDK - 1.5.0
 
 -
 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 create user thread in tomcat

2005-05-25 Thread Steve Kirk

Write your thread class (myThreadClass) as implementing Runnable.  

Write a class that implements ServletContextListener and config it in
web.xml like this:

listener
listener-classmypackage.MyScListenerClass/listener-class
/listener

Now have your ServletContextListener start a new thread using your Runnable
class in its contextInitialized method, which is called when the app starts.

You might want to consider what happens if/when the run() method of your
myThreadClass returns.  Do you want to restart the thread again or not?  If
yes, you might need to put it in a while loop within run() - if this is of
the type while(true) until it throws an exception, make sure that you catch
the Exception gracefully, and also include code like this in the innermost
part of the loop so that it is well-behaved about sharing resources with
other threads on the machine:

   Thread.currentThread().sleep(1000 * delayMilliseconds);

You might also think about what needs to be done to gracefully exit from the
thread when TC shuts down.  This will influence whether you make the thread
daemon or not, and whether you need inter-thread communication so that your
main webapp can tell your non-daemon thread to exit gracefully ASAP.

Have used this approach before, and am about to use same approach again on
another project.  It works.  You *do* need to take care about being
threadsafe.  If you don't understand how to do that, then you need to read
up on it - it's beyond the scope of a single email.

You can find more detail on all the stuff above in the javadocs, or reply to
the list if you have any specific Qs and I'll try to pick it up.

 -Original Message-
 From: Terence Chan [mailto:[EMAIL PROTECTED] 
 Sent: Wednesday 25 May 2005 11:24
 To: 'Tomcat Users List'
 Subject: How to create user thread in tomcat
 
 
 Hi,
 
 Please help. I would like to create a thread or service that 
 start running
 once the web server is started. This thread need to 
 communicate with other
 applications using HTTP protocol.
 
 Terence  
 
 -- 
 Internal Virus Database is out-of-date.
 Checked by AVG Anti-Virus.
 Version: 7.0.308 / Virus Database: 266.11.8 - Release Date: 5/10/2005
  
 
 
 -
 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: Validation Frame work

2005-05-25 Thread Steve Kirk
What a good point, especially as IE becomes harder and harder to secure,
people are starting to turn off active content, which can include simple
innocent js code.  I'm a fan of the lowest common denominator approach to
using HTML and JS features.

 -Original Message-
 From: Bernhard Slominski [mailto:[EMAIL PROTECTED] 
 Sent: Wednesday 25 May 2005 13:35
 To: 'Tomcat Users List'
 Subject: AW: Validation Frame work
 
 
 I agree with Steve, but there is a much simpler possibility 
 that the JS
 validation does not work:
 The user can just switch it off in the browser.
 This might not be just to bypass validation, but maybe just 
 for security
 reasons, so for a business critical apllications I'd 
 discourage anyone from
 using it, if you have something like a guestbook, and the 
 validation fails
 and you end up with something like an entry without email 
 address, so what.
 
 Bernhard
 
  -Ursprüngliche Nachricht-
  Von: Steve Kirk [mailto:[EMAIL PROTECTED]
  Gesendet: Dienstag, 24. Mai 2005 20:02
  An: 'Tomcat Users List'
  Betreff: RE: Validation Frame work
  
  
  David is right, JS and serverside validation perform 
  different roles.  To
  expand on his comment a bit more, remember that the 
 requests that your
  webapp receives could be sent by any HTTP client, not 
 necessarily by a
  friendly web browser.  If someone were so inclined, they 
  could write their
  own HTTP client to interact with your webapp, that aimed to 
  deliberately
  submit bad data to your servlet, in which case your JS 
  validation would have
  been bypassed.  What they can't do is bypass your serverside 
  validation (or
  at least this is much harder).
  
  Just one trick that such nasty people might try is to insert 
  JS code in any
  form fields that you let them create or edit.  If this field 
  data is then
  displayed in other pages of your app, this might cause 
  anyone viewing that
  page on your site to download a trojan/virus/etc.  It's 
  really very easy to
  do.  And this is only one such exploit.  There are many others.
  
   -Original Message-
   From: David Smith [mailto:[EMAIL PROTECTED] 
   Sent: Tuesday 24 May 2005 16:19
   To: Tomcat Users List
   Subject: Re: Validation Frame work
   
   
   Because you should never trust the client. They may not be 
  submitting 
   from your form.  Javascript is just a nicety to save the 
  user a whole 
   request/response cycle just to find out a field is missing 
  or wrong. 
   Consider it a security issue.
   
   -- David
   
   raja buddha wrote:
   
Hi all
In struts why do we need validation frame work  we have 
  java script
to do validations. Is there any extra advantage of using 
   the validation
frame work
   
raj
   

 _
On the road to retirement? Check out MSN Life Events for 
   advice on how 
to get there! 
  http://lifeevents.msn.com/category.aspx?cid=Retirement
   
   

   
  
 -
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]
  
 
 -
 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: Performing an action on form-based login

2005-05-25 Thread Steve Kirk

Not maybe of direct help unless you get really stuck, but my approach was to
use TCs sessions, but not its authentication framework.  My original
reasoning for this was that I wanted login details to be in a RDMS table
along with other data.  So I coded the login/logout process myself, which
was a little work to achieve, but gives me freedom to handle the sorts of
things you are talking about in a flexible way.

My way around the problem you describe is that when someone successfully
authenticates, I add their uid to the session object as a String in the
doGet() method:

String uid = request.getParameter(form_uid_field);
request.getSession(true).setAttribute(uid, null);

And because the uid is now accessible via the session object, when your
SessionListener catches the attributeAdded/Changed/Replaced events, they
pass a HttpSessionBindingEvent, from which you can call
.getSession().getAttribute(uid)

 -Original Message-
 From: Ross Nicoll [mailto:[EMAIL PROTECTED] 
 Sent: Tuesday 24 May 2005 15:17
 To: Tomcat Users List
 Subject: Re: Performing an action on form-based login
 
 
 We're having more or less the same problem. Is there perhaps a chance
 of a UserFormLoginListener in a future version of Tomcat? Anyone have
 any advice on this?
 
 Some reliable method for logging out a user would also be 
 extremely useful.
 
 On 5/22/05, Torsten Römer [EMAIL PROTECTED] wrote:
  This question has been asked (and answered to) earlier, but 
 I am still
  unsure:
  
  I am using container managed security with form-based 
 authentication. I
  am really happy with how it works. But now I would like to 
 perform an
  action when a user has authenticated, such as loading user 
 preferences
  and store them in the session.
  
  First I thought I could use a HttpSessionListener for that. 
 Now I know
  when a new session has been created, but what I am missing is the
  username. The only way to get it seems to be from a request using
  getRemoteUser(). Or am I wrong? I really hope I am...
  
  I read about setting up a filter but then read somewhere 
 else that this
  is not reliable.
  
  I also found this article Active Authentication
  http://java.sys-con.com/read/37660.htm which sounds 
 interesting but the
  link to the source code is broken, so I don't get how to 
 implement that.
  
  Can someone help me out?
  
  Torsten
  
  
 -
  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: DNS Request distribution and TCP NAT distribution For Tomcat Cluster

2005-05-25 Thread Steve Kirk
Peter,

I agree that

 DNS is a very lumpy way of doing load balancing. 

But your comments interested me.  Can I ask how sure you felt of what you
say here please: 

 No standard way afaik.  Worse, downstream DNS servers may (often do)
 cache the returned IPs for up to a day despite any cache expiry you put
 on them.  If (say) the AOL DNS servers all get the same IP address in
 their cache, all your AOL visitors will visit the same IP address.

I'm not for a minute suggesting that it is wrong :) and wouldn't dream of
doing so, because I don't know all the facts myself.  I tried to research it
but could not get to the bottom of it with any real info from ISPs (the
problem is that they seem to do their own thing to various extents).  I'm
just interested in comparing experiences/opinions.

I have set up roundrobin DNS for an ecommerce site in the past without any
complaints from users, and the  balance of load between a pair of clustered
servers seemed pretty even.  I would expect any DNS server run by an ISP
(such as AOL) to receive the zone records from SOA intact, i.e. these
major dns servers should know about all rr Ips for a given dns name, and
would therefore be able to RR distribute them to lower-tier DNS servers.  I
would have thought that the level at which DNS servers do not pick up the
fact that there is a RR DNS entry is where they do not do a zone transfer
from a primary DNS server - they simply act as a client and cache what they
get as a response, so they are unaware that there even are more than one IP.
I'm speculating that these minor DNS servers belong to small ISPs, or
private companies running their own DNS in-house?

So overall I guess I'm saying I'd be surprised if AOL's DNS servers only
cached one entry of a RR set for a DNS name.  What are your thoughts?

 -Original Message-
 From: Peter Crowther [mailto:[EMAIL PROTECTED] 
 Sent: Wednesday 25 May 2005 17:15
 To: Tomcat Users List; [EMAIL PROTECTED]
 Subject: RE: DNS Request distribution and TCP NAT 
 distribution For Tomcat Cluster
 
 
  From: John MccLain [mailto:[EMAIL PROTECTED] 
  1) for DNS Request Distribution - I dont understand. The 
  browser sends a URL
  to the DNS, the DNS responds back with an IP address. But 
  what if at that IP
  address, you have a web server listening on port 80?
 
 The browser talks to that Web server.
 
  If 
  Tomcat is at that
  address also, Tomcat would have to listen on another port. 
 Can the DNS
  distribute back to the browser the IP Address AND  the Tomcat 
  port so the
  browser connects to Tomcat on a non port 80 port?
 
 Only if your original URL uses the name:port notation - there 
 is nothing
 in this scheme to prevent that.
 
  Also, is there a way to
  setup the DNS to Round Robin or check server load on the 
  servers in the
  Tomcat cluster so it knows which Tomcat server ip:port to 
  send back.
 
 No standard way afaik.  Worse, downstream DNS servers may (often do)
 cache the returned IPs for up to a day despite any cache 
 expiry you put
 on them.  If (say) the AOL DNS servers all get the same IP address in
 their cache, all your AOL visitors will visit the same IP address.
 
 DNS is a very lumpy way of doing load balancing.
 
  OR does
  this whole thing imply that you have an IP for each web 
  server (IIS)
 
 IP address yes; IIS depends on whether you want IIS or Tomcat at the
 business end of the cluster.
 
  and
  each web server is tied to each server in the Tomcat 
 cluster via a jk2
  redirector?
 
 If you wish to use that architecture, yes.
 
  2)TCP NAT distribution - Does this mean that when the browser 
  connects to
  the IP address, that that connection is intercepted and the 
 request is
  distributed to a server in the Tomcat cluster?
 
 Yes.
 
  If this is the case, then
  what does the interception?
 
 Generically, a router that has this capability.  It's that router that
 also does the NATing.  Many mid- to high-end hardware routers and some
 software routing packages can do this.
 
  and how do you configure that thing to use a
  specific algorithm (server load, Round Robin, etc..) to 
  choose which server
  to forward the request to?
 
 That is router-specific.  There is no standard (afaik) for the servers
 to return load information, so you're stuck with proprietary solutions
 *or* the router doesn't load-balance.
 
  can it forward to an IP:PORT or does it have to
  forward to an IP
 
 That is router-specific.  Given that the capability typically 
 exists on
 mid- to high-end routers, most will also have the capability to change
 the internal port that is in use.
 
   - Peter
 
 -
 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: Minimal server

2005-05-24 Thread Steve Kirk
OK glad someone else said that because I don't get this either but didn't
reply because I assumed I must have misunderstood.  Dola, apologies in
advance if I have got the wrong end of the stick, but are you saying that
you want to install an app on many PCs, and the app does not need to
interact with a separate server machine, and you plan to just require that
they have JRE and a browser installed?

I don't see how you will do that without installing some kind of dynamic
webserver on each PC, whether that be apache-hpptd, tomcat, or other, plus
the web application (which needn't be servlets, it could be perl based). And
if you are going to do that, what's wrong with installing tomcat?

Tomcat meets your needs - the user can just click on a desktop shortcut
which points to the http url of the home page of the app and voila, the app
starts.

 -Original Message-
 From: Peter Crowther [mailto:[EMAIL PROTECTED] 
 Sent: Tuesday 24 May 2005 09:23
 To: Tomcat Users List
 Subject: RE: Minimal server
 
 
  From: Dola Woolfe [mailto:[EMAIL PROTECTED] 
  What I'm primarily thinking about is what the user
  would need to have/install in order to use the
  program. And I want the user to simply click on a file
  and for the program to just run (provided the jre is
  installed).
 
 Tomcat is capable of running without any formal installation, although
 you'd have to be careful about where it put its working files 
 and how it
 unpacked WARs if you were distributing packed webapps.  There 
 have been
 a couple of threads about getting the whole thing to run off a CD
 without touching the host machine's filestore at all; I think 
 that would
 be difficult to achieve as Tomcat, at least, needs to be able to write
 to temp filestore.
 
 I disagree slightly with your characterisation of the 
 approach.  I agree
 with you that a browser is often the simplest way to *display* a GUI;
 however, one needs to provide code behind that browser-based GUI, and
 I'm not aware of anything that really solves the problem of deploying
 that code to the messy universe of many users' computers 
 rather than to
 the tidy universe of central Web servers.
 
   - Peter
 
 -
 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: Compiling JSP files

2005-05-24 Thread Steve Kirk
Is there a reason why you can't let TC compile the JSP on demand and read
the log output?  Works for me.

Failing that, I suspect your cmd-line classpath has some errors.

What does echo %classpath% produce?

And are you sure these are right in your classpath (from your previous post
below):

C:\tomcat\work\Catalina\Site1\_
C:\tomcat\common\lib\servlet

Not sure what the first one is, and the second should read servlet-api.jar
not servlet.

You also need to add C:\tomcat\common\lib\jsp-api.jar to the classpath too
if you haven't already.

Also you should have all classes in the classpath that your class itself
imports - either explicitly include the full path to each class separately
(drop the .class extension), or a folder containing the class hierarchy in
folders, or the full path to one or more jars that include the classes.

 -Original Message-
 From: Charles P. Killmer [mailto:[EMAIL PROTECTED] 
 Sent: Tuesday 24 May 2005 16:39
 To: Tomcat Users List
 Subject: RE: Compiling JSP files
 
 
 I just need a way to quickly determine why this script times 
 out without compiling.  I have two scripts that create an 
 admin interface to two different tables.  The only difference 
 in the files is the underlying table structure.  One works.  
 Even if I delete the _jsp.java and class files before making 
 the request.  The other does not.  
 
 Any ideas on how to resolve this issue would be appreciated.
 Charles
 
 -Original Message-
 From: Bernhard Slominski [mailto:[EMAIL PROTECTED] 
 Sent: Tuesday, May 24, 2005 9:47 AM
 To: 'Tomcat Users List'
 Subject: AW: Compiling JSP files
 
 Hi Charles,
 
 what you can do is to use an ant task for do the precompilation.
 This is a bit smarter than via the command line I guess.
 The docu is under
 http://jakarta.apache.org/tomcat/tomcat-5.5-doc/jasper-howto.h
 tml#Web%20Appl
 ication%20Compilation
 It's not very well documented, it took me a while to finally 
 get it working, but it's working fine for me now.
 So if you want to give it a try, I can give you some further 
 assistance, if needed.
 
 Cheers 
 
 Bernhard
 
  -Ursprüngliche Nachricht-
  Von: Charles P. Killmer [mailto:[EMAIL PROTECTED]
  Gesendet: Dienstag, 24. Mai 2005 15:47
  An: Tomcat Users List
  Betreff: Compiling JSP files
  
  
  I am having a problem where one of my jsp files won't 
 compile.  Tomcat 
  successfully creates the java file but it never creates the 
 class file 
  and hence never responds to the request for the page.
   
  I am looking for what needs to be in the command line in order to 
  manually compile the java file the gets created in order to 
 look for 
  errors in that process.
   
  This is what I have so far but I am getting errors.
  c:\jdk1.5.0\bin\javac -classpath
  %CLASSPATH%;C:\tomcat\work\Catalina\Site1\_;C:\tomcat\common\l
  ib\servlet
  .jar test_jsp.java
   
   
  Errors:
  test_jsp.java:5: package javax.servlet.jsp does not exist import 
  javax.servlet.jsp.*; ^
  test_jsp.java:8: package org.apache.jasper.runtime does not exist 
  public final class test_jsp extends 
  org.apache.jasper.runtime.HttpJspBase
   ^
  test_jsp.java:9: package org.apache.jasper.runtime does not exist
  implements org.apache.jasper.runtime.JspSourceDependent {
  ^
   
   
  Thanks
  Charles
  
 
 -
 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: Validation Frame work

2005-05-24 Thread Steve Kirk
David is right, JS and serverside validation perform different roles.  To
expand on his comment a bit more, remember that the requests that your
webapp receives could be sent by any HTTP client, not necessarily by a
friendly web browser.  If someone were so inclined, they could write their
own HTTP client to interact with your webapp, that aimed to deliberately
submit bad data to your servlet, in which case your JS validation would have
been bypassed.  What they can't do is bypass your serverside validation (or
at least this is much harder).

Just one trick that such nasty people might try is to insert JS code in any
form fields that you let them create or edit.  If this field data is then
displayed in other pages of your app, this might cause anyone viewing that
page on your site to download a trojan/virus/etc.  It's really very easy to
do.  And this is only one such exploit.  There are many others.

 -Original Message-
 From: David Smith [mailto:[EMAIL PROTECTED] 
 Sent: Tuesday 24 May 2005 16:19
 To: Tomcat Users List
 Subject: Re: Validation Frame work
 
 
 Because you should never trust the client. They may not be submitting 
 from your form.  Javascript is just a nicety to save the user a whole 
 request/response cycle just to find out a field is missing or wrong. 
 Consider it a security issue.
 
 -- David
 
 raja buddha wrote:
 
  Hi all
  In struts why do we need validation frame work  we have java script
  to do validations. Is there any extra advantage of using 
 the validation
  frame work
 
  raj
 
  _
  On the road to retirement? Check out MSN Life Events for 
 advice on how 
  to get there! http://lifeevents.msn.com/category.aspx?cid=Retirement
 
 
  
 -
  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: Minimal server

2005-05-24 Thread Steve Kirk

Thanks Will - I had not heard of embedded TC before.  Interesting, and a
nice piece of innovation too.

Hence why I misunderstood the thread earlier (sorry).

This could be very useful.  If I've understood correctly, I can somehow
bundle together my existing TC webapp along with the tc-embedded code,
compile a jar that contains them both, and distribute that as a complete
system, and when the user double-clicks, it runs a very lightweight
version of tc, running my webapp only, in the user's browser?  If so that
will be a great way to distribute a TC webapp for testing, because as long
as you don't have too many testers, this saves having to set up a separate
test server.

 -Original Message-
 From: Will Hartung [mailto:[EMAIL PROTECTED] 
 Sent: Tuesday 24 May 2005 17:38
 To: Tomcat Users List
 Subject: Re: Minimal server
 
 
  From: Steve Kirk [EMAIL PROTECTED]
  Sent: Tuesday, May 24, 2005 5:02 AM
 
  I don't see how you will do that without installing some 
 kind of dynamic
  webserver on each PC, whether that be apache-hpptd, tomcat, 
 or other, plus
  the web application (which needn't be servlets, it could be 
 perl based).
 And
  if you are going to do that, what's wrong with installing tomcat?
 
 If the goal is to write an, essentially, stand alone 
 application that just
 happens to be browser based, then you don't want to install 
 tomcat per se,
 rather you just want to have an HTTP based core around which 
 you can wrap
 your application. Its not designed to be a general purpose
 application/webserver, rather a very application specific server.
 
 It also allow the application to be distrubted as either a 
 simple, complete
 Jar file, or perhaps wrapped in a .exe. When the user clicks 
 on the icon,
 the application launches a browser to the applications home page.
 
 Now, if he just wants to distribute a WAR, as a central 
 service for several
 users, then, yes, its easier to have the client simply 
 install tomcat (or
 bundle it in their installer), and deploy the war. But for a 
 client side,
 browser based application, embedding can very quite viable.
 
 Regards,
 
 Will Hartung
 ([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: redeploy of webapp loses GlobalNamingResource DataSource

2005-05-24 Thread Steve Kirk
From the look of the stacktrace, which mentions
org.postgresql.Driver.parseURL as the point where the initial exception
was thrown, maybe the URL attribute in your Context's Resource or
ResourceParams might either contain a wrong value or a typo.  This might
be leading to a parsing exception, even though the trace doesn't say so
explicitly.

My experience is that the exceptions in these cases do not always give you a
very precise clue as to the problem.  For example, very recently on 5.5.9, I
was getting a similar problem to you, where just because I had a leading
space in the url attribute value, the whole DBCP resource was rejected, with
the exception messages Cannot create JDBC driver of class '' for connect
URL 'null' caused by no suitable driver.

Check that config *extremely* carefully

 -Original Message-
 From: bob_b [mailto:[EMAIL PROTECTED] 
 Sent: Tuesday 24 May 2005 22:28
 To: tomcat-user@jakarta.apache.org
 Subject: redeploy of webapp loses GlobalNamingResource DataSource
 
 
 I have a globally named db pool resource that I use across multiple
 contexts to access a particular database. When I redeploy a webapp in
 Tomcat 5.0.28, I am losing the DataSource and getting a pooled
 connection fails with the following (truncated) message:
 
 
 org.apache.commons.dbcp
 .SQLNestedException: Cannot create JDBC driver
 of class '' for connect URL 'null'
 =09at 
 org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSou=
 rce.java:780)
 =09at 
 org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource=
 .java:540)
 .
 
 Caused by: java.lang.NullPointerException
 =09at org.postgresql.Driver.parseURL(Driver.java:269)
 =09at org.postgresql.Driver.acceptsURL(Driver.java:177)
 =09at java.sql.DriverManager.getDriver(DriverManager.java:232)
 =09at 
 org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSou=
 rce.java:773)
 =09... 44 more..
 
 -
 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: problem: Session invalidation in the servlet accessed via foreign context

2005-05-23 Thread Steve Kirk

OK.

So... your conclusion is that you can't do that, right?  That's what I'm
reading the servlet 2.4 spec as saying, because you can't invalidate a
session in one context that is not accessible to you in another context,
irrespective of whether you use getRequestDispatcher to do that.

Or maybe I'm reading it wrong.  That's possible as to be honest I've never
tried what you're trying for real, I'm going on what the docs say not
personal experience.

 -Original Message-
 From: Akoulov, Alexandre [IT] 
 [mailto:[EMAIL PROTECTED] 
 Sent: Monday 23 May 2005 06:53
 To: Tomcat Users List
 Subject: RE: problem: Session invalidation in the servlet 
 accessed via foreign context 
 
 
 Thanks again, Steve, for your time.
 
 I am not trying to share sessions between different apps. I 
 just want to ensure that when we're programmatically 
 accessing web application in the different context it can do 
 its own session management (ie invalidate / create new ones)
 
 -Original Message-
 From: Steve Kirk [mailto:[EMAIL PROTECTED]
 Sent: Monday, 23 May 2005 11:52 AM
 To: 'Tomcat Users List'
 Subject: RE: problem: Session invalidation in the servlet accessed via
 foreign context 
 
 
 
 I'm not sure why you think there is a problem with 
 invalidation.  I'm no
 expert, but I'm not sure that I would expect the code below 
 to work, because
 by default, servlets must not share sessions between webapps, 
 and you are
 asking that a client request to one context is passed to 
 another, and still
 the session data is available.  Withouht single sign-on, I would have
 thought that sessions will not be shared.
 
 I've just flipped through the 2.4 servlet spec.  Section SRV.7.3 says
 something very specific about your scenario, as follows: if 
 a servlet uses
 the RequestDispatcher to call a servlet in another Web 
 application, any
 sessions created for and visible to the servlet being called must be
 different from those visible to the calling servlet.
 
 I appreciate that you are also saying that v3/v4 behaved 
 differently - but
 are you sure that the config of those versions was not 
 different, perhaps
 they were configured to share sessions (single sign-on)?  I'm 
 not sure on
 the detail of earlier versions of the servlet spec, but 
 perhaps session
 behaviour was defined differently in previous versions.  You 
 could find out
 with a google search, or maybe someone else will answer
 
  -Original Message-
  From: Akoulov, Alexandre [IT] 
  [mailto:[EMAIL PROTECTED] 
  Sent: Monday 23 May 2005 01:29
  To: Tomcat Users List
  Subject: RE: problem: Session invalidation in the servlet 
  accessed via foreign context 
  
  
  Thanks a lot, Steve, for your reply.
  
  No, I am not using SingleSignOn neither hoping to share the 
  same session across contexts.
  
  The only thing I was testing is that I could invalidate and 
  then create a new session in different scenarios. 
  
  I ran the test with the java debugger and could observe that 
  when invalidating/creating a session in ForeignContextServlet 
  it in fact did not create a new session and left us with the 
  reference to old (ie invalidated) session after line No.3.
  
  My next step is start looking into the tomcat source code to 
  try to work out what's happening. Do you think it's best way 
  to approach this issue?
  
  
  Thanks again,
  
  Alex.
  
  -Original Message-
  From: Steve Kirk [mailto:[EMAIL PROTECTED]
  Sent: Monday, 23 May 2005 10:18 AM
  To: 'Tomcat Users List'
  Subject: RE: problem: Session invalidation in the servlet 
 accessed via
  foreign context 
  
  
  
  I'm not sure I fully understand this issue, but seeing as 
  no-one else seems
  to have replied yet, maybe a few Qs might help you work through it:
  
  Are you hoping that both contexts will share their sessions?
  
  Are you using the SingleSignOn feature in server.xml?
  
  When you say that ForeignContextServlet does not create a 
 new session
  object, are you explicitly testing that within 
  ForeignContextServlet itself,
  or from a servlet in another context (e.g. 
 DebuggerServlet)?  i.e. is
  null==session after step 3?
  
  You say that the session is invalid/null after line 2, but 
  have you tested
  that it was valid/non-null before line 2?
  
   -Original Message-
   From: Akoulov, Alexandre [IT] 
   [mailto:[EMAIL PROTECTED] 
   Sent: Monday 23 May 2005 00:43
   To: tomcat-user@jakarta.apache.org
   Subject: Re: problem: Session invalidation in the servlet 
   accessed via foreign context 
   
   
   Hi all,
   
   I'd greatly appreciate if you could shed a ray of light on 
   the following problem ( see below)
   
   
   
   -Original Message-
   From: Akoulov, Alexandre [IT] 
   Sent: Friday, 20 May 2005 11:15 AM
   To: Tomcat Users List
   Subject: problem: Session invalidation in the servlet accessed via
   foreign context 
   
   
   Hi all,
   
   It seems that there is a problem with session invalidation

RE: problem: Session invalidation in the servlet accessed via foreign context

2005-05-23 Thread Steve Kirk

OK no problem, I'm learning something here too :)

I agree, one app cannot access a session created by another app (unless you
set singlesignon, which we'll ignore for now).

I am referring just to the single line I quoted earlier, from SRV.7.3 of 2.4
spec.  I'm reading that as saying that if app A creates session X for user
U, then the user U then accesses app B, which then includes a servlet from
app A via its RequestDispatcher as you have done in your example, context A
will not have access to the session in the second request, even though it
created it, because it was routed through app B, which is not allowed to
access it.

I might have misinterpreted this, because I have no actual experience of it.
I can see that it might be possible that the session is invisible to B but
not A.  If so I'm more than happy to be told I'm wrong by someone who
knows?

 -Original Message-
 From: Akoulov, Alexandre [IT] 
 [mailto:[EMAIL PROTECTED] 
 Sent: Monday 23 May 2005 10:46
 To: Tomcat Users List
 Subject: RE: problem: Session invalidation in the servlet 
 accessed via foreign context 
 
 
 Thanks, Steve, again.
 
 That's what I'm
 reading the servlet 2.4 spec as saying, because you can't 
 invalidate a
 session in one context that is not accessible to you in 
 another context,
 irrespective of whether you use getRequestDispatcher to do that.
 
 What section of the spec defines such behaviour? I understand 
 that we cannot access a session created by one application 
 from another one. However, an application can manage its own 
 session(s) and the way the application is accessed (via 
 RequestDispatcher or via direct hit) should not affect 
 session management at all.
 
 Thanks again, I really appreciate your thoughts on this matter.
 
 
 Kind regards,
 
 Alex.
 
 
 -Original Message-
 From: Steve Kirk [mailto:[EMAIL PROTECTED]
 Sent: Monday, 23 May 2005 6:21 PM
 To: 'Tomcat Users List'
 Subject: RE: problem: Session invalidation in the servlet accessed via
 foreign context 
 
 
 
 OK.
 
 So... your conclusion is that you can't do that, right?  
 That's what I'm
 reading the servlet 2.4 spec as saying, because you can't invalidate a
 session in one context that is not accessible to you in 
 another context,
 irrespective of whether you use getRequestDispatcher to do that.
 
 Or maybe I'm reading it wrong.  That's possible as to be 
 honest I've never
 tried what you're trying for real, I'm going on what the docs say not
 personal experience.
 
  -Original Message-
  From: Akoulov, Alexandre [IT] 
  [mailto:[EMAIL PROTECTED] 
  Sent: Monday 23 May 2005 06:53
  To: Tomcat Users List
  Subject: RE: problem: Session invalidation in the servlet 
  accessed via foreign context 
  
  
  Thanks again, Steve, for your time.
  
  I am not trying to share sessions between different apps. I 
  just want to ensure that when we're programmatically 
  accessing web application in the different context it can do 
  its own session management (ie invalidate / create new ones)
  
  -Original Message-
  From: Steve Kirk [mailto:[EMAIL PROTECTED]
  Sent: Monday, 23 May 2005 11:52 AM
  To: 'Tomcat Users List'
  Subject: RE: problem: Session invalidation in the servlet 
 accessed via
  foreign context 
  
  
  
  I'm not sure why you think there is a problem with 
  invalidation.  I'm no
  expert, but I'm not sure that I would expect the code below 
  to work, because
  by default, servlets must not share sessions between webapps, 
  and you are
  asking that a client request to one context is passed to 
  another, and still
  the session data is available.  Withouht single sign-on, I 
 would have
  thought that sessions will not be shared.
  
  I've just flipped through the 2.4 servlet spec.  Section 
 SRV.7.3 says
  something very specific about your scenario, as follows: if 
  a servlet uses
  the RequestDispatcher to call a servlet in another Web 
  application, any
  sessions created for and visible to the servlet being called must be
  different from those visible to the calling servlet.
  
  I appreciate that you are also saying that v3/v4 behaved 
  differently - but
  are you sure that the config of those versions was not 
  different, perhaps
  they were configured to share sessions (single sign-on)?  I'm 
  not sure on
  the detail of earlier versions of the servlet spec, but 
  perhaps session
  behaviour was defined differently in previous versions.  You 
  could find out
  with a google search, or maybe someone else will answer
  
   -Original Message-
   From: Akoulov, Alexandre [IT] 
   [mailto:[EMAIL PROTECTED] 
   Sent: Monday 23 May 2005 01:29
   To: Tomcat Users List
   Subject: RE: problem: Session invalidation in the servlet 
   accessed via foreign context 
   
   
   Thanks a lot, Steve, for your reply.
   
   No, I am not using SingleSignOn neither hoping to share the 
   same session across contexts.
   
   The only thing I was testing is that I could invalidate

RE: Tomcat For SSL

2005-05-23 Thread Steve Kirk

Get ready for differing opinions on this, it's been asked loads of times
before, try searching the archives for more info.  My very quick summary
would be that you do not need apache httpd to do SSL, and it can be very
fast and stable without apache, as well as simpler to config if you don't
already know apache, but there are good reasons to introduce apache.

depending on the exact requirements of your site, there are some useful
feature benefits from using apache+tomcat, and when the site gets heavily
loaded, apache+tc performs better than tc alone, if you let apache handle
the static page requests.  A friend of mine advises me that he uses
apache+tc for these reasons: 

- server side includes which is easier for most people to use to do minor
dynamic content in otherwise static pages

- mod_rewrite can help with redirection between http - https if you have
pages that can only be accessed through one or other protocol

- can config reverse proxy content off another server

I do not run apache with my TC because I do not require any of these
features; however I am not against using it for the right app.

 -Original Message-
 From: Scott Purcell [mailto:[EMAIL PROTECTED] 
 Sent: Monday 23 May 2005 14:39
 To: tomcat-user@jakarta.apache.org
 Subject: Tomcat For SSL
 
 
 Hello,
 
 I have a webapp that is running on Tomcat 5.5. I have always 
 developed just using Tomcat. Now I want to take a site, and 
 host it. The site will also run certificates for SSL. Should 
 I wrap my site around Apache now. Meaning should I install 
 apache and put tomcat inside? Or however this is done. Or can 
 tomcat handle SSL certificates (from Verisign?) as it is. I 
 hear of security issues, etc.
 
 Any information would be appreciated.
 
 Thanks,
 Scott
 
 -
 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: DBCP

2005-05-23 Thread Steve Kirk

DBCP has some config params in the context.xml that will clean up for you if
you don't return resources to the pool.  It will also test connections for
you to make sure they're alive, and close/replace them if not.  To config
these features, set the params in your Context's DBCP Resource tag, for
example:

Resource name=jdbc/myDbResource auth=Container
type=javax.sql.DataSource 
maxActive=10 maxIdle=5 maxWait=1 
username=ao password=ao
driverClassName=com.mysql.jdbc.Driver 
url=jdbc:mysql://localhost:3306/myWebApp

removeAbandoned=true 
removeAbandonedTimeout=60 
logAbandoned=true 
validationQuery=select 1
testOnBorrow=true
testWhileIdle=true
timeBetweenEvictionRunsMillis=1
minEvictableIdleTimeMillis=6
/

The attributes in question are those from removeAbandoned down.

However it is not advised to rely on this as a means of managing your pool -
this is your safety net.  It's far better to return connections to the pool
yourself in the first place.  A proper try/catch/finally structure is the
way to go, there are numerous examples on the web.

You don't mention your TC version but a good starting poing in the docs for
the latest version (5.5.x) are here: 
http://jakarta.apache.org/tomcat/tomcat-5.5-doc/jndi-datasource-examples-how
to.html 

Read the whole page, and for a decent try/catch/finally code example, focus
on the code in the section Random Connection Closed Exceptions.

 -Original Message-
 From: Charles P. Killmer [mailto:[EMAIL PROTECTED] 
 Sent: Monday 23 May 2005 17:43
 To: Tomcat Users List
 Subject: DBCP
 
 
 Supposing I forgot to close a database connection.  And the script was
 requested numerous times.  And now my scripts can not get any database
 connections.  Is there a way to close those connections without
 restarting Tomcat?
  
 Charles
 



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



RE: confused about simple logging

2005-05-23 Thread Steve Kirk

Your confusion possibly arises because there are at least 2 types of logger
that you might mean, and 3 main choices for one of those at the moment,
although one of those 3 is deprecated and a second is probably becoming less
popular.

OK I'll take a quick stab and see if this gets you anywhere in the right
direction.

You mention two distinct types of logging.  The 1st is the hit logging
which is very similar to what you would get from apache httpd.  This simply
logs each incoming request.  This is achieved by adding a Valve to your
%catalina_home%\conf\server.xml - you can embed it inside the Host/Host,
Engine/Engine or Context/Context tags, but for your purposes, just
shove it in the engine for now.  It looks a bit like this:

Engine blah blah
Valve
className=org.apache.catalina.valves.FastCommonAccessLogValve
directory=logs  prefix=ao_access_log_ suffix=.log
pattern=common resolveHosts=false/
/Engine

You can tweak the path, filename, and the pattern that defines each line -
see 
http://jakarta.apache.org/tomcat/tomcat-5.0-doc/config/valve.html 
for details.  Leave resolveHosts set false to speed up performance.

Not that my example above is from my own 5.5.9 server - ISTR 5.0 config
syntax is different - check the doc link above for the detail.

The 2nd part of your logging is where you write your own messages to a
logfile.  I did that as follows: 

java.util.logging.Logger logger =
java.util.logging.Logger.getLogger(logname);
logger.setLevel(logLevel);
fh = new FileHandler(logFilePath, maxLogFileSize, logFileCount, true);
fh.setFormatter(new AoLogFormatter(logFileDateTimePattern));
logger.addHandler(fh);

Then to write a log message you can just do this: 

log(Write this to the log);

and it will write the log file to logFilePath

See the java.util.logging.Logger javadocs for more details.

This is very basic.  Much more spophistication can be achieved through
config files.

 -Original Message-
 From: Lane [mailto:[EMAIL PROTECTED] 
 Sent: Monday 23 May 2005 18:01
 To: Tomcat Users List
 Subject: confused about simple logging
 
 
 Hello.
 
 I'm a bit confused about simple logging on tomcat 5.0.  I've 
 read much of the 
 FAQ at 
 http://jakarta.apache.org/tomcat/faq/logging.html#builtIn but that 
 doesn't seem to address what I'm looking for, which is just 
 routine mundane 
 daily activity.
 
 For instance, if I create and deploy a simple Hello World 
 application that 
 contains only index.jsp, no servlets, no external classes and no JNDI 
 resources, where on earth will a hit be recorded when I navigate to 
 http://localhost/helloworld/index.jsp ?  And where is the 
 error recorded if I 
 mistype and navigate to http://localhost/helloworld/jndex.JSP ?
 
 Do I have to build such logging into the application?  Or 
 does Catalina handle 
 that for me?  And if so ... where on earth?
 
 I'm using FreeBSD installed at /usr/local/jakarta-tomcat5.0
 
 I see log information in /usr/local/jakarta-tomcat5.0/logs/stderr.log 
 and /usr/local/jakarta-tomcat5.0/logs/stdout.log but nothing 
 that records a 
 page hit.
 
 Thanks,
 
 lane
 
 -
 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: confused about simple logging

2005-05-23 Thread Steve Kirk

Not sure, ut I think all the output streams are diverted to that file.  It's
probably configurable.  Don't know full detail to be honest.  Best wasy is
try it and see.

 -Original Message-
 From: Jim Henderson [mailto:[EMAIL PROTECTED] 
 Sent: Monday 23 May 2005 19:02
 To: Tomcat Users List
 Subject: RE: confused about simple logging
 
 
 
 If I write to stdout where does that go?
 
 System.stdout.println(Where does this get printed to?);
 
 I assume C:/tomcat.../log/stdout?
 
 -Original Message-
 From: Steve Kirk [mailto:[EMAIL PROTECTED]
 Sent: Monday, May 23, 2005 12:28 PM
 To: 'Tomcat Users List'
 Subject: RE: confused about simple logging
 
 
 
 Your confusion possibly arises because there are at least 2 
 types of logger
 that you might mean, and 3 main choices for one of those at 
 the moment,
 although one of those 3 is deprecated and a second is 
 probably becoming less
 popular.
 
 OK I'll take a quick stab and see if this gets you anywhere 
 in the right
 direction.
 
 You mention two distinct types of logging.  The 1st is the 
 hit logging
 which is very similar to what you would get from apache 
 httpd.  This simply
 logs each incoming request.  This is achieved by adding a 
 Valve to your
 %catalina_home%\conf\server.xml - you can embed it inside the 
 Host/Host,
 Engine/Engine or Context/Context tags, but for your 
 purposes, just
 shove it in the engine for now.  It looks a bit like this:
 
 Engine blah blah
   Valve
 className=org.apache.catalina.valves.FastCommonAccessLogValve
   directory=logs  prefix=ao_access_log_ suffix=.log
   pattern=common resolveHosts=false/
 /Engine
 
 You can tweak the path, filename, and the pattern that 
 defines each line -
 see
 http://jakarta.apache.org/tomcat/tomcat-5.0-doc/config/valve.html
 for details.  Leave resolveHosts set false to speed up performance.
 
 Not that my example above is from my own 5.5.9 server - ISTR 
 5.0 config
 syntax is different - check the doc link above for the detail.
 
 The 2nd part of your logging is where you write your own messages to a
 logfile.  I did that as follows:
 
 java.util.logging.Logger logger =
 java.util.logging.Logger.getLogger(logname);
 logger.setLevel(logLevel);
 fh = new FileHandler(logFilePath, maxLogFileSize, logFileCount, true);
 fh.setFormatter(new AoLogFormatter(logFileDateTimePattern));
 logger.addHandler(fh);
 
 Then to write a log message you can just do this:
 
   log(Write this to the log);
 
 and it will write the log file to logFilePath
 
 See the java.util.logging.Logger javadocs for more details.
 
 This is very basic.  Much more spophistication can be achieved through
 config files.
 
  -Original Message-
  From: Lane [mailto:[EMAIL PROTECTED]
  Sent: Monday 23 May 2005 18:01
  To: Tomcat Users List
  Subject: confused about simple logging
 
 
  Hello.
 
  I'm a bit confused about simple logging on tomcat 5.0.  I've
  read much of the
  FAQ at
  http://jakarta.apache.org/tomcat/faq/logging.html#builtIn but that
  doesn't seem to address what I'm looking for, which is just
  routine mundane
  daily activity.
 
  For instance, if I create and deploy a simple Hello World
  application that
  contains only index.jsp, no servlets, no external classes 
 and no JNDI
  resources, where on earth will a hit be recorded when I 
 navigate to
  http://localhost/helloworld/index.jsp ?  And where is the
  error recorded if I
  mistype and navigate to http://localhost/helloworld/jndex.JSP ?
 
  Do I have to build such logging into the application?  Or
  does Catalina handle
  that for me?  And if so ... where on earth?
 
  I'm using FreeBSD installed at /usr/local/jakarta-tomcat5.0
 
  I see log information in 
 /usr/local/jakarta-tomcat5.0/logs/stderr.log
  and /usr/local/jakarta-tomcat5.0/logs/stdout.log but nothing
  that records a
  page hit.
 
  Thanks,
 
  lane
 
  
 -
  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]
 
 



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



RE: confused about simple logging

2005-05-23 Thread Steve Kirk
Sorry can't help you there.  I was where you are now a year or more ago,
fancy logging frameworks - too much hassle to learn for the simple logs
that I want.  But I soon realised that it was more work, and quite a bit
more ugly, trying to do your own thing.  I'd say bite the bullet and embrace
the latest release and logging framework.  There have been a few different
ones over recent versions, but the TC dev team are converging them nicely
now.  It might seem a little over engineered for simple logging requirements
at first, but once you spend the time to make it work, you will get what you
want, and come to realise that the advanced features are really useful for
debugging in situations exactly like yours.

I'm using commons-logging very successfully, is very flexible and not hard
to learn.

If you really reach your wits end making logging work and just want a blunt
instrument to detect one-off if your overloaded method is called, when not
do something else to signal its presence, such as add a line to it which
creates a file called ive.been.called in a certain directory.  Gets you
past having to fix your log/stream problem.  You won't find this logging
framework in the TC docs though ;)

 -Original Message-
 From: Jim Henderson [mailto:[EMAIL PROTECTED] 
 Sent: Monday 23 May 2005 19:58
 To: Tomcat Users List
 Subject: RE: confused about simple logging
 
 
 Well I am having lots of self doubt.
 
 I am trying to install my own overloaded JDBCRealm,  I have 
 been getting
 some Sybase jdescripter error.  (My backend DB has an old 
 means of encoding
 passwords so I overloaded the getPassword method.)  I don't 
 know if my code
 is getting called or is it not.  I have System.out trace 
 statements in
 the constructor after the call to the super ctor as well as 
 the getPassword
 method.   And, I see none of my trace in any of the Tomcat log files.
 
 This is frustrating after 3 days.
 
 -Original Message-
 From: Steve Kirk [mailto:[EMAIL PROTECTED]
 Sent: Monday, May 23, 2005 1:46 PM
 To: 'Tomcat Users List'
 Subject: RE: confused about simple logging
 
 
 
 Not sure, ut I think all the output streams are diverted to 
 that file.  It's
 probably configurable.  Don't know full detail to be honest.  
 Best wasy is
 try it and see.
 
  -Original Message-
  From: Jim Henderson [mailto:[EMAIL PROTECTED]
  Sent: Monday 23 May 2005 19:02
  To: Tomcat Users List
  Subject: RE: confused about simple logging
 
 
 
  If I write to stdout where does that go?
 
  System.stdout.println(Where does this get printed to?);
 
  I assume C:/tomcat.../log/stdout?
 
  -Original Message-
  From: Steve Kirk [mailto:[EMAIL PROTECTED]
  Sent: Monday, May 23, 2005 12:28 PM
  To: 'Tomcat Users List'
  Subject: RE: confused about simple logging
 
 
 
  Your confusion possibly arises because there are at least 2
  types of logger
  that you might mean, and 3 main choices for one of those at
  the moment,
  although one of those 3 is deprecated and a second is
  probably becoming less
  popular.
 
  OK I'll take a quick stab and see if this gets you anywhere
  in the right
  direction.
 
  You mention two distinct types of logging.  The 1st is the
  hit logging
  which is very similar to what you would get from apache
  httpd.  This simply
  logs each incoming request.  This is achieved by adding a
  Valve to your
  %catalina_home%\conf\server.xml - you can embed it inside the
  Host/Host,
  Engine/Engine or Context/Context tags, but for your
  purposes, just
  shove it in the engine for now.  It looks a bit like this:
 
  Engine blah blah
  Valve
  className=org.apache.catalina.valves.FastCommonAccessLogValve
  directory=logs  prefix=ao_access_log_ suffix=.log
  pattern=common resolveHosts=false/
  /Engine
 
  You can tweak the path, filename, and the pattern that
  defines each line -
  see
  http://jakarta.apache.org/tomcat/tomcat-5.0-doc/config/valve.html
  for details.  Leave resolveHosts set false to speed up 
 performance.
 
  Not that my example above is from my own 5.5.9 server - ISTR
  5.0 config
  syntax is different - check the doc link above for the detail.
 
  The 2nd part of your logging is where you write your own 
 messages to a
  logfile.  I did that as follows:
 
  java.util.logging.Logger logger =
  java.util.logging.Logger.getLogger(logname);
  logger.setLevel(logLevel);
  fh = new FileHandler(logFilePath, maxLogFileSize, 
 logFileCount, true);
  fh.setFormatter(new AoLogFormatter(logFileDateTimePattern));
  logger.addHandler(fh);
 
  Then to write a log message you can just do this:
 
  log(Write this to the log);
 
  and it will write the log file to logFilePath
 
  See the java.util.logging.Logger javadocs for more details.
 
  This is very basic.  Much more spophistication can be 
 achieved through
  config files.
 
   -Original Message-
   From: Lane [mailto:[EMAIL PROTECTED]
   Sent: Monday 23 May 2005 18:01
   To: Tomcat Users List

RE: What happened to the searchable list archive?

2005-05-22 Thread Steve Kirk

GB developer, Robert and Tomi, thanks very much for pointing me to these
search sites.  I was not aware of any of them before, despite having
developed on TC for several years.  Perhaps there are more out there.

If anyone involved in producing the Tomcat project documentation is reading
this, I would suggest maybe linking these sites from the official mailing
list pages, as alternatives to the official archive?  I say this because,
with all due respect to those who voluntarily give their time to the
project, these search sites add search features do not seem to be currently
available from the official site pages.  I think most would agree that in
general it's better to have people search existing QA rather than repost
the same Q, and these sites seem to provide a good way to help people do
that.

 -Original Message 1 -
 From: GB Developer [mailto:[EMAIL PROTECTED] 
 Sent: Friday 20 May 2005 18:05
 To: 'Tomcat Users List'
 Subject: RE: What happened to the searchable list archive?
 
 
 I like marc.
 
 http://marc.theaimsgroup.com/?l=tomcat-userr=1w=2
 
 
 -Original Message 2 -
 From: Robert r. Sanders [mailto:[EMAIL PROTECTED] 
 Sent: Saturday 21 May 2005 04:27
 To: Tomcat Users List
 Subject: Re: What happened to the searchable list archive?
 
 
 You can also use:  http://dir.gmane.org/gmane.comp.jakarta.tomcat.user


 -Original Message 3 -
 From: tomi (sent by Nabble.com) [mailto:[EMAIL PROTECTED] 
 Sent: Saturday 21 May 2005 07:12
 To: tomcat-user@jakarta.apache.org
 Subject: Re: What happened to the searchable list archive?
 
 Nabble is also archiving this list and has a good search:
 http://www.nabble.com/Tomcat---User-f342.html
 



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



RE: What happened to the searchable list archive?

2005-05-22 Thread Steve Kirk
Hi Mark,

Eyebrowse was the place that I used to rely on for searching, when I was
active on the list up until a few months back.  When I returned to the list
last week, I found that eyebrowse no longer seemed to be in use, hence I
checked out the official TC site to see what might now replace it.

I started here: 
http://jakarta.apache.org/tomcat/index.html 

Then clicked mailing lists towards the bottom of the left hand menu, which
took me here: 
http://jakarta.apache.org/site/mail.html 

And from there I scrolled down to the Table of Contents section and
clicked the Tomcat link near the bottom of the page, which took me here: 
http://jakarta.apache.org/site/mail2.html#Tomcat 

Finally, from there I clicked archive under the list of tomcat-user links,
which took me here, which is what I think you are calling ASF, and what I
was referring to as the official archive: 
http://mail-archives.apache.org/mod_mbox/jakarta-tomcat-user 

The page above is fine for browsing archived messages, but I can't see a
search link like there used to be on eyebrowse.  Clearly you can use google
to site-search these archive pages, like you can on any site, but it's a
little unwieldy to use, hence why I started this thread.

In going through this all again so that I could quote the links above, I now
see that Marc's site and mail-archives are both already linked at a high
level from the generic apache mail archive page(
http://jakarta.apache.org/site/mail.html ), so apologies for not seeing
those earlier.  However, I didn't spot this the first few times I looked, so
I'd still suggest that in the interests of user friendliness, it might be
worth linking from the TC pages at http://jakarta.apache.org/tomcat more
directly to the search pages that I mentioned in my last post, as well as
any others, given that the official archive page does not seem to have its
own search.

Hope this helps, 

Steve.

 -Original Message-
 From: Mark Thomas [mailto:[EMAIL PROTECTED] 
 Sent: Sunday 22 May 2005 21:18
 To: Tomcat Users List
 Subject: Re: What happened to the searchable list archive?
 
 
 Steve Kirk wrote:
  If anyone involved in producing the Tomcat project 
 documentation is reading
  this, I would suggest maybe linking these sites from the 
 official mailing
  list pages, as alternatives to the official archive?
 
 Which pages are you talking about? If you can give me a URL I 
 can look 
 into getting it changed.
 
 For the record, eyebrowse is now disabled and ASF has moved over to 
 mod_mbox (http://mail-archives.apache.org/mod_mbox/)
 
 Mark
 
 -
 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: DBCP datasource works on 5.0.28 but fails on 5.5.9

2005-05-22 Thread Steve Kirk

Thanks again Nix, but latest mysql driver is *definitely* in
%catalina_home%\common\lib : 

C:\dir %catalina_home%\common\lib
 Volume in drive C is BOOT
 Volume Serial Number is D4DF-165E

 Directory of c:\jakarta-tomcat-5.5.9\common\lib

19/05/2005  19:25DIR  .
19/05/2005  19:25DIR  ..
11/05/2004  12:5454,829 activation.jar
26/03/2005  14:22   112,341 commons-el.jar
26/03/2005  14:22   918,743 jasper-compiler-jdt.jar
26/03/2005  14:22   383,134 jasper-compiler.jar
26/03/2005  14:2276,664 jasper-runtime.jar
26/03/2005  14:2250,493 jsp-api.jar
12/10/2004  13:20   347,137 mail.jar
14/04/2005  22:44   409,191 mysql-connector-java-3.1.8-bin.jar
26/03/2005  14:22   154,101 naming-factory-dbcp.jar
26/03/2005  14:2236,333 naming-factory.jar
26/03/2005  14:2246,606 naming-resources.jar
26/03/2005  14:2297,693 servlet-api.jar
  12 File(s)  2,687,265 bytes
   2 Dir(s)   2,182,369,280 bytes free



OK, so now I'm struggling.

So I'm going to take a punt and say that I think there may be some kind of
class loading problem.  I say this because:

- I have fresh installed TC, mysql and jdk; 
- mysql works from the command line using my datasource username/pw; 
- I have checked and rechecked my config a thousand times; 
- the mysql driver is in the right folder; 
- the error is suggestive of the fact that TC can't find the driver.

However, the driver it is there in the common/lib folder, plain for anyone
to see.  I can only assume this is to do with security/classloading.  I've
eliminated security, because TC runs as a service under the system account,
and I've checked that this account has read access to the file.

I'm almost tired of looking - if I can't solve it tomorrow, I'll be (very
reluctantly) setting aside TC 5.5 and carrying on with 5.0.28.  I don't want
to do that, because 5.0.28 has some sesssion management bugs I'd like to get
past, and also because I've now spent 3 days trying to make 5.5 work.

So, any help would be most gratefully received :)

Original post here for those that missed it: 
http://marc.theaimsgroup.com/?l=tomcat-userm=111660199623420w=2  

 -Original Message-
 From: Nikola Milutinovic [mailto:[EMAIL PROTECTED] 
 Sent: Saturday 21 May 2005 13:42
 To: Tomcat Users List
 Subject: Re: DBCP datasource works on 5.0.28 but fails on 5.5.9
 
 
 Steve Kirk wrote:
 
 Thanks nix.
 
   
 
 Could it be that you've missed the fact that 
 DataSource JNDI resource setup definition has changed in TC 
 5.5? It is 
 no longer with those 
 parametername.../namevalue.../value/parameter. 
 
 
 
 Yes I already changed that.  I used to use the approach you 
 mention in
 5.0.28, i.e.:
 
  ResourceParams name=jdbc/myResource
  parameter
  nameusername/name
  value.../value
  /parameter
  parameter
  namepassword/name
  value.../value
  /parameter
 
  etc
 
  /ResourceParams
 
 But noticed that the new 5.5 DBCP example used this approach:
 
 Resource username= password=...  etc /
 
 So I switched to that, but still no joy.
 
 PS does it actually say in the docs anywhere that the
 parametername.../namevalue.../value/parameter 
 approach is *NOT*
 valid in 5.5?  If so then I've missed some docs somewhere, 
 maybe there is
 other new stuff that I haven't seen.
   
 
 
 It definitely does not work in 5.5. I've used the config from 
 the docs 
 page with PostgreSQL and it worked. Other possible problem is 
 that the 
 driver class didn't load. Where have you placed the JDBC JAR? It goes 
 either in ${CATALINA_HOME}/common/lib since it must be 
 accessable to TC.
 
 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: DBCP datasource works on 5.0.28 but fails on 5.5.9

2005-05-22 Thread Steve Kirk
Lutz,

I started replying to yr post including my full config, had nearly finished,
then saw the problem - I had a leading space in the 'url' value within the
Resource tag of my context.xml file.  Grrr!  I must have included it by
accident when converting from the nested
ResourceParamsparameter/parameter/ResourceParams approach used in
TC5.0 to the single Resource/ tag approach favoured in TC5.5.

So basically Nix was right in his first post...

Thanks very much to both of you for your patient help.  Without your
prompting, I was ready to start first thing Monday by writing off 3 days'
upgrade effort by rolling back to 5.0.28, but now tomorrow is now looking
like being productive :)

 -Original Message-
 From: Lutz Zetzsche [mailto:[EMAIL PROTECTED] 
 Sent: Sunday 22 May 2005 22:42
 To: Tomcat Users List
 Subject: Re: DBCP datasource works on 5.0.28 but fails on 5.5.9
 
 
 Hi Steve,
 
 Am Sonntag, 22. Mai 2005 22:58 schrieb Steve Kirk:
  Thanks again Nix, but latest mysql driver is *definitely* in
  %catalina_home%\common\lib :
 
 Did you check that the MySQL driver is only there and not 
 additionally 
 in a second directory, i.e. WEB-INF/lib, which could confuse Tomcat?
 
 
  - mysql works from the command line using my datasource username/pw;
 
 Are you really using the correct URL to connect to the database? Are 
 host name, port and database name ok? I.e. the database name is 
 case-sensitive (at least on Linux, check it on Windows)!
 
 Are you running Tomcat with Security Manager? Then you may 
 have missed 
 to set the necessary security rules for connecting.
 
 
  I'm almost tired of looking - if I can't solve it tomorrow, I'll be
  (very reluctantly) setting aside TC 5.5 and carrying on 
 with 5.0.28. 
  I don't want to do that, because 5.0.28 has some sesssion management
  bugs I'd like to get past, and also because I've now spent 3 days
  trying to make 5.5 work.
 
 Perhaps you can post your exact configuration here, 
 anonymizing user and 
 password values. What did you configure where? I.e. where is the 
 context file in which you did the relevant entry? Etc.
 
 
 Bet wishes
 
 Lutz
 
 -
 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: Re: Problems with filters in 5.5.9?

2005-05-22 Thread Steve Kirk

Can you say more about how you upgraded?  Specifically, were you very
careful to migrate your config files across?

 -Original Message-
 From: Brandon Dove [mailto:[EMAIL PROTECTED] 
 Sent: Monday 23 May 2005 02:14
 To: Lutz Zetzsche
 Subject: Re: Re: Problems with filters in 5.5.9?
 
 
 Lutz -- thanks for the help but unfortunately even after copying
 the jar to the $TOMCAT_HOME/common/lib/ directory I still am
 having problems. :(
 
 Anyone else have any ideas?
 
 Cheers,
 
 Brandon
 
  On Sat, 21 May 2005, Lutz Zetzsche
 ([EMAIL PROTECTED]) wrote:
 
  Hi Brandon,
  
  Am Freitag, 20. Mai 2005 23:01 schrieb Brandon Dove:
   I recently upgraded from 5.5.4 - 5.5.9. Now when starting
 my
   app I get the error:
  
   May 20, 2005 4:28:10 PM
 org.apache.catalina.core.StandardContext
   filterStart
   SEVERE: Exception starting filter addressFilter
   java.lang.ClassNotFoundException:
   com.mycompany.servlet.AddressFilter
   [...]
   May 20, 2005 4:28:10 PM
 org.apache.catalina.core.StandardContext
   start
   SEVERE: Error filterStart
  
   AddressFilter is located in a JAR that can be found in
   /webapps/WEB-INF/lib (as usual) so I'm not sure why it can't
   find the class?
  
   Any ideas?
  
  It is strange that this error didn't occur with Tomcat 5.5.4
 if I am 
  right with my following assumption:
  
  From my point of view, your address filter 
  com.mycompany.servlet.AddressFilter must be visible to the
 Tomcat class 
  org.apache.catalina.core.StandardContext.
  
  According to the class loader how-to explaining the class
 loading tree, 
  such classes that has to be visible to Tomcat classes cannot
 be placed 
  in the shared or WebappX directories:
  
 
   
 http://jakarta.apache.org/tomcat/tomcat-5.5-doc/class-loader-h
owto.html
 
 Try to put your address filter into the common directory. If I
am right 
 this should work after a server restart.
 
 
 Best wishes
 
 Lutz
 

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



Get your own 800 number
Voicemail, fax, email, and a lot more
http://www.ureach.com/reg/tag

-
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: problem: Session invalidation in the servlet accessed via foreign context

2005-05-22 Thread Steve Kirk

I'm not sure why you think there is a problem with invalidation.  I'm no
expert, but I'm not sure that I would expect the code below to work, because
by default, servlets must not share sessions between webapps, and you are
asking that a client request to one context is passed to another, and still
the session data is available.  Withouht single sign-on, I would have
thought that sessions will not be shared.

I've just flipped through the 2.4 servlet spec.  Section SRV.7.3 says
something very specific about your scenario, as follows: if a servlet uses
the RequestDispatcher to call a servlet in another Web application, any
sessions created for and visible to the servlet being called must be
different from those visible to the calling servlet.

I appreciate that you are also saying that v3/v4 behaved differently - but
are you sure that the config of those versions was not different, perhaps
they were configured to share sessions (single sign-on)?  I'm not sure on
the detail of earlier versions of the servlet spec, but perhaps session
behaviour was defined differently in previous versions.  You could find out
with a google search, or maybe someone else will answer

 -Original Message-
 From: Akoulov, Alexandre [IT] 
 [mailto:[EMAIL PROTECTED] 
 Sent: Monday 23 May 2005 01:29
 To: Tomcat Users List
 Subject: RE: problem: Session invalidation in the servlet 
 accessed via foreign context 
 
 
 Thanks a lot, Steve, for your reply.
 
 No, I am not using SingleSignOn neither hoping to share the 
 same session across contexts.
 
 The only thing I was testing is that I could invalidate and 
 then create a new session in different scenarios. 
 
 I ran the test with the java debugger and could observe that 
 when invalidating/creating a session in ForeignContextServlet 
 it in fact did not create a new session and left us with the 
 reference to old (ie invalidated) session after line No.3.
 
 My next step is start looking into the tomcat source code to 
 try to work out what's happening. Do you think it's best way 
 to approach this issue?
 
 
 Thanks again,
 
 Alex.
 
 -Original Message-
 From: Steve Kirk [mailto:[EMAIL PROTECTED]
 Sent: Monday, 23 May 2005 10:18 AM
 To: 'Tomcat Users List'
 Subject: RE: problem: Session invalidation in the servlet accessed via
 foreign context 
 
 
 
 I'm not sure I fully understand this issue, but seeing as 
 no-one else seems
 to have replied yet, maybe a few Qs might help you work through it:
 
 Are you hoping that both contexts will share their sessions?
 
 Are you using the SingleSignOn feature in server.xml?
 
 When you say that ForeignContextServlet does not create a new session
 object, are you explicitly testing that within 
 ForeignContextServlet itself,
 or from a servlet in another context (e.g. DebuggerServlet)?  i.e. is
 null==session after step 3?
 
 You say that the session is invalid/null after line 2, but 
 have you tested
 that it was valid/non-null before line 2?
 
  -Original Message-
  From: Akoulov, Alexandre [IT] 
  [mailto:[EMAIL PROTECTED] 
  Sent: Monday 23 May 2005 00:43
  To: tomcat-user@jakarta.apache.org
  Subject: Re: problem: Session invalidation in the servlet 
  accessed via foreign context 
  
  
  Hi all,
  
  I'd greatly appreciate if you could shed a ray of light on 
  the following problem ( see below)
  
  
  
  -Original Message-
  From: Akoulov, Alexandre [IT] 
  Sent: Friday, 20 May 2005 11:15 AM
  To: Tomcat Users List
  Subject: problem: Session invalidation in the servlet accessed via
  foreign context 
  
  
  Hi all,
  
  It seems that there is a problem with session invalidation in 
  tomcat5.0. Please refer to the explanation below:
  
  
  1. HttpSession session = req.getSession(true); // get 
  existing user session or create one if does not exist
  2. session.invalidate(); // invalidate user session 
  
  3. session = req.getSession(true); // create a new session ( 
  ie a valid session)   
 
  The above three lines of code are commonly used to invalidate 
  the user session and then create a new one. Tomcat implements 
  this behaviour by creating a new session object in line No.3.
  However, in tomcat5.0 implementation (5.0.28) when the above 
  code is accessed via foreign context it does not create a new 
  session object and therefore a session is still invalid after 
  lineNo.3 is executed. The following code demonstrates the 
  problem:  
 
 
  // servlet that runs in the same tomcat instance but in a 
  different context to DebuggerServlet's context
  public class ForeignContextServlet extends HttpServlet {
   public void doGet(HttpServletRequest req, 
  HttpServletResponse res) 
   throws ServletException, IOException {
   
   HttpSession session

RE: Mysterious failures

2005-05-22 Thread Steve Kirk

What is your actual logging config?

Hazy memory, but don't you want debug=99 rather than debug=1 to get more
detail?

If you really can't get logging to work, you could insert
System.out.println(blah) statements at key points around where you think
the crash might be caused, in lieu of your log statements.  Not pretty but
it can get you results.

Some Qs to narrow it down a bit:

Is the crash triggered by a single type of request, or maybe a burst of
traffic, or will it crash even with no requests?

Is the crashing request direct to TC or via apache httpd?

Is a TC html error page generated, what does it say?

Do you start any of your own threads?

Does your code always return pooled objects to the pool?

 Is there some app that people use to make sure the server stays up by
 checking it every so often and restarting if needed?

I've never come across that.  TC is pretty reliable, shouldn't need it IMHE.

 -Original Message-
 From: Grant Ingersoll [mailto:[EMAIL PROTECTED] 
 Sent: Monday 23 May 2005 02:39
 To: tomcat-user@jakarta.apache.org
 Subject: Mysterious failures
 
 
 Hi,
 
 Have been a long time user of TC, but first time poster.  
 
 I am running 5.0.28 on OS X with PostgreSQL and Struts and connecting
 to Apache using mod_jk.  I have a webapp deployed that is pretty
 mature.  However, I am having some mysterious crashes of Tomcat that I
 haven't been able to get my head around.  The whole process is dying
 w/o so much as a peep.  Not one single log/exception is being written
 anywhere (as far as I know) that gives even the most remote clue as to
 why and I am at a loss for how to get at the problem.
 
 Here is what I have done to date:
 1. Put a catch (Throwable) with a log message at my top level part of
 the servlet that logs the exception and then throws it out.
 
 2. I have turned on DEBUG level logging for every piece of 
 the application
 
 3. I have set debug=1 everywhere I could in server.xml
 
 Anyone have any suggestions on what else to do for debugging this? 
 Part of me feels that it might be JDBC related as I am not using the
 Tomcat JNDI lookup methods for getting connections (but am managing a
 pool myself).  Should I be using the JNDI lookup methods for getting
 connections?  My only other guess was that it seems to happen after it
 has been running for a little while and I thought it might have
 something to do with the session timeout stuff, but I can't see why
 that would cause the process to exit.
 
 Is there some app that people use to make sure the server stays up by
 checking it every so often and restarting if needed?
 
 Thanks for any advice,
 Grant
 
 -
 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]



What happened to the searchable list archive?

2005-05-20 Thread Steve Kirk

It's been a few months since I've been active on the list, and the list
archive seems to have changed in that time, could someone please advise?

I used to search the list archives here: 
http://nagoya.apache.org/eyebrowse/[EMAIL PROTECTED]
pache.org 

But that archive appears to contain very few of the current messages (e.g.
only 7 from April, none at all for this month), is there a reason for that?
It appears to have gone quiet after Jan 2005 for some reason, see here: 
http://nagoya.apache.org/eyebrowse/[EMAIL PROTECTED]
a.apache.org 

I see that there is an archive here now 
http://mail-archives.apache.org/mod_mbox/jakarta-tomcat-user 
but it doesn't appear to be searchable...?

Of course we can use google site search to search this list, but it's not
quite the same thing because you can't select a list to search.  Also the
thread browsing is not as easy from this archive, once you have found a post
via google.



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



DBCP datasource works on 5.0.28 but fails on 5.5.9

2005-05-20 Thread Steve Kirk

I know that DBCP is a common problem discussed on this list - I have been
helped, and have helped other people, with it before. So before posting this
message, I have recently re-read the 5.5 release notes and 5.0/5.5 DBCP/JNDI
how-to docs and checked the list archives.  But can't find a solution to my
current problem.

Until recently I had a working webapp running on tomcat 5.0.28 with
connector/j 3.1.7 and mysql 4.1.11-nt, all on windows XP and jdk1.4.2_08.
The app uses container-managed commons DBCP for all its database access.

The DBCP resource config has been set up and working unchanged for a long
time on various builds of TC 5.0.  I have it set up like this:

ResourceParams defined in context.xml, in war file's META-INF folder
resource-ref declared in web.xml in war file's WEB-INF folder
The connector/j jar file is in tomcat's /common/lib folder
name of JNDI resource matches in ResourceParams, resource-ref and Java
source code.

This all works on TC5.0.28 / JDK1.4.2_08.  However, I am attempting to
upgrade to TC 5.5.9 / JDK1.5.0_02.  I did a fresh install of both of these
to standard directories, recompiled the webapp for jdk1.5, and deployed it
with the same config files and setup above from TC 5.0.28. However the
webapp now reports an error when requesting a connection from the pool, see
stacktrace below (from the TC stdout logfile under TC logs directory).

I tried changing my context.xml so that the params are all pairs of
name=value within a single Resource/ tag, as now seems to be preferred
in the 5.5 DBCP how-to, rather than my original nested set of tags under
ResourceParams, which was the approach used in the 5.0 equivalent how-to.
But still no joy.

I also tried upgrading to connector/j 3.1.8, no joy there either.

When TC starts up, the webapp deploys OK from its war file, and the
context.xml is copied to the /conf/[engine]/[host]/ folder OK, without any
parsing errors logged.  The connection pool initially seems to work, in the
sense that this code executes OK: 
Context ctx = new InitialContext();
String resourceString = java:comp/env/jdbc/ +
config.getString(ConfigConstants.JNDI_DATABASE_RESOURCE_NAME);
DataSource pool = (DataSource)ctx.lookup(resourceString);

However, an Exception is thrown the first time that I do this: 
Connection conn = pool.getConnection();

I'm stumped after hours working on this.  I've read through all the docs,
how-tos, and release notes that I can find, and searched the mail list
archives on mysql and tomcat sites, as well as googling various searches.
Has anyone had this problem themselves or have any insight to offer please?

Thanks,

Steve.
-
Exception caught when establishing/testing database pool
cause[0]: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC
driver of class '' for connect URL 'null'
 at
org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource
.java:780)
 at
org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSource.ja
va:540)
 at core.sql.SqlQuery.prepare(SqlQuery.java:80)
 at core.sql.SqlQuery.executeSingleValue(SqlQuery.java:133)
 at core.servlet.Invoker.setUpDataSource(Invoker.java:325)
 at core.servlet.Invoker.init(Invoker.java:129)
 at
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:10
91)
 at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:925)
 at
org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:
3857)
 at
org.apache.catalina.core.StandardContext.start(StandardContext.java:4118)
 at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:7
59)
 at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739)
 at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524)
 at
org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:589)
 at
org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:536
)
 at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:471)
 at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1102)
 at
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
 at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSuppor
t.java:119)
 at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1020)
 at org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
 at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1012)
 at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442)
 at org.apache.catalina.core.StandardService.start(StandardService.java:450)
 at org.apache.catalina.core.StandardServer.start(StandardServer.java:683)
 at org.apache.catalina.startup.Catalina.start(Catalina.java:537)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at
sun.reflect.NativeMethodAccessorImpl.invoke

RE: DBCP datasource works on 5.0.28 but fails on 5.5.9

2005-05-20 Thread Steve Kirk
Thanks nix.

 Could it be that you've missed the fact that 
 DataSource JNDI resource setup definition has changed in TC 
 5.5? It is 
 no longer with those 
 parametername.../namevalue.../value/parameter. 

Yes I already changed that.  I used to use the approach you mention in
5.0.28, i.e.:

ResourceParams name=jdbc/myResource
parameter
nameusername/name
value.../value
/parameter
parameter
namepassword/name
value.../value
/parameter

etc

/ResourceParams

But noticed that the new 5.5 DBCP example used this approach:

Resource username= password=...  etc /

So I switched to that, but still no joy.

PS does it actually say in the docs anywhere that the
parametername.../namevalue.../value/parameter approach is *NOT*
valid in 5.5?  If so then I've missed some docs somewhere, maybe there is
other new stuff that I haven't seen.



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



RE: DBCP datasource works on 5.0.28 but fails on 5.5.9

2005-05-20 Thread Steve Kirk

Thanks lutz, that's in fact exactly how I now have it.  I have also deleted
the webapp (and the context xml file under /conf) and recompiled/restarted,
to make sure the new context config is loaded, but still no joy.

 -Original Message-
 From: Lutz Zetzsche [mailto:[EMAIL PROTECTED] 
 Sent: Friday 20 May 2005 16:59
 To: Tomcat Users List
 Subject: Re: DBCP datasource works on 5.0.28 but fails on 5.5.9
 
 
 Hi,
 
 Am Freitag, 20. Mai 2005 17:22 schrieb Nikola Milutinovic:
  Steve Kirk wrote:
  This most commonly means that the definition of the DataSource
  resource lacks driver definition. Could it be that you've missed the
  fact that DataSource JNDI resource setup definition has 
 changed in TC
  5.5? It is no longer with those
  parametername.../namevalue.../value/parameter. Check it
  out.
 
 This is exactly what I would guess, too. From Tomcat 5.0 to 5.5, the 
 Resource element syntax has changed. It is now like:
 
 Resource
 name=...
 auth=Container
 type=javax.sql.DataSource
 driverClassName=...
 url=jdbc:...
 username=...
 password=...
 maxActive=20
 maxIdle=10
 maxWait=-1
 
 removeAbandoned=true
 removeAbandonedTimeout=300
 logAbandoned=true /
 
 
 Best wishes
 
 Lutz



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



RE: What happened to the searchable list archive?

2005-05-20 Thread Steve Kirk

Thanks - great site.  Just what I was looking for.

 -Original Message-
 From: GB Developer [mailto:[EMAIL PROTECTED] 
 Sent: Friday 20 May 2005 18:05
 To: 'Tomcat Users List'
 Subject: RE: What happened to the searchable list archive?
 
 
 I like marc.
 
 http://marc.theaimsgroup.com/?l=tomcat-userr=1w=2
 
 
 
  -Original Message-
  From: Steve Kirk [mailto:[EMAIL PROTECTED] 
  Sent: Friday, May 20, 2005 8:14 AM
  To: tomcat-user@jakarta.apache.org
  Subject: What happened to the searchable list archive?
  
  
  
  It's been a few months since I've been active on the list, 
  and the list archive seems to have changed in that time, 
  could someone please advise?
  
  I used to search the list archives here: 
  http://nagoya.apache.org/eyebrowse/SearchList?listName=tomcat-
 [EMAIL PROTECTED]
 pache.org 
 
 But that archive appears to contain very few of the current 
 messages (e.g.
 only 7 from April, none at all for this month), is there a 
 reason for that?
 It appears to have gone quiet after Jan 2005 for some reason, 
 see here: 
 http://nagoya.apache.org/eyebrowse/SummarizeList?listName=tomc
[EMAIL PROTECTED]
a.apache.org 

I see that there is an archive here now 
http://mail-archives.apache.org/mod_mbox/jakarta-tomcat-user 
but it doesn't appear to be searchable...?

Of course we can use google site search to search this list, but it's not
quite the same thing because you can't select a list to search.  Also the
thread browsing is not as easy from this archive, once you have found a post
via google.



-
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: UTF-8 Problem with Tomcat 5.0.27 and POST

2005-05-12 Thread Steve Bosman
On 5/10/05, Bernhard v. Fromberg [EMAIL PROTECTED] wrote:
 Hi all,
 
 I desperatly try to POST UTF-8 data to an application using struts.
 GET method works perfectly fine, but post does not.
 I am using CharacterEncodingFilter
 All pages have Content-Type header
 
 java1.5.0 update 2
 Tomcat 5.0.27
 various Un*x systems.
 
I think this might be a similar question to one I asked recently and
the following helped me

-- Forwarded message --
From: Mark Thomas [EMAIL PROTECTED]
Date: Apr 6, 2005 4:14 PM
Subject: Re: URL encoding/decoding of UTF-8 characters
- Hide quoted text -
To: Tomcat Users List tomcat-user@jakarta.apache.org

It is a lack of agreed standard problem. You can force Tomcat to use
UTF-8 encoding by setting the URIEncoding parameter on the connector.
There are some other parameters that you can set as well. See
http://jakarta.apache.org/tomcat/tomcat-5.0-doc/config/http.html
-- End Forwarded message --

Using link in this mail from the tomcat user maiIing list I have
changed my connector settings to:
   Connector port=8080
  maxThreads=150 minSpareThreads=25 maxSpareThreads=75
  enableLookups=false redirectPort=8443 acceptCount=100
  debug=0 connectionTimeout=2
  disableUploadTimeout=true URIEncoding=UTF-8 /
   Connector port=8443
  maxThreads=150 minSpareThreads=25 maxSpareThreads=75
  enableLookups=false disableUploadTimeout=true
  acceptCount=100 debug=0 scheme=https secure=true
  clientAuth=false sslProtocol=TLS URIEncoding=UTF-8 /
That is I have added URIEncoding=UTF-8 and characters are now
decoded correctly.

Steve

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



tomcat System Administrator's Guide and SysAdmin tools

2005-05-09 Thread Steve Jacobson
All,
 We have been looking for a comprehensive System Administrator's Guide 
for Tomcat, that looks at Tomcat from the perspective of a System 
Administrator that needs to deploy tomcat and applications on tomcat.  
Most of what we have googled concentrates on deploying tomcat for a 
developer, or a development environment.  Many SysAdmins don't actually 
speak java, though, and would be looking for a guide to be able to 
support java applications on their servers without having to become java 
experts themselves.

 We are also looking for any tools that might be used to verify a 
successful installation of tomcat, beyond the index.jsp, and manager and 
admin tools.  Has anyone written anything that goes through and makes 
sure that tomcat is installed correctly, and that everything is set up 
properly, as an installation verification tool?

 For both the documentation, and the tools, if we can't find anything 
that I think fully addresses this need, we will take a stab at producing 
both.  Does anyone have any thoughts / suggestions / requests, etc... 
for such documentation and tools to include?  Also, do people think that 
there might be a place within the tomcat documentation and distribution 
for these, or should we just target making them available on our own site?

Thanks for your help.
-Steve J
--
Steve Jacobson
Support Manager
SourceLabs, Inc.
[EMAIL PROTECTED]
(206) 322-0099 x110
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Serving files using tomcat

2005-05-05 Thread Steve Vanspall
Ok thanks,

Well I have worked it out,

it turns out I needed the header

response.setHeader(Content-disposition,attachment;
filename=\report.pdf\);

added, this made it work.

So now the problem id that Internet Explorer flashes up the Open, Save,
Cance dialog box twice. Once the second one flashes up the first dissapears
so I am not too concerned. But wondering if this is a quirk, or have I done
something wrong.

My code is now

   fis = new FileInputStream(rf.getPdf());
   response.setContentType(application/pdf);
   response.setContentLength(FileUtils.countBytes(rf.getPdf())); // may
be overkill thought it may be misreporting the file length.
   response.setHeader(Content-disposition,attachment;
filename=\report.pdf\);
   dos = response.getOutputStream();

   int read = -1;
   byte[] bytes = new byte[10];
   while((read = fis.read(bytes)) != -1)
dos.write(bytes, 0, read);
   dos.flush();
   return null;

- Original Message -
From: David B. Saul [EMAIL PROTECTED]
To: 'Tomcat Users List' tomcat-user@jakarta.apache.org
Sent: Thursday, May 05, 2005 6:43 AM
Subject: RE: Serving files using tomcat


May not be critical but try using the ServletOutputStream instead of
OutputStream.
DOC URL:
http://java.sun.com/j2ee/1.4/docs/api/javax/servlet/ServletResponse.html


//Clear content of the underlying buffer in the response
//without clearing headers or status code.
response.resetBuffer();
response.setContentLength(output.length);

//Returns a ServletOutputStream suitable for writing binary data in the
response.
//The servlet container does not encode the binary data.
ServletOutputStream os = response.getOutputStream();
os.write(output);
os.close();

Additionally, append   pdf=.pdf\   to the URL.





-Original Message-
From: Anhony [mailto:[EMAIL PROTECTED]
Sent: Wednesday, May 04, 2005 9:20 AM
To: Tomcat Users List
Subject: Re: Serving files using tomcat


I use this code and it works in my app. Their are small differences between
how we copy the data to the response output. I don't know for sure, but this

may account for why the fragment I posted works.

The difference is small, I think it would be worth giving it a try.

AS-


- Original Message -
From: Steve Vanspall [EMAIL PROTECTED]
To: Tomcat Users List tomcat-user@jakarta.apache.org
Sent: Wednesday, May 04, 2005 11:47 AM
Subject: Re: Serving files using tomcat


 Unfortunately that is what I do

 OutputStream dos = null;
FileInputStream fis = null;
   try
   {
fis = new FileInputStream(rf.getPdf());
response.setContentType(application/pdf);
response.setContentLength((int) rf.getPdf().length());
//response.setHeader(response.)
dos = response.getOutputStream();

int read = -1;
byte[] bytes = new byte[10];
while((read = fis.read(bytes)) != -1)
 dos.write(bytes, 0, read);
dos.flush();
return mapping.findForward(PDF);
   } catch (Exception e)
   {
// TODO Auto-generated catch block
if(e instanceof SocketException)
 return mapping.findForward(reload);
throw new IOException(e.toString());
   }
   finally
   {

if(dos != null)
 dos.close();
if(fis != null)
 fis.close();


   }

 Acrobat now loads but the PDF doesn't appear.

 Probably worth mentioning that I use struts, so I forward to a blank
 page with the content type set to application/pdf, maybe that is the
 problem, but not sure what else to do with the return.

 When I do the same thing with a dynamic image and forward to a page
 with a jpg content type, the image appears without a problem.

 Steve
 - Original Message -
 From: Anhony [EMAIL PROTECTED]
 To: Tomcat Users List tomcat-user@jakarta.apache.org
 Sent: Thursday, May 05, 2005 1:02 AM
 Subject: Re: Serving files using tomcat


 Greetings,

 Take a look at the code fragment below. It should serve as a good
 starting
 point.
 I hope this helps.

 AS-

 private void processPDFRequest(HttpServletRequest request,
 HttpServletResponse response) throws ServletException, IOException,
 Exception
 {
 int bytesCopied = 0;

 FileInputStream fin = null;
 OutputStream out = null;

 String fileAddress = The fully qualified path to your PDF file;
 if( fileAddress == null )
 return;

 int ext = fileAddress.lastIndexOf( '.' );
 if( ext != -1 )
 {
 ext = fileAddress.substring( ext+1,
 fileAddress.length() ).toLowerCase();

 if( ext == pdf )
 response.setContentType(application/pdf);
 else
 Do whatever you think best to do
 }
 else
 Do whatever you think best to do

 try
 {
 out = response.getOutputStream();
 fin = new FileInputStream( fileAddress );
 bytesCopied = StreamCopier.copy( fin, out );
 }
 finally
 {
 if( fin != null

Serving files using tomcat

2005-05-04 Thread Steve Vanspall
Hi,

I have been looking around and haven't found a solution that works

basically I have a PDF that gets created dynamically. Now to save memory I have 
the PDF written to a file rather than a ByteArray. The only way I can be sure 
that I wont encounter errors creating the file is to use File.createTempFile. 
The creation goes of ok. And I have checked the file itself and the PDF looks 
great.

How do i now serve this to the user who has requested it. If I try to write it 
to the response (using the same method I use to creare dynamic image, this 
works), it just shows up a blank screen. 

The problem also is, even if it did show the PDF, acrobat, to my understand 
will read only chunks of the stream and will go pack to get more. Thisis a 
problem because there is nothing to go back for.

So the point, 

If I can just redirect the browser to a file in the tomcat temp directory (can 
I do that, will the use have access to that directory), then how do I translate 
the location of the temp directory to a url that is accesible outside. 

If not then what other suggestions can people give me.

Thanks in advance

Steve

Re: Serving files using tomcat

2005-05-04 Thread Steve Vanspall
Unfortunately that is what I do

OutputStream dos = null;
FileInputStream fis = null;
   try
   {
fis = new FileInputStream(rf.getPdf());
response.setContentType(application/pdf);
response.setContentLength((int) rf.getPdf().length());
//response.setHeader(response.)
dos = response.getOutputStream();

int read = -1;
byte[] bytes = new byte[10];
while((read = fis.read(bytes)) != -1)
 dos.write(bytes, 0, read);
dos.flush();
return mapping.findForward(PDF);
   } catch (Exception e)
   {
// TODO Auto-generated catch block
if(e instanceof SocketException)
 return mapping.findForward(reload);
throw new IOException(e.toString());
   }
   finally
   {

if(dos != null)
 dos.close();
if(fis != null)
 fis.close();


   }

Acrobat now loads but the PDF doesn't appear.

Probably worth mentioning that I use struts, so I forward to a blank page
with the content type set to application/pdf, maybe that is the problem, but
not sure what else to do with the return.

When I do the same thing with a dynamic image and forward to a page with a
jpg content type, the image appears without a problem.

Steve
- Original Message -
From: Anhony [EMAIL PROTECTED]
To: Tomcat Users List tomcat-user@jakarta.apache.org
Sent: Thursday, May 05, 2005 1:02 AM
Subject: Re: Serving files using tomcat


 Greetings,

 Take a look at the code fragment below. It should serve as a good starting
 point.
 I hope this helps.

 AS-

 private void processPDFRequest(HttpServletRequest request,
 HttpServletResponse response) throws ServletException, IOException,
 Exception
 {
 int bytesCopied = 0;

 FileInputStream fin = null;
 OutputStream out = null;

 String fileAddress = The fully qualified path to your PDF file;
 if( fileAddress == null )
 return;

 int ext = fileAddress.lastIndexOf( '.' );
 if( ext != -1 )
 {
 ext = fileAddress.substring( ext+1,
 fileAddress.length() ).toLowerCase();

 if( ext == pdf )
 response.setContentType(application/pdf);
 else
 Do whatever you think best to do
 }
 else
 Do whatever you think best to do

 try
 {
 out = response.getOutputStream();
 fin = new FileInputStream( fileAddress );
 bytesCopied = StreamCopier.copy( fin, out );
 }
 finally
 {
 if( fin != null )
 fin.close();
 if( out != null )
 {
 out.flush();
 out.close();
 }
 }
 }


 - Original Message -
 From: Steve Vanspall [EMAIL PROTECTED]
 To: Tomcat User List tomcat-user@jakarta.apache.org
 Sent: Wednesday, May 04, 2005 9:29 AM
 Subject: Serving files using tomcat


 Hi,

 I have been looking around and haven't found a solution that works

 basically I have a PDF that gets created dynamically. Now to save memory I
 have the PDF written to a file rather than a ByteArray. The only way I can
 be sure that I wont encounter errors creating the file is to use
 File.createTempFile. The creation goes of ok. And I have checked the file
 itself and the PDF looks great.

 How do i now serve this to the user who has requested it. If I try to
write
 it to the response (using the same method I use to creare dynamic image,
 this works), it just shows up a blank screen.

 The problem also is, even if it did show the PDF, acrobat, to my
understand
 will read only chunks of the stream and will go pack to get more. Thisis a
 problem because there is nothing to go back for.

 So the point,

 If I can just redirect the browser to a file in the tomcat temp directory
 (can I do that, will the use have access to that directory), then how do I
 translate the location of the temp directory to a url that is accesible
 outside.

 If not then what other suggestions can people give me.

 Thanks in advance

 Steve



 -
 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: Serving files using tomcat

2005-05-04 Thread Steve Vanspall
Yes i see no difference,

I assume StreamCopier.copy() just does what my code does. I cannot find it
in any of the standard jars, so I assume this is one of your own.

Other than that everything else seems to be fine.

Oh well I am sure I will owrk it out

Steve
- Original Message -
From: Anhony [EMAIL PROTECTED]
To: Tomcat Users List tomcat-user@jakarta.apache.org
Sent: Thursday, May 05, 2005 2:19 AM
Subject: Re: Serving files using tomcat


 I use this code and it works in my app. Their are small differences
between
 how we copy the data to the response output. I don't know for sure, but
this
 may account for why the fragment I posted works.

 The difference is small, I think it would be worth giving it a try.

 AS-


 - Original Message -
 From: Steve Vanspall [EMAIL PROTECTED]
 To: Tomcat Users List tomcat-user@jakarta.apache.org
 Sent: Wednesday, May 04, 2005 11:47 AM
 Subject: Re: Serving files using tomcat


  Unfortunately that is what I do
 
  OutputStream dos = null;
 FileInputStream fis = null;
try
{
 fis = new FileInputStream(rf.getPdf());
 response.setContentType(application/pdf);
 response.setContentLength((int) rf.getPdf().length());
 //response.setHeader(response.)
 dos = response.getOutputStream();
 
 int read = -1;
 byte[] bytes = new byte[10];
 while((read = fis.read(bytes)) != -1)
  dos.write(bytes, 0, read);
 dos.flush();
 return mapping.findForward(PDF);
} catch (Exception e)
{
 // TODO Auto-generated catch block
 if(e instanceof SocketException)
  return mapping.findForward(reload);
 throw new IOException(e.toString());
}
finally
{
 
 if(dos != null)
  dos.close();
 if(fis != null)
  fis.close();
 
 
}
 
  Acrobat now loads but the PDF doesn't appear.
 
  Probably worth mentioning that I use struts, so I forward to a blank
page
  with the content type set to application/pdf, maybe that is the problem,
  but
  not sure what else to do with the return.
 
  When I do the same thing with a dynamic image and forward to a page with
a
  jpg content type, the image appears without a problem.
 
  Steve
  - Original Message -
  From: Anhony [EMAIL PROTECTED]
  To: Tomcat Users List tomcat-user@jakarta.apache.org
  Sent: Thursday, May 05, 2005 1:02 AM
  Subject: Re: Serving files using tomcat
 
 
  Greetings,
 
  Take a look at the code fragment below. It should serve as a good
  starting
  point.
  I hope this helps.
 
  AS-
 
  private void processPDFRequest(HttpServletRequest request,
  HttpServletResponse response) throws ServletException, IOException,
  Exception
  {
  int bytesCopied = 0;
 
  FileInputStream fin = null;
  OutputStream out = null;
 
  String fileAddress = The fully qualified path to your PDF
file;
  if( fileAddress == null )
  return;
 
  int ext = fileAddress.lastIndexOf( '.' );
  if( ext != -1 )
  {
  ext = fileAddress.substring( ext+1,
  fileAddress.length() ).toLowerCase();
 
  if( ext == pdf )
  response.setContentType(application/pdf);
  else
  Do whatever you think best to do
  }
  else
  Do whatever you think best to do
 
  try
  {
  out = response.getOutputStream();
  fin = new FileInputStream( fileAddress );
  bytesCopied = StreamCopier.copy( fin, out );
  }
  finally
  {
  if( fin != null )
  fin.close();
  if( out != null )
  {
  out.flush();
  out.close();
  }
  }
  }
 
 
  - Original Message -
  From: Steve Vanspall [EMAIL PROTECTED]
  To: Tomcat User List tomcat-user@jakarta.apache.org
  Sent: Wednesday, May 04, 2005 9:29 AM
  Subject: Serving files using tomcat
 
 
  Hi,
 
  I have been looking around and haven't found a solution that works
 
  basically I have a PDF that gets created dynamically. Now to save
memory
  I
  have the PDF written to a file rather than a ByteArray. The only way I
  can
  be sure that I wont encounter errors creating the file is to use
  File.createTempFile. The creation goes of ok. And I have checked the
file
  itself and the PDF looks great.
 
  How do i now serve this to the user who has requested it. If I try to
  write
  it to the response (using the same method I use to creare dynamic
image,
  this works), it just shows up a blank screen.
 
  The problem also is, even if it did show the PDF, acrobat, to my
  understand
  will read only chunks of the stream and will go pack to get more.
Thisis
  a
  problem because there is nothing to go back for.
 
  So the point,
 
  If I can just redirect the browser to a file in the tomcat temp
directory
  (can I do that, will the use have access to that directory), then how
do
  I

Error Redirection

2005-05-01 Thread Steve Vanspall
Hi there,

This is probably an obvious question, but if a JSP or some other error occurs 
that would usually make tomcat do a printStackTrace() into HTML and display it 
on the browser. 

e.g

--

HTTP Status 500 -




type Exception report

message

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

exception

java.lang.NullPointerException
at com.crm.web.form.EditSupplierForm.validate(EditSupplierForm.java:46)
at
org.apache.struts.action.RequestProcessor.processValidate(RequestProcessor.j
ava:912)
at
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:255)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1422)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:523)
at javax.servlet.http.HttpServlet.service(HttpServlet.java)
at javax.servlet.http.HttpServlet.service(HttpServlet.java)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Unknown
Source)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(Unknown Source)
at org.apache.catalina.core.StandardWrapperValve.invoke(Unknown Source)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(Unknown Source)
at org.apache.catalina.core.StandardPipeline.invoke(Unknown Source)
at org.apache.catalina.core.ContainerBase.invoke(Unknown Source)
at org.apache.catalina.core.StandardContextValve.invoke(Unknown Source)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(Unknown Source)
at org.apache.catalina.core.StandardPipeline.invoke(Unknown Source)
at org.apache.catalina.core.ContainerBase.invoke(Unknown Source)
at org.apache.catalina.core.StandardContext.invoke(Unknown Source)
at org.apache.catalina.core.StandardHostValve.invoke(Unknown Source)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(Unknown Source)
at org.apache.catalina.valves.ErrorDispatcherValve.invoke(Unknown Source)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(Unknown Source)
at org.apache.catalina.valves.ErrorReportValve.invoke(Unknown Source)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(Unknown Source)
at org.apache.catalina.core.StandardPipeline.invoke(Unknown Source)
at org.apache.catalina.core.ContainerBase.invoke(Unknown Source)
at org.apache.catalina.core.StandardEngineValve.invoke(Unknown Source)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(Unknown Source)
at org.apache.catalina.core.StandardPipeline.invoke(Unknown Source)
at org.apache.catalina.core.ContainerBase.invoke(Unknown Source)
at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:594)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConne
ction(Http11Protocol.java:392)
at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java(Compil
ed Code))
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav
a:619)
at java.lang.Thread.run(Thread.java:568)

---


is there a way to make it forward to a clean error page when on a production 
system?

Regards

Steve

Re: Error Redirection

2005-05-01 Thread Steve Vanspall
oh ok thanks,

new it would be simple

oh but is there a default, catch all option, actually i will look the tag
up.

Thanks

Steve
- Original Message -
From: Fritz Schneider [EMAIL PROTECTED]
To: 'Tomcat Users List' tomcat-user@jakarta.apache.org
Sent: Monday, May 02, 2005 11:44 AM
Subject: RE: Error Redirection



 Steve,

 Have you tried a custom error page for error 500?

 error-page
   error-code500/error-code
   location/_error/500.html/location
 /error-page

 Fritz
 -Original Message-
 From: Steve Vanspall [mailto:[EMAIL PROTECTED]
 Sent: Sunday, May 01, 2005 6:33 PM
 To: Tomcat User List
 Subject: Error Redirection

 Hi there,

 This is probably an obvious question, but if a JSP or some other error
 occurs that would usually make tomcat do a printStackTrace() into HTML and
 display it on the browser.

 [snip...]

 is there a way to make it forward to a clean error page when on a
production
 system?

 Regards

 Steve


 -
 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: Tomcat Administration problem

2005-04-29 Thread Steve Ochani
Date sent:  Sat, 30 Apr 2005 02:19:43 +0300
From:   Nir Tayeb [EMAIL PROTECTED]
Subject:Tomcat Administration problem
To: tomcat-user@jakarta.apache.org
Send reply to:  Tomcat Users List tomcat-user@jakarta.apache.org
Send reply to:  Nir Tayeb [EMAIL PROTECTED]

 Hello,

 I am running a Tomcat 5.5.9 server on Ubuntu 5.04 machine.

 When I try to logon to the Tomcat manager, the server prompts me for a
 username and password.

 When I installed (from binaries) the server I didn't specify any
 username and/or password.

 What details should I enter?

You should have a file named tomcat-users.xml in your conf subdir. In it there 
are
users/passwords and roles that they belong to. You need to log in with a 
username that has
manager role.


«¤»¥«¤»§«¤»¥«¤»§«¤»¥«¤»§«¤»¥«¤»§«¤»¥«¤»§«¤»¥«¤»§«¤»¥«¤»
Education is what remains after one has forgotten everything he
learned in school. -Albert Einstein

Steve O.
http://www.steveo.us

SUNY NCC MATH/COMPUTER
http://www.matcmp.ncc.edu

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



  1   2   3   4   5   6   7   8   9   10   >