Re: Tomcat login & logout hook ?

2005-07-08 Thread Michael Echerer
Dongsheng Song wrote: > Hello, > > Can I hook a function after user login & before user logout ? I assume that logout usually goes hand in hand with a session invalidation, then Servlet 2.4. spec is your friend: SRV.10.2.1 Event Types and Listener Interfaces javax.servlet.http.HttpSessionListen

Re: how to replace j_security_check

2005-06-26 Thread Michael Echerer
Marten Lehmann wrote: > Hello, > So far, this is not a problem. Looking up users through jdbc isn't a > problem as well. But how can I inform the container about a successful > login, so that calls to request.getRemoteUser() and > request.isUserInRole("manager") will behave as if I logged in throu

Re: Is Tomcat is an application server ?

2005-06-22 Thread Michael Echerer
>>There is no meaning in saying that one can plug in required >>services to Tomcat. My question is by design is it an application >>server ?. My opinion is that Tomcat in the shipped form is not an >>application server. At the minimum it should provide transaction and >>persistence services, m

Re: ssl traffic between apache and tomcat via mod_jk

2005-06-05 Thread Michael Echerer
Liz Donaldson wrote: > Hi, > > I have a apache https enabled webserver and tomcat server an and am > using the mod_jk connection module. From all the documentation I have > read, it indicates that apache handles all the SSL negotiations and that > the traffic between apache and tomcat is clear tex

Re: [Tomcat] Web Traffic Analisys Tool

2005-05-21 Thread Michael Echerer
Omar Adobati wrote: > Good Morning all, > I'm looking for a free and good web traffic analyzer to use with > tomcat 5.x but searching on the net I can't find anything good. > Does anyone know a good tool? (if it exists) > > Thanks in advice > What about analog, webalizer or awstats? http://awst

Re: Tomcat 5 slow, it's in production, please help!

2005-05-07 Thread Michael Echerer
Oto Bossert wrote: > Yoo, > > Yes switch to jk2 is faster! But unsupported! Development of mod_jk1.x is going on, but not jk2. I wouldn't advise anyone to select something uncontinued. I set the session timeout time to 5 minutes, but >>> >>>in >>> the session view of tomcat manager, I see

Re: Pass parameter to the JVM at startup

2005-05-07 Thread Michael Echerer
> Looking back I was starting Tomcat from inside Eclipse with the Sysdeo > Tomcat Plugin which apparently doesn't use the tomcat startup scripts, > i.e., it bypasses startup.sh so it never sees -server. When I started > tomcat manually via the cli with startup.sh with the JAVA_OPTS in > catalina.s

Re: Common vs. Shared

2005-05-06 Thread Michael Echerer
Ron Heeb wrote: > my understanding comes from this book i got: 'common is responsible for > classes that are used by Tomcat and publicly available to all Web > apps'. shared is like common, except that 'developers can place their > own classes and JAR files into the shared class loader domain'. >

Re: Pass parameter to the JVM at startup

2005-05-06 Thread Michael Echerer
Michael Echerer wrote: >>Shouldn't it have the "-server" in there if it is running in server mode? >> >>How can I tell that the JVM is actually running in server mode? > > > well, not sure if you can. I'd try java.lang.System.getProperties() or &g

Re: upgrading a servlet

2005-05-05 Thread Michael Echerer
Alex Pure wrote: > I need help with this problem > please .. > > > Apache Tomcat/4.0.1 - HTTP Status 404 - /servlet/utdHttpController > > type Status report > message /servlet/utdHttpController > description The requested resource (/servlet/utdHttpController) is not > available. > E

Re: Pass parameter to the JVM at startup

2005-05-05 Thread Michael Echerer
> Shouldn't it have the "-server" in there if it is running in server mode? > > How can I tell that the JVM is actually running in server mode? well, not sure if you can. I'd try java.lang.System.getProperties() or something... At least on a Solaris machine you could figure out whether you are

Re: Loading JAR changes without redeploy.

2005-05-05 Thread Michael Echerer
Eduardo Lobo wrote: > > Hi, > > I have this problem: I need to make a web application that read some > resources(xml files) from JAR files (located in the shared/lib folder), > but I need to update constantly the JARs content, then I need that the > web application always gets the last JAR files

Re: upgrading a servlet

2005-05-05 Thread Michael Echerer
Zohar Amir wrote: > Hello, > I'm using Tomcat 5.0.28 on Red Hat linux. > What is the correct procedure to deploy a new version of the same servlet? > Just build & redeploy the webapp containing the new servlet, if you don't need the new and old version at the same time. in your web.xml could help

Re: Pass parameter to the JVM at startup

