Re: question about load-on-startup in web.xml

2005-05-11 Thread Annie Wang
hi doug, yup, was thinking along similar lines.  just wasn't sure if
there was some setting i wasn't aware of to do what i'm looking for.

thanks.
-annie

On 5/10/05, Parsons Technical Services [EMAIL PROTECTED] wrote:
 I may be off base on this one but I think that once Tomcat fires off the
 init method it doesn't care or monitor the progress of the servlet. Just
 think, some servlets may take several minutes to finish. If other apps had
 to wait then it could take a long time to get the server started.
 
 Now as for a solution I am really speculating here (hopefully someone can
 educate both of us). I would look at a wait statement in the init method to
 pause the second app's servlet until the first one is done. Simply time the
 first app's servlet and set it for a little more.
 
 Hopefully someone will set me straight if I am off base here.
 
 Doug
 
 - Original Message -
 From: Annie Wang [EMAIL PROTECTED]
 To: tomcat-user@jakarta.apache.org
 Sent: Tuesday, May 10, 2005 6:59 PM
 Subject: question about load-on-startup in web.xml
 
 hi,
 
 regarding the load-on-startup tag in web.xml:
 
 say i have 2 web apps (webapp1 and webapp2).  if i configure webapp1's
 servlet to have load-on-startup1/load-on-startup and webapp2's
 servlet to have load-on-startup100/load-on-startup, does this mean
 that tomcat will init webapp1's servlet first and once that's done,
 it'll init webapp2's servlet?
 
 basically, i want both web app's servlets to auto initialize on tomcat
 startup, but i want webapp2's servlet to initialze only after
 webapp1's servlet has finished initialization.  when i use the above
 load-on-startup settings, webapp2's servlet seems to initialize before
 webapp1's servlet has finished initialization.
 
 thanks.
 -annie
 
 -
 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]



AW: Restrict access to webapps for IPs

2005-05-11 Thread Altrock, Jens
Ok tried it again.. first some more information:
I am using Tomcat 5.0.28 on Redhat Fedora Core 3, installed in
/usr/local/tomcat

I created a XML file called application.xml in
/usr/local/tomcat/conf/Catalina/localhost
where application is the name of the webapp. That worked so far. The file
consisted just of a few lines:

Context path=/NetAdmin docBase=${catalina.home}/webapps/NetAdmin
debug=0 privileged=true
  Valve className=org.apache.catalina.valves.RemoteAddrValve
allow=192.100.46.*,172.16.*.*,194.25.29.*,127.0.0.1/
/Context

I have to mention that I did neither write that app nor know much about it
anyway.. it uses a JDBC connection
to a mysql database to write data to that db. But after creating that config
file mentioned above, the
JDBC driver didn't work anymore...

Anyone can help me with that?

Regards,

Jens

 -Ursprüngliche Nachricht-
 Von: Lutz Zetzsche [mailto:[EMAIL PROTECTED]
 Gesendet: Dienstag, 10. Mai 2005 16:24
 An: Tomcat Users List
 Betreff: Re: Restrict access to webapps for IPs


 Hi Jens,

 Altrock, Jens schrieb:
  Hm... won't work :(
 
  I added to noe of the apps in
 webapps/name_of_app/WEB-INF/web.xml the
  following:
 
  Valve className=org.apache.catalina.valves.RemoteAddrValve
  allow=192.100.46.*/
 
  right after the web-app tag in the xml file.
  But people can access that application from the internet anyway...

 You have put the Valve element into the wrong file resp.
 place. It cannot
 be nested into the web-app element and cannot be placed in
 the web.xml.
 You have to nest it into a engine, host oder context element.

 In your case, you have to nest it into the context element
 because you
 want to apply the filter rule to a web application which is
 equivalent to
 the context element in Tomcat terms.

 You should have a look at one of the links I mentioned to
 find the right
 place for the Valve element:

 http://jakarta.apache.org/tomcat/tomcat-5.5-doc/config/context.html

 Try one of these options offered on this page (refers to
 Tomcat version 5.5):

 * in individual files (with a .xml extension) in the
 $CATALINA_HOME/conf/[enginename]/[hostname]/ directory
 * if the previous file was not found for this application, in
 individual
 file at /META-INF/context.xml inside the application files


 Best wishes

 Lutz


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

###
Diese Nachricht wurde von F-Secure Anti-Virus gescannt.

This message has been scanned by F-Secure Anti-Virus.


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



Re: DBCP ClassCastException

2005-05-11 Thread Nikola Milutinovic
Dhiren Bhatia wrote:
I'm using BasicDataSource because javax.sql.DataSource does not have methods 
to set the driver class name, url, username/pwd etc. My app needs to support 
different databases and the driver is loaded based on which database is 
installed.
 

You've got it backwards. It is the responsibility of a J2EE container to 
use whatever the implementatio it likes and set those parameters and 
then give your application just javax.sql.DataSource. THAT will make 
your application portable.

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


Re: Restrict access to webapps for IPs

2005-05-11 Thread Lutz Zetzsche
Hi Jens,

Am Mittwoch, 11. Mai 2005 08:17 schrieb Altrock, Jens:
 Ok tried it again.. first some more information:
 I am using Tomcat 5.0.28 on Redhat Fedora Core 3, installed in
 /usr/local/tomcat

 I created a XML file called application.xml in
 /usr/local/tomcat/conf/Catalina/localhost
 where application is the name of the webapp. That worked so far.
 The file consisted just of a few lines:

 Context path=/NetAdmin docBase=${catalina.home}/webapps/NetAdmin
 debug=0 privileged=true
   Valve className=org.apache.catalina.valves.RemoteAddrValve
 allow=192.100.46.*,172.16.*.*,194.25.29.*,127.0.0.1/
 /Context

 I have to mention that I did neither write that app nor know much
 about it anyway.. it uses a JDBC connection
 to a mysql database to write data to that db. But after creating that
 config file mentioned above, the
 JDBC driver didn't work anymore...

 Anyone can help me with that?

It looks like your new Context definition is overriding an existing 
Context definition for this web application which contains the resource 
definition for the MySQL database.

So you should have a look at your $CATALINA_HOME/conf/server.xml if 
there might be a existing Context definition inside the related Host 
element.

You should also look for a context.xml in the 
$CATALINA_HOME/webapps/[webapp]/META-INF/ directory for the same 
reason.

If you will find an existing Context definition, then insert your valve 
filter there and delete you newly created application.xml.


Best wishes

Lutz

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



Re: How to change hostname in tomcat configuration

2005-05-11 Thread Lutz Zetzsche
Hi Mandar,

Am Dienstag, 10. Mai 2005 20:13 schrieb Mandar Vaidya:
 I was trying for the second option,

 Here is how my server.xml file

   Engine defaultHost=techserv name=Catalina
   Host appBase=webapps name=techserv
 Logger className=org.apache.catalina.logger.FileLogger
 prefix=techserv_log. suffix=.txt timestamp=true/
   /Host


But if I do this,  I'm not able to go to
 http://techserv:8080/admin  . It gives me HTTP error 404 ( requested
 page not available. )

Perhaps it is a problem with the Context definitions as they define the 
docBase and the path of the web application? I could imagine that the 
Context files are now in the wrong place after you have renamed the 
host:

$CATALINA_HOME/conf/Catalina/localhost/

should now be

$CATALINA_HOME/conf/Catalina/techserv/

after your hostname has changed. So have a look, if the Context files 
still are in the old directory and, if so, rename the directory from 
localhost to techserv and restart the Tomcat server.

I hope, this is the solution.


Best wishes

Lutz

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



AW: Restrict access to webapps for IPs

