Re: Embedding custom metadata in a jsp page; access generated Class via reflection?
Thanks very much to all who replied! The suggestions based on requiring jspx as the jsp-file format are unfortunately not possible. That's too much to require of users of the new framework. And non-xml jsp is really hard to parse. So I think that the suggestions involving scanning the .jsp myself are not going to be feasable. And sordid container-specific hacks are not really tempting either ;-). As there doesn't seem to be any reasonably portable solution, I'll take Bill and Mikolaj's advice and drop this idea (ie only support metadata via companion .xml files). I might propose the idea of jsp metadata to the jsp group for the next spec version though. It seems to me that all that is really missing is an api something like RequestDispatcher.getServletClass() to get the class that will handle the url that the RequestDispatcher wraps. Then it would be possible to get the class of the servlet generated from the jsp. Hmm..in the case of jsp, this would need to return not the JspServlet that compiles the jsps, but the generated class, so it's not trivial. There's probably a solution somewhere though.. Thanks again, Simon Bill Barker schrieb: As Mikolaj pointed out, there is absolutely no way to do this that will be compatible across containers. And, even for Tomcat only, this isn't going to be easy. Tomcat (or, more correctly Jasper) doesn't publish this information in any form that can be reliably read (e.g. JMX). Partially this is because the class name may change if you are running in developement mode (where it re-compiles changed JSP pages on the fly). I can think of various sordid container-specific hacks based on getClassLoader().getResources(...), but I'm sure that you can think of them too ;). If this was for one webapp, then I'd just pre-compile all the JSP pages before deploying, and have a catalog that maps servlet-path to classname. For a framework, I can't think of anything better than a ResponseWrapper that handles requests with reserved query-strings. But this is ugly enough, that personally I'd just stick with the separate .xml file. Simon Kitching [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Mikolaj Rydzewski schrieb: Simon Kitching wrote: Or perhaps someone can suggest an alternate approach to embedding metadata that can be accessed before the page renders? Please provide as with more details, at this point your requirement is a little bit strange. Have you considered using filters? Ok, here are some more details. I'm working on the myfaces orchestra flow project (for JavaServer Faces, aka JSF). It allows one JSF page to call another JSF page like a subroutine, passing parameters and allows the called page(s) to simply return to the page that called them, passing back results. This makes navigation between pages easier, makes the data passing explicit, and avoids any potential variablename collisions by setting up a completely clean scope for the called page to run in, with only the passed variables visible. When a call to a page is done, the page from which the call is made must declare metadata about what the parameters to be passed are, and what logical service the called page provides. The called page also needs to declare what input parameters it expects, and what logical service it provides. Think of this like a Java method prototype (which is also metadata, and can be queried via java reflection). The code where this metadata is needed is in a JSF ViewHandler, which is indirectly called from the JSF FacesServlet class, after the user has submitted a form. The metadata is used for sanity-checking of the call and setting up of the passed parameters (rearrangement of variables in the http session scope etc). Then a forward to the called page is done. As described in the original email, this is currently done by looking for a .xml file sitting beside each .jsp. It works ok, and for any JSF view mechanism (jsp, facelets, clay, etc). But some people might find embedding the information in the actual page to be nicer to work with. Doing this with Facelets isn't too hard, but embedding the necessary info into a jsp page is straining my jsp knowledge considerably :-) However I think the issue is a generic one, not anything specific to this particular case: I want to add metadata to a jsp page, just like java annotations provide static metadata about a class without needing to create an instance and execute it. I would think that being able to annotate a jsp would be useful for many purposes. Regards, Simon - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Session replication problem in tomcat 6.0.14 (loadbalancing with Apache)
Hello all, I am trying to do session replication in two tomcats (using Apache to do the loadbalancing). Ran the examples application and put a value in to the session. Now stopped the tomcat where the session is set. Submitted the URL again. Web page showed no value in the session. I think the session value is not tranfered. In the log file, i could see the following happenning. Help me with this to identiry why the error and how to do the session replication. I am using Tomcat 6.0.14 on JDK 1.6 Jul 30, 2008 1:49:24 PM org.apache.catalina.ha.tcp.SimpleTcpCluster memberDisappeared INFO: Received member disappeared:org.apache.catalina.tribes.membership.MemberImpl[tcp://d5-4232.xius.ltd:4002,d5-4232.xius.ltd,4002, alive=46858,id={-38 -119 -88 -15 -57 -62 77 116 -98 -70 -92 -50 45 -83 -71 -74 }, payload={}, command={66 65 66 89 45 65 76 69 88 ...(9)}, domain={}, ] Jul 30, 2008 1:49:40 PM org.apache.catalina.ha.tcp.SimpleTcpCluster send SEVERE: Unable to send message through cluster sender. org.apache.catalina.tribes.ChannelException: No destination given; No faulty members identified. at org.apache.catalina.tribes.group.GroupChannel.send(GroupChannel.java:194) at org.apache.catalina.tribes.group.GroupChannel.send(GroupChannel.java:175) at org.apache.catalina.ha.tcp.SimpleTcpCluster.send(SimpleTcpCluster.java:835) at org.apache.catalina.ha.tcp.SimpleTcpCluster.sendClusterDomain(SimpleTcpCluster.java:814) at org.apache.catalina.ha.session.JvmRouteBinderValve.sendSessionIDClusterBackup(JvmRouteBinderValve.java:391) at org.apache.catalina.ha.session.JvmRouteBinderValve.changeSessionID(JvmRouteBinderValve.java:362) at org.apache.catalina.ha.session.JvmRouteBinderValve.handleJvmRoute(JvmRouteBinderValve.java:319) at org.apache.catalina.ha.session.JvmRouteBinderValve.handlePossibleTurnover(JvmRouteBinderValve.java:229) at org.apache.catalina.ha.session.JvmRouteBinderValve.invoke(JvmRouteBinderValve.java:206) at org.apache.catalina.ha.tcp.ReplicationValve.invoke(ReplicationValve.java:347) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:263) at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:190) at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:283) at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:767) at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:697) at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:889) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:690) at java.lang.Thread.run(Thread.java:619
java_home in tomcat6
Hi all, I have a problem with setting JAVA_HOME variable in Tomcat 6.0.16. When I set it in catalina.bat as: set JAVA_HOME=C:\Program Files\Java\jdk1.6.0_07 set JRE_HOME=C:\Program Files\Java\jdk1.6.0_07\jre I get an error: Files\Java\jdk1.6.0_07 was unexpected at this time. But when I do exactly the same in Tomcat 5.5.26, everything goes well: Using CATALINA_BASE: C:\apache-tomcat-5.5.26 Using CATALINA_HOME: C:\apache-tomcat-5.5.26 Using CATALINA_TMPDIR: C:\apache-tomcat-5.5.26\temp Using JRE_HOME:C:\Program Files\Java\jdk1.6.0_07\jre I tried to embrace java_home value with quotation marks or apostrophes, but the error remained. Any ideas? -- View this message in context: http://www.nabble.com/java_home-in-tomcat6-tp18728870p18728870.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: java_home in tomcat6
From: zorglub76 [mailto:[EMAIL PROTECTED] I have a problem with setting JAVA_HOME variable in Tomcat 6.0.16. When I set it in catalina.bat as: set JAVA_HOME=C:\Program Files\Java\jdk1.6.0_07 set JRE_HOME=C:\Program Files\Java\jdk1.6.0_07\jre I get an error: Files\Java\jdk1.6.0_07 was unexpected at this time. Install the JDK to a location that doesn't have spaces in the path (I use C:\java). Yes, it's a fudge. It also works :-). - Peter - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: jsp compile question
- Original Message - From: Jq [EMAIL PROTECTED] To: users@tomcat.apache.org Sent: Tuesday, July 29, 2008 11:05 PM Subject: jsp compile question How can I simulate the way tomcat builds a jsp file? I need to debug a .jsp that fails to build when requested. Thanks. Jq... what IDE are you using ? On Netbeans its like this... You right click on the actual JSP and compile it... if there is an error it takes you to the line. The other thing is that once you have run... just the JSP once... if you right click on it... it will show you the JSP.JAVA file... so you can see how the JSP has turned into Java... and its sometimes easier to spot a whoopsie... --- HARBOR : http://www.kewlstuff.co.za/index.htm The most powerful application server on earth. The only real POJO Application Server. See it in Action : http://www.kewlstuff.co.za/cd_tut_swf/whatisejb1.htm --- - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: java_home in tomcat6
i havent used windows, but in linux i frequently face this problem due to spaces in between. so you should better install it at a location other than Program Files i am surprised over how you got tc5 working this way !! also, did you try single-quotes as well as double-quotes ? On Wed, 30 Jul 2008 14:28:56 +0530, zorglub76 [EMAIL PROTECTED] wrote: Hi all, I have a problem with setting JAVA_HOME variable in Tomcat 6.0.16. When I set it in catalina.bat as: set JAVA_HOME=C:\Program Files\Java\jdk1.6.0_07 set JRE_HOME=C:\Program Files\Java\jdk1.6.0_07\jre I get an error: Files\Java\jdk1.6.0_07 was unexpected at this time. But when I do exactly the same in Tomcat 5.5.26, everything goes well: Using CATALINA_BASE: C:\apache-tomcat-5.5.26 Using CATALINA_HOME: C:\apache-tomcat-5.5.26 Using CATALINA_TMPDIR: C:\apache-tomcat-5.5.26\temp Using JRE_HOME:C:\Program Files\Java\jdk1.6.0_07\jre I tried to embrace java_home value with quotation marks or apostrophes, but the error remained. Any ideas? -- Using Opera's revolutionary e-mail client: http://www.opera.com/mail/ - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: java_home in tomcat6
I left this as the last solution. In fact, I'd be OK with having java 1.5 with the Tomcat. I just wanted to find the part of startup code that causes this issue. Obviously, I only need some quotes somewhere, and I hoped someone could point me that spot. I'll keep searching for that. Peter Crowther wrote: From: zorglub76 [mailto:[EMAIL PROTECTED] I have a problem with setting JAVA_HOME variable in Tomcat 6.0.16. When I set it in catalina.bat as: set JAVA_HOME=C:\Program Files\Java\jdk1.6.0_07 set JRE_HOME=C:\Program Files\Java\jdk1.6.0_07\jre I get an error: Files\Java\jdk1.6.0_07 was unexpected at this time. Install the JDK to a location that doesn't have spaces in the path (I use C:\java). Yes, it's a fudge. It also works :-). - Peter - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/java_home-in-tomcat6-tp18728870p18729835.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: java_home in tomcat6
- Original Message - From: zorglub76 [EMAIL PROTECTED] To: users@tomcat.apache.org Sent: Wednesday, July 30, 2008 10:58 AM Subject: java_home in tomcat6 Hi all, I have a problem with setting JAVA_HOME variable in Tomcat 6.0.16. When I set it in catalina.bat as: set JAVA_HOME=C:\Program Files\Java\jdk1.6.0_07 set JRE_HOME=C:\Program Files\Java\jdk1.6.0_07\jre I get an error: Files\Java\jdk1.6.0_07 was unexpected at this time. But when I do exactly the same in Tomcat 5.5.26, everything goes well: Using CATALINA_BASE: C:\apache-tomcat-5.5.26 Using CATALINA_HOME: C:\apache-tomcat-5.5.26 Using CATALINA_TMPDIR: C:\apache-tomcat-5.5.26\temp Using JRE_HOME:C:\Program Files\Java\jdk1.6.0_07\jre I tried to embrace java_home value with quotation marks or apostrophes, but the error remained. Any ideas? -- View this message in context: http://www.nabble.com/java_home-in-tomcat6-tp18728870p18728870.html Sent from the Tomcat - User mailing list archive at Nabble.com. DOS is just painful I think somewhere its been set like this... set JAVA_HOME=C:\Program Files\Java\jdk1.6.0_07 should be set JAVA_HOME=C:\Program Files\Java\jdk1.6.0_07 then later its doing something like \bin and thats becoming C:\Program Files\Java\jdk1.6.0_07\bin and thats the error... Turn off echo at the top of the page ie @echo off becomes rem @echo off so you can see what every line does... also echo %JAVA_HOME% will show you what it actually is at various places... I think its been set twice somewhere Good luck... BTW... on windows I find its easier to just let users install the service... you can change it from there... And in Netbeans... instead of messing with tomcat bats... just install all the versions and show NB where they are from the server manager... then you can just tell your webapp which TC to use in the run properties... ie... we never ever have to play with the BAT files on windows... nor does the client.. --- HARBOR : http://www.kewlstuff.co.za/index.htm The most powerful application server on earth. The only real POJO Application Server. See it in Action : http://www.kewlstuff.co.za/cd_tut_swf/whatisejb1.htm --- - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: java_home in tomcat6
eg on NB if I want the webapp to use Java 5 and I want it to use TC 5.5... On the project... right click properties-run --- pick the TC you want... On the project... right click properties-lib... and pick the JRE you want. On the server... the JRE used is in the Java Tab... You never have to mess with a BAT... NB will start TC with the right JRE EVEN IF the service or BAT files are pointing else where... Makes testing on various TC's very easy... --- HARBOR : http://www.kewlstuff.co.za/index.htm The most powerful application server on earth. The only real POJO Application Server. See it in Action : http://www.kewlstuff.co.za/cd_tut_swf/whatisejb1.htm --- - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: receiving 404 page not found from godaddy.com
Hi I have tried godaddy's Shared hosting and i had the sme problem and they gave me the same answer that upgrade to dedicated server, so then i though i will try something. first of all they are still using tomcat 4.4.x something and java 1.4(or may be 1.3 i dont remember properly), so first create that environment on ur pc and test it an then upload it. i was able to run index.jsp which was just pure jsp, but my other pages didnt work as i was using Spring framework they were giving the same error page not found, and reason is that because of old java version they are not able to support spring framework. So i had to leave the godaddy Shared hosting and when i did RD for dedicated servers, again i landed buying Godaddy's virtual dedictaed Server(they were better then other provider in terms of money as well as the server configuration they were providing). Now i am quite happy with it. Best of luck with godaddy's shared hosting deployment and stupid Technical support on it. Thanks, Ravi. On Tue, Jul 29, 2008 at 3:44 PM, jim stone [EMAIL PROTECTED] wrote: I have a small jsp application which I packaged as a war file and deployed to my godaddy user account. The war exploded as expected. In my webapp, under the newly exploded context root, I am able to hit the html files, however, the jsp's are giving me a 404 not found. I have tested this locally using tomcat 5.5 and it works like a charm. I've contacted godaddy.com to find out what may be the reason for the 404 error and all the rep said was that my account is not showing any errors and that's all he could do for me. He said they could not help with deployment issues. If I wanted better diagnostics, I needed to upgrade to a dedicated server. I do have java/jsp enabled for the site so it should work. I chose to deploy as a war because it's much easier to deploy, however, I'm wondering if I should deploy the file individually. Has anyone had this same experience with deploying war files to godaddy.com. I'm considering using another host as I've had nothing but problems with this company. -- View this message in context: http://www.nabble.com/receiving-404-page-not-found-from-godaddy.com-tp18712493p18712493.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: java_home in tomcat6
:confused::confused::confused: I commented out the @echo off line of catalina.bat and server started with no problems. Then I removed comments, and it still worked... I don't get it. But anyway, the server is chugging happily.. zorglub76 wrote: Hi all, I have a problem with setting JAVA_HOME variable in Tomcat 6.0.16. When I set it in catalina.bat as: set JAVA_HOME=C:\Program Files\Java\jdk1.6.0_07 set JRE_HOME=C:\Program Files\Java\jdk1.6.0_07\jre I get an error: Files\Java\jdk1.6.0_07 was unexpected at this time. But when I do exactly the same in Tomcat 5.5.26, everything goes well: Using CATALINA_BASE: C:\apache-tomcat-5.5.26 Using CATALINA_HOME: C:\apache-tomcat-5.5.26 Using CATALINA_TMPDIR: C:\apache-tomcat-5.5.26\temp Using JRE_HOME:C:\Program Files\Java\jdk1.6.0_07\jre I tried to embrace java_home value with quotation marks or apostrophes, but the error remained. Any ideas? -- View this message in context: http://www.nabble.com/java_home-in-tomcat6-tp18728870p18732863.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Setting up Comet on Tomcat 6
does your servlet iimplement the CometProcessor interface? Filip Talal Rabaa wrote: Hello! I apologize if this question has been asked many times before. I've searched quite a bit for concrete answers on how to setup Comet but I'm having no luck. From what I understand, all that is needed to successfully set it up is to replace the default connector with either NIO or APR. My connector looks like: Connector port=8080 protocol=org.apache.coyote.http11.Http11AprProtocol maxThreads=2000 connectionTimeout=6 redirectPort=8443/ The Tomcat logs show APR initializing without error, however my CometProcessor implementation doesn't receive event() calls. It does receive service() calls which I use to bump an error. Without service() throwing an error, doGet() is being called in my tests. What can I do to resolve this issue? Better yet, is there a flag I can set somewhere which would allow me to debug the issue further? Your help is greatly appreciated! T. Anthony Rabaa Senior Programmer Analyst Emergis Product Development Kanata, Ontario, Canada (613) 287-3134, Extension 266 - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: HttpSessionListener session listener in tomcat cluster
Madonesa sanjaya wrote: Hi, I have deployed my application on a clustered environment and used session created event to monitor the number of users login to each machine (Using SNMP MIB counters). But once a user is login to one machine counter gets updated in every machine. I believe this is due to session replication. Is there any way to gets a count of logins to each machine using HTTPSessionListener when the session replication is enabled. Thnx, Sanjaya. there is a setting called |notifyListenersOnReplication you can set to true of false http://tomcat.apache.org/tomcat-6.0-doc/config/cluster-manager.html Filip | - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Session replication problem in tomcat 6.0.14 (loadbalancing with Apache)
this Jul 30, 2008 1:49:24 PM org.apache.catalina.ha.tcp.SimpleTcpCluster memberDisappeared INFO: Received member disappeared:org.apache.catalina.tribes.membership.MemberImpl[tcp://d5-4232.xius.ltd:4002,d5-4232.xius.ltd,4002, alive=46858,id={-38 -119 -88 -15 -57 -62 77 116 -98 -70 -92 -50 45 -83 -71 -74 }, payload={}, command={66 65 66 89 45 65 76 69 88 ...(9)}, domain={}, ] indicates that the other node is not part of the cluster anymore. what does your config look like? Filip Pavan Singaraju wrote: Hello all, I am trying to do session replication in two tomcats (using Apache to do the loadbalancing). Ran the examples application and put a value in to the session. Now stopped the tomcat where the session is set. Submitted the URL again. Web page showed no value in the session. I think the session value is not tranfered. In the log file, i could see the following happenning. Help me with this to identiry why the error and how to do the session replication. I am using Tomcat 6.0.14 on JDK 1.6 Jul 30, 2008 1:49:24 PM org.apache.catalina.ha.tcp.SimpleTcpCluster memberDisappeared INFO: Received member disappeared:org.apache.catalina.tribes.membership.MemberImpl[tcp://d5-4232.xius.ltd:4002,d5-4232.xius.ltd,4002, alive=46858,id={-38 -119 -88 -15 -57 -62 77 116 -98 -70 -92 -50 45 -83 -71 -74 }, payload={}, command={66 65 66 89 45 65 76 69 88 ...(9)}, domain={}, ] Jul 30, 2008 1:49:40 PM org.apache.catalina.ha.tcp.SimpleTcpCluster send SEVERE: Unable to send message through cluster sender. org.apache.catalina.tribes.ChannelException: No destination given; No faulty members identified. at org.apache.catalina.tribes.group.GroupChannel.send(GroupChannel.java:194) at org.apache.catalina.tribes.group.GroupChannel.send(GroupChannel.java:175) at org.apache.catalina.ha.tcp.SimpleTcpCluster.send(SimpleTcpCluster.java:835) at org.apache.catalina.ha.tcp.SimpleTcpCluster.sendClusterDomain(SimpleTcpCluster.java:814) at org.apache.catalina.ha.session.JvmRouteBinderValve.sendSessionIDClusterBackup(JvmRouteBinderValve.java:391) at org.apache.catalina.ha.session.JvmRouteBinderValve.changeSessionID(JvmRouteBinderValve.java:362) at org.apache.catalina.ha.session.JvmRouteBinderValve.handleJvmRoute(JvmRouteBinderValve.java:319) at org.apache.catalina.ha.session.JvmRouteBinderValve.handlePossibleTurnover(JvmRouteBinderValve.java:229) at org.apache.catalina.ha.session.JvmRouteBinderValve.invoke(JvmRouteBinderValve.java:206) at org.apache.catalina.ha.tcp.ReplicationValve.invoke(ReplicationValve.java:347) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:263) at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:190) at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:283) at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:767) at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:697) at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:889) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:690) at java.lang.Thread.run(Thread.java:619 - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: java_home in tomcat6
OK. You may have reinstalled Java already, but there is another way to do this. You can use the 8.3 file name for C:\Program Files. Windows always creates this for every directory and file that doesn't fall into the pattern. This works on XP and Server 2003. I assume it will work on any Windows version that allows you to create objects not following the pattern. Steps: 1. Open a command prompt. 2. Navigate to the root directory of your C: drive. 3. Type dir /X (without the quotes, of course) at the prompt. 4. Look for the Program Files directory. 5. Use 8.3 pattern in batch file (PROGRA~1 in the example below) (Will I ever stop saying without quotes?) C:\dir /X Volume in drive C has no label. Volume Serial Number is 1C5C-25CF Directory of C:\ 03/22/2007 11:27 AM 1,024 RND~1.rnd 06/28/2004 02:35 PM 0 AUTOEXEC.BAT 06/28/2004 02:35 PM 0 CONFIG.SYS 07/08/2008 03:29 PMDIR DOCUME~1 Documents and Settings 07/30/2008 07:24 AMDIR eclipse 06/28/2004 02:54 PMDIR I386 06/28/2004 03:02 PMDIR IBMTOOLS 03/04/2008 08:50 AMDIR jvmstat 01/30/2006 04:14 PMDIR OpenSSL 07/25/2006 06:23 AMDIR Ora10g 07/15/2004 08:12 AMDIR ora9i 07/15/2004 08:11 AMDIR ORATEMP 03/11/2008 08:16 AMDIR Perl 07/08/2008 04:19 PMDIR PROGRA~1 Program Files Although it's not necessary to change it, jdk1.6.0_07 doesn't fit the pattern either. Windows should create an 8.3 name like JDK16~1.0_0 (There, I didn't say it. ;) ). - Bill -Original Message- From: zorglub76 [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 30, 2008 8:12 AM To: users@tomcat.apache.org Subject: Re: java_home in tomcat6 :confused::confused::confused: I commented out the @echo off line of catalina.bat and server started with no problems. Then I removed comments, and it still worked... I don't get it. But anyway, the server is chugging happily.. zorglub76 wrote: Hi all, I have a problem with setting JAVA_HOME variable in Tomcat 6.0.16. When I set it in catalina.bat as: set JAVA_HOME=C:\Program Files\Java\jdk1.6.0_07 set JRE_HOME=C:\Program Files\Java\jdk1.6.0_07\jre I get an error: Files\Java\jdk1.6.0_07 was unexpected at this time. But when I do exactly the same in Tomcat 5.5.26, everything goes well: Using CATALINA_BASE: C:\apache-tomcat-5.5.26 Using CATALINA_HOME: C:\apache-tomcat-5.5.26 Using CATALINA_TMPDIR: C:\apache-tomcat-5.5.26\temp Using JRE_HOME:C:\Program Files\Java\jdk1.6.0_07\jre I tried to embrace java_home value with quotation marks or apostrophes, but the error remained. Any ideas? -- View this message in context: http://www.nabble.com/java_home-in-tomcat6-tp18728870p18732863.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
adding a virtual host with jmx
hi all, I'm creating a web application for auto deploying virtual host through apache and tomcat on a production server. Everything is ok except for the Tomcat part: As tomcat can't be reloaded and as i can't restart anytime I want, I 've heard jmx was great cause it was possible to modify a running tomcat (is the english expression is on the fly?). So, Connection to Mbean server is ok... My problem is : when i invoke the addChild (org.apache.catalina.core.Container) method of Engine I get this error: java.io.NotSerializableException: org.apache.catalina.util.LifecycleSupport at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1156) at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1509)... So i try to create my own addChildByString(String;String,String,String) which takes the appabase and the name of th virtual host, and path and docBase of the first needed context. But i've got a problem with the context now, GRAVE: Error getConfigured (and nothing else) i'm a little lost with all the classes and functions and I haven't found any docs about adding vh by jmx. has anyone tried to add and directly make worked a virtual host and a context on a running tomcat ? thx, Olivier
WAR files updates not recognized by Tomcat
Hi, when deploying a web application as a WAR archive the archive is automatically unpacked to a directory by tomcat but the WAR file stays as is on the disk. When this WAR file is later updated while the tomcat is NOT running tomcat will not notice the update when it is started afterwards. That is, it will continue to use the files from the old directory that it created on its own and ignore the new WAR. A possible workaround is of course to delete the directory (tomcat will automatically unpack the new WAR and restart the servlet then if it's running, otherwise after it is started). Is this a known bug? Or is it possible to make tomcat check its WARs instead? Thanks a lot in advance! __ Gesendet von Yahoo! Mail. Dem pfiffigeren Posteingang. http://de.overview.mail.yahoo.com - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: WAR files updates not recognized by Tomcat
What version of tomcat are you running? Signed, Alessandro Ferrucci :) On Wed, Jul 30, 2008 at 10:46 AM, Torsten [EMAIL PROTECTED] wrote: Hi, when deploying a web application as a WAR archive the archive is automatically unpacked to a directory by tomcat but the WAR file stays as is on the disk. When this WAR file is later updated while the tomcat is NOT running tomcat will not notice the update when it is started afterwards. That is, it will continue to use the files from the old directory that it created on its own and ignore the new WAR. A possible workaround is of course to delete the directory (tomcat will automatically unpack the new WAR and restart the servlet then if it's running, otherwise after it is started). Is this a known bug? Or is it possible to make tomcat check its WARs instead? Thanks a lot in advance! __ Gesendet von Yahoo! Mail. Dem pfiffigeren Posteingang. http://de.overview.mail.yahoo.com - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Adding contextPath to request using a Valve
I'm trying to automatically assign a context path to requests from a specific URL using a Valve, so in the following example code requests to the URL http://www.site2.com should hit my Context in server.xml with the path /site2 : public void invoke(Request request, Response response) throws java.io.IOException, javax.servlet.ServletException { if(request.getRequestURL().indexOf(www.site2.com) != -1) { request.setContextPath(/site2); System.out.println(Context path set to + request.getContextPath()); } getNext().invoke(request, response); } The system out is being called so I would have expected the same behaviour that I get when I type http://www.site2.com/site2 into the browser. However, the default Context is being hit. Is this something anyone has tried to do using a Valve or is there any better way to achieve this kind of behaviour. Any advice would be very much appreciated. Ronny. -- View this message in context: http://www.nabble.com/Adding-contextPath-to-request-using-a-Valve-tp18737761p18737761.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Setting up Comet on Tomcat 6
Thanks for your reply! Yes, it does implement the CometProcessor method. It's just a simple shell class displaying messages to System.out for event(), service(), init() and the constructor. My hope is to verify Tomcat is running with Comet properly before I attempt to put any meat into this class. Anthony On 30/07/08 9:27 AM, Filip Hanik - Dev Lists [EMAIL PROTECTED] wrote: does your servlet iimplement the CometProcessor interface? Filip Talal Rabaa wrote: Hello! I apologize if this question has been asked many times before. I've searched quite a bit for concrete answers on how to setup Comet but I'm having no luck. From what I understand, all that is needed to successfully set it up is to replace the default connector with either NIO or APR. My connector looks like: Connector port=8080 protocol=org.apache.coyote.http11.Http11AprProtocol maxThreads=2000 connectionTimeout=6 redirectPort=8443/ The Tomcat logs show APR initializing without error, however my CometProcessor implementation doesn't receive event() calls. It does receive service() calls which I use to bump an error. Without service() throwing an error, doGet() is being called in my tests. What can I do to resolve this issue? Better yet, is there a flag I can set somewhere which would allow me to debug the issue further? Your help is greatly appreciated! T. Anthony Rabaa Senior Programmer Analyst Emergis Product Development Kanata, Ontario, Canada (613) 287-3134, Extension 266 - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: address bar shows ip instead of domain name
how do i map to the domain name itself.. When I do /mydomain.com to /mywebapp/welcome.action, it only works if I type this in the browser: http://00.00.00.00:8080/mydomain.com. then it goes to http://00.00.00.00:8080/mywebapp/welcome.action but I have created a record for mydomain.com to go to the ip of 00.00.00.00, same as above ip. My question is how can I map to the mydomain.com to go to http://00.00.00.00 and based on that go to http://00.00.00.00:8080/mywebapp/welcome.action?? nilanthan wrote: Thanks Ken for all your help! Ken Bowen wrote: In rule, map /mydomain.com to /mywebapp/welcome.action in outbound-rule, map /mywebapp/welcome.action to /mydomain.com Do that for welcome, register, and every other page. Depending on the rules you need, you can make some use of regular expressions. On Jul 29, 2008, at 10:25 AM, nilanthan wrote: Thanks. I have placed the files/codes in the right spots and when I do localhost:8080/mywebapp/rewrite-status I get the urlrewrite page. But what i need is when a user types in the browser www.mydomain.com, it should go to http://00.00.00.00:8080/mywebapp/welcome.action but still display http://www.mydomain.com and when I click on a link, it should take my to ex. http://00.00.00.00:8080/mywebapp/register.action but in the address bar show http://www.mydomain.com/register.action. Can you use this example for the urlrewrite and where to place the codes? Thanks. Ken Bowen wrote: I don't know of any tutorial -- I found the documentation gave me enough guidance. It's really pretty straight-forward. Drop a filter definition like this in your web.xml: filter filter-nameUrlRewriteFilter/filter-name filter- classorg.tuckey.web.filters.urlrewrite.UrlRewriteFilter/ filter-class !-- init-param param-namelogLevel/param-name param-valuesysout:DEBUG/param-value /init-param -- /filter filter-mapping filter-nameUrlRewriteFilter/filter-name url-pattern/*/url-pattern dispatcherFORWARD/dispatcher dispatcherREQUEST/dispatcher /filter-mapping Then add a file urlrewrite.xml in your WEB-INF containing mappings in the following spirit: rule from^/PrivacyPolicy$/from to type=forward/PrivacyPolicy.do/to /rule outbound-rule from^/PrivacyPolicy.do$/from to/PrivacyPolicy/to /outbound-rule The outbound-rule describes how to map something going from the server to the browser, and the (inbound) rule describes how to map what you mapped on output (now coming back from the browser) back into what you need to see on input. If you removed the comment symbols in the filter element, you get detailed debugging ouptut. Hope this helps. Ken On Jul 28, 2008, at 6:16 PM, nilanthan wrote: Thanks. I have looked at that before but am a bit confused about the instructions. Is there a good tutorial for this urlrewrite? Ken Bowen wrote: Apply a rewrite filter (http://tuckey.org/urlrewrite/) to map the ip expression to what you want. ken On Jul 28, 2008, at 5:36 PM, nilanthan wrote: So what Can I do so that that domain goes to that address but shows the domain in the address bar? Yuval Perlov wrote: Where ever you forward, that's what the address bar shows On Jul 28, 2008, at 7:45 PM, nilanthan wrote: Hi, I have a website hosted on netfirms. I have a domain,exmaple, mydomain.com and it forwards to an address http:/xx.xx.xxx.xx:8080/folder1/ welcome.action where xx is the ip of the server. Im runningTomcat 5.5 alone without apache. The problem is that when a users goes to www.mydomain.com, it takes them to the site but in the address bar it shows http:/xx.xx.xxx.xx:8080/folder1/welcome.action instead of mydomain.com. Is this an issue with DNS or something in Tomcat? I will have multiple sites running in the future so I cannot place the site folder in the ROOT directory. Thanks. -- View this message in context: http://www.nabble.com/address-bar-shows-ip-instead-of-domain-name-tp18694567p18694567.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/address-bar-shows-ip-instead-of-domain-name-tp18694567p1863.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For
Re: Setting up Comet on Tomcat 6
send us your test class Filip Talal Rabaa wrote: Thanks for your reply! Yes, it does implement the CometProcessor method. It's just a simple shell class displaying messages to System.out for event(), service(), init() and the constructor. My hope is to verify Tomcat is running with Comet properly before I attempt to put any meat into this class. Anthony On 30/07/08 9:27 AM, Filip Hanik - Dev Lists [EMAIL PROTECTED] wrote: does your servlet iimplement the CometProcessor interface? Filip Talal Rabaa wrote: Hello! I apologize if this question has been asked many times before. I've searched quite a bit for concrete answers on how to setup Comet but I'm having no luck. From what I understand, all that is needed to successfully set it up is to replace the default connector with either NIO or APR. My connector looks like: Connector port=8080 protocol=org.apache.coyote.http11.Http11AprProtocol maxThreads=2000 connectionTimeout=6 redirectPort=8443/ The Tomcat logs show APR initializing without error, however my CometProcessor implementation doesn't receive event() calls. It does receive service() calls which I use to bump an error. Without service() throwing an error, doGet() is being called in my tests. What can I do to resolve this issue? Better yet, is there a flag I can set somewhere which would allow me to debug the issue further? Your help is greatly appreciated! T. Anthony Rabaa Senior Programmer Analyst Emergis Product Development Kanata, Ontario, Canada (613) 287-3134, Extension 266 - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomcat Web Application Manager
I just set up Apache-Tomcat 6.0.16 and have two domain names to be used as virtual hosts on the same machine. I have set this up in $CATALINA_HOME/conf/server.xml and can now see them both show up on the server. After editing the tomcat-users.xml, I can now look at the main Tomcat Web Application Manager page. However, I can only see the /docs, /examples, /manager, and /host-manager directories. I then moved the docroot for the virtual hosts to the $CATALINA_HOME/webapps folder since this is where the Web Application Manager seems to show these in. How can I deploy new .war files for my current virtual hosts directory? When I try to deploy the war file it states FAIL - Invalid context path was specified I don't see any good online documentation on how the Tomcat Web App Manager works. Can anyone help? _ Time for vacation? WIN what you need- enter now! http://www.gowindowslive.com/summergiveaway/?ocid=tag_jlyhm
Re: jsp compile question
Jq... what IDE are you using ? On Netbeans its like this... I actually tried that even though for this project there is no IDE involved. It is a manually deployed suite developed by a third party. I have to compile in as close to the production environment as possible. So far I have not been able to duplicate the failure in compiling with any tools. Netbeans gives no errors. Thanks. RHEL4 / Tomcat 5.5 / Classic VM (build 1.4.2, J2RE 1.4.2 IBM build cxia32142-20080515 (SR11)
Find out Who-I-Am for Realm User
Hi, I am using realm for the authorization of my web application. I would like to include a administration section for things like modifying the user profile or password. I have several different user names associated with two different roles. Both roles give the pass to the web pages. I am wondering whether I can find out who is the login user in realm? So I do not need the user to provide it again to entering the admin part. I am using Tomcat 5.5 on a linux box. Thanks. Sincerely Zhu, Guojun
Re: address bar shows ip instead of domain name
If you mean: type http://mydomain.com and get to 00.00.00.00:/, you must register mydomain.com in the DNS with some ISP. If you want to get rid of the :8080, you must configure Tomcat to listen on port 80 instead of 8080 (check the howTo's, or search the archives). On Jul 30, 2008, at 1:13 PM, nilanthan wrote: how do i map to the domain name itself.. When I do /mydomain.com to /mywebapp/welcome.action, it only works if I type this in the browser: http://00.00.00.00:8080/mydomain.com. then it goes to http://00.00.00.00:8080/mywebapp/welcome.action but I have created a record for mydomain.com to go to the ip of 00.00.00.00, same as above ip. My question is how can I map to the mydomain.com to go to http://00.00.00.00 and based on that go to http://00.00.00.00:8080/mywebapp/welcome.action? ? nilanthan wrote: Thanks Ken for all your help! Ken Bowen wrote: In rule, map /mydomain.com to /mywebapp/welcome.action in outbound-rule, map /mywebapp/welcome.action to /mydomain.com Do that for welcome, register, and every other page. Depending on the rules you need, you can make some use of regular expressions. On Jul 29, 2008, at 10:25 AM, nilanthan wrote: Thanks. I have placed the files/codes in the right spots and when I do localhost:8080/mywebapp/rewrite-status I get the urlrewrite page. But what i need is when a user types in the browser www.mydomain.com, it should go to http://00.00.00.00:8080/mywebapp/welcome.action but still display http://www.mydomain.com and when I click on a link, it should take my to ex. http://00.00.00.00:8080/mywebapp/register.action but in the address bar show http://www.mydomain.com/register.action. Can you use this example for the urlrewrite and where to place the codes? Thanks. Ken Bowen wrote: I don't know of any tutorial -- I found the documentation gave me enough guidance. It's really pretty straight-forward. Drop a filter definition like this in your web.xml: filter filter-nameUrlRewriteFilter/filter-name filter- classorg.tuckey.web.filters.urlrewrite.UrlRewriteFilter/ filter-class !-- init-param param-namelogLevel/param-name param-valuesysout:DEBUG/param-value /init-param -- /filter filter-mapping filter-nameUrlRewriteFilter/filter-name url-pattern/*/url-pattern dispatcherFORWARD/dispatcher dispatcherREQUEST/dispatcher /filter-mapping Then add a file urlrewrite.xml in your WEB-INF containing mappings in the following spirit: rule from^/PrivacyPolicy$/from to type=forward/PrivacyPolicy.do/to /rule outbound-rule from^/PrivacyPolicy.do$/from to/PrivacyPolicy/to /outbound-rule The outbound-rule describes how to map something going from the server to the browser, and the (inbound) rule describes how to map what you mapped on output (now coming back from the browser) back into what you need to see on input. If you removed the comment symbols in the filter element, you get detailed debugging ouptut. Hope this helps. Ken On Jul 28, 2008, at 6:16 PM, nilanthan wrote: Thanks. I have looked at that before but am a bit confused about the instructions. Is there a good tutorial for this urlrewrite? Ken Bowen wrote: Apply a rewrite filter (http://tuckey.org/urlrewrite/) to map the ip expression to what you want. ken On Jul 28, 2008, at 5:36 PM, nilanthan wrote: So what Can I do so that that domain goes to that address but shows the domain in the address bar? Yuval Perlov wrote: Where ever you forward, that's what the address bar shows On Jul 28, 2008, at 7:45 PM, nilanthan wrote: Hi, I have a website hosted on netfirms. I have a domain,exmaple, mydomain.com and it forwards to an address http:/xx.xx.xxx.xx:8080/ folder1/ welcome.action where xx is the ip of the server. Im runningTomcat 5.5 alone without apache. The problem is that when a users goes to www.mydomain.com, it takes them to the site but in the address bar it shows http:/xx.xx.xxx.xx:8080/folder1/welcome.action instead of mydomain.com. Is this an issue with DNS or something in Tomcat? I will have multiple sites running in the future so I cannot place the site folder in the ROOT directory. Thanks. -- View this message in context: http://www.nabble.com/address-bar-shows-ip-instead-of-domain-name-tp18694567p18694567.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/address-bar-shows-ip-instead-of-domain-name-tp18694567p1863.html Sent from the Tomcat
RE: receiving 404 page not found from godaddy.com
Is the error coming from tomcat? Or does it look like it could be from IIS? My experience with GoDaddy is that they are not very helpful. Even with a dedicated server account, they don't disclose to you what ports are available. You have to find a problem and basically prove to them that they're firewalling a port, and then they say that's a port we don't allow. E.g. port 8080 is off-limits on a dedicated server. That said, I've had success publishing war files/jsp files on my tomcat instance. Patrick -Original Message- From: jim stone [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 29, 2008 9:45 AM To: users@tomcat.apache.org Subject: receiving 404 page not found from godaddy.com I have a small jsp application which I packaged as a war file and deployed to my godaddy user account. The war exploded as expected. In my webapp, under the newly exploded context root, I am able to hit the html files, however, the jsp's are giving me a 404 not found. I have tested this locally using tomcat 5.5 and it works like a charm. I've contacted godaddy.com to find out what may be the reason for the 404 error and all the rep said was that my account is not showing any errors and that's all he could do for me. He said they could not help with deployment issues. If I wanted better diagnostics, I needed to upgrade to a dedicated server. I do have java/jsp enabled for the site so it should work. I chose to deploy as a war because it's much easier to deploy, however, I'm wondering if I should deploy the file individually. Has anyone had this same experience with deploying war files to godaddy.com. I'm considering using another host as I've had nothing but problems with this company. -- Sent from the Tomcat - User mailing list archive at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Hot deployment Using Tomcat
Hello Everyone I am using the following versions : Eclipse Version : Ganemede Tomcat Sysdeo Plugin(version 3.2.1) Tomcat Server(version 6.0.16) I have a build.xml file created which basically puts all the contents of a webproject.war into the location /workspace/dist/webproject or I can say I have an exploded war. I don't know what should I do inorder to deploy that exploded war to the tomcat server. Also I want to get rid of starting and stoping the server over and over again. I should be able to delete the previous exploded war file and place the new one without stopping the server. Previously I was creating a war file and I was stopping the server manually and then I was deleting the war file under /webapps folder of Tomcat and then I was placing the new war file there and then I had to start the server again. But now as the project is growing big and we want to have the flexibility in our project. We need the help regarding HOT Deployment. I read some online tutorials and tried to use them but no progress so for. Can you please tell me step by step process to achieve that goal. Right now, I have the functionality of deleting the previous exploded war file and making a new exploded war file using my build.xml and placing it into the /workspace/dist/ folder if there is some additional functionality needed please do let me know related to build. Thanks for YOUR help in advance . Please help me! -- View this message in context: http://www.nabble.com/Hot-deployment-Using-Tomcat-tp18743255p18743255.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomcat on Windows Server 2008 fails to stop completely
I'm setting up a new server with Tomcat 6.0.16 running on Windows Server 2008 with version 1.1.14 of the native DLL. When I stop the service it seems to stop, but the process does not end. I have to then end the process manually before I can start the service again. I've narrowed it down to the native DLL, since removing it seems to fix the problem. I've used the native DLL under previous versions of Windows, so is there some incompatibility between the native DLL and Windows Server 2008?
Re: Hot deployment Using Tomcat
autoDeploy is set to true by default in tomcat 6, make sure that this attribute is set to true in the conf/server.xml. If it is set to true, then no matter if you're re-deploying a packed or un-packed war, it will re-deploy should the timestamps on the web deployment descriptor change. On Wed, Jul 30, 2008 at 5:30 PM, hisameer [EMAIL PROTECTED]wrote: Hello Everyone I am using the following versions : Eclipse Version : Ganemede Tomcat Sysdeo Plugin(version 3.2.1) Tomcat Server(version 6.0.16) I have a build.xml file created which basically puts all the contents of a webproject.war into the location /workspace/dist/webproject or I can say I have an exploded war. I don't know what should I do inorder to deploy that exploded war to the tomcat server. Also I want to get rid of starting and stoping the server over and over again. I should be able to delete the previous exploded war file and place the new one without stopping the server. Previously I was creating a war file and I was stopping the server manually and then I was deleting the war file under /webapps folder of Tomcat and then I was placing the new war file there and then I had to start the server again. But now as the project is growing big and we want to have the flexibility in our project. We need the help regarding HOT Deployment. I read some online tutorials and tried to use them but no progress so for. Can you please tell me step by step process to achieve that goal. Right now, I have the functionality of deleting the previous exploded war file and making a new exploded war file using my build.xml and placing it into the /workspace/dist/ folder if there is some additional functionality needed please do let me know related to build. Thanks for YOUR help in advance . Please help me! -- View this message in context: http://www.nabble.com/Hot-deployment-Using-Tomcat-tp18743255p18743255.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Signed, Alessandro Ferrucci :)
Tomcat 7.0 ?
Hi all, The Servlet 3.0 specification (http://jcp.org/en/jsr/detail?id=315) has published an early draft recently (may 2008). On the description it's written that The reference implementation will be developed entirely in the public GlassFish project on java.net. But I thought Tomcat 7.0 will be the reference implementation of Servlet 3.0 and JSP 2.2. But because I can't find much information about Tomcat 7.0, I'm a bit confused. Does anybody knows what the future will be ? Thanks Antonio
Re: Find out Who-I-Am for Realm User
What authentication method are you using? I'll take a wild guess at form. This thread provides a few workaround solutions for this: http://www.theserverside.com/discussions/thread.tss?thread_id=32033 I suggest looking into writing your own filter and placing it above SecurityFilter in the stack and intercepting the redirect made by the security filter by subclassing HttpServletResponseWrapper. On Wed, Jul 30, 2008 at 3:58 PM, Guojun Zhu [EMAIL PROTECTED] wrote: Hi, I am using realm for the authorization of my web application. I would like to include a administration section for things like modifying the user profile or password. I have several different user names associated with two different roles. Both roles give the pass to the web pages. I am wondering whether I can find out who is the login user in realm? So I do not need the user to provide it again to entering the admin part. I am using Tomcat 5.5 on a linux box. Thanks. Sincerely Zhu, Guojun -- Signed, Alessandro Ferrucci :)
Re: Tomcat 7.0 ?
Antonio Goncalves wrote: Hi all, The Servlet 3.0 specification (http://jcp.org/en/jsr/detail?id=315) has published an early draft recently (may 2008). On the description it's written that The reference implementation will be developed entirely in the public GlassFish project on java.net. But I thought Tomcat 7.0 will be the reference implementation of Servlet 3.0 and JSP 2.2. But because I can't find much information about Tomcat 7.0, I'm a bit confused. Does anybody knows what the future will be ? Tomcat hasn't been the reference implementation for quite some time. I suspect we will wait a little while to let the spec settle before starting implementation. That said, if anyone is interested in developing patches then post to the dev list and we can work out a plan. Mark - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomcat 6.0 not logging POST requests?
Hi All, I have a Tomcat 6.0 server with the following log valve: Valve className=org.apache.catalina.valves.AccessLogValve directory=logs prefix=my_access_log. suffix=.log pattern=%{x-Forwarded-For}i %l %u %t quot;%rquot; %s %b quot;%{Referer}iquot; quot;%{User-agent}iquot; %D quot;%{Cookie}iquot; rotatable=true resolveHosts=false / For some reason, the logs don't show any HTTP POST requests with the POST data (I'm trying to capture both all GET and POST data sent to the server). Does anyone know how I can resolve this? Thanks so much!
Re: Tomcat 6.0 not logging POST requests?
Sorry, I was reading wrong - it does indeed log POST requests. On Wed, Jul 30, 2008 at 3:39 PM, Hashmir Shamshir [EMAIL PROTECTED] wrote: Hi All, I have a Tomcat 6.0 server with the following log valve: Valve className=org.apache.catalina.valves.AccessLogValve directory=logs prefix=my_access_log. suffix=.log pattern=%{x-Forwarded-For}i %l %u %t quot;%rquot; %s %b quot;%{Referer}iquot; quot;%{User-agent}iquot; %D quot;%{Cookie}iquot; rotatable=true resolveHosts=false / For some reason, the logs don't show any HTTP POST requests with the POST data (I'm trying to capture both all GET and POST data sent to the server). Does anyone know how I can resolve this? Thanks so much!
How to get POST content with Valve container
Dear List, What sort of qualifier do I need to put in pattern to capture passed POST data to the Tomcat 6.0 server? Here is my valve tag in server.xml: Valve className=org.apache.catalina.valves.AccessLogValve directory=logs prefix=localhost_access_log. suffix=.txt pattern=%q %{}i resolveHosts=false/ The pattern %q will get data passed through GET since it's the query string. But, I tried putting in %{}i to get all the passed POST data and I just receive null. I know that if I wanted to get the content language etc, I could use {Content-Language}%i {Content-Encoding}%i and so forth. But how do I get the content itself (ie, the HTTP headers entity-body)? This has been bugging me for quite a while! I would appreciate any help!
Re: Tomcat on Windows Server 2008 fails to stop completely
On 30 Jul 2008 at 14:49, Matt Cosentino wrote: I'm setting up a new server with Tomcat 6.0.16 running on Windows Server 2008 with version 1.1.14 of the native DLL. When I stop the service it seems to stop, but the process does not end. I have to then end the process manually before I can start the service again. I've narrowed it down to the native DLL, since removing it seems to fix the problem. I've used the native DLL under previous versions of Windows, so is there some incompatibility between the native DLL and Windows Server 2008? I haven't used Tomcat on server 2008 but I don't see why there would be a problem. Have you looked in the event logs to see if there is a logged error? -Steve O. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: adding a virtual host with jmx
It's a lot of lines of code, but not that hard. You haven't mentioned your Tomcat version, so I'll give a sort of generic setup. ObjectName loader = getServerLoader(); // depends on the settings and version ObjectName registry = getRegistry(); // depends on the settings and version MBeanServer server = getTCMBeansServer(); // generally the first one, unless you (or your J2EE) are playing games String hname = Catalina:type=Host,host=+hostName; // Assuming the default Engine name of Catalina ObjectName ohost = new ObjectName(hname); Object host = server.instantiate(HOST_CLASS, loader); server.invoke(registry, registerComponent, new Object[] {host, hname, null}, new String[] {java.lang.Object,java.lang.String,java.lang.String}); server.setAttribute(ohost, new Attribute(appBase, appBase)); // Set more attributes, and aliases etc here // Things like Realms and Contexts work much the same way if you follow Tomcat's naming conventions server.invoke(ohost, start, null, null); // Start your contexts here, if you don't have automatic deployment set. As long as you follow Tomcat's naming conventions for ObjectNames, invoking start will automagically add the new elements to where they should live. You can get the values for the loader and registry by hooking up a JMX console to your existing Tomcat. Olivier Vergès [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] hi all, I'm creating a web application for auto deploying virtual host through apache and tomcat on a production server. Everything is ok except for the Tomcat part: As tomcat can't be reloaded and as i can't restart anytime I want, I 've heard jmx was great cause it was possible to modify a running tomcat (is the english expression is on the fly?). So, Connection to Mbean server is ok... My problem is : when i invoke the addChild (org.apache.catalina.core.Container) method of Engine I get this error: java.io.NotSerializableException: org.apache.catalina.util.LifecycleSupport at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1156) at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1509)... So i try to create my own addChildByString(String;String,String,String) which takes the appabase and the name of th virtual host, and path and docBase of the first needed context. But i've got a problem with the context now, GRAVE: Error getConfigured (and nothing else) i'm a little lost with all the classes and functions and I haven't found any docs about adding vh by jmx. has anyone tried to add and directly make worked a virtual host and a context on a running tomcat ? thx, Olivier - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Session replication problem in tomcat 6.0.14 (loadbalancing with Apache)
My question here was if the other node is not available anymore, will this exception come? If so how to avoid it. The fact is the session replication is happenning and everything is working inspite of the exception. But just in case if we want to avoid this exception, is there a way or should the exception be ignored?? -- Pavan Kumar Singaraju On Wed, Jul 30, 2008 at 7:00 PM, Filip Hanik - Dev Lists [EMAIL PROTECTED] wrote: this Jul 30, 2008 1:49:24 PM org.apache.catalina.ha.tcp.SimpleTcpCluster memberDisappeared INFO: Received member disappeared:org.apache.catalina.tribes.membership.MemberImpl[tcp://d5-4232.xius.ltd:4002,d5-4232.xius.ltd,4002, alive=46858,id={-38 -119 -88 -15 -57 -62 77 116 -98 -70 -92 -50 45 -83 -71 -74 }, payload={}, command={66 65 66 89 45 65 76 69 88 ...(9)}, domain={}, ] indicates that the other node is not part of the cluster anymore. what does your config look like? Filip Pavan Singaraju wrote: Hello all, I am trying to do session replication in two tomcats (using Apache to do the loadbalancing). Ran the examples application and put a value in to the session. Now stopped the tomcat where the session is set. Submitted the URL again. Web page showed no value in the session. I think the session value is not tranfered. In the log file, i could see the following happenning. Help me with this to identiry why the error and how to do the session replication. I am using Tomcat 6.0.14 on JDK 1.6 Jul 30, 2008 1:49:24 PM org.apache.catalina.ha.tcp.SimpleTcpCluster memberDisappeared INFO: Received member disappeared:org.apache.catalina.tribes.membership.MemberImpl[tcp://d5-4232.xius.ltd:4002,d5-4232.xius.ltd,4002, alive=46858,id={-38 -119 -88 -15 -57 -62 77 116 -98 -70 -92 -50 45 -83 -71 -74 }, payload={}, command={66 65 66 89 45 65 76 69 88 ...(9)}, domain={}, ] Jul 30, 2008 1:49:40 PM org.apache.catalina.ha.tcp.SimpleTcpCluster send SEVERE: Unable to send message through cluster sender. org.apache.catalina.tribes.ChannelException: No destination given; No faulty members identified. at org.apache.catalina.tribes.group.GroupChannel.send(GroupChannel.java:194) at org.apache.catalina.tribes.group.GroupChannel.send(GroupChannel.java:175) at org.apache.catalina.ha.tcp.SimpleTcpCluster.send(SimpleTcpCluster.java:835) at org.apache.catalina.ha.tcp.SimpleTcpCluster.sendClusterDomain(SimpleTcpCluster.java:814) at org.apache.catalina.ha.session.JvmRouteBinderValve.sendSessionIDClusterBackup(JvmRouteBinderValve.java:391) at org.apache.catalina.ha.session.JvmRouteBinderValve.changeSessionID(JvmRouteBinderValve.java:362) at org.apache.catalina.ha.session.JvmRouteBinderValve.handleJvmRoute(JvmRouteBinderValve.java:319) at org.apache.catalina.ha.session.JvmRouteBinderValve.handlePossibleTurnover(JvmRouteBinderValve.java:229) at org.apache.catalina.ha.session.JvmRouteBinderValve.invoke(JvmRouteBinderValve.java:206) at org.apache.catalina.ha.tcp.ReplicationValve.invoke(ReplicationValve.java:347) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:263) at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:190) at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:283) at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:767) at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:697) at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:889) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:690) at java.lang.Thread.run(Thread.java:619 - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: HttpSessionListener session listener in tomcat cluster
If we set the notifyListenersOnReplication to false, will it not cause problem if there is a load balancer at work? -- Pavan Kumar Singaraju On Wed, Jul 30, 2008 at 6:59 PM, Filip Hanik - Dev Lists [EMAIL PROTECTED] wrote: Madonesa sanjaya wrote: Hi, I have deployed my application on a clustered environment and used session created event to monitor the number of users login to each machine (Using SNMP MIB counters). But once a user is login to one machine counter gets updated in every machine. I believe this is due to session replication. Is there any way to gets a count of logins to each machine using HTTPSessionListener when the session replication is enabled. Thnx, Sanjaya. there is a setting called |notifyListenersOnReplication you can set to true of false http://tomcat.apache.org/tomcat-6.0-doc/config/cluster-manager.html Filip | - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Find out Who-I-Am for Realm User
Thank you. I am using the basic authentication as the manager package of Tomcat. Something like this in the web.xml. login-config auth-methodBASIC/auth-method realm-nameTomcat INFORM Application/realm-name /login-config I only know how to use the realm in the web.xml and servel.xml. But I am really like to learn about this j_security. Honestly, I am not fully understand what you say in the second part. I know basic java stuff and know basic things about writing JSP web application and a little servlet. Where should I start to learn these? Thanks. Sincerely Zhu, Guojun On Wed, Jul 30, 2008 at 5:08 PM, Alessandro Ferrucci [EMAIL PROTECTED] wrote: What authentication method are you using? I'll take a wild guess at form. This thread provides a few workaround solutions for this: http://www.theserverside.com/discussions/thread.tss?thread_id=32033 I suggest looking into writing your own filter and placing it above SecurityFilter in the stack and intercepting the redirect made by the security filter by subclassing HttpServletResponseWrapper. On Wed, Jul 30, 2008 at 3:58 PM, Guojun Zhu [EMAIL PROTECTED] wrote: Hi, I am using realm for the authorization of my web application. I would like to include a administration section for things like modifying the user profile or password. I have several different user names associated with two different roles. Both roles give the pass to the web pages. I am wondering whether I can find out who is the login user in realm? So I do not need the user to provide it again to entering the admin part. I am using Tomcat 5.5 on a linux box. Thanks. Sincerely Zhu, Guojun -- Signed, Alessandro Ferrucci :)