RE: [5.5.9] Excessive jk INFO log msgs connection timeout reached
I got rid of this message when I realized that my AJP connector's configuration (in server.xml) had a connectionTimeout set. Try setting it bigger or simply removing it, which will default to 'no timeout'. Cheers, Jean-Marc -Original Message- From: Rick [mailto:[EMAIL PROTECTED] Sent: Wednesday, October 05, 2005 18:19 To: 'Tomcat Users List' Subject: [5.5.9] Excessive jk INFO log msgs connection timeout reached Anyone know the proper way to handle these messages? I get piles of them in catalina.out Oct 5, 2005 3:00:23 PM org.apache.jk.common.ChannelSocket processConnection INFO: connection timeout reached Tried adding the following line to the default catalina_home/common/classes/logging.properties org.apache.jk.common.ChannelSocket.level=WARN Has no effect. The only thing I have been able to find is people using Log4j instead of the default java.util.logging that came setup with Tomcat 5.5. Was wondering, is that the only way? If so, why does it work w/ Log4j and not the default java.util.logging? Looking at the source for 'org.apache.jk.common.ChannelSocket', the line reads... log.info( connection timeout reached); Should it not instead read... if(log.isInfoEnabled()) log.info( connection timeout reached); Anyway, thanks for any help to this. -Rick Gavin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [5.5.9] Excessive jk INFO log msgs connection timeout reached
I`m using Tomcat 5.0.30 / Apache 2.0.54 / JK 1.2.14.1 I looked a bit in the source of the Tomcat JK connector, and the 'connectionTimeout' parameter of the Connector is relayed to 'soTimeout' of the listening JK sockets ChannelSocket.java. ...which takes us to the java.net.Socket api and SO_TIMEOUT parameter. Seems to me that mod_jk in Apache keeps the connection opened, therefore never closing it and reusing it for future calls. If so, and if I set a connectionTimeout on the Tomcat JK connector, it would always close the connection with a TimeoutException. That would explain the log entries. I don't know, I'm just guessing because my system is not in production yet, but if I set my Tomcat connector to 'no timeout' and my Apache worker to socket_timeout=30 secs, wouldn't the sockets be recycled on both ends anyway when not active for 30 secs? My Apache workers.properties looks like: worker.tomcat1.port=8009 worker.tomcat1.host=localhost worker.tomcat1.type=ajp13 worker.tomcat1.cachesize=150 worker.tomcat1.cache_timeout=600 worker.tomcat1.recycle_timeout=300 worker.tomcat1.socket_timeout=30 worker.tomcat1.socket_keepalive=1 and I haven't had the log entry in Tomcat since I set the cache and timeouts in Apache. Hope it helps... Jean-Marc -Original Message- From: Rick [mailto:[EMAIL PROTECTED] Sent: Thursday, October 06, 2005 09:54 To: 'Tomcat Users List'; [EMAIL PROTECTED] Subject: RE: [5.5.9] Excessive jk INFO log msgs connection timeout reached Jean-Marc, Actually, without the connectionTimeout set, jk seems to hold on to its connections indefinitely and after a while, the apache to tomcat connection hangs (pages quit serving). Could you tell me which combo of versions you use for apache, jk, and tomcat. I'm trying to figure out what is the correct configuration. Or if you have a link to a guide, I have yet to find a best practices. Thanks, Rick -Original Message- From: Jean-Marc Marchand [mailto:[EMAIL PROTECTED] Posted At: Thursday, October 06, 2005 6:36 AM Posted To: Tomcat Dev Conversation: [5.5.9] Excessive jk INFO log msgs connection timeout reached Subject: RE: [5.5.9] Excessive jk INFO log msgs connection timeout reached I got rid of this message when I realized that my AJP connector's configuration (in server.xml) had a connectionTimeout set. Try setting it bigger or simply removing it, which will default to 'no timeout'. Cheers, Jean-Marc -Original Message- From: Rick [mailto:[EMAIL PROTECTED] Sent: Wednesday, October 05, 2005 18:19 To: 'Tomcat Users List' Subject: [5.5.9] Excessive jk INFO log msgs connection timeout reached Anyone know the proper way to handle these messages? I get piles of them in catalina.out Oct 5, 2005 3:00:23 PM org.apache.jk.common.ChannelSocket processConnection INFO: connection timeout reached Tried adding the following line to the default catalina_home/common/classes/logging.properties org.apache.jk.common.ChannelSocket.level=WARN Has no effect. The only thing I have been able to find is people using Log4j instead of the default java.util.logging that came setup with Tomcat 5.5. Was wondering, is that the only way? If so, why does it work w/ Log4j and not the default java.util.logging? Looking at the source for 'org.apache.jk.common.ChannelSocket', the line reads... log.info( connection timeout reached); Should it not instead read... if(log.isInfoEnabled()) log.info( connection timeout reached); Anyway, thanks for any help to this. -Rick Gavin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Problems mixin getReader and getParameter
According to the servlet's spec, the behavior of getParameter() is undefined if you consumed the payload first through getInputStream or getReader: If the parameter data was sent in the request body, such as occurs with an HTTP POST request, then reading the body directly via .getInputStream or .getReader can interfere with the execution of .getParameter method. Jean-Marc -Original Message- From: Mauricio Nuñez [mailto:[EMAIL PROTECTED] Sent: Tuesday, October 04, 2005 19:23 To: Tomcat Users List Subject: Problems mixin getReader and getParameter Hi all, I'm trying the following , with Tomcat 5.5.12 ( Also with 5.0.30 ) , and after reading the request.getReader(), the request.getParameter(param) is unusable, returning null. I'm trying setting a mark in the BufferedReader, but the result it's the same. Any hint? public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { String line=null; BufferedReader br = request.getReader(); br.mark(4096); while((line=br.readLine())!=null) { System.out.println(TBK:+line); } br.reset(); request.getRequestDispatcher(close).forward(request,response); } TIA Mauricio Nuñez - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
mod_jk performance
Hi, I just read an article about webapp benchmarks [1] and they mentioned that apache+mod_jk+tomcat is about 30% slower than pure tomcat. This is sad. Until now I believed that the performance decrease with apache/mod_jk would be marginal. Putting apache/mod_jk before tomcat is very nice. I don't want to miss it because it is a good way to integrate other modules. Is there any way to speed up apache/tomcat cooperation? Marc [1] (german only) http://www.heise.de/ix/artikel/2005/10/124/ _ FREE pop-up blocking with the new MSN Toolbar - get it now! http://toolbar.msn.click-url.com/go/onm00200415ave/direct/01/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Really struggling with DataSource'd Realm
Hello Alan, try removing the / in your jndi name java:comp/env/jdbc/family_tree. Thanks ! -Original Message- From: Alan Chandler [mailto:[EMAIL PROTECTED] Sent: Monday, August 29, 2005 10:57 AM To: tomcat-user@jakarta.apache.org Subject: Really struggling with DataSource'd Realm I am try to to use FORM based authorisation to control access to part of my database application. Consequently I have added the users and user_role tables to my database which is already been set up as java:/comp/env/jdbc/family_tree. I then created a Realm which refers to it. Realm className=org.apache.catalina.realm.DataSourceRealm debug=99 dataSourceName=java:/comp/env/jdbc/family_tree userTable=users userNameCol=user_name userCredCol=user_pass userRoleTable=user_roles roleNameCol=role_name/ As per the docs When I try and login I get a naming exception 2005-08-29 15:51:54 DataSourceRealm[/famtree]: Exception performing authentication javax.naming.NameNotFoundException: Name java: is not bound in this Context I have experimented with several strings for dataSourceName in the Realm tag above such as dropping the java: at the front, or removing the leading slash, or leaving out the frontf the string and just adding jdbc/family_tree, and even renaming the resource to just family_tree. In every case it seems to stop passing the name at the first delimeter (':' or '/') and failing. Is there something wrong with the DataSourceRealm in this version of tomcat (4.1.3) or am I doing something else wrong? Can somebody guide me through this please. -- Alan Chandler http://www.chandlerfamily.org.uk - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Really struggling with DataSource'd Realm
Than, did you try putting only jdbc/family_tree. The java:comp/env should be the default. -Original Message- From: Alan Chandler [mailto:[EMAIL PROTECTED] Sent: Monday, August 29, 2005 11:22 AM To: tomcat-user@jakarta.apache.org Subject: Re: Really struggling with DataSource'd Realm On Monday 29 Aug 2005 16:16, Marc-Andre Blain wrote: Hello Alan, try removing the / in your jndi name java:comp/env/jdbc/family_tree. Already tried that combination - this is the result - see how the name its looking for is just java: Exception performing authentication javax.naming.NameNotFoundException: Name java: is not bound in this Context userRoleTable=user_roles roleNameCol=role_name/ -- Alan Chandler http://www.chandlerfamily.org.uk - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Configure email catcher for dev and stage environments?
Dirk.Weigenand wrote: You could then set up another 'fake' smtp server that simply sends your messages to /dev/null or stores them locally for later inspection. Have a look at james: http://james.apache.org/ or dumbster: http://quintanasoft.com/dumbster/ thanks for the links. dumbster looks seems to be very interesting for unit testing as well. Marc. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Configure email catcher for dev and stage environments?
Hi, in dev and stage environments, we are working with real data but have to avoid that email are really sent to the users. Our current solution is that the code sending emails checks what the current environment is to know if it should really send the email to the specified address or to a special configured catch address. This is not really a clean solution and I was wondering how other are proceding? Is there a possibility to configure Tomcat to say that the provided mail Session should not really send the emails but catch them? Marc. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Implementing custom session expiration rule
I have a requirement to implement different session timeout values for different user roles. What would be the most straightforward way to accomplish this? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
:doSecurityJpda with Tomcat 5.0.x
Hi, i am trying to turn on Jpda AND securityManager on tomcat start without success. First it seems that its not possible to launch this configuration via parameters isnt it? I modified the catalina.bat so that it reaches the :doSecurityJpda label on startup. Of course i ve set the policy file manually right before the %_EXECJAVA Now i get: JDWP unable to access JVMDI Version 1. Maybe you need to start the VM with the -Xdebug option Error occured during initialisation of VM -Xrun library failed to init: jdwp Can someone help me on this? Is there an easy way via catalina parameters and if not, how to start such a configuration? Environment: Tomcat 5.0 latest, Windows, JRE 1.4.2_06 Thanks -- regards Marc Logemann http://www.logemann.org http://www.logentis.de - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: session load-balancing and clustering of tomcat
My gotcha was setting the jvmRoute in EACH/EVERY Engine! -Original Message- From: Lionel Farbos [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 01, 2005 8:20 AM To: Tomcat Users List Cc: [EMAIL PROTECTED] Subject: Re: session load-balancing and clustering of tomcat 1) In server.xml : - uncomment the AJP 1.3 Connector (on port 8009), - set the jvmRoute in each Engine example : Engine name=Standalone defaultHost=host1 debug=0 jvmRoute=t1_ajp13 2) then add the module mod_jk in apache with jk workers defined like this : worker.list=t1_ajp13,t2_ajp13,loadbalancer worker.t1_ajp13.type=ajp13 worker.t1_ajp13.host=host1 worker.t1_ajp13.port=8009 worker.t1_ajp13.lbfactor=1 worker.t1_ajp13.socket_timeout=5 worker.t1_ajp13.recycle_timeout=10 worker.t2_ajp13.type=ajp13 worker.t2_ajp13.host=host2 worker.t2_ajp13.port=8009 worker.t2_ajp13.lbfactor=1 worker.t2_ajp13.socket_timeout=5 worker.t2_ajp13.recycle_timeout=10 worker.loadbalancer.type=lb worker.loadbalancer.balanced_workers= t1_ajp13,t2_ajp13 then, you can load-balance your virtual host like this : JkMount /*.jsp loadbalancer 3) Conclusion : Thanks to mod_jk, you'll have load-balancing (with sticky sessions with JSESSION_ID like this : x.t1_ajp13 or y.t2_ajp13), and failover. This feature work with all tomcats (TC3.3-TC5) On Tue, 1 Mar 2005 18:08:59 +0800 Sng Wee Jim [EMAIL PROTECTED] wrote: Hi, I am using tomcat 5.0.28. My question is how to setup sticky-session load-balancing and clustering of tomcat? Do I need to upgrade to tomcat 5.5.X? Note the requirement is on sticky-session. - Jim - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomcat 5.5.4 not running stable (= pausing abruptly)
Hi folks, i am working with : - Redhat Linux 9.0 Kernel : 2.4.20-31.9smp - Java 1.5.0 (build 1.5.0-b64) - Tomcat 5.5.4 running on port 8008 and after launching the Tomcat webserver via the startup.sh script the server is quitting prematurely without any reason (no exceptions,..). logs/Catalina.out always says the following Dec 16, 2004 10:17:07 PM org.apache.coyote.http11.Http11Protocol pause after starting the server. Sometimes directly after launching the server, sometimes Tomcat is up for 9 hours or so. But not for any longer period of time. Why is Tomcat pausing and shutting down the server, or what am I getting wrong ? I've also already tried setting export LD_ASSUME_KERNEL=2.4.1 as described in the release-notes of Tomcat, before starting tomcat. Thanks in advance for your help, best regards Marc more detailed Info from logs/catalina.out Dec 16, 2004 10:16:12 PM org.apache.catalina.startup.Catalina start INFO: Server startup in 3884 ms Dec 16, 2004 10:17:07 PM org.apache.coyote.http11.Http11Protocol pause INFO: Pausing Coyote HTTP/1.1 on http-8008 Dec 16, 2004 10:17:08 PM org.apache.catalina.core.StandardService stop INFO: Stopping service Catalina Dec 16, 2004 10:17:08 PM org.apache.catalina.core.ApplicationContext log INFO: ContextListener: attributeReplaced('org.apache.catalina.WELCOME_FILES', ' Ljava.lang.String;@c3e9e9') Dec 16, 2004 10:17:08 PM org.apache.catalina.core.ApplicationContext log INFO: ContextListener: attributeReplaced('org.apache.catalina.WELCOME_FILES', ' Ljava.lang.String;@31f2a7') Dec 16, 2004 10:17:08 PM org.apache.catalina.core.ApplicationContext log INFO: ContextListener: attributeReplaced('org.apache.catalina.WELCOME_FILES', ' Ljava.lang.String;@131c89c') Dec 16, 2004 10:17:08 PM org.apache.catalina.core.ApplicationContext log INFO: SessionListener: contextDestroyed() Dec 16, 2004 10:17:08 PM org.apache.catalina.core.ApplicationContext log INFO: ContextListener: contextDestroyed() Dec 16, 2004 10:17:08 PM org.apache.catalina.core.ApplicationContext log INFO: ContextListener: attributeReplaced('org.apache.catalina.WELCOME_FILES', ' Ljava.lang.String;@1554d32') Dec 16, 2004 10:17:08 PM org.apache.catalina.core.ApplicationContext log INFO: ContextListener: attributeReplaced('org.apache.catalina.WELCOME_FILES', ' Ljava.lang.String;@13f136e') Dec 16, 2004 10:17:08 PM org.apache.catalina.core.ApplicationContext log INFO: ContextListener: attributeReplaced('org.apache.catalina.WELCOME_FILES', ' Ljava.lang.String;@14a18d') Dec 16, 2004 10:17:08 PM org.apache.catalina.core.ApplicationContext log INFO: SessionListener: contextDestroyed() Dec 16, 2004 10:17:08 PM org.apache.catalina.core.ApplicationContext log INFO: ContextListener: contextDestroyed() Dec 16, 2004 10:17:08 PM org.apache.coyote.http11.Http11Protocol destroy INFO: Stopping Coyote HTTP/1.1 on http-8008 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Session replication problem
Hi, I'm having problems with the tomcat 5.5 session replication. I've a cluster with three tomcats, one as central node, two as peers. The central node works fine, but whenever I access one of the peers I get the following exception: 06.12.2004 09:51:30 org.apache.catalina.cluster.tcp.ReplicationTransmitter sendMessageData WARNING: Unable to send replicated message, is server down? java.net.ConnectException: Connection refused: connect at java.net.PlainSocketImpl.socketConnect(Native Method) at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333) at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195) at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182) at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:364) ... Some things I already tried to solve the problem: - MCast Addr and Port are the same in every server.xml - Mcast seems to work, I had a simple Multicast Client listen on the address and got at least somedata. - distributable/ in the web.xml of my distributed webapps Could anyone give me a hint how to solve the problem? Thank you very much! Marc _ FREE pop-up blocking with the new MSN Toolbar - get it now! http://toolbar.msn.click-url.com/go/onm00200415ave/direct/01/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomcat 5.5.3 and JRE 1.5.0 on linux
Hi, i am feeling a little bit silly to ask, but i have to ;-) I installed JRE 1.5.0 and Tomcat 5.5.3 on linux, set the JAVA_HOME to the JRE location and started tomcat with ./catalina start Then i got the point to a JDK not a JRE error. I checked the setclasspath.sh and there is a paragraph that checks for javac and stuff. Do i miss something here? There must be some straightforward explanation for this, because i dont think the setclasspath.sh is from an old tomcat distro ;-) Thanks for infos on that. -- regards Marc Logemann http://www.logemann.org http://www.logentis.de - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat 5.5.3 and JRE 1.5.0 on linux
Remy Maucherat wrote: On Tue, 12 Oct 2004 21:32:51 +0200, Marc Logemann [EMAIL PROTECTED] wrote: Hi, i am feeling a little bit silly to ask, but i have to ;-) I installed JRE 1.5.0 and Tomcat 5.5.3 on linux, set the JAVA_HOME to the JRE location and started tomcat with ./catalina start Then i got the point to a JDK not a JRE error. I checked the setclasspath.sh and there is a paragraph that checks for javac and stuff. Do i miss something here? There must be some straightforward explanation for this, because i dont think the setclasspath.sh is from an old tomcat distro ;-) I think nobody updated the shell scripts yet (either for Unix or Windows). If you do hack them a little, it will work. Remy, thanks for pointing out. Of course its not very hard to do it, in fact i just removed the checks for javac and jdb and it runs like a charm. I somehow havent believed that the scripts are not updated yet and searched for the error on my site. -- regards Marc Logemann http://www.logemann.org http://www.logentis.de - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: horrible problems with TC4.1 under RedHat Advanced Server
Which JDK are you using? There is an incompatibility between jdk1.3 and redhat enterprise 3.0. -- Marc Boorshtein Sr. Software Engineer, Octet String [EMAIL PROTECTED] On Aug 1, 2004, at 5:34 PM, Peter Lin wrote: this is most definitely an issue with glibc, since I've seen it in the past on my machine. I've had it happen with Sun jvm and IBM jvm for redhat in the past. your best bet is to search the redhat mailing list for solutions to the problem. peter On Sun, 01 Aug 2004 10:54:51 -0700, David Rees [EMAIL PROTECTED] wrote: Steve Summit wrote, On 8/1/2004 6:22 AM: I've got a big, complicated web application (too complicated to go into the details of here), and I'm having problems moving from Red Hat 9 to Red Hat Advanced Server / Enterprise Server. (The move is for support reasons.) I suspect that there's some pernicious incompatibility between this version of Tomcat, this version of j2sdk, and the C libraries in these releases of RedHat. (When I built these machines, I think I had to manually install a C compatibility library to get Java to work at all.) There was a message to this list a month or so ago from Harald Henkel describing some similar-sounding problems, but it doesn't look like he got an answer. He mentioned setting LD_ASSUME_KERNEL to 2.4.1, and I'm going to try this, but it sounded like that only slightly ameliorated, but didn't fix, his problem. It's definitely some sort of JVM/OS issue, and not directly related to Tomcat. What glibc version are you running, are you running all errata for the system (up2date)? Also upgarde to the latest JDK, and finally, if it is still not stable, try a LD_ASSUME_KERNEL setting of 2.2.5. -Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Common/lib works shared/lib doesn't
I need some help trying to get a shared jar to work in shared/lib. I've searched the archives and found many posts with this issue but no fix. Win2k Tomcat 4.1.30 JDK 1.42_03 My webapps are based on a framework I developed that is contained within one jar. Up until now I have included this jar with every webapp where it resides in WEB-INF/lib. This works fine but is a pain to support because every change to the framework needs to be pushed to all apps. I would like to share this jar so only one update for all apps is necessary. When moving the jar to shared/lib I get a runtime CNFE on the Login.jsp. The class that can't be found is part of the jar that now resides in shared/lib. Initially I did not have CATALINA_BASE set. I played around with setting CATALINA_BASE and adding the jar to the classpath but nothing seems to work. I then moved the jar to common/lib and the app worked. Tomcat documentation clearly states that shared application code should reside in shared/lib not in common/lib. Should I try to resolve the shared/lib issue or is it OK to leave the jar in common/lib ? Thanks, Marc Wangenheim ** The content of this e-mail message and any attachments are confidential and may be legally privileged, intended solely for the addressee. If you are not the intended recipient, be advised that any use, dissemination, distribution, or copying of this e-mail is strictly prohibited. If you receive this message in error, please notify the sender immediately by reply email and destroy the message and its attachments. **
RE: Common/lib works shared/lib doesn't
OK I'll leave it in common/lib. The problem with WEB-INF/lib is that is takes too much time to update all webapps. We have a rather cumbersome environment. Each app has to go through four environments (development, integration, certification, production) before it is available to the customer. Hopping from one environment to the next can take up to two days each because after Sarbanes-Oxley all we developers have access to is development and that's it. Now imagine I have 30 apps using this jar. If I need to make a change to the jar it becomes a nightmare to deploy. Thanks for the help tho =) -Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED] Sent: Friday, June 11, 2004 9:56 AM To: Tomcat Users List Subject: RE: Common/lib works shared/lib doesn't Hi, It's OK to leave it in common/lib. (IMHO it's also fine to have a copy for each webapp in WEB-INF/lib, but you stated you don't want that). Yoav Shapira Millennium Research Informatics ** The content of this e-mail message and any attachments are confidential and may be legally privileged, intended solely for the addressee. If you are not the intended recipient, be advised that any use, dissemination, distribution, or copying of this e-mail is strictly prohibited. If you receive this message in error, please notify the sender immediately by reply email and destroy the message and its attachments. ** - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Problems with session handling, carts example (Tomcat 5) !!
Hi, I've real troubles with tomcat sessions. My tomcat server works well, version 4 and 5 (5.0.25), installed with windows installer. However, something is wrong with session information. I tried to run my own application and the carts example with Mozilla 1.6, MS IE 6.0 and Opera 7.23. The browsers accept cookies and my web.xml and server.xml are not changed. So in the carts example I cannot add items, only 1 is displayed when I add another item. I have Java SDK 1_4_2_04 installed. Thanks very, very much for help Marc Arnold
RE: Problems with session handling, carts example (Tomcat 5) !!
hi again, I've still this problem, however made an interesting discovery: the servlet example of tomcat about sessions works. There data can be stored within the session. Can anybody tell me how to fix this with jsp? Thanks a lot Marc -Ursprüngliche Nachricht- Von: Marc Arnold [mailto:[EMAIL PROTECTED] Gesendet: Freitag, 21. Mai 2004 11:49 An: [EMAIL PROTECTED] Betreff: Problems with session handling, carts example (Tomcat 5) !! Hi, I've real troubles with tomcat sessions. My tomcat server works well, version 4 and 5 (5.0.25), installed with windows installer. However, something is wrong with session information. I tried to run my own application and the carts example with Mozilla 1.6, MS IE 6.0 and Opera 7.23. The browsers accept cookies and my web.xml and server.xml are not changed. So in the carts example I cannot add items, only 1 is displayed when I add another item. I have Java SDK 1_4_2_04 installed. Thanks very, very much for help Marc Arnold - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
just ignore this messages: Problems with session handling, carts example (Tomcat 5) !!
hi, sorry for bothering, the firewall blocked all sessions efforts... tomcat works well, no problems anymore. thanks -Ursprüngliche Nachricht- Von: Marc Arnold [mailto:[EMAIL PROTECTED] Gesendet: Freitag, 21. Mai 2004 12:55 An: 'Tomcat Users List' Betreff: RE: Problems with session handling, carts example (Tomcat 5) !! hi again, I've still this problem, however made an interesting discovery: the servlet example of tomcat about sessions works. There data can be stored within the session. Can anybody tell me how to fix this with jsp? Thanks a lot Marc -Ursprüngliche Nachricht- Von: Marc Arnold [mailto:[EMAIL PROTECTED] Gesendet: Freitag, 21. Mai 2004 11:49 An: [EMAIL PROTECTED] Betreff: Problems with session handling, carts example (Tomcat 5) !! Hi, I've real troubles with tomcat sessions. My tomcat server works well, version 4 and 5 (5.0.25), installed with windows installer. However, something is wrong with session information. I tried to run my own application and the carts example with Mozilla 1.6, MS IE 6.0 and Opera 7.23. The browsers accept cookies and my web.xml and server.xml are not changed. So in the carts example I cannot add items, only 1 is displayed when I add another item. I have Java SDK 1_4_2_04 installed. Thanks very, very much for help Marc Arnold - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: FW: Server.xml/AccessLog question
Tim, Many thanks for replying. A custom pattern is what I figured I needed to do, but when I tried it in many combinations it errored on certain tags. I would ultimately like to get all fields so trying this worked for all values except the %{}i entries. pattern='%a %A %b %B %h %H %l %m %p %q %r %s %t %u %U %v %{Referer}i %{User-Agent}i' The log file logged everything fine except showed ???{???Referer} and ???{???User-Agent}. It is like it doesn't recognize { as a proper property. But when I actually spell out the 'combined' string like this: pattern='%h %l %u %t %r %s %b %{Referer}i %{User-Agent}i' The log file is fine. So I tried adding in just the %v to the combined tag like this: pattern='%h %l %u %t %r %s %b %v %{Referer}i %{User-Agent}i' And then the log file showed all % properties ok but gave me the same errors: ???{???Referer} It seems that using %{Referer}i with any combination other than the 'combined' string will fail to log it properly. At the very least we need to be able to log %v and %{Referer}. Is anyone doing anything similar? Regards, Marc S. Web Content Editor CSA Travel Protection -Original Message- From: Tim Funk [mailto:[EMAIL PROTECTED] Sent: Thursday, May 20, 2004 5:00 AM To: Tomcat Users List Subject: Re: FW: Server.xml/AccessLog question You should be able to use a custom pattern in 4.0 (or better). But pattern=combined %v is incorrect. You need to explictily specify all the fields. (As in the javadocs or Vavle docs which talks about accesslogvalve) -Tim Marc X. Schroeder wrote: Hi, I need to be able to customize my access_log file which is defined in server.xml. Were using tomcat 4.0. I have been using Valve className=org.apache.catalina.valves.AccessLogValve directory=c:\logs\tomcat prefix=localhost_access_log. suffix=.txt pattern=combined/ But I also need to be able to track the %v option as well. When I do this Valve className=org.apache.catalina.valves.AccessLogValve directory=c:\logs\tomcat prefix=localhost_access_log. suffix=.txt pattern=combined %v/ I get this logged combined dev.csatravelprotection.com -or with other configurations - ???{???Referer}i dev.csatravelprotection.com I need to be able to log all of the combined properties and the Local server name to the same log entry. I have tried many combinations with no success. I have also poured over documentation for days before sending this email. Does anyone have any ideas what I'm doing wrong? Also is this the correct email to post questions? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
FW: Server.xml/AccessLog question
Hi, I need to be able to customize my access_log file which is defined in server.xml. Were using tomcat 4.0. I have been using Valve className=org.apache.catalina.valves.AccessLogValve directory=c:\logs\tomcat prefix=localhost_access_log. suffix=.txt pattern=combined/ But I also need to be able to track the %v option as well. When I do this Valve className=org.apache.catalina.valves.AccessLogValve directory=c:\logs\tomcat prefix=localhost_access_log. suffix=.txt pattern=combined %v/ I get this logged combined dev.csatravelprotection.com -or with other configurations - ???{???Referer}i dev.csatravelprotection.com I need to be able to log all of the combined properties and the Local server name to the same log entry. I have tried many combinations with no success. I have also poured over documentation for days before sending this email. Does anyone have any ideas what I'm doing wrong? Also is this the correct email to post questions? Regards, Marc S. Web Content Editor CSA Travel Protection
Re: ActiveDirectory and JNDI LDAP Realm
The active directory equivalent of uid in LDAP is samAccountName (which is what user's type to log into a windows workstation). -- Marc Boorshtein Sr. Software Engineer, Octet String [EMAIL PROTECTED] On Apr 29, 2004, at 8:25 PM, Chong Yu Meng wrote: Hi Paulo ! What is the Active Directory equivalent of uid in LDAP ? I had the same problem as you previously, when I was preparing material for a Novell eDirectory course. The canonical method of structuring the directory (at least in my part of the world) was to use the CN (like your ActiveDirectory example). I have a write-up on this at : http://cymulacrum.net/writings/adv_tomcat/c487.html I suppose if you substitute the Active Directory equivalent for UID, you should be able to get it to work. Hope this helps! Regards, pascal chong Paulo Alvim wrote: Hi! Is there anyone using MS ActiveDirectory with Tomcat 5? I could authenticate using: Realm className=org.apache.catalina.realm.JNDIRealm debug=99 connectionURL=ldap://plcbhdc:389; userPattern=cn={0},cn=Users,dc=powerlogic roleBase=cn=Users,dc=powerlogic roleName=memberOf roleSearch=(distinguishedName={0}) / ...but I had to use the full name (ex: Bill Gates) instead of the login (ex: gates). So I tried to use: Realm className=org.apache.catalina.realm.JNDIRealm debug=99 connectionURL=ldap://plcbhdc:389; userBase=cn=Users,dc=powerlogic userSearch=(sAMAccountName={0}) userSubtree=true roleBase=cn=Users,dc=powerlogic roleName=memberOf roleSearch=(distinguishedName={0}) / ... with lots of userSearch attributes such as userPrincipalName, givenName, etc.. but It didn't work. I'm using the default ActiveDirectory installation... Any help? Thanks in advance! Paulo Alvim -Mensagem original- De: Chong Yu Meng [mailto:[EMAIL PROTECTED] Enviada em: domingo, 18 de abril de 2004 12:59 Para: Tomcat Users List Assunto: [spam] Re: Authentification against NT Domain Controller Hi Frank ! I seem to remember ActiveDirectory being discussed here, on this mailing list. The good thing about ActiveDirectory is that, if you do not have an overly complicated schema, you can use the LDAP subset to query the directory (you need to do a fair bit of tweaking to get ActiveDirectory to output results in LDAP-compliant format though. I'm not an expert on ActiveDirectory, so I really cannot advise you on this). If you're using Windows NT as the PDC, I think you can't get the Tomcat realm to work with it (Please, somebody, tell me otherwise!). As for writing your own Realm implementation, unless you are a really seasoned programmer, this can be a very daunting task. An easier way is to download and look at SecurityFilter. The example webapp has source code that you can look at, and not get confused by it. I highly recommend this to implementing your own realm. However, this still does not address the problem of extracting user credentials from a PDC. There is another solution : use Novell's DirXML product to do a periodic sync of data in Active Directory or NTLM into an LDAP directory, then use the JNDI realm in Tomcat. This is not a free solution, and it does require you to read up on another product, but this product is also very good for syncing data between different directories (OpenLDAP, Netscape Directory Server, Novell eDirectory, even flat files). Hope this helps ! Frank Schaare wrote: Hi, we´re building an Intranet application running on Tomcat 4.1.30 (Client OS is Win2K). It would be very suitable to authentificate the users against the NT Domain Controller to avoid a second login. I searched this ML and Google but did not find very much about this theme. There is a SourceForce Project called NTDCRealm which seems to fit our needs, but has absolutely no documentation. Probably, we need to nest a custom NTDCRealm Tag in our WebApp context. To learn, how to do this, i searched the Tomcat documentation (http://jakarta.apache.org/tomcat/tomcat-4.1-doc/realm- howto.html#Standard%2 0Realm%20Implementations) and again, there is a gap: It is also possible to write your own Realm implementation, and integrate it with Tomcat 4. However, doing this is beyond the scope of this document. See (FIXME - reference to developer stuff) for more information. Here are my questions: Does this reference to developer stuff exist anywhere ? Does anyone ever made the NTDCRealm to work ? Does anyone knows another (documentatet) Implementation of NT authentification ? Any hints, links, documents about this theme are warmly welcome. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- A complex system that works is invariably found to have evolved from a simple system that works
How to really destroy a Session
Hi all, I am using Tomcat 5.0.19. In my application the generated sessions are identified by a cookie on the client. I only allow single sign on. Now I want to destroy the session and I call in a session an invalidate() and the session isn't available. Then the application redirect the request to the start page. But there is still the cookie with JSESSIONID on the client and there is no new session possible. Is there a solution to remove these cookies? Thanks, Marc - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Antwort: RE: How to really destroy a Session
I have tested some other cases: We have a SessionListener who sets a flag of the user to logout out, when there is a session invalidate. Now it seems that the session.invalidate() don't calls the listener in Tomcat 5.0. is this possible? Thanks, Marc Mike Curwen [EMAIL PROTECTED] An: 'Tomcat Users List' [EMAIL PROTECTED] m Kopie: Thema: RE: How to really destroy a Session 16.04.04 15:56 Bitte antworten an Tomcat Users List The cookie is removed when the user closes the browser, no ? -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Friday, April 16, 2004 8:34 AM To: [EMAIL PROTECTED] Subject: How to really destroy a Session Hi all, I am using Tomcat 5.0.19. In my application the generated sessions are identified by a cookie on the client. I only allow single sign on. Now I want to destroy the session and I call in a session an invalidate() and the session isn't available. Then the application redirect the request to the start page. But there is still the cookie with JSESSIONID on the client and there is no new session possible. Is there a solution to remove these cookies? Thanks, Marc - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Antwort: Re: Logout-Problem
Paul Mansfield [EMAIL PROTECTED] An: Tomcat Users List [EMAIL PROTECTED] europe.comKopie: Thema: Re: Logout-Problem 13.04.04 10:42 Bitte antworten an Tomcat Users List On Tue, 2004-04-13 at 09:54, [EMAIL PROTECTED] wrote: In our application the user has to log in. When he wants to log out in a servlet I call session.invalidate() to kill the session and redirects to the login page. The session is definitly not existing anymore, but the user can't login until a timeout. When I disable cookies on the client, everything works fine. So it seems that there is any information in the cookie that is not totally removed. I presume you're using forms/session authentication. We are using in some parts of the application struts. do you have any local session data which you can set to null? No do you create a cookie yourself on the client, whose timeout you can set to 1 second and thus force it to expire? No if you're using opera, there's bugs in its cookie handling, especially when you set the privacy to a high level. We are only using Mozilla IE. Thanks Marc - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Logout-Problem
Hello All, I have got 2 machines (Tomcat 5.0 Apache 2.0) connected with mod_jk2. In our application the user has to log in. When he wants to log out in a servlet I call session.invalidate() to kill the session and redirects to the login page. The session is definitly not existing anymore, but the user can't login until a timeout. When I disable cookies on the client, everything works fine. So it seems that there is any information in the cookie that is not totally removed. Any suggestions? Thanks Regards Marc - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
mod_jk2 , apache2 charset-Problem
Hello all, I have a tomcat 5.0.18 (on a windows system) connected to an apache 2 webserver (on Linux system) with the mod_jk2. Everything works fine but if I have in my JSP some special characters like the german umlaut (ä,ö,ü,...) the apache shows these chars as a ?. If I go directly to the tomcat (on port 8080) it is showed es expected. I had a look in the header and it seems the the apache sets always the charset to utf-8 although the tomcat sets it to iso-8859-1. Is this a known problem and is there a solution? thanks in advance Marc - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
hello
what does it mean? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
JNI?
I have a bean which relies on a native dll (win32). When a page using the bean attempts to use one of the native methods, the page fails org.apache.jasper.JasperException: loadBook at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:254) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241) I'm assuming the dll is just not being found since the bean works fine from a command line java app. Where would the correct place to put that dll be? Or even better, anyone know of any documentation/articles about using JNI with tomcat? (I read in digest mode, please reply-to-all, thanks) Thanks, -Marc - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
scope order of initialization of variabes includes
I have the following situation: Page1.jsp: jsp:useBean id=bandbg scope=request class=java.lang.String / % bandbg = ok; % First page: %= bandbg % jsp:include page=page2.jsp / Page2.jsp: jsp:useBean id=bandbg scope=request class=java.lang.String / BRSecond page: %= bandbg % Viewing page1.jsp I get the output: First page: ok Second page: I thought I should get the output: First page: ok Second page: ok I've tried with application session scope too. I'm assuming I'm just misunderstanding how things work. Maybe tomcat starts processing includes before it processes the page or something? Any comments? Thanks -Marc - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: scope order of initialization of variabes includes
Ah.. figured it out... % bandbg = ok; % is like % bandbg = new String(ok); % I wasn't setting a string, I was creating a new one... doh. Thanks anyways! -Marc Marc Hughes wrote: I have the following situation: Page1.jsp: jsp:useBean id=bandbg scope=request class=java.lang.String / % bandbg = ok; % First page: %= bandbg % jsp:include page=page2.jsp / Page2.jsp: jsp:useBean id=bandbg scope=request class=java.lang.String / BRSecond page: %= bandbg % Viewing page1.jsp I get the output: First page: ok Second page: I thought I should get the output: First page: ok Second page: ok I've tried with application session scope too. I'm assuming I'm just misunderstanding how things work. Maybe tomcat starts processing includes before it processes the page or something? Any comments? Thanks -Marc - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
More than one error page 404?
Hi, I have a general purpose 404 error page configured in the web.xml but in some cases I want to return an other page with the error code 404. Is it possible? It seems to me that as soon as I set the response code to 404, Tomcat discards the current response and sends the 404 error page configured in the web.xml. Marc. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomcat5 and url tracking hijacking
Does tomcat 5 use some kind of mechanism to prevent session hijacking when url session tracking is being used? For instance, if someone posts a url to a website with the tracking info in it, will anyone clicking on that link pick up the original user's session (assuming it didn't time out yet)? If it does prevent this, how? If anyone knows of any articles about keeping sessions safe, I'd love to get pointed to those. Thanks, -Marc - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat5 and url tracking hijacking
I don't see how https would help. Someone posting a url to a newsgroup along the lines of either of these https://somesite/jsessionid=94823904823908432098 http://somesite/jsessionid=94823904823908432098 would still hijack the session, no? Could you elaborate on how ssl would help? Cookie hijacking is far less likely since a user is very unlikely to post their cookie data somewhere. An attacker would have to guess the sessionID. The sessionID is securely generated so it can't easily be predicted before hand (right?). I'm sure preventing multiple people from using the same session ID if the url is emailed or posted is something lots of people would like to prevent. I would assume there are good ways of handling it and I'd rather not reinvent the wheel. Are there any best-practices or design patterns to guide someone? Maybe restricting url tracking people to a certain ip range, or within a certain tolerance of other info they send back (browser, some other signature, etc.)? Thanks, -Marc Subject: Re: Tomcat5 and url tracking hijacking From: Tim Funk [EMAIL PROTECTED] Date: Tue, 27 Jan 2004 09:41:27 -0500 To: Tomcat Users List [EMAIL PROTECTED] yeah - you'd get that users session. Same problem with cookie hijacking. Use https. There is nothing defined by the spec to prevent this. (Except https) -Tim Marc Hughes wrote: Does tomcat 5 use some kind of mechanism to prevent session hijacking when url session tracking is being used? For instance, if someone posts a url to a website with the tracking info in it, will anyone clicking on that link pick up the original user's session (assuming it didn't time out yet)? If it does prevent this, how? If anyone knows of any articles about keeping sessions safe, I'd love to get pointed to those. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Possible to disable session persistence at shutdown?
Hi, is there a possibility to disable the session persistence performed by Tomcat (4 and 5) when shutting down? I'm not interested in this feature and it reports many exceptions as my objects stored in session scope aren't serializable. Marc. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Session ID's
I'm curious, will a tomcat instance ever create duplicate session ID's? And I mean *ever*, so if I run a server for 5 years (with multiple reboots, etc.) will I ever get a duplicate session ID? If so what's the frequency it would happen? Every million, billion, 10 trillion? Does the situation change if I have a cluster of tomcat servers? Thanks! -Marc - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Unable to compile class for JSP
Tomcat 5.0.16 I keep getting this error about every 20 to 25 requests for various pages. Sometimes I can simply send another request and it will compile, and other times it will consistently throw this exception: 2003-12-15 17:31:05,348 [http8080-Processor23] ERROR org.apache.struts.taglib.tiles.InsertTag - ServletException in '/note/edit/deed_of_trust.jsp': tmpFile. renameTo(classFile) failed org.apache.jasper.JasperException: Unable to compile class for JSP at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:5 58) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:2 91) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248) at javax.servlet.http.HttpServlet.service(HttpServlet.java:856) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application FilterChain.java:284) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh ain.java:204) at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher. java:742) at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatch er.java:630) at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher .java:542) at org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:1 002) at org.apache.jasper.runtime.PageContextImpl.include(PageContextImpl.java:626) at org.apache.struts.tiles.TilesUtilImpl.doInclude(TilesUtilImpl.java:144) at org.apache.struts.tiles.TilesUtil.doInclude(TilesUtil.java:180) at org.apache.struts.taglib.tiles.InsertTag.doInclude(InsertTag.java:801) at org.apache.struts.taglib.tiles.InsertTag$InsertHandler.doEndTag(InsertTag.ja va:933) at org.apache.struts.taglib.tiles.InsertTag.doEndTag(InsertTag.java:503) at org.apache.jsp.lib.template_jsp._jspx_meth_tiles_get_1(template_jsp.java:201 ) at org.apache.jsp.lib.template_jsp._jspService(template_jsp.java:123) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:133) at javax.servlet.http.HttpServlet.service(HttpServlet.java:856) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:3 11) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248) at javax.servlet.http.HttpServlet.service(HttpServlet.java:856) It appears that Tomcat is unable to rename the .classtmp to .class. Any thoughts? Thanks. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Unable to compile class for JSP [SOLUTION]
http://www.mail-archive.com/[EMAIL PROTECTED]/msg101489.html -Original Message- From: Marc Dugger [mailto:[EMAIL PROTECTED] Sent: Monday, December 15, 2003 6:09 PM To: [EMAIL PROTECTED] Subject: Unable to compile class for JSP Tomcat 5.0.16 I keep getting this error about every 20 to 25 requests for various pages. Sometimes I can simply send another request and it will compile, and other times it will consistently throw this exception: 2003-12-15 17:31:05,348 [http8080-Processor23] ERROR org.apache.struts.taglib.tiles.InsertTag - ServletException in '/note/edit/deed_of_trust.jsp': tmpFile. renameTo(classFile) failed org.apache.jasper.JasperException: Unable to compile class for JSP at org.apache.jasper.JspCompilationContext.compile(JspCompilationCont ext.java:5 58) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrap per.java:2 91) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248) at javax.servlet.http.HttpServlet.service(HttpServlet.java:856) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(A pplication FilterChain.java:284) at org.apache.catalina.core.ApplicationFilterChain.doFilter(Applicati onFilterCh ain.java:204) at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationD ispatcher. java:742) at org.apache.catalina.core.ApplicationDispatcher.doInclude(Applicati onDispatch er.java:630) at org.apache.catalina.core.ApplicationDispatcher.include(Application Dispatcher .java:542) at org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibr ary.java:1 002) at org.apache.jasper.runtime.PageContextImpl.include(PageContextImpl. java:626) at org.apache.struts.tiles.TilesUtilImpl.doInclude(TilesUtilImpl.java:144) at org.apache.struts.tiles.TilesUtil.doInclude(TilesUtil.java:180) at org.apache.struts.taglib.tiles.InsertTag.doInclude(InsertTag.java:801) at org.apache.struts.taglib.tiles.InsertTag$InsertHandler.doEndTag(In sertTag.ja va:933) at org.apache.struts.taglib.tiles.InsertTag.doEndTag(InsertTag.java:503) at org.apache.jsp.lib.template_jsp._jspx_meth_tiles_get_1(template_js p.java:201 ) at org.apache.jsp.lib.template_jsp._jspService(template_jsp.java:123) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:133) at javax.servlet.http.HttpServlet.service(HttpServlet.java:856) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrap per.java:3 11) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248) at javax.servlet.http.HttpServlet.service(HttpServlet.java:856) It appears that Tomcat is unable to rename the .classtmp to .class. Any thoughts? Thanks. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: login page css not applied
I just did this same thing yesterday. Your CSS and images are being protected by the web resource containing url-pattern/*/url-pattern. Until a user has logged in, they won't be able to receive images, css, etc. Be more specific in your URL pattern so you don't include those common resources. -Original Message- From: Chaikin, Yaakov Y (US SSA) [mailto:[EMAIL PROTECTED] Sent: Monday, December 08, 2003 12:06 PM To: [EMAIL PROTECTED] Subject: login page css not applied Hi, I have a problem where the login page is not showing any images and not having the css applied to it. Here is my web.xml: --- web-app servlet servlet-nameController/servlet-name servlet-classcorej2ee.web.Controller/servlet-class init-param param-namecorej2ee.web.navigation.class/param-name param-valuecorej2ee.web.EnvEntryNavigator/param-value /init-param /servlet servlet-mapping servlet-nameController/servlet-name url-pattern/*.jsp/url-pattern /servlet-mapping welcome-file-list welcome-filewelcome.jsp/welcome-file welcome-fileindex.html/welcome-file /welcome-file-list resource-ref res-ref-namejdbc/afecWEBDB/res-ref-name res-typejavax.sql.DataSource/res-type res-authContainer/res-auth /resource-ref security-constraint web-resource-collection web-resource-nameRegular and Power User/web-resource-name url-pattern/*/url-pattern /web-resource-collection auth-constraint role-nameRegularUser/role-name role-namePowerUser/role-name role-nameAdministrator/role-name /auth-constraint user-data-constraint transport-guaranteeNONE/transport-guarantee /user-data-constraint /security-constraint security-constraint web-resource-collection web-resource-nameAdministrator/web-resource-name url-pattern/admin/*/url-pattern /web-resource-collection auth-constraint role-nameAdministrator/role-name /auth-constraint user-data-constraint transport-guaranteeNONE/transport-guarantee /user-data-constraint /security-constraint login-config auth-methodFORM/auth-method form-login-config form-login-page/login.jsp/form-login-page form-error-page/loginError.html/form-error-page /form-login-config /login-config env-entry env-entry-nameroute/welcomePage/success/env-entry-name env-entry-value/welcome.jsp/env-entry-value env-entry-typejava.lang.String/env-entry-type /env-entry /web-app My images are under images folder in the root of the application and my css in under css folder in the root of my application. The webpage is referencing css, for example, like this: link href=css/background.css rel=stylesheet type=text/css I am know I am messing up security paths, but I can't figure out what to do about it. Any help would be greatly appreciated. Thanks. Yaakov Chaikin Software Engineer BAE SYSTEMS 301-838-6899 (phone) 301-838-6802 (fax) [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Unable to compile class for JSP
I've recently upgraded from 4.1.29 to 5.0.16 and Jasper appears to be (inconsistently) unable to rename temporary class files. One moment, a JSP will compile cleanly and, after a very simple page modification, the same JSP will cause this exception: 2003-12-08 12:29:30,527 [http8080-Processor25] ERROR org.apache.struts.taglib.tiles.InsertTag - ServletException in '/property/edit/title.jsp': tmpFile.rena meTo(classFile) failed org.apache.jasper.JasperException: Unable to compile class for JSP at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:5 58) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:2 91) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248) at javax.servlet.http.HttpServlet.service(HttpServlet.java:856) ...yada x 3... Thanks in advance for any insight. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
JNDI, DataSource, and ClassCastException
I have a situation where I am attempting to downcast a DataSource resource into the exact class that getClass().getName() reports the object is, but it's causing a ClassCastException. -- server.xml: GlobalNamingResources Resource name=LoanAuditorDB auth=Container type=org.enhydra.jdbc.pool.StandardXAPoolDataSource/ ResourceParams name=LoanAuditorDB ...more /ResourceParams /GlobalNamingResources ...more Context path=/workbench docBase=C:\Code\loanauditor\src\webapp\workbench workDir=C:\Code\loanauditor\src\webapp\workbench\WEB-INF\work reloadable=true debug=0 ResourceLink name=jdbc/loanauditor global=LoanAuditorDB type=org.enhydra.jdbc.pool.StandardXAPoolDataSource/ ResourceLink name=jta/loanauditor global=UserTransaction type=javax.transaction.UserTransaction/ /Context -- web.xml resource-ref descriptionDB Connection/description res-ref-namejdbc/loanauditor/res-ref-name res-typeorg.enhydra.jdbc.pool.StandardXAPoolDataSource/res-type res-authContainer/res-auth /resource-ref -- constructor from abstract class, AbstractDAO.java: protected AbstractDAO() { try { Context ctx = new InitialContext(); Object o = ctx.lookup(java:comp/env/jdbc/loanauditor); log.debug(loanauditor from JNDI: + o.getClass().getName()); ds = (org.enhydra.jdbc.pool.StandardXAPoolDataSource) o; ds.setJdbcTestStmt(SELECT 1); } catch (NamingException ne) { log.fatal(ne.getMessage(), ne); throw new RuntimeException(ne); } } -- logging: 2003-12-04 05:25:39,157 [main] DEBUG com.socotech.loanauditor.dao.AbstractDAO - loanauditor from JNDI: org.enhydra.jdbc.pool.StandardXAPoolDataSource -- stacktrace: java.lang.ClassCastException at com.socotech.loanauditor.dao.AbstractDAO.init(AbstractDAO.java:31) at com.socotech.loanauditor.dao.TorqueDomainTypeDAO.init(TorqueDomainTypeDAO. java:34) at com.socotech.loanauditor.dao.TorqueDomainTypeDAO.getInstance(TorqueDomainTyp eDAO.java:29) at com.socotech.loanauditor.dao.DAOFactory.getDomainTypeDAO(DAOFactory.java:79) at com.socotech.loanauditor.web.listener.DomainTypeLoader.contextInitialized(Do mainTypeLoader.java:32) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java: 3271) at org.apache.catalina.core.StandardContext.start(StandardContext.java:3613) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188) at org.apache.catalina.core.StandardHost.start(StandardHost.java:754) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:363) at org.apache.catalina.core.StandardService.start(StandardService.java:497) at org.apache.catalina.core.StandardServer.start(StandardServer.java:2190) at org.apache.catalina.startup.Catalina.start(Catalina.java:512) at org.apache.catalina.startup.Catalina.execute(Catalina.java:400) at org.apache.catalina.startup.Catalina.process(Catalina.java:180) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39 ) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl .java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203) Thanks in advance for any insight. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
jndi + dbcp
My resource parameters are not being passed correctly to a JDBC resource factory causing this stack trace: 2003-11-17 12:42:59,281 [main] FATAL com.socotech.loanauditor.dao.TorqueDomainTypeDAO - Cannot create JDBC driver of class '' for connect URL 'null' org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null', cause: java.sql.SQLException: No suitable driver at java.sql.DriverManager.getDriver(DriverManager.java:243) at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.jav a:743) at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:5 18) at org.apache.torque.Torque.getConnection(Torque.java:890) at org.apache.torque.util.Transaction.beginOptional(Transaction.java:114) at org.apache.torque.util.BasePeer.doSelect(BasePeer.java:1328) at com.socotech.loanauditor.or.torque.BaseTimeIntervalImplPeer.doSelectVillageR ecords(BaseTimeIntervalImplPeer.java:375) at com.socotech.loanauditor.or.torque.BaseTimeIntervalImplPeer.doSelectVillageR ecords(BaseTimeIntervalImplPeer.java:342) at com.socotech.loanauditor.or.torque.BaseTimeIntervalImplPeer.doSelect(BaseTim eIntervalImplPeer.java:311) at com.socotech.loanauditor.dao.TorqueDomainTypeDAO.getTimeIntervals(TorqueDoma inTypeDAO.java:36) at com.socotech.loanauditor.web.listener.DomainTypeLoader.contextInitialized(Do mainTypeLoader.java:32) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java: 3271) at org.apache.catalina.core.StandardContext.start(StandardContext.java:3613) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188) at org.apache.catalina.core.StandardHost.start(StandardHost.java:754) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:363) at org.apache.catalina.core.StandardService.start(StandardService.java:497) at org.apache.catalina.core.StandardServer.start(StandardServer.java:2190) at org.apache.catalina.startup.Catalina.start(Catalina.java:512) at org.apache.catalina.startup.Catalina.execute(Catalina.java:400) at org.apache.catalina.startup.Catalina.process(Catalina.java:180) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39 ) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl .java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203) my server.xml: GlobalNamingResources Resource name=jdbc/loanauditor auth=Container type=javax.sql.DataSource / ResourceParams name=jdbc/loanauditor parameter namefactory/name valueorg.apache.commons.dbcp.BasicDataSourceFactory/value /parameter parameter namemaxActive/name value100/value /parameter parameter namemaxIdle/name value30/value /parameter parameter namemaxWait/name value1/value /parameter parameter nameusername/name valuemarc/value /parameter parameter namepassword/name value[PASSWORD]/value /parameter parameter namedriverClassName/name valuecom.mysql.jdbc.Driver/value /parameter parameter nameurl/name valuejdbc:mysql://localhost:3306/loanauditor?autoReconnect=true/value /parameter /ResourceParams I've got JDBC driver, commons-dbcp, commons-pool, and commons-collections in Tomcat's common/lib. Thanks in advance for any insight! - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: jndi + dbcp [SOLUTION]
missing ResourceLink .../ inside Context ../ -Original Message- From: Marc Dugger [mailto:[EMAIL PROTECTED] Sent: Monday, November 17, 2003 12:56 PM To: [EMAIL PROTECTED] Subject: jndi + dbcp My resource parameters are not being passed correctly to a JDBC resource factory causing this stack trace: 2003-11-17 12:42:59,281 [main] FATAL com.socotech.loanauditor.dao.TorqueDomainTypeDAO - Cannot create JDBC driver of class '' for connect URL 'null' org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null', cause: java.sql.SQLException: No suitable driver at java.sql.DriverManager.getDriver(DriverManager.java:243) at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicData Source.jav a:743) at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSou rce.java:5 18) at org.apache.torque.Torque.getConnection(Torque.java:890) at org.apache.torque.util.Transaction.beginOptional(Transaction.java:114) at org.apache.torque.util.BasePeer.doSelect(BasePeer.java:1328) at com.socotech.loanauditor.or.torque.BaseTimeIntervalImplPeer.doSele ctVillageR ecords(BaseTimeIntervalImplPeer.java:375) at com.socotech.loanauditor.or.torque.BaseTimeIntervalImplPeer.doSele ctVillageR ecords(BaseTimeIntervalImplPeer.java:342) at com.socotech.loanauditor.or.torque.BaseTimeIntervalImplPeer.doSele ct(BaseTim eIntervalImplPeer.java:311) at com.socotech.loanauditor.dao.TorqueDomainTypeDAO.getTimeIntervals( TorqueDoma inTypeDAO.java:36) at com.socotech.loanauditor.web.listener.DomainTypeLoader.contextInit ialized(Do mainTypeLoader.java:32) at org.apache.catalina.core.StandardContext.listenerStart(StandardCon text.java: 3271) at org.apache.catalina.core.StandardContext.start(StandardContext.java:3613) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188) at org.apache.catalina.core.StandardHost.start(StandardHost.java:754) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:363) at org.apache.catalina.core.StandardService.start(StandardService.java:497) at org.apache.catalina.core.StandardServer.start(StandardServer.java:2190) at org.apache.catalina.startup.Catalina.start(Catalina.java:512) at org.apache.catalina.startup.Catalina.execute(Catalina.java:400) at org.apache.catalina.startup.Catalina.process(Catalina.java:180) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorIm pl.java:39 ) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAc cessorImpl .java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203) my server.xml: GlobalNamingResources Resource name=jdbc/loanauditor auth=Container type=javax.sql.DataSource / ResourceParams name=jdbc/loanauditor parameter namefactory/name valueorg.apache.commons.dbcp.BasicDataSourceFactory/value /parameter parameter namemaxActive/name value100/value /parameter parameter namemaxIdle/name value30/value /parameter parameter namemaxWait/name value1/value /parameter parameter nameusername/name valuemarc/value /parameter parameter namepassword/name value[PASSWORD]/value /parameter parameter namedriverClassName/name valuecom.mysql.jdbc.Driver/value /parameter parameter nameurl/name valuejdbc:mysql://localhost:3306/loanauditor?autoReconnect=true/value /parameter /ResourceParams I've got JDBC driver, commons-dbcp, commons-pool, and commons-collections in Tomcat's common/lib. Thanks in advance for any insight! - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: jndi + dbcp [SOLUTION]
I had defined the resource at the global level, but failed to link it to the context. before: Context path=/workbench docBase=C:\Code\loanauditor\src\webapp\workbench workDir=C:\Code\loanauditor\src\webapp\workbench\WEB-INF\work reloadable=true debug=0 / after: Context path=/workbench docBase=C:\Code\loanauditor\src\webapp\workbench workDir=C:\Code\loanauditor\src\webapp\workbench\WEB-INF\work reloadable=true debug=0 ResourceLink name=jdbc/loanauditor global=LoanAuditorDB type=javax.sql.DataSource/ /Context -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Monday, November 17, 2003 2:29 PM To: 'Tomcat Users List'; [EMAIL PROTECTED] Subject: RE: jndi + dbcp [SOLUTION] Hey Mark, Can you post your context solution...I am not sure about the ResourceLink Thanks Brent -Original Message- From: Marc Dugger [mailto:[EMAIL PROTECTED] Sent: Monday, November 17, 2003 12:26 PM To: Tomcat Users List Subject: RE: jndi + dbcp [SOLUTION] missing ResourceLink .../ inside Context ../ -Original Message- From: Marc Dugger [mailto:[EMAIL PROTECTED] Sent: Monday, November 17, 2003 12:56 PM To: [EMAIL PROTECTED] Subject: jndi + dbcp My resource parameters are not being passed correctly to a JDBC resource factory causing this stack trace: 2003-11-17 12:42:59,281 [main] FATAL com.socotech.loanauditor.dao.TorqueDomainTypeDAO - Cannot create JDBC driver of class '' for connect URL 'null' org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null', cause: java.sql.SQLException: No suitable driver at java.sql.DriverManager.getDriver(DriverManager.java:243) at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicData Source.jav a:743) at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSou rce.java:5 18) at org.apache.torque.Torque.getConnection(Torque.java:890) at org.apache.torque.util.Transaction.beginOptional(Transaction.java:114) at org.apache.torque.util.BasePeer.doSelect(BasePeer.java:1328) at com.socotech.loanauditor.or.torque.BaseTimeIntervalImplPeer.doSele ctVillageR ecords(BaseTimeIntervalImplPeer.java:375) at com.socotech.loanauditor.or.torque.BaseTimeIntervalImplPeer.doSele ctVillageR ecords(BaseTimeIntervalImplPeer.java:342) at com.socotech.loanauditor.or.torque.BaseTimeIntervalImplPeer.doSele ct(BaseTim eIntervalImplPeer.java:311) at com.socotech.loanauditor.dao.TorqueDomainTypeDAO.getTimeIntervals( TorqueDoma inTypeDAO.java:36) at com.socotech.loanauditor.web.listener.DomainTypeLoader.contextInit ialized(Do mainTypeLoader.java:32) at org.apache.catalina.core.StandardContext.listenerStart(StandardCon text.java: 3271) at org.apache.catalina.core.StandardContext.start(StandardContext.java:3613 ) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188) at org.apache.catalina.core.StandardHost.start(StandardHost.java:754) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:363) at org.apache.catalina.core.StandardService.start(StandardService.java:497) at org.apache.catalina.core.StandardServer.start(StandardServer.java:2190) at org.apache.catalina.startup.Catalina.start(Catalina.java:512) at org.apache.catalina.startup.Catalina.execute(Catalina.java:400) at org.apache.catalina.startup.Catalina.process(Catalina.java:180) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorIm pl.java:39 ) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAc cessorImpl .java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203) my server.xml: GlobalNamingResources Resource name=jdbc/loanauditor auth=Container type=javax.sql.DataSource / ResourceParams name=jdbc/loanauditor parameter namefactory/name valueorg.apache.commons.dbcp.BasicDataSourceFactory/value /parameter parameter namemaxActive/name value100/value /parameter parameter namemaxIdle/name value30/value /parameter parameter namemaxWait/name value1/value /parameter parameter nameusername/name valuemarc/value /parameter parameter namepassword/name value[PASSWORD
JSP 2.0 Tag File with Scripting Variable: results in a JasperException
Hi, With Tomcat 5.0.9 and 5.0.11 I get the following JasperException when using a 'tag file' with a scripting variable: Unable to find setter method for attribute: theVar I searched the internet over and over for a solution. (I simplified my original tag below for testing purposes). Kind regards, Marc van den Hoogen JSP file (excerpt): === %@ taglib prefix=mh tagdir=/WEB-INF/tags % %@ taglib prefix=c uri=/jstl/core_rt % c:forEach var=meetmoment items=${meetmomenten.rows} mh:getParameter theVar=aValue/ %-- EXCEPTION HERE --% ${aValue} %-- REPORT VALUE OBTAINED FROM TAG --% /c:forEach Tag File (getParameter.tag): %@ tag isELIgnored=false % %@ attribute name=theVar required=true rtexprvalue=false type=java.lang.String % %@ variable name-from-attribute=theVar alias=theValue variable-class=java.lang.String scope=AT_END % %@ taglib prefix=c uri=/jstl/core_rt % c:set var=theValue value=4.5 / === * Sun SDK J2SE 1.4.2_01. * Tomcat 5.0.11, tried the same with 5.0.9 with similar result. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Rooting request to one or an other webapp
Hi Yoav, thanks for the info. Could you give me a link or the keywords permitting to find the previous discussions you mentioned on this subject? I've search for that but I didn't found anything. I guess that I've looked for the bad terms. Marc. - Original Message - From: Shapira, Yoav [EMAIL PROTECTED] Newsgroups: gmane.comp.jakarta.tomcat.user Sent: Wednesday, July 30, 2003 3:17 PM Subject: RE: Rooting request to one or an other webapp Howdy, does someone know a way to catch a request and to forward it to one or an other webapp according to some runtime settings? The idea is to be able at runtime to smoothly add a webapp, set it as the default, and to remove the one that was the default when it has no active session anymore. Something similar to this has been requested and discussed several times (it's generally a bad idea), so you can search this list's archives for more information. Broadly speaking: - Let's call webapp1 the one to be removed - Let's call webapp2 the one to be added You would need: - A session listener in webapp1 maintaining a session count, and having a public static int getSessionCount() method. - A filter in webapp1 mapped to /* which consults the session count each time and if 0 (or whatever other runtime setting you choose, e.g. a context param), forwards requests to webapp2 - Maybe an admin JSP (or some other means) in webapp1 to set the runtime settings for the filter - Once you see the above happening, you can remove webapp1 via the manager webapp Of course, there are caveats: - Initially the session count for webapp1 will be zero, so the filter will forward, unless you also have a runtime setting for the filter that says don't forward - If you want to remove webapp1 programatically, you will need some classes to be in the common/lib repository, not web-inf/lib, as these classes will need to access tomcat internals (making them non-portable). Yoav Shapira This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Rooting request to one or an other webapp
Hi, does someone know a way to catch a request and to forward it to one or an other webapp according to some runtime settings? The idea is to be able at runtime to smoothly add a webapp, set it as the default, and to remove the one that was the default when it has no active session anymore. Marc. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
mod_jk2 + Tomcat 4.1.24 - no sessions?
Hi, I upgraded my Tomcat 4.1.18 to 4.1.24, connected to Apache 2 using mod_jk2. However now Tomcat is not succeeding in sending any JSESSIONID cookies to clients if they connect via Apache. i.e: http://myhost:8080/myapp --- Tomcat sends JSESSIONID cookie OK http://myhost/myapp --- Tomcat does not send JSESSIONID cookie Both cases return pages correctly apart from this problem. Can anyone explain this? Is it a bug in Tomcat 4.1.24 / mod_jk2 ? Kind regards, Marc -- Marc Palmer Contract Java Consultant/Developer w a n g j a m m e r s java and web software design experts with an ethical outlook http://www.wangjammers.org - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: mod_jk2 + Tomcat 4.1.24 - no sessions?
On Mon, 21 Jul 2003 16:43:05 +0200, Simon Pabst [EMAIL PROTECTED] wrote: You need to use tomcatId jvmRoute for stickySession to work (don't know if it works with default settings), for example: workers2.properties: [channel.socket:localhost:8009] tomcatId=tomcat1 (http://jakarta.apache.org/tomcat/tomcat-4.1- doc/jk2/jk2/configwebcom.html#workers) server.xml: Engine name=Standalone defaultHost=localhost debug=0 jvmRoute=tomcat1 Beware - in Tomcat 4.1.24 the jvmRoute example is spelled wrong ^- jmvRoute instead of jvmRoute Thanks for that - is this even necessary if I have just one tomcate instance? If so, this is surely a new feature of 4.1.24 because I'm pretty sure it worked fine with 4.1.18 Cheers -- Marc Palmer Contract Java Consultant/Developer w a n g j a m m e r s java and web software design experts with an ethical outlook http://www.wangjammers.org - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: mod_jk2 + Tomcat 4.1.24 - no sessions?
On Mon, 21 Jul 2003 17:41:13 +0200, Simon Pabst [EMAIL PROTECTED] wrote: hmm no, if you have just one Tomcat, it shouldn't be necessary. I guessed as much. The thing is, I can see that the browser is just never getting the JSESSIONID cookies when accessing via Apache. If you access directly to Tomcat the JSESSIONID cookies come no problem. I just don't get it - this implies that mod_jk2 is stripping off the cookie response headers, or tomcat is not producing them through the jk connector. :( -- Marc Palmer Contract Java Consultant/Developer w a n g j a m m e r s java and web software design experts with an ethical outlook http://www.wangjammers.org - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
How to use Tomcat MBeans with MC4J?
Hi, I've found this question on list archives but no answers. I've even seen a tomcat-dev archive post saying how there will be docs on using MC4J with Tomcat 5. So - what settings to I need for MC4J to get it to work with Tomcat 4? I've tried using the default MX4J settings provide by MC4J, connecting to localhost (my test tomcat install) and it can't connect. Netstat shows no sockets listening on port 1099 either. Help much appreciated. -- Marc Palmer Contract Java Consultant/Developer http://www.anyware.co.uk/marc/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Need help with performance issue - Tomcat 4.1.X
On Fri, 11 Jul 2003 19:22:41 +, [EMAIL PROTECTED] wrote: When I submit my request to get the login page (not to process the login, just to serve the login page), I couple of the java threads will spin up and take maybe 3% of the cpu, but it still takes over 30 seconds to get the page. Still stuggling for ideas. Does this happen with static content served by Tomcat too, or just JSPs? -- Marc Palmer Contract Java Consultant/Developer * Available For Hire * See my CV at http://www.anyware.co.uk/marc/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
can not build jk or jk2
Hi I am can not get jk or jk2 connector compiled (ant). I think, there are files missing in the package ? when I use jk from : http://jakarta.apache.org/builds/jakarta-tomcat-connectors/jk/release/v1.2.4/ and type ant i recieve this error: BUILD FAILED file:/home/mm/jakarta-tomcat-connectors-jk-1.2.4-src/jk/build.xml:139: Warning: Could not find file /home/mm/jakarta-tomcat-connectors-jk-1.2.4- src/coyote/build/lib/tomcat-coyote.jar to copy. coyote directory is not in the archive... when I try the same with j2k from : http://jakarta.apache.org/builds/jakarta-tomcat- connectors/jk2/release/v2.0.2/src/ and type ant in the directory where the archive was extracted to I recieve : coyote: BUILD FAILED file:/home/mm/jakarta-tomcat-connectors-jk2-2.0.2-src/build.xml:11: Basedir /home/mm/jakarta-tomcat-connectors-jk2-2.0.2-src/util does not exist -- can someone give me a hint where I get an archive that has all files included that are needed for the build.xml to build j2k 2.0.2 ? regards Marc Muncke - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: can not build jk or jk2
that's a good idea , but it did not work here: /home/mm/jakarta-tomcat-connectors-jk2-2.0.2-src/jk/native2 #./configure errors out with : configure: error: Cannot find any WebServer or : /home/mm/jakarta-tomcat-connectors-jk-1.2.4-src/jk/native #./configure file not found thank you Marc Quoting Atreya Basu [EMAIL PROTECTED]: Hi, I tried building with ant also and got no end to errors. I think that the ANT build requires some extra libraries and some external ant tools also. The best way to do it is to use configure and then make. _ Atreya Basu Developer, Greenfield Research Inc. e-mail: atreya (at) greenfieldresearch (dot) ca -Original Message- From: Marc Muncke [mailto:[EMAIL PROTECTED] Sent: July 3, 2003 8:19 AM To: [EMAIL PROTECTED] Subject: can not build jk or jk2 Hi I am can not get jk or jk2 connector compiled (ant). I think, there are files missing in the package ? when I use jk from : http://jakarta.apache.org/builds/jakarta-tomcat-connectors/jk/release/v1 .2.4/ and type ant i recieve this error: BUILD FAILED file:/home/mm/jakarta-tomcat-connectors-jk-1.2.4-src/jk/build.xml:139: Warning: Could not find file /home/mm/jakarta-tomcat-connectors-jk-1.2.4- src/coyote/build/lib/tomcat-coyote.jar to copy. coyote directory is not in the archive... when I try the same with j2k from : http://jakarta.apache.org/builds/jakarta-tomcat- connectors/jk2/release/v2.0.2/src/ and type ant in the directory where the archive was extracted to I recieve : coyote: BUILD FAILED file:/home/mm/jakarta-tomcat-connectors-jk2-2.0.2-src/build.xml:11: Basedir /home/mm/jakarta-tomcat-connectors-jk2-2.0.2-src/util does not exist -- can someone give me a hint where I get an archive that has all files included that are needed for the build.xml to build j2k 2.0.2 ? regards Marc Muncke - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Marc Muncke products -gramming primary.Key.systemsinformationstechnologie GmbH CO KEG A-1020 wien, praterstr. 49 tel +43.1.2168538 fax +43.1.2196785 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: can not build jk or jk2
done, thank you Quoting Eric J. Pinnell [EMAIL PROTECTED]: HI, I'll field this again... I'm sure it's in the archives by now. And I only know about JK2. So... BUILD FAILED file:/home/mm/jakarta-tomcat-connectors-jk2-2.0.2-src/build.xml:11: Basedir /home/mm/jakarta-tomcat-connectors-jk2-2.0.2-src/util does not exist I don't use ant. I use the regular configure/make approach. 1.) cd jakarta-tomcat-connectors-jk2-2.0.2-src/jk/native2/ 2.) ./configure --with-apxs2=/path/to/apache/bin/apxs 3.) make 4.) mod_jk2.so should be in: jakarta-tomcat-connectors-jk2-2.0.2-src/jk/build/jk2/apache2/ -e - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
How do I easily set logging verbosity for coyote and the like?
Hi *, I'm using Tomcat 5.0.2 and J2SDK1.4.2 beta. The Tomcat log fills up with a lot of INFO messages which I wouldn't like to see. (Stdout and stderr are redirected to files.) Tweaking the debug and/or the verbosity attributes for the respective components in server.xml has no effect with respect to suppressing those messages. As logging is ultimately managed by java.util.logging or log4j I can certainly tweak logging.properties or log4j.properties respectively. However, it would be much more convenient to configure all aspects of Tomcat logging in server.xml. There may also be side-effects as the configuration for java.util.logging holds for the entire JDK (at least if I don't pass a dedicated logging.properties to Tomcat at start-up). Is this separation by design? Are changes in the pipeline for forthcoming Tomcat versions? If not, does anyone have an easy solution/work-around? Regards, Marc - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
ssl keystore
I am attempting to change the certificate against which a webapp authenticates itself. I've gone as far as deleting the old key/cert from the keystore and imported a new one. However, the webapp continues to use the old cert. I've verified that the 'keystorefile' param on the SSL factory is defined correctly and restarted the server repeatedly. What else could I be missing?
JSPC for TOMCAT 4.124 generates unexpected internal error
I'm doing a simple test to compile the checkbox JSP from the TOMCAT examples with the -webinc switch The JAVA and XML files are properly generates but jasper complains (unexpectedly ) that the web.xml file is no found here is the output fragment: 2003-04-04 04:21:34 - uriRoot implicitly set to /dsa1/apache/jakarta/tomcat/web apps/examples 2003-04-04 04:21:34 - Internal Error: File /WEB-INF/web.xml not found 2003-04-04 04:21:34 - Class name is: checkresult 2003-04-04 04:21:34 - Java file name is: /dsa1/apache/jakarta/tomcat/webapps/exa mples/jsp/checkbox/checkresult.java 2003-04-04 04:21:34 - Accepted org.apache.jasper.compiler.Parser$Declaration at /checkresult.jsp(8,0) 2003-04-04 04:21:34 - Accepted org.apache.jasper.compiler.Parser$Bean at /checkr esult.jsp(9,0) 2003-04-04 04:21:35 - Accepted org.apache.jasper.compiler.Parser$SetProperty at /checkresult.jsp(11,0) 2003-04-04 04:21:35 - Accepted org.apache.jasper.compiler.Parser$Scriptlet at /c heckresult.jsp(14,0) 2003-04-04 04:21:35 - Accepted org.apache.jasper.compiler.Parser$Scriptlet at /c heckresult.jsp(18,0) 2003-04-04 04:21:35 - Accepted org.apache.jasper.compiler.Parser$Scriptlet at /c heckresult.jsp(23,0) 2003-04-04 04:21:35 - Accepted org.apache.jasper.compiler.Parser$Scriptlet at /c heckresult.jsp(34,0) 2003-04-04 04:21:35 - Accepted org.apache.jasper.compiler.Parser$Scriptlet at /c heckresult.jsp(38,0) 2003-04-04 04:21:35 - Accepted org.apache.jasper.compiler.Parser$Scriptlet at /c heckresult.jsp(43,0) 2003-04-04 04:21:35 - Compiling with: -encoding UTF8 -classpath /sys$common/java $140/lib/tools.jar:/dsa1/apache/jakarta/tomcat/bin/bootstrap.jar:.:/dsa1/apache/ jakarta/tomcat/lib/jasper-compiler.jar:/dsa1/apache/jakarta/tomcat/lib/jasper-ru ntime.jar:/dsa1/apache/jakarta/tomcat/lib/naming-factory.jar:/dsa1/apache/jakart a/tomcat/common/lib/activation.jar:/dsa1/apache/jakarta/tomcat/common/lib/ant.ja r:/dsa1/apache/jakarta/tomcat/common/lib/commons-collections.jar:/dsa1/apache/ja karta/tomcat/common/lib/commons-dbcp.jar:/dsa1/apache/jakarta/tomcat/common/lib/ commons-logging-api.jar:/dsa1/apache/jakarta/tomcat/common/lib/commons-pool.jar: /dsa1/apache/jakarta/tomcat/common/lib/jasper-compiler.jar:/dsa1/apache/jakarta/ tomcat/common/lib/jasper-runtime.jar:/dsa1/apache/jakarta/tomcat/common/lib/jdbc 2_0-stdext.jar:/dsa1/apache/jakarta/tomcat/common/lib/jndi.jar:/dsa1/apache/jaka rta/tomcat/common/lib/jta-spec1_0_1.jar:/dsa1/apache/jakarta/tomcat/common/lib/j ta.jar:/dsa1/apache/jakarta/tomcat/common/lib/mail.jar:/dsa1/apache/jakarta/tomc at/common/lib/naming-common.jar:/dsa1/apache/jakarta/tomcat/common/lib/naming-fa ctory.jar:/dsa1/apache/jakarta/tomcat/common/lib/naming-resources.jar:/dsa1/apac he/jakarta/tomcat/common/lib/servlet.jar:/dsa1/apache/jakarta/tomcat/common/lib/ tyrex-0.9.7.0.jar:/dsa1/apache/jakarta/tomcat/common/lib/xerces.jar:/sys$common/ java$140/lib/tools.jar:/dsa1/apache/jakarta/tomcat/bin/bootstrap.jar:.:/dsa1/apa che/jakarta/tomcat/lib/jasper-compiler.jar:/dsa1/apache/jakarta/tomcat/lib/jaspe r-runtime.jar:/dsa1/apache/jakarta/tomcat/lib/naming-factory.jar:/dsa1/apache/ja karta/tomcat/common/lib/activation.jar:/dsa1/apache/jakarta/tomcat/common/lib/an t.jar:/dsa1/apache/jakarta/tomcat/common/lib/commons-collections.jar:/dsa1/apach e/jakarta/tomcat/common/lib/commons-dbcp.jar:/dsa1/apache/jakarta/tomcat/common/ lib/commons-logging-api.jar:/dsa1/apache/jakarta/tomcat/common/lib/commons-pool. jar:/dsa1/apache/jakarta/tomcat/common/lib/jasper-compiler.jar:/dsa1/apache/jaka rta/tomcat/common/lib/jasper-runtime.jar:/dsa1/apache/jakarta/tomcat/common/lib/ jdbc2_0-stdext.jar:/dsa1/apache/jakarta/tomcat/common/lib/jndi.jar:/dsa1/apache/ jakarta/tomcat/common/lib/jta-spec1_0_1.jar:/dsa1/apache/jakarta/tomcat/common/l ib/jta.jar:/dsa1/apache/jakarta/tomcat/common/lib/mail.jar:/dsa1/apache/jakarta/ tomcat/common/lib/naming-common.jar:/dsa1/apache/jakarta/tomcat/common/lib/namin g-factory.jar:/dsa1/apache/jakarta/tomcat/common/lib/naming-resources.jar:/dsa1/ apache/jakarta/tomcat/common/lib/servlet.jar:/dsa1/apache/jakarta/tomcat/common/ lib/tyrex-0.9.7.0.jar:/dsa1/apache/jakarta/tomcat/common/lib/xerces.jar -d /dsa1 /apache/jakarta/tomcat/webapps/examples/jsp/checkbox /dsa1/apache/jakarta/tomcat /webapps/examples/jsp/checkbox/checkresult.java Check the web.xml file is really there: bash$ pwd /dsa1/apache/jakarta/tomcat/webapps/examples/web-inf bash$ ls classes jsp web.xml bash$ OK, spurious or normal behaviour ? thanks in advance Marc Dufresne OpenVMS Ambassador Pre-Sales Large Accounts HP France tel: + 33.1.5762.5413 mob: + 33.6 7498 5608 fax: +33 1 5762.7630 e-mail : [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: JSPC for TOMCAT 4.124 generates unexpected internal error
the lower case is an artefact of GNV (BASH shell for OpenVMS) The actuall directory name *IS* in caps when watching JSPC do it's file search up the tree, it does in fact find the directory porperly. next? Marc Dufresne OpenVMS Ambassador Pre-Sales Large Accounts HP France ( : + 33.1.5762.5413 e-mail : [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] -Original Message- From: Karr, David [mailto:[EMAIL PROTECTED] Sent: Friday, April 04, 2003 6:26 PM To: Tomcat Users List Subject: RE: JSPC for TOMCAT 4.124 generates unexpected internal error Normal behavior. You need to change web-inf to WEB-INF. -Original Message- From: Dufresne, Marc [mailto:[EMAIL PROTECTED] I'm doing a simple test to compile the checkbox JSP from the TOMCAT examples with the -webinc switch The JAVA and XML files are properly generates but jasper complains (unexpectedly ) that the web.xml file is no found here is the output fragment: 2003-04-04 04:21:34 - uriRoot implicitly set to /dsa1/apache/jakarta/tomcat/web apps/examples 2003-04-04 04:21:34 - Internal Error: File /WEB-INF/web.xml not found Check the web.xml file is really there: bash$ pwd /dsa1/apache/jakarta/tomcat/webapps/examples/web-inf bash$ ls classes jsp web.xml bash$ OK, spurious or normal behaviour ? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
mod_jk2 / Apache 2 / mod_rewrite virtual hosts
Hello, I am trying to setup tomcat running on a machine that uses mod_rewrite seperate requests between two domains, domain.com and domain.net. I want to setup domain.net to integrate with tomcat, but only that domain. I am not using the VirtualHost directive at all, as I only have 1 IP. Is there a straight forward way to configure mod_jk2 to use just that one domain, or do I need to use some creative re-writing for that as well? Thanks Marc Boorshtein -- Marc Boorshtein [EMAIL PROTECTED] signature.asc Description: This is a digitally signed message part
RE: mod_jk2 / Apache 2 / mod_rewrite virtual hosts
I tried that, but it would all ways default to the first VirtualHost. Marc On Fri, 2003-04-04 at 12:36, PELOQUIN,JEFFREY (HP-Boise,ex1) wrote: If you are not using ssl you may wish to consider name based virtual hosting VirtualHost * ServerName domain.com /VirtualHost VirtualHost * ServerName domain.net mod_jk stuff /VirtualHost the apache documentation goes into this more fully -Original Message- From: Marc Boorshtein [mailto:[EMAIL PROTECTED] Sent: Friday, April 04, 2003 10:40 AM To: Tomcat Users List Subject: mod_jk2 / Apache 2 / mod_rewrite virtual hosts Hello, I am trying to setup tomcat running on a machine that uses mod_rewrite seperate requests between two domains, domain.com and domain.net. I want to setup domain.net to integrate with tomcat, but only that domain. I am not using the VirtualHost directive at all, as I only have 1 IP. Is there a straight forward way to configure mod_jk2 to use just that one domain, or do I need to use some creative re-writing for that as well? Thanks Marc Boorshtein -- Marc Boorshtein [EMAIL PROTECTED] signature.asc Description: This is a digitally signed message part
RE: mod_jk2 / Apache 2 / mod_rewrite virtual hosts
I think this works without mass hosting. This won't work though with mass hosting though. marc On Fri, 2003-04-04 at 12:54, Marc Boorshtein wrote: I tried that, but it would all ways default to the first VirtualHost. Marc On Fri, 2003-04-04 at 12:36, PELOQUIN,JEFFREY (HP-Boise,ex1) wrote: If you are not using ssl you may wish to consider name based virtual hosting VirtualHost * ServerName domain.com /VirtualHost VirtualHost * ServerName domain.net mod_jk stuff /VirtualHost the apache documentation goes into this more fully -Original Message- From: Marc Boorshtein [mailto:[EMAIL PROTECTED] Sent: Friday, April 04, 2003 10:40 AM To: Tomcat Users List Subject: mod_jk2 / Apache 2 / mod_rewrite virtual hosts Hello, I am trying to setup tomcat running on a machine that uses mod_rewrite seperate requests between two domains, domain.com and domain.net. I want to setup domain.net to integrate with tomcat, but only that domain. I am not using the VirtualHost directive at all, as I only have 1 IP. Is there a straight forward way to configure mod_jk2 to use just that one domain, or do I need to use some creative re-writing for that as well? Thanks Marc Boorshtein -- Marc Boorshtein [EMAIL PROTECTED] signature.asc Description: This is a digitally signed message part
RE: JSPC for TOMCAT 4.124 generates unexpected internal error
Well, I've got just that. VMS will track every file accessed from JAVA (called file mapping). When set, I can see that JSPC first looks at descendant, then ascendant directories, until it reaches /examples. It probes /WEB-INF, then goes on... The fact that JSPC sets the default uriroot to ../examples, confirms it found the WEB-INF directory. the web.xml file is there: $dir DSA1:APACHE.JAKARTA.TOMCAT.webapps.examples.WEB-INF Directory DSA1:APACHE.JAKARTA.TOMCAT.webapps.examples.WEB-INF classes.DIR;1 jsp.DIR;1 web.xml;1 And, when run with -uriroot explicitely defined eg jspc -v4 -webinc check.xml -uriroot /dsa1/apache/jakarta/tomcat/webapps/examples -webapp . JSPC runs just fine: 2003-04-04 09:01:21 - Class name is: checkresult 2003-04-04 09:01:21 - Java file name is: /dsa1/apache/jakarta/tomcat/webapps/examples/jsp/checkbox/checkresult.java 2003-04-04 09:01:22 - Accepted org.apache.jasper.compiler.Parser$Declaration at /jsp/checkbox/checkresult.jsp(8,0) 2003-04-04 09:01:22 - Accepted org.apache.jasper.compiler.Parser$Bean at /jsp/ch eckbox/checkresult.jsp(9,0) 2003-04-04 09:01:22 - Accepted org.apache.jasper.compiler.Parser$SetProperty at /jsp/checkbox/checkresult.jsp(11,0) ... ...etc directory listing after jspc: Directory DSA1:APACHE.JAKARTA.TOMCAT.webapps.examples.jsp.checkbox check.html;1check.xml;1 checkresult.java;1 checkresult.jsp;1 CheckTest.html;1cresult.html;1 so the plot thickens... This appears to be linked to the -uriroot switch processing next? Marc Dufresne OpenVMS Ambassador Pre-Sales Large Accounts HP France ( : + 33.1.5762.5413 e-mail : [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] -Original Message- From: Karr, David [mailto:[EMAIL PROTECTED] Sent: Friday, April 04, 2003 8:30 PM To: Tomcat Users List Subject: RE: JSPC for TOMCAT 4.124 generates unexpected internal error Ok, well, one technique you might use to diagnose what's happening here is to use some tool for monitoring I/O operations, like truss on Solaris, or FileMon on Windows. You can search for references to that file name, and it will tell you what directories it is looking in. Hopefully that will give you a clue to why it's not finding it in the directory you expect. -Original Message- From: Dufresne, Marc [mailto:[EMAIL PROTECTED] the lower case is an artefact of GNV (BASH shell for OpenVMS) The actuall directory name *IS* in caps when watching JSPC do it's file search up the tree, it does in fact find the directory porperly. next? -Original Message- From: Karr, David [mailto:[EMAIL PROTECTED] Normal behavior. You need to change web-inf to WEB-INF. -Original Message- From: Dufresne, Marc [mailto:[EMAIL PROTECTED] I'm doing a simple test to compile the checkbox JSP from the TOMCAT examples with the -webinc switch The JAVA and XML files are properly generates but jasper complains (unexpectedly ) that the web.xml file is no found here is the output fragment: 2003-04-04 04:21:34 - uriRoot implicitly set to /dsa1/apache/jakarta/tomcat/web apps/examples 2003-04-04 04:21:34 - Internal Error: File /WEB-INF/web.xml not found Check the web.xml file is really there: bash$ pwd /dsa1/apache/jakarta/tomcat/webapps/examples/web-inf bash$ ls classes jsp web.xml bash$ OK, spurious or normal behaviour ? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat RMI and Eclipse
Well as promised, am reporting back. Christian was right and installing Tomcat into a directory with no spaces embedded in the path names fixes the RMI problem. I noted in bugzilla that this problem has already been reported, (Bug #4543) and was resolved with the solution that it is not going to be fixed. The basis for this decision appears to be that the problem with creating the URL is deep within the JDK itself, and not within Tomcat's code. Unless Sun is willing to commit to a quick resolution and provide a fix soon in the JDK, I would like to vote against this decision. (I was unable to do so in the Bugzilla data base, as it appears to have a bug also and will not allow me to gain access or change my password.) This could be fixed by changing the default installation directory for Tomcat such that no embedded spaces are allowed in the installation path. Otherwise, this will render the development of RMI code within servlets to be extremely difficult for new/other developers. I feel that RMI is an important technology, should be supported by Tomcat, and not be handicapped by such obstacles. Marc - Original Message - From: Marc Chamberlin [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Wednesday, April 02, 2003 10:40 PM Subject: Re: Tomcat RMI and Eclipse OH Hey! Bingo! I bet you are right Christian!! That makes sense... I will reinstall Tomcat tomorrow and let you/group know... Thanks!!! Marc... - Original Message - From: Christian Traber [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Wednesday, April 02, 2003 10:26 PM Subject: Re: Tomcat RMI and Eclipse Hi, I had the same problem:-( Group/Tomcat is part of the installation directory of tomcat (C:\Apache Group\Tomcat 4.1) If you install tomcat in a directory without spaces is the directory-names, it should works! I have this problem since tomcat4.0. Where and how can we report this problem? Regards, Christian Marc Chamberlin wrote: However, when I run the Tomcat server standalone, when the servlet makes this particular RMI call, to this method passing and returning the complex Java object, I get the following exception: java.rmi.ServerException: RemoteException occurred in server thread; nested exception is: java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is: java.net.MalformedURLException: no protocol: Group/Tomcat - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomcat RMI and Eclipse
Hi, I have a puzzler and hope someone on this group might be able to give me a few pointers as to where to look for a solution I am running the Tomcat 4.1.18 server on a Win2000 machine and am developing a servlet which will act as an RMI client and makes remote calls to another machine. For the most part this RMI link is working, especially for remote method calls which pass and/or return simple Java objects such as ints or strings. However, I have one method which I call that passes and returns a more complex object (which has been declared as serializable) and it is with this method that I am having a problem/puzzler. For development purposes, I am using the Eclipse IDE with the Tomcat plugin. When I run the Tomcat server from within the Eclipse IDE, and test out my servlet, everything works fine including all RMI calls, and in particular the call to this remote method to which I am passing and returning a more complex Java object! However, when I run the Tomcat server standalone, when the servlet makes this particular RMI call, to this method passing and returning the complex Java object, I get the following exception: java.rmi.ServerException: RemoteException occurred in server thread; nested exception is: java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is: java.net.MalformedURLException: no protocol: Group/Tomcat Note, the servlet has made a number of RMI calls to the remote object, successfully, prior to making this particular call. Why this particular call works when Tomcat is running within the Eclipse IDE and fails when Tomcat is running standalone has got me puzzled! It does not matter whether I turn debugging on or off for the Tomcat server either. I thought maybe there could be some kind of race condition but these calls all occur within the main servlet thread, so I don't understand how that could be the case. Nor can I come up with anything that might be timing related I have also checked all supporting Jar files and made sure they were the same... Any ideas on what else might be different between the Eclipse IDE and the Tomcat standalone environment? Any thoughts appreciated Marc - Do you think the software industry will ever make software that is as easy and reliable for a user to use as the automobile industry makes a car easy and reliable for a user to drive? A man said unto the universe - Sir, I exist! However, replied the universe I do not see where that creates in me a sense of an obligation. - Stephen Crane
Re: Tomcat RMI and Eclipse
Thanks Chris for your thoughts... Hmmm there is no string Group/Tomcat anywhere in my code, so maybe it is somewhere within the Tomcat code?? I don't have the Tomcat source code, but guess I could download it :-( and take a look see if no one else has more info or a better idea Marc - Original Message - From: Chris Gokey [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Wednesday, April 02, 2003 6:31 PM Subject: Re: Tomcat RMI and Eclipse Sometimes it helps to recreate the exception... URL url = new URL(Group/Tomcat); will result in: java.net.MalformedURLException: no protocol: Group/Tomcat My guess is that since you are getting an java.rmi.ServerException, the exception is being generated on the server after the RMI connection takes place. So, it seems to me you need to find that string Group/Tomcat (e.g., grep for it) and find out where that is being placed into a URL. I have no idea why this would happen with Tomcat and not in eclipse though. Chris On Wed, 2003-04-02 at 20:41, Marc Chamberlin wrote: Hi, I have a puzzler and hope someone on this group might be able to give me a few pointers as to where to look for a solution I am running the Tomcat 4.1.18 server on a Win2000 machine and am developing a servlet which will act as an RMI client and makes remote calls to another machine. For the most part this RMI link is working, especially for remote method calls which pass and/or return simple Java objects such as ints or strings. However, I have one method which I call that passes and returns a more complex object (which has been declared as serializable) and it is with this method that I am having a problem/puzzler. For development purposes, I am using the Eclipse IDE with the Tomcat plugin. When I run the Tomcat server from within the Eclipse IDE, and test out my servlet, everything works fine including all RMI calls, and in particular the call to this remote method to which I am passing and returning a more complex Java object! However, when I run the Tomcat server standalone, when the servlet makes this particular RMI call, to this method passing and returning the complex Java object, I get the following exception: java.rmi.ServerException: RemoteException occurred in server thread; nested exception is: java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is: java.net.MalformedURLException: no protocol: Group/Tomcat Note, the servlet has made a number of RMI calls to the remote object, successfully, prior to making this particular call. Why this particular call works when Tomcat is running within the Eclipse IDE and fails when Tomcat is running standalone has got me puzzled! It does not matter whether I turn debugging on or off for the Tomcat server either. I thought maybe there could be some kind of race condition but these calls all occur within the main servlet thread, so I don't understand how that could be the case. Nor can I come up with anything that might be timing related I have also checked all supporting Jar files and made sure they were the same... Any ideas on what else might be different between the Eclipse IDE and the Tomcat standalone environment? Any thoughts appreciated Marc - Do you think the software industry will ever make software that is as easy and reliable for a user to use as the automobile industry makes a car easy and reliable for a user to drive? A man said unto the universe - Sir, I exist! However, replied the universe I do not see where that creates in me a sense of an obligation. - Stephen Crane -- Christopher D. Gokey, SSAI, NASA/GCMD 18 Martin Road, Shelburne Falls, MA 01370 Phone: Voice (413) 625-8129 / FAX 208-248-9055 [EMAIL PROTECTED] AOL: chrisgokey - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat RMI and Eclipse
Thanks Jean for replying.. No, this complex object just contains a lot of ints, doubles, strings, 2 vectors, and associated accessor methods. I tracked down what was being stored in the two vectors that this object has, and one just contains strings, the other contains a set of another complex object, (defined in the same package) but this second object is also serializable and only contains strings, booleans, and ints. So there are no references to an Eclipse object or any other non-seralizeable objects or unknown objects. All these class definitions are contained within the jar file that is registered to the codebase for the RMI server. Also all these class definitions are stored within jar files that are placed within the WEB-INF/lib directory of the servlet context of the Tomcat server. It was a good thought though :-) but I am still perplexed! Marc - Original Message - From: Jean-Francois Arcand [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Wednesday, April 02, 2003 7:53 PM Subject: Re: Tomcat RMI and Eclipse Well, are you sure your complex object doesn't have any reference to an Eclipse object? I guess that's the problem. Since the missing object is not on the Tomcat classpath, then it is normal you receive that error. -- Jeanfrancois Marc Chamberlin wrote: Thanks Chris for your thoughts... Hmmm there is no string Group/Tomcat anywhere in my code, so maybe it is somewhere within the Tomcat code?? I don't have the Tomcat source code, but guess I could download it :-( and take a look see if no one else has more info or a better idea Marc - Original Message - From: Chris Gokey [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Wednesday, April 02, 2003 6:31 PM Subject: Re: Tomcat RMI and Eclipse Sometimes it helps to recreate the exception... URL url = new URL(Group/Tomcat); will result in: java.net.MalformedURLException: no protocol: Group/Tomcat My guess is that since you are getting an java.rmi.ServerException, the exception is being generated on the server after the RMI connection takes place. So, it seems to me you need to find that string Group/Tomcat (e.g., grep for it) and find out where that is being placed into a URL. I have no idea why this would happen with Tomcat and not in eclipse though. Chris On Wed, 2003-04-02 at 20:41, Marc Chamberlin wrote: Hi, I have a puzzler and hope someone on this group might be able to give me a few pointers as to where to look for a solution I am running the Tomcat 4.1.18 server on a Win2000 machine and am developing a servlet which will act as an RMI client and makes remote calls to another machine. For the most part this RMI link is working, especially for remote method calls which pass and/or return simple Java objects such as ints or strings. However, I have one method which I call that passes and returns a more complex object (which has been declared as serializable) and it is with this method that I am having a problem/puzzler. For development purposes, I am using the Eclipse IDE with the Tomcat plugin. When I run the Tomcat server from within the Eclipse IDE, and test out my servlet, everything works fine including all RMI calls, and in particular the call to this remote method to which I am passing and returning a more complex Java object! However, when I run the Tomcat server standalone, when the servlet makes this particular RMI call, to this method passing and returning the complex Java object, I get the following exception: java.rmi.ServerException: RemoteException occurred in server thread; nested exception is: java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is: java.net.MalformedURLException: no protocol: Group/Tomcat Note, the servlet has made a number of RMI calls to the remote object, successfully, prior to making this particular call. Why this particular call works when Tomcat is running within the Eclipse IDE and fails when Tomcat is running standalone has got me puzzled! It does not matter whether I turn debugging on or off for the Tomcat server either. I thought maybe there could be some kind of race condition but these calls all occur within the main servlet thread, so I don't understand how that could be the case. Nor can I come up with anything that might be timing related I have also checked all supporting Jar files and made sure they were the same... Any ideas on what else might be different between the Eclipse IDE and the Tomcat standalone environment? Any thoughts appreciated Marc - Do you think the software industry will ever make software that is as easy and reliable for a user to use as the automobile industry makes a car easy and reliable for a user to drive
Re: Tomcat RMI and Eclipse
OH Hey! Bingo! I bet you are right Christian!! That makes sense... I will reinstall Tomcat tomorrow and let you/group know... Thanks!!! Marc... - Original Message - From: Christian Traber [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Wednesday, April 02, 2003 10:26 PM Subject: Re: Tomcat RMI and Eclipse Hi, I had the same problem:-( Group/Tomcat is part of the installation directory of tomcat (C:\Apache Group\Tomcat 4.1) If you install tomcat in a directory without spaces is the directory-names, it should works! I have this problem since tomcat4.0. Where and how can we report this problem? Regards, Christian Marc Chamberlin wrote: However, when I run the Tomcat server standalone, when the servlet makes this particular RMI call, to this method passing and returning the complex Java object, I get the following exception: java.rmi.ServerException: RemoteException occurred in server thread; nested exception is: java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is: java.net.MalformedURLException: no protocol: Group/Tomcat - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Authentication in apache-tomcat
Hello, I'm using tomcat as an in-process servlet-engine in an apache server. Everything works fine execpt the authentication. I've configured the authentication to do Access-control based on the system-users and passwords. This works fine for static pages, served by appache, but the access control is ignored by the dynamic pages served by tomcat. I read some documentation saying, that one should add the directive tomcatAuthentication=false in the Ajp13Connector, but in my configuration, there is no Ajp1xConnector, probably, because of the in-process configuration. The connector, in server.xml is : Connector className =org.apache.tomcat.service.JNIEndpointConnector , but adding the tomcatAuthentication=false directive here has no effect. I'm running apache and tomcat on an iSeries (AS400, OS400). Thanks in advance, Marc Nothum -- Electronic information is not secure, therefore the Entreprise des Postes et Telecommunications accepts no responsibility whatsoever for the contents of this message, which is intended for the addressee only. Its contents and any attached files are strictly confidential. If you have received this message in error, please telephone the following number 4765-1. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
reloading applications - classes stay in memory?
Hi, I'm using the ant task to reload my web application during development. The problem is that I have a huge run time library (takes about 45 seconds to load up the class itself). The static block is executed each time i reload (these are not servlets - they are JAXB generated classes). Is there any way to keep those classes loaded into tomcat, so when i reload the class is already initialized? is there an alternate method for accomplishing this? thanks, Marc Dumontier Mount Sinai Hospital Toronto, ON - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
mod_jk can't find commons-log?
Hello, I am trying to get mod_jk working with apache 2. After starting everything i get the following error in my catalina.out log: Mar 3, 2003 7:06:02 PM org.apache.jk.server.JkMain newHandler SEVERE: Can't create apr java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory at org.apache.jk.apr.AprImpl.clinit(AprImpl.java:340) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:140) at org.apache.jk.server.JkMain.newHandler(JkMain.java:556) at org.apache.jk.server.JkMain.start(JkMain.java:341) at org.apache.jk.server.JkCoyoteHandler.start(JkCoyoteHandler.java:169) at org.apache.coyote.tomcat4.CoyoteConnector.start(CoyoteConnector.java:1056) at org.apache.catalina.core.StandardService.start(StandardService.java:506) at org.apache.catalina.core.StandardServer.start(StandardServer.java:2189) at org.apache.catalina.startup.Catalina.start(Catalina.java:512) at org.apache.catalina.startup.Catalina.execute(Catalina.java:400) at org.apache.catalina.startup.Catalina.process(Catalina.java:180) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203) I tried changing my classpath, placing the jar in my jre/lib/ext dir, but nothing seems to be working. Am I missing something here? Thanks Marc Boorshtein -- Marc Boorshtein [EMAIL PROTECTED] signature.asc Description: This is a digitally signed message part
webapps location
hi all ! I wonder if it is possible to put webapps in a directory which is not catalina_home/webapps I'd like to keep the catalina_home/ directory unchanged and allow developpers to put their apps in a directory that I would declare perhaps in server.xml or anywhere else. Does anybody knows if it is possible ? thanx ! Marc-Aurèle NGO XUAN Société Générale Asset Management SGAM/ALT/RIM 01 56 37 16 54 06 30 70 18 12 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
problem for mapping servlet
Hi ! I'm trying to use tomcat-4.1.18 struts. 1.the mapping for struts ActionServlet class works fine : servlet servlet-nameaction/servlet-name servlet-classorg.apache.struts.action.ActionServlet/servlet-class [.] /servlet servlet-mapping servlet-nameaction/servlet-name url-pattern*.do/url-pattern /servlet-mapping 2.but I've got a mapping problem when calling the following servlet : servlet servlet-namecom.imsl.chart.ChartServlet/servlet-name servlet-classcom.imsl.chart.ChartServlet/servlet-class /servlet servlet-mapping servlet-namecom.imsl.chart.ChartServlet/servlet-name url-pattern/servlet/com.imsl.chart.ChartServlet/url-pattern /servlet-mapping I can't find where it fails. when I call http://myserver:8085/foliaTest/servlet/com.imsl.chart.ChartServlet I receive a 404. If anyone has suggestions about mapping ... Thanx ! Marc-Aurèle NGO XUAN Société Générale Asset Management SGAM/ALT/RIM 01 56 37 16 54 06 30 70 18 12 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: problem for mapping servlet
John:thanx for your quick answer! I tried, but it still does not work. when I used tomcat-3.2.3 on windows, no mapping was needed. =my charts worked but I have to migrate to Solaris with tomcat-4.1.18 (with java -headless mode) =here I'm not able to make these charts work. with Solaris tomcat-4.1.18 (with java -headless mode) the only chart that work is the exemple from jmsl with ChartServlet. perhaps I'm not mapping the good servlet, but I tried to explore jmsl.jar it seems to contain only one servlet : ChartServlet. I don't know what else I could try . -Message d'origine- De : Turner, John [mailto:[EMAIL PROTECTED]] Envoyé : jeudi 20 février 2003 11:55 À : 'Tomcat Users List' Objet : RE: problem for mapping servlet servlet servlet-nameChartServlet/servlet-name servlet-classcom.imsl.chart.ChartServlet/servlet-class /servlet servlet-mapping servlet-nameChartServlet/servlet-name url-pattern/servlet/com.imsl.chart.ChartServlet/url-pattern /servlet-mapping John -Original Message- From: NGO XUAN MARC-AURELE [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 20, 2003 5:50 AM To: '[EMAIL PROTECTED]' Subject: problem for mapping servlet Hi ! I'm trying to use tomcat-4.1.18 struts. 1.the mapping for struts ActionServlet class works fine : servlet servlet-nameaction/servlet-name servlet-classorg.apache.struts.action.ActionServlet/servlet-class [.] /servlet servlet-mapping servlet-nameaction/servlet-name url-pattern*.do/url-pattern /servlet-mapping 2.but I've got a mapping problem when calling the following servlet : servlet servlet-namecom.imsl.chart.ChartServlet/servlet-name servlet-classcom.imsl.chart.ChartServlet/servlet-class /servlet servlet-mapping servlet-namecom.imsl.chart.ChartServlet/servlet-name url-pattern/servlet/com.imsl.chart.ChartServlet/url-pattern /servlet-mapping I can't find where it fails. when I call http://myserver:8085/foliaTest/servlet/com.imsl.chart.ChartServlet I receive a 404. If anyone has suggestions about mapping ... Thanx ! Marc-Aurèle NGO XUAN Société Générale Asset Management SGAM/ALT/RIM 01 56 37 16 54 06 30 70 18 12 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --- Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.449 / Virus Database: 251 - Release Date: 1/27/2003 --- Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.449 / Virus Database: 251 - Release Date: 1/27/2003 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
getServletConfig returning null
Hello I am trying to understand how servlet configuration and initialization parameters work and am running into a difficulty in Tomcat Version 4.1.18 I have the following configuration in in web.xml file - servlet servlet-nameStarChartServlet/servlet-name servlet-classstarchart.StarChartServlet/servlet-class init-param param-namestarChartWorkingDirectory/param-name param-valueC:\temp\/param-value /init-param /servlet In the servlets init method, I have the following code: try { starChartWorkingDirectory = getServletConfig().getInitParameter(starChartWorkingDirectory); } catch (java.lang.Exception ie) { System.out.println(Init Exception = + ie.toString()); } and I am getting a null pointer exception thrown here... Nothing else appears to be wrong in the log files and the servlet does function except for this issue. Any help and guidance would be much appreciated! Thanks... Marc... - Do you think the software industry will ever make software that is as easy and reliable for a user to use as the automobile industry makes a car easy and reliable for a user to drive? A man said unto the universe - Sir, I exist! However, replied the universe I do not see where that creates in me a sense of an obligation. - Stephen Crane - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: getServletConfig returning null
Thanks Craig for your reply... Yes I read about using the init(ServletConfig config) version of init in the Javadocs... Trouble is I am not using this version of init, but AM using the parameterless version... :-( SO no joy yet! Perhaps I will try the parameter version and see if that helps... Marc... - Original Message - From: Craig R. McClanahan [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Sunday, February 16, 2003 3:52 PM Subject: Re: getServletConfig returning null On Sun, 16 Feb 2003, Marc Chamberlin wrote: Date: Sun, 16 Feb 2003 14:33:12 -0800 From: Marc Chamberlin [EMAIL PROTECTED] Reply-To: Tomcat Users List [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Subject: getServletConfig returning null Hello I am trying to understand how servlet configuration and initialization parameters work and am running into a difficulty in Tomcat Version 4.1.18 I have the following configuration in in web.xml file - servlet servlet-nameStarChartServlet/servlet-name servlet-classstarchart.StarChartServlet/servlet-class init-param param-namestarChartWorkingDirectory/param-name param-valueC:\temp\/param-value /init-param /servlet In the servlets init method, I have the following code: try { starChartWorkingDirectory = getServletConfig().getInitParameter(starChartWorkingDirectory); } catch (java.lang.Exception ie) { System.out.println(Init Exception = + ie.toString()); } and I am getting a null pointer exception thrown here... Nothing else appears to be wrong in the log files and the servlet does function except for this issue. Any help and guidance would be much appreciated! Thanks... The simplest way to cause this problem is to mess up your init(ServletConfig) method, and forget to call super.init(config) before calling getServletConfig(): public void init(ServletConfig config) throws ServletException { ... do some stuff but ... ... do not call super.init(config) ... String foo = getServletConfig().getInitParameter(foo); // NPE super.init(config); String bar = getServletConfig().getInitParameter(bar); // Works } The superclass init() method is where a pointer to the initial ServletConfig object gets saved, so that getServletConfig() can find it. To avoid ever embarassing yourself with this mistake (trust me, nearly everyone who programs servlets makes it at least once :-), you should change your servlets to use the no-args version of init(): public void init() throws ServletException { ... do some stuff ... } because the container will call the init(ServletConfig) method in the base class, which will in turn call your init() method -- no risk of forgetting the superclass call. Marc... Craig - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Jakarta-Tomcat 4.1.18 + FreeBSD + linux-sun-jdk14 won't start ...
When I try to start, using linux-sun-jdk14: Using CATALINA_BASE: /usr/local/jakarta-tomcat4.1 Using CATALINA_HOME: /usr/local/jakarta-tomcat4.1 Using CATALINA_TMPDIR: /usr/local/jakarta-tomcat4.1/temp Using JAVA_HOME: /usr/local/linux-sun-jdk1.4.1 Using CLASSPATH: /usr/local/linux-sun-jdk1.4.1/lib/tools.jar:/usr/local/jakarta-tomcat4.1/bin/bootstrap.jar it fails, missing a Class: Exception during startup processing java.lang.ClassNotFoundException: org.apache.catalina.startup.Catalina at org.apache.catalina.loader.StandardClassLoader.loadClass(StandardClassLoader.java:992) at org.apache.catalina.loader.StandardClassLoader.loadClass(StandardClassLoader.java:857) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:176) If I switch to using the native JDK: Using CATALINA_BASE: /usr/local/jakarta-tomcat4.1 Using CATALINA_HOME: /usr/local/jakarta-tomcat4.1 Using CATALINA_TMPDIR: /usr/local/jakarta-tomcat4.1/temp Using JAVA_HOME: /usr/local/jdk1.3.1 Using CLASSPATH: /usr/local/jdk1.3.1/lib/tools.jar:/usr/local/jakarta-tomcat4.1/bin/bootstrap.jar it all starts beautifully: [INFO] Http11Protocol - -Initializing Coyote HTTP/1.1 on port 8042 Starting service Tomcat-Standalone Apache Tomcat/4.1.18 [INFO] Http11Protocol - -Starting Coyote HTTP/1.1 on port 8042 [INFO] ChannelSocket - -JK2: ajp13 listening on 0.0.0.0/0.0.0.0:8043 [INFO] JkMain - -Jk running ID=0 time=17/118 config=/usr/local/jakarta-tomcat4.1/conf/jk2.properties I've tried using the linux-sun-jdk13, and get the same results as the jdk14 one ... is there a something that I need to add to my CLASSPATH that the linux version doesn't have? Thanks ... - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Best Way to Connect to httpd 2.0.40?
Hello, I am trying to setup tomcat to work with apache 2.0.40 on a redhat 8 machine. I tried mod_jk but, apache sys it's not compatible. Is there a way to build mod_jk for 2.0.40? Is there a binary? I would REALLY prefer not to compile apache, as the machine does not currently have any development libraries installed. Thanks for the help Marc Boorshtein -- Marc Boorshtein [EMAIL PROTECTED] signature.asc Description: This is a digitally signed message part
DBCP Factory
Hi, i am using 4.18 and i am wondering if its true that DBCP is the default factory for javax.sql.DataSource resource definitions. I read it in the JNDI DataSource tomcat docs. I defined the resource in the server.xml Resource name=jdbc/db2dbcp auth=Container type=javax.sql.DataSource/ ResourceParams name=jdbc/db2dbcp parameternamemaxActive/namevalue5/value/parameter [..] but on lookup it seems tomcat cant find the DBCP object factory. I searched for the DBCP libs and couldnt find it either. Now i am confused. 1. Is DBCP bundlded with 4.18 ? 2. is it true that i dont need to declare the factory inside parameter? thx for any hints, i am mainly puzzled since i heard that tyrex is not default anymore, but tyrex is the only pooling library i can find in the tomcat distro. Thanks for clearifying. --- greetings from Marc Logemann http://www.logemann.info - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: DBCP Factory
Hi, i tried also the factory paramter, w/o success, can somebody tell me where the DBCP lib should be? i checked common/lib, but didnt see something. DBCP is bundled with tomcat, but AFAIK is not the default factory for javax.sql.DataSource. According to http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-datasource-examples-h owto.htm you have to explicitly set the factory: namefactory/name valueorg.apache.commons.dbcp.BasicDataSourceFactory/value --- greetings from Marc Logemann http://www.logemann.info - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: DBCP Factory
Hi, ohhh i DLed the LE version, of course i thought that LE only means that libs like xml parser are missing, cause they are bundled in jdk1.4. But DBCP is missing too. Which file did you download ? tomcat-4.1.18.tar.gz contains jakarta-tomcat-4.1.18/common/lib/commons-dbcp.jar and the other jar files that belong to it. -Original Message- From: Marc Logemann [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 30, 2003 3:08 PM To: [EMAIL PROTECTED] Subject: RE: DBCP Factory i tried also the factory paramter, w/o success, can somebody tell me where the DBCP lib should be? i checked common/lib, but didnt see something. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --- greetings from Marc Logemann http://www.logemann.info - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Only localhost?
Hello, I installed Tomcat 4.1.18. Everything is working fine, but I can only access the server with localhost in Browser. Which settings prevent distant computers to access the files? (Sorry, perhaps this is easy.) Thank you, Marc -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Directory Authentication
I do not know the version you are using myself (I'm using 4.1.18), but you have to look into Realms. I found the following document about it on the jakarta site: http://jakarta.apache.org/tomcat/tomcat-3.3-doc/JDBCRealm-howto.html Marc - Original Message - From: Mazin Mohammed [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Sunday, 05 January 2003 12:05 Subject: Directory Authentication Hi I am using tomcat-3.3.1. How do i give directory authentication like .htaccess in tomcat ? Regards, -- Mazin Mohammed Vasnet Communication Pvt. Ltd System Administrator www.vasnet.co.in 0824-451001 [EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: access denied
What's the database you're using? MySQL? The other question is how you have defined the login for the database. Have you litterly stated [EMAIL PROTECTED] there? Marc - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, 24 December 2002 12:12 Subject: access denied hi all, i tried this code.. the below mentioned error is coming pl help javax.naming.Context ctx = new javax.naming.InitialContext(); if(ctx == null ) System.out.println(Context is null); else { javax.sql.DataSource ds1 = (javax.sql.DataSource)ctx.lookup (java:comp/env/TestDB); if (ds1 != null) { java.sql.Connection conn = ds1.getConnection(); - org.apache.jasper.JasperException: java.sql.SQLException: Invalid authorization specification: Access denied for user: '[EMAIL PROTECTED]' (Using password: YES) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:2 48) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295) T I A best regards sunil -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
How to create a MD5 digested password from a servlet?
Hi there, I've created a servlet that lets the user enter a new password for his/her account. Because I store the password in MD5 digested form in the database, I would like to call the org.apache.catalina.realm.RealmBase.Digest() method from the servlet (or some other function that returns the correct MD5 encrypted password). Unfortunatly, I get a class not found exception when this method is called. How can I create an MD5 encrypted password that I can store in the database? In Tomcat 4.0.1 I copied the whole catalina.jar file to the /WEB-INF/lib directory to solve this problem. In Tomcat 4.1.18 that solutions gives an TLD error. I'm using apache 1.3 / Tomcat 4.1.18 / MySQL 3.23. Kind regards, Marc
Problem configuring Apache + Tomcat 4.0.1
Hi, I'm trying to move from a configuration where everything is being served by tomcat to a configuration where apache is serving the static content and tomcat the dynamic content (using servlets). I think I'm almost there: authentication is working (using a JDBCRealm in tomcat) and the index.html is redirecting a new user to the servlet (http://domain/servlet/Admas). Unfortunatly, after the authentication is approved apache/tomcat returns a 404 message: /Admas is not found. Probably I have some directory misconfigured, but I can't find where. I must say that this is my first configuration, so I think I just misunderstand one or more of the parameters. I think I have set the context path incorrect, but I've tried several possibilities, but none of them worked. Any hints would be appreciated!! Here is my configuration: *** Directory tree *** /opt/jakarta/webapps/admas /opt/jakarta/webapps/admas/index.html /opt/jakarta/webapps/admas/servlet /opt/jakarta/webapps/admas/servlet/WEB-INF /opt/jakarta/webapps/admas/servlet/WEB-INF/web.xml /opt/jakarta/webapps/admas/servlet/WEB-INF/classes (empty) /opt/jakarta/webapps/admas/servlet/WEB-INF/lib (jars containing servlet code and some other stuff) *** part of httpd.conf *** WebAppConnection conn_admas_http warp localhost:8006 VirtualHost 192.168.44.2 ServerName admas.lokaal DocumentRoot /opt/jakarta/webapps/admas ErrorLog /var/log/httpd/admas_error_log CustomLog /var/log/httpd/admas_access_log combined WebAppDeploy servlet conn_admas_http /servlet Location /servlet/WEB-INF Options None AllowOverride None order deny,allow deny from all /Location /VirtualHost *** part of server.xml *** Service name=Admas-HTTP Connector className = org.apache.catalina.connector.warp.WarpConnector port=8006 minProcessors=3 maxProcessors=30 scheme=http secure=false enableLookups=true appBase=webapps acceptCount=10 debug=99/ Engine className = org.apache.catalina.connector.warp.WarpEngine name=Admas-HTTP debug=99 Logger className = org.apache.catalina.logger.FileLogger prefix=admas_http_log. suffix=.txt timestamp=true/ Realm className=org.apache.catalina.realm.JDBCRealm debug=99 driverName=com.mysql.jdbc.Driver connectionURL=jdbc:mysql://localhost/admas connectionName=x connectionPassword= userTable=user userNameCol=login userCredCol=password userRoleTable=userrole roleNameCol=role digest=MD5 / Host className = org.apache.catalina.connector.warp.WarpHost name=admas.lokaal debug=99 appBase=webapps/admas unpackWARs=false Context path = servlet docBase= webapps/admas/servlet reloadable=true debug=99 / /Host /Engine /Service *** web.xml *** ?xml version=1.0 encoding=ISO-8859-1? !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.2//EN http://java.sun.com/j2ee/dtds/web-app_2_2.dtd; web-app servlet servlet-nameAdmas/servlet-name servlet-classcom.vdgeijn.admas.servlet.Admas/servlet-class /servlet servlet servlet-nameauth/servlet-name servlet-classAuthServlet/servlet-class /servlet security-constraint web-resource-collection web-resource-nameAdmas/web-resource-name url-pattern/*/url-pattern /web-resource-collection auth-constraint role-name*/role-name /auth-constraint /security-constraint login-config auth-methodBASIC/auth-method realm-nameAdmas/realm-name /login-config /web-app -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
StandardContext can't find match
Can somebody please give me a hint what to change if I see the following lines in the logfile? I assume it is in web.xml, but using url-pattern doesn't solve the problem. 2002-12-18 15:33:25 StandardContext[/servlet]: Decoded relativeURI='/Admas' 2002-12-18 15:33:25 StandardContext[/servlet]: Trying exact match 2002-12-18 15:33:25 StandardContext[/servlet]: Trying prefix match 2002-12-18 15:33:25 StandardContext[/servlet]: Trying extension match 2002-12-18 15:33:25 StandardContext[/servlet]: Trying default match Thanks, Marc
Multiple organisations in one realm with unique logins per organisations?
Hi there, I'm developing an application which will support multiple organisations within one realm and one MySQL database. When users log into the application, I would like to make them enter their organisation name, their login and their password. Combining the login and the organisation name identifies the user unique in the realm/database. Is this possible with the standard authentication in Tomcat? Or are there other ways to do this? Thanks, Marc P.S. I hope I explained this problem correctly. Otherwise, just ask for more information. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Internal Server Configuration Error
Hi everybody!!! I'm trying to configure tomcat with apache. When I try to load the mod_jk.so library in apache, I get this error message: Syntax error on line 437 of /usr/local/etc/httpd/conf/httpd.conf: Cannot load /usr/home/parcbit/usr/local/etc/httpd/modules/mod_jk.so into server: Shared object libc.so.6 not found Any ideas??? Thank you all! Marc -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Internal Server Configuration Error
Hi everybody!!! I'm trying to configure tomcat with apache. When I try to load the mod_jk.so library in apache, I get this error message: Syntax error on line 437 of /usr/local/etc/httpd/conf/httpd.conf: Cannot load /usr/home/parcbit/usr/local/etc/httpd/modules/mod_jk.so into server: Shared object libc.so.6 not found Any ideas??? Thank you all! Marc -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Internal Server Configuration Error
Hi Roland, the line 437 tries to load the mod_jk.so library. I think that the libc.so.6 library is needed when using mod_jk.so, but I don't know how to fix this. Note: My OS is FreeBSD, apache is 1.3.19 and tomcat 4.1.12. Thanxs Marc Roland Carlsson wrote: Have you tried to look at line 437 in your http-conf. Verified that the path to libc.so.6 is correct? One not that qualified guess could be that it is something wrong with that. Check where the libc.so.6 is in your filesystem and then verify with line 437 in the http-conf. If you doesn't find the libc.so.6 or the path is different from what the http.conf says you have found the error. Regards Roland - Original Message - From: Marc [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Monday, November 18, 2002 4:08 PM Subject: Internal Server Configuration Error Hi everybody!!! I'm trying to configure tomcat with apache. When I try to load the mod_jk.so library in apache, I get this error message: Syntax error on line 437 of /usr/local/etc/httpd/conf/httpd.conf: Cannot load /usr/home/parcbit/usr/local/etc/httpd/modules/mod_jk.so into server: Shared object libc.so.6 not found Any ideas??? Thank you all! Marc -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Standalone Tomcat : suppress directory listing in web.xml
- Original Message - From: Craig R. McClanahan [EMAIL PROTECTED] You can suppress directory indexes in the $CATALINA_HOME/conf/web.xml file. See the listings init parameter for the default servlet. Read my previous post. You have complete control over which requests your filter applies to, because you are defining a filter-mapping for it. In particular, if you use a URL pattern of /* in your filter mapping, then *all* requests for your webapp will go through the filter. Ok, I'll check -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org
Standalone Tomcat : suppress directory listing in web.xml
Hi, I browse the archive, but I found just a part of the answer. I use Tomcat standalone (the app will run under tomcat 3.x and 4.x). I want to prevent access to directories, but I just want to configure this in the web.xml file of my app, nowhere else ! As u see below, the web.xml is quite simple ! web-app servlet servlet-nameWindexServer/servlet-name servlet-classwindexserver.servlet.WindexServlet/servlet-class init-param param-namePropertiesFileName/param-name param-valueD:/Appli/tomcat/webapps/WindexServer/WS_Manager/internal/config .ini/param-value /init-param /servlet servlet-mapping servlet-nameWindexServer/servlet-name url-pattern/WindexServer/url-pattern /servlet-mapping /web-app If u have any idea :-)) -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org
Re: Standalone Tomcat : suppress directory listing in web.xml
Hi, Yes, but it means that I change the behaviour of the others app ! - Original Message - From: Kiev [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Tuesday, November 05, 2002 3:55 PM Subject: Re: Standalone Tomcat : suppress directory listing in web.xml If you set the following param for the default servlet to false, in the CATALINA_HOME/conf/web.xml it will forbid directory listing for all web-apps. lthoug I haven't checked how to do it for the webapp web.xml file. init-param param-namelistings/param-name param-valuefalse/param-value /init-param Kiev -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org
Re: Standalone Tomcat : suppress directory listing in web.xml
Opps, I have tested this in the conf/web.xml file : no effect ! init-param param-namelistings/param-name param-valuefalse/param-value /init-param Kiev -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org
Re: Standalone Tomcat : suppress directory listing in web.xml
- Original Message - From: Turner, John [EMAIL PROTECTED] Did you search the archives? This topic has come up several times before. Do some research! And... do read my posts ! 1. I browsed the archive 2. The solutions does not work. I want to change the web.xml of the app. I usually use mailing list, so I know there is archive (I spend 1 hour this morning to get solutions). Most of the time, people can change conf/web.xml or server.xml. I can't. But thanks to remind me of how to use ML :-) -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org
shared session between http and https
To share a session between http and https I've tryed to add the JSESSIONID to the url: a href=https://localhost:8443/testhttps/page2.jsp?JSESSIONID=%=request.getSe ssion().getId()%to https/a but this doesn't work in Mozilla or Opera for instance: a new session is created (in IE cookies are shared between http and https). Any idea? Marc. -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org
Tomcat 4.1.12 forgets char encodings?
Hi! Our Javascript is sending a String via post to a serlvet running on Tomcat 4.1.12. After some time, e.g. some days, running, Tomcat seems to forget the ability to decode characters properly. German special characters (a-umlaut etc.) are received as ?. After restart of tomcat it works fine again. How can this be, does this problem sound familiar to anyone? Regards, marc -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org