RE: I would like a new session each time I start my application
Hi, Thanks for your quick answer When I say each time I run my application, I mean each time I start my application. Let's say my application is : $TOMCAT_HOME/webapps/my_app/index.html Each time I execute: $TOMCAT_HOME/webapps/my_app/index.html, I would like a new sessionID to be generated. You tell me to disable the session persistence in my app's context I suppose you mean the conf/server.xml, the conf/context.xml file? I had a look at the server.xml file And I have no Context tag? The context.xml file does not have a docBase mentioned in the context tag. What should I put in the docBase variable? docBase=$TOMCAT_HOME/webapps/my_app? Thanks Elisabeth -Original Message- From: Rashmi Rubdi [mailto:[EMAIL PROTECTED] Sent: sábado, 02 de junio de 2007 15:53 To: Tomcat Users List Subject: Re: I would like a new session each time I start my application On 6/1/07, Bachler, Elisabeth (Elisabeth) [EMAIL PROTECTED] wrote: Hi, I have an application that works under tomcat. Each time I run my application I have the same sessionID. Is there a way I guess you mean each time you (re)start Tomcat when you say Each time I run my application... You might be seeing the same sessionID because the session persistence. to generate a differente sessionID each time I start my application? Try disabling the session persistence in your app's Context. Context docBase=... Manager className=org.apache.catalina.session.PersistentManager saveOnRestart=false/ /Context Thanks I don't know if the above will work in all versions of Tomcat, but it should work on Tomcat 5.5.x or higher. Next time please mention the version of Tomcat and other relevant details. -Rashmi - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Strange MySQL-Behaviour with JDBC-Realm
Hi guys, we're running Tomcta 5.5 and MySQL 5 (InnoDB), OS is Debian. Tomcat authentication is done via a JDBC-Realm. Every now and then FormAuthenticator is throwing the following Exception: 2007-06-04 01:41:02,762 ERROR localSearch.log [TP-Processor2]:Exception performing authentication com.mysql.jdbc.exceptions.MySQLNonTransientConnectionException: Communications link failur e during commit(). Transaction resolution unknown. at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:888) at com.mysql.jdbc.Connection.commit(Connection.java:2259) at org.apache.catalina.realm.JDBCRealm.getPassword(JDBCRealm.java:568) at org.apache.catalina.realm.JDBCRealm.authenticate(JDBCRealm.java:399) at org.apache.catalina.realm.JDBCRealm.authenticate(JDBCRealm.java:347) at org.apache.catalina.authenticator.FormAuthenticator.authenticate(FormAuthentica tor.java:257) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.ja va:416) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105) at org.apache.catalina.authenticator.SingleSignOn.invoke(SingleSignOn.java:392) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:10 7) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148) at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:199) at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:282) at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:767) at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:697) at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:88 9) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:6 84) at java.lang.Thread.run(Thread.java:595) Since Google is my friend, I found this link telling me that MySQL's ConnectorJ times out after 8 hours - *ouch*: http://dev.mysql.com/doc/refman/5.0/en/connector-j-usagenotes-troubleshooting.html#qandaitem-24-4-5-3-4 Developers there are told to use a connection-pool that can handle this problem. They discourage anybody to use the autoconnect-feature, since this might be unsafe and become depricated soon. Well, well, I'm using the following connection-pool within Tomcat: ?xml version=1.0 encoding=UTF-8? Context Resource auth=Container description=DB Connection for SSO name=jdbc/SSODS type=javax.sql.DataSource factory=org.apache.commons.dbcp.BasicDataSourceFactory driverClassName=com.mysql.jdbc.Driver username=XXX password=XXX url=jdbc:mysql://db/apacheSSO maxIdle=5 maxWait=1 maxActive=10 validationQuery=SELECT 1 testOnBorrow=true testWhileIdle=true timeBetweenEvictionRunsMillis=1 minEvictableIdleTimeMillis=28800 poolPreparedStatements=true removeAbandoned=true removeAbandonedTimeout=300 logAbandoned=false/ /Context Seems that this connection-pool does not handle this problem properly. So: Does any of you gyus have the same problem and has a working solution fori t? I hate it to check the Tomcat's ERROR-log in the morning and every day I see a file having a size 0... I'm wondering if I simply should add the autoconnect-feature (which is such a bad, bad thing) to my connection-pool... Any oppinions on this appreciated Gregor -- what's puzzlin' you, is the nature of my game gpgp-fp: 79A84FA526807026795E4209D3B3FE028B3170B2 gpgp-key available @ http://pgpkeys.pca.dfn.de:11371 - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Track down which app has memory leak.
Hi, In a tomcat instance (6.0.13) with multiple apps, how do can I easily track down which app has a memory leak. For example, can I just get a dump of all objects and grep the output (i relize there are a lot but I am not afraid of that!), or do I have to resort to installing and learning how to use one of the many profiling tools? So I guess I am asking how do you actually get a stack/heap dump of some sort out of tomcat? I am new to this sort of thing and Google doesn't tell me much except use some fancy gui tool. Best Regards, Jacob _ Jacob Rhoden Application Architect Systems Development and Integration University of Melbourne Phone: +61 3 8344 2884 - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Strange MySQL-Behaviour with JDBC-Realm
Shouldn't your connection URL look something like this: jdbc:mysql//db:3306/apacheSSO instead of jdbc:mysql://db/apacheSSO? Not sure if this means anything, since you say it's already working... It just looks strange. -Original Message- From: Gregor Schneider [mailto:[EMAIL PROTECTED] Sent: Monday, June 04, 2007 12:52 AM To: Tomcat Users List Subject: Strange MySQL-Behaviour with JDBC-Realm Hi guys, we're running Tomcta 5.5 and MySQL 5 (InnoDB), OS is Debian. Tomcat authentication is done via a JDBC-Realm. Every now and then FormAuthenticator is throwing the following Exception: 2007-06-04 01:41:02,762 ERROR localSearch.log [TP-Processor2]:Exception performing authentication com.mysql.jdbc.exceptions.MySQLNonTransientConnectionException: Communications link failur e during commit(). Transaction resolution unknown. at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:888) at com.mysql.jdbc.Connection.commit(Connection.java:2259) at org.apache.catalina.realm.JDBCRealm.getPassword(JDBCRealm.java:568) at org.apache.catalina.realm.JDBCRealm.authenticate(JDBCRealm.java:399) at org.apache.catalina.realm.JDBCRealm.authenticate(JDBCRealm.java:347) at org.apache.catalina.authenticator.FormAuthenticator.authenticate(FormAuthent ica tor.java:257) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase .ja va:416) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126 ) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105 ) at org.apache.catalina.authenticator.SingleSignOn.invoke(SingleSignOn.java:392) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java :10 7) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148) at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:199) at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:282) at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:767) at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:697) at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java :88 9) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav a:6 84) at java.lang.Thread.run(Thread.java:595) Since Google is my friend, I found this link telling me that MySQL's ConnectorJ times out after 8 hours - *ouch*: http://dev.mysql.com/doc/refman/5.0/en/connector-j-usagenotes-troubleshootin g.html#qandaitem-24-4-5-3-4 Developers there are told to use a connection-pool that can handle this problem. They discourage anybody to use the autoconnect-feature, since this might be unsafe and become depricated soon. Well, well, I'm using the following connection-pool within Tomcat: ?xml version=1.0 encoding=UTF-8? Context Resource auth=Container description=DB Connection for SSO name=jdbc/SSODS type=javax.sql.DataSource factory=org.apache.commons.dbcp.BasicDataSourceFactory driverClassName=com.mysql.jdbc.Driver username=XXX password=XXX url=jdbc:mysql://db/apacheSSO maxIdle=5 maxWait=1 maxActive=10 validationQuery=SELECT 1 testOnBorrow=true testWhileIdle=true timeBetweenEvictionRunsMillis=1 minEvictableIdleTimeMillis=28800 poolPreparedStatements=true removeAbandoned=true removeAbandonedTimeout=300 logAbandoned=false/ /Context Seems that this connection-pool does not handle this problem properly. So: Does any of you gyus have the same problem and has a working solution fori t? I hate it to check the Tomcat's ERROR-log in the morning and every day I see a file having a size 0... I'm wondering if I simply should add the autoconnect-feature (which is such a bad, bad thing) to my connection-pool... Any oppinions on this appreciated Gregor -- what's puzzlin' you, is the nature of my game gpgp-fp: 79A84FA526807026795E4209D3B3FE028B3170B2 gpgp-key available @ http://pgpkeys.pca.dfn.de:11371 - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Track down which app has memory leak.
Java comes with a profiling tools available that dump information on a text file upon exist. Look at sun web site for docs about profiling. You jun then have to set the appropriate parameters to your CATALINA_OPTS En l'instant précis du 04/06/07 09:56, Jacob Rhoden s'exprimait en ces termes: Hi, In a tomcat instance (6.0.13) with multiple apps, how do can I easily track down which app has a memory leak. For example, can I just get a dump of all objects and grep the output (i relize there are a lot but I am not afraid of that!), or do I have to resort to installing and learning how to use one of the many profiling tools? So I guess I am asking how do you actually get a stack/heap dump of some sort out of tomcat? I am new to this sort of thing and Google doesn't tell me much except use some fancy gui tool. Best Regards, Jacob _ Jacob Rhoden Application Architect Systems Development and Integration University of Melbourne Phone: +61 3 8344 2884 - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Strange MySQL-Behaviour with JDBC-Realm
Hi David, from http://dev.mysql.com/doc/refman/4.1/en/connector-j-reference-configuration-properties.html: [snipp]= If the hostname is not specified, it defaults to 127.0.0.1. If the port is not specified, it defaults to 3306, the default port number for MySQL servers. [snapp]= If nobody has a suggestion on that topic, I guess I'll try it with autoreconnect, although I'm not happy with that since it's depricated Thanks anyway! Gregor -- what's puzzlin' you, is the nature of my game gpgp-fp: 79A84FA526807026795E4209D3B3FE028B3170B2 gpgp-key available @ http://pgpkeys.pca.dfn.de:11371 - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Strange MySQL-Behaviour with JDBC-Realm
You may want to try it with explicit values to see if that makes a difference. I know NetBeans (different subject) has a problem when the port number is specified and is other that 3306 (default). Just an idea. -Original Message- From: Gregor Schneider [mailto:[EMAIL PROTECTED] Sent: Monday, June 04, 2007 1:17 AM To: Tomcat Users List; [EMAIL PROTECTED] Subject: Re: Strange MySQL-Behaviour with JDBC-Realm Hi David, from http://dev.mysql.com/doc/refman/4.1/en/connector-j-reference-configuration-p roperties.html: [snipp]= If the hostname is not specified, it defaults to 127.0.0.1. If the port is not specified, it defaults to 3306, the default port number for MySQL servers. [snapp]= If nobody has a suggestion on that topic, I guess I'll try it with autoreconnect, although I'm not happy with that since it's depricated Thanks anyway! Gregor -- what's puzzlin' you, is the nature of my game gpgp-fp: 79A84FA526807026795E4209D3B3FE028B3170B2 gpgp-key available @ http://pgpkeys.pca.dfn.de:11371 - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Strange MySQL-Behaviour with JDBC-Realm
Hi David, will give that a try. If the exception persists, I'll go for autoreconnect, will report here. Cheers Gregor -- what's puzzlin' you, is the nature of my game gpgp-fp: 79A84FA526807026795E4209D3B3FE028B3170B2 gpgp-key available @ http://pgpkeys.pca.dfn.de:11371 - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Strange MySQL-Behaviour with JDBC-Realm
I don't think autoReconnect would help. It'd still throw the exception and then re-connect to the database so the code can retry. Unfortunately it doesn't just silently reconnect and perform the query. You have configured both testOnBorrow and a validation query, so the connection is verified working before the attempt to retrieve a password. You might want to check firewalls or network hardware between your tomcat server and database server. This smells like a network issue. --David Gregor Schneider wrote: Hi guys, we're running Tomcta 5.5 and MySQL 5 (InnoDB), OS is Debian. Tomcat authentication is done via a JDBC-Realm. Every now and then FormAuthenticator is throwing the following Exception: 2007-06-04 01:41:02,762 ERROR localSearch.log [TP-Processor2]:Exception performing authentication com.mysql.jdbc.exceptions.MySQLNonTransientConnectionException: Communications link failur e during commit(). Transaction resolution unknown. at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:888) at com.mysql.jdbc.Connection.commit(Connection.java:2259) at org.apache.catalina.realm.JDBCRealm.getPassword(JDBCRealm.java:568) at org.apache.catalina.realm.JDBCRealm.authenticate(JDBCRealm.java:399) at org.apache.catalina.realm.JDBCRealm.authenticate(JDBCRealm.java:347) at org.apache.catalina.authenticator.FormAuthenticator.authenticate(FormAuthentica tor.java:257) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.ja va:416) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105) at org.apache.catalina.authenticator.SingleSignOn.invoke(SingleSignOn.java:392) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:10 7) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148) at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:199) at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:282) at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:767) at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:697) at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:88 9) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:6 84) at java.lang.Thread.run(Thread.java:595) Since Google is my friend, I found this link telling me that MySQL's ConnectorJ times out after 8 hours - *ouch*: http://dev.mysql.com/doc/refman/5.0/en/connector-j-usagenotes-troubleshooting.html#qandaitem-24-4-5-3-4 Developers there are told to use a connection-pool that can handle this problem. They discourage anybody to use the autoconnect-feature, since this might be unsafe and become depricated soon. Well, well, I'm using the following connection-pool within Tomcat: ?xml version=1.0 encoding=UTF-8? Context Resource auth=Container description=DB Connection for SSO name=jdbc/SSODS type=javax.sql.DataSource factory=org.apache.commons.dbcp.BasicDataSourceFactory driverClassName=com.mysql.jdbc.Driver username=XXX password=XXX url=jdbc:mysql://db/apacheSSO maxIdle=5 maxWait=1 maxActive=10 validationQuery=SELECT 1 testOnBorrow=true testWhileIdle=true timeBetweenEvictionRunsMillis=1 minEvictableIdleTimeMillis=28800 poolPreparedStatements=true removeAbandoned=true removeAbandonedTimeout=300 logAbandoned=false/ /Context Seems that this connection-pool does not handle this problem properly. So: Does any of you gyus have the same problem and has a working solution fori t? I hate it to check the Tomcat's ERROR-log in the morning and every day I see a file having a size 0... I'm wondering if I simply should add the autoconnect-feature (which is such a bad, bad thing) to my connection-pool... Any oppinions on this appreciated Gregor - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: I would like a new session each time I start my application
Liz, please tell us what you actually doing and why you need this? I think there is a conceptual problem... - Original Message - From: Bachler, Elisabeth (Elisabeth) [EMAIL PROTECTED] To: users@tomcat.apache.org Sent: Friday, June 01, 2007 6:57 PM Subject: I would like a new session each time I start my application Hi, I have an application that works under tomcat. Each time I run my application I have the same sessionID. Is there a way to generate a differente sessionID each time I start my application? Thanks - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Track down which app has memory leak.
David Delbecq wrote: Java comes with a profiling tools available that dump information on a text file upon exist. Look at sun web site for docs about profiling. You jun then have to set the appropriate parameters to your CATALINA_OPTS Hi, Thanks for your reply however I cant find anything useful on the Sun site. Only a few things that reveal you have to type a kill -QUITE tomcat_proc, however that doesnt seem to do anything (maybe it is putting a heap file somewhere I dont know about). Best Regards, Jacob - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Track down which app has memory leak.
Hmm i'm not sure whether it can track memory leak or not, since i'm not a frequent user of it, but you can try JMeter from Apache: http://jakarta.apache.org/jmeter/ Its testing and monitoring module helps me a lot though... HTH FooShyn Jacob Rhoden wrote: David Delbecq wrote: Java comes with a profiling tools available that dump information on a text file upon exist. Look at sun web site for docs about profiling. You jun then have to set the appropriate parameters to your CATALINA_OPTS Hi, Thanks for your reply however I cant find anything useful on the Sun site. Only a few things that reveal you have to type a kill -QUITE tomcat_proc, however that doesnt seem to do anything (maybe it is putting a heap file somewhere I dont know about). Best Regards, Jacob - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Strange Error Tomcat 6
HTTP Status 500 - type Exception report message description The server encountered an internal error () that prevented it from fulfilling this request. exception org.apache.jasper.JasperException: Unable to compile class for JSP: An error occurred at line: 80 in the jsp file: /cgi/commons/listing.cgi Syntax error, insert while ( Expression ) ; to complete BlockStatements 77: c:choose 78: c:when test=${sbean.totProgrammi0} 79: table cellpadding=0 width=100% cellspacing=0 border=0trtddiv id=box-titdiv id=data 80: %=htgiorni.get(fmt3.format(new java.util.Date(+/+mm+/+gg)))% %=fmt2.format(new java.util.Date(+/+mm+/+gg))% %=htmesi.get(fmt4.format(new java.util.Date(+/+mm+/+gg)))%/div%if (!oraCheck.equals(-2)){%div id=box-oranbsp; cambia fascia orariatable cellpadding=0 cellspacing=0 border=0 id=cambia-oratrtd%if (Integer.parseInt(ora) = 2) {%a href=?day=%=fmt.format(new java.util.Date(+/+mm+/+gg))%hour=%=Integer.parseInt(ora)-2%type=%=request.getParameter(type)%chtype=%=request.getParameter(chtype)%channel=%=request.getParameter(channel)%tipo=2%}%img src=/guida_tv/images/freccia_indietro.gif alt=indietro border=0/%if (Integer.parseInt(ora) = 2) {%/a%}%/tdtdnbsp;%=ora%.00-%=orapiudue%.00nbsp;/tdtd%if (Integer.parseInt(ora) 22) {if (Integer.parseInt(ora) = 21) {%a href=?day=%=fmt.format(new java.util.Date(+/+mm+/+gg))%hour=%=Integer.parseInt(ora )+1%type=%=request.getParameter(type)%chtype=%=request.getParameter(chtype)%channel=%=request.getParameter(channel)%tipo=2%} else {%a href=?day=%=fmt.format(new java.util.Date(+/+mm+/+gg))%hour=%=Integer.parseInt(ora)+2%type=%=request.getParameter(type)%chtype=%=request.getParameter(chtype)%channel=%=request.getParameter(channel)%tipo=2%}%%}%img src=/guida_tv/images/freccia_avanti.gif alt=avanti border=0/%if (Integer.parseInt(ora) 22) {%/a%}%/td/tr/table/div/div%}%/td/tr/tablebr!--/data e fascia oraria --%}% 81: /c:when 82: /c:choose 83: % Stacktrace: at org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:85) at org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:330) at org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:415) at org.apache.jasper.compiler.Compiler.compile(Compiler.java:308) at org.apache.jasper.compiler.Compiler.compile(Compiler.java:286) at org.apache.jasper.compiler.Compiler.compile(Compiler.java:273) at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:566) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:308) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266) at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:687) at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:590) at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:505) at org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:968) at org.apache.jsp.cgi.programmi.body_cgi._jspService(body_cgi.java:68) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:384) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266) at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:687) at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:590) at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:505) at org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:968) at org.apache.jsp.cgi.index_cgi._jspService(index_cgi.java:113) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) at
Re: Track down which app has memory leak.
Add this (java 1.5) to your CATALINA_OPTS -agentlib:hprof=heap=dump From doc: This option causes the greatest amount of memory to be used because it stores details on every object allocated, it can also impact the application performance due to the data gathering (stack traces) on object allocation and garbage collection. See http://java.sun.com/developer/technicalArticles/Programming/HPROF.html En l'instant précis du 04/06/07 11:27, Jacob Rhoden s'exprimait en ces termes: David Delbecq wrote: Java comes with a profiling tools available that dump information on a text file upon exist. Look at sun web site for docs about profiling. You jun then have to set the appropriate parameters to your CATALINA_OPTS Hi, Thanks for your reply however I cant find anything useful on the Sun site. Only a few things that reveal you have to type a kill -QUITE tomcat_proc, however that doesnt seem to do anything (maybe it is putting a heap file somewhere I dont know about). Best Regards, Jacob - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Track down which app has memory leak.
It tracks performances under workload, not memory leaks. To track and locate memory leak, you need profiling tools or be able to load/unload several time all modules separately. En l'instant précis du 04/06/07 11:49, Foo Shyn s'exprimait en ces termes: Hmm i'm not sure whether it can track memory leak or not, since i'm not a frequent user of it, but you can try JMeter from Apache: http://jakarta.apache.org/jmeter/ Its testing and monitoring module helps me a lot though... HTH FooShyn Jacob Rhoden wrote: David Delbecq wrote: Java comes with a profiling tools available that dump information on a text file upon exist. Look at sun web site for docs about profiling. You jun then have to set the appropriate parameters to your CATALINA_OPTS Hi, Thanks for your reply however I cant find anything useful on the Sun site. Only a few things that reveal you have to type a kill -QUITE tomcat_proc, however that doesnt seem to do anything (maybe it is putting a heap file somewhere I dont know about). Best Regards, Jacob - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Programmatic set up for logging
Hello list, Does anybody know how to set up programmatic logging? Result of this tunning must be identical with logging.properties? Thank - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: tomcat temp directory
Hi Martin, David Thanks. Where/syntax to set the tmpdir? Below is the syntax I use and when run from local host it puts the files in the root tomcat directory, at the same level as the all the subdirectories. Even outside the webapp directory. However it is accessible. When I switch to accessing from a domain with modjk, TC cant find the file. The very same code that calls a servlet to populate a html img tag is blank, but the rest of the page renders correctly. I also found something claiming that TC configures its own tmp directory per webapp. Is that from the proper setting of CATALINA_TMPDIR in the server.xml? with what syntax? tia. String tempdir = System.getProperty(java.io.tmpdir); if (! (tempdir.endsWith(/) || tempdir.endsWith(\\))) { tempdir = tempdir + System.getProperty(file.separator); } File tempFile = null; try { tempFile = File.createTempFile(myFile, . + outputType); } catch (IOException ex2) { } Martin Gainty [EMAIL PROTECTED] wrote: Hi Chris- did you set CATALINA_TMPDIR to your TOMCAT temp folder? M-- This email message and any files transmitted with it contain confidential information intended only for the person(s) to whom this email message is addressed. If you have received this email message in error, please notify the sender immediately by telephone or email and destroy the original message without making a copy. Thank you. - Original Message - From: Chris Pat To: Tomcat Sent: Sunday, June 03, 2007 10:02 PM Subject: tomcat temp directory Hello How do I configure and access a temporary directory in Tomcat5x? Oddly I am presently writing files I want to use immediately into java.io.tempdir and it works if I access the webapp from localhost. However fails when accessed from a domain. Within the Action/servlet how to I write/read the context specific temp directory? Is there a way to release the file lock that Tomcat will have on that file? I close all streams, but in previous primitive way it held the lock and I had to stop/restart TC. Any help along understanding this would be greatly appreciated. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Track down which app has memory leak.
IC, Thanx for clearing that out :) FooShyn David Delbecq wrote: It tracks performances under workload, not memory leaks. To track and locate memory leak, you need profiling tools or be able to load/unload several time all modules separately. En l'instant précis du 04/06/07 11:49, Foo Shyn s'exprimait en ces termes: Hmm i'm not sure whether it can track memory leak or not, since i'm not a frequent user of it, but you can try JMeter from Apache: http://jakarta.apache.org/jmeter/ Its testing and monitoring module helps me a lot though... HTH FooShyn Jacob Rhoden wrote: David Delbecq wrote: Java comes with a profiling tools available that dump information on a text file upon exist. Look at sun web site for docs about profiling. You jun then have to set the appropriate parameters to your CATALINA_OPTS Hi, Thanks for your reply however I cant find anything useful on the Sun site. Only a few things that reveal you have to type a kill -QUITE tomcat_proc, however that doesnt seem to do anything (maybe it is putting a heap file somewhere I dont know about). Best Regards, Jacob - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: I would like a new session each time I start my application
The thing is that my application access a database. When the user wants to modify the db, I lock the access to this particular action (and let the user only view the data) using the sessionID. Now, if the user is bad... He can log on once and get the modify action... Then he can open a new screen and modify things again... Which is not what I need. Everytime a new screen is open to execute the application I need a different sessionID. Do you see what my problem is ? I don't know another way of doing it. -Original Message- From: Johnny Kewl [mailto:[EMAIL PROTECTED] Sent: lunes, 04 de junio de 2007 11:07 To: Tomcat Users List Subject: Re: I would like a new session each time I start my application Liz, please tell us what you actually doing and why you need this? I think there is a conceptual problem... - Original Message - From: Bachler, Elisabeth (Elisabeth) [EMAIL PROTECTED] To: users@tomcat.apache.org Sent: Friday, June 01, 2007 6:57 PM Subject: I would like a new session each time I start my application Hi, I have an application that works under tomcat. Each time I run my application I have the same sessionID. Is there a way to generate a differente sessionID each time I start my application? Thanks - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: tomcat temp directory
Hi Further I see in catalina.bat where it is setup and all the defaults are unchanged. This still does not explain why it is NOT putting the files in \temp and rather in just the root dir of the TC installation. I could explicitly force it, however that doesnt seem right. Chris Pat [EMAIL PROTECTED] wrote: Hi Martin, David Thanks. Where/syntax to set the tmpdir? Below is the syntax I use and when run from local host it puts the files in the root tomcat directory, at the same level as the all the subdirectories. Even outside the webapp directory. However it is accessible. When I switch to accessing from a domain with modjk, TC cant find the file. The very same code that calls a servlet to populate a html img tag is blank, but the rest of the page renders correctly. I also found something claiming that TC configures its own tmp directory per webapp. Is that from the proper setting of CATALINA_TMPDIR in the server.xml? with what syntax? tia. String tempdir = System.getProperty(java.io.tmpdir); if (! (tempdir.endsWith(/) || tempdir.endsWith(\\))) { tempdir = tempdir + System.getProperty(file.separator); } File tempFile = null; try { tempFile = File.createTempFile(myFile, . + outputType); } catch (IOException ex2) { } Martin Gainty wrote: Hi Chris- did you set CATALINA_TMPDIR to your TOMCAT temp folder? M-- This email message and any files transmitted with it contain confidential information intended only for the person(s) to whom this email message is addressed. If you have received this email message in error, please notify the sender immediately by telephone or email and destroy the original message without making a copy. Thank you. - Original Message - From: Chris Pat To: Tomcat Sent: Sunday, June 03, 2007 10:02 PM Subject: tomcat temp directory Hello How do I configure and access a temporary directory in Tomcat5x? Oddly I am presently writing files I want to use immediately into java.io.tempdir and it works if I access the webapp from localhost. However fails when accessed from a domain. Within the Action/servlet how to I write/read the context specific temp directory? Is there a way to release the file lock that Tomcat will have on that file? I close all streams, but in previous primitive way it held the lock and I had to stop/restart TC. Any help along understanding this would be greatly appreciated. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
How to customize the context paths for several web application.
Hi, We have four web applications that deployed on Tomcat 6.0 at the same time. Some special customers want to use special context paths to access them, so I think the easiest way is to use context.xml to define the context paths. I do not know how to do it? Can you kindly give me a sample? Thanks As I know, the context.xml is placed in $CATALINA_HOME/conf/context.xml. This way we can only define one context path. Thanks for your help! Guofeng
Re: Strange Error Tomcat 6
${sbean.totProgrammi0} This expression should be ${sbean.totProgrammi gt 0} or ${sbean.totProgrammi gt; 0} as the '' character is probably messing up the parsing. --David Davide Manca wrote: HTTP Status 500 - type Exception report message description The server encountered an internal error () that prevented it from fulfilling this request. exception org.apache.jasper.JasperException: Unable to compile class for JSP: An error occurred at line: 80 in the jsp file: /cgi/commons/listing.cgi Syntax error, insert while ( Expression ) ; to complete BlockStatements 77: c:choose 78: c:when test=${sbean.totProgrammi0} 79: table cellpadding=0 width=100% cellspacing=0 border=0trtddiv id=box-titdiv id=data 80: %=htgiorni.get(fmt3.format(new java.util.Date(+/+mm+/+gg)))% %=fmt2.format(new java.util.Date(+/+mm+/+gg))% %=htmesi.get(fmt4.format(new java.util.Date(+/+mm+/+gg)))%/div%if (!oraCheck.equals(-2)){%div id=box-oranbsp; cambia fascia orariatable cellpadding=0 cellspacing=0 border=0 id=cambia-oratrtd%if (Integer.parseInt(ora) = 2) {%a href=?day=%=fmt.format(new java.util.Date(+/+mm+/+gg))%hour=%=Integer.parseInt(ora)-2%type=%=request.getParameter(type)%chtype=%=request.getParameter(chtype)%channel=%=request.getParameter(channel)%tipo=2%}%img src=/guida_tv/images/freccia_indietro.gif alt=indietro border=0/%if (Integer.parseInt(ora) = 2) {%/a%}%/tdtdnbsp;%=ora%.00-%=orapiudue%.00nbsp;/tdtd%if (Integer.parseInt(ora) 22) {if (Integer.parseInt(ora) = 21) {%a href=?day=%=fmt.format(new java.util.Date(+/+mm+/+gg))%hour=%=Integer.parseInt(ora )+1%type=%=request.getParameter(type)%chtype=%=request.getParameter(chtype)%channel=%=request.getParameter(channel)%tipo=2%} else {%a href=?day=%=fmt.format(new java.util.Date(+/+mm+/+gg))%hour=%=Integer.parseInt(ora)+2%type=%=request.getParameter(type)%chtype=%=request.getParameter(chtype)%channel=%=request.getParameter(channel)%tipo=2%}%%}%img src=/guida_tv/images/freccia_avanti.gif alt=avanti border=0/%if (Integer.parseInt(ora) 22) {%/a%}%/td/tr/table/div/div%}%/td/tr/tablebr!--/data e fascia oraria --%}% 81: /c:when 82: /c:choose 83: % Stacktrace: at org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:85) at org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:330) at org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:415) at org.apache.jasper.compiler.Compiler.compile(Compiler.java:308) at org.apache.jasper.compiler.Compiler.compile(Compiler.java:286) at org.apache.jasper.compiler.Compiler.compile(Compiler.java:273) at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:566) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:308) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266) at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:687) at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:590) at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:505) at org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:968) at org.apache.jsp.cgi.programmi.body_cgi._jspService(body_cgi.java:68) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:384) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266) at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:687) at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:590) at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:505) at org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:968) at org.apache.jsp.cgi.index_cgi._jspService(index_cgi.java:113)
jsp-output in wrong frames
Hello list, We are using Apache Tomcat/5.5.17 with jvm 1.5.0_07-b03 on Linux Kernel 2.6.19.2-monolithic (suse) together with Apache2 using the httpd2-worker configuration. Tomcat is given 512-1024 MB Ram by java with permGemMem of 256 MB. The application is a struts-app using frames (top-left-main). All is working fine with two exceptions: First: Sometimes (every couple of days) the connection count is rising and after a while tomcat uses 99% of processor time. This occurs when spammers are trying to put spam in our discussion boards and the manipulated urls they are using are causing soem errors. Only solution is to kill the tomcat process - a graceful reload of tomcat isn´t possible any more. Most of the time after restarting tomcat all is working fine again but sometimes this doesn´t help: I have to reboot the server (IBM xS23ver x330, 2x1,1 GHz, 2 GB RAM). Strangely, these serious problems occur every 40-50 days. Second: Sometimes the jsps were delivered in the wrong frames. The content is puzzled - randomly other parts of the application are showing in the frames. If I look at the frame information in Firefox the given Url is correct but the content doesn´t match the url. The is a most annoying thing for our customers (and us as well) and we would be very grateful for a suggestion. Load: about 3000 visits / 35.000 pageviews / 100.000 hits a day. Thanks for your help. Norbert Regards, Norbert Norbert Hirneisen science4you Online-Monitoring http://www.science4you.org email: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] Please visit us: http://www.science4you.org (in German) Euro+Med Plant Conservation www.http://www.s2you.com/euromed/ http://www.http://www.s2you.com/euromed/ (in English) European Moth Night: www.falternacht.de http://www.falternacht.de (in German) Butterfly findings: www.falterfunde.de http://www.falterfunde.de (in German) Migratory butterflies and moths: www.s2you.com/platform/monitoring/ http://www.s2you.com/platform/monitoring/ (in German) Protected species by law in Germany http://www.wisia.de (in German) Red lists http://www.redlist.info (in German) Norbert Hirneisen Science Communications von-Müllenark-Str. 19 53179 Bonn phone +49-228-6194930 - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: jsp-output in wrong frames
En l'instant précis du 04/06/07 13:32, Norbert Hirneisen s'exprimait en ces termes: Hello list, We are using Apache Tomcat/5.5.17 with jvm 1.5.0_07-b03 on Linux Kernel 2.6.19.2-monolithic (suse) together with Apache2 using the httpd2-worker configuration. Tomcat is given 512-1024 MB Ram by java with permGemMem of 256 MB. The application is a struts-app using frames (top-left-main). All is working fine with two exceptions: First: Sometimes (every couple of days) the connection count is rising and after a while tomcat uses 99% of processor time. This occurs when spammers are trying to put spam in our discussion boards and the manipulated urls they are using are causing soem errors. Only solution is to kill the tomcat process - a graceful reload of tomcat isn´t possible any more. Most of the time after restarting tomcat all is working fine again but sometimes this doesn´t help: I have to reboot the server (IBM xS23ver x330, 2x1,1 GHz, 2 GB RAM). Strangely, these serious problems occur every 40-50 days. Fors this part, fix your struts form/action to not generate errors or ignore badly encoded urls Second: Sometimes the jsps were delivered in the wrong frames. The content is puzzled - randomly other parts of the application are showing in the frames. If I look at the frame information in Firefox the given Url is correct but the content doesn´t match the url. The is a most annoying thing for our customers (and us as well) and we would be very grateful for a suggestion. Load: about 3000 visits / 35.000 pageviews / 100.000 hits a day. Are the 2 or 3 frames generated using the same struts action / form ? I yes, check to make sure they are defined as request scope and not session scope. When you load several frames at same time, browser issues requests in parallel. If something in your code use a session level object without surrouding synchronization, you my have troubles, especially if the backing 'form' in struts you are using is session scoped. Thanks for your help. Norbert Regards, Norbert Norbert Hirneisen science4you Online-Monitoring http://www.science4you.org email: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] Please visit us: http://www.science4you.org (in German) Euro+Med Plant Conservation www.http://www.s2you.com/euromed/ http://www.http://www.s2you.com/euromed/ (in English) European Moth Night: www.falternacht.de http://www.falternacht.de (in German) Butterfly findings: www.falterfunde.de http://www.falterfunde.de (in German) Migratory butterflies and moths: www.s2you.com/platform/monitoring/ http://www.s2you.com/platform/monitoring/ (in German) Protected species by law in Germany http://www.wisia.de (in German) Red lists http://www.redlist.info (in German) Norbert Hirneisen Science Communications von-Müllenark-Str. 19 53179 Bonn phone +49-228-6194930 - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: I would like a new session each time I start my application
Cant say I do understand... Session ID's are almost untouchables... they used by too many things, authentication, SSO, load balancing, and I'm worried that when the user does something as simple as a right click and opens a new page, the app breaks. I'm not sure what you saying but I would rather go for something like change credits. So, user does something that allows them one change... you store that in session ID, as an attribute, something like, setAttribute(ChangeCredit, 1); Now they can open 20 pages but on page 5 they make the change the attribute is set back to 0; None of the other pages will allow it something like that. All I think that is happening is you trying to store state in the browser page, instead of the Session. ie you give them page, they change, you present them with page that is one state further on... ie thank you for change, cant change anymore, but user just has to open new page and they back to the beginning. But if you store the state in the session that wont happen. Irony is I think you actually need that Session. Good Luck - Original Message - From: Bachler, Elisabeth (Elisabeth) [EMAIL PROTECTED] To: Tomcat Users List users@tomcat.apache.org Sent: Monday, June 04, 2007 12:32 PM Subject: RE: I would like a new session each time I start my application The thing is that my application access a database. When the user wants to modify the db, I lock the access to this particular action (and let the user only view the data) using the sessionID. Now, if the user is bad... He can log on once and get the modify action... Then he can open a new screen and modify things again... Which is not what I need. Everytime a new screen is open to execute the application I need a different sessionID. Do you see what my problem is ? I don't know another way of doing it. -Original Message- From: Johnny Kewl [mailto:[EMAIL PROTECTED] Sent: lunes, 04 de junio de 2007 11:07 To: Tomcat Users List Subject: Re: I would like a new session each time I start my application Liz, please tell us what you actually doing and why you need this? I think there is a conceptual problem... - Original Message - From: Bachler, Elisabeth (Elisabeth) [EMAIL PROTECTED] To: users@tomcat.apache.org Sent: Friday, June 01, 2007 6:57 PM Subject: I would like a new session each time I start my application Hi, I have an application that works under tomcat. Each time I run my application I have the same sessionID. Is there a way to generate a differente sessionID each time I start my application? Thanks - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: tomcat temp directory
In the code below, let's just ignore the logic for the string 'tempdir' ... looks like noise to me as it isn't used in the creation of a file. The call to create the temp file looks good and should store it in the path specified by java.io.tmpdir. You can write out the system property to see where your files are going ... by default I think it's usually the system temp. My install of tomcat 5.5 as a service explicitly set's it to the temp directory within the tomcat folder. You can look for it in your .bat files by looking for -Djava.io.tmpdir= Could you expand on this image tag generation? Looks like you are attempting to generate a temp image in a jsp and keep it long enough to return it via servlet. Those are two separate requests (page and image) and it may already be gone by the time the client requests the image itself if that's the case. --David Chris Pat wrote: Hi Further I see in catalina.bat where it is setup and all the defaults are unchanged. This still does not explain why it is NOT putting the files in \temp and rather in just the root dir of the TC installation. I could explicitly force it, however that doesnt seem right. Chris Pat [EMAIL PROTECTED] wrote: Hi Martin, David Thanks. Where/syntax to set the tmpdir? Below is the syntax I use and when run from local host it puts the files in the root tomcat directory, at the same level as the all the subdirectories. Even outside the webapp directory. However it is accessible. When I switch to accessing from a domain with modjk, TC cant find the file. The very same code that calls a servlet to populate a html img tag is blank, but the rest of the page renders correctly. I also found something claiming that TC configures its own tmp directory per webapp. Is that from the proper setting of CATALINA_TMPDIR in the server.xml? with what syntax? tia. String tempdir = System.getProperty(java.io.tmpdir); if (! (tempdir.endsWith(/) || tempdir.endsWith(\\))) { tempdir = tempdir + System.getProperty(file.separator); } File tempFile = null; try { tempFile = File.createTempFile(myFile, . + outputType); } catch (IOException ex2) { } - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: I would like a new session each time I start my application
As an alternative, you could incorporate one time tokens. Generate on every page request, stored in both session and request parameters and compare on every submission. If they go out of sync (ie and old one shows up) you know they spawned a new window. In that case the old window should be considered abandon. Post a polite error message and otherwise ignore the request. The tokens don't have to be complex -- a simple 16 bit random number should be more than sufficient. You could build it as a filter to help validate the request before it get's to your action code. --David Johnny Kewl wrote: Cant say I do understand... Session ID's are almost untouchables... they used by too many things, authentication, SSO, load balancing, and I'm worried that when the user does something as simple as a right click and opens a new page, the app breaks. I'm not sure what you saying but I would rather go for something like change credits. So, user does something that allows them one change... you store that in session ID, as an attribute, something like, setAttribute(ChangeCredit, 1); Now they can open 20 pages but on page 5 they make the change the attribute is set back to 0; None of the other pages will allow it something like that. All I think that is happening is you trying to store state in the browser page, instead of the Session. ie you give them page, they change, you present them with page that is one state further on... ie thank you for change, cant change anymore, but user just has to open new page and they back to the beginning. But if you store the state in the session that wont happen. Irony is I think you actually need that Session. Good Luck - Original Message - From: Bachler, Elisabeth (Elisabeth) [EMAIL PROTECTED] To: Tomcat Users List users@tomcat.apache.org Sent: Monday, June 04, 2007 12:32 PM Subject: RE: I would like a new session each time I start my application The thing is that my application access a database. When the user wants to modify the db, I lock the access to this particular action (and let the user only view the data) using the sessionID. Now, if the user is bad... He can log on once and get the modify action... Then he can open a new screen and modify things again... Which is not what I need. Everytime a new screen is open to execute the application I need a different sessionID. Do you see what my problem is ? I don't know another way of doing it. -Original Message- From: Johnny Kewl [mailto:[EMAIL PROTECTED] Sent: lunes, 04 de junio de 2007 11:07 To: Tomcat Users List Subject: Re: I would like a new session each time I start my application Liz, please tell us what you actually doing and why you need this? I think there is a conceptual problem... - Original Message - From: Bachler, Elisabeth (Elisabeth) [EMAIL PROTECTED] To: users@tomcat.apache.org Sent: Friday, June 01, 2007 6:57 PM Subject: I would like a new session each time I start my application Hi, I have an application that works under tomcat. Each time I run my application I have the same sessionID. Is there a way to generate a differente sessionID each time I start my application? Thanks - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: jsp-output in wrong frames
Is there a struts mailing list? I think this is a coding issue, just wondering if there is a place someone can post a struts program so that people can see the errors in the code. Struts guys will be able to tell you where connections are not been returned to the dB pool, and why page dispatches go to the wrong frames in the request objects. Tomcat guys will recognize the problem, but you need struts users to help you. Good luck - Original Message - From: Norbert Hirneisen [EMAIL PROTECTED] To: users@tomcat.apache.org Sent: Monday, June 04, 2007 1:32 PM Subject: jsp-output in wrong frames Hello list, We are using Apache Tomcat/5.5.17 with jvm 1.5.0_07-b03 on Linux Kernel 2.6.19.2-monolithic (suse) together with Apache2 using the httpd2-worker configuration. Tomcat is given 512-1024 MB Ram by java with permGemMem of 256 MB. The application is a struts-app using frames (top-left-main). All is working fine with two exceptions: First: Sometimes (every couple of days) the connection count is rising and after a while tomcat uses 99% of processor time. This occurs when spammers are trying to put spam in our discussion boards and the manipulated urls they are using are causing soem errors. Only solution is to kill the tomcat process - a graceful reload of tomcat isn´t possible any more. Most of the time after restarting tomcat all is working fine again but sometimes this doesn´t help: I have to reboot the server (IBM xS23ver x330, 2x1,1 GHz, 2 GB RAM). Strangely, these serious problems occur every 40-50 days. Second: Sometimes the jsps were delivered in the wrong frames. The content is puzzled - randomly other parts of the application are showing in the frames. If I look at the frame information in Firefox the given Url is correct but the content doesn´t match the url. The is a most annoying thing for our customers (and us as well) and we would be very grateful for a suggestion. Load: about 3000 visits / 35.000 pageviews / 100.000 hits a day. Thanks for your help. Norbert Regards, Norbert Norbert Hirneisen science4you Online-Monitoring http://www.science4you.org email: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] Please visit us: http://www.science4you.org (in German) Euro+Med Plant Conservation www.http://www.s2you.com/euromed/ http://www.http://www.s2you.com/euromed/ (in English) European Moth Night: www.falternacht.de http://www.falternacht.de (in German) Butterfly findings: www.falterfunde.de http://www.falterfunde.de (in German) Migratory butterflies and moths: www.s2you.com/platform/monitoring/ http://www.s2you.com/platform/monitoring/ (in German) Protected species by law in Germany http://www.wisia.de (in German) Red lists http://www.redlist.info (in German) Norbert Hirneisen Science Communications von-Müllenark-Str. 19 53179 Bonn phone +49-228-6194930 - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: I would like a new session each time I start my application
Thanks for your response Are you saying that everytime the index.html is executed, I should generate a random number and send it to the other files. Then compare it with the one I have in the stack ? Elisabeth -Original Message- From: David Smith [mailto:[EMAIL PROTECTED] Sent: lunes, 04 de junio de 2007 14:10 To: Tomcat Users List Subject: Re: I would like a new session each time I start my application As an alternative, you could incorporate one time tokens. Generate on every page request, stored in both session and request parameters and compare on every submission. If they go out of sync (ie and old one shows up) you know they spawned a new window. In that case the old window should be considered abandon. Post a polite error message and otherwise ignore the request. The tokens don't have to be complex -- a simple 16 bit random number should be more than sufficient. You could build it as a filter to help validate the request before it get's to your action code. --David Johnny Kewl wrote: Cant say I do understand... Session ID's are almost untouchables... they used by too many things, authentication, SSO, load balancing, and I'm worried that when the user does something as simple as a right click and opens a new page, the app breaks. I'm not sure what you saying but I would rather go for something like change credits. So, user does something that allows them one change... you store that in session ID, as an attribute, something like, setAttribute(ChangeCredit, 1); Now they can open 20 pages but on page 5 they make the change the attribute is set back to 0; None of the other pages will allow it something like that. All I think that is happening is you trying to store state in the browser page, instead of the Session. ie you give them page, they change, you present them with page that is one state further on... ie thank you for change, cant change anymore, but user just has to open new page and they back to the beginning. But if you store the state in the session that wont happen. Irony is I think you actually need that Session. Good Luck - Original Message - From: Bachler, Elisabeth (Elisabeth) [EMAIL PROTECTED] To: Tomcat Users List users@tomcat.apache.org Sent: Monday, June 04, 2007 12:32 PM Subject: RE: I would like a new session each time I start my application The thing is that my application access a database. When the user wants to modify the db, I lock the access to this particular action (and let the user only view the data) using the sessionID. Now, if the user is bad... He can log on once and get the modify action... Then he can open a new screen and modify things again... Which is not what I need. Everytime a new screen is open to execute the application I need a different sessionID. Do you see what my problem is ? I don't know another way of doing it. -Original Message- From: Johnny Kewl [mailto:[EMAIL PROTECTED] Sent: lunes, 04 de junio de 2007 11:07 To: Tomcat Users List Subject: Re: I would like a new session each time I start my application Liz, please tell us what you actually doing and why you need this? I think there is a conceptual problem... - Original Message - From: Bachler, Elisabeth (Elisabeth) [EMAIL PROTECTED] To: users@tomcat.apache.org Sent: Friday, June 01, 2007 6:57 PM Subject: I would like a new session each time I start my application Hi, I have an application that works under tomcat. Each time I run my application I have the same sessionID. Is there a way to generate a differente sessionID each time I start my application? Thanks - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands,
Re: tomcat temp directory
Hi David Thanks for further engaging this with me. Yes, I am creating the file in an Action, dropping it in the tmpdir and reading it with a jsp that calls a servlet that reads the parameters and displays. What I find odd is everything works perfectly when executed from localhost:8080... However fails when accessed from a domain setup to pass *.do, *.jsp through modjk to TC. I know for a fact, from the timestamp and opening the file that Action is creating the file correctly, the servlet is just not finding it...when accessed from a domain/modjk. But again it works, inscrutably, perfectly when accessed from localhost on the same server. I can even simultaneously switch between it succeeding on localhost and failing on domain multiple times with the same running instance of TC. Or is there a better way to create a tmpdir and random file under the webapp. I am loathe to do that as I want to keep it possible for the admin to just delete the files in the root \temp or make it a task. I dont want to get access into the webapp. David Smith [EMAIL PROTECTED] wrote: In the code below, let's just ignore the logic for the string 'tempdir' ... looks like noise to me as it isn't used in the creation of a file. The call to create the temp file looks good and should store it in the path specified by java.io.tmpdir. You can write out the system property to see where your files are going ... by default I think it's usually the system temp. My install of tomcat 5.5 as a service explicitly set's it to the temp directory within the tomcat folder. You can look for it in your .bat files by looking for -Djava.io.tmpdir= Could you expand on this image tag generation? Looks like you are attempting to generate a temp image in a jsp and keep it long enough to return it via servlet. Those are two separate requests (page and image) and it may already be gone by the time the client requests the image itself if that's the case. --David Chris Pat wrote: Hi Further I see in catalina.bat where it is setup and all the defaults are unchanged. This still does not explain why it is NOT putting the files in \temp and rather in just the root dir of the TC installation. I could explicitly force it, however that doesnt seem right. Chris Pat wrote: Hi Martin, David Thanks. Where/syntax to set the tmpdir? Below is the syntax I use and when run from local host it puts the files in the root tomcat directory, at the same level as the all the subdirectories. Even outside the webapp directory. However it is accessible. When I switch to accessing from a domain with modjk, TC cant find the file. The very same code that calls a servlet to populate a html img tag is blank, but the rest of the page renders correctly. I also found something claiming that TC configures its own tmp directory per webapp. Is that from the proper setting of CATALINA_TMPDIR in the server.xml? with what syntax? tia. String tempdir = System.getProperty(java.io.tmpdir); if (! (tempdir.endsWith(/) || tempdir.endsWith(\\))) { tempdir = tempdir + System.getProperty(file.separator); } File tempFile = null; try { tempFile = File.createTempFile(myFile, . + outputType); } catch (IOException ex2) { } - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
AW: jsp-output in wrong frames
David, thanks for your response. I will check the app regarding session scope objects. Regards, Norbert -Ursprüngliche Nachricht- Von: David Delbecq [mailto:[EMAIL PROTECTED] Gesendet: Montag, 4. Juni 2007 13:43 An: Tomcat Users List Betreff: Re: jsp-output in wrong frames En l'instant précis du 04/06/07 13:32, Norbert Hirneisen s'exprimait en ces termes: Hello list, We are using Apache Tomcat/5.5.17 with jvm 1.5.0_07-b03 on Linux Kernel 2.6.19.2-monolithic (suse) together with Apache2 using the httpd2-worker configuration. Tomcat is given 512-1024 MB Ram by java with permGemMem of 256 MB. The application is a struts-app using frames (top-left-main). All is working fine with two exceptions: First: Sometimes (every couple of days) the connection count is rising and after a while tomcat uses 99% of processor time. This occurs when spammers are trying to put spam in our discussion boards and the manipulated urls they are using are causing soem errors. Only solution is to kill the tomcat process - a graceful reload of tomcat isn´t possible any more. Most of the time after restarting tomcat all is working fine again but sometimes this doesn´t help: I have to reboot the server (IBM xS23ver x330, 2x1,1 GHz, 2 GB RAM). Strangely, these serious problems occur every 40-50 days. Fors this part, fix your struts form/action to not generate errors or ignore badly encoded urls Second: Sometimes the jsps were delivered in the wrong frames. The content is puzzled - randomly other parts of the application are showing in the frames. If I look at the frame information in Firefox the given Url is correct but the content doesn´t match the url. The is a most annoying thing for our customers (and us as well) and we would be very grateful for a suggestion. Load: about 3000 visits / 35.000 pageviews / 100.000 hits a day. Are the 2 or 3 frames generated using the same struts action / form ? I yes, check to make sure they are defined as request scope and not session scope. When you load several frames at same time, browser issues requests in parallel. If something in your code use a session level object without surrouding synchronization, you my have troubles, especially if the backing 'form' in struts you are using is session scoped. Thanks for your help. Norbert Regards, Norbert Norbert Hirneisen science4you Online-Monitoring http://www.science4you.org email: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] Please visit us: http://www.science4you.org (in German) Euro+Med Plant Conservation www.http://www.s2you.com/euromed/ http://www.http://www.s2you.com/euromed/ (in English) European Moth Night: www.falternacht.de http://www.falternacht.de (in German) Butterfly findings: www.falterfunde.de http://www.falterfunde.de (in German) Migratory butterflies and moths: www.s2you.com/platform/monitoring/ http://www.s2you.com/platform/monitoring/ (in German) Protected species by law in Germany http://www.wisia.de (in German) Red lists http://www.redlist.info (in German) Norbert Hirneisen Science Communications von-Müllenark-Str. 19 53179 Bonn phone +49-228-6194930 - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: I would like a new session each time I start my application
Elisabeth, 1) To see what the context tag looks like, see the server-example.xml file that ships with the Tomcat distribution. You're probably running under a minimal configuration that lets most items default. 2) That being said, I don't think its going to fix your problem to turn off session persistence. Even if you turn persistence off, you're not going to get a new session every time a user goes to index.html. Once a session is created, it remains in effect until it expires as a result of a configured inactivity-timeout or as a result of being deliberately invalidated by servlet code. You could use HttpSession.invalidate() to force it to expire, but I agree with Johnny and David - this really doesn't sound like a good way to accomplish the goal. I'd use one of the methods they described. Bobby celia05es wrote: Hi, Thanks for your quick answer When I say each time I run my application, I mean each time I start my application. Let's say my application is : $TOMCAT_HOME/webapps/my_app/index.html Each time I execute: $TOMCAT_HOME/webapps/my_app/index.html, I would like a new sessionID to be generated. You tell me to disable the session persistence in my app's context I suppose you mean the conf/server.xml, the conf/context.xml file? I had a look at the server.xml file And I have no Context tag? The context.xml file does not have a docBase mentioned in the context tag. What should I put in the docBase variable? docBase=$TOMCAT_HOME/webapps/my_app? Thanks Elisabeth -Original Message- From: Rashmi Rubdi [mailto:[EMAIL PROTECTED] Sent: sábado, 02 de junio de 2007 15:53 To: Tomcat Users List Subject: Re: I would like a new session each time I start my application On 6/1/07, Bachler, Elisabeth (Elisabeth) [EMAIL PROTECTED] wrote: Hi, I have an application that works under tomcat. Each time I run my application I have the same sessionID. Is there a way I guess you mean each time you (re)start Tomcat when you say Each time I run my application... You might be seeing the same sessionID because the session persistence. to generate a differente sessionID each time I start my application? Try disabling the session persistence in your app's Context. Context docBase=... Manager className=org.apache.catalina.session.PersistentManager saveOnRestart=false/ /Context Thanks I don't know if the above will work in all versions of Tomcat, but it should work on Tomcat 5.5.x or higher. Next time please mention the version of Tomcat and other relevant details. -Rashmi - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/I-would-like-a-new-session-each-time-I-start-my-application-tf3853422.html#a10951048 Sent from the Tomcat - User mailing list archive at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: I would like a new session each time I start my application
Thank you so much! -Original Message- From: kempo bob [mailto:[EMAIL PROTECTED] Sent: lunes, 04 de junio de 2007 16:40 To: users@tomcat.apache.org Subject: RE: I would like a new session each time I start my application Elisabeth, 1) To see what the context tag looks like, see the server-example.xml file that ships with the Tomcat distribution. You're probably running under a minimal configuration that lets most items default. 2) That being said, I don't think its going to fix your problem to turn off session persistence. Even if you turn persistence off, you're not going to get a new session every time a user goes to index.html. Once a session is created, it remains in effect until it expires as a result of a configured inactivity-timeout or as a result of being deliberately invalidated by servlet code. You could use HttpSession.invalidate() to force it to expire, but I agree with Johnny and David - this really doesn't sound like a good way to accomplish the goal. I'd use one of the methods they described. Bobby celia05es wrote: Hi, Thanks for your quick answer When I say each time I run my application, I mean each time I start my application. Let's say my application is : $TOMCAT_HOME/webapps/my_app/index.html Each time I execute: $TOMCAT_HOME/webapps/my_app/index.html, I would like a new sessionID to be generated. You tell me to disable the session persistence in my app's context I suppose you mean the conf/server.xml, the conf/context.xml file? I had a look at the server.xml file And I have no Context tag? The context.xml file does not have a docBase mentioned in the context tag. What should I put in the docBase variable? docBase=$TOMCAT_HOME/webapps/my_app? Thanks Elisabeth -Original Message- From: Rashmi Rubdi [mailto:[EMAIL PROTECTED] Sent: sábado, 02 de junio de 2007 15:53 To: Tomcat Users List Subject: Re: I would like a new session each time I start my application On 6/1/07, Bachler, Elisabeth (Elisabeth) [EMAIL PROTECTED] wrote: Hi, I have an application that works under tomcat. Each time I run my application I have the same sessionID. Is there a way I guess you mean each time you (re)start Tomcat when you say Each time I run my application... You might be seeing the same sessionID because the session persistence. to generate a differente sessionID each time I start my application? Try disabling the session persistence in your app's Context. Context docBase=... Manager className=org.apache.catalina.session.PersistentManager saveOnRestart=false/ /Context Thanks I don't know if the above will work in all versions of Tomcat, but it should work on Tomcat 5.5.x or higher. Next time please mention the version of Tomcat and other relevant details. -Rashmi - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/I-would-like-a-new-session-each-time-I-start-my-application-tf3853422.html#a10951048 Sent from the Tomcat - User mailing list archive at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: tomcat temp directory
I'm not sure what the impact of Tomcat is on this, but I've used syntax similar to this: try { File tf = File.createTempFile(pattern, .suffix); tf.deleteOnExit(); BufferedWriter out = new BufferedWriter(new FileWriter(tf)); out.write(This temporary file is deleted on close); out.close(); } catch (IOException e) { ... } HTH, Tim -Original Message- From: Chris Pat [mailto:[EMAIL PROTECTED] Sent: Monday, June 04, 2007 6:38 AM To: Tomcat Users List Subject: Re: tomcat temp directory Hi Further I see in catalina.bat where it is setup and all the defaults are unchanged. This still does not explain why it is NOT putting the files in \temp and rather in just the root dir of the TC installation. I could explicitly force it, however that doesnt seem right. Chris Pat [EMAIL PROTECTED] wrote: Hi Martin, David Thanks. Where/syntax to set the tmpdir? Below is the syntax I use and when run from local host it puts the files in the root tomcat directory, at the same level as the all the subdirectories. Even outside the webapp directory. However it is accessible. When I switch to accessing from a domain with modjk, TC cant find the file. The very same code that calls a servlet to populate a html img tag is blank, but the rest of the page renders correctly. I also found something claiming that TC configures its own tmp directory per webapp. Is that from the proper setting of CATALINA_TMPDIR in the server.xml? with what syntax? tia. String tempdir = System.getProperty(java.io.tmpdir); if (! (tempdir.endsWith(/) || tempdir.endsWith(\\))) { tempdir = tempdir + System.getProperty(file.separator); } File tempFile = null; try { tempFile = File.createTempFile(myFile, . + outputType); } catch (IOException ex2) { } Martin Gainty wrote: Hi Chris- did you set CATALINA_TMPDIR to your TOMCAT temp folder? M-- This email message and any files transmitted with it contain confidential information intended only for the person(s) to whom this email message is addressed. If you have received this email message in error, please notify the sender immediately by telephone or email and destroy the original message without making a copy. Thank you. - Original Message - From: Chris Pat To: Tomcat Sent: Sunday, June 03, 2007 10:02 PM Subject: tomcat temp directory Hello How do I configure and access a temporary directory in Tomcat5x? Oddly I am presently writing files I want to use immediately into java.io.tempdir and it works if I access the webapp from localhost. However fails when accessed from a domain. Within the Action/servlet how to I write/read the context specific temp directory? Is there a way to release the file lock that Tomcat will have on that file? I close all streams, but in previous primitive way it held the lock and I had to stop/restart TC. Any help along understanding this would be greatly appreciated. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: I would like a new session each time I start my application
I do not have any idea *why* you want to do this, but you can use session.invalidate() to guarantee the next request will have a new session ID. http://java.sun.com/j2ee/1.4/docs/api/javax/servlet/http/HttpSession.html#in validate() Tim -Original Message- From: Bachler, Elisabeth (Elisabeth) [mailto:[EMAIL PROTECTED] Sent: Monday, June 04, 2007 6:32 AM To: Tomcat Users List Subject: RE: I would like a new session each time I start my application The thing is that my application access a database. When the user wants to modify the db, I lock the access to this particular action (and let the user only view the data) using the sessionID. Now, if the user is bad... He can log on once and get the modify action... Then he can open a new screen and modify things again... Which is not what I need. Everytime a new screen is open to execute the application I need a different sessionID. Do you see what my problem is ? I don't know another way of doing it. -Original Message- From: Johnny Kewl [mailto:[EMAIL PROTECTED] Sent: lunes, 04 de junio de 2007 11:07 To: Tomcat Users List Subject: Re: I would like a new session each time I start my application Liz, please tell us what you actually doing and why you need this? I think there is a conceptual problem... - Original Message - From: Bachler, Elisabeth (Elisabeth) [EMAIL PROTECTED] To: users@tomcat.apache.org Sent: Friday, June 01, 2007 6:57 PM Subject: I would like a new session each time I start my application Hi, I have an application that works under tomcat. Each time I run my application I have the same sessionID. Is there a way to generate a differente sessionID each time I start my application? Thanks - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: tomcat temp directory
From: Chris Pat [mailto:[EMAIL PROTECTED] Subject: Re: tomcat temp directory Or is there a better way to create a tmpdir and random file under the webapp. Look at section 4.7.1 of the servlet spec: A temporary storage directory is required for each servlet context. Servlet containers must provide a private temporary directory for each servlet context, and make it available via the javax.servlet.context.tempdir context attribute. The objects associated with the attribute must be of type java.io.File. You can use the workDir attribute of the Context element if you don't like the default: http://tomcat.apache.org/tomcat-5.5-doc/config/context.html - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: tomcat temp directory
Hi Chuck Thanks. But how to I get at it programatically? Is workDir an actual context param that I can access and build a File from? Caldarale, Charles R [EMAIL PROTECTED] wrote: From: Chris Pat [mailto:[EMAIL PROTECTED] Subject: Re: tomcat temp directory Or is there a better way to create a tmpdir and random file under the webapp. Look at section 4.7.1 of the servlet spec: A temporary storage directory is required for each servlet context. Servlet containers must provide a private temporary directory for each servlet context, and make it available via the javax.servlet.context.tempdir context attribute. The objects associated with the attribute must be of type java.io.File. You can use the workDir attribute of the element if you don't like the default: http://tomcat.apache.org/tomcat-5.5-doc/config/context.html - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: tomcat temp directory
From: Chris Pat [mailto:[EMAIL PROTECTED] Subject: RE: tomcat temp directory But how to I get at it programatically? Is workDir an actual context param that I can access and build a File from? It's not a param, it's an attribute - read the servlet spec and the servlet API doc. Use the ServletContext.getAttribute() API to retrieve the value of javax.servlet.context.tempdir, and then create files within that directory as needed. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Trying to get Tomcat to run as a service..
Hello all I am trying to get my war file using Tomcat 5.5.17 running as a daemon. Currently, my /etc/init.d/tomcat file looks like this --- #!/bin/sh # # Startup script for the Jakarta Tomcat Java Servlets and JSP server # # chkconfig: - 85 15 # description: Jakarta Tomcat Java Servlets and JSP server # processname: tomcat # pidfile: /var/run/tomcat.pid # config: # Source function library. . /etc/rc.d/init.d/functions # Source networking configuration. . /etc/sysconfig/network # Check that networking is up. [ ${NETWORKING} = no ] exit 0 # Set Tomcat environment. export JAVA_HOME=/opt/java export CLASSPATH=.:/opt/java/lib/tools.jar:/opt/java/jre/lib/rt.jar export CATALINA_HOME=/opt/tomcat export CATALINA_OPTS=-server -Xms1024m -Xmx1024m -Dbuild.compiler.emacs=true export PATH=/opt/java/bin:/opt/java/jre/bin:$PATH [ -f /opt/tomcat/bin/startup.sh ] || exit 0 [ -f /opt/tomcat/bin/shutdown.sh ] || exit 0 export PATH=$PATH:/usr/bin:/usr/local/bin # See how we were called. case $1 in start) # Start daemon. echo -n Starting Tomcat: /opt/tomcat/bin/startup.sh RETVAL=$? echo [ $RETVAL = 0 ] # touch /var/lock/subsys/tomcat ;; stop) # Stop daemons. echo -n Shutting down Tomcat: /opt/tomcat/bin/shutdown.sh RETVAL=$? echo [ $RETVAL = 0 ] # rm -f /var/lock/subsys/tomcat ;; restart) $0 stop $0 start ;; condrestart) [ -e /var/lock/subsys/tomcat ] $0 restart ;; status) status tomcat ;; *) echo Usage: $0 {start|stop|restart|status} exit 1 esac exit 0 --- I have made slight adjustments catalina.sh --- CATALINA_OPTS=-Dework.home=/opt/prosource_conf -Dlog4j.configuration=file:///opt/prosource_conf/log4j.properties # - Execute The Requested Command - # Bugzilla 37848: only output this if we have a TTY if [ $have_tty -eq 1 ]; then echo Using CATALINA_BASE: $CATALINA_BASE echo Using CATALINA_HOME: $CATALINA_HOME echo Using CATALINA_TMPDIR: $CATALINA_TMPDIR echo Using CATALINA_OPTS: $CATALINA_OPTS if [ $1 = debug -o $1 = javac ] ; then echo Using JAVA_HOME: $JAVA_HOME else echo Using JRE_HOME: $JRE_HOME fi fi if [ $1 = jpda ] ; then if [ -z $JPDA_TRANSPORT ]; then JPDA_TRANSPORT=dt_socket fi if [ -z $JPDA_ADDRESS ]; then JPDA_ADDRESS=8000 fi if [ -z $JPDA_OPTS ]; then JPDA_OPTS=-Xdebug -Xrunjdwp:transport=$JPDA_TRANSPORT,address=$JPDA_ADDRESS,server=y,suspe nd=n fi CATALINA_OPTS=$CATALINA_OPTS $JPDA_OPTS shift fi if [ $1 = debug ] ; then if $os400; then echo Debug command not available on OS400 exit 1 else shift if [ $1 = -security ] ; then echo Using Security Manager shift exec $_RUNJDB $JAVA_OPTS $CATALINA_OPTS \ -Djava.endorsed.dirs=$JAVA_ENDORSED_DIRS -classpath $CLASSPATH \ -sourcepath $CATALINA_HOME/../../jakarta-tomcat-catalina/catalina/src/share \ -Djava.security.manager \ -Djava.security.policy==$CATALINA_BASE/conf/catalina.policy \ -Dcatalina.base=$CATALINA_BASE \ -Dcatalina.home=$CATALINA_HOME \ -Djava.io.tmpdir=$CATALINA_TMPDIR \ org.apache.catalina.startup.Bootstrap $@ start else exec $_RUNJDB $JAVA_OPTS $CATALINA_OPTS \ -Djava.endorsed.dirs=$JAVA_ENDORSED_DIRS -classpath $CLASSPATH \ -sourcepath $CATALINA_HOME/../../jakarta-tomcat-catalina/catalina/src/share \ -Dcatalina.base=$CATALINA_BASE \ -Dcatalina.home=$CATALINA_HOME \ -Djava.io.tmpdir=$CATALINA_TMPDIR \ org.apache.catalina.startup.Bootstrap $@ start fi fi elif [ $1 = run ]; then shift if [ $1 = -security ] ; then echo Using Security Manager shift exec $_RUNJAVA $JAVA_OPTS $CATALINA_OPTS \ -Djava.endorsed.dirs=$JAVA_ENDORSED_DIRS -classpath $CLASSPATH \ -Djava.security.manager \ -Djava.security.policy==$CATALINA_BASE/conf/catalina.policy \ -Dcatalina.base=$CATALINA_BASE \ -Dcatalina.home=$CATALINA_HOME \ -Djava.io.tmpdir=$CATALINA_TMPDIR \ org.apache.catalina.startup.Bootstrap $@ start else exec $_RUNJAVA $JAVA_OPTS $CATALINA_OPTS \ -Djava.endorsed.dirs=$JAVA_ENDORSED_DIRS -classpath $CLASSPATH \ -Dcatalina.base=$CATALINA_BASE \ -Dcatalina.home=$CATALINA_HOME \ -Djava.io.tmpdir=$CATALINA_TMPDIR \ org.apache.catalina.startup.Bootstrap $@ start fi elif [ $1 = start ] ; then echo -n HERE!! shift touch $CATALINA_BASE/logs/catalina.out if [ $1 = -security ] ; then echo Using Security Manager shift $_RUNJAVA $JAVA_OPTS
RE: tomcat temp directory
Hi Chuck Great. However may I ask the naive question? How do I get the servletContext within a method, within an Action. Do I have to pass in the request, and dig it out from there? tia. Caldarale, Charles R [EMAIL PROTECTED] wrote: From: Chris Pat [mailto:[EMAIL PROTECTED] Subject: RE: tomcat temp directory But how to I get at it programatically? Is workDir an actual context param that I can access and build a File from? It's not a param, it's an attribute - read the servlet spec and the servlet API doc. Use the ServletContext.getAttribute() API to retrieve the value of javax.servlet.context.tempdir, and then create files within that directory as needed. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: tomcat temp directory
From: Chris Pat [mailto:[EMAIL PROTECTED] Subject: RE: tomcat temp directory How do I get the servletContext within a method, within an Action. Assuming your code is part of a servlet, use the GenericServlet.getServletContext() method. If the servlet is hidden by some framework, you'll have to look at the doc for that to figure out how to retrieve the servlet object. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: comet read event
Hi Filip, Somehow I missed your response a while back. Below are two test clients and one comet servlet. One client works, and the other doesn't. I found out the failing client doesn't work because HttpURLConnection doesn't seem to allow writing to the output stream after the input stream has been requested (or at least I haven't figured out how to allow it). On the other hand, Filip cautioned me against using the client that works because it re-sends http headers with each request, which could potentially get received as data by the comet servlet. So... is there a way for me to use a single HttpURLConnection and be able to read and write multiple times on its input and output streams? I tried setting Transfer-Encoding to chunked, but couldn't get it to make a difference. I'd like to use HttpURLConnection instead of raw sockets to avoid having to manually handle the headers, redirects, proxies, etc. I realize this question is more java api specific than tomcat comet specific, but since many comet users might like to use HttpURLConnection, I thought it was still relevant here. Thanks for any help, Peter ### CometTestClient1.java - this test hangs since 2nd output on HttpURLConnection doesn't get sent ### import java.io.IOException; import java.io.InputStream; import java.io.PrintWriter; import java.net.HttpURLConnection; import java.net.URL; public class CometTestClient1 { private HttpURLConnection urlConn; private PrintWriter out; private URL url = new URL(http://127.0.0.1/CometTest;); public static void main(String[] args) throws Exception { CometTestClient1 test = new CometTestClient1(); test.test(); } public CometTestClient1() throws IOException { initConnection(); } private void initConnection() throws IOException { urlConn = (HttpURLConnection) url.openConnection(); urlConn.setDoInput(true); urlConn.setDoOutput(true); urlConn.connect(); out = new PrintWriter(urlConn.getOutputStream()); } public void test() throws IOException { out.println(test 1); out.flush(); String line = read(urlConn.getInputStream()); System.out.println(line); // next line never gets sent out -- presumably because the url connection // doesn't allow output after getInputStream has been called out.println(test 2); out.flush(); line = read(urlConn.getInputStream()); System.out.println(line); out.close(); urlConn.disconnect(); } private String read(InputStream is) throws IOException { StringBuffer inputBuffer = new StringBuffer(); byte[] buf = new byte[512]; do { int n = is.read(buf); // can throw an IOException if (n 0) { inputBuffer.append(new String(buf, 0, n)); } else if (n 0) { return (read error); } } while (is.available() 0); return inputBuffer.toString(); } } ### CometTestClient2.java - works but sends new http headers for each client output ### import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.io.PrintWriter; import java.net.HttpURLConnection; import java.net.URL; public class CometTestClient2 { private HttpURLConnection urlConn; private PrintWriter out; private URL url = new URL(http://127.0.0.1/CometTest;); public static void main(String[] args) throws Exception { CometTestClient2 test = new CometTestClient2(); test.test(); } public CometTestClient2() throws IOException { initConnection(); } private void initConnection() throws IOException { urlConn = (HttpURLConnection) url.openConnection(); urlConn.setDoInput(true); urlConn.setDoOutput(true); urlConn.connect(); out = new PrintWriter(urlConn.getOutputStream()); } public void test() throws IOException { out.println(test 1); out.flush(); BufferedReader in = new BufferedReader(new InputStreamReader(urlConn.getInputStream())); String line = in.readLine(); System.out.println(line); initConnection(); out.println(test 2); out.flush(); in = new BufferedReader(new InputStreamReader(urlConn.getInputStream())); line = in.readLine(); System.out.println(line); out.close(); urlConn.disconnect(); } } ### CometTestServlet ### import java.io.IOException; import java.io.InputStream; import javax.servlet.ServletException; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.apache.catalina.CometEvent; import org.apache.catalina.CometProcessor; public class CometTestServlet extends HttpServlet implements CometProcessor { private static final long
Re: comet read event
I doubt it works properly with the HttpUrlConnection, its better if you use a socket connection, as you have no idea how the underlying implementation works in HttpUrlConnection Filip Peter Warren wrote: Hi Filip, Somehow I missed your response a while back. Below are two test clients and one comet servlet. One client works, and the other doesn't. I found out the failing client doesn't work because HttpURLConnection doesn't seem to allow writing to the output stream after the input stream has been requested (or at least I haven't figured out how to allow it). On the other hand, Filip cautioned me against using the client that works because it re-sends http headers with each request, which could potentially get received as data by the comet servlet. So... is there a way for me to use a single HttpURLConnection and be able to read and write multiple times on its input and output streams? I tried setting Transfer-Encoding to chunked, but couldn't get it to make a difference. I'd like to use HttpURLConnection instead of raw sockets to avoid having to manually handle the headers, redirects, proxies, etc. I realize this question is more java api specific than tomcat comet specific, but since many comet users might like to use HttpURLConnection, I thought it was still relevant here. Thanks for any help, Peter ### CometTestClient1.java - this test hangs since 2nd output on HttpURLConnection doesn't get sent ### import java.io.IOException; import java.io.InputStream; import java.io.PrintWriter; import java.net.HttpURLConnection; import java.net.URL; public class CometTestClient1 { private HttpURLConnection urlConn; private PrintWriter out; private URL url = new URL(http://127.0.0.1/CometTest;); public static void main(String[] args) throws Exception { CometTestClient1 test = new CometTestClient1(); test.test(); } public CometTestClient1() throws IOException { initConnection(); } private void initConnection() throws IOException { urlConn = (HttpURLConnection) url.openConnection(); urlConn.setDoInput(true); urlConn.setDoOutput(true); urlConn.connect(); out = new PrintWriter(urlConn.getOutputStream()); } public void test() throws IOException { out.println(test 1); out.flush(); String line = read(urlConn.getInputStream()); System.out.println(line); // next line never gets sent out -- presumably because the url connection // doesn't allow output after getInputStream has been called out.println(test 2); out.flush(); line = read(urlConn.getInputStream()); System.out.println(line); out.close(); urlConn.disconnect(); } private String read(InputStream is) throws IOException { StringBuffer inputBuffer = new StringBuffer(); byte[] buf = new byte[512]; do { int n = is.read(buf); // can throw an IOException if (n 0) { inputBuffer.append(new String(buf, 0, n)); } else if (n 0) { return (read error); } } while (is.available() 0); return inputBuffer.toString(); } } ### CometTestClient2.java - works but sends new http headers for each client output ### import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.io.PrintWriter; import java.net.HttpURLConnection; import java.net.URL; public class CometTestClient2 { private HttpURLConnection urlConn; private PrintWriter out; private URL url = new URL(http://127.0.0.1/CometTest;); public static void main(String[] args) throws Exception { CometTestClient2 test = new CometTestClient2(); test.test(); } public CometTestClient2() throws IOException { initConnection(); } private void initConnection() throws IOException { urlConn = (HttpURLConnection) url.openConnection(); urlConn.setDoInput(true); urlConn.setDoOutput(true); urlConn.connect(); out = new PrintWriter(urlConn.getOutputStream()); } public void test() throws IOException { out.println(test 1); out.flush(); BufferedReader in = new BufferedReader(new InputStreamReader(urlConn.getInputStream())); String line = in.readLine(); System.out.println(line); initConnection(); out.println(test 2); out.flush(); in = new BufferedReader(new InputStreamReader(urlConn.getInputStream())); line = in.readLine(); System.out.println(line); out.close(); urlConn.disconnect(); } } ### CometTestServlet ### import java.io.IOException; import java.io.InputStream; import javax.servlet.ServletException; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import
Re: Tomcat Hogging CPU
John, I'm using 5.5.17. I'm actually not using it right now for the 15,000 visits per day site, though. I just develop these things and usually kick my clients off my server when their bandwidth gets too high. I remember lots of problems with 5.0 including race conditions like you've mentioned. I'm in the process of moving to 6.0, but am very cautious because 5.5 is so reliable. Omar [EMAIL PROTECTED] wrote: Omar: What version of Tomcat do you use? -- Original message -- From: Omar Eljumaily [EMAIL PROTECTED] What's your definition of a connection? Is it a session? I've had an average of about 300 active sessions which amounted to about 15,000 unique visits per day. This was on a machine with substantially less power than yours. We average 150 active connections per web server. What do others average? - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomcat 6 and AjaxAnywhere
I have an JSF Appfuse based app which uses AjaxAnywhere to perform search functions on certain JSPs. This worked fine in Tomcat 5.5, but since upgrading to version 6, my form fields seems to be no longer submitted and I get the following warning in the Tomcat log: 2007/06/04 08:36:36 org.apache.tomcat.util.http.Parameters processParameters WARNING: Parameters: Invalid chunk ignored. Any ideas/advice? -- View this message in context: http://www.nabble.com/Tomcat-6-and-AjaxAnywhere-tf3867094.html#a10955755 Sent from the Tomcat - User mailing list archive at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Jasper crashes with nullpointerexception
Very often, when precompiling JSP's that have custom tags in them with jasper2, the compiler will just crash with a nullpointerexception. I end up spending a lot of time trying to figure out what I've done wrong, because the compiler doesn't give any useful information. The mistakes are usually the kind of small, stupid mistakes that you'd expect a compiler to find, like misspelled names, etc., but the exception doesn't refer to anything in my code - it refers to something deep down in the stack of the compiler. Am I missing something here? Is there a reasonable way to find out what I've done wrong? Is there another compiler I can use that might provide better information? I'm running TC 5.5.23, using the ant jasper2 task to compile. I have tags that have embedded tags, some JSTL, some EL, some scriptlets. -- View this message in context: http://www.nabble.com/Jasper-crashes-with-nullpointerexception-tf3867615.html#a10957261 Sent from the Tomcat - User mailing list archive at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat 6 and AjaxAnywhere
I realized that the problem is actually being caused by the MyFaces upgrade I did from version 1.1.4 to 1.1.5 - it had nothing to do with Tomcat 6. The reason I suspected Tomcat 6 was that Tomcat 6 now logs warning about parameters, which Tomcat 5.5. didn't do. jvosloo wrote: I have an JSF Appfuse based app which uses AjaxAnywhere to perform search functions on certain JSPs. This worked fine in Tomcat 5.5, but since upgrading to version 6, my form fields seems to be no longer submitted and I get the following warning in the Tomcat log: 2007/06/04 08:36:36 org.apache.tomcat.util.http.Parameters processParameters WARNING: Parameters: Invalid chunk ignored. Any ideas/advice? -- View this message in context: http://www.nabble.com/Tomcat-6-and-AjaxAnywhere-tf3867094.html#a10957730 Sent from the Tomcat - User mailing list archive at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: tomcat temp directory
From: Chris Pat [mailto:[EMAIL PROTECTED] Subject: RE: tomcat temp directory Why however do I get null when I do the following? File tempDir = (File) sc.getAttribute(workDir); String tempDirStr = (String) sc.getAttribute(workDir); The attribute name for the API is javax.servlet.context.tempdir; the attribute name for the Context element in your Tomcat configuration is workDir. You've confused the two. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: tomcat temp directory
Hi Chuck Thankyou. Why however do I get null when I do the following? Should I be getting the context specific temp directory in the form of a directory or casted as a string? ServletContext sc = getServlet().getServletContext(); File tempDir = (File) sc.getAttribute(workDir); String tempDirStr = (String) sc.getAttribute(workDir); File tempFile = null; Caldarale, Charles R [EMAIL PROTECTED] wrote: From: Chris Pat [mailto:[EMAIL PROTECTED] Subject: RE: tomcat temp directory How do I get the servletContext within a method, within an Action. Assuming your code is part of a servlet, use the GenericServlet.getServletContext() method. If the servlet is hidden by some framework, you'll have to look at the doc for that to figure out how to retrieve the servlet object. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
context.xml locations and servlet mappings
Hi, I am experiencing a weird problem; when configuring my context in META-INF/context.xml, the servlet mappings stop working. I am trying to migrate web applications setup to run on Tomcat 5.0 to Tomcat 5.5 or 6. Currently one or more contexts are configured inside a host in server.xml. When I try moving these contexts in META-INF/context.xml, the servlet mappings in web.xml stop working and I can't figure out where the problem is. If I put the context back to server.xml, the mappings work fine and pages display correctly. Any help will be appreciated. web.xml ... servlet-mapping servlet-namemyServlet/servlet-name url-pattern*.html/url-pattern /servlet-mapping ... Server.xml Host name=hostname appBase=C:\projects\myApp .../ META-INF/context.xml Context path= docBase=html debug=0 privileged=true /Context Also tried Context docBase=html debug=0 privileged=true /Context The WEB-INF and META-INF are in C:\projects\myApp\html I am also not sure what is correct location for META-INF. Thanks, Ross This communication is intended solely for the addressee and is confidential and not for third party unauthorized distribution - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: context.xml locations and servlet mappings
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Ross, Angelov, Rossen wrote: META-INF/context.xml Context path= docBase=html debug=0 privileged=true Take out the path and docBase parameters. They are either illegal or ill-advised when using META-INF/context.xml. This might not be /the/ problem, but you should definitely remove those two attributes. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.7 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFGZIgZ9CaO5/Lv0PARAoQoAKCIs1myORR5N3hhQAaBcEsyOZmi6ACfXMrx HUvaShUKZFwX385E0A1dq98= =3Rfo -END PGP SIGNATURE- - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: context.xml locations and servlet mappings
Chris, This didn't help. Removing them is not generating errors, the servlet still loads on startup, but then the mapping don't work. It doesn't make sense to remove the path and the docBase. Especially the docBase, it specifies the Context Root. If it's empty, it probably uses the host appBase for root, but this is incorrect. I should be able to specify the context root. What about the cases when there are more than one contexts per host? The problem seems to be somewhere else, but thanks for the advise. Ross -Original Message- From: Christopher Schultz [mailto:[EMAIL PROTECTED] Sent: Monday, June 04, 2007 4:46 PM To: Tomcat Users List Subject: Re: context.xml locations and servlet mappings -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Ross, Angelov, Rossen wrote: META-INF/context.xml Context path= docBase=html debug=0 privileged=true Take out the path and docBase parameters. They are either illegal or ill-advised when using META-INF/context.xml. This might not be /the/ problem, but you should definitely remove those two attributes. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.7 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFGZIgZ9CaO5/Lv0PARAoQoAKCIs1myORR5N3hhQAaBcEsyOZmi6ACfXMrx HUvaShUKZFwX385E0A1dq98= =3Rfo -END PGP SIGNATURE- - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This communication is intended solely for the addressee and is confidential and not for third party unauthorized distribution - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: context.xml locations and servlet mappings
One META-INF/context.xml per Context is the intended usage. The appBase ../your/app/base should contain: .../app/base/ROOT/index.jsp .../app/base/ROOT/WEB-INF/web.xml .../app/base/ROOT/META-INF/context.xml .../app/base/Other/index.jsp .../app/base/Other/WEB-INF/web.xml .../app/base/Other/META-INF/context.xml for /index.jsp and /Other/index.jsp, where ROOT is the location for the default Context. p Angelov, Rossen wrote: Chris, This didn't help. Removing them is not generating errors, the servlet still loads on startup, but then the mapping don't work. It doesn't make sense to remove the path and the docBase. Especially the docBase, it specifies the Context Root. If it's empty, it probably uses the host appBase for root, but this is incorrect. I should be able to specify the context root. What about the cases when there are more than one contexts per host? The problem seems to be somewhere else, but thanks for the advise. Ross -Original Message- From: Christopher Schultz [mailto:[EMAIL PROTECTED] Sent: Monday, June 04, 2007 4:46 PM To: Tomcat Users List Subject: Re: context.xml locations and servlet mappings -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Ross, Angelov, Rossen wrote: META-INF/context.xml Context path= docBase=html debug=0 privileged=true Take out the path and docBase parameters. They are either illegal or ill-advised when using META-INF/context.xml. This might not be /the/ problem, but you should definitely remove those two attributes. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.7 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFGZIgZ9CaO5/Lv0PARAoQoAKCIs1myORR5N3hhQAaBcEsyOZmi6ACfXMrx HUvaShUKZFwX385E0A1dq98= =3Rfo -END PGP SIGNATURE- - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This communication is intended solely for the addressee and is confidential and not for third party unauthorized distribution - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] smime.p7s Description: S/MIME Cryptographic Signature
RE: context.xml locations and servlet mappings
Thank you for explaining about the META-INF location. Mine is following exactly the same pattern as you described, but still the servlet mappings are not functioning when using the META-INF/context.xml. Do you have any clues why this could be happening? The mappings work fine when inside the host element in server.xml. Ross -Original Message- From: Pid [mailto:[EMAIL PROTECTED] Sent: Monday, June 04, 2007 5:25 PM To: Tomcat Users List Subject: Re: context.xml locations and servlet mappings One META-INF/context.xml per Context is the intended usage. The appBase ../your/app/base should contain: .../app/base/ROOT/index.jsp .../app/base/ROOT/WEB-INF/web.xml .../app/base/ROOT/META-INF/context.xml .../app/base/Other/index.jsp .../app/base/Other/WEB-INF/web.xml .../app/base/Other/META-INF/context.xml for /index.jsp and /Other/index.jsp, where ROOT is the location for the default Context. p Angelov, Rossen wrote: Chris, This didn't help. Removing them is not generating errors, the servlet still loads on startup, but then the mapping don't work. It doesn't make sense to remove the path and the docBase. Especially the docBase, it specifies the Context Root. If it's empty, it probably uses the host appBase for root, but this is incorrect. I should be able to specify the context root. What about the cases when there are more than one contexts per host? The problem seems to be somewhere else, but thanks for the advise. Ross -Original Message- From: Christopher Schultz [mailto:[EMAIL PROTECTED] Sent: Monday, June 04, 2007 4:46 PM To: Tomcat Users List Subject: Re: context.xml locations and servlet mappings -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Ross, Angelov, Rossen wrote: META-INF/context.xml Context path= docBase=html debug=0 privileged=true Take out the path and docBase parameters. They are either illegal or ill-advised when using META-INF/context.xml. This might not be /the/ problem, but you should definitely remove those two attributes. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.7 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFGZIgZ9CaO5/Lv0PARAoQoAKCIs1myORR5N3hhQAaBcEsyOZmi6ACfXMrx HUvaShUKZFwX385E0A1dq98= =3Rfo -END PGP SIGNATURE- - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This communication is intended solely for the addressee and is confidential and not for third party unauthorized distribution - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This communication is intended solely for the addressee and is confidential and not for third party unauthorized distribution - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: context.xml locations and servlet mappings
Angelov, Rossen wrote: Thank you for explaining about the META-INF location. Mine is following exactly the same pattern as you described, but still the servlet mappings are not functioning when using the META-INF/context.xml. When you define a Context inside the Host, the path attribute is permitted. When you define a Context elsewhere the path attribute is not permitted, (as Chris explained), but the path is defined by the directory name, or the .war file name. ROOT is a special name for the default context, it's upper case and is the means used to define the default context. You can't define the default context using another name if you're using the recommended method of deploying a context. Hence my example below. p (p.s. just reply to the group, not me as well.) Do you have any clues why this could be happening? The mappings work fine when inside the host element in server.xml. Ross -Original Message- From: Pid [mailto:[EMAIL PROTECTED] Sent: Monday, June 04, 2007 5:25 PM To: Tomcat Users List Subject: Re: context.xml locations and servlet mappings One META-INF/context.xml per Context is the intended usage. The appBase ../your/app/base should contain: .../app/base/ROOT/index.jsp .../app/base/ROOT/WEB-INF/web.xml .../app/base/ROOT/META-INF/context.xml .../app/base/Other/index.jsp .../app/base/Other/WEB-INF/web.xml .../app/base/Other/META-INF/context.xml for /index.jsp and /Other/index.jsp, where ROOT is the location for the default Context. p Angelov, Rossen wrote: Chris, This didn't help. Removing them is not generating errors, the servlet still loads on startup, but then the mapping don't work. It doesn't make sense to remove the path and the docBase. Especially the docBase, it specifies the Context Root. If it's empty, it probably uses the host appBase for root, but this is incorrect. I should be able to specify the context root. What about the cases when there are more than one contexts per host? The problem seems to be somewhere else, but thanks for the advise. Ross -Original Message- From: Christopher Schultz [mailto:[EMAIL PROTECTED] Sent: Monday, June 04, 2007 4:46 PM To: Tomcat Users List Subject: Re: context.xml locations and servlet mappings -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Ross, Angelov, Rossen wrote: META-INF/context.xml Context path= docBase=html debug=0 privileged=true Take out the path and docBase parameters. They are either illegal or ill-advised when using META-INF/context.xml. This might not be /the/ problem, but you should definitely remove those two attributes. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.7 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFGZIgZ9CaO5/Lv0PARAoQoAKCIs1myORR5N3hhQAaBcEsyOZmi6ACfXMrx HUvaShUKZFwX385E0A1dq98= =3Rfo -END PGP SIGNATURE- - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This communication is intended solely for the addressee and is confidential and not for third party unauthorized distribution - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This communication is intended solely for the addressee and is confidential and not for third party unauthorized distribution - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] smime.p7s Description: S/MIME Cryptographic Signature
JDBCRealm with IP address filtering?
Has anyone come across an extension of JDBCRealm that allows users to be associated with an IP address and subnet mask as well as a password? Basically what I'm looking for is a way to restrict specific users to be able to log in from a specific IP address or address range, i.e. from work but not from home. Some users may still be able to log in from any address but some will be tied to specific IPs. This rules out using an IP Address Filter as the address(es) will depend on the user. I've trawled the mailing lists and Google but can't find anything and am thinking I'll have to resort to extending JDBCRealm to use two additional fields in the database to store an IP address and netmask for each user but figured I'd ask here first. Looking at the JDBCRealm code I'm not 100% sure that I'll be able to achieve this by extending the class. The request object containing the client IP address is not available to the authenticate() methods. I guess I might have to override hasResourcePermission() which does have access to the request and therefore the principal and IP address as well. Just not sure of the order in which these methods get called... time to experiment but if anyone has tried this before and has any tips or pointers I'd appreciate hearing from you. Thanks, Dean - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
virtual Hosts multiple IP's (one to one mapping)
I will hosting several domains on tomcat, and have configured each domain with it's own IP address through DNS, such that domain1.com, as well as www.domain1.com resolve to the ip address of the domain1. (I.e. multiple hosts for each domain on each IP address). I am trying to get tomcat to serve the appropriate website for each respective domain (by assigning docbases appropriately in server.xml - requests for www.domain.com, domain.com, anything.domain.com should all result in the domain.com welcome page displaying. Unfortunately I cant seem to get it working using Tomcat as a standalone webserver. (I am not forwarding requests through apache.) I configures the server as follows (server.xml): Service name=Catalina1 !-- 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 address=111.111.111.111 / Host name=localhost debug=0 appBase=webapps unpackWARs=true autoDeploy=true xmlValidation=false xmlNamespaceAware=false Context path= docBase=webapp1 debug=5 reloadable=true crossContext=true ... /service Service name=Catalina2 !-- 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 address=222.222.222.222 / Host name=localhost debug=0 appBase=webapps unpackWARs=true autoDeploy=true xmlValidation=false xmlNamespaceAware=false Context path= docBase=webapp2 debug=5 reloadable=true crossContext=true ... /service With the above configuration, domain1.com is returing the domain2.com site. It seems that the host configuration in service catalina2, is overriding the definition in catalina1, so tha even though the IP request is for www.domain1.com which resolves to IP 111.111.111.111, the webapp2 docbase is te one which is being served up. I dont want to define multiple hosts for each service, as I want to anything.domain1.com to return doamin1's welcome page. Does anyone have a solution for this? Looking for a deal? Find great prices on flights and hotels with Yahoo! FareChase. http://farechase.yahoo.com/ - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: virtual Hosts multiple IP's (one to one mapping)
Just found the answer: Hostname Aliases http://tomcat.apache.org/tomcat-5.0-doc/config/host.html#Host%20Name%20Aliases --- Mon Cab [EMAIL PROTECTED] wrote: I will hosting several domains on tomcat, and have configured each domain with it's own IP address through DNS, such that domain1.com, as well as www.domain1.com resolve to the ip address of the domain1. (I.e. multiple hosts for each domain on each IP address). I am trying to get tomcat to serve the appropriate website for each respective domain (by assigning docbases appropriately in server.xml - requests for www.domain.com, domain.com, anything.domain.com should all result in the domain.com welcome page displaying. Unfortunately I cant seem to get it working using Tomcat as a standalone webserver. (I am not forwarding requests through apache.) I configures the server as follows (server.xml): Service name=Catalina1 !-- 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 address=111.111.111.111 / Host name=localhost debug=0 appBase=webapps unpackWARs=true autoDeploy=true xmlValidation=false xmlNamespaceAware=false Context path= docBase=webapp1 debug=5 reloadable=true crossContext=true ... /service Service name=Catalina2 !-- 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 address=222.222.222.222 / Host name=localhost debug=0 appBase=webapps unpackWARs=true autoDeploy=true xmlValidation=false xmlNamespaceAware=false Context path= docBase=webapp2 debug=5 reloadable=true crossContext=true ... /service With the above configuration, domain1.com is returing the domain2.com site. It seems that the host configuration in service catalina2, is overriding the definition in catalina1, so tha even though the IP request is for www.domain1.com which resolves to IP 111.111.111.111, the webapp2 docbase is te one which is being served up. I dont want to define multiple hosts for each service, as I want to anything.domain1.com to return doamin1's welcome page. Does anyone have a solution for this? Looking for a deal? Find great prices on flights and hotels with Yahoo! FareChase. http://farechase.yahoo.com/ Get the free Yahoo! toolbar and rest assured with the added security of spyware protection. http://new.toolbar.yahoo.com/toolbar/features/norton/index.php - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]