2005-05-05 Thread Michael Echerer
Acácio Furtado Costa wrote: > Hi ALL, > > Does anyone know how to pass one parameter by Tomcat 5.0.28 to the > starts JVM? > > I need to pass the "- server" parameter to the JVM (SUN 1.4.2) but I > don´t know where I put this to call JVM. > Use the JAVA_OPTS variable in catalina.sh

Custom JNDI resource and Tomcat BeanFactory seem to always return the same object instance

2005-04-12 Thread Michael Echerer
Hi, I was testing the JNDI Resource configuration using a custom resource factory and/or the Tomcat BeanFactory following the tutorial here with Tomcat 5.0.28: http://jakarta.apache.org/tomcat/tomcat-5.0-doc/jndi-resources-howto.html For Generic Java Bean resources the documentation says: "The

Re: RES: JVM' sperm size always increase after hot deploy to tomcat 5.0.28

2005-04-09 Thread Michael Echerer
Paulo Alvim wrote: > Thank you all > > It's good to know that we're not alone...but since we used to have workable > 'hot deploy' others pre-J2EE App Servers our customers will insist with > that - maybe we'll have to reconsider other App Server as our main > Open-Source production environment o

Re: how to harden tomcat?

2005-02-25 Thread Michael Echerer
Hi, One thing to look out for would be the use of JNI i.e. native calls. I'm not sure if there is a way of preventing someone from packaging a .so in a WAR and then loading it in to the app via code to bypass the lack of LD_LIBRARY_PATH (on *nix). didn't try it myself, but I guess /tomcat/conf/c

Re: moving all classes to shared

2005-02-20 Thread Michael Echerer
Dale, Matt wrote: I'm not sure what you're getting at here. The number of users are irrelevant to the classes. You should only use shared/classes if the classes have to be shared across web apps. Although this is not usually advised as it is good practice to keep web apps self contained. WEB-IN

Re: What is it mean that "Java code does not belong in well designed JSP pages"?

2005-01-23 Thread Michael Echerer
provides. Some logic does belong in JSP. However, the logic that appears within pages should be limited to display logic. I've found that Struts and JSTL are a great combination to accomplish such separation. IMHO this is basically the essence of "Java code does no belong in well designed JSP p

Re: Session is too sticky

2005-01-16 Thread Michael Echerer
Hi! What you could do is to give Apache a hint where to direct a request to. E.g. you could not simply invalidate the session, but also redirect to your start page again with a little "trick". Add a ;jsessionid= string to the URL. Assume your Tomcat JVM routes are called e.g. tomcatA, tomcatB, to

Re: Oracle 9i client connection to 8i database

2004-12-25 Thread Michael Echerer
How come that you need an Oracle client installation at all when you just want to use the Oracle thin JDBC driver? IHMO the client installation is only required for OCI thick drivers... Brad Rhoads wrote: We have an (struts) app that talks to an Oracle 8i database. Our latest installation wants

Re: OutOfMemory Errors

2004-12-15 Thread Michael Echerer
Hi, another idea... try to increase the size of the perm heap with -XX:permSize and -XX:maxPermSize. (See the JVM and garbage collector tuning docus from Sun for more information and google for more). Also try to enable the garbage collector log to check what happens to the perm memory in case

RE: "XXX unknowon type 0" in catalina log of Tomcat 5.0.28

2004-12-09 Thread Michael Echerer
on't mind this log entry any longer. Cheers, Michael > > Yoav Shapira http://www.yoavshapira.com > > > >-Original Message- > >From: Michael Echerer [mailto:[EMAIL PROTECTED] > >Sent: Thursday, December 09, 2004 9:04 AM > >To: [EMAIL PROTECTED] >

"XXX unknowon type 0" in catalina log of Tomcat 5.0.28

2004-12-09 Thread Michael Echerer
Hi, in our Tomcat 5.0.28 catalina log I've seen the following lines. (see below) The first part are GC logs, that's okay as it was set in the JVM_OPTS, but the "XXX unknowon type 0" is quite strange. What's the reason for this. Does anyone know this kind of error message? I've just found out usi

Re: Mysql: Cannot create JDBC driver

2004-11-28 Thread Michael Echerer
javax.servlet.ServletException: Cannot create JDBC driver of class '' for connect URL 'null', cause: No suitable driver Typically this just means that the JNDI name could not be resolved. Thus no driver is available. Server.xml: (...)

Why JNDI ResourceLink not resolved, if .war file name doesn't match context path in Tomcat 5.0.28 ?

2004-11-10 Thread Michael Echerer
Hi, we have an application that we deploy as .WAR file on Tomcat 5.0.28. It has a META-INF/context.xml with this content: If our .war file is named "foo.war" our JNDI link is properly found, db init ok. The .war is uncompressed to /foo in webapps and the context path (as seen in man

Re: Doubts with tomcat

2004-11-07 Thread Michael Echerer
1) When I start tomcat with above server.xml , it creates 9 process with same output on shell. it is I configured tomcat to run with minSpareThreads="5" then why it start with 9 threads? You configured 5 connector threads that not necessarily match OS threads (or whatever you saw). Check with To