2005-05-11 Thread Altrock, Jens
 -Ursprüngliche Nachricht-
 Von: Lutz Zetzsche [mailto:[EMAIL PROTECTED]
 Gesendet: Mittwoch, 11. Mai 2005 08:50
 An: Tomcat Users List
 Betreff: Re: Restrict access to webapps for IPs


 Hi Jens,

 Am Mittwoch, 11. Mai 2005 08:17 schrieb Altrock, Jens:
  Ok tried it again.. first some more information:
  I am using Tomcat 5.0.28 on Redhat Fedora Core 3, installed in
  /usr/local/tomcat
 
  I created a XML file called application.xml in
  /usr/local/tomcat/conf/Catalina/localhost
  where application is the name of the webapp. That worked so far.
  The file consisted just of a few lines:
 
  Context path=/NetAdmin
 docBase=${catalina.home}/webapps/NetAdmin
  debug=0 privileged=true
Valve className=org.apache.catalina.valves.RemoteAddrValve
  allow=192.100.46.*,172.16.*.*,194.25.29.*,127.0.0.1/
  /Context
 
  I have to mention that I did neither write that app nor know much
  about it anyway.. it uses a JDBC connection
  to a mysql database to write data to that db. But after
 creating that
  config file mentioned above, the
  JDBC driver didn't work anymore...
 
  Anyone can help me with that?

 It looks like your new Context definition is overriding an existing
 Context definition for this web application which contains
 the resource
 definition for the MySQL database.

 So you should have a look at your $CATALINA_HOME/conf/server.xml if
 there might be a existing Context definition inside the related Host
 element.


I looked at the $CATALINA_HOME/conf/server.xml file, but can't find anything
like that inside the HOST element. It's the standard server.xml file though,
I don't know in what way a servlet itself can change that file; but I don't
think it can.

 You should also look for a context.xml in the
 $CATALINA_HOME/webapps/[webapp]/META-INF/ directory for the same
 reason.


I did, but there is none, and there never was one. That's what I thought
first,
but there's just a MANIFEST.MF file inside.

 If you will find an existing Context definition, then insert
 your valve
 filter there and delete you newly created application.xml.


 Best wishes

 Lutz

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


I attached the server.xml and the application's xml file to the mail though.

Regards,

Jens

###
Diese Nachricht wurde von F-Secure Anti-Virus gescannt.

This message has been scanned by F-Secure Anti-Virus.



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

AW: Restrict access to webapps for IPs

2005-05-11 Thread Altrock, Jens
Hm didn't attach them.. 
So here they are:

Server.xml:

!-- Example Server Configuration File --
!-- Note that component elements are nested corresponding to their
 parent-child relationships with each other --

!-- A Server is a singleton element that represents the entire JVM,
 which may contain one or more Service instances.  The Server
 listens for a shutdown command on the indicated port.

 Note:  A Server is not itself a Container, so you may not
 define subcomponents such as Valves or Loggers at this level.
 --

Server port=8005 shutdown=SHUTDOWN debug=0


  !-- Comment these entries out to disable JMX MBeans support!--
  !-- You may also configure custom components (e.g. Valves/Realms) by 
   including your own mbean-descriptor file(s), and setting the 
   descriptors attribute to point to a ';' seperated list of paths
   (in the ClassLoader sense) of files to add to the default list.
   e.g. descriptors=/com/myfirm/mypackage/mbean-descriptor.xml
  --
  Listener className=org.apache.catalina.mbeans.ServerLifecycleListener
debug=0/
  Listener
className=org.apache.catalina.mbeans.GlobalResourcesLifecycleListener
debug=0/

  !-- Global JNDI resources --
  GlobalNamingResources

!-- Test entry for demonstration purposes --
Environment name=simpleValue type=java.lang.Integer value=30/

!-- Editable user database that can also be used by
 UserDatabaseRealm to authenticate users --
Resource name=UserDatabase auth=Container
  type=org.apache.catalina.UserDatabase
   description=User database that can be updated and saved
/Resource
ResourceParams name=UserDatabase
  parameter
namefactory/name
valueorg.apache.catalina.users.MemoryUserDatabaseFactory/value
  /parameter
  parameter
namepathname/name
valueconf/tomcat-users.xml/value
  /parameter
/ResourceParams

  /GlobalNamingResources

  !-- A Service is a collection of one or more Connectors that share
   a single Container (and therefore the web applications visible
   within that Container).  Normally, that Container is an Engine,
   but this is not required.

   Note:  A Service is not itself a Container, so you may not
   define subcomponents such as Valves or Loggers at this level.
   --

  !-- Define the Tomcat Stand-Alone Service --
  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 port!8080 --
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 --

!-- Note : To use gzip compression you could set the following
properties :

   compression=on 
   compressionMinSize=2048 
   noCompressionUserAgents=gozilla, traviata 
   compressableMimeType=text/html,text/xml
--

!-- Define a SSL Coyote HTTP/1.1 Connector on port!8443 --
!--
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 /
--

!-- 

load balancing

2005-05-11 Thread Zohar Amir
Hi,
I have an application server that maintains session and I'd like to make it 
scalable. The clients and the application server are communicating using 
TCP.
When a client tries to connect, I'd like the load balancer to connect to a 
random AppServer node, and from that moment on - that node should handle the 
session.
The client can disconnect and reconnect and the load balancer should connect 
it with the node that handled the session before the disconnection.
Is it possible implementing these requirements using the model described in 
http://jakarta.apache.org/tomcat/tomcat-5.0-doc/cluster-howto.html? Is there 
a better architecture that you can recommend which is more suitable to what 
I just described?
Thanks. 

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


how to change the port for jmx in tomcat 5.5.9 ?

2005-05-11 Thread Pankaj Bhatnagar
Hi
I used to change the port for jmx by specifying the property :
jrmpPort=1099
in the jk2.properties file while using Tomcat 5.0.28

After adding this property when I started Tomcat I used to get the following in 
the console :
May 11, 2005 12:57:22 PM org.apache.jk.common.JkMX loadAdapter
INFO: Creating Naming:name=rmiregistry
May 11, 2005 12:57:22 PM org.apache.jk.common.JkMX loadAdapter
INFO: Creating Adaptor:protocol=jrmp on host localhost at port 1099
May 11, 2005 12:57:22 PM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=15/328  
config=D:\Apps\tomcat5.0.19\conf\jk2.properties

I made the same changes to the jk2.properties file in Tomcat 5.5.9, but it 
seems that it does not read the jk2.properties file. I get the following in the 
console :
May 11, 2005 10:55:32 AM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/32  config=null

Could someone help me out as to what I am missing in this ?

Thanks
Pankaj

Re: Restrict access to webapps for IPs

2005-05-11 Thread Lutz Zetzsche
Hi Jens,

Am Mittwoch, 11. Mai 2005 09:01 schrieb Altrock, Jens:
  -Ursprüngliche Nachricht-
  Von: Lutz Zetzsche [mailto:[EMAIL PROTECTED]
  Gesendet: Mittwoch, 11. Mai 2005 08:50
  An: Tomcat Users List
  Betreff: Re: Restrict access to webapps for IPs
 
 
  Hi Jens,
 
  Am Mittwoch, 11. Mai 2005 08:17 schrieb Altrock, Jens:
   Ok tried it again.. first some more information:
   I am using Tomcat 5.0.28 on Redhat Fedora Core 3, installed in
   /usr/local/tomcat

[...]

   I have to mention that I did neither write that app nor know much
   about it anyway.. it uses a JDBC connection
   to a mysql database to write data to that db. But after
 
  creating that
 
   config file mentioned above, the
   JDBC driver didn't work anymore...
  
   Anyone can help me with that?
 
  It looks like your new Context definition is overriding an existing
  Context definition for this web application which contains
  the resource
  definition for the MySQL database.
 
  So you should have a look at your $CATALINA_HOME/conf/server.xml if
  there might be a existing Context definition inside the related
  Host element.

 I looked at the $CATALINA_HOME/conf/server.xml file, but can't find
 anything like that inside the HOST element. It's the standard
 server.xml file though, I don't know in what way a servlet itself can
 change that file; but I don't think it can.

  You should also look for a context.xml in the
  $CATALINA_HOME/webapps/[webapp]/META-INF/ directory for the same
  reason.

 I did, but there is none, and there never was one. That's what I
 thought first,
 but there's just a MANIFEST.MF file inside.

If the MySQL database base connection has worked before and will work 
again, when you remove your newly created Context file, then there has 
to be a Resource definition for it somewhere.

As you are using Linux why don't you simply search the files in the 
$CATALINA_HOME directory for this Resource definition? I.e. like this:

grep -R mysql /usr/local/tomcat

This way, you should find the file defining the MySQL resource for your 
web application (context). Then proceed as I suggested.


Best wishes

Lutz

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



RE : Form Based Authentication

2005-05-11 Thread LERBSCHER Jean-Pierre

If the authentication is realized by the container (the realm), you can't
access the request before the authentication takes over. If you really want
to do it, don't define the security constraint in your web.xml, and make
your own application security mechanism (use filter, and forward or redirect
on login page).

-Message d'origine-
De : Wade Chandler [mailto:[EMAIL PROTECTED] 
Envoyé : mercredi 11 mai 2005 07:10
À : Tomcat Users List
Objet : Re: Form Based Authentication

Wade Chandler wrote:
 I have form based authentication working.  But, I need the login form to 
 be a little more dynamic.  For instance, I want to use different forms 
 for different areas and not always use the same form.  Is this possible? 
  For instance, under one site I want to limit URLs to different logins. 
  I realize I should just have a login and have a userid and a password, 
 but my customer wants to simply have an access code to certain pages or 
 directories.  I would like to use form based authentication then I can 
 have the userid as a hidden variable, and then have a password entered 
 by the user, but for some admin screens I need the user to actually 
 enter the userid and password both
 
 I hope that makes sense.  I can't figure out how to setup a security 
 constraint which can force a particular login form to be used if the 
 user is not logged in yet.
 
 Thanks,
 
 Wade
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 

Ok,

So I think I should be able to do this with a filter, but I need some 
help.  Basically it looks like I should be able to use a filter to some 
how get the original target before the authentication form is 
displayedis this correct?  Basically I need to some how know when a 
particular URL pattern is being displayed or is attempted to be 
accessed...before the login form is displayed.  When it is displayed 
I'll set an attribute in the request in the filters doFilter method. 
However, now I need to know how I can access the Request before the 
authentication mechanism takes over I suppose because from my login form 
accessing the getPathInfo() method is returning the login form 
information when I really need to know the actual path the user was 
attempting to access.  So, can I use a filter to do this, and if so how 
do I make sure my filter is called in time to give me the information I 
need?

Thanks,

Wade

-
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: Does Tomcat support URL containing CHINESE characters?

2005-05-11 Thread Daniel Sun
Hi Mark,

Thanks heaps for the help.
URIEncoding=UTF-8 works for me.

Cheers,
Daniel

-Original Message-
From: Mark Thomas [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, May 11, 2005 4:00 AM
To: Tomcat Users List
Subject: Re: Does Tomcat support URL containing CHINESE characters?

As a minimum you are going to need to set the URIEncoding attribute on
the connector. I guess this needs to be set to UTF-8.

I have done some limited testing on this in the past and it is possible
but given the general mess that is i18n and the internet I would avoid
using non ISO-8859-1 characters in URIs if at all possible.

Mark

Daniel Sun wrote:
 Hi all,
 
 I have the following settings.
 
 WinXP Prof CHINESE SIMPLIFIED w/ SPK2
 
 Tomcat 5.0.28
 
 JDK 1.5..0.3
 
  
 
 I have a folder, whose name contains CHINESE characters (eg.  ? 
 new folder), under the [CATALINA_HOME]\webapps\jsp-example.
 
 When I browse to it in IE with URL 
 http://localhost:8080/jsp-examples// 
 http://localhost:8080/jsp-examples// , I got the HTTP status 404, 
 the error description is : The requested resource 
 (/jsp-examples/%E6%96%A4%B9) is not available.
 
 I can access English only URL without any problem (eg. 
 http://localhost:8080/jsp-examples/new folder)
 
  
 
 I tried the same with Apache 2 and IIS, it works in both environments.
 
  
 
 Can someone please give me a hint on where I can go now? (eg. Do I have to 
 use Apache to support this, and PLUS connectors with Tomcat to support 
 Servelet in addition).
 
  
 
 Many thanks in advance.
 
  
 
 


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



Re: Tomcat 5.5.9 - simple way of restricting access to webapp

2005-05-11 Thread Lutz Zetzsche
Hi Lars,

Am Dienstag, 10. Mai 2005 18:00 schrieb Lars Ohlén:
 Is there any easy way to restrict the access to a specifc webapp by
 require login?

Yes. :-) It is a little bit time-consuming to tell it in detail. So I 
just show you how it is configured for the Manager application by 
default:


1. server.xml:

  GlobalNamingResources

[...]

!-- Editable user database that can also be used by
 UserDatabaseRealm to authenticate users --
Resource name=UserDatabase auth=Container
  type=org.apache.catalina.UserDatabase
   description=User database that can be updated and saved
   factory=org.apache.catalina.users.MemoryUserDatabaseFactory
  pathname=conf/tomcat-users.xml /

  /GlobalNamingResources


2. manager.xml (=[webapp].xml):

 !-- Link to the user database we will get roles from --
  ResourceLink name=users global=UserDatabase
type=org.apache.catalina.UserDatabase/


3. web.xml:

!-- Define reference to the user database for looking up roles --
  resource-env-ref
description
  Link to the UserDatabase instance from which we request lists of
  defined role names.  Typically, this will be connected to the 
global
  user database with a ResourceLink element in server.xml or the 
context
  configuration file for the Manager web application.
/description
resource-env-ref-nameusers/resource-env-ref-name
resource-env-ref-type
  org.apache.catalina.UserDatabase
/resource-env-ref-type
  /resource-env-ref


You may also have a look at the following pages of the Tomcat 
documentation for further details:

http://jakarta.apache.org/tomcat/tomcat-5.5-doc/realm-howto.html
http://jakarta.apache.org/tomcat/tomcat-5.5-doc/jndi-resources-howto.html
http://jakarta.apache.org/tomcat/tomcat-5.5-doc/config/context.html
http://jakarta.apache.org/tomcat/tomcat-5.5-doc/config/globalresources.html
http://jakarta.apache.org/tomcat/tomcat-5.5-doc/config/realm.html
http://jakarta.apache.org/tomcat/tomcat-5.5-doc/config/resources.html


Best wishes

Lutz

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



RE : Restrict access to webapps for IPs

2005-05-11 Thread LERBSCHER Jean-Pierre
See
http://jakarta.apache.org/tomcat/tomcat-5.0-doc/config/host.html#Automatic
Application Deployment

 When using automatic deployment, the docBase defined by an XML Context
file should be outside of the appBase directory. If this is not the case
difficulties may be experienced deploying the web application or the
application may be deployed twice.


-Message d'origine-
De : Altrock, Jens [mailto:[EMAIL PROTECTED] 
Envoyé : mercredi 11 mai 2005 09:01
À : 'Tomcat Users List'
Objet : AW: Restrict access to webapps for IPs

 -Ursprüngliche Nachricht-
 Von: Lutz Zetzsche [mailto:[EMAIL PROTECTED]
 Gesendet: Mittwoch, 11. Mai 2005 08:50
 An: Tomcat Users List
 Betreff: Re: Restrict access to webapps for IPs
 
 
 Hi Jens,
 
 Am Mittwoch, 11. Mai 2005 08:17 schrieb Altrock, Jens:
  Ok tried it again.. first some more information:
  I am using Tomcat 5.0.28 on Redhat Fedora Core 3, installed in
  /usr/local/tomcat
 
  I created a XML file called application.xml in
  /usr/local/tomcat/conf/Catalina/localhost
  where application is the name of the webapp. That worked so far.
  The file consisted just of a few lines:
 
  Context path=/NetAdmin 
 docBase=${catalina.home}/webapps/NetAdmin
  debug=0 privileged=true
Valve className=org.apache.catalina.valves.RemoteAddrValve
  allow=192.100.46.*,172.16.*.*,194.25.29.*,127.0.0.1/
  /Context
 
  I have to mention that I did neither write that app nor know much
  about it anyway.. it uses a JDBC connection
  to a mysql database to write data to that db. But after 
 creating that
  config file mentioned above, the
  JDBC driver didn't work anymore...
 
  Anyone can help me with that?
 
 It looks like your new Context definition is overriding an existing 
 Context definition for this web application which contains 
 the resource 
 definition for the MySQL database.
 
 So you should have a look at your $CATALINA_HOME/conf/server.xml if 
 there might be a existing Context definition inside the related Host 
 element.


I looked at the $CATALINA_HOME/conf/server.xml file, but can't find anything
like that inside the HOST element. It's the standard server.xml file though,
I don't know in what way a servlet itself can change that file; but I don't 
think it can.
 
 You should also look for a context.xml in the 
 $CATALINA_HOME/webapps/[webapp]/META-INF/ directory for the same 
 reason.
 

I did, but there is none, and there never was one. That's what I thought
first,
but there's just a MANIFEST.MF file inside.

 If you will find an existing Context definition, then insert 
 your valve 
 filter there and delete you newly created application.xml.
 
 
 Best wishes
 
 Lutz
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 

I attached the server.xml and the application's xml file to the mail though.

Regards,

Jens

###
Diese Nachricht wurde von F-Secure Anti-Virus gescannt.

This message has been scanned by F-Secure Anti-Virus.




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



Re: Arabic encoding

2005-05-11 Thread Fadwa Barham
While I was searching for a solution for the encoding, I found this
 
There is a standard for encoding URIs (http://www.w3.org/International/O-URL-
code.html) but this standard is not consistently followed by clients. This 
causes a number of problems.

The functionality provided by Tomcat (4 and 5) to handle this less than ideal 
situation is described below.

1. The Coyote HTTP/1.1 connector has a useBodyEncodingForURI attribute which 
if set to true will use the request body encoding to decode the URI query 
parameters.
  - The default value is true for TC4 (breaks spec but gives consistent 
behaviour across TC4 versions)
  - The default value is false for TC5 (spec compliant but there may be 
migration issues for some apps)
2. The Coyote HTTP/1.1 connector has a URIEncoding attribute which defaults to 
ISO-8859-1.
3. The parameters class (o.a.t.u.http.Parameters) has a QueryStringEncoding 
field which defaults to the URIEncoding. It must be set before the parameters 
are parsed to have an effect.

Things to note regarding the servlet API:
1. HttpServletRequest.setCharacterEncoding() normally only applies to the 
request body NOT the URI.
2. HttpServletRequest.getPathInfo() is decoded by the web container.
3. HttpServletRequest.getRequestURI() is not decoded by container.

Other tips:
1. Use POST with forms to return parameters as the parameters are then part of 
the request body.


Is this means that the changes between tc4 and tc5 about encoding is the reason 
why I can't have the write encoding in the new versions of tomcat? and if so, 
how to solve the problem?
 
Thanks

- Original Message - 
From: Fadwa Barham 
To: Tomcat Users List 
Sent: Tuesday, March 01, 2005 3:24 AM
Subject: Re: Arabic encoding


 As tomcat 4.1.31 is suitable for arabic and it seems until now that tomcat 
 4.1.31 solved the jndi datasource problems: Intermittent dB connection 
 Failures and Random Connection closed Exceptions
 I will use tomcat 4.1.31 until I can configure the latest versions of 
 tomcat.
 I feel not lucky
 - Original Message - 
 From: Fadwa Barham 
 To: Tomcat Users List 
 Sent: Tuesday, March 01, 2005 2:39 AM
 Subject: Re: Arabic encoding


I tested many tomcat versions, I found until tomcat 4.1.31 no problems 
with arabic, but when I tried tomcat-4.1.18 and newer versions, I faced 
the same problem.

 - Original Message - 
 From: Benson Margulies 
 To: Tomcat Users List 
 Sent: Sunday, February 27, 2005 4:08 PM
 Subject: RE: Arabic encoding


 It depends on what the Oracle JDBC driver does with byte values that are
 not legitimate US7ASCII. If, for some reason, it treated the data as
 ISO-8859-1 instead of US7ASCII, then it might have streamed out through
 tomcat, and the browser would have auto-detected the CP1256 pretending
 to be ISO-8859-1.

 -Original Message-
 From: Fadwa Barham [mailto:[EMAIL PROTECTED]
 Sent: Sunday, February 27, 2005 1:43 PM
 To: Tomcat Users List
 Subject: Re: Arabic encoding

 But I wonder why the old tomcat and java displayed arabic correctly, and
 I use the same classes12.jar in both of the old and the new.
 I want to know what is the differance, what encoding they stopped to
 support? It looks like that tomcat cannot understand the old Java cause
 I have to change the encoding to arabic windows in the internet explorer
 each time I request the servlet, and when I do this, every arabic
 character is displayed correctly.
 I think it is better to understand the problem and the changes so I can
 handle the problem if I faced it again in the newer versions of tomcat
 or Java.
 I know that being the database in us7ascii is not good, but changing the
 database encoding each time I face the problem is not the right way. I
 may change it this time, but I need to understand.
 thanks

 - Original Message -
 From: Benson Margulies 
 To: Tomcat Users List 
 Sent: Sunday, February 27, 2005 12:44 AM
 Subject: RE: Arabic encoding


 Oracle's ODBC driver will transcode from the database to UTF-16 based
 on
 the databse encoding. If the database is in US7ASCII, this is a
 destructive process for Arabic. The only alternative I can think of is
 to do all your database I/O in hex.

 -Original Message-
 From: Fadwa Barham [mailto:[EMAIL PROTECTED]
 Sent: Saturday, February 26, 2005 1:20 PM
 To: Tomcat Users List
 Subject: Re: Arabic encoding

 I use oracle 7 database, and the NLS language is
 American_America.US7ASCII, and it is not easy to change it to utf-8.
 Beside, the question is, a servlet work fine on tomcat 4.0.6 why it
 stopped with the new versions, what changes made to the encoding of
 tomcat??
 do I need tomcat-i18n-ar.jar? and if so, from where to get it?
 I can't determine where is the problem, is it from the new Java or the
 new tomcat.
 thanks in advanced

 - Original Message -
 From: Benson Margulies 
 To: Tomcat Users List 
 Sent: Wednesday, February 23, 2005 11:26 PM
 Subject: RE: Arabic encoding


 What database? Do you 

RE: Is it possible to run a Tomcat 4.x and Tomcat 5.x on one computer

2005-05-11 Thread Peter Crowther
 From: ojay78 [mailto:[EMAIL PROTECTED] 
 I have 2 webapplications and one of them have to run with the 
 tomcat 4.x
 Version the other one I want do install it on the new 5.x 
 version. Can I install both tomcat versions on the same server?

Yes.  I have that configuration running here - 4.1.31 and 5.0.28.

 Are both versions independent, so when one crashs it has no 
 influence on the other?

They are independent.  Each runs in its own JVM.

 I tried it today but I could only detect one Tomcat process in the
 Taskmanager and I could only connect to the 4.x manager tool 
 although I gave
 one version the port 8080 and the other one 9090.???!!!

As Tim pointed out, check the shutdown ports as well (near the top of
server.xml as it is distributed) - they also need to be different.

- Peter

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



Re: Autodeploy not working on Tomcat 5.5.9

2005-05-11 Thread Remy Maucherat
On 5/10/05, Marquez, Omar [EMAIL PROTECTED] wrote:
 Hi Luntz,
 
 Thanks for answering.
 
 this is from my server.xml
 
   Host
   appBase=webapps
   autodeploy=true
   unpackWARs=true
   name=localhost
 Context
 path=/webapp reloadable=true
 
 WatchedResource/usr/local/tomcat/conf/context.xml/WatchedResource
   WatchedResourceWEB-INF/web.xml/WatchedResource
 /Context
 Context
 path=/OES2 reloadable=true 
 
 WatchedResource/usr/local/tomcat/conf/context.xml/WatchedResource
   WatchedResourceWEB-INF/web.xml/WatchedResource
 /Context
   /Host

Contexts hardcoded in server.xml are not autodeployed or manageable
(except to some extent through the admin webapp). They are hardcoded
and always deployed on startup, and that's it.

-- 
x
Rémy Maucherat
Developer  Consultant
JBoss Group (Europe) SàRL
x

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



RE: Help needed with Hibernate persistent servlet

2005-05-11 Thread Allistair Crossley
Hi,

Hibernate needs a bunch of other jar files too. There is a text file in the H3 
distrib indicating which are requisite and which are mandatory.

You do not menion whether this HibernateUtil you are using as a servlet has an 
overridden init() method that creates the SessionFactory.

Finally, the way we set the Hibernate sub-system up here is to use a 
ContextListener for our application which calls HibernateUtil.init which 
instances the SessionFactory. Another way to go about Hibernate3 usage in web 
apps is to use the Inversion of Control part of Spring.

Cheers, Allistair.

 -Original Message-
 From: David Haynes [mailto:[EMAIL PROTECTED]
 Sent: 10 May 2005 19:30
 To: tomcat-user@jakarta.apache.org
 Subject: Help needed with Hibernate persistent servlet
 
 
 I feel that I am almost there, but can't quite get the last 
 problem out 
 of the way.
 
 I am using Tomcat 5.5.7, NetBeans 4.1rc2, and Hibernate 3.0.3.
 
 I have set up the web.xml for my project to start the 
 HibernateUtil as a 
 load-on-startup servlet and confirmed that the proper libraries (jar 
 files) are in place under WEB-INF/lib. I know that the servlet is 
 running since I put the declaration into the global web.xml 
 and got back 
 the duplicate service error.
 
 My problem is that I am getting NoClassDefFoundError. Looking at the 
 java generated for my jsp, I see that the class not found is the one 
 which references my persistent object. ( i.e. when I reference 
 HibernateUtil.currentSession() )
 
 Do I need to do something else to make the persistent object 
 visible to 
 my jsp? The jsp does import my package containing 
 HibernateUtil and the 
 org.hibernate.* set as well.
 
 Googling seems to indicate that getting this to work is an often seen 
 problem, but there not a lot of details about how to fix this. I have 
 checked all the fixes I can find but nothing seems to be working.
 
 Thanks for any ideas/help.
 -david-
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 


FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE 
---
QAS Ltd.
Developers of QuickAddress Software
a href=http://www.qas.com;www.qas.com/a
Registered in England: No 2582055
Registered in Australia: No 082 851 474
---
/FONT


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



AW: Restrict access to webapps for IPs

2005-05-11 Thread Altrock, Jens
Ok, thanks again. Got it now working :)


 -Ursprüngliche Nachricht-
 Von: Lutz Zetzsche [mailto:[EMAIL PROTECTED]
 Gesendet: Mittwoch, 11. Mai 2005 09:35
 An: Tomcat Users List
 Betreff: Re: Restrict access to webapps for IPs


 Hi Jens,

 Am Mittwoch, 11. Mai 2005 09:01 schrieb Altrock, Jens:
   -Ursprüngliche Nachricht-
   Von: Lutz Zetzsche [mailto:[EMAIL PROTECTED]
   Gesendet: Mittwoch, 11. Mai 2005 08:50
   An: Tomcat Users List
   Betreff: Re: Restrict access to webapps for IPs
  
  
   Hi Jens,
  
   Am Mittwoch, 11. Mai 2005 08:17 schrieb Altrock, Jens:
Ok tried it again.. first some more information:
I am using Tomcat 5.0.28 on Redhat Fedora Core 3, installed in
/usr/local/tomcat

 [...]

I have to mention that I did neither write that app nor
 know much
about it anyway.. it uses a JDBC connection
to a mysql database to write data to that db. But after
  
   creating that
  
config file mentioned above, the
JDBC driver didn't work anymore...
   
Anyone can help me with that?
  
   It looks like your new Context definition is overriding
 an existing
   Context definition for this web application which contains
   the resource
   definition for the MySQL database.
  
   So you should have a look at your
 $CATALINA_HOME/conf/server.xml if
   there might be a existing Context definition inside the related
   Host element.
 
  I looked at the $CATALINA_HOME/conf/server.xml file, but can't find
  anything like that inside the HOST element. It's the standard
  server.xml file though, I don't know in what way a servlet
 itself can
  change that file; but I don't think it can.
 
   You should also look for a context.xml in the
   $CATALINA_HOME/webapps/[webapp]/META-INF/ directory for the same
   reason.
 
  I did, but there is none, and there never was one. That's what I
  thought first,
  but there's just a MANIFEST.MF file inside.

 If the MySQL database base connection has worked before and will work 
 again, when you remove your newly created Context file, then
 there has
 to be a Resource definition for it somewhere.

 As you are using Linux why don't you simply search the files in the
 $CATALINA_HOME directory for this Resource definition? I.e. like this:

   grep -R mysql /usr/local/tomcat

 This way, you should find the file defining the MySQL
 resource for your
 web application (context). Then proceed as I suggested.


 Best wishes

 Lutz

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

###
Diese Nachricht wurde von F-Secure Anti-Virus gescannt.

This message has been scanned by F-Secure Anti-Virus.


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



Re: tomcat restart?

2005-05-11 Thread Beton, Richard
Patrick Thomas wrote:

Actually, I believe it might be possible. Ugly, but possible. Using
Runtime.getRuntime() to get the current runtime, you can then actually
make a call to a shell command. You could call a batch file that would
shut down the server and then restart it. What I don't know is if the
newly exec'd process gets taken down with tomcat... if so, you could
have the shell program that you call start a new process that would
not be associated with the existing one (in windows you can use the
command 'start' in a batch file to start a separate process... someone
else will no doubt supply the *nix equivalent).
  




Thanks for the help.  I'm running Tomcat as an init.d System V service 
on Linux.  This means I can't write a simple script to restart it - the 
restart has to be done as root (although Tomcat runs as a user called 
tomcat).  My startup script already does the work of moving jarfiles and 
our native library to their correct locations.

So I've decided that automatic restart is in the 'too hard' category: 
instead I'll include in the webapp the means for an administrator to 
determine whether the deployment is up to date (fresh jarfiles in the 
shared/lib folder etc).  It'll then be a manual administration task to 
restart Tomcat when required.  It won't happen often.

Rick






-- 

Visit our website at www.roke.co.uk

Roke Manor Research Ltd, Roke Manor, Romsey, Hampshire SO51 0ZN, UK.

The information contained in this e-mail and any attachments is proprietary to
Roke Manor Research Ltd and must not be passed to any third party without
permission. This communication is for information only and shall not create or
change any contractual relationship.



Multiple tomcats - multiple JVM's?

2005-05-11 Thread Thomas Nybro Bolding
When installing multiple instances of Tomcat 5.5x on the same server do I 
then need to install multiple JRE's as well?

My guess is that its not as I cant see how to install multiple instances 
of an identical JRE, unless its not install but merely copy-and-paste.

But with one JRE would one crashed instance of Tomcat crash the others as 
well?

/Thomas

FONT SIZE=1 FACE=Arial___
Vi goer opmaerksom paa, at denne e-mail kan indeholde fortrolig information. 
Hvis du ved en fejltagelse modtager e-mailen, beder vi dig venligst informere 
afsender om fejlen ved at bruge svar-funktionen. Samtidig beder vi dig slette 
e-mailen i dit system uden at videresende eller kopiere den.
Selv om e-mailen og ethvert vedhaeftet bilag efter vores overbevisning er fri 
for virus og andre fejl, som kan paavirke computeren eller it-systemet, hvori 
den modtages og laeses, aabnes den paa modtagerens eget ansvar. Vi paatager os 
ikke noget ansvar for tab og skade, som er opstaaet i forbindelse med at 
modtage og bruge e-mailen.
___
Please note that this message may contain confidential information. If you have 
received this message by mistake, please inform the sender of the mistake by 
sending a reply, then delete the message from your system without making, 
distributing or retaining any copies of it.
Although we believe that the message and any attachments are free from viruses 
and other errors that might affect the computer or IT system where it is 
received and read, the recipient opens the message at his or her own risk. We 
assume no responsibility for any loss or damage arising from the receipt or use 
of this message.
/FONT



DBCP Exception

2005-05-11 Thread Joy Kenneth Harry

Hi,
Can anyone tell why I am getting this exception.


SEVERE: Null component
Catalina:type=DataSource,path=/,host=localhost,class=javax.sql.DataSourc
e,
name=jdbc/oracle


Thanks
Joy Kenneth

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



Jakarta Tomcat + Windows + PHP

2005-05-11 Thread Janet Fraser
Hi All,
I'm running Jakarta Apache Tomcat 5.0.19 (successfully) on a Windows 
2003 Server. I've been trying to figure out how to add PHP to the mix, 
but everything I've read says that I need to add a LoadModule directive 
to my httpd.conf and I don't have one. I didn't do the install for 
Tomcat, but I'm assuming that the Jakarta install doesn't create all 
those seperate Apache folders and files. Have I missed something really 
simple?

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


RE: Jakarta Tomcat + Windows + PHP

2005-05-11 Thread Dale, Matt

The simple thing that you have missed is that you are following instructions to 
add PHP to Apache HTTPD, not Apache Tomcat.

I think you can install PHP in Tomcat but I don't personally know how.

Apache is an organisation, which makes many applications, it is not the name of 
a particular product although when you hear apache you usually think of the 
webserver (httpd).

An install of Tomcat will not install httpd as it is a different application.

-Original Message-
From: Janet Fraser [mailto:[EMAIL PROTECTED]
Sent: 11 May 2005 09:49
To: tomcat-user@jakarta.apache.org
Subject: Jakarta Tomcat + Windows + PHP


Hi All,
I'm running Jakarta Apache Tomcat 5.0.19 (successfully) on a Windows 
2003 Server. I've been trying to figure out how to add PHP to the mix, 
but everything I've read says that I need to add a LoadModule directive 
to my httpd.conf and I don't have one. I didn't do the install for 
Tomcat, but I'm assuming that the Jakarta install doesn't create all 
those seperate Apache folders and files. Have I missed something really 
simple?

Thanks

Janet Fraser

-
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: Jakarta Tomcat + Windows + PHP

2005-05-11 Thread Janet Fraser
Matt,
  Thanks - I guess i knew that. Maybe my question should have been 
simpler, ie How do I install PHP to Tomcat?

Dale, Matt wrote:
The simple thing that you have missed is that you are following instructions to 
add PHP to Apache HTTPD, not Apache Tomcat.
I think you can install PHP in Tomcat but I don't personally know how.
Apache is an organisation, which makes many applications, it is not the name of 
a particular product although when you hear apache you usually think of the 
webserver (httpd).
An install of Tomcat will not install httpd as it is a different application.
-Original Message-
From: Janet Fraser [mailto:[EMAIL PROTECTED]
Sent: 11 May 2005 09:49
To: tomcat-user@jakarta.apache.org
Subject: Jakarta Tomcat + Windows + PHP
Hi All,
I'm running Jakarta Apache Tomcat 5.0.19 (successfully) on a Windows 
2003 Server. I've been trying to figure out how to add PHP to the mix, 
but everything I've read says that I need to add a LoadModule directive 
to my httpd.conf and I don't have one. I didn't do the install for 
Tomcat, but I'm assuming that the Jakarta install doesn't create all 
those seperate Apache folders and files. Have I missed something really 
simple?

Thanks
Janet Fraser
-
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: Jakarta Tomcat + Windows + PHP

2005-05-11 Thread Dale, Matt

A quick google brought back http://wiki.apache.org/jakarta-tomcat/UsingPhp. 
Should get you started.

Ta
Matt

-Original Message-
From: Janet Fraser [mailto:[EMAIL PROTECTED]
Sent: 11 May 2005 10:02
To: Tomcat Users List
Subject: Re: Jakarta Tomcat + Windows + PHP


Matt,
   Thanks - I guess i knew that. Maybe my question should have been 
simpler, ie How do I install PHP to Tomcat?

Dale, Matt wrote:

The simple thing that you have missed is that you are following instructions 
to add PHP to Apache HTTPD, not Apache Tomcat.

I think you can install PHP in Tomcat but I don't personally know how.

Apache is an organisation, which makes many applications, it is not the name 
of a particular product although when you hear apache you usually think of the 
webserver (httpd).

An install of Tomcat will not install httpd as it is a different application.

-Original Message-
From: Janet Fraser [mailto:[EMAIL PROTECTED]
Sent: 11 May 2005 09:49
To: tomcat-user@jakarta.apache.org
Subject: Jakarta Tomcat + Windows + PHP


Hi All,
I'm running Jakarta Apache Tomcat 5.0.19 (successfully) on a Windows 
2003 Server. I've been trying to figure out how to add PHP to the mix, 
but everything I've read says that I need to add a LoadModule directive 
to my httpd.conf and I don't have one. I didn't do the install for 
Tomcat, but I'm assuming that the Jakarta install doesn't create all 
those seperate Apache folders and files. Have I missed something really 
simple?

Thanks

Janet Fraser

-
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: Jakarta Tomcat + Windows + PHP

2005-05-11 Thread Lutz Zetzsche
Hi Janet,

Am Mittwoch, 11. Mai 2005 10:48 schrieb Janet Fraser:
 I'm running Jakarta Apache Tomcat 5.0.19 (successfully) on a Windows
 2003 Server. I've been trying to figure out how to add PHP to the
 mix, but everything I've read says that I need to add a LoadModule
 directive to my httpd.conf and I don't have one.

 I didn't do the 
 install for Tomcat, but I'm assuming that the Jakarta install doesn't
 create all those seperate Apache folders and files. Have I missed
 something really simple?

httpd.conf is the configuration file of the Apache HTTP Server 
( http://httpd.apache.org/ ) which should not be mixed with the Apache 
Tomcat Server. These are two different servers in two different worlds.

Linux, Apache, MySQL and PHP (LAMP) is the standard combination to run 
PHP. However, if you don't want to run an Apache server in parallel 
with your Tomcat server, there is a way to use PHP with Tomcat. Your 
keyword ist:

Java Servlet SAPI
- http://de3.php.net/manual/en/ref.java.php#java.servlet


Best wishes

Lutz

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



RE: Multiple tomcats - multiple JVM's?

2005-05-11 Thread Peter Crowther
 From: Thomas Nybro Bolding [mailto:[EMAIL PROTECTED] 
 When installing multiple instances of Tomcat 5.5x on the same 
 server do I then need to install multiple JRE's as well?

No.

 But with one JRE would one crashed instance of Tomcat crash 
 the others as well?

Separate the JRE (Java Runtime Environment) from the JVM (Java Virtual
Machine).  Each Tomcat instance runs in its own JVM - its own process.
All use the same JRE.  Think about running multiple copies of
Notepad.exe on Windows.  If one copy of Notepad crashes (the JVM), you
don't lose the others even though they're all using the same copy of the
file (the JRE).

- Peter

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



RE: RE: Multiple tomcats - multiple JVM's?

2005-05-11 Thread Thomas Nybro Bolding
Thx a lot Peter. That clarified things for me.

Quite embarassing I wasnt aware of the JRE/JVM relationship as when I 
think about it it seems obvious.

/Thomas






Peter Crowther [EMAIL PROTECTED]
11-05-2005 11:14
Besvar venligst til Tomcat Users List

 
Til:Tomcat Users List tomcat-user@jakarta.apache.org
cc: 
Vedr.:  RE: Multiple tomcats - multiple JVM's?



 From: Thomas Nybro Bolding [mailto:[EMAIL PROTECTED] 
 When installing multiple instances of Tomcat 5.5x on the same 
 server do I then need to install multiple JRE's as well?

No.

 But with one JRE would one crashed instance of Tomcat crash 
 the others as well?

Separate the JRE (Java Runtime Environment) from the JVM (Java Virtual
Machine).  Each Tomcat instance runs in its own JVM - its own process.
All use the same JRE.  Think about running multiple copies of
Notepad.exe on Windows.  If one copy of Notepad crashes (the JVM), you
don't lose the others even though they're all using the same copy of the
file (the JRE).

 - Peter

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





FONT SIZE=1 FACE=Arial___
Vi goer opmaerksom paa, at denne e-mail kan indeholde fortrolig information. 
Hvis du ved en fejltagelse modtager e-mailen, beder vi dig venligst informere 
afsender om fejlen ved at bruge svar-funktionen. Samtidig beder vi dig slette 
e-mailen i dit system uden at videresende eller kopiere den.
Selv om e-mailen og ethvert vedhaeftet bilag efter vores overbevisning er fri 
for virus og andre fejl, som kan paavirke computeren eller it-systemet, hvori 
den modtages og laeses, aabnes den paa modtagerens eget ansvar. Vi paatager os 
ikke noget ansvar for tab og skade, som er opstaaet i forbindelse med at 
modtage og bruge e-mailen.
___
Please note that this message may contain confidential information. If you have 
received this message by mistake, please inform the sender of the mistake by 
sending a reply, then delete the message from your system without making, 
distributing or retaining any copies of it.
Although we believe that the message and any attachments are free from viruses 
and other errors that might affect the computer or IT system where it is 
received and read, the recipient opens the message at his or her own risk. We 
assume no responsibility for any loss or damage arising from the receipt or use 
of this message.
/FONT



Re: Free reporting s/w that works with apache+tomcat

2005-05-11 Thread U K Laxmi
Thank you for the suggestion.
Laxmi

--- Gurumoorthy [EMAIL PROTECTED] wrote:

 use jasper reports with ireports ( GUI ) for jasper
 ... very nice :o)
 - Original Message - 
 From: U K Laxmi [EMAIL PROTECTED]
 To: Tomcat Users List
 tomcat-user@jakarta.apache.org
 Sent: Wednesday, May 11, 2005 3:47 AM
 Subject: Re: Free reporting s/w that works with
 apache+tomcat
 
 
  Guess, this is more suiting to my problem. 
  
  Thanks for the information.
  Laxmi
  
  --- Joe Plautz [EMAIL PROTECTED] wrote:
  
   Sorry I'm late to the party.
   
   I've been working with jasperreports from
   sourceforge the last couple of 
   weeks to create reports in PDF. It also has the
   ability to create an 
   excel spreadsheet as well, although I haven't
 used
   it yet. Using it in 
   conjunction with iReports, also from
 sourceforge,
   you can have a report 
   in minutes. I would recommend using it to
 anyone.
   
   Joe
   
   Mike Curwen wrote:
you should consider using POI, if you need
   Excel-only features like footer
repeated on every page.
 
Specifically:
   
  
 

http://jakarta.apache.org/poi/hssf/quick-guide.html#HeaderFooter
 




   -Original Message-
   From: U K Laxmi [mailto:[EMAIL PROTECTED] 
   Sent: Tuesday, May 10, 2005 9:53 AM
   To: Tomcat Users List; [EMAIL PROTECTED]
   Subject: Re: Free reporting s/w that works
 with
   apache+tomcat
   
   
   Thank you for the information.
   
   What i mean by header  footer is, column
 headers
   and
   some information like model number, date and
   approval
   signature columns etc.. to appear in every
 page
   when
   they take hard copy of the report. Is such a
 thing
   possible? Pls inform.
   
   The end user of the application doesn't want
 any
   manual intervention. When he click on 'Export
 to
   Excel' button in the web application HTML
 report,
   he
   want the excel file get downloded (file dialog
 box
   appears  he save it to his local disk) which
 has
   all
   header  footer information set. Currently my
   application can provide header once at the top
 of
   the
   report and footer (approval columns  date) at
 the
   very bottom of the report. THe column headings
 
   approval columns doesn't appear on every page.
 
   
   I'm unable to ahcieve this in web (HTML). It i
 cna
   do
   it in web, when i download that in excel, it
 will
   show.  Do you know any work around for this?
 Pls
   inform.
   
   Thank you.
   Laxmi
   
   --- Frank W. Zammetti [EMAIL PROTECTED]
   wrote:
   
   
   Hi,
   
   CSV files don't generally contain header and
   footer 
   
   information... you
   
   can get column headers in the first row,
 that's
   about it.  I don't 
   believe DataVision will export to Excel
 natively,
   but check the docs in 
   case I'm wrong.
   
   Do you really mean header and footer in the
 sense
   of
   a Word document?
   It's a bit unusual to have such a thing in an
   Excel
   document (although 
   not at all unheard of), so I'm wondering if
 maybe
   you mean something a 
   little different, i.e., maybe just column
 headers
   and some sort of totals?
   
   Frank
   
   U K Laxmi wrote:
   
   Thank you for the information. I read your
   report
   
   and
   
   it looks interesting. I went to DataVision
 web
   
   site
   
   and found that it can export comma separated
   files
   
   ie.
   
   CSV file. Will it be possible to retain
 header
   and
   footer information with a .CSV file? I
 basically
   
   want
   
   excel files as the report output. B'coz the
 end
   
   user
   
   needs to send to those reports to it's
 vendors.
   
   Excel
   
   is the most desired format for them. Pls
 give
   your
   feedback on this before i start implementing
 on
   
   this.
   
   Thank you.
   
   --- Frank W. Zammetti
 [EMAIL PROTECTED]
   
   wrote:
   
   Take a look at DataVision.  I think you'll
 like
   
   it.
   
   I wrote an article
   a while back specifically dealing with
 using it
 
=== message truncated ===




Discover Yahoo! 
Have fun online with music videos, cool games, IM and more. Check it out! 
http://discover.yahoo.com/online.html

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



Re: Apache+Tomcat

2005-05-11 Thread Nikola Milutinovic
Praveen KUMAR wrote:
Hello,
I am little bit confuse in following decision:
Should be use
1- Apache (2.0.54) + Tomcat (5.0.28) in production with tomcat 
listener (through Coyote connector) configured with mod_jk (1.2.12) 
with apache
2- Or Standalone Tomcat (with their standard apache provided by tomcat)

What would be difference in both the scenarios in terms of performance 
and reliability?

Scenario 2 is easier to implement, there are fewer things that can break 
and less config files to maintain. Scenario 1 gives you a unified 
setting of your web space. You just simply know that you have one 
front-end, Apache. In that case Apache receives the initial HTTP request 
and can handle parts of it.

The most interesting aspect of such a setup are authentication and 
redirection. While Tomcat has some rudimentary aliasing, Apache is 
superrior when it comes to URL rewriting, redirections and proxying. On 
the field of authentication, Tomcat supports HTTP-Basic, HTTP-Digest and 
SSL-based authentication. Apache can add to that SPNEGO (Kerberos5, read 
Microsoft Active Directory Service), plus several backend mechs for the 
Basic and Digest (LDAP, MySQL, PostgreSQL,...). Tomcat can only benefit 
from that.

My advice to you, if you're learning or experimenting, use Tomcat 
StandAlone. If you're thinking production, gather your requrements and 
see what fits you best. It could again very well be TC standalone.

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


RE: load balancing

2005-05-11 Thread Serlet Jean-Claude
Hello
I don't know if this solution is more effictive than the other one (load
balancing by using Apache server with different Tomcat instances)
But the two one don't realise a random access :
-cluster uses rules
-apache uses a simple round-robin scheduling algorithm ; so after a
disconnection  the new one is not certain to be affected to the same
Tomcat's instance

Jean-Claude
 

-Message d'origine-
De : Zohar Amir [mailto:[EMAIL PROTECTED]
Envoyé : mercredi 11 mai 2005 09:14
À : Tomcat Users List
Objet : load balancing


Hi,
I have an application server that maintains session and I'd like to make it 
scalable. The clients and the application server are communicating using 
TCP.
When a client tries to connect, I'd like the load balancer to connect to a 
random AppServer node, and from that moment on - that node should handle the

session.
The client can disconnect and reconnect and the load balancer should connect

it with the node that handled the session before the disconnection.
Is it possible implementing these requirements using the model described in 
http://jakarta.apache.org/tomcat/tomcat-5.0-doc/cluster-howto.html? Is there

a better architecture that you can recommend which is more suitable to what 
I just described?
Thanks. 

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



context XML file deleted on webapp redeploy

2005-05-11 Thread Martin Kuba
Hi,
I am using TomCat 5.5.9 with SUN JDK 1.5.0._02 and I have a strange
problem. I have a context file in
$CATALINA_BASE/conf/Catalina/localhost/
directory, let's say it is named mywebapp.xml.When I first start TomCat,
everything is fine. But when I redeploy the application by overwriting
$CATALINA_BAASE/webapps/mywebapp.war
with new version, the file
$CATALINA_BASE/conf/Catalina/localhost/mywebapp.xml
disappears. Is this a feature or a bug ? I never had a problem
like this with TomCat 5.0 or 4.1, so I suppose that it is a bug,
unless that is a new feature of TomCat 5.5.
Martin
--
~~
Supercomputing Center Brno Martin Kuba
Institute of Computer Scienceemail: [EMAIL PROTECTED]
Masaryk University http://www.ics.muni.cz/~makub/
Botanicka 68a, 60200 Brno, CZ mobil: +420-603-533775
--
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Free reporting s/w that works with apache+tomcat

2005-05-11 Thread David Johnson
They are unlikely to ever look exactly alike.  But, you can use a
java-ActiveX bridge (there are several) to build and manipulate an
excel spreadsheet as an object.  I have successfully used a library from
IBM AlphaWorks to do exactly this.  Sadly, the library I used was a
precursor to a commercial product so it is no longer free.

Good luck!

On Mon, 2005-05-09 at 23:57 -0700, U K Laxmi wrote:
 I'm developing a web application using apache+tomcat
 on windows 2000 machine. I'm using Ms Access 2003 as
 the backend. I'm using JSP for developing web
 application. I'm developing some web based reports in
 HTML. But when i export them to Excel, it doesn't look
 exactly same as that of HTML report. Moreover i need
 some header and footer information appear in the
 report. That i'm unable to achieve using JSP and HTML.
 
 
 So, i'm looking for a free reporting software that can
 meet above functionality and can work with
 apache+tomcat. If anyone know any work worunds for my
 problem, pls inform me. It will be a great help to me.
 
 Thank you.
 
 
   
 __ 
 Yahoo! Mail Mobile 
 Take Yahoo! Mail with you! Check email on your mobile phone. 
 http://mobile.yahoo.com/learn/mail 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 


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



Re: Apache+Tomcat

2005-05-11 Thread Anoop kumar V
We use tomcat standalone on production - most of our pages are dynamic (95%) 
and the user load is ~7000 and it has been behaving awesome - we use 4.1.31.

hth,
Anoop 

On 5/11/05, Nikola Milutinovic [EMAIL PROTECTED] wrote:
 
 Praveen KUMAR wrote:
 
  Hello,
 
  I am little bit confuse in following decision:
 
  Should be use
 
  1- Apache (2.0.54) + Tomcat (5.0.28) in production with tomcat
  listener (through Coyote connector) configured with mod_jk (1.2.12)
  with apache
  2- Or Standalone Tomcat (with their standard apache provided by tomcat)
 
  What would be difference in both the scenarios in terms of performance
  and reliability?
 
 Scenario 2 is easier to implement, there are fewer things that can break
 and less config files to maintain. Scenario 1 gives you a unified
 setting of your web space. You just simply know that you have one
 front-end, Apache. In that case Apache receives the initial HTTP request
 and can handle parts of it.
 
 The most interesting aspect of such a setup are authentication and
 redirection. While Tomcat has some rudimentary aliasing, Apache is
 superrior when it comes to URL rewriting, redirections and proxying. On
 the field of authentication, Tomcat supports HTTP-Basic, HTTP-Digest and
 SSL-based authentication. Apache can add to that SPNEGO (Kerberos5, read
 Microsoft Active Directory Service), plus several backend mechs for the
 Basic and Digest (LDAP, MySQL, PostgreSQL,...). Tomcat can only benefit
 from that.
 
 My advice to you, if you're learning or experimenting, use Tomcat
 StandAlone. If you're thinking production, gather your requrements and
 see what fits you best. It could again very well be TC standalone.
 
 Nix.
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 


-- 
Thanks and best regards,
Anoop


Re: Apache+Tomcat

2005-05-11 Thread Oto Bossert
Yoo,

If you need PHP than standalone tomcat is not an option you want, to my opinion!

Greetings O.

On 5/11/05, Anoop kumar V [EMAIL PROTECTED] wrote:
 We use tomcat standalone on production - most of our pages are dynamic (95%)
 and the user load is ~7000 and it has been behaving awesome - we use 4.1.31.
 
 hth,
 Anoop
 
 On 5/11/05, Nikola Milutinovic [EMAIL PROTECTED] wrote:
 
  Praveen KUMAR wrote:
 
   Hello,
  
   I am little bit confuse in following decision:
  
   Should be use
  
   1- Apache (2.0.54) + Tomcat (5.0.28) in production with tomcat
   listener (through Coyote connector) configured with mod_jk (1.2.12)
   with apache
   2- Or Standalone Tomcat (with their standard apache provided by tomcat)
  
   What would be difference in both the scenarios in terms of performance
   and reliability?
 
  Scenario 2 is easier to implement, there are fewer things that can break
  and less config files to maintain. Scenario 1 gives you a unified
  setting of your web space. You just simply know that you have one
  front-end, Apache. In that case Apache receives the initial HTTP request
  and can handle parts of it.
 
  The most interesting aspect of such a setup are authentication and
  redirection. While Tomcat has some rudimentary aliasing, Apache is
  superrior when it comes to URL rewriting, redirections and proxying. On
  the field of authentication, Tomcat supports HTTP-Basic, HTTP-Digest and
  SSL-based authentication. Apache can add to that SPNEGO (Kerberos5, read
  Microsoft Active Directory Service), plus several backend mechs for the
  Basic and Digest (LDAP, MySQL, PostgreSQL,...). Tomcat can only benefit
  from that.
 
  My advice to you, if you're learning or experimenting, use Tomcat
  StandAlone. If you're thinking production, gather your requrements and
  see what fits you best. It could again very well be TC standalone.
 
  Nix.
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 --
 Thanks and best regards,
 Anoop
 


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



Issues with Custom Realm in Tomcat 5.5

2005-05-11 Thread Ankit Shah
Hi everyone,
I hope someone can help us with this problem.

Current Tomcat settings:
Release in use: 5.5.9 along with 1.4.2 compatibility add-on
Logging using Log4J
JRE version: 1.4.2_05

We have written our own custom realm that essentially extends the standard 
DataSource Realm. However, we are unable to authenticate users of Tomcat's 
admin and manager application using our Realm. When setting Log4J logging 
level to Debug, we discovered the following:

1. The Realm is loaded into the MBean Manager. We see a message 'MBean 
successfully registered' for our Realm
2. When admin is user is being validated, the log messages say 
'ClassLoader error: class not found'. and authentication fails. I am not 
sure whether it failed to load our Realm (shouldn't happen since already 
registered with MBean) or something else went missing. We CAN perform 
authentication using the MemoryRealm that's configured by default.

What makes this problem even more strange is our Realm worked successfully 
with Tomcat 5.5.7

Anyone have ANY suggestions as where can we investigate for this problem, 
please do respond back

Thanks in advance.

Ankit


Problem in Parsing - Error while doing lookup - HELP

2005-05-11 Thread Sanjeev Srivastava
Hi All!,
  I saw your mail-id and response on
Java Forum. I am stuck in some problem with web.xml,
hope you can help me out. I am able to start the
tomcat but web.xml is giving me problem  Error whiel
doing lookup. I don't see anything wrong in web.xml.
Please HELP.

Please find below the logs:

WebappClassLoader:
validateJarFile(/var/ian/pdgm/tomcat/webapps/pdgm/WEB-INF/lib
/javax.jar) - jar not loaded. See Servlet Spec 2.3,
section 9.7.2. Offending cla
ss: javax/servlet/Servlet.class
[ERROR] Digester - -Parse Error at line 870 column 11:
The content of element ty
pe web-app must match
(icon?,display-name?,description?,distributable?,contex
t-param*,filter*,filter-mapping*,listener*,servlet*,servlet-mapping*,session-con
fig?,mime-mapping*,welcome-file-list?,error-page*,taglib*,resource-env-ref*,reso
urce-ref*,security-constraint*,login-config?,security-role*,env-entry*,ejb-ref*,
ejb-local-ref*). org.xml.sax.SAXParseException: The
content of element type w
eb-app must match
(icon?,display-name?,description?,distributable?,context-par
am*,filter*,filter-mapping*,listener*,servlet*,servlet-mapping*,session-config?,
mime-mapping*,welcome-file-list?,error-page*,taglib*,resource-env-ref*,resource-
ref*,security-constraint*,login-config?,security-role*,env-entry*,ejb-ref*,ejb-l
ocal-ref*).org.xml.sax.SAXParseException: The
content of element type web-app
 must match
(icon?,display-name?,description?,distributable?,context-param*,fi
lter*,filter-mapping*,listener*,servlet*,servlet-mapping*,session-config?,mime-m
apping*,welcome-file-list?,error-page*,taglib*,resource-env-ref*,resource-ref*,s
ecurity-constraint*,login-config?,security-role*,env-entry*,ejb-ref*,ejb-local-r
ef*).
at
org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Un
known Source)
at
org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown
Source)
at
org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown
Source)
at
org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown
Source)
at
org.apache.xerces.impl.dtd.XMLDTDValidator.handleEndElement(Unknown
S
ource)
at
org.apache.xerces.impl.dtd.XMLDTDValidator.endElement(Unknown
Source)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEndElement(
Unknown Source)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContent
Dispatcher.dispatch(Unknown Source)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Un
known Source)
at
org.apache.xerces.parsers.XML11Configuration.parse(Unknown
Source)
at
org.apache.xerces.parsers.DTDConfiguration.parse(Unknown
Source)
at
org.apache.xerces.parsers.XMLParser.parse(Unknown
Source)
at
org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown
Source)
at
org.apache.commons.digester.Digester.parse(Digester.java:1548)
at
org.apache.catalina.startup.ContextConfig.defaultConfig(ContextConfig
.java:548)
at
org.apache.catalina.startup.ContextConfig.start(ContextConfig.java:63
8)
at
org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfi
g.java:243)
at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(Lifecycl
eSupport.java:166)
at
org.apache.catalina.core.StandardContext.start(StandardContext.java:3
582)
at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188)
at
org.apache.catalina.core.StandardHost.start(StandardHost.java:754)
at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188)
at
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:363
)
at
org.apache.catalina.core.StandardService.start(StandardService.java:4
97)
at
org.apache.catalina.core.StandardServer.start(StandardServer.java:219
0)
at
org.apache.catalina.startup.Catalina.start(Catalina.java:512)
  
   126,1-8   57%
at
org.apache.catalina.core.StandardService.start(StandardService.java:4
97)
at
org.apache.catalina.core.StandardServer.start(StandardServer.java:219
0)
at
org.apache.catalina.startup.Catalina.start(Catalina.java:512)
at
org.apache.catalina.startup.Catalina.execute(Catalina.java:400)
at
org.apache.catalina.startup.Catalina.process(Catalina.java:180)
at java.lang.reflect.Method.invoke(Native
Method)
at
org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203)

[ERROR] Digester - -Parse Error at line 55 column 11:
The content of element typ
e web-app must match
(icon?,display-name?,description?,distributable?,context
-param*,filter*,filter-mapping*,listener*,servlet*,servlet-mapping*,session-conf
ig?,mime-mapping*,welcome-file-list?,error-page*,taglib*,resource-env-ref*,resou
rce-ref*,security-constraint*,login-config?,security-role*,env-entry*,ejb-ref*,e
jb-local-ref*). org.xml.sax.SAXParseException: The
content of element type 

newbie tips - how to deploy tomcat/mod_jk

2005-05-11 Thread mbneto
Hi,
I am looking for tips for beginners regarding deploying tomcat/mod_jk.

I have some basic questions such as where do I put the jsp and java
files, how do I configure those directories if I need to point to a
different location etc.

regards,
mb

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



RE: newbie tips - how to deploy tomcat/mod_jk

2005-05-11 Thread Raghupathy,Gurumoorthy
http://www.one0.com/html/downloads.php download the pdf document ... 


Guru

-Original Message-
From: mbneto [mailto:[EMAIL PROTECTED] 
Sent: 11 May 2005 14:52
To: Tomcat Users List
Subject: newbie tips - how to deploy tomcat/mod_jk


Hi,
I am looking for tips for beginners regarding deploying tomcat/mod_jk.

I have some basic questions such as where do I put the jsp and java
files, how do I configure those directories if I need to point to a
different location etc.

regards,
mb

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



url-pattern in web.xml -- looking for explanations and best practice

2005-05-11 Thread Tim Diggins
Hi-
I'm trying to configure my tomcat 5.0.28 webapp so that one servlet (a 
Spring dispatcher as it happens, but that's irrelevant) receives 
virtually everything except standard static non-text file patterns 
(*.css, *.png, *.gif, etc.) which I want served up statically.

I've been trying various options for url-pattern within servlet mapping 
and have been getting very confused... Some questions therefore...

1) Is there a definition / documentation of what the syntax for a 
url-pattern is?  I've tried and tried googling and looking, but can't 
find such a thing (I'm not sure that it's standardised across different 
containers, but there seems to be no definition in the tomcat docs that 
I could find). Obviously, if anyone can refer me to this, then I don't 
need the other questions answered!

2) is there any way to say - if a url includes a ~ (tilde character) 
then route it to a particular servlet. The following give errors:
  url-pattern*~*/url-pattern
  url-pattern~//url-pattern
  url-pattern~*/url-pattern

But oddly the following doesn't:
  url-pattern*.~/url-pattern
*error looks like:
11-May-2005 15:13:07 org.apache.catalina.startup.ContextConfig 
applicationConfig
SEVERE: Parse error in application web.xml 
java.lang.IllegalArgumentException: Invalid url-pattern ~/*.* in 
servlet mapping
at 
org.apache.commons.digester.Digester.createSAXException(Digester.java
:2540)
at 
org.apache.commons.digester.Digester.createSAXException(Digester.java
:2566)
--

3) is there any way to specify NO extension (like a request for 
directory) and exclude things with an extension?

4) is there any way to specify what you want to go to the default 
(static) servlet and then state a sink for anything else (invert the 
default-specific servlet mapping in other words).

5) is there some obvious best practice I'm missing here (excluding 
making my urls less interpretable).

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


RE: url-pattern in web.xml -- looking for explanations and best practice

2005-05-11 Thread Allistair Crossley
URL patterns are quite limited for the web.xml. The document you want is 
actually the Servlet Specification PDF from Sun's J2EE website.

You can achieve what you are talking about using the JK module with Apache or 
IIS as this forwards requests from the web server to Tomcat. It allows the ! to 
say not this URL pattern.

Cheers, Allistair.

 -Original Message-
 From: Tim Diggins [mailto:[EMAIL PROTECTED]
 Sent: 11 May 2005 15:26
 To: tomcat-user@jakarta.apache.org
 Subject: url-pattern in web.xml -- looking for explanations and best
 practice
 
 
 Hi-
 
 I'm trying to configure my tomcat 5.0.28 webapp so that one 
 servlet (a 
 Spring dispatcher as it happens, but that's irrelevant) receives 
 virtually everything except standard static non-text file patterns 
 (*.css, *.png, *.gif, etc.) which I want served up statically.
 
 I've been trying various options for url-pattern within 
 servlet mapping 
 and have been getting very confused... Some questions therefore...
 
 1) Is there a definition / documentation of what the syntax for a 
 url-pattern is?  I've tried and tried googling and looking, but can't 
 find such a thing (I'm not sure that it's standardised across 
 different 
 containers, but there seems to be no definition in the tomcat 
 docs that 
 I could find). Obviously, if anyone can refer me to this, 
 then I don't 
 need the other questions answered!
 
 
 2) is there any way to say - if a url includes a ~ (tilde character) 
 then route it to a particular servlet. The following give errors:
url-pattern*~*/url-pattern
url-pattern~//url-pattern
url-pattern~*/url-pattern
 
 But oddly the following doesn't:
url-pattern*.~/url-pattern
 
 *error looks like:
 11-May-2005 15:13:07 org.apache.catalina.startup.ContextConfig 
 applicationConfig
 SEVERE: Parse error in application web.xml 
 java.lang.IllegalArgumentException: Invalid url-pattern ~/*.* in 
 servlet mapping
  at 
 org.apache.commons.digester.Digester.createSAXException(Digester.java
 :2540)
  at 
 org.apache.commons.digester.Digester.createSAXException(Digester.java
 :2566)
 --
 
 3) is there any way to specify NO extension (like a request for 
 directory) and exclude things with an extension?
 
 4) is there any way to specify what you want to go to the default 
 (static) servlet and then state a sink for anything else (invert the 
 default-specific servlet mapping in other words).
 
 5) is there some obvious best practice I'm missing here (excluding 
 making my urls less interpretable).
 
 Many thanks
 
 Tim
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 


FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE 
---
QAS Ltd.
Developers of QuickAddress Software
a href=http://www.qas.com;www.qas.com/a
Registered in England: No 2582055
Registered in Australia: No 082 851 474
---
/FONT


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



not installing properly

2005-05-11 Thread Owen Corpening
I ran startup.bat and can access localhost:8080 but the window popped up
never goes away, it ends with:
May 11, 2005 9:15:26 AM org.apache.catalina.startup.Catalina start
INFO: Server startup in 1857 ms

And appears stuck there. I tried following the instructions to enable
verbose log4j logging but never got the promised tomcat.log. I changed all
the loglevels in C:\jakarta-tomcat\common\classes\logging.properties to
FINEST but the verbosity appears to be unchanged.

Worse: I am trying to install Tomcat as a service, embedding its
installation inside my app, and when I run this line:

C:\jakarta-tomcat\bintomcat5 //IS//Tomcat5 --DisplayName=Apache Tomcat
5 --In
stall=C:\jakarta-tomcat\bin\tomcat5.exe  --Jvm=auto --StartMode=jvm --Stop
Mode
=jvm --StartClass=org.apache.catalina.startup.Bootstrap --StartParams=start 
--St
opClass=org.apache.catalina.startup.Bootstrap --StopParams=stop --Classpath=
C:\
Program
Files\Java\j2sdk1.4.2_07\lib\tools.jar;C:\jakarta-tomcat\bin\bootstrap.j
ar;C:\Program Files\Microsoft SQL Server 2000 Driver For
JDBC\lib\msbase.jar;C:\
Program Files\Microsoft SQL Server 2000 Driver For
JDBC\lib\mssqlserver.jar;C:\P
rogram Files\Microsoft SQL Server 2000 Driver For
JDBC\lib\msutil.jar --JvmMX=
512 --LogPath=..\logs --DisplayName=Acorn Application
Server --Description=
Handles HTTP and Web Services Requests to Acorn
Applications --User=HOUSTON\oco
rpening --password=? --Startup=auto

I get:
[2005-05-11 09:19:37] [info] Service Tomcat5 name Acorn Application Server
[2005-05-11 09:19:37] [420  service.c] [error] The specified service has
been marked for deletion.
[2005-05-11 09:19:37] [549  prunsrv.c] [error] Failed installing Tomcat5
service
[2005-05-11 09:19:37] [info] Procrun finished.


Any suggestions about how to embed tomcat would be greatly appreciated.

owen




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



RE: url-pattern in web.xml -- looking for explanations and best p ractice

2005-05-11 Thread Raghupathy,Gurumoorthy
In your webapp have dir 

http://servername:port/context/static/ for all your static content

http://servername:port/context/dynamic/ for all your dynamic content


URL Pattern
URL-pattern/dynamic/*/URL-pattern


guru
-Original Message-
From: Tim Diggins [mailto:[EMAIL PROTECTED] 
Sent: 11 May 2005 15:26
To: tomcat-user@jakarta.apache.org
Subject: url-pattern in web.xml -- looking for explanations and best
practice


Hi-

I'm trying to configure my tomcat 5.0.28 webapp so that one servlet (a 
Spring dispatcher as it happens, but that's irrelevant) receives 
virtually everything except standard static non-text file patterns 
(*.css, *.png, *.gif, etc.) which I want served up statically.

I've been trying various options for url-pattern within servlet mapping 
and have been getting very confused... Some questions therefore...

1) Is there a definition / documentation of what the syntax for a 
url-pattern is?  I've tried and tried googling and looking, but can't 
find such a thing (I'm not sure that it's standardised across different 
containers, but there seems to be no definition in the tomcat docs that 
I could find). Obviously, if anyone can refer me to this, then I don't 
need the other questions answered!


2) is there any way to say - if a url includes a ~ (tilde character) 
then route it to a particular servlet. The following give errors:
   url-pattern*~*/url-pattern
   url-pattern~//url-pattern
   url-pattern~*/url-pattern

But oddly the following doesn't:
   url-pattern*.~/url-pattern

*error looks like:
11-May-2005 15:13:07 org.apache.catalina.startup.ContextConfig 
applicationConfig
SEVERE: Parse error in application web.xml 
java.lang.IllegalArgumentException: Invalid url-pattern ~/*.* in 
servlet mapping
 at 
org.apache.commons.digester.Digester.createSAXException(Digester.java
:2540)
 at 
org.apache.commons.digester.Digester.createSAXException(Digester.java
:2566)
--

3) is there any way to specify NO extension (like a request for 
directory) and exclude things with an extension?

4) is there any way to specify what you want to go to the default 
(static) servlet and then state a sink for anything else (invert the 
default-specific servlet mapping in other words).

5) is there some obvious best practice I'm missing here (excluding 
making my urls less interpretable).

Many thanks

Tim

-
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: not installing properly

2005-05-11 Thread Jason Bainbridge
You need to install it as a Windows Service to be able to run it in
the background so checkout the service.bat file in the same directory
as startup.bat.

Regards,
-- 
Jason Bainbridge
http://kde.org - [EMAIL PROTECTED]
Personal Site - http://jasonbainbridge.com

On 5/11/05, Owen Corpening [EMAIL PROTECTED] wrote:
 I ran startup.bat and can access localhost:8080 but the window popped up
 never goes away, it ends with:
 May 11, 2005 9:15:26 AM org.apache.catalina.startup.Catalina start
 INFO: Server startup in 1857 ms
 
 And appears stuck there. I tried following the instructions to enable
 verbose log4j logging but never got the promised tomcat.log. I changed all
 the loglevels in C:\jakarta-tomcat\common\classes\logging.properties to
 FINEST but the verbosity appears to be unchanged.
 
 Worse: I am trying to install Tomcat as a service, embedding its
 installation inside my app, and when I run this line:
 
 C:\jakarta-tomcat\bintomcat5 //IS//Tomcat5 --DisplayName=Apache Tomcat
 5 --In
 stall=C:\jakarta-tomcat\bin\tomcat5.exe  --Jvm=auto --StartMode=jvm --Stop
 Mode
 =jvm --StartClass=org.apache.catalina.startup.Bootstrap --StartParams=start
 --St
 opClass=org.apache.catalina.startup.Bootstrap --StopParams=stop --Classpath=
 C:\
 Program
 Files\Java\j2sdk1.4.2_07\lib\tools.jar;C:\jakarta-tomcat\bin\bootstrap.j
 ar;C:\Program Files\Microsoft SQL Server 2000 Driver For
 JDBC\lib\msbase.jar;C:\
 Program Files\Microsoft SQL Server 2000 Driver For
 JDBC\lib\mssqlserver.jar;C:\P
 rogram Files\Microsoft SQL Server 2000 Driver For
 JDBC\lib\msutil.jar --JvmMX=
 512 --LogPath=..\logs --DisplayName=Acorn Application
 Server --Description=
 Handles HTTP and Web Services Requests to Acorn
 Applications --User=HOUSTON\oco
 rpening --password=? --Startup=auto
 
 I get:
 [2005-05-11 09:19:37] [info] Service Tomcat5 name Acorn Application Server
 [2005-05-11 09:19:37] [420  service.c] [error] The specified service has
 been marked for deletion.
 [2005-05-11 09:19:37] [549  prunsrv.c] [error] Failed installing Tomcat5
 service
 [2005-05-11 09:19:37] [info] Procrun finished.
 
 Any suggestions about how to embed tomcat would be greatly appreciated.
 
 owen
 
 -
 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]



jsvc: can't load server.xml

2005-05-11 Thread =?iso-8859-1?Q?Andr=E9s_Glez.?=
I've installed tomcat5.0.28 on a Fedora Core 3, with java 1.4.2.
When i try to execute tomcat with jsvc i get the following:
./jsvc -user tomcat -home 
/usr/local/java -Dcatalina.home=/usr/local/tomcat -cp 
/usr/local/java/lib/tools.jar:/usr/local/tomcat/bin/commons-daemon.jar:/usr/local/tomcat/bin/bootstrap.jar 
-debug org.apache.catalina.startup.Bootstrap

...
...
...
jsvc.exec debug: Class org/apache/commons/daemon/support/DaemonLoader found
jsvc.exec debug: Native methods registered
jsvc.exec debug: Checking daemon
jsvc.exec debug: Daemon checked successfully
Can't load server.xml
jsvc.exec debug: Daemon loaded successfully
Can't load server.xml
11-may-2005 19:26:08 org.apache.catalina.startup.Catalina start
INFO: Server startup in 0 ms
jsvc.exec debug: Daemon started successfully
jsvc.exec debug: Waiting for a signal to be delivered
I have CATALINA_HOME and JAVA_HOME defined also, but it does not work
Any help? 

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


Re: Problem in Parsing - Error while doing lookup - HELP

2005-05-11 Thread David Smith
Are the elements in the web.xml in order as listed in the exception
report below?  Since your web.xml is being validated against a DTD, the
elements have to be in order.

--David

Sanjeev Srivastava wrote:

Hi All!,
  I saw your mail-id and response on
Java Forum. I am stuck in some problem with web.xml,
hope you can help me out. I am able to start the
tomcat but web.xml is giving me problem  Error whiel
doing lookup. I don't see anything wrong in web.xml.
Please HELP.

Please find below the logs:

WebappClassLoader:
validateJarFile(/var/ian/pdgm/tomcat/webapps/pdgm/WEB-INF/lib
/javax.jar) - jar not loaded. See Servlet Spec 2.3,
section 9.7.2. Offending cla
ss: javax/servlet/Servlet.class
[ERROR] Digester - -Parse Error at line 870 column 11:
The content of element ty
pe web-app must match
(icon?,display-name?,description?,distributable?,contex
t-param*,filter*,filter-mapping*,listener*,servlet*,servlet-mapping*,session-con
fig?,mime-mapping*,welcome-file-list?,error-page*,taglib*,resource-env-ref*,reso
urce-ref*,security-constraint*,login-config?,security-role*,env-entry*,ejb-ref*,
ejb-local-ref*). org.xml.sax.SAXParseException: The
content of element type w
eb-app must match
(icon?,display-name?,description?,distributable?,context-par
am*,filter*,filter-mapping*,listener*,servlet*,servlet-mapping*,session-config?,
mime-mapping*,welcome-file-list?,error-page*,taglib*,resource-env-ref*,resource-
ref*,security-constraint*,login-config?,security-role*,env-entry*,ejb-ref*,ejb-l
ocal-ref*).org.xml.sax.SAXParseException: The
content of element type web-app
 must match
(icon?,display-name?,description?,distributable?,context-param*,fi
lter*,filter-mapping*,listener*,servlet*,servlet-mapping*,session-config?,mime-m
apping*,welcome-file-list?,error-page*,taglib*,resource-env-ref*,resource-ref*,s
ecurity-constraint*,login-config?,security-role*,env-entry*,ejb-ref*,ejb-local-r
ef*).
at
org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Un
known Source)
at
org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown
Source)
at
org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown
Source)
at
org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown
Source)
at
org.apache.xerces.impl.dtd.XMLDTDValidator.handleEndElement(Unknown
S
ource)
at
org.apache.xerces.impl.dtd.XMLDTDValidator.endElement(Unknown
Source)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEndElement(
Unknown Source)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContent
Dispatcher.dispatch(Unknown Source)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Un
known Source)
at
org.apache.xerces.parsers.XML11Configuration.parse(Unknown
Source)
at
org.apache.xerces.parsers.DTDConfiguration.parse(Unknown
Source)
at
org.apache.xerces.parsers.XMLParser.parse(Unknown
Source)
at
org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown
Source)
at
org.apache.commons.digester.Digester.parse(Digester.java:1548)
at
org.apache.catalina.startup.ContextConfig.defaultConfig(ContextConfig
.java:548)
at
org.apache.catalina.startup.ContextConfig.start(ContextConfig.java:63
8)
at
org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfi
g.java:243)
at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(Lifecycl
eSupport.java:166)
at
org.apache.catalina.core.StandardContext.start(StandardContext.java:3
582)
at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188)
at
org.apache.catalina.core.StandardHost.start(StandardHost.java:754)
at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188)
at
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:363
)
at
org.apache.catalina.core.StandardService.start(StandardService.java:4
97)
at
org.apache.catalina.core.StandardServer.start(StandardServer.java:219
0)
at
org.apache.catalina.startup.Catalina.start(Catalina.java:512)
  
   126,1-8   57%
at
org.apache.catalina.core.StandardService.start(StandardService.java:4
97)
at
org.apache.catalina.core.StandardServer.start(StandardServer.java:219
0)
at
org.apache.catalina.startup.Catalina.start(Catalina.java:512)
at
org.apache.catalina.startup.Catalina.execute(Catalina.java:400)
at
org.apache.catalina.startup.Catalina.process(Catalina.java:180)
at java.lang.reflect.Method.invoke(Native
Method)
at
org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203)

[ERROR] Digester - -Parse Error at line 55 column 11:
The content of element typ
e web-app must match
(icon?,display-name?,description?,distributable?,context
-param*,filter*,filter-mapping*,listener*,servlet*,servlet-mapping*,session-conf

commercial monitoring tools

2005-05-11 Thread Andy Kriger
I'm interested in people's experiences with commerical monitoring
tools and Tomcat. I found one called ManageEngine that looks
interesting - has anyone used that specifically? Are there open-source
tools (e.g. Nagios - which I have no experience with) that can do the
job just as well (including and especially an easy to use website for
displaying monitoring info)?

I'm interesting in coming with something that will let me track
Tomcat's performance/behavior such that I can isolate what causes it
to occasionally hang-up (no info in the logs) or run out of memory. If
anyone has already looked into these things and come up with a decent
solution please share.

Thank you
andy kriger

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



Re: commercial monitoring tools

2005-05-11 Thread Ralph Kanther
Hi Andy,

 I'm interesting in coming with something that will let me track
 Tomcat's performance/behavior such that I can isolate what causes it
 to occasionally hang-up (no info in the logs) or run out of memory. If
 anyone has already looked into these things and come up with a decent
 solution please share.

We fixed our memory leaks with Reference Scanner http://jb2works.com/ .
This is really a great monitoring tool, we always have it running when
we run tomcat. 
For Open Source or education it seems to be free.

Greetz
Ralph

-- 
+++ Lassen Sie Ihren Gedanken freien Lauf... z.B. per FreeSMS +++
GMX bietet bis zu 100 FreeSMS/Monat: http://www.gmx.net/de/go/mail

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



Re: can't load server.xml

2005-05-11 Thread =?iso-8859-1?Q?Andr=E9s_Glez.?=
I found. I forgot the
 chown -R tomcat.tomcat /usr/local/tomcat/
- Original Message - 
From: Andrés Glez. [EMAIL PROTECTED]
To: Tomcat Users List tomcat-user@jakarta.apache.org
Sent: Wednesday, May 11, 2005 5:29 PM
Subject: jsvc: can't load server.xml


I've installed tomcat5.0.28 on a Fedora Core 3, with java 1.4.2.
When i try to execute tomcat with jsvc i get the following:
./jsvc -user tomcat -home 
/usr/local/java -Dcatalina.home=/usr/local/tomcat -cp 
/usr/local/java/lib/tools.jar:/usr/local/tomcat/bin/commons-daemon.jar:/usr/local/tomcat/bin/bootstrap.jar 
 -debug org.apache.catalina.startup.Bootstrap

...
...
...
jsvc.exec debug: Class org/apache/commons/daemon/support/DaemonLoader 
found
jsvc.exec debug: Native methods registered
jsvc.exec debug: Checking daemon
jsvc.exec debug: Daemon checked successfully
Can't load server.xml
jsvc.exec debug: Daemon loaded successfully
Can't load server.xml
11-may-2005 19:26:08 org.apache.catalina.startup.Catalina start
INFO: Server startup in 0 ms
jsvc.exec debug: Daemon started successfully
jsvc.exec debug: Waiting for a signal to be delivered

I have CATALINA_HOME and JAVA_HOME defined also, but it does not work
Any help?
-
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: Setting an environment variable in tomcat 5.5 service?

2005-05-11 Thread Mufaddal Khumri
Thank you for the reply. I am trying to set in web.xml using:

  env-entry
env-entry-nameMY_ENV_VAR/env-entry-name
env-entry-valueC:/config/one.xml/env-entry-value
env-entry-typejava.lang.String/env-entry-type
  /env-entry

I am placing this right above the /web-app ending tag.

My environment variable is not being set. I check this by printing out
all the environment variables from my webapp:
...
...
Map env = System.getenv();
Iterator it = new TreeSet(env.keySet()).iterator();
   ...


Any clues as to why my env-entry is not taking effect?

Thanks,

-Original Message-
From: Lutz Zetzsche [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, May 10, 2005 2:01 PM
To: Tomcat Users List
Subject: Re: Setting an environment variable in tomcat 5.5 service?

Hi Mufaddal,

Am Dienstag, 10. Mai 2005 21:33 schrieb Mufaddal Khumri:
 I have Tomcat 5.5 running as a service on Windows XP. Where in Tomcat
 can I set an environment variable?

 I can set an environment variable by going to Control Panel - System
 - Advanced - Environment variables, but I want to do it in
 Catalina.sh or equivalent.

 In my Tomcat/bin folder I have got: bootstrap.jar,
 commons-logging-api.jar, tomcat5.exe, tomcat5w.exe. I do not see a
 Catalina.sh or equivalent.

You have different options where to set environment variables. Choosing 
the right place for your variable declaration depends on your 
intention.

You can set environment variables here:

1.
In $CATALINA_HOME/conf/server.xml,
using the Environment element nested inside the GlobalNamingResources 
element:
http://jakarta.apache.org/tomcat/tomcat-5.5-doc/config/globalresources.h
tml

2.
In context files in different places, i.e. 
$CATALINA_HOME/conf/context.xml or 
$CATALINA_HOME/conf/[enginename]/[hostname]/[webappname].xml,
using the Environment element nested inside the Context element:
http://jakarta.apache.org/tomcat/tomcat-5.5-doc/config/context.html#Envi
ronment%20Entries

3.
In $CATALINA_HOME/webapps/[webappname]/WEB-INF/web.xml, like 
demonstrated here:
http://jakarta.apache.org/tomcat/tomcat-5.5-doc/config/context.html#Envi
ronment%20Entries


Best wishes

Lutz

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


--
This email and any files transmitted with it are confidential 
and intended solely for the use of the individual or entity 
to whom they are addressed. If you have received this 
email in error please notify the system manager. Please
note that any views or opinions presented in this email 
are solely those of the author and do not necessarily
represent those of the company. Finally, the recipient
should check this email and any attachments for the 
presence of viruses. The company accepts no liability for
any damage caused by any virus transmitted by this email.
Consult your physician prior to the use of any medical
supplies or product.
--


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



Form Authentication with SSL behind Load Balancer

2005-05-11 Thread Brian Burt
I'm running into a problem using form-based authentication with Tomcat 5.5.9 
behind a Cisco CSS load balancer, and I'm hoping someone can point me in the 
right direction.

We've got Tomcat deployed on 2 nodes, not clustered, but load-balanced via NAT 
distribution by the Cisco device.  We want the site traffic to be secured with 
SSL, but the SSL is actually terminated in the load balancer for efficiency and 
to offload the encryption/decryption burden from Tomcat.

We also planned to use J2EE container-managed authentication using the 
form-based option.  This is where we're having problems.

When we reference secure content within the target web app with an HTTPS 
address, Tomcat serves back the configured Login page just fine.  When we 
submit the Login form, however, and authentication succeeds, we are redirected 
to the original resource over HTTP instead of HTTPS.

Since the SSL terminates in the load balancer, the Cisco device actually routes 
the request to Tomcat on the standard HTTP port (8080).  It appears that, after 
successful authentication by the container via the Login form, Tomcat redirects 
the user to the original resource URL with the HTTP protocol instead of HTTPS, 
because Tomcat doesn't know about the HTTPS address intercepted by Cisco.  To 
Tomcat, the requests all come in looking like plain old HTTP.

Just for grins, I tried setting transport-guarantee = CONFIDENTIAL in my 
web.xml.  It didn't work, just created a Catch-22 where Tomcat tries to 
redirect to HTTPS but Cisco intercedes and forwards the request to Tomcat as 
HTTP.  I spoke with our Network engineers, and they don't believe they can do 
anything about this on the Cisco side.  They believe it's a web server / Tomcat 
issue.

Once I'm into the app, I can type the s after http in the browser's 
location bar to switch back to SSL.  Clicking links with relative URLs in the 
pages appears to stick with the HTTPS protocol after that.  It's only the 
initial container-managed login and redirection to the original requested 
resource that seems to cause the protocol switch.

Any advice is greatly appreciated.  Thanks!


Brian Burt
Enterprise Application Engineer
Gordon Food Service
e-mail: [EMAIL PROTECTED] 
office phone: 616-717-6972


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



Re: not installing properly

2005-05-11 Thread Owen Corpening
got it to install by altering cli parameters on another machine ... what
about the logging verbosity?

can't get log4j logging to worrk at all either

here is the working cli:

C:\jakarta-tomcat\bin\tomcat5.exe
//IS//AcornApplicationServer --Install=C:\jakarta-tomcat\bin\tomcat5.exe -
-Jvm=C:\Program
Files\Java\jdk1.5.0_03\jre\bin\server\jvm.dll --StartMode=jvm --StopMode=jv
m --StartClass=org.apache.catalina.startup.Bootstrap --StartParams=start --S
topClass=org.apache.catalina.startup.Bootstrap --StopParams=stop --Classpath
=C:\jakarta-tomcat\bin\bootstrap.jar;C:\Program
Files\Java\jdk1.5.0_03\lib\tools.jar;C:\Program Files\Microsoft SQL Server
2000 Driver For JDBC\lib\msbase.jar;C:\Program Files\Microsoft SQL Server
2000 Driver For JDBC\lib\mssqlserver.jar;C:\Program Files\Microsoft SQL
Server 2000 Driver For
JDBC\lib\msutil.jar --JvmMx=512 --LogPath=C:\jakarta-tomcat\logs --Disp
layName=Acorn Application Server --Description=Handles HTTP and Web
Services Requests to Acorn Applications --Startup=auto --JvmOptions
-Dcatalina.base=C:\jakarta-tomcat;-Dcatalina.home=C:\jakarta-tomcat;-Djava.
endorsed.dirs=C:\jakarta-tomcat\common\endorsed;-Djava.io.tmpdir=C:\jakarta-
tomcat\temp;-Dacorn.home=C:\Program Files\Acorn
Systems;-Djava.util.logging.config.file=C:\Program Files\Acorn
Systems\conf\acornlogging.properties --StdOutput=auto --StdError=auto --Jvm
Ms 128 --User=HOUSTON\jslavin --Password=???


Jason Bainbridge [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
You need to install it as a Windows Service to be able to run it in
the background so checkout the service.bat file in the same directory
as startup.bat.

Regards,
-- 
Jason Bainbridge
http://kde.org - [EMAIL PROTECTED]
Personal Site - http://jasonbainbridge.com

On 5/11/05, Owen Corpening [EMAIL PROTECTED] wrote:
 I ran startup.bat and can access localhost:8080 but the window popped up
 never goes away, it ends with:
 May 11, 2005 9:15:26 AM org.apache.catalina.startup.Catalina start
 INFO: Server startup in 1857 ms

 And appears stuck there. I tried following the instructions to enable
 verbose log4j logging but never got the promised tomcat.log. I changed
all
 the loglevels in C:\jakarta-tomcat\common\classes\logging.properties to
 FINEST but the verbosity appears to be unchanged.

 Worse: I am trying to install Tomcat as a service, embedding its
 installation inside my app, and when I run this line:

 C:\jakarta-tomcat\bintomcat5 //IS//Tomcat5 --DisplayName=Apache Tomcat
 5 --In

stall=C:\jakarta-tomcat\bin\tomcat5.exe  --Jvm=auto --StartMode=jvm --Stop
 Mode

=jvm --StartClass=org.apache.catalina.startup.Bootstrap --StartParams=start
 --St

opClass=org.apache.catalina.startup.Bootstrap --StopParams=stop --Classpath=
 C:\
 Program
 Files\Java\j2sdk1.4.2_07\lib\tools.jar;C:\jakarta-tomcat\bin\bootstrap.j
 ar;C:\Program Files\Microsoft SQL Server 2000 Driver For
 JDBC\lib\msbase.jar;C:\
 Program Files\Microsoft SQL Server 2000 Driver For
 JDBC\lib\mssqlserver.jar;C:\P
 rogram Files\Microsoft SQL Server 2000 Driver For
 JDBC\lib\msutil.jar --JvmMX=
 512 --LogPath=..\logs --DisplayName=Acorn Application
 Server --Description=
 Handles HTTP and Web Services Requests to Acorn
 Applications --User=HOUSTON\oco
 rpening --password=? --Startup=auto

 I get:
 [2005-05-11 09:19:37] [info] Service Tomcat5 name Acorn Application Server
 [2005-05-11 09:19:37] [420  service.c] [error] The specified service has
 been marked for deletion.
 [2005-05-11 09:19:37] [549  prunsrv.c] [error] Failed installing Tomcat5
 service
 [2005-05-11 09:19:37] [info] Procrun finished.

 Any suggestions about how to embed tomcat would be greatly appreciated.

 owen

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






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



Re: Apache+Tomcat

2005-05-11 Thread Hari Mailvaganam
Scenario two will be less hassle - unless you need a feature of Apache
HTTP Server.

If you plan to only use Apache HTTP Server as a listener for http
request - it will be better off with the Tomcat alone.

If, for any particular reason, you absolutely wish to use the Apache
HTTP server as the http listener only - you can proxy the request in
Apache to Tomcat. And not bother with mod-jk2.

regards,

Hari Mailvaganam

On 5/10/05, Praveen KUMAR [EMAIL PROTECTED] wrote:
 Hello,
 
 I am little bit confuse in following decision:
 
 Should be use
 
 1- Apache (2.0.54) + Tomcat (5.0.28) in production with tomcat listener
 (through Coyote connector) configured with mod_jk (1.2.12) with apache
 2- Or Standalone Tomcat (with their standard apache provided by tomcat)
 
 What would be difference in both the scenarios in terms of performance
 and reliability?
 
 --
 With best regards,
 Praveen Soni
 
 -
 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: Form Authentication with SSL behind Load Balancer

2005-05-11 Thread Hari Mailvaganam
A couple of suggestions:

- force all traffic on load balancer to/from extrenal world to SSL.

- after form authentication on Tomcat, redirect users to the URL used
by the load balancer - i.e. not XXX:8080/authenticate but
www.YYY.com/authenticate

 - or both

Hope this helps.

regards,

Hari Mailvaganam 

On 5/11/05, Brian Burt [EMAIL PROTECTED] wrote:
 I'm running into a problem using form-based authentication with Tomcat 5.5.9 
 behind a Cisco CSS load balancer, and I'm hoping someone can point me in the 
 right direction.
 
 We've got Tomcat deployed on 2 nodes, not clustered, but load-balanced via 
 NAT distribution by the Cisco device.  We want the site traffic to be secured 
 with SSL, but the SSL is actually terminated in the load balancer for 
 efficiency and to offload the encryption/decryption burden from Tomcat.
 
 We also planned to use J2EE container-managed authentication using the 
 form-based option.  This is where we're having problems.
 
 When we reference secure content within the target web app with an HTTPS 
 address, Tomcat serves back the configured Login page just fine.  When we 
 submit the Login form, however, and authentication succeeds, we are 
 redirected to the original resource over HTTP instead of HTTPS.
 
 Since the SSL terminates in the load balancer, the Cisco device actually 
 routes the request to Tomcat on the standard HTTP port (8080).  It appears 
 that, after successful authentication by the container via the Login form, 
 Tomcat redirects the user to the original resource URL with the HTTP protocol 
 instead of HTTPS, because Tomcat doesn't know about the HTTPS address 
 intercepted by Cisco.  To Tomcat, the requests all come in looking like plain 
 old HTTP.
 
 Just for grins, I tried setting transport-guarantee = CONFIDENTIAL in my 
 web.xml.  It didn't work, just created a Catch-22 where Tomcat tries to 
 redirect to HTTPS but Cisco intercedes and forwards the request to Tomcat as 
 HTTP.  I spoke with our Network engineers, and they don't believe they can do 
 anything about this on the Cisco side.  They believe it's a web server / 
 Tomcat issue.
 
 Once I'm into the app, I can type the s after http in the browser's 
 location bar to switch back to SSL.  Clicking links with relative URLs in 
 the pages appears to stick with the HTTPS protocol after that.  It's only the 
 initial container-managed login and redirection to the original requested 
 resource that seems to cause the protocol switch.
 
 Any advice is greatly appreciated.  Thanks!
 
 Brian Burt
 Enterprise Application Engineer
 Gordon Food Service
 e-mail: [EMAIL PROTECTED]
 office phone: 616-717-6972
 
 -
 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]



Memory for JSP Compliation in 4.1

2005-05-11 Thread Wendy Smoak
Will adding
   JAVA_OPTS=-Xmx128M
to catalina.sh help with running out of memory during JSP compilation in
4.1?

The notes in catalina.sh say that these options will be used when the
start stop or run command is executed, but from the Jasper config
page, I see that Tomcat will 'fork' another JVM in order to compile JSPs.
Does this new JVM inherit the memory settings of the original, or is there
some other way to increase its memory?

I'm reading here:

http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jasper-howto.html#Configuration
and another mailing list thread about the same thing, though I can't tell if
it was ever resolved
   http://www.mail-archive.com/tomcat-user@jakarta.apache.org/msg144736.html

Yet AGAIN, something that works fine on my Windows development box is
failing when I move it to the production web server which is running HP-UX.


Thank you,
Wendy Smoak


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



Re: Arabic encoding

2005-05-11 Thread Mark Thomas
There are lots of potential pitfalls when using non-default character 
encodings. It is easy to make mistakes both with Tomcat settings and 
with your code.

To sort out the tomcat settings, get the following index.jsp to work for 
whatever text you supply to the form. I have tested this with the latest 
TC4 and TC5 code and it works for me with any text I choose to enter.

Once you have this working, you can look at your application and see 
what is different.

Mark
%@ page contentType=text/html; charset=UTF-8 %
!DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN
html
  head
titleEncoding fun/title
  /head
  body
pData posted to this form was:
%
  request.setCharacterEncoding(UTF-8);
  out.print(request.getParameter(mydata));
%
/p
form method=post action=index.jsp
  enctype=application/x-www-form-urlencoded
  input type=text name=mydata
  input type=submit value=Submit /
  input type=reset value=Reset /
/form
  /body
/html
Fadwa Barham wrote:
While I was searching for a solution for the encoding, I found this
 
There is a standard for encoding URIs (http://www.w3.org/International/O-URL-
code.html) but this standard is not consistently followed by clients. This 
causes a number of problems.

The functionality provided by Tomcat (4 and 5) to handle this less than ideal 
situation is described below.

1. The Coyote HTTP/1.1 connector has a useBodyEncodingForURI attribute which 
if set to true will use the request body encoding to decode the URI query 
parameters.
  - The default value is true for TC4 (breaks spec but gives consistent 
behaviour across TC4 versions)
  - The default value is false for TC5 (spec compliant but there may be 
migration issues for some apps)
2. The Coyote HTTP/1.1 connector has a URIEncoding attribute which defaults to 
ISO-8859-1.
3. The parameters class (o.a.t.u.http.Parameters) has a QueryStringEncoding 
field which defaults to the URIEncoding. It must be set before the parameters 
are parsed to have an effect.

Things to note regarding the servlet API:
1. HttpServletRequest.setCharacterEncoding() normally only applies to the 
request body NOT the URI.
2. HttpServletRequest.getPathInfo() is decoded by the web container.
3. HttpServletRequest.getRequestURI() is not decoded by container.

Other tips:
1. Use POST with forms to return parameters as the parameters are then part of 
the request body.

Is this means that the changes between tc4 and tc5 about encoding is the reason why I can't have the write encoding in the new versions of tomcat? and if so, how to solve the problem?
 
Thanks

- Original Message - 
From: Fadwa Barham 
To: Tomcat Users List 
Sent: Tuesday, March 01, 2005 3:24 AM
Subject: Re: Arabic encoding


As tomcat 4.1.31 is suitable for arabic and it seems until now that tomcat 
4.1.31 solved the jndi datasource problems: Intermittent dB connection 
Failures and Random Connection closed Exceptions
I will use tomcat 4.1.31 until I can configure the latest versions of 
tomcat.
I feel not lucky
- Original Message - 
From: Fadwa Barham 
To: Tomcat Users List 
Sent: Tuesday, March 01, 2005 2:39 AM
Subject: Re: Arabic encoding


I tested many tomcat versions, I found until tomcat 4.1.31 no problems 
with arabic, but when I tried tomcat-4.1.18 and newer versions, I faced 
the same problem.

- Original Message - 
From: Benson Margulies 
To: Tomcat Users List 
Sent: Sunday, February 27, 2005 4:08 PM
Subject: RE: Arabic encoding


It depends on what the Oracle JDBC driver does with byte values that are
not legitimate US7ASCII. If, for some reason, it treated the data as
ISO-8859-1 instead of US7ASCII, then it might have streamed out through
tomcat, and the browser would have auto-detected the CP1256 pretending
to be ISO-8859-1.
-Original Message-
From: Fadwa Barham [mailto:[EMAIL PROTECTED]
Sent: Sunday, February 27, 2005 1:43 PM
To: Tomcat Users List
Subject: Re: Arabic encoding
But I wonder why the old tomcat and java displayed arabic correctly, and
I use the same classes12.jar in both of the old and the new.
I want to know what is the differance, what encoding they stopped to
support? It looks like that tomcat cannot understand the old Java cause
I have to change the encoding to arabic windows in the internet explorer
each time I request the servlet, and when I do this, every arabic
character is displayed correctly.
I think it is better to understand the problem and the changes so I can
handle the problem if I faced it again in the newer versions of tomcat
or Java.
I know that being the database in us7ascii is not good, but changing the
database encoding each time I face the problem is not the right way. I
may change it this time, but I need to understand.
thanks
- Original Message -
From: Benson Margulies 
To: Tomcat Users List 
Sent: Sunday, February 27, 2005 12:44 AM
Subject: RE: Arabic encoding


Oracle's ODBC driver will transcode from the database to UTF-16 based

Re: Issues with Custom Realm in Tomcat 5.5

2005-05-11 Thread Mark Thomas
Where are you placing the .jar/.class files for your custom realm?
At what level in server.xml is your realm configured?
Mark
Ankit Shah wrote:
Hi everyone,
I hope someone can help us with this problem.
Current Tomcat settings:
Release in use: 5.5.9 along with 1.4.2 compatibility add-on
Logging using Log4J
JRE version: 1.4.2_05
We have written our own custom realm that essentially extends the standard 
DataSource Realm. However, we are unable to authenticate users of Tomcat's 
admin and manager application using our Realm. When setting Log4J logging 
level to Debug, we discovered the following:

1. The Realm is loaded into the MBean Manager. We see a message 'MBean 
successfully registered' for our Realm
2. When admin is user is being validated, the log messages say 
'ClassLoader error: class not found'. and authentication fails. I am not 
sure whether it failed to load our Realm (shouldn't happen since already 
registered with MBean) or something else went missing. We CAN perform 
authentication using the MemoryRealm that's configured by default.

What makes this problem even more strange is our Realm worked successfully 
with Tomcat 5.5.7

Anyone have ANY suggestions as where can we investigate for this problem, 
please do respond back

Thanks in advance.
Ankit

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


Basic load balancing

2005-05-11 Thread Faine, Mark

Tomcat 5.0.28

We seem to often have to make minor changes that cause us to have to restart
our tomcat server (the whole server, not just a web application) and this
has lead me to decide to research load balancing.  The idea would be to have
two servers that would be exact duplicates.  One of the servers would only
become available when the other was not running.  This way we could make the
change on server2 (and restart it) and then bring server1 down and make the
change to it as well.  This would prevent any real downtime for our users.
Where should I look for info on how to implement this type of failover?
Thanks for your help

-Mark

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



Want to run servlets from other directory than webapps

2005-05-11 Thread Raueber Hotzenplotz
Hi

I've got Tomcat-5.0.27-r5 installed. Running servlets
(localhost) located in
/opt/tomcat5/webapps/ROOT/WEB_INF/classes is no
problem.

What do I need to do to run servlets from my user
directory (e.g. /home/user/myapp)?

I've tried to use http://localhost:8080/admin to add
an additional context, setting path and docbase to
/home/user/myapp, but this doesn't work. 

I've also tried to change appbase to /home/user/myapp
in conf/server.xml, but again no success.

I've uncommented the 'invoker' lines in conf/web.xml -
for the moment anyway:

servlet
servlet-nameinvoker/servlet-name
servlet-class
  org.apache.catalina.servlets.InvokerServlet
/servlet-class
init-param
param-namedebug/param-name
param-value0/param-value
/init-param
load-on-startup2/load-on-startup
/servlet

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


How do you configure Tomcat? Do you use the admin tool
or do you do it manually? The admin tool works strange
e.g. after deleting some context it was still in the
list.

Thanks!

Regards, Rudi




___ 
How much free photo storage do you get? Store your holiday 
snaps for FREE with Yahoo! Photos http://uk.photos.yahoo.com

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



Strange error

2005-05-11 Thread Fredrik Liden
Does anyone have any idea what this error means?
I'm using jdk 1.5, tomcat 5.5.9 and intellij.

Thanks!

Connected to server
ERROR [/]: Session event listener threw exception
java.lang.NullPointerException
 at
org.objectstyle.cayenne.conf.WebApplicationListener.sessionCreated(WebAp
plicationListener.java:125)
 at
org.apache.catalina.session.StandardSession.tellNew(StandardSession.java
:379)
 at
org.apache.catalina.session.StandardSession.setId(StandardSession.java:3
51)
 at
org.apache.catalina.session.ManagerBase.createSession(ManagerBase.java:7
87)
 at
org.apache.catalina.session.StandardManager.createSession(StandardManage
r.java:290)
 at
org.apache.catalina.connector.Request.doGetSession(Request.java:2206)
 at org.apache.catalina.connector.Request.getSession(Request.java:2017)
 at
org.apache.catalina.connector.RequestFacade.getSession(RequestFacade.jav
a:822)
 at
org.apache.catalina.connector.RequestFacade.getSession(RequestFacade.jav
a:833)
 at
org.apache.jasper.runtime.PageContextImpl._initialize(PageContextImpl.ja
va:148)
 at
org.apache.jasper.runtime.PageContextImpl.initialize(PageContextImpl.jav
a:123)
 at
org.apache.jasper.runtime.JspFactoryImpl.internalGetPageContext(JspFacto
ryImpl.java:104)
 at
org.apache.jasper.runtime.JspFactoryImpl.getPageContext(JspFactoryImpl.j
ava:61)
 at org.apache.jsp.Login_jsp._jspService(org.apache.jsp.Login_jsp:35)
 at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
 at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.ja
va:322)
 at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
 at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
 at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
tionFilterChain.java:252)
 at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
erChain.java:173)
 at irf.filters.FrontFilter.doFilter(FrontFilter.java:51)
 at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
tionFilterChain.java:202)
 at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
erChain.java:173)
 at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv
e.java:213)
 at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv
e.java:178)
 at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java
:126)
 at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java
:105)
 at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.
java:107)
 at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:1
48)
 at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:85
6)
 at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processC
onnection(Http11Protocol.java:744)
 at
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint
.java:527)
 at
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollow
erWorkerThread.java:80)
 at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool
.java:684)
 at java.lang.Thread.run(Thread.java:595)

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



Re: Basic load balancing

2005-05-11 Thread Joe Plautz
From what I understand load balancing is done at the router, where 
clustering is a tomcat setup issue.

Joe
Faine, Mark wrote:
Tomcat 5.0.28
We seem to often have to make minor changes that cause us to have to restart
our tomcat server (the whole server, not just a web application) and this
has lead me to decide to research load balancing.  The idea would be to have
two servers that would be exact duplicates.  One of the servers would only
become available when the other was not running.  This way we could make the
change on server2 (and restart it) and then bring server1 down and make the
change to it as well.  This would prevent any real downtime for our users.
Where should I look for info on how to implement this type of failover?
Thanks for your help
-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: Strange error

2005-05-11 Thread Mark Thomas
You need to look at line 125 of WebApplicationListener in the 
org.objectstyle.cayenne.conf package and see which object might be null 
that you have assumed isn't.

Mark
Fredrik Liden wrote:
Does anyone have any idea what this error means?
I'm using jdk 1.5, tomcat 5.5.9 and intellij.
Thanks!
Connected to server
ERROR [/]: Session event listener threw exception
java.lang.NullPointerException
 at
org.objectstyle.cayenne.conf.WebApplicationListener.sessionCreated(WebAp
plicationListener.java:125)
 at
org.apache.catalina.session.StandardSession.tellNew(StandardSession.java
:379)
 at
org.apache.catalina.session.StandardSession.setId(StandardSession.java:3
51)
 at
org.apache.catalina.session.ManagerBase.createSession(ManagerBase.java:7
87)
 at
org.apache.catalina.session.StandardManager.createSession(StandardManage
r.java:290)
 at
org.apache.catalina.connector.Request.doGetSession(Request.java:2206)
 at org.apache.catalina.connector.Request.getSession(Request.java:2017)
 at
org.apache.catalina.connector.RequestFacade.getSession(RequestFacade.jav
a:822)
 at
org.apache.catalina.connector.RequestFacade.getSession(RequestFacade.jav
a:833)
 at
org.apache.jasper.runtime.PageContextImpl._initialize(PageContextImpl.ja
va:148)
 at
org.apache.jasper.runtime.PageContextImpl.initialize(PageContextImpl.jav
a:123)
 at
org.apache.jasper.runtime.JspFactoryImpl.internalGetPageContext(JspFacto
ryImpl.java:104)
 at
org.apache.jasper.runtime.JspFactoryImpl.getPageContext(JspFactoryImpl.j
ava:61)
 at org.apache.jsp.Login_jsp._jspService(org.apache.jsp.Login_jsp:35)
 at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
 at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.ja
va:322)
 at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
 at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
 at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
tionFilterChain.java:252)
 at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
erChain.java:173)
 at irf.filters.FrontFilter.doFilter(FrontFilter.java:51)
 at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
tionFilterChain.java:202)
 at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
erChain.java:173)
 at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv
e.java:213)
 at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv
e.java:178)
 at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java
:126)
 at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java
:105)
 at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.
java:107)
 at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:1
48)
 at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:85
6)
 at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processC
onnection(Http11Protocol.java:744)
 at
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint
.java:527)
 at
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollow
erWorkerThread.java:80)
 at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool
.java:684)
 at java.lang.Thread.run(Thread.java:595)
-
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: Basic load balancing

2005-05-11 Thread Wade Chandler
Joe Plautz wrote:
 From what I understand load balancing is done at the router, where 
clustering is a tomcat setup issue.

Joe
Faine, Mark wrote:
Tomcat 5.0.28
We seem to often have to make minor changes that cause us to have to 
restart
our tomcat server (the whole server, not just a web application) and this
has lead me to decide to research load balancing.  The idea would be 
to have
two servers that would be exact duplicates.  One of the servers would 
only
become available when the other was not running.  This way we could 
make the
change on server2 (and restart it) and then bring server1 down and 
make the
change to it as well.  This would prevent any real downtime for our 
users.
Where should I look for info on how to implement this type of failover?
Thanks for your help

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

You can also use an Apache server as a front end to multiple 
servers/tomcats.  I'm not talking about using mod_jk either, but using 
Apache as a traffic router.  It works well, and you will be using 
mod_rewrite and/or mod_proxy.  Check them out.

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


RE: How to change hostname in tomcat configuration

2005-05-11 Thread Mandar Vaidya
Thanks Lutz. I worked

Mandar 

-Original Message-
From: Lutz Zetzsche [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, May 11, 2005 2:58 AM
To: Tomcat Users List
Subject: Re: How to change hostname in tomcat configuration

Hi Mandar,

Am Dienstag, 10. Mai 2005 20:13 schrieb Mandar Vaidya:
 I was trying for the second option,

 Here is how my server.xml file

   Engine defaultHost=techserv name=Catalina
   Host appBase=webapps name=techserv
 Logger className=org.apache.catalina.logger.FileLogger
 prefix=techserv_log. suffix=.txt timestamp=true/
   /Host


But if I do this,  I'm not able to go to http://techserv:8080/admin  
 . It gives me HTTP error 404 ( requested page not available. )

Perhaps it is a problem with the Context definitions as they define the
docBase and the path of the web application? I could imagine that the
Context files are now in the wrong place after you have renamed the
host:

$CATALINA_HOME/conf/Catalina/localhost/

should now be

$CATALINA_HOME/conf/Catalina/techserv/

after your hostname has changed. So have a look, if the Context files still
are in the old directory and, if so, rename the directory from localhost
to techserv and restart the Tomcat server.

I hope, this is the solution.


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



Where to put version information in war file?

2005-05-11 Thread Henri Dupre
I was wondering what is the best place to put version information in a war file?
I'd like to put a build version and date at built time to my
application and have a way to retrieve them from the servlets.

I'm used to add the META-INF Implementation-version tag with jar files
but with Tomcat war files it doesn't work. Are there other
standard places where to put version information?

Henri.

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



classpath problem?

2005-05-11 Thread Bagus

Hi,

Newbie here,

I'm not sure why I'd be getting these compilation errors. I see my tomcat
server at http://localhost/.

The http://www.coreservlets.com/Apache-Tomcat-Tutorial/ seems to tell me
it's my classpath, but *I* think I have my jar files properly in my
classpath. See this following shell transcript. Thanks,  Bagus


  id
uid=0(root) gid=0(wheel) groups=0(wheel), 5(operator)

  echo $CLASSPATH
.:/www/my_tomcat_apps:/usr/local/jakarta-tomcat-5.4.4/common/lib/servlet-api
.jar:/usr/local/jakarta-tomcat-5.5.4/common/lib/jsp-api.jar

  ls /usr/local/jakarta-tomcat-5.5.4/common/lib/jsp-api.jar
/usr/local/jakarta-tomcat-5.5.4/common/lib/jsp-api.jar

  ls /usr/local/jakarta-tomcat-5.5.4/common/lib/servlet-api.jar
/usr/local/jakarta-tomcat-5.5.4/common/lib/servlet-api.jar

  pwd
/usr/www/my_tomcat_apps

  ls -al HelloServlet.java
-rw-r--r--  1 bagus  staff  955 Feb 18 09:04 HelloServlet.java


  javac HelloServlet.java
elloServlet.java:2: package javax.servlet does not exist
import javax.servlet.*;
^
HelloServlet.java:3: package javax.servlet.http does not exist
import javax.servlet.http.*;
^
HelloServlet.java:13: cannot resolve symbol
symbol  : class HttpServlet
location: class HelloServlet
public class HelloServlet extends HttpServlet {
   ^
HelloServlet.java:14: cannot resolve symbol
symbol  : class HttpServletRequest
location: class HelloServlet
   public void doGet(HttpServletRequest request,
 ^
HelloServlet.java:15: cannot resolve symbol
symbol  : class HttpServletResponse
location: class HelloServlet
 HttpServletResponse response)
 ^
HelloServlet.java:16: cannot resolve symbol
symbol  : class ServletException
location: class HelloServlet
   throws ServletException, IOException {
  ^
6 errors


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



RE: classpath problem?

2005-05-11 Thread Caldarale, Charles R
 From: Bagus [mailto:[EMAIL PROTECTED] 
 Subject: classpath problem?
 
   echo $CLASSPATH
 .:/www/my_tomcat_apps:/usr/local/jakarta-tomcat-5.4.4/
^
|

Want to make that 5.5.4 and see what happens?

 - Chuck


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

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



Re: Want to run servlets from other directory than webapps

2005-05-11 Thread Oto Bossert
Yoo,

Do you use tomcat stand-alone? Or with Apache

Putting a context in server.xml should work, but this is not the
prevered way in tomcat 5!

Greetings O.


On 5/11/05, Raueber Hotzenplotz [EMAIL PROTECTED] wrote:
 Hi
 
 I've got Tomcat-5.0.27-r5 installed. Running servlets
 (localhost) located in
 /opt/tomcat5/webapps/ROOT/WEB_INF/classes is no
 problem.
 
 What do I need to do to run servlets from my user
 directory (e.g. /home/user/myapp)?
 
 I've tried to use http://localhost:8080/admin to add
 an additional context, setting path and docbase to
 /home/user/myapp, but this doesn't work.
 
 I've also tried to change appbase to /home/user/myapp
 in conf/server.xml, but again no success.
 
 I've uncommented the 'invoker' lines in conf/web.xml -
 for the moment anyway:
 
 servlet
 servlet-nameinvoker/servlet-name
 servlet-class
   org.apache.catalina.servlets.InvokerServlet
 /servlet-class
 init-param
 param-namedebug/param-name
 param-value0/param-value
 /init-param
 load-on-startup2/load-on-startup
 /servlet
 
 servlet-mapping
 servlet-nameinvoker/servlet-name
 url-pattern/servlet/*/url-pattern
 /servlet-mapping
 
 How do you configure Tomcat? Do you use the admin tool
 or do you do it manually? The admin tool works strange
 e.g. after deleting some context it was still in the
 list.
 
 Thanks!
 
 Regards, Rudi
 
 
 ___
 How much free photo storage do you get? Store your holiday
 snaps for FREE with Yahoo! Photos http://uk.photos.yahoo.com
 
 -
 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 to put version information in war file?

2005-05-11 Thread Wade Chandler
Henri Dupre wrote:
I was wondering what is the best place to put version information in a war file?
I'd like to put a build version and date at built time to my
application and have a way to retrieve them from the servlets.
I'm used to add the META-INF Implementation-version tag with jar files
but with Tomcat war files it doesn't work. Are there other
standard places where to put version information?
Henri.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

context-param is easy to access.  You could put them in your web.xml 
file and access them from Servlets and JSPs.  I'm not sure if there are 
any best pratices for it.

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


Re: Want to run servlets from other directory than webapps

2005-05-11 Thread Patrick Thomas
Hi Rudi,

Here's how I do it, and this also seems to be the 'correct' way of
doing it with Tomcat5 (as it doesn't mean messing with any
container-level files).

Into {tomcathome}\conf\Catalina\localhost\ I place a correctly formed
context file,  for example ApplicationName.xml (very minimal for
demonstration purposes... you could, of course, make it do whatever a
normal context file would).

 ApplicationName.xml -
?xml version=1.0 encoding=UTF-8?

Context path=/ApplicationName docBase=C:/share/ApplicationCode/
debug=1 reloadable=true
/Context
--- End ApplicationName.xml 

The C:/share/ApplicationCode/ directory would contain the JSPs, the
META-INF dir, the WEB-INF dir, etc. Restart your tomcat Server and
away you go. You can even use the admin utility to tweak it.

Cheers,
PST

On 5/11/05, Raueber Hotzenplotz [EMAIL PROTECTED] wrote:
 Hi
 
 I've got Tomcat-5.0.27-r5 installed. Running servlets
 (localhost) located in
 /opt/tomcat5/webapps/ROOT/WEB_INF/classes is no
 problem.
 
 What do I need to do to run servlets from my user
 directory (e.g. /home/user/myapp)?
 
 I've tried to use http://localhost:8080/admin to add
 an additional context, setting path and docbase to
 /home/user/myapp, but this doesn't work.
 
 I've also tried to change appbase to /home/user/myapp
 in conf/server.xml, but again no success.
 
 I've uncommented the 'invoker' lines in conf/web.xml -
 for the moment anyway:
 
servlet
servlet-nameinvoker/servlet-name
servlet-class
  org.apache.catalina.servlets.InvokerServlet
/servlet-class
init-param
param-namedebug/param-name
param-value0/param-value
/init-param
load-on-startup2/load-on-startup
/servlet
 
servlet-mapping
servlet-nameinvoker/servlet-name
url-pattern/servlet/*/url-pattern
/servlet-mapping
 
 How do you configure Tomcat? Do you use the admin tool
 or do you do it manually? The admin tool works strange
 e.g. after deleting some context it was still in the
 list.
 
 Thanks!
 
 Regards, Rudi
 
 
 ___
 How much free photo storage do you get? Store your holiday
 snaps for FREE with Yahoo! Photos http://uk.photos.yahoo.com
 
 -
 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: Setting an environment variable in tomcat 5.5 service?

2005-05-11 Thread Lutz Zetzsche
Am Mittwoch, 11. Mai 2005 18:26 schrieb Mufaddal Khumri:
 Thank you for the reply. I am trying to set in web.xml using:

   env-entry
 env-entry-nameMY_ENV_VAR/env-entry-name
 env-entry-valueC:/config/one.xml/env-entry-value
 env-entry-typejava.lang.String/env-entry-type
   /env-entry

 I am placing this right above the /web-app ending tag.

[...]

 Any clues as to why my env-entry is not taking effect?

Did you restart Tomcat?

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



RE: Setting an environment variable in tomcat 5.5 service?

2005-05-11 Thread Mufaddal Khumri
Yes, I did. 

-Original Message-
From: Lutz Zetzsche [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, May 11, 2005 2:16 PM
To: Tomcat Users List
Subject: Re: Setting an environment variable in tomcat 5.5 service?

Am Mittwoch, 11. Mai 2005 18:26 schrieb Mufaddal Khumri:
 Thank you for the reply. I am trying to set in web.xml using:

   env-entry
 env-entry-nameMY_ENV_VAR/env-entry-name
 env-entry-valueC:/config/one.xml/env-entry-value
 env-entry-typejava.lang.String/env-entry-type
   /env-entry

 I am placing this right above the /web-app ending tag.

[...]

 Any clues as to why my env-entry is not taking effect?

Did you restart Tomcat?

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


--
This email and any files transmitted with it are confidential 
and intended solely for the use of the individual or entity 
to whom they are addressed. If you have received this 
email in error please notify the system manager. Please
note that any views or opinions presented in this email 
are solely those of the author and do not necessarily
represent those of the company. Finally, the recipient
should check this email and any attachments for the 
presence of viruses. The company accepts no liability for
any damage caused by any virus transmitted by this email.
Consult your physician prior to the use of any medical
supplies or product.
--


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



Re: Jakarta Tomcat + Windows + PHP

2005-05-11 Thread d~l
On 11 May 2005 at 19:01, Janet Fraser jlfraser-at-infotech.monash. wrote:

 Maybe my question should have been 
 simpler, ie How do I install PHP to Tomcat?

Here is my installation of PHP on tomcat 5.0.28 (on WinXP) .. 

*   install PHP (preferably PHP5) into c:\PHP\

*   place php.ini in c:\windows\php.ini

*   download phpservlet.war from here ..

http://tools.herberlin.de/phpservlet/phpservlet.war

*   drop phpservlet.war into tomcat5\webapps\

*   in tomcat5\webapps\phpservlet\WEB-INF\web.xml

set paths 

param-namephp.executable/param-name
param-valuec:/php/php-cgi.exe/param-value

and

param-nameSystemRoot/param-name
param-valuec:/windows//param-value

note: use php-cgi.exe and not php.exe.

*   Launch http://localhost:8080/phpservlet/phpinfo.php

to check that PHP is working on tomcat.


Jk 1.2.10+ Tomcat 4.1.x slight problem

2005-05-11 Thread Guernsey, Byron \(GE Consumer Industrial\)

I'm running into a minor issue with jk 1.2.12, Apache 2.0.52-MPM, and
Tomcat 4.1.31 server.

It appears that Tomcat 4.1.xx is closing every ajp13 connection after 1
request. 

It also appears that if I get a burst of lets say 10 connections at once
in Apache, that creates 10 connections to Tomcat.  Tomcat doesn't seem
to allow them to ajp-keepalive, so it closes them.  The next request
that the same apache process receives then attempts to reuse one of
those 10 connections from the cache.  Those 10 connections are dead, and
with the default retries set to 3, it cycles through 3 of them and then
returns a 500 error.

As I understand it, my options are:

1. Upgrade to Tomcat 5 (so ajp13 connections are reused)
2. Set the retries on the worker equal to my RequestPerChild value
3. Switch Apache to a prefork model
4. ??

First, am I missing something about Tomcat 4.1.xx that would enabled
reuse of ajp13 connections?  Its not out of the question that I have it
misconfigured, but looking at the code for the connectors in tomcat 4.1
it would appear that it closes the connection when its finished
servicing a request.

Second, should the JK_RETRIES value in mod_jk maybe be set dynamically
rather than assuming it will succeed in 3 retries?  Even with a properly
configure Tomcat 5 instance, if 3 consecutive AJP13 workers die
coincidentally at the head of the cache, the next attempt to use the 1st
one from the cache will fail 3 times in a row and give a 500 server
error.

Third, if I turn off caching of workers (set the cachesize to 1), does
this mean each thread will open a new connection each time- or will they
attempt to share a single connection and wait in line on it?  I guess I
can refer to source code on this one, but if someone knows it would help
save me some time.  I have 35 threads per process now and don't want all
of them waiting on the single ajp connection.  I do want them to open
parallel connections- so I assume I need to allow a cachesize equal to
threads per child.

I'm thinking about doing #2 above (set retries equal to threads per
child), but I'm concerned about the 100ms delay added after JK_RETRIES
is reached.  In my case, every single worker is closed after one use, so
I have the opportunity for a significant delay if it has to cycle
through many dead workers during retries. 40 dead workers, for instance,
would result in a potential of 3,700ms of sleeping if no other threads
were attempting to cycle through the list at the same time.  I guess if
I change JK_RETRIES to a higher value, it will eliminate the sleep until
I surpass that value.  Its a shame that the default JK_RETRIES (3) is
not configurable before the delays are added, or that there isn't a
setting that say cycle through the cache once before adding a sleep to
retries

Byron


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



truncated responses tomcat 5/apache2/mod_jk

2005-05-11 Thread Louis Moore
Hi,

I'm running tomcat 5.0.28 with mod_jk 1.2.10 and
apache 2.0.46 with the worker MPM. This is a new
setup, and for the most part everything works fine,
but I've had a couple reports of truncated pages being
returned to customers. After turning on debug logging
for jk, I see the below sequence often in the logs,
but from what I've read elsewhere it's most likely
just a browser being closed or a new request being
sent from the browser before the previous one
completes. Can anyone who's seen this before verify
whether this could be indicative of a real problem? 
My workers.properties and AJP connector from
server.xml are below as well. 

Thanks,
Lou

From mod_jk.log:

[Wed May 11 12:30:37 2005] [2244:39856] [debug]
ajp_connection_tcp_get_message::jk_ajp_common.c
(1024): received from ajp13 pos=0 len=8188 max=8192
[Wed May 11 12:30:37 2005] [2244:39856] [debug]
ws_write::mod_jk.c (380): writing 4096 (4096) out of
8184
[Wed May 11 12:30:37 2005] [2244:39856] [debug]
ws_write::mod_jk.c (380): writing 4088 (4088) out of
4088
[Wed May 11 12:30:37 2005] [2244:39856] [debug]
ajp_connection_tcp_get_message::jk_ajp_common.c
(1024): received from ajp13 pos=0 len=12 max=8192
[Wed May 11 12:30:37 2005] [2244:39856] [debug]
ws_write::mod_jk.c (380): writing 8 (-1) out of 8
[Wed May 11 12:30:37 2005] [2244:39856] [info] 
ajp_process_callback::jk_ajp_common.c (1363):
Connection aborted or network problems
[Wed May 11 12:30:37 2005] [2244:39856] [info] 
ajp_service::jk_ajp_common.c (1706): Receiving from
tomcat failed, because of client error without
recovery in send loop 0
[Wed May 11 12:30:37 2005] [2244:39856] [debug]
ajp_done::jk_ajp_common.c (2046): recycling connection
cache slot=4 for worker local
[Wed May 11 12:30:37 2005] [2244:39856] [info] 
jk_handler::mod_jk.c (1968): Aborting connection for
worker=local


workers.properties:

worker.list=local
worker.local.type=ajp13
worker.local.host=localhost
worker.local.port=8009
  
 
  
 
# Number of connections made to the AJP backend that
are maintained as a connection pool. It does not limit
the number of those connection.
# Should reflect the number of threads per child
process in Apache2 conf.
worker.local.cachesize=50
  
 
  
 
# Used with cachesize to specify how long JK should
keep an open socket in cache before closing it.
# recycle_timeout similar to cache_timeout but works
for uncached connections also
worker.local.cache_timeout=300
worker.local.recycle_timeout=300
  
 
  
 
# Socket timeout in seconds used for communication
channel between JK and remote host.
worker.local.socket_timeout=300


server.xml AJP connector:

Connector port=8009
protocol=AJP/1.3 enableLookups=false
redirectPort=8443
acceptCount=100 maxThreads=900
minSpareThreads=25
maxSpareThreads=200
maxKeepAliveRequests=1
connectionTimeout=30
disableUploadTimeout=true
debug=0/




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



Apache2+Tomcat5.5+mod_jk loadbalancing: Sticky sessions not working

2005-05-11 Thread Kumbarÿffffffffffffffffe7e
Hello,
I have been trying for weeks now to get this to work.
Maybe someone can help me.
I have Apache2 installed and configured in machine A,
using mod_jk to connect to two tomcat servers. Tomcat1
is in machine B and Tomcat2 in machine A. I have
created a workers.properties file, which I have put in
the apache conf. This file specifies workers timcat1
and tomcat2, as well as worker loadbalancer, which is
supposed to balance the load between the two tomcats.
Everything works fine, except for the sticky sessions,
or session affinity. When a page is requested, I need
it to be served from one of the available tomcat
servers, and then each time the page is requested
subsequently from the same machine, it should be
served from the same tomcat server as before. It
doesn't seem to work. Each time I refresh the page, it
get served from the same tomcat a couple of times,
then it gets served from the other tomcat, stays on
that tomcat a couple of refresh hits and then swiches
again. I can't see a pattern or figure out why this is
happening.
Here's my workers.properties file:
#
# workers.properties 
#

# In Windows, we use backward slashes:
ps=\

# list the workers by name

worker.list=loadbalancer

# 
# First tomcat server
# 
worker.tomcat1.port=8009
worker.tomcat1.host=machine B's IP
worker.tomcat1.type=ajp13

# Specify the size of the open connection cache.
#worker.tomcat1.cachesize

#
# Specifies the load balance factor when used with
# a load balancing worker.
# Note:
#   lbfactor must be  0
#   Low lbfactor means less work done by the
worker.
worker.tomcat1.lbfactor=100


# 
# Second tomcat server
# 
worker.tomcat2.port=8009
worker.tomcat2.host=machine A's IP
worker.tomcat2.type=ajp13

# Specify the size of the open connection cache.
#worker.tomcat2.cachesize

#
# Specifies the load balance factor when used with
# a load balancing worker.
# Note:
#   lbfactor must be  0
#   Low lbfactor means less work done by the
worker.
worker.tomcat2.lbfactor=100

# 
# Load Balancer worker
# 

#
# The loadbalancer (type lb) worker performs weighted
round-robin
# load balancing with sticky sessions.
# Note:
#   If a worker dies, the load balancer will
check its state
#once in a while. Until then all work is
redirected to peer
#worker.
worker.loadbalancer.type=lb
worker.loadbalancer.balanced_workers=tomcat1,tomcat2
worker.loadbalancer.sticky_session=True

#
# END workers.properties
#


In httpd.conf, I have added:
JkWorkersFile conf/workers.properties
JkLogFile logs/mod_jk.log
JkLogLevel debug

some JkMount lines

LoadModule jk_module modules/mod_jk.so

In server.xml, I've set jvmRoute=tomcat1 (tomcat2 on
the other tomcat's server.xml)

I can't think of any other infomation that you may
find helpful.
If anyone has any idea, or any question, I really need
help on this.
Anything would be much appreciated.
Thanks,
Edlira

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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



database - jdbc setup help

2005-05-11 Thread Bagus

Hey there newbie here again,

I've now set up Tomcat 5.5.4 and have installed
mysql-standard-4.1.9-unknown-freebsd4.7-i386 on my Freebsd 5.3 box intel
box.
I've loaded some databases and tables into the database.

How do I get them to work together with jsp?

Can anyone point me to a short-sweet tutorial that can get me from here to
there?

I'm not sure if I need to install jdbc and the mysql driver or if those are
included in the tomcat release.

A tutorial that takes me through all that would be great.

Thanks

Bagus



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



tomcat and virtual hosts

2005-05-11 Thread Bagus

Here's a more general question about Tomcat.

I'm used to using apache to set up virtual hosts, but when Tomcat installed,
http://localhost/ now goes to my tomcat installation. So how does one set up
multiple virtual hosts with Tomcat? Is it in the server.xml file or
something? Or do I somehow now modify my apache configuration to be able to
use tomcat and the jsp files?

Thanks,

Bagus


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



Re: question about load-on-startup in web.xml

2005-05-11 Thread Annie Wang
i tried putting in a sleep in my servlet's init method, but
$CATALINA_HOME/logs/catalina.out seems to indicate that tomcat waits
for it to initalize..

in my catalina.out, i have:

May 11, 2005 2:12:06 PM org.apache.catalina.core.StandardHostDeployer install
INFO: Installing web application at context path /webappX from URL
file:/jakarta-tomcat/webapps/webappX
***webappX***start init
***webappX***end init
May 11, 2005 2:12:06 PM org.apache.catalina.core.StandardHostDeployer install
INFO: Installing web application at context path /webappY from URL
file:/jakarta-tomcat/webapps/webappY

any one know if there's a way to make webappY get installed before
webappX?  what determines the install order?  i thought it was
load-on-startup in the web.xml file, but maybe that affects the
ordering of servlet initalization within a web application (if the web
application has multiple servlets), but not the ordering of web
application installation on tomcat startup.

thanks.
-annie


On 5/10/05, Annie Wang [EMAIL PROTECTED] wrote:
 hi doug, yup, was thinking along similar lines.  just wasn't sure if
 there was some setting i wasn't aware of to do what i'm looking for.
 
 thanks.
 -annie
 
 On 5/10/05, Parsons Technical Services [EMAIL PROTECTED] wrote:
  I may be off base on this one but I think that once Tomcat fires off the
  init method it doesn't care or monitor the progress of the servlet. Just
  think, some servlets may take several minutes to finish. If other apps had
  to wait then it could take a long time to get the server started.
 
  Now as for a solution I am really speculating here (hopefully someone can
  educate both of us). I would look at a wait statement in the init method to
  pause the second app's servlet until the first one is done. Simply time the
  first app's servlet and set it for a little more.
 
  Hopefully someone will set me straight if I am off base here.
 
  Doug
 
  - Original Message -
  From: Annie Wang [EMAIL PROTECTED]
  To: tomcat-user@jakarta.apache.org
  Sent: Tuesday, May 10, 2005 6:59 PM
  Subject: question about load-on-startup in web.xml
 
  hi,
 
  regarding the load-on-startup tag in web.xml:
 
  say i have 2 web apps (webapp1 and webapp2).  if i configure webapp1's
  servlet to have load-on-startup1/load-on-startup and webapp2's
  servlet to have load-on-startup100/load-on-startup, does this mean
  that tomcat will init webapp1's servlet first and once that's done,
  it'll init webapp2's servlet?
 
  basically, i want both web app's servlets to auto initialize on tomcat
  startup, but i want webapp2's servlet to initialze only after
  webapp1's servlet has finished initialization.  when i use the above
  load-on-startup settings, webapp2's servlet seems to initialize before
  webapp1's servlet has finished initialization.
 
  thanks.
  -annie
 
  -
  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: Basic load balancing

2005-05-11 Thread Will Hartung
 From: Faine, Mark [EMAIL PROTECTED]
 Sent: Wednesday, May 11, 2005 11:24 AM

 Tomcat 5.0.28

 We seem to often have to make minor changes that cause us to have to
restart
 our tomcat server (the whole server, not just a web application) and this
 has lead me to decide to research load balancing.  The idea would be to
have
 two servers that would be exact duplicates.  One of the servers would only
 become available when the other was not running.  This way we could make
the
 change on server2 (and restart it) and then bring server1 down and make
the
 change to it as well.  This would prevent any real downtime for our users.
 Where should I look for info on how to implement this type of failover?
 Thanks for your help

Yeah, it's a mix of load balancing and clustering.

The primary challenge you have to deal with is session replication so that
when you fail your primary Tomcat, the stand by will have the same sessions
in play.

Once you have the sessions clustered, then it's a matter of redirecting
traffic from the primary to secondary.

This is what a load balancer system can do for you, in that it can help you
cleanly switch over.

What you need to do here is tell the load balancer to direct all new traffic
to the secondary Tomcat, but still let any pending transactions go to your
primary.

Once the load balancer has shifted the traffic, you bounce the primary, let
the primary add itself back in to your cluster and resynchronize the
sessions, then you finally have the load balancer start shifting traffic
back to the primary.

Now, note that at some point during your switchover, you will be having both
Tomcats live and working against the same DB or whatever your backend, so
you need to make sure that it can handle that (if it's just a DB it's
typically not a problem).

Finally, once you've gone to all of this trouble, frankly, I'd just run both
machines 100% and load balance between them, either round robin, or you can
use session pinning (so that when a request comes in, their session sticks
to a single machine barring machine failure).

The reason I would do this is simply that I'm just philisophically opposed
to having idle machines do nothing and waiting for something to happen. To
me, an idle machine is simply a room heater. I don't need a $2000 room
heater.

In this case, since you need to have cluster aware sessions and replication
anyway, and you have to have a load balancer fronting them anyway, why not
simply double your performance (ideally) and run both machines if you're
going to keep one idle anyway? You have to go through all the configuration
headache anyway, so you may as well get some free performance out of it.

It is my understanding that you can do most of this with 3 machines and
stock Tomcat, as it already supports clustering, and there is a
load-balancing application as well, but I don't know how good or featureful
the load balancer is. Of course, you can do a function test on only a single
machine with 3 interfaces as well.

Regards,

Will Hartung
([EMAIL PROTECTED])



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



RE: tomcat and virtual hosts

2005-05-11 Thread Fritz Schneider
Bagus,

Each virtual host is a host element in server.xml. The service (e.g.
Catalina) has connectors to the ports for incoming requests. The engine in
that service sorts out the requests for a particular virtual host based on
the name attribute of the hosts. Any which don't match go to the defaultHost
(e.g. localhost). Each host can have its own appBase as well as logs, root
context, etc.

Fritz

-Original Message-
From: Bagus [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, May 11, 2005 3:53 PM
To: Tomcat Users List
Subject: tomcat and virtual hosts


Here's a more general question about Tomcat.

I'm used to using apache to set up virtual hosts, but when Tomcat installed,
http://localhost/ now goes to my tomcat installation. So how does one set up
multiple virtual hosts with Tomcat? Is it in the server.xml file or
something? Or do I somehow now modify my apache configuration to be able to
use tomcat and the jsp files?

Thanks,

Bagus


-
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: Memory for JSP Compliation in 4.1

2005-05-11 Thread Will Hartung
 From: Wendy Smoak [EMAIL PROTECTED]
 Sent: Wednesday, May 11, 2005 10:42 AM
Subject: Memory for JSP Compliation in 4.1


 Will adding
JAVA_OPTS=-Xmx128M
 to catalina.sh help with running out of memory during JSP compilation in
 4.1?

 The notes in catalina.sh say that these options will be used when the
 start stop or run command is executed, but from the Jasper config
 page, I see that Tomcat will 'fork' another JVM in order to compile JSPs.
 Does this new JVM inherit the memory settings of the original, or is
there
 some other way to increase its memory?

First off, no, the -Xmx option will do nothing in terms of affecting the
memory for a JSP compile if fork is true.

If fork is false, then the -Xmx options that you ran your original Tomcat
with WILL affect the heap size for the compiler, but that assumes the Sun
compiler. I don't know if HP's JVM is using Suns compiler or not (it may
be). See, the Sun compiler is just a java class that can run like any other
class. But if HPs JVM doesn't have the Sun compiler class available, then
the JSP compiler is simply going to call javac, and that's going to fork no
matter what your Jasper setting.

Also note that at some point in the 4.1 version, the JSP/Sun compiler combo
had a memory leak. I don't know if that was Tomcat, Jasper, or Suns compiler
that was at fault, or whether your version has it fixed, but that was an
early impetus for forking to compile JSPs in the first place, to punt around
the memory leak.

Um...how big is the JSP that you're compiling? Is there perhaps a way to
make it smaller? Perhaps including some of the static content at runtime
rather than compile? (I'm trying to fathom a big enough JSP that would blow
up the compiler, but who knows.)

Have you considered looking at precompiling the JSPs (or at least the few
nasty ones that are grenading your server)? Then you'd perhaps have more
control over memory for the compile that the standard Jasper engine doesn't
expose to you.

Regards,

Will Hartung
([EMAIL PROTECTED])




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



Re: Want to run servlets from other directory than webapps

2005-05-11 Thread Raueber Hotzenplotz
I'm running Tomcat as standalone server at the moment
- that could change later on.

What's the preferred way in Tomcat 5?

Thanks!

--- Oto Bossert [EMAIL PROTECTED] wrote:

 Yoo,
 
 Do you use tomcat stand-alone? Or with Apache
 
 Putting a context in server.xml should work, but
 this is not the
 prevered way in tomcat 5!
 
 Greetings O.
 
 
 On 5/11/05, Raueber Hotzenplotz
 [EMAIL PROTECTED] wrote:
  Hi
  
  I've got Tomcat-5.0.27-r5 installed. Running
 servlets
  (localhost) located in
  /opt/tomcat5/webapps/ROOT/WEB_INF/classes is no
  problem.
  
  What do I need to do to run servlets from my user
  directory (e.g. /home/user/myapp)?
  
  I've tried to use http://localhost:8080/admin to
 add
  an additional context, setting path and docbase to
  /home/user/myapp, but this doesn't work.
  
  I've also tried to change appbase to
 /home/user/myapp
  in conf/server.xml, but again no success.
  
  I've uncommented the 'invoker' lines in
 conf/web.xml -
  for the moment anyway:
  
  servlet
  servlet-nameinvoker/servlet-name
  servlet-class
   
 org.apache.catalina.servlets.InvokerServlet
  /servlet-class
  init-param
  param-namedebug/param-name
  param-value0/param-value
  /init-param
  load-on-startup2/load-on-startup
  /servlet
  
  servlet-mapping
  servlet-nameinvoker/servlet-name
  url-pattern/servlet/*/url-pattern
  /servlet-mapping
  
  How do you configure Tomcat? Do you use the admin
 tool
  or do you do it manually? The admin tool works
 strange
  e.g. after deleting some context it was still in
 the
  list.
  
  Thanks!
  
  Regards, Rudi
  
  
 

___
  How much free photo storage do you get? Store your
 holiday
  snaps for FREE with Yahoo! Photos
 http://uk.photos.yahoo.com
  
 

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




___ 
How much free photo storage do you get? Store your holiday 
snaps for FREE with Yahoo! Photos http://uk.photos.yahoo.com

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



Re: Want to run servlets from other directory than webapps

2005-05-11 Thread Raueber Hotzenplotz
Thanks PST! Will try it out tomorrow.

Rudi

--- Patrick Thomas [EMAIL PROTECTED] wrote:

 Hi Rudi,
 
 Here's how I do it, and this also seems to be the
 'correct' way of
 doing it with Tomcat5 (as it doesn't mean messing
 with any
 container-level files).
 
 Into {tomcathome}\conf\Catalina\localhost\ I place a
 correctly formed
 context file,  for example ApplicationName.xml (very
 minimal for
 demonstration purposes... you could, of course, make
 it do whatever a
 normal context file would).
 
  ApplicationName.xml -
 ?xml version=1.0 encoding=UTF-8?
 
 Context path=/ApplicationName
 docBase=C:/share/ApplicationCode/
 debug=1 reloadable=true
 /Context
 --- End ApplicationName.xml 
 
 The C:/share/ApplicationCode/ directory would
 contain the JSPs, the
 META-INF dir, the WEB-INF dir, etc. Restart your
 tomcat Server and
 away you go. You can even use the admin utility to
 tweak it.
 
 Cheers,
 PST
 
 On 5/11/05, Raueber Hotzenplotz
 [EMAIL PROTECTED] wrote:
  Hi
  
  I've got Tomcat-5.0.27-r5 installed. Running
 servlets
  (localhost) located in
  /opt/tomcat5/webapps/ROOT/WEB_INF/classes is no
  problem.
  
  What do I need to do to run servlets from my user
  directory (e.g. /home/user/myapp)?
  
  I've tried to use http://localhost:8080/admin to
 add
  an additional context, setting path and docbase to
  /home/user/myapp, but this doesn't work.
  
  I've also tried to change appbase to
 /home/user/myapp
  in conf/server.xml, but again no success.
  
  I've uncommented the 'invoker' lines in
 conf/web.xml -
  for the moment anyway:
  
 servlet
 servlet-nameinvoker/servlet-name
 servlet-class
  
 org.apache.catalina.servlets.InvokerServlet
 /servlet-class
 init-param
 param-namedebug/param-name
 param-value0/param-value
 /init-param
 load-on-startup2/load-on-startup
 /servlet
  
 servlet-mapping
 servlet-nameinvoker/servlet-name
 url-pattern/servlet/*/url-pattern
 /servlet-mapping
  
  How do you configure Tomcat? Do you use the admin
 tool
  or do you do it manually? The admin tool works
 strange
  e.g. after deleting some context it was still in
 the
  list.
  
  Thanks!
  
  Regards, Rudi
  
  
 

___
  How much free photo storage do you get? Store your
 holiday
  snaps for FREE with Yahoo! Photos
 http://uk.photos.yahoo.com
  
 

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




___ 
Does your mail provider give you FREE antivirus protection? 
Get Yahoo! Mail http://uk.mail.yahoo.com

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



Re: Free reporting s/w that works with apache+tomcat

2005-05-11 Thread U K Laxmi
Thanks for your information. I got one open source
product called jasper reports adviced by one of the
active member in this list. I'm planning to use it for
my project.

Thanks,
Laxmi

--- David Johnson [EMAIL PROTECTED] wrote:
 They are unlikely to ever look exactly alike. 
 But, you can use a
 java-ActiveX bridge (there are several) to build and
 manipulate an
 excel spreadsheet as an object.  I have successfully
 used a library from
 IBM AlphaWorks to do exactly this.  Sadly, the
 library I used was a
 precursor to a commercial product so it is no longer
 free.
 
 Good luck!
 
 On Mon, 2005-05-09 at 23:57 -0700, U K Laxmi wrote:
  I'm developing a web application using
 apache+tomcat
  on windows 2000 machine. I'm using Ms Access 2003
 as
  the backend. I'm using JSP for developing web
  application. I'm developing some web based reports
 in
  HTML. But when i export them to Excel, it doesn't
 look
  exactly same as that of HTML report. Moreover i
 need
  some header and footer information appear in the
  report. That i'm unable to achieve using JSP and
 HTML.
  
  
  So, i'm looking for a free reporting software that
 can
  meet above functionality and can work with
  apache+tomcat. If anyone know any work worunds for
 my
  problem, pls inform me. It will be a great help to
 me.
  
  Thank you.
  
  
  
  __ 
  Yahoo! Mail Mobile 
  Take Yahoo! Mail with you! Check email on your
 mobile phone. 
  http://mobile.yahoo.com/learn/mail 
  
 

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



Yahoo! Mail
Stay connected, organized, and protected. Take the tour:
http://tour.mail.yahoo.com/mailtour.html


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



RE: question about load-on-startup in web.xml

2005-05-11 Thread Caldarale, Charles R
 From: Annie Wang [mailto:[EMAIL PROTECTED] 
 Subject: Re: question about load-on-startup in web.xml
 
 any one know if there's a way to make webappY get installed before
 webappX?

As far as I can tell, the intent of the JSP and servlet specs is for web
applications to be independent of both the container and each other.
Since Tomcat is the reference implementation for the spec, the
developers seem to avoid introducing many Tomcat-unique features that
would reduce application portability.  The load-on-startup tag is part
of the servlet spec, defined to control instantiation of servlets within
an app, not across apps.

If you want to synchronize application deployment, I think you're going
to have to do that within the app itself, possibly with context
listeners to minimize inter-app dependencies.  You'd probably want to
use reflection to make references to whatever class or object you
synchronize on, otherwise you're going to have problems independently
updating the apps without taking Tomcat down.  Another option, of
course, is to extend the existing deployOnStartup mechanism to do what
you want.  After all, this is open-source.

Or maybe there's some neat trick I haven't found yet.

 what determines the install order?

These references only partially answer the question:
http://jakarta.apache.org/tomcat/tomcat-5.5-doc/deployer-howto.html#Depl
oying%20on%20Tomcat%20startup
http://jakarta.apache.org/tomcat/tomcat-5.5-doc/config/host.html#Automat
ic%20Application%20Deployment

My somewhat less than rigorous experimentation seems to indicate that
apps are deployed serially, not in parallel, but I haven't tried to
figure out what determines the order.

 - Chuck


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

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



Re: how to change the port for jmx in tomcat 5.5.9 ?

2005-05-11 Thread Bill Barker
Well, firstly JkMX is deprecated in 5.5 in favor of javax.management.remote.

To use JkMX anyway, you need to either specify the properties directly on 
the Connector (e.g. mx.jrmpPort=1099) or specify the location of the 
properties file (e.g. propertiesFile=conf/jk2.properties)

Pankaj Bhatnagar [EMAIL PROTECTED] wrote in message 
news:[EMAIL PROTECTED]
Hi
I used to change the port for jmx by specifying the property :
jrmpPort=1099
in the jk2.properties file while using Tomcat 5.0.28

After adding this property when I started Tomcat I used to get the following 
in the console :
May 11, 2005 12:57:22 PM org.apache.jk.common.JkMX loadAdapter
INFO: Creating Naming:name=rmiregistry
May 11, 2005 12:57:22 PM org.apache.jk.common.JkMX loadAdapter
INFO: Creating Adaptor:protocol=jrmp on host localhost at port 1099
May 11, 2005 12:57:22 PM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=15/328 
config=D:\Apps\tomcat5.0.19\conf\jk2.properties

I made the same changes to the jk2.properties file in Tomcat 5.5.9, but it 
seems that it does not read the jk2.properties file. I get the following in 
the console :
May 11, 2005 10:55:32 AM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/32  config=null

Could someone help me out as to what I am missing in this ?

Thanks
Pankaj 




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



Re: Re: commercial monitoring tools

2005-05-11 Thread Pankaj Bhatnagar
Well you can also have a look at the AppPerfect DeploySuite which supports 
monitoring of nearly ALL JMX enabled servers. I have successfully monitored 
Tomcat upto version 5.0.28 with it. It doesn't work with version 5.5.x 
currently but they will certainly come up with 
that in the newer versions. You can download the trial version and get more 
info about it from their website www.appperfect.com

Thanks  Regards
Pankaj Bhatnagar

On Wed, 11 May 2005 Ralph Kanther wrote :
Hi Andy,

  I'm interesting in coming with something that will let me track
  Tomcat's performance/behavior such that I can isolate what causes it
  to occasionally hang-up (no info in the logs) or run out of memory. If
  anyone has already looked into these things and come up with a decent
  solution please share.

We fixed our memory leaks with Reference Scanner http://jb2works.com/ .
This is really a great monitoring tool, we always have it running when
we run tomcat.
For Open Source or education it seems to be free.

Greetz
Ralph

--
+++ Lassen Sie Ihren Gedanken freien Lauf... z.B. per FreeSMS +++
GMX bietet bis zu 100 FreeSMS/Monat: http://www.gmx.net/de/go/mail

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



Re: question about load-on-startup in web.xml

2005-05-11 Thread Annie Wang
thanks for the insights and suggestions chuck!

On 5/11/05, Caldarale, Charles R [EMAIL PROTECTED] wrote:
  From: Annie Wang [mailto:[EMAIL PROTECTED]
  Subject: Re: question about load-on-startup in web.xml
 
  any one know if there's a way to make webappY get installed before
  webappX?
 
 As far as I can tell, the intent of the JSP and servlet specs is for web
 applications to be independent of both the container and each other.
 Since Tomcat is the reference implementation for the spec, the
 developers seem to avoid introducing many Tomcat-unique features that
 would reduce application portability.  The load-on-startup tag is part
 of the servlet spec, defined to control instantiation of servlets within
 an app, not across apps.
 
 If you want to synchronize application deployment, I think you're going
 to have to do that within the app itself, possibly with context
 listeners to minimize inter-app dependencies.  You'd probably want to
 use reflection to make references to whatever class or object you
 synchronize on, otherwise you're going to have problems independently
 updating the apps without taking Tomcat down.  Another option, of
 course, is to extend the existing deployOnStartup mechanism to do what
 you want.  After all, this is open-source.
 
 Or maybe there's some neat trick I haven't found yet.
 
  what determines the install order?
 
 These references only partially answer the question:
 http://jakarta.apache.org/tomcat/tomcat-5.5-doc/deployer-howto.html#Depl
 oying%20on%20Tomcat%20startup
 http://jakarta.apache.org/tomcat/tomcat-5.5-doc/config/host.html#Automat
 ic%20Application%20Deployment
 
 My somewhat less than rigorous experimentation seems to indicate that
 apps are deployed serially, not in parallel, but I haven't tried to
 figure out what determines the order.
 
  - Chuck
 
 THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
 MATERIAL and is thus for use only by the intended recipient. If you
 received this in error, please contact the sender and delete the e-mail
 and its attachments from all computers.
 
 -
 To 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: Setting an environment variable in tomcat 5.5 service?

2005-05-11 Thread Gurumoorthy
You cant use System.env ... you have to use JNDI to to get the variable
names
Search google ... with words JNDI variables tomcat ...

Something like this ...

Context initialContext = new InitialContext();
String value = initialContext.lookup(java:env/ + VAR_NAME ) ;

Regards
Guru
- Original Message -
From: Mufaddal Khumri [EMAIL PROTECTED]
To: Tomcat Users List tomcat-user@jakarta.apache.org
Sent: Wednesday, May 11, 2005 10:31 PM
Subject: RE: Setting an environment variable in tomcat 5.5 service?


Yes, I did.

-Original Message-
From: Lutz Zetzsche [mailto:[EMAIL PROTECTED]
Sent: Wednesday, May 11, 2005 2:16 PM
To: Tomcat Users List
Subject: Re: Setting an environment variable in tomcat 5.5 service?

Am Mittwoch, 11. Mai 2005 18:26 schrieb Mufaddal Khumri:
 Thank you for the reply. I am trying to set in web.xml using:

   env-entry
 env-entry-nameMY_ENV_VAR/env-entry-name
 env-entry-valueC:/config/one.xml/env-entry-value
 env-entry-typejava.lang.String/env-entry-type
   /env-entry

 I am placing this right above the /web-app ending tag.

[...]

 Any clues as to why my env-entry is not taking effect?

Did you restart Tomcat?

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



--
This email and any files transmitted with it are confidential
and intended solely for the use of the individual or entity
to whom they are addressed. If you have received this
email in error please notify the system manager. Please
note that any views or opinions presented in this email
are solely those of the author and do not necessarily
represent those of the company. Finally, the recipient
should check this email and any attachments for the
presence of viruses. The company accepts no liability for
any damage caused by any virus transmitted by this email.
Consult your physician prior to the use of any medical
supplies or product.

--


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