Re: META-INF/context.xml not overwriting Catalina/localhost/webapp.xml after redeploy.

2004-11-06 Thread Michael Echerer
Steve Kirk wrote: Remy mentioned earlier today on another thread that the path is ignored in a context.xml file because it is redundant, but I _think_ he was talking about 5.5 rather than 5.0. I have deleted the post now but I think he said that the docBase is probably also ignored. search the a

Re: Rename jsessionid

2004-10-09 Thread Michael Echerer
Built Tomcat from source and change the few java class files where jsessionid is in. What we once did: Patch the binary! :-) you can grep for jsessionid in the tomcat jars somewere in server/lib (don't ask me which, but 1 think in 2-3 jars there was 1 class file each) You may simple replace the

Re: Name jdbc is not bound in this Context

2004-10-09 Thread Michael Echerer
If you put the ResourceParams stuff in server.xml as GlobalResource, you must put e.g. this into your server.xml's context respectively your myapp.xml context descriptor. Of course name and global can differ, but I think this is easiest. There's some hint in the Tomcat 5 docu that this is neede

Re: application deploys twice

2004-08-20 Thread Michael Echerer
Jignesh Patel wrote: Hi All, We are using tomcat5.0.19 and struts1.1. Whenever we deploys our application it deploys twice. We couldn't able to identify the reason, why this is happening. Can anybody give insight to us. We are not deploying war file as well as we are not deploying in server we are

Re: Tomcat clustering

2004-08-18 Thread Michael Echerer
Srinivas Rao Ch wrote: I am getting problems in configuring my tomcat for clustering. Nodes are not recognizing each other. "mcastAddr" has the same IP for all the nodes. Can someone tell what this property is for. My tcpListenAddress is 127.0.0.1 for all the nodes but port is different. In my rul

RE: Using a META-INF\context.xml doesn't work as expected with Manager app .war upload

2004-08-09 Thread Michael Echerer
> root directory if unpacked. > > Yoav Shapira > Millennium Research Informatics > > > >-Original Message- > >From: Michael Echerer [mailto:[EMAIL PROTECTED] > >Sent: Monday, August 09, 2004 11:59 AM > >To: [EMAIL PROTECTED] > >Subject: Using a

Using a META-INF\context.xml doesn't work as expected with Manager app .war upload

2004-08-09 Thread Michael Echerer
Hi, I use Tomcat 5.0.19. I'm playing around with the Manager web application and want to deploy a .WAR file that contains a META-INF\context.xml deployment descriptor. Deploying the .WAR file using the upload feature works, and the context.xml that I put into the META-INF\ is copied (but rename

Re: [tomcat] Re: Understanding tomcat web administration tool.

2004-08-01 Thread Michael Echerer
And when examining localhost_log.2004-08-01.txt I see these errors: 2004-08-01 04:20:52 StandardHost[localhost]: Error deploying application at context path null java.lang.IllegalStateException: Context path /admin is already in use 2004-08-01 04:20:52 HostConfig[localhost] Error deploying con

Re: How to hide the JDBCRealm password from server.xml

2004-07-27 Thread Michael Echerer
QM wrote: On Tue, Jul 27, 2004 at 05:42:51PM -0300, Claudio Carvalho wrote: : Does anybody know how to hide the JDBCRealm password from server.xml? 1/ This has been discussed before on the list. (aka, check the archives.) The quick answer is: protect you Tomcat's server.xml from being read by un

Re: Is the Tomcat5 documentation correct for this?

2004-07-24 Thread Michael Echerer
5 for multiple instances by setting a CATALINA_BASE directory, you should use $CATALINA_BASE instead of $CATALINA_HOME for each of these references." :) Michael Echerer wrote: Hi, http://jakarta.apache.org/tomcat/tomcat-5.0-doc/config/context.html says: "Pathname to a scratch directory to

Is the Tomcat5 documentation correct for this?

2004-07-24 Thread Michael Echerer
Hi, http://jakarta.apache.org/tomcat/tomcat-5.0-doc/config/context.html says: "Pathname to a scratch directory to be provided by this Context for temporary read-write use by servlets within the associated web application. This directory will be made visible to servlets in the web application by

Tomcat5 & Log4j "non-meaningful" thread names in loadbalanced environment vs. Tomcat4

2004-07-21 Thread Michael Echerer
Hi all, i have been using Tomcat 4.x for quite a while and was using log4j for logging purposes with a log4j pattern like this: log4j.appender.logfile.layout.ConversionPattern=%-10r [%t] %d{ISO8601} %-5p %c %x - %m%n In Tomcat4.x with mod_jk1.x the thread names for [%t] I got looked like: [Aj

Re: question on tomcat's JSESSIONID

2004-07-03 Thread Michael Echerer
[EMAIL PROTECTED] wrote: Hi, I have 2 questions regarding tomcat: 1- I am wondering if it is possible to rename the JSESSIONID cookie to something else. I am interseted in renaming it __JSESSIONID this way JSESSION ids generated by webservers on the same domain (domain.com) will not conflict wi

Is crossContext conform to the Servlet API?

2004-06-26 Thread Michael Echerer
Hi, short question: Is the crossContext attibute for contexts (or better the mechanismn behind) part of the Servlet API or is it a Tomcat specific feature that you couldn't use on other servers. I just wondered if you would tie your application/setup to Tomcat when using a crosscontext webapp t

Re: JK2: lb_factor

2004-06-18 Thread Michael Echerer
ng this? If you know any links which tells more details on this, Please let me know. Regards, Bhaskar -Original Message----- From: Michael Echerer [mailto:[EMAIL PROTECTED] Sent: Thursday, June 17, 2004 9:08 PM To: Tomcat Users List Subject: Re: JK2: lb_factor I measured similar effects using &qu

Re: JK2: lb_factor

2004-06-17 Thread Michael Echerer
make the lb_factor work correctly? All information I found was that "a lower value means more requests" (official JK2-documentation at jakarta.apache.org). - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional c

Re: Stop Tomcat over non-SSL connection with Apache2/JK2

2004-06-12 Thread Michael Echerer
Gordon Ross wrote: The problem, is that I do *NOT* want the webapp available over the non-SSL connection. In the section in Apache 2 where I defined the SSL VirtualHost, I put a JkUriSet command, but the tomcat apps were still available over port 80 (non-SSL) - even though there was no other ment

Re: Using Tomcat's HTTP processor and SSL

2004-06-12 Thread Michael Echerer
Jim Kennedy wrote: I am considering using Tomcat alone as my HTTP server as well as my servlet container with SSL. I know a lot of people use Apache HTTP Server instead of Tomcat for this and Tomcat is just the servlet container only. Is there any reason why I should not use just Tomcat alone for

Apache 2.0.49/mod_jk2.02 doesn't distribute load evenly to 2x Tomcat5.0.19 under high load.

2004-06-01 Thread Michael Echerer
Hello, I stumbled upon a serious issue with the load balancing of mod_jk2. Currently I'm doing load testing with The Grinder. My config is: 1x Apache 2.0.49 compiled with openssl (rest is default, prefork, etc.). mod_jk2.0.2 and 2x Tomcat 5.0.19 on Solaris 2.8. With The Grinder I put a high load

RE: Virtual Hosting with Tomcat

2002-12-31 Thread Michael Echerer
> address with your info. However the other issue exists. I > have tried different variations of the context path but none > seem to work. Still hammering at it. > Not yet struggled with virtual hosts, but... Do you have a ROOT.WAR or ROOT directory in your webapps dir? Maybe this could conf

Re: Retrieve User - Realm

2002-12-16 Thread Michael Echerer
> > More specifically, he may be looking for: > > request.getUserPrincipal().getName(), which returns the > actual user name. > > I believe that request.getRemoteUser() only returns the > username if the > user is authenticated using BASIC authentication. Actually not true, although I don't

RE: Session timeout

2002-12-16 Thread Michael Echerer
I guess you should have a look into javax.servlet.http.HttpSessionBindingListener and .HttpSessionEvent to monitor if a session is created or destroyed. > -Original Message- > From: Lindomar [mailto:[EMAIL PROTECTED]] > Sent: Montag, 16. Dezember 2002 14:00 > To: Tomcat Users List > Subje

Hot (re-)deployment with .war files

2002-12-05 Thread Michael Echerer
Hello, I use Tomcat 4.1.16 on Windows with Eclipse 2.0 and the Lomboz 0.95 J2EE plugin for Tomcat integration. I have a problem with auto deployment. When I start Tomcat from the Eclipse I can deploy the webapp. It will be packed into a war file and copied into Tomcat's webapps directory, will

RE: TC/Apache session tracking

2002-12-04 Thread Michael Echerer
I'm not sure if that problem is connected to mod_jk2. There are four ways for session tracking. SSL, hidden form fields, url rewriting or cookies. Tomcat can use certain methods mostly transparent if necessary e.g. if cookies are disabled then url rewriting is in use. I guess your session info sho

RE: please help me

2002-11-22 Thread Michael Echerer
To use servlets you will need a servlet container/webserver like Tomcat. To compile servlets some .jar files from Tomcat are necessary. You have to add this to your classpath or use ant scripts whatever. In your case I guess that servlet.jar from /tomcat/common/lib/ is missing in your classpath