Re: Newbie Help
Hi Jason, there is a fine tutorial covering this stuff. It contains a build.xml file which is similar to the deployer script. I think the latter evolved from the former. It contains also recommendations for directory layouts, etc. You find it here: http://jakarta.apache.org/tomcat/tomcat-5.0-doc/appdev/index.html (It is now the First webapp chapter of the user guide.) Best, -Florian Jason Tesser wrote: I am really confused. I am trying to learn what the best way to build and Deploy my stuff to Tomcat 5.0 I have ant 1.6 downloaded and I downloaded The deployer for Tomcat 5. I have a few questions. 1. How do I actually get these things to work for me? I have set up my environment variable (I am in Windows right now) for TOMCAT_HOME ANT_HOME and JAVA_HOME etc 2. How do I create and work with war files? - 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]
Hot to get Tomcat 5 to log to catalina.out instead of console?
When starting tomcat with the file startup.bat, all output goes to the console (including log4j debug output from my web app) I have to use cygwin, and use sh startup.sh, in order to have it sent to catalina.out. Is this a bug, or a misconfig? I have placed log4j and commons-logging jars in common/lib, and this log4j.properties in common/classes: log4j.rootLogger=INFO, RollFile log4j.appender.RollFile=org.apache.log4j.RollingFileAppender log4j.appender.RollFile.File=/logs/tomcat50.log log4j.appender.RollFile.MaxFileSize=1000KB log4j.appender.RollFile.MaxBackupIndex=4 log4j.appender.RollFile.layout=org.apache.log4j.PatternLayout log4j.appender.RollFile.layout.ConversionPattern=%d %-5p (%F:%L) - %m%n log4j.logger.org.apache.catalina.session.ManagerBase=INFO, RollFile But no matter what I do, debug outputs and stack traces only go to the console. Thanks, erik __ Få den nye Yahoo! Messenger på http://no.messenger.yahoo.com/ Nye ikoner og bakgrunner, webkamera med superkvalitet og dobbelt så morsom - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: encodeURL / jsessionid
That was my first move, but it was null G. Antonio_Fiol_Bonnín [EMAIL PROTECTED] wrote: %= request.getSession().getAttribute(id); % Jerald Powel wrote: Hi, I wish to maintain state across contexts and have in app1: app2 when app2 is loaded the jsessionid is visible in the address bar: http://localhost:8086/app2/index.jsp;jsessionid=7DD63005E4142E8C75A2E75CBAC0534 Now what do I do with it? How do I access data set on the session on the previous context? Thanks a lot G. ATTACHMENT part 2 application/x-pkcs7-signature name=smime.p7s - Yahoo! Messenger - Communicate instantly...Ping your friends today! Download Messenger Now
Re: Tomcat 4.1.29 CoyoteAdapter Exception
Randall, I've often had issues that cause major problems, and my experience is that user groups and mailing lists are normally unable to help without there being an easily reproducible error. For instance, are you able to nail it down to a particular page or servlet? Does it happen regularly or at random? Can you make a test case? Sorry I can't be any help, but good luck finding it. Adam On 02/25/2004 12:03 AM Randall Svancara wrote: What would cause the coyote connector to return a null pointer exception. Every time this happens, mod_jk is unable to communicate with tomcat and as a result our web service is unusable. Is this a tomcat bug, or a problem with running tomcat on Windows XP. Anyway, I have looked through this user group and found some other people with this problem on Solaris, but no real answers. Thanks. I am running tomcat 4.1.29, apache 2.0.48, with mod_jk configured on Windows XP. Occasionally, I will receive the following error: 2004-02-23 15:40:07 CoyoteAdapter Requested cookie session id is A02AD09BF242D0D916799B2EBB0FCC92.worker1 2004-02-23 15:40:07 CoyoteAdapter An exception or error occurred in the container during the request processing java.lang.NullPointerException at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:164) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:193) at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:309) at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:387) at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:673) at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:615) at org.apache.jk.common.SocketConnection.runIt(ChannelSocket.java:786) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:666) at java.lang.Thread.run(Thread.java:534) -Original Message- From: Randall Svancara Sent: Tuesday, February 24, 2004 11:34 AM To: Tomcat Users List Subject: RE: Tomcat 4.1.29 CoyoteAdapter Exception Here is my server.xml in full for anyone interested. It is at the end of this email. -Original Message- From: Randall Svancara Sent: Tuesday, February 24, 2004 11:14 AM To: Tomcat Users List Subject: RE: Tomcat 4.1.29 CoyoteAdapter Exception Hmm...I am unable to find anything in google regarding this error. -Original Message- From: Randall Svancara Sent: Tuesday, February 24, 2004 8:48 AM To: [EMAIL PROTECTED] Subject: Tomcat 4.1.29 CoyoteAdapter Exception Hi, I am running tomcat 4.1.29, apache 2.0.48, with mod_jk configured on Windows XP. Occasionally, I will receive the following error: 2004-02-23 15:40:07 CoyoteAdapter Requested cookie session id is A02AD09BF242D0D916799B2EBB0FCC92.worker1 2004-02-23 15:40:07 CoyoteAdapter An exception or error occurred in the container during the request processing java.lang.NullPointerException at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:164) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:193) at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:309) at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:387) at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:673) at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:615) at org.apache.jk.common.SocketConnection.runIt(ChannelSocket.java:786) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:666) at java.lang.Thread.run(Thread.java:534) At which point the web service becomes UNAVAILABLE on port 80 through apache which forwards the requests via mod_jk to the tomcat 4.1.29 servlet engine. I am including some snippets from my server.xml below for the coyote connector. Connector className=org.apache.coyote.tomcat4.CoyoteConnector port=8019 minProcessors=100 maxProcessors=600 enableLookups=false redirectPort=8443 acceptCount=10 debug=10 connectionTimeout=6 useURIValidationHack=false protocolHandlerClassName=org.apache.jk.server.JkCoyoteHandler/ I have also configured apache with 600 max threads, see snippet below. # WinNT MPM # ThreadsPerChild: constant number of worker threads in the server process # MaxRequestsPerChild: maximum number of requests a server process serves IfModule mpm_winnt.c ThreadsPerChild 600 MaxRequestsPerChild 0 /IfModule If someone has any idea what I have misconfigured
read it immediately
is that your account? attachment: swimmingpool.zip - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Classloader issues
Hi Have you added the mail's jar file to your WEB-INF/lib or common/lib? If not, then that's the problem. Tomcat 5 doesn't ship with the mail api. I have tried adding mailapi.jar, activation.jar, smtp.jar, pop3.jar, imap.jar to common/lib, WEB-INF/lib and shared/lib. None worked. Any other hints? cu Steffen - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
International character problem in submitting a jsp form
Hi, I'm using Tomcat 4.1.12. I have a trouble using Turkish characters in inputs on my forms. I don't have any problem displaying constant strings from resource files or displaying data retrieved from database where they both contain Turkish characters. So I decided to make a simple test as follows: I have a form with a text input in a jsp page. I post this form to another jsp page and this page just prints this parameter value to 'out'. As a result Turkish characters are not displayed correctly. The following is the jsp that has the form: %@ page language=java contentType=text/html;charset=utf-8 session=true% html head meta http-equiv=Content-Type content=text/html;charset=utf-8 /head body form method=POST name=Test action=PostTest2.jsp input type=text name=data input type=submit name=buttonSubmit value=OK /form /body /html The following is the jsp that the form is posted: %@ page language=java contentType=text/html;charset=utf-8 session=true% html head meta http-equiv=Content-Type content=text/html;charset=utf-8 /head body % out.println(response.getCharacterEncoding()); out.println(response.getLocale()); out.println(request.getCharacterEncoding()); out.println(request.getLocale()); String s = request.getParameter(data); out.println(s); System.out.println(s); % /body /html The output is as follows: utf-8 en_US null tr ??? Here, the character encoding of the response seems to be utf-8, the locale of the response seems to be en_US, the character encoding of the request seems to be null (maybe the problem is here, but I don't know how to solve) and the locale of the request seems to be tr. I also tried to set charset to iso-8859-9 which is for Turkish characters, instead of utf-8, but the problem is same. The output is as follows: iso-8859-9 en_US null tr ?? How can I solve this problem? Are there any settings to give to Tomcat? How does Tomcat determine the locale of the server? PS: I later tried to use Tomcat 4.1.30, and everything is same. 4.1.12 version that I'm using was an rpm installation and it has a tomcat.conf file, in which there is a LANG parameter that I set it to tr_TR. But it does not solve this problem. In 4.1.30 version there is no such a file to set LANG. How can we make LANG setting in 4.1.30? Thanks a lot, Bilge - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Réf. : read it immediately
the attached file is empty. I don't know what you mean. Could you explain more. ___ NATEXIS ASSET MANAGEMENT Meissa SAKHO 01 58 19 45 71. . . . . . . . . . . . (84571) [EMAIL PROTECTED] [EMAIL PROTECTED] 25/02/2004 11:01 Veuillez répondre à Tomcat Users List Pour : [EMAIL PROTECTED] cc : Objet : read it immediately is that your account? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Pièce jointe supprimée : swimmingpool.zip L'integrite de ce message n'etant pas assuree sur internet, Natexis Banques Populaires ne peut etre tenu responsable de son contenu. Toute utilisation ou diffusion non autorisee est interdite. Si vous n'etes pas destinataire de ce message, merci de le detruire et d'avertir l'expediteur. The integrity of this message cannot be guaranteed on the Internet. Natexis Banques Populaires can not therefore be considered responsible for the contents.Any unauthorized use or dissemination is prohibited. If you are not the intended recipient of this message, then please delete it and notify the sender.
stolen
Message sent from [EMAIL PROTECTED] infected by virus and has not been delivered. Viruses: infected with Win32.HLLM.Foo.41984 Original message was stored in the archive. To receive original message please contact postmaster: [EMAIL PROTECTED] Archive record: archive.msg.dZO565 Antivirus service provided by Dr.Web Daemon (www.sald.com) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Réf. : read it immediately
Without wanting to cause too much alarm, that is the kind of message that could potentially contain a virus. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: 25 February 2004 10:59 To: Tomcat Users List Subject: Réf. : read it immediately the attached file is empty. I don't know what you mean. Could you explain more. ___ NATEXIS ASSET MANAGEMENT Meissa SAKHO 01 58 19 45 71. . . . . . . . . . . . (84571) [EMAIL PROTECTED] [EMAIL PROTECTED] 25/02/2004 11:01 Veuillez répondre à Tomcat Users List Pour : [EMAIL PROTECTED] cc : Objet : read it immediately is that your account? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Pièce jointe supprimée : swimmingpool.zip L'integrite de ce message n'etant pas assuree sur internet, Natexis Banques Populaires ne peut etre tenu responsable de son contenu. Toute utilisation ou diffusion non autorisee est interdite. Si vous n'etes pas destinataire de ce message, merci de le detruire et d'avertir l'expediteur. The integrity of this message cannot be guaranteed on the Internet. Natexis Banques Populaires can not therefore be considered responsible for the contents.Any unauthorized use or dissemination is prohibited. If you are not the intended recipient of this message, then please delete it and notify the sender. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Réf. : read it immediately
Without wanting to cause too much alarm, that is the kind of message that could potentially contain a virus. Virus's need a little more than 1byte in size to be lethal - the payload probably got pulled by a virus checker before leaving Sun. G. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: using jar files in place of class files
That's was exactly the problem, jar-s start work in $CATALINA_HOME/webapps/app/WEB-INF/lib after setting write permission (770) for $CATALINA_TMPDIR, and not for the 'lib'. Thank you. Evgeny Gesin Javadesk --- Jon Wingfield [EMAIL PROTECTED] wrote: Also make sure that the user running tomcat has write permissions to $CATALINA_TMPDIR. That's where the JVM does its temporary io work. HTH, Jon Evgeny Gesin wrote: I set ownership tomcatUser:tomcatUser and permission 770 to the entire path $CATALINA_HOME/webapps/app/WEB-INF/lib, including jar files under 'lib', and then got that exception again. More advice? Evgeny Gesin Javadesk --- Filip Hanik (lists) [EMAIL PROTECTED] wrote: - Root Cause - java.io.IOException: Permission denied at java.io.UnixFileSystem.createFileExclusively(Native you have a permission issue on your filesystem, make sure the entire tomcat tree is owned by the user running tomcat Filip -Original Message- From: Evgeny Gesin [mailto:[EMAIL PROTECTED] Sent: Sunday, February 22, 2004 8:46 AM To: Tomcat Users List Subject: Re: using jar files in place of class files When I add any JAR in the WEB-INF/lib I got the following exception. Any advice? Evgeny Gesin Javadesk 2004-02-22 18:38:09 WebappLoader[/myapp]: Deploying class repositories to work directory /usr/java/tomcat/work/Catalina/127.0.0.1:80/myapp 2004-02-22 18:38:09 WebappLoader[/myapp]: Deploy JAR /WEB-INF/lib/myapp.jar to /usr/java/tomcat/webapps/myapp/WEB-INF/lib/myapp.jar 2004-02-22 18:38:10 ContextConfig[/myapp] Exception processing JAR at resource path /WEB-INF/lib/myapp.jar javax.servlet.ServletException: Exception processing JAR at resource path /WEB-INF/lib/myapp.jar at org.apache.catalina.startup.ContextConfig.tldScanJar(ContextConfig.java:930) at org.apache.catalina.startup.ContextConfig.tldScan(ContextConfig.java:868) at org.apache.catalina.startup.ContextConfig.start(ContextConfig.java:647) at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java: 243) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSuppor t.java:166) at org.apache.catalina.core.StandardContext.start(StandardContext.java:3582) 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) - Root Cause - java.io.IOException: Permission denied at java.io.UnixFileSystem.createFileExclusively(Native Method) at java.io.File.checkAndCreate(File.java:1314) at java.io.File.createTempFile(File.java:1402) at java.io.File.createTempFile(File.java:1439) at sun.net.www.protocol.jar.URLJarFile$1.run(URLJarFile.java:169) at java.security.AccessController.doPrivileged(Native Method) at sun.net.www.protocol.jar.URLJarFile.retrieve(URLJarFile.java:164) at sun.net.www.protocol.jar.URLJarFile.getJarFile(URLJarFile.java:42) at sun.net.www.protocol.jar.JarFileFactory.get(JarFileFactory.java:68) at sun.net.www.protocol.jar.JarURLConnection.connect(JarURLConnection.java:85) at sun.net.www.protocol.jar.JarURLConnection.getJarFile(JarURLConnection.java:6 9) at org.apache.catalina.startup.ContextConfig.tldScanJar(ContextConfig.java:906) at org.apache.catalina.startup.ContextConfig.tldScan(ContextConfig.java:868) at org.apache.catalina.startup.ContextConfig.start(ContextConfig.java:647) at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java: 243) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSuppor t.java:166) at
Re: Réf. : read it immediately
On 02/25/2004 12:44 PM Graham Reeds wrote: Without wanting to cause too much alarm, that is the kind of message that could potentially contain a virus. Virus's need a little more than 1byte in size to be lethal - the payload probably got pulled by a virus checker before leaving Sun. G. It's a fairly maliciously targetted though, spoofing Craig's email. Looks like someone is deliberately aiming to cause damage to Jakarta its users. It's been going on for several days now, fortunately totally ineffectually (I hope). Adam -- struts 1.1 + tomcat 5.0.16 + java 1.4.2 Linux 2.4.20 Debian - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: read it immediately
What you are seeing is a failed attempt to spread a virus over this mailing list. You should ignore the email. The email address is almost 100% certain to be spoofed (faked). If you happen to get the message with a file attached, be very wary of opening it. Perhaps the list administrator could confirm this. Adam On 02/25/2004 11:59 AM [EMAIL PROTECTED] wrote: the attached file is empty. I don't know what you mean. Could you explain more. ___ NATEXIS ASSET MANAGEMENT Meissa SAKHO 01 58 19 45 71. . . . . . . . . . . . (84571) [EMAIL PROTECTED] [EMAIL PROTECTED] 25/02/2004 11:01 Veuillez répondre à Tomcat Users List Pour : [EMAIL PROTECTED] cc : Objet : read it immediately is that your account? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Pièce jointe supprimée : swimmingpool.zip L'integrite de ce message n'etant pas assuree sur internet, Natexis Banques Populaires ne peut etre tenu responsable de son contenu. Toute utilisation ou diffusion non autorisee est interdite. Si vous n'etes pas destinataire de ce message, merci de le detruire et d'avertir l'expediteur. The integrity of this message cannot be guaranteed on the Internet. Natexis Banques Populaires can not therefore be considered responsible for the contents.Any unauthorized use or dissemination is prohibited. If you are not the intended recipient of this message, then please delete it and notify the sender. -- struts 1.1 + tomcat 5.0.16 + java 1.4.2 Linux 2.4.20 Debian - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Servlet-Mapping Question, recursive capable?
The mapping rules are dictated by the servlet spec. Its not tomcat specific. -Tim Daniel Gibby wrote: Too bad though. I really like ant's recursive matching capabilities. I think that eventually a 'rebash' shell will be written that supports ** as recursive so that grep catalina **/docs/*.java would look for only java files in a subdirectory somewhere named docs with the text catalina in it. How nice would that be! Then apache and tomcat will decide on supporting this as well... Daniel Gibby Tim Funk wrote: No. You can prefix match or file extension match, but not both at the same time. -Tim David Erickson wrote: Hi I would like to do something like: servlet-mapping servlet-nameaction/servlet-name url-pattern/docs/**.pdf/url-pattern /servlet-mapping So that anything in the /docs/ folder AND ANY of its subfolders with the .pdf extension gets sent to my action servlet. Is that possible with tomcat 4.1.24? If not does anybody know the class that matches those things so I can alter it? Thanks! -David - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat 5 deployer compile errors on %@ includes
The best thing to do is to not make compile time includes end in '.jsp'. Some use .inc, other .jspi, and the spec might even have arecommendation for compile time includes. Also by using a specific file extension you can quickly identify its purpose. -Tim Richard Mixon (qwest) wrote: I am trying to use the client deployer. Our JSP pages use a number of compile time includes such as %@ include file=someCommonCode1.jsp %. The client deployer is trying to compile each of these included files independently. I am getting compile errors all over the place. The reason is that one include will imports a profiling package that some of the other includes depend upon. The deployer is trying to compile each .jsp file as a complete page. Is there another approach for handling compile time includes that will avoid this problem? Is there a way to designate jsp files that should not be compiled independently? Thanks in advance - Richard - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Memory leak across contexts?
1) Try using a memory profiler. 2) Or install 4 tomcat instances each with its own webapp and see if all 4 die or just one becomes bad. If only one dies- then its webapp code issue. If all four die - it is probably still a webapp issue but its consistent across all 4 of your webapps -Tim Jerald Powel wrote: Hello, I have 4 apps with different contexts running under the one instance of Tomcat. They run fine, but progessively get slower and slower until a server bounce is necessary. After that point, they run fine until they start to be become progressively slower etc. The apps all link to each other, after the session is inavalidated (1 session per app). Does any one have experience of a perfomance hit when swapping between contexts/sessions? Each session is not held within a collection. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Starting Tomcat 5 JVM in debug Mode
Could you enlighten me as to how to start TOMCAT 5 with the following parameters to enable remote debugging on the JVM? These parameters need to be passed to the JVM during start up, but I can't work out where they should go with all the various scripts and bat file strings used in the startup.bat and Catalina.bat -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005 Thanks Shane Parkinson
Re: Réf. : read it immediately
[EMAIL PROTECTED] wrote: the attached file is empty. I don't know what you mean. Could you explain more. That is a result of a damaged virus. The computer is infected, but the user managed to delete the *.EXE file, so the virus cannot spread it. The virus is still active, but the payload is gone. Nothing to worry about, but it is a good thing to have an AV up and running. Nix. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: attributes of the element web-app?
Howdy, web-app display-nameWelcome to My JSP-Files/display-name iconcl6D11.gif/icon description Welcome to My JSPs /description /web-app I don't think the tomcat manager webapp even looks for this field, but I haven't checked the relevant code in literally more than a year. Does icon/cl6D11.gif/icon work better? (Added leading slash) 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]
RE: read it immediately
Howdy, Yes to all: it's a spoof on Craig's address. Treat it as you would any virus/work email: don't open attachments, delete message. Yoav Shapira Millennium ChemInformatics -Original Message- From: Adam Hardy [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 25, 2004 7:04 AM To: Tomcat Users List Subject: Re: read it immediately What you are seeing is a failed attempt to spread a virus over this mailing list. You should ignore the email. The email address is almost 100% certain to be spoofed (faked). If you happen to get the message with a file attached, be very wary of opening it. Perhaps the list administrator could confirm this. Adam On 02/25/2004 11:59 AM [EMAIL PROTECTED] wrote: the attached file is empty. I don't know what you mean. Could you explain more. ___ NATEXIS ASSET MANAGEMENT Meissa SAKHO 01 58 19 45 71. . . . . . . . . . . . (84571) [EMAIL PROTECTED] [EMAIL PROTECTED] 25/02/2004 11:01 Veuillez répondre à Tomcat Users List Pour : [EMAIL PROTECTED] cc : Objet : read it immediately is that your account? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Pièce jointe supprimée : swimmingpool.zip L'integrite de ce message n'etant pas assuree sur internet, Natexis Banques Populaires ne peut etre tenu responsable de son contenu. Toute utilisation ou diffusion non autorisee est interdite. Si vous n'etes pas destinataire de ce message, merci de le detruire et d'avertir l'expediteur. The integrity of this message cannot be guaranteed on the Internet. Natexis Banques Populaires can not therefore be considered responsible for the contents.Any unauthorized use or dissemination is prohibited. If you are not the intended recipient of this message, then please delete it and notify the sender. -- struts 1.1 + tomcat 5.0.16 + java 1.4.2 Linux 2.4.20 Debian - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] 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]
Utility for Running Tomcat as a Windows Service
Version 2.0.8b is out. This should now work again with Tomcat 5!!! Additional details and free download available here: http://web.bvu.edu/staff/david/tcservcfg/
RE: Tomcat error-page not working (was: RE: Tomcat and checked vs. unchecked exceptions)
Howdy, error-page exception-typejavax.servlet.ServletException/exception-type location/WEB-INF/jsp/exceptions/ServletException.jsp/location /error-page (in the appropriate place, at the bottom just above /web-app) When this code executes: if ( report == null || report.equals( ) ) { log.debug( doGet: no data! Need to forward to an error page. ); throw new ServletException( No data found in HOLD file ); } I _still_ get this in the browser: type Exception report message description The server encountered an internal error () that prevented it from fulfilling this request. exception javax.servlet.ServletException: No data found in HOLD file at edu.asu.vpia.webapp.PDFServlet.doGet(PDFServlet.java:94) Hmm. Does the error page say Tomcat on it, or is it the IE error page? I guess the former, but still need to ask. Was the root cause that you chopped off the above stack trace also a ServletException, or something else? Yansheng Lin suggested using Struts declarative exception handling, but this is a plain-old Servlet, not a Struts Action. Yeah, that suggestion wasn't relevant. What am I missing, why do I get a Tomcat-generated error page and not the JSP I specified? Are you sure you're not catching the exception somewhere in your webapp and rethrowing it at something else? 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]
Re: Servlet-Mapping Question, recursive capable?
I'm just predicting the future, and I think eventually the ** convention will be adopted in many systems and specs. I'm kinda going off topic, so sorry. dangby Tim Funk wrote: The mapping rules are dictated by the servlet spec. Its not tomcat specific. -Tim Daniel Gibby wrote: Too bad though. I really like ant's recursive matching capabilities. I think that eventually a 'rebash' shell will be written that supports ** as recursive so that grep catalina **/docs/*.java would look for only java files in a subdirectory somewhere named docs with the text catalina in it. How nice would that be! Then apache and tomcat will decide on supporting this as well... Daniel Gibby Tim Funk wrote: No. You can prefix match or file extension match, but not both at the same time. -Tim David Erickson wrote: Hi I would like to do something like: servlet-mapping servlet-nameaction/servlet-name url-pattern/docs/**.pdf/url-pattern /servlet-mapping So that anything in the /docs/ folder AND ANY of its subfolders with the .pdf extension gets sent to my action servlet. Is that possible with tomcat 4.1.24? If not does anybody know the class that matches those things so I can alter it? Thanks! -David - 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 to configure tomcat to user application
Hello can any one help me to cofigure tomcat 4.1.29 to user application path ,during tomcat startup regards mano Yahoo! India Insurance Special: Be informed on the best policies, services, tools and more.
Re: Is the docBase attribute in context.xml required?
Shapira, Yoav wrote: Howdy, I have a question about the format of context.xml. Tomcat 5 documentation: http://jakarta.apache.org/tomcat/tomcat-5.0-doc/config/context.html says that the docBase attribute is required (as it's bolded). Is this really correct? I was able to deploy an application through the manager application with context.xml that did not contain docBase. I don't want to put an absolute path to the application to context.xml, as context.xml is stored in CVS. This looks to me as a documentation bug, isn't it? Look in your $CATALINA_HOME/conf/[engine name]/[host name] directory. Do you see the XML file for your context, and if so does it have a docBase? Yoav Shapira Hi Yoav, I think you meant $CATALINA_BASE/, correct? No, this file does not have the docBase attribute. Nevertheless, deploying using http://localhost:8080/manager/deploy?config=file:/path/webapp/META-INF/context.xmlwar=file:/path/webapp/ seems to work even without the docBase attribute, at least on the surface. So, is this scenario supported, or should I be doing things differently? Or, let me phrase my question differently. Here is my situation: 1. I put context.xml inside webapp/META-INF. 2. 'webapp' location not relative to Tomcat directory. 3. I don't want to put an absolute path to the docBase attribute in context.xml, as this file is versioned. How can I now deploy this application using the manager, so it runs in place from the 'webapp' directory? I don't want to package it or copy it to a different location, just run it from there. What variant of the manager deploy command should I use? Thanks Petr 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat error-page not working (was: RE: Tomcat and checked vs. unchecked exceptions)
This is JSP rather than Tomcat question, but I hope for a reply. I have a JSP with the following jsp:plugin code: jsp:plugin type=applet code=com.package.Applet.class codebase=/application1/applets/ width=50 height=50 /jsp:plugin Web applications, which run this applet, specify different codebase attribute, such as application2, application3 and so on. Unfortunatelly JSP specification doesn't allow dynamic codebase in jsp:plugin and we create a new JSP for each new web domain to specify another hardcoded codebase attribute. Could you please advice a trick to generate codebase attribute at run-time, to deploy the same JSP in all applications. Evgeny Gesin Javadesk __ Do you Yahoo!? Yahoo! Mail SpamGuard - Read only the mail you want. http://antispam.yahoo.com/tools - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
jsp:plugin and codebase
This is JSP rather than Tomcat question, but I hope for a reply. I have a JSP with the following jsp:plugin code: jsp:plugin type=applet code=com.package.Applet.class codebase=/application1/applets/ width=50 height=50 /jsp:plugin Web applications, which run this applet, specify different codebase attribute, such as application2, application3 and so on. Unfortunatelly JSP specification doesn't allow dynamic codebase in jsp:plugin and we create a new JSP for each new web domain to specify another hardcoded codebase attribute. Could you please advice a trick to generate codebase attribute at run-time, to deploy the same JSP in all applications. Evgeny Gesin Javadesk __ Do you Yahoo!? Yahoo! Finance: Get your refund fast by filing online. http://taxes.yahoo.com/filing.html - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: how to configure tomcat to user application
xavier manohar wrote: Hello can any one help me to cofigure tomcat 4.1.29 to user application path ,during tomcat startup You can copy/modify the Context block for 'examples' to your 'user application' in Tomcat_Root/conf/server.conf file. Best Bao regards mano Yahoo! India Insurance Special: Be informed on the best policies, services, tools and more. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: encodeURL / jsessionid
when you say 'app1' and 'app2', what do you mean? Sessions are not shared between two different web-apps. -Original Message- From: Jerald Powel [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 25, 2004 3:46 AM To: Tomcat Users List Subject: Re: encodeURL / jsessionid That was my first move, but it was null G. Antonio_Fiol_Bonnín [EMAIL PROTECTED] wrote: %= request.getSession().getAttribute(id); % Jerald Powel wrote: Hi, I wish to maintain state across contexts and have in app1: app2 when app2 is loaded the jsessionid is visible in the address bar: http://localhost:8086/app2/index.jsp;jsessionid=7DD63005E4142 E8C75A2E75 CBAC0534 Now what do I do with it? How do I access data set on the session on the previous context? Thanks a lot G. ATTACHMENT part 2 application/x-pkcs7-signature name=smime.p7s - Yahoo! Messenger - Communicate instantly...Ping your friends today! Download Messenger Now - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
another servlet-mapping question,.............
Hi everybody, I got several servlets mapped on the web.xml file that works pretty fine on my local tomcat installation, but when uploaded to the hosting server, I get a 400 Server Statuts Error, it complains the path to the server does not exist !!! My web.xml for the servlets is like this code ... servlet servlet-namevalidate_user/servlet-name servlet-classcom.bs.crm.validateUser/servlet-class /servlet .. servlet-mapping servlet-namevalidate_user/servlet-name url-pattern/validate_user/url-pattern /servlet-mapping Anybody can help me ?? Thanx in advance !! Andrew - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat 4.1.29 CoyoteAdapter Exception
Thanks, I have had a difficult time reproducing this error on a predictable basis. All I can say is that it happens once per day, and I have temporarily wrote a perl script that checks the service to see if it is working properly, and if not, it shuts down tomcat and restarts it...A bandaid fix at best. I will give you a little more background on the webapp I have deployed. It is just a basic webapp with several jsp pages and a couple of servlets. I am using Database Connection Pooling with Mysql Connector J. The problem does not appear to happen on any one particular jsp or servlet, but I will keep digging further to see if it is or not. If I can create a reproducable test case, I will post it here. I will keep on researching the problem to see if I can pin point the exact error. Thanks for the advice on using news groups. It is my first experience with them. Thanks, Randall -Original Message- From: Adam Hardy [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 25, 2004 2:47 AM To: Tomcat Users List Subject: Re: Tomcat 4.1.29 CoyoteAdapter Exception Randall, I've often had issues that cause major problems, and my experience is that user groups and mailing lists are normally unable to help without there being an easily reproducible error. For instance, are you able to nail it down to a particular page or servlet? Does it happen regularly or at random? Can you make a test case? Sorry I can't be any help, but good luck finding it. Adam On 02/25/2004 12:03 AM Randall Svancara wrote: What would cause the coyote connector to return a null pointer exception. Every time this happens, mod_jk is unable to communicate with tomcat and as a result our web service is unusable. Is this a tomcat bug, or a problem with running tomcat on Windows XP. Anyway, I have looked through this user group and found some other people with this problem on Solaris, but no real answers. Thanks. I am running tomcat 4.1.29, apache 2.0.48, with mod_jk configured on Windows XP. Occasionally, I will receive the following error: 2004-02-23 15:40:07 CoyoteAdapter Requested cookie session id is A02AD09BF242D0D916799B2EBB0FCC92.worker1 2004-02-23 15:40:07 CoyoteAdapter An exception or error occurred in the container during the request processing java.lang.NullPointerException at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:164) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:193) at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:309) at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:387) at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:673) at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:615) at org.apache.jk.common.SocketConnection.runIt(ChannelSocket.java:786) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:666) at java.lang.Thread.run(Thread.java:534) -Original Message- From: Randall Svancara Sent: Tuesday, February 24, 2004 11:34 AM To: Tomcat Users List Subject: RE: Tomcat 4.1.29 CoyoteAdapter Exception Here is my server.xml in full for anyone interested. It is at the end of this email. -Original Message- From: Randall Svancara Sent: Tuesday, February 24, 2004 11:14 AM To: Tomcat Users List Subject: RE: Tomcat 4.1.29 CoyoteAdapter Exception Hmm...I am unable to find anything in google regarding this error. -Original Message- From: Randall Svancara Sent: Tuesday, February 24, 2004 8:48 AM To: [EMAIL PROTECTED] Subject: Tomcat 4.1.29 CoyoteAdapter Exception Hi, I am running tomcat 4.1.29, apache 2.0.48, with mod_jk configured on Windows XP. Occasionally, I will receive the following error: 2004-02-23 15:40:07 CoyoteAdapter Requested cookie session id is A02AD09BF242D0D916799B2EBB0FCC92.worker1 2004-02-23 15:40:07 CoyoteAdapter An exception or error occurred in the container during the request processing java.lang.NullPointerException at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:164) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:193) at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:309) at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:387) at
Re: jsp:plugin and codebase
Evgeny Gesin wrote: [snip...] jsp:plugin type=applet code=com.package.Applet.class codebase=/application1/applets/ width=50 height=50 /jsp:plugin Web applications, which run this applet, specify different codebase attribute, such as application2, application3 and so on. Can you then put your applet outside of any your applications[1,2,3...]? For example, in TOMCAT_ROOT directory, then the code base should be same all the time. Best Bao Unfortunatelly JSP specification doesn't allow dynamic codebase in jsp:plugin and we create a new JSP for each new web domain to specify another hardcoded codebase attribute. Could you please advice a trick to generate codebase attribute at run-time, to deploy the same JSP in all applications. Evgeny Gesin Javadesk - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
moving from tomcat 4.1.24 to tomcat 5
Hi All, I am glad to be back on the tomcat users list. I have an application running on tomcat 4.1.24 and I want to migrate to tomcat 5. It would be grateful if you could tell me the necessary steps or where I could thenecessary documentation . thanks shyam
Re: jsp:plugin and codebase
This will not work because of applet's security restrictions. Waiting for more replies. Evgeny Gesin Javadesk --- BAO RuiXian [EMAIL PROTECTED] wrote: Evgeny Gesin wrote: [snip...] jsp:plugin type=applet code=com.package.Applet.class codebase=/application1/applets/ width=50 height=50 /jsp:plugin Web applications, which run this applet, specify different codebase attribute, such as application2, application3 and so on. Can you then put your applet outside of any your applications[1,2,3...]? For example, in TOMCAT_ROOT directory, then the code base should be same all the time. Best Bao Unfortunatelly JSP specification doesn't allow dynamic codebase in jsp:plugin and we create a new JSP for each new web domain to specify another hardcoded codebase attribute. Could you please advice a trick to generate codebase attribute at run-time, to deploy the same JSP in all applications. Evgeny Gesin Javadesk - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do you Yahoo!? Yahoo! Finance: Get your refund fast by filing online. http://taxes.yahoo.com/filing.html - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat 4.1.29 CoyoteAdapter Exception
Ok, now I am thinking this error might be caused by Database Connection pooling. I increased Mysql's max connection limit from the default to 500. I hope this enough to satify my hungry application. Also I adjusted the apps xml configuration option maxActive to a value of 400 which is 100 less than the max. We will see if this works. -Original Message- From: Randall Svancara [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 25, 2004 7:47 AM To: Tomcat Users List Subject: RE: Tomcat 4.1.29 CoyoteAdapter Exception Thanks, I have had a difficult time reproducing this error on a predictable basis. All I can say is that it happens once per day, and I have temporarily wrote a perl script that checks the service to see if it is working properly, and if not, it shuts down tomcat and restarts it...A bandaid fix at best. I will give you a little more background on the webapp I have deployed. It is just a basic webapp with several jsp pages and a couple of servlets. I am using Database Connection Pooling with Mysql Connector J. The problem does not appear to happen on any one particular jsp or servlet, but I will keep digging further to see if it is or not. If I can create a reproducable test case, I will post it here. I will keep on researching the problem to see if I can pin point the exact error. Thanks for the advice on using news groups. It is my first experience with them. Thanks, Randall -Original Message- From: Adam Hardy [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 25, 2004 2:47 AM To: Tomcat Users List Subject: Re: Tomcat 4.1.29 CoyoteAdapter Exception Randall, I've often had issues that cause major problems, and my experience is that user groups and mailing lists are normally unable to help without there being an easily reproducible error. For instance, are you able to nail it down to a particular page or servlet? Does it happen regularly or at random? Can you make a test case? Sorry I can't be any help, but good luck finding it. Adam On 02/25/2004 12:03 AM Randall Svancara wrote: What would cause the coyote connector to return a null pointer exception. Every time this happens, mod_jk is unable to communicate with tomcat and as a result our web service is unusable. Is this a tomcat bug, or a problem with running tomcat on Windows XP. Anyway, I have looked through this user group and found some other people with this problem on Solaris, but no real answers. Thanks. I am running tomcat 4.1.29, apache 2.0.48, with mod_jk configured on Windows XP. Occasionally, I will receive the following error: 2004-02-23 15:40:07 CoyoteAdapter Requested cookie session id is A02AD09BF242D0D916799B2EBB0FCC92.worker1 2004-02-23 15:40:07 CoyoteAdapter An exception or error occurred in the container during the request processing java.lang.NullPointerException at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:164) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:193) at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:309) at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:387) at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:673) at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:615) at org.apache.jk.common.SocketConnection.runIt(ChannelSocket.java:786) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:666) at java.lang.Thread.run(Thread.java:534) -Original Message- From: Randall Svancara Sent: Tuesday, February 24, 2004 11:34 AM To: Tomcat Users List Subject: RE: Tomcat 4.1.29 CoyoteAdapter Exception Here is my server.xml in full for anyone interested. It is at the end of this email. -Original Message- From: Randall Svancara Sent: Tuesday, February 24, 2004 11:14 AM To: Tomcat Users List Subject: RE: Tomcat 4.1.29 CoyoteAdapter Exception Hmm...I am unable to find anything in google regarding this error. -Original Message- From: Randall Svancara Sent: Tuesday, February 24, 2004 8:48 AM To: [EMAIL PROTECTED] Subject: Tomcat 4.1.29 CoyoteAdapter Exception Hi, I am running tomcat 4.1.29, apache 2.0.48, with mod_jk configured on Windows XP. Occasionally, I will receive the following error: 2004-02-23 15:40:07 CoyoteAdapter Requested cookie session id is A02AD09BF242D0D916799B2EBB0FCC92.worker1 2004-02-23 15:40:07 CoyoteAdapter An exception or error occurred in the container during the request processing java.lang.NullPointerException at
Tomcat 4 + Apache 2 + mod_jk (auto-config) + https
Hello all, I have Tomcat 4 + Apache 2 + mod_jk (in auto-config mode). Everything's fine, but I don't see how to tell Tomcat to build the generated mod_jk.conf as to listen to https traffic. Any ideas? Thank you Samuel Rutishauser - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: another servlet-mapping question,.............
Andres Ledesma wrote: Hi everybody, I got several servlets mapped on the web.xml file that works pretty fine on my local tomcat installation, but when uploaded to the hosting server, I get a 400 Server Statuts Error, it complains the path to the server does not exist !!! My web.xml for the servlets is like this code ... servlet servlet-namevalidate_user/servlet-name servlet-classcom.bs.crm.validateUser/servlet-class /servlet I don't know how it works in your local tomcat installation, but I think the servelt../servlet pair should the servlet-mapping../servlet-mapping pair. Best Bao .. servlet-mapping servlet-namevalidate_user/servlet-name url-pattern/validate_user/url-pattern /servlet-mapping - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: another servlet-mapping question,.............
Does the tomcat runs for sample programs or admin on hosting server. -Original Message- From: BAO RuiXian [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 25, 2004 10:22 AM To: Tomcat Users List Subject: Re: another servlet-mapping question,. Andres Ledesma wrote: Hi everybody, I got several servlets mapped on the web.xml file that works pretty fine on my local tomcat installation, but when uploaded to the hosting server, I get a 400 Server Statuts Error, it complains the path to the server does not exist !!! My web.xml for the servlets is like this code ... servlet servlet-namevalidate_user/servlet-name servlet-classcom.bs.crm.validateUser/servlet-class /servlet I don't know how it works in your local tomcat installation, but I think the servelt../servlet pair should the servlet-mapping../servlet-mapping pair. Best Bao .. servlet-mapping servlet-namevalidate_user/servlet-name url-pattern/validate_user/url-pattern /servlet-mapping - 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: another servlet-mapping question,.............
Andrew, First what strikes me is that you say you are getting this error. Usually with mapping issues, you get a resource not found. Can you browse anything else on the hosting server? Try putting just a static page up and see if you can get to it. With mapping, a gotcha trick is the invoker. Do you have the invoker uncommented in your main web.xml or your app's web.xml? If you do in the main web.xml, the app will work on your machine and not on the hosing server. Are you trying to access the servlet from the URL? One other catch, are you referring to any of your servlets from jsp or html pages? If so, are you using the form of ./validate_user. With the mapping that you have, you need all your references to be in this form or the app will fail when on the hosting server. One last thing you can do to ensure it is a mapping issue, AS A TEST you can enable the invoker in your web.xml and then deploy to the server host. If it then runs, then your problem is in the mappings or references to the servlets as noted above. Doug www.parsonstechnical.com - Original Message - From: Andres Ledesma [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Wednesday, February 25, 2004 9:41 AM Subject: another servlet-mapping question,. Hi everybody, I got several servlets mapped on the web.xml file that works pretty fine on my local tomcat installation, but when uploaded to the hosting server, I get a 400 Server Statuts Error, it complains the path to the server does not exist !!! My web.xml for the servlets is like this code ... servlet servlet-namevalidate_user/servlet-name servlet-classcom.bs.crm.validateUser/servlet-class /servlet .. servlet-mapping servlet-namevalidate_user/servlet-name url-pattern/validate_user/url-pattern /servlet-mapping Anybody can help me ?? Thanx in advance !! Andrew - 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 error-page not working (was: RE: Tomcat and checked vs. unchecked exceptions)
Wendy: Here's your problem: location/WEB-INF/jsp/exceptions/ServletException.jsp/location JSPs can't be run from inside the WEB-INF directory. Try moving your jsp/exceptions directory up one level. Jerry Wendy Smoak wrote: From: Shapira, Yoav [mailto:[EMAIL PROTECTED] Try exception-typejava.lang.RuntimeException/exception-type, as that's the superclass for unchecked exceptions and you probably want to handle them all the same (if you want to handle them at all, which apparently you do). I don't understand. :( I don't know if this is related to the original question, but I have this in web.xml: error-page exception-typejavax.servlet.ServletException/exception-type location/WEB-INF/jsp/exceptions/ServletException.jsp/location /error-page (in the appropriate place, at the bottom just above /web-app) When this code executes: if ( report == null || report.equals( ) ) { log.debug( doGet: no data! Need to forward to an error page. ); throw new ServletException( No data found in HOLD file ); } I _still_ get this in the browser: type Exception report message description The server encountered an internal error () that prevented it from fulfilling this request. exception javax.servlet.ServletException: No data found in HOLD file at edu.asu.vpia.webapp.PDFServlet.doGet(PDFServlet.java:94) Yansheng Lin suggested using Struts declarative exception handling, but this is a plain-old Servlet, not a Struts Action. The same error-page tag works fine in a different webapp, I'm at a loss as to why it fails in this one. The JSP is present in the location given in the tag. What am I missing, why do I get a Tomcat-generated error page and not the JSP I specified? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat 4 + Apache 2 + mod_jk (auto-config) + https
Don't think you need to. I am running httpd2(SSL)+tomcat4/5+mod_jk2. Apache will take care of the SSL side, and mod_jk should forward everything unencrypted via localhost(if that is your setup) to tomcat. -Original Message- From: Samuel Rutishauser [mailto:[EMAIL PROTECTED] Sent: 25 February 2004 15:09 To: Tomcat Users List Subject: Tomcat 4 + Apache 2 + mod_jk (auto-config) + https Hello all, I have Tomcat 4 + Apache 2 + mod_jk (in auto-config mode). Everything's fine, but I don't see how to tell Tomcat to build the generated mod_jk.conf as to listen to https traffic. Any ideas? Thank you Samuel Rutishauser - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail has been scanned for all viruses by Star Internet. The service is powered by MessageLabs. Note:__ This message is for the named person's use only. It may contain confidential, proprietary or legally privileged information. No confidentiality or privilege is waived or lost by any mistransmission. If you receive this message in error, please immediately delete it and all copies of it from your system, destroy any hard copies of it and notify the sender. You must not, directly or indirectly, use, disclose, distribute, print, or copy any part of this message if you are not the intended recipient. Jaguar Freight Services and any of its subsidiaries each reserve the right to monitor all e-mail communications through its networks. Any views expressed in this message are those of the individual sender, except where the message states otherwise and the sender is authorized to state them to be the views of any such entity. This e-mail has been scanned for all viruses by Star Internet. The service is powered by MessageLabs.
Re: jsp:plugin and codebase
Evgeny Gesin wrote: This will not work because of applet's security restrictions. Waiting for more replies. Care to explain what are the exact applet's security restriction? Applets are supposed to be downloaded to the client machine to run. So that I think you put it in anywhere inside your server's space except the the directory /WEB-INF and its subdirectories. I suppose you have only one applet shared by all your applications[1,2,3...], right? Best Bao Evgeny Gesin Javadesk --- BAO RuiXian [EMAIL PROTECTED] wrote: Evgeny Gesin wrote: [snip...] jsp:plugin type=applet code=com.package.Applet.class codebase=/application1/applets/ width=50 height=50 /jsp:plugin Web applications, which run this applet, specify different codebase attribute, such as application2, application3 and so on. Can you then put your applet outside of any your applications[1,2,3...]? For example, in TOMCAT_ROOT directory, then the code base should be same all the time. Best Bao Unfortunatelly JSP specification doesn't allow dynamic codebase in jsp:plugin and we create a new JSP for each new web domain to specify another hardcoded codebase attribute. Could you please advice a trick to generate codebase attribute at run-time, to deploy the same JSP in all applications. Evgeny Gesin Javadesk - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
unable to run JSP examples, tomcat 4.1.30, java 1.4.2, windows XP pro
Hi, I have installed tomcat 4.1.30, java 1.4.2 and windows XP pro. When I try to run some JSP exmples I receive a page error. What can be wrong? TIA Jesus Gutierrez. This is the error page javax.servlet.ServletException: javax.servlet.ServletContext.getResourcePaths(Ljava/lang/String;)Ljava/util/ Set; at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:249) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application FilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh ain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja va:256) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok eNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja va:191) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok eNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2422) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180 ) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok eNext(StandardPipeline.java:643) at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve. java:171) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok eNext(StandardPipeline.java:641) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:163 ) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok eNext(StandardPipeline.java:641) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java :174) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok eNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:199) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:828) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConne ction(Http11Protocol.java:700) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:584) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav a:683) at java.lang.Thread.run(Thread.java:534) root cause java.lang.NoSuchMethodError: javax.servlet.ServletContext.getResourcePaths(Ljava/lang/String;)Ljava/util/ Set; at org.apache.jasper.compiler.TldLocationsCache.processJars(TldLocationsCache.j ava:216) at org.apache.jasper.compiler.TldLocationsCache.init(TldLocationsCache.java:158 ) at org.apache.jasper.compiler.TldLocationsCache.getLocation(TldLocationsCache.j ava:357) at org.apache.jasper.JspCompilationContext.getTldLocation(JspCompilationContext .java:436) at org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:353) at org.apache.jasper.compiler.Parser.parseDirective(Parser.java:381) at org.apache.jasper.compiler.Parser.parseElements(Parser.java:795) at org.apache.jasper.compiler.Parser.parse(Parser.java:122) at org.apache.jasper.compiler.ParserController.parse(ParserController.java:199) at org.apache.jasper.compiler.ParserController.parse(ParserController.java:153) at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:227) at org.apache.jasper.compiler.Compiler.compile(Compiler.java:369) at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:4 73) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:1 90) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application FilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ssl question
How do I setup tomcat to communicate with IIS using ssl/https??? Is there any documentation??? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: ssl question
http://nagoya.apache.org/wiki/apachewiki.cgi?Tomcat/Links via .. http://jakarta.apache.org/tomcat/faq/ -Tim John MccLain wrote: How do I setup tomcat to communicate with IIS using ssl/https??? Is there any documentation??? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: ssl question
1. Install Tomcat 2. Install IIS 3. install isapi_redirector.dll in IIS server 4. configure IIS as per documentation in website for isapi_redirector.dll 5. configure certificate in IIS Your application should work now with Tomcat - IIS with ssl setup.. -Original Message- From: John MccLain [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 25, 2004 11:57 AM To: Tomcat user list Subject: ssl question How do I setup tomcat to communicate with IIS using ssl/https??? Is there any documentation??? - 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]
jsp:include/ within a while loop [problems]
Hello, I have been having some problems debugging a set of three JSPs that use jsp:include page=/ tags within a while loop in Tomcat 4.1.29. Just so I don't send my actual code to the list, I will create an identical example using Persons.jsp, Person.jsp, and PhoneNumber.jsp to demonstrate my problem. ---Snippet from Persons.jsp--- jsp:useBean id=persons class=Collection scope=request/ % Iterator iter = persons.iterator(); while( iter.hasNext() ) { request.setAttribute( person, (PersonBean)iter.next() ); % !-- Display people -- jsp:include page=Person.jsp/ % } % ---Snippet from Person.jsp--- jsp:useBean id=person class=my.package.PersonBean scope=request/ % Iterator phone = person.getPhoneNumbers(); while( phone.hasNext() ) { request.setAttribute( phone, (PhoneBean)phone.next() ); % jsp:include page=PhoneNumber.jsp/ % } % ---Snippet from PhoneNumber.jsp--- jsp:useBean id=phone class=my.package.PhoneBean scope=request/ span class=somecss jsp:getProperty name=phone property=phoneNumber/ !-- ...other attributes and html gunk... -- /span --- Now What happens is, when I make a request to the main page Persons.jsp, no exceptions are thrown, and the page begins to render correctly. But what happens is the content is cut off at some random point during the iteration of people/phone numbers. It differs every time you request the page, and from viewing the source, it is clear that the output stream has just been closed at some random point while writing the response. I haven't been able to find any other postings like this describing any such similar problems, and at this point, I am unaware of any way to fix this problem except by rewriting the pages to not use the jsp:include tags within the while loop. I know that this exact same thing works under Caucho Resin 2.1, and only since we ported to Tomcat have we started to see this problem. Any information or insight would be greatly appreciated. Thanks! - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: jsp:include/ within a while loop [problems]
You are overflowing the default page buffer with the include statement. Try to set auto flush to be false(since the default with flush when buffer is close to its limit), or increase the page size to something like % @page buffer= 32k % Hope that helps. Btw, not tomcat related topic:). -Original Message- From: Daniel Wintschel [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 25, 2004 10:05 AM To: [EMAIL PROTECTED] Subject: jsp:include/ within a while loop [problems] Hello, I have been having some problems debugging a set of three JSPs that use jsp:include page=/ tags within a while loop in Tomcat 4.1.29. Just so I don't send my actual code to the list, I will create an identical example using Persons.jsp, Person.jsp, and PhoneNumber.jsp to demonstrate my problem. ---Snippet from Persons.jsp--- jsp:useBean id=persons class=Collection scope=request/ % Iterator iter = persons.iterator(); while( iter.hasNext() ) { request.setAttribute( person, (PersonBean)iter.next() ); % !-- Display people -- jsp:include page=Person.jsp/ % } % ---Snippet from Person.jsp--- jsp:useBean id=person class=my.package.PersonBean scope=request/ % Iterator phone = person.getPhoneNumbers(); while( phone.hasNext() ) { request.setAttribute( phone, (PhoneBean)phone.next() ); % jsp:include page=PhoneNumber.jsp/ % } % ---Snippet from PhoneNumber.jsp--- jsp:useBean id=phone class=my.package.PhoneBean scope=request/ span class=somecss jsp:getProperty name=phone property=phoneNumber/ !-- ...other attributes and html gunk... -- /span --- Now What happens is, when I make a request to the main page Persons.jsp, no exceptions are thrown, and the page begins to render correctly. But what happens is the content is cut off at some random point during the iteration of people/phone numbers. It differs every time you request the page, and from viewing the source, it is clear that the output stream has just been closed at some random point while writing the response. I haven't been able to find any other postings like this describing any such similar problems, and at this point, I am unaware of any way to fix this problem except by rewriting the pages to not use the jsp:include tags within the while loop. I know that this exact same thing works under Caucho Resin 2.1, and only since we ported to Tomcat have we started to see this problem. Any information or insight would be greatly appreciated. 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]
New User Web.xml question
Windows Server 2k, Tomcat 4.1. I'm relatively new at building web applications. I'm ok with the programming, I've never learned how to make a web.xml file. I've gotten by on the invoker running all of my jsp pages. It's now time to do things right. I have many books in front of me. NetBeans The Definitive Guide Tomcat Kick Start Apache Tomcat Bible Tomcat The Definitive Guide Web Development with JavaServer Pages CORE JSTL Mastering the JSP Standard Tag Library CORE Servlets and JavaServer Pages I still have no clue. I only write jsp pages, no servlets. I understand that Tomcat converts this to a servlet. I understand that this servlet is a class. The sample web.xml in the ROOT directory of webapps does not mention a class, yet the index page runs. The sample web.xml in the examples directory of webapps has lots of filter and filter-mapping entries. I have only a vague idea of what they do. I have a few very simple webapps. 1 page to login, 1 page to search. I would like to make a web.xml file for my webapps. Right now, whatever I try I get a 404 error when I restart Tomcat, then I delete the web.xml I made and everything is good again. Can someone give me a tip. If your webapp's root was \\webserver\www.company.com file:///\\webserver\www.company.com%20and%20you%20added%20test.jsp and you added test.jsp to that web app. What entry would you make in your web.xml file? Thanks in advance.
RE: New User Web.xml question
Howdy, You don't need to declare JSPs in your web.xml even though they really are servlets, because there's a special servlet that serves JSP pages. That servlet is declared and mapped in the master web.xml file located in the $CATALINA_HOME/conf directory. Start with a web.xml file that just has an empty webapp element: ?xml version=1.0 encoding=ISO-8859-1? !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN http://java.sun.com/dtd/web-app_2_3.dtd; web-app /web-app Alternatively, you can use the basic web.xml provided in the tomcat First Webapp guide: http://jakarta.apache.org/tomcat/tomcat-5.0-doc/appdev/web.xml.txt (In general, I suggest reading http://jakarta.apache.org/tomcat/tomcat-5.0-doc/appdev/ before any of your many printed books). Yoav Shapira Millennium ChemInformatics -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 25, 2004 12:14 PM To: [EMAIL PROTECTED] Subject: New User Web.xml question Windows Server 2k, Tomcat 4.1. I'm relatively new at building web applications. I'm ok with the programming, I've never learned how to make a web.xml file. I've gotten by on the invoker running all of my jsp pages. It's now time to do things right. I have many books in front of me. NetBeans The Definitive Guide Tomcat Kick Start Apache Tomcat Bible Tomcat The Definitive Guide Web Development with JavaServer Pages CORE JSTL Mastering the JSP Standard Tag Library CORE Servlets and JavaServer Pages I still have no clue. I only write jsp pages, no servlets. I understand that Tomcat converts this to a servlet. I understand that this servlet is a class. The sample web.xml in the ROOT directory of webapps does not mention a class, yet the index page runs. The sample web.xml in the examples directory of webapps has lots of filter and filter-mapping entries. I have only a vague idea of what they do. I have a few very simple webapps. 1 page to login, 1 page to search. I would like to make a web.xml file for my webapps. Right now, whatever I try I get a 404 error when I restart Tomcat, then I delete the web.xml I made and everything is good again. Can someone give me a tip. If your webapp's root was \\webserver\www.company.com file:///\\webserver\www.company.com%20and%20you%20added%20test.jsp and you added test.jsp to that web app. What entry would you make in your web.xml file? Thanks in advance. 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]
RE: Tomcat 5 deployer compile errors on %@ includes
Tim, Thanks. I went to the JSP 2.0 spec and they recommend using .jspf. Here's what they say ( for any that might beinterested ): --- SNIP BEGIN --- ( What Is a JSP Page 1-7 JavaServer Pages 2.0 Specification) By default the extension .jsp means a top-level JSP file. We recommend, but do not mandate, to differentiate between top-level JSP files (invoked directly by the client or dynamically included by another page or servlet) and statically included segments so that: . The .jsp extension is used only for files corresponding to top level JSP files, forming a JSP page when processed. . Statically included segments use any other extension. As included segments were called 'JSP fragments' in past versions of this specification, the extension .jspf was offered as a suggestion. This extension is still suggested for consistency reasons, despite that they are now called 'jsp segments'. --- SNIP END --- Thanks again for pointing me in the right direction. - Richard -Original Message- From: Tim Funk [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 25, 2004 5:22 AM To: Tomcat Users List Subject: Re: Tomcat 5 deployer compile errors on %@ includes The best thing to do is to not make compile time includes end in '.jsp'. Some use .inc, other .jspi, and the spec might even have arecommendation for compile time includes. Also by using a specific file extension you can quickly identify its purpose. -Tim Richard Mixon (qwest) wrote: I am trying to use the client deployer. Our JSP pages use a number of compile time includes such as %@ include file=someCommonCode1.jsp %. The client deployer is trying to compile each of these included files independently. I am getting compile errors all over the place. The reason is that one include will imports a profiling package that some of the other includes depend upon. The deployer is trying to compile each .jsp file as a complete page. Is there another approach for handling compile time includes that will avoid this problem? Is there a way to designate jsp files that should not be compiled independently? Thanks in advance - Richard - 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: New User Web.xml question
JSP do not need any entries in web.xml caused they are simply mapped by filename Servlets need an entry so that you can map the servlet class to a URL pattern Filip -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 25, 2004 9:14 AM To: [EMAIL PROTECTED] Subject: New User Web.xml question Windows Server 2k, Tomcat 4.1. I'm relatively new at building web applications. I'm ok with the programming, I've never learned how to make a web.xml file. I've gotten by on the invoker running all of my jsp pages. It's now time to do things right. I have many books in front of me. NetBeans The Definitive Guide Tomcat Kick Start Apache Tomcat Bible Tomcat The Definitive Guide Web Development with JavaServer Pages CORE JSTL Mastering the JSP Standard Tag Library CORE Servlets and JavaServer Pages I still have no clue. I only write jsp pages, no servlets. I understand that Tomcat converts this to a servlet. I understand that this servlet is a class. The sample web.xml in the ROOT directory of webapps does not mention a class, yet the index page runs. The sample web.xml in the examples directory of webapps has lots of filter and filter-mapping entries. I have only a vague idea of what they do. I have a few very simple webapps. 1 page to login, 1 page to search. I would like to make a web.xml file for my webapps. Right now, whatever I try I get a 404 error when I restart Tomcat, then I delete the web.xml I made and everything is good again. Can someone give me a tip. If your webapp's root was \\webserver\www.company.com file:///\\webserver\www.company.com%20and%20you%20added%20test.jsp and you added test.jsp to that web app. What entry would you make in your web.xml file? Thanks in advance. --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.594 / Virus Database: 377 - Release Date: 2/24/2004 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.594 / Virus Database: 377 - Release Date: 2/24/2004 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
servlet mapping problem
Hi. I am very troubled over a servlet mapping problem, and I am hoping that someone can make a suggestion. I have added a context in conf/Catalina/localhost/test.xml as follows: Context path=/mywebapps docBase=/cs/home/jas/webapps reloadable=true autoDeploy=true/Context In /cs/home/jas/webapps/test, I have a directory test with a WEB-INF directory containing: 1) a classes directory containing HelloWorldExample.class 2) a web.xml file containing: ?xml version=1.0 encoding=ISO-8859-1? !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN http://java.sun.com/dtd/web-app_2_3.dtd; web-app display-nameServlet Example/display-name description Servlet Example /description servlet servlet-nameHelloWorldExample/servlet-name servlet-classHelloWorldExample/servlet-class /servlet servlet-mapping servlet-nameHelloWorldExample/servlet-name url-pattern/servlet/HelloWorldExample/url-pattern /servlet-mapping /web-app -- If I try to go to: http://localhost:8080/mywebapps/servlet/HelloWorldExample I get that the requested resource is not available. Please help. Thanks, Jason. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: International character problem in submitting a jsp form
Hi, I know it is a nightmare. We love Java, don't we? We love Tomcat, don't we? So what about internalization? Thanks, Bilge Erkan wrote: Hi, I'm using Tomcat 4.1.12. I have a trouble using Turkish characters in inputs on my forms. I don't have any problem displaying constant strings from resource files or displaying data retrieved from database where they both contain Turkish characters. So I decided to make a simple test as follows: I have a form with a text input in a jsp page. I post this form to another jsp page and this page just prints this parameter value to 'out'. As a result Turkish characters are not displayed correctly. The following is the jsp that has the form: %@ page language=java contentType=text/html;charset=utf-8 session=true% html head meta http-equiv=Content-Type content=text/html;charset=utf-8 /head body form method=POST name=Test action=PostTest2.jsp input type=text name=data input type=submit name=buttonSubmit value=OK /form /body /html The following is the jsp that the form is posted: %@ page language=java contentType=text/html;charset=utf-8 session=true% html head meta http-equiv=Content-Type content=text/html;charset=utf-8 /head body % out.println(response.getCharacterEncoding()); out.println(response.getLocale()); out.println(request.getCharacterEncoding()); out.println(request.getLocale()); String s = request.getParameter(data); out.println(s); System.out.println(s); % /body /html The output is as follows: utf-8 en_US null tr ??? Here, the character encoding of the response seems to be utf-8, the locale of the response seems to be en_US, the character encoding of the request seems to be null (maybe the problem is here, but I don't know how to solve) and the locale of the request seems to be tr. I also tried to set charset to iso-8859-9 which is for Turkish characters, instead of utf-8, but the problem is same. The output is as follows: iso-8859-9 en_US null tr ?? How can I solve this problem? Are there any settings to give to Tomcat? How does Tomcat determine the locale of the server? PS: I later tried to use Tomcat 4.1.30, and everything is same. 4.1.12 version that I'm using was an rpm installation and it has a tomcat.conf file, in which there is a LANG parameter that I set it to tr_TR. But it does not solve this problem. In 4.1.30 version there is no such a file to set LANG. How can we make LANG setting in 4.1.30? Thanks a lot, Bilge - 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: servlet mapping problem
Howdy, I am very troubled over a servlet mapping problem, and I am hoping that someone can make a suggestion. I have added a context in conf/Catalina/localhost/test.xml as follows: Context path=/mywebapps docBase=/cs/home/jas/webapps reloadable=true autoDeploy=true/Context In /cs/home/jas/webapps/test, I have a directory test with a WEB-INF directory containing: Make sure you understand that one context = one webapp. If you want the test webapp to available, make test.xml more like Context path=/test docBase=/cs/home/jas/webapps/test / And then go to http://yourhost:yourport/test to access your webapp. If you have multiple webapps under /cs/home/jas/webapps and want tomcat to recognize them all, define /cs/home/jas/webapps as the appBase directory for a Host. 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]
Re: servlet mapping problem
Jason Keltz wrote: Hi. I am very troubled over a servlet mapping problem, and I am hoping that someone can make a suggestion. I have added a context in conf/Catalina/localhost/test.xml as follows: Context block should be in conf/server.xml file. Best Bao Context path=/mywebapps docBase=/cs/home/jas/webapps reloadable=true autoDeploy=true/Context In /cs/home/jas/webapps/test, I have a directory test with a WEB-INF directory containing: 1) a classes directory containing HelloWorldExample.class 2) a web.xml file containing: ?xml version=1.0 encoding=ISO-8859-1? !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN http://java.sun.com/dtd/web-app_2_3.dtd; web-app display-nameServlet Example/display-name description Servlet Example /description servlet servlet-nameHelloWorldExample/servlet-name servlet-classHelloWorldExample/servlet-class /servlet servlet-mapping servlet-nameHelloWorldExample/servlet-name url-pattern/servlet/HelloWorldExample/url-pattern /servlet-mapping /web-app -- If I try to go to: http://localhost:8080/mywebapps/servlet/HelloWorldExample I get that the requested resource is not available. Please help. Thanks, Jason. - 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: servlet mapping problem
Howdy, Context block should be in conf/server.xml file. It doesn't have to be, and with tomcat 5 that's actually discouraged. 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]
Re: Tomcat 4 + Apache 2 + mod_jk (auto-config) + https
You're right normally .. but I want to use the auto-generated conf/auto/mod_jk.conf , which includes everything necessary to a VirtualHost of apache ... without the SSL-Stuff! Yiannis Mavroukakis wrote: Don't think you need to. I am running httpd2(SSL)+tomcat4/5+mod_jk2. Apache will take care of the SSL side, and mod_jk should forward everything unencrypted via localhost(if that is your setup) to tomcat. -Original Message- From: Samuel Rutishauser [mailto:[EMAIL PROTECTED] Sent: 25 February 2004 15:09 To: Tomcat Users List Subject: Tomcat 4 + Apache 2 + mod_jk (auto-config) + https Hello all, I have Tomcat 4 + Apache 2 + mod_jk (in auto-config mode). Everything's fine, but I don't see how to tell Tomcat to build the generated mod_jk.conf as to listen to https traffic. Any ideas? Thank you Samuel Rutishauser - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail has been scanned for all viruses by Star Internet. The service is powered by MessageLabs. Note:__ This message is for the named person's use only. It may contain confidential, proprietary or legally privileged information. No confidentiality or privilege is waived or lost by any mistransmission. If you receive this message in error, please immediately delete it and all copies of it from your system, destroy any hard copies of it and notify the sender. You must not, directly or indirectly, use, disclose, distribute, print, or copy any part of this message if you are not the intended recipient. Jaguar Freight Services and any of its subsidiaries each reserve the right to monitor all e-mail communications through its networks. Any views expressed in this message are those of the individual sender, except where the message states otherwise and the sender is authorized to state them to be the views of any such entity. This e-mail has been scanned for all viruses by Star Internet. The service is powered by MessageLabs. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: servlet mapping problem
Thanks, Yoav. Using localhost:8080/test works if the docBase in the context is defined to include test. However, as you suggested, I'm trying to create a directory with multiple webapps, and I want to have multiple directories like this. For example: /cs/home/jas/webapps1/app1 /cs/home/jas/webapps1/app2 /cs/home/jas/webapps2/app3 /cs/home/jas/webapps3/app4 /cs/home/jas/webapps3/app5 I would prefer not to have to define each context/webapp individually, and I would like new webapps to automatically be deployed if placed in any of these repositories. You say that I can define appBase for the host. Right now, in server.xml, I see: Host name=localhost debug=0 appBase=webapps unpackWARs=true autoDeploy=true xmlValidation=false xmlNamespaceAware=false If I want multiple appBase directories for this host, can I define multiple host lines, changing the appBase directive for each one? Would this mean that I now do not have to add any context lines for the applications to work? Thanks so much for your help ... Jason. On Wed, 25 Feb 2004, Shapira, Yoav wrote: Howdy, I am very troubled over a servlet mapping problem, and I am hoping that someone can make a suggestion. I have added a context in conf/Catalina/localhost/test.xml as follows: Context path=/mywebapps docBase=/cs/home/jas/webapps reloadable=true autoDeploy=true/Context In /cs/home/jas/webapps/test, I have a directory test with a WEB-INF directory containing: Make sure you understand that one context = one webapp. If you want the test webapp to available, make test.xml more like Context path=/test docBase=/cs/home/jas/webapps/test / And then go to http://yourhost:yourport/test to access your webapp. If you have multiple webapps under /cs/home/jas/webapps and want tomcat to recognize them all, define /cs/home/jas/webapps as the appBase directory for a Host. 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Using HTTPS with keystore and trust store files
Hi, I am trying to set up Tomcat for HTTPS connection with keystore and truststore files. I want to use Tomcat as the web server so the port number is 80 and 443 for HTTP and HTTPS, respectively. I am running Tomcat on Windows XP. Here is the 'Connector' entry in %CATALINA_HOME%\conf\server.xml. Connector port=443 maxThreads=150 minSpareThreads=25 maxSpareThreads=75 enableLookups=false disableUploadTimeout=true acceptCount=100 debug=0 scheme=https secure=true clientAuth=true sslProtocol=TLS keystoreFile=server.ks keystoreType=JCEKS keystorePass=changeit truststoreFile=server.ts truststoreType=JCEKS /Connector When I start tomcat, I get the following error: java.io.FileNotFoundException: server.ks (The system cannot find the file specif ied) at java.io.FileInputStream.open(Native Method) at java.io.FileInputStream.init(FileInputStream.java:106) at java.io.FileInputStream.init(FileInputStream.java:66) at org.apache.tomcat.util.net.jsse.JSSESocketFactory.getStore(JSSESocket Factory.java:262) at org.apache.tomcat.util.net.jsse.JSSESocketFactory.getKeystore(JSSESoc ketFactory.java:232) .. I tried to put the file in different places, the user's home directory in C:\Documents and Settings\%user%\, %CATALINA_HOME%\, %CATALINA_HOME%\webapps, %CATALINA_HOME%\webapps\ROOT, but they all failed. My questions are: 1. Where should the keystore file be stored if I set the 'keystoreFile' attribute in Connector element? 2. If I set 'clientAuth' to true, shouldn't there be a place to store the the client's certificate, i.e. the truststore? Where do I specify the file that store the client's certificate? I saw the truststoreFile attribute in an example from http://www.j2ee-security.net/book/sample-chap/ It sets this attribute in a 'Factory' subelement. But that is for Tomcat 4.X. Any help is appreciated. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cachesize in worker.properties for mod_jk on tomcat404
I've set this to two. I would have thought that this would make me only have to do two HTTP requests to apache, after a tomcat restart, before getting a proper connection. Is this the case, or no? How does this property actually work? I get an internal server error on apache multiple times before getting a good connection to tomcat. __ This communication is intended for the use of the recipient to whom it is addressed, and may contain confidential, personal, and or privileged information. Please contact us immediately if you are not the intended recipient of this communication, and do not copy, distribute, or take action relying on it. Any communications received in error, or subsequent reply, should be deleted or destroyed. --- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: servlet mapping problem
Howdy, Host name=localhost debug=0 appBase=webapps unpackWARs=true autoDeploy=true xmlValidation=false xmlNamespaceAware=false If I want multiple appBase directories for this host, can I define multiple host lines, changing the appBase directive for each one? Each host has one appBase directory. You can either change localhost or define another Host (you can have as many as you want). The appBase is either absolute (/cs/...) or relative to $CATALINA_HOME. Would this mean that I now do not have to add any context lines for the applications to work? Yes, by default, thanks to the Automatic Application Deployment. Read these: http://jakarta.apache.org/tomcat/tomcat-5.0-doc/config/host.html http://jakarta.apache.org/tomcat/tomcat-5.0-doc/config/host.html#Automat ic%20Application%20Deployment 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]
PKCS12 Keystore
Hi, I'm trying to setup a keystore of type pkcs12 using the java keytool. I enter this command 'keytool -genkey -keystore c:\tomcat -storetype PKCS12 -alias tomcat'. Well, everytime I try and enter in the subject information for the keys and finish the process, the keytool creates the keystore of type pkcs12 but I get this error message 'keytool error: java.io.IOException: PKCS 12 storing not implemented' Do I have to download an additional provider or what? Thanks for any help, Paul - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat 4.1.29 CoyoteAdapter Exception
After further investigation, I am just going to chalk this one up as a stability issue with windows XP. The same version of tomcat running with same configuration on linux can sustain well over 1+++ hits using jmeter while the same configuration on windows barely handles 2000 hits before tomcat fails. Anyone know of a stable version of tomcat that works with windows. Do I need to downgrade to 4.0.x or upgrade to 5.0.x versions of tomcat for better stability on windowsor do I need to convince my boss what I have know all along, linux is superior to windows. Thanks. Randall -Original Message- From: Randall Svancara [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 25, 2004 8:05 AM To: Tomcat Users List Subject: RE: Tomcat 4.1.29 CoyoteAdapter Exception Ok, now I am thinking this error might be caused by Database Connection pooling. I increased Mysql's max connection limit from the default to 500. I hope this enough to satify my hungry application. Also I adjusted the apps xml configuration option maxActive to a value of 400 which is 100 less than the max. We will see if this works. -Original Message- From: Randall Svancara [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 25, 2004 7:47 AM To: Tomcat Users List Subject: RE: Tomcat 4.1.29 CoyoteAdapter Exception Thanks, I have had a difficult time reproducing this error on a predictable basis. All I can say is that it happens once per day, and I have temporarily wrote a perl script that checks the service to see if it is working properly, and if not, it shuts down tomcat and restarts it...A bandaid fix at best. I will give you a little more background on the webapp I have deployed. It is just a basic webapp with several jsp pages and a couple of servlets. I am using Database Connection Pooling with Mysql Connector J. The problem does not appear to happen on any one particular jsp or servlet, but I will keep digging further to see if it is or not. If I can create a reproducable test case, I will post it here. I will keep on researching the problem to see if I can pin point the exact error. Thanks for the advice on using news groups. It is my first experience with them. Thanks, Randall -Original Message- From: Adam Hardy [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 25, 2004 2:47 AM To: Tomcat Users List Subject: Re: Tomcat 4.1.29 CoyoteAdapter Exception Randall, I've often had issues that cause major problems, and my experience is that user groups and mailing lists are normally unable to help without there being an easily reproducible error. For instance, are you able to nail it down to a particular page or servlet? Does it happen regularly or at random? Can you make a test case? Sorry I can't be any help, but good luck finding it. Adam On 02/25/2004 12:03 AM Randall Svancara wrote: What would cause the coyote connector to return a null pointer exception. Every time this happens, mod_jk is unable to communicate with tomcat and as a result our web service is unusable. Is this a tomcat bug, or a problem with running tomcat on Windows XP. Anyway, I have looked through this user group and found some other people with this problem on Solaris, but no real answers. Thanks. I am running tomcat 4.1.29, apache 2.0.48, with mod_jk configured on Windows XP. Occasionally, I will receive the following error: 2004-02-23 15:40:07 CoyoteAdapter Requested cookie session id is A02AD09BF242D0D916799B2EBB0FCC92.worker1 2004-02-23 15:40:07 CoyoteAdapter An exception or error occurred in the container during the request processing java.lang.NullPointerException at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:164) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:193) at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:309) at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:387) at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:673) at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:615) at org.apache.jk.common.SocketConnection.runIt(ChannelSocket.java:786) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:666) at java.lang.Thread.run(Thread.java:534) -Original Message- From: Randall Svancara Sent: Tuesday, February 24, 2004 11:34 AM To: Tomcat Users List Subject: RE: Tomcat 4.1.29 CoyoteAdapter Exception Here is my server.xml in full for anyone interested. It is at the end of this email. -Original Message- From: Randall Svancara Sent: Tuesday, February 24,
RE: New User Web.xml question
Thank you Flip and Yoav for your help. That cleared up a lot of confusion. I have used the empty web.xml listed below, restarted tomcat, and everything was fine. I then added some taglibs to the web.xml: ?xml version=1.0 encoding=ISO-8859-1? !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN http://java.sun.com/dtd/web-app_2_3.dtd; web-app taglib taglib-urihttp://jakarta.apache.org/taglibs/c/taglib-uri taglib-location/WEB-INF/c.tld/taglib-location /taglib taglib taglib-urihttp://jakarta.apache.org/taglibs/sql/taglib-uri taglib-location/WEB-INF/sql.tld/taglib-location /taglib /web-app When I restart Tomcat, I get a 404 error. Any ideas? -Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 25, 2004 12:20 PM To: Tomcat Users List Subject: RE: New User Web.xml question Howdy, You don't need to declare JSPs in your web.xml even though they really are servlets, because there's a special servlet that serves JSP pages. That servlet is declared and mapped in the master web.xml file located in the $CATALINA_HOME/conf directory. Start with a web.xml file that just has an empty webapp element: ?xml version=1.0 encoding=ISO-8859-1? !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN http://java.sun.com/dtd/web-app_2_3.dtd; web-app /web-app Alternatively, you can use the basic web.xml provided in the tomcat First Webapp guide: http://jakarta.apache.org/tomcat/tomcat-5.0-doc/appdev/web.xml.txt (In general, I suggest reading http://jakarta.apache.org/tomcat/tomcat-5.0-doc/appdev/ before any of your many printed books). Yoav Shapira Millennium ChemInformatics -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 25, 2004 12:14 PM To: [EMAIL PROTECTED] Subject: New User Web.xml question Windows Server 2k, Tomcat 4.1. I'm relatively new at building web applications. I'm ok with the programming, I've never learned how to make a web.xml file. I've gotten by on the invoker running all of my jsp pages. It's now time to do things right. I have many books in front of me. NetBeans The Definitive Guide Tomcat Kick Start Apache Tomcat Bible Tomcat The Definitive Guide Web Development with JavaServer Pages CORE JSTL Mastering the JSP Standard Tag Library CORE Servlets and JavaServer Pages I still have no clue. I only write jsp pages, no servlets. I understand that Tomcat converts this to a servlet. I understand that this servlet is a class. The sample web.xml in the ROOT directory of webapps does not mention a class, yet the index page runs. The sample web.xml in the examples directory of webapps has lots of filter and filter-mapping entries. I have only a vague idea of what they do. I have a few very simple webapps. 1 page to login, 1 page to search. I would like to make a web.xml file for my webapps. Right now, whatever I try I get a 404 error when I restart Tomcat, then I delete the web.xml I made and everything is good again. Can someone give me a tip. If your webapp's root was \\webserver\www.company.com file:///\\webserver\www.company.com%20and%20you%20added%20test.jsp and you added test.jsp to that web app. What entry would you make in your web.xml file? Thanks in advance. 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: New User Web.xml question
Howdy, When I restart Tomcat, I get a 404 error. Any ideas? You don't get a 404 error when you restart tomcat. You get a 404 error when you try to access some resource that tomcat can't find. What resource, what is its mapping if any, and what errors are in your logs? 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]
RE: unable to run JSP examples, tomcat 4.1.30, java 1.4.2, window s XP p ro
The first thing I notice is Ljava. Is that correct? -Original Message- From: Jesús Gutiérrez Ramírez [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 25, 2004 11:47 AM To: [EMAIL PROTECTED] Subject: unable to run JSP examples, tomcat 4.1.30, java 1.4.2, windows XP p ro Hi, I have installed tomcat 4.1.30, java 1.4.2 and windows XP pro. When I try to run some JSP exmples I receive a page error. What can be wrong? TIA Jesus Gutierrez. This is the error page javax.servlet.ServletException: javax.servlet.ServletContext.getResourcePaths(Ljava/lang/String;)Ljava/util/ Set; at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:249) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application FilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh ain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja va:256) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok eNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja va:191) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok eNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2422) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180 ) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok eNext(StandardPipeline.java:643) at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve. java:171) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok eNext(StandardPipeline.java:641) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:163 ) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok eNext(StandardPipeline.java:641) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java :174) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok eNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:199) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:828) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConne ction(Http11Protocol.java:700) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:584) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav a:683) at java.lang.Thread.run(Thread.java:534) root cause java.lang.NoSuchMethodError: javax.servlet.ServletContext.getResourcePaths(Ljava/lang/String;)Ljava/util/ Set; at org.apache.jasper.compiler.TldLocationsCache.processJars(TldLocationsCache.j ava:216) at org.apache.jasper.compiler.TldLocationsCache.init(TldLocationsCache.java:158 ) at org.apache.jasper.compiler.TldLocationsCache.getLocation(TldLocationsCache.j ava:357) at org.apache.jasper.JspCompilationContext.getTldLocation(JspCompilationContext .java:436) at org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:353) at org.apache.jasper.compiler.Parser.parseDirective(Parser.java:381) at org.apache.jasper.compiler.Parser.parseElements(Parser.java:795) at org.apache.jasper.compiler.Parser.parse(Parser.java:122) at org.apache.jasper.compiler.ParserController.parse(ParserController.java:199) at org.apache.jasper.compiler.ParserController.parse(ParserController.java:153) at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:227) at org.apache.jasper.compiler.Compiler.compile(Compiler.java:369) at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:4 73) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:1 90) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295) at
RE: jsp:include/ within a while loop [problems]
Thank you Yansheng. I have increased the page buffer to 32KB, and was still experiencing the same problem. In order to fix it, I had to add this as the last line in the JSP: %out.flush();% I don't know why that is, but this seems to have solved the problem. Apologies for this not being a Tomcat related post, I figured this was a good place to post it since we weren't experiencing this problem with Resin. Thanks again! -Original Message- From: Yansheng Lin [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 25, 2004 9:14 AM To: 'Tomcat Users List' Subject: RE: jsp:include/ within a while loop [problems] You are overflowing the default page buffer with the include statement. Try to set auto flush to be false(since the default with flush when buffer is close to its limit), or increase the page size to something like % @page buffer= 32k % Hope that helps. Btw, not tomcat related topic:). -Original Message- From: Daniel Wintschel [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 25, 2004 10:05 AM To: [EMAIL PROTECTED] Subject: jsp:include/ within a while loop [problems] Hello, I have been having some problems debugging a set of three JSPs that use jsp:include page=/ tags within a while loop in Tomcat 4.1.29. Just so I don't send my actual code to the list, I will create an identical example using Persons.jsp, Person.jsp, and PhoneNumber.jsp to demonstrate my problem. ---Snippet from Persons.jsp--- jsp:useBean id=persons class=Collection scope=request/ % Iterator iter = persons.iterator(); while( iter.hasNext() ) { request.setAttribute( person, (PersonBean)iter.next() ); % !-- Display people -- jsp:include page=Person.jsp/ % } % ---Snippet from Person.jsp--- jsp:useBean id=person class=my.package.PersonBean scope=request/ % Iterator phone = person.getPhoneNumbers(); while( phone.hasNext() ) { request.setAttribute( phone, (PhoneBean)phone.next() ); % jsp:include page=PhoneNumber.jsp/ % } % ---Snippet from PhoneNumber.jsp--- jsp:useBean id=phone class=my.package.PhoneBean scope=request/ span class=somecss jsp:getProperty name=phone property=phoneNumber/ !-- ...other attributes and html gunk... -- /span --- Now What happens is, when I make a request to the main page Persons.jsp, no exceptions are thrown, and the page begins to render correctly. But what happens is the content is cut off at some random point during the iteration of people/phone numbers. It differs every time you request the page, and from viewing the source, it is clear that the output stream has just been closed at some random point while writing the response. I haven't been able to find any other postings like this describing any such similar problems, and at this point, I am unaware of any way to fix this problem except by rewriting the pages to not use the jsp:include tags within the while loop. I know that this exact same thing works under Caucho Resin 2.1, and only since we ported to Tomcat have we started to see this problem. Any information or insight would be greatly appreciated. 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: unable to run JSP examples, tomcat 4.1.30, java 1.4.2, windows XP p ro
This is correct. I have seen this problem before, and it usually is a result of Java not being installed correctly, or having an old version of Java in your path. What you might want to try is opening a command prompt, and typing java -version to make sure that it is indeed 1.4.2 that is running. Also make sure that you haven't got an old JAVA_HOME set, and although this is a redundant statement, make double-plus sure that you don't have an old java.exe in your PATH. Eg: Modify your JAVA_HOME to point to your 1.4.2 install Modify your PATH env variable to put c:\j2sdk1.4.2_03\bin is the first thing in your path. Hope that helps. -Original Message- From: Januski, Ken [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 25, 2004 10:56 AM To: Tomcat Users List Subject: RE: unable to run JSP examples, tomcat 4.1.30, java 1.4.2, windows XP p ro The first thing I notice is Ljava. Is that correct? -Original Message- From: Jesús Gutiérrez Ramírez [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 25, 2004 11:47 AM To: [EMAIL PROTECTED] Subject: unable to run JSP examples, tomcat 4.1.30, java 1.4.2, windows XP p ro Hi, I have installed tomcat 4.1.30, java 1.4.2 and windows XP pro. When I try to run some JSP exmples I receive a page error. What can be wrong? TIA Jesus Gutierrez. This is the error page javax.servlet.ServletException: javax.servlet.ServletContext.getResourcePaths(Ljava/lang/String;)Ljava/util/ Set; at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:249) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application FilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh ain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja va:256) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok eNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja va:191) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok eNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2422) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180 ) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok eNext(StandardPipeline.java:643) at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve. java:171) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok eNext(StandardPipeline.java:641) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:163 ) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok eNext(StandardPipeline.java:641) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java :174) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok eNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:199) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:828) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConne ction(Http11Protocol.java:700) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:584) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav a:683) at java.lang.Thread.run(Thread.java:534) root cause java.lang.NoSuchMethodError: javax.servlet.ServletContext.getResourcePaths(Ljava/lang/String;)Ljava/util/ Set; at org.apache.jasper.compiler.TldLocationsCache.processJars(TldLocationsCache.j ava:216) at org.apache.jasper.compiler.TldLocationsCache.init(TldLocationsCache.java:158 ) at org.apache.jasper.compiler.TldLocationsCache.getLocation(TldLocationsCache.j ava:357) at org.apache.jasper.JspCompilationContext.getTldLocation(JspCompilationContext .java:436) at org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:353) at
RE: unable to run JSP examples, tomcat 4.1.30, java 1.4.2, windows XP p ro
The root cause: java.lang.NoSuchMethodError: javax.servlet.ServletContext.getResourcePaths(Ljava/lang/String;)Ljava/u til/Set; Means that the jVM cannot find the method in ServletContext that accepts a String parameter and returns a java.util.Set. This method is only since servlet 2.3, so it's possible you've got a j2ee.jar or servlet.jar somewhere on your system that is from the previous spec, and is causing problems. Look for those jar files on your system. You shouldn't have any other version of these files (and not j2ee.jar at all!) in CATALINA_HOME/common/lib other than the servlet.jar that came with your tomcat. -Original Message- From: Januski, Ken [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 25, 2004 12:56 PM To: Tomcat Users List Subject: RE: unable to run JSP examples, tomcat 4.1.30, java 1.4.2, windows XP p ro The first thing I notice is Ljava. Is that correct? -Original Message- From: Jesús Gutiérrez Ramírez [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 25, 2004 11:47 AM To: [EMAIL PROTECTED] Subject: unable to run JSP examples, tomcat 4.1.30, java 1.4.2, windows XP p ro Hi, I have installed tomcat 4.1.30, java 1.4.2 and windows XP pro. When I try to run some JSP exmples I receive a page error. What can be wrong? TIA Jesus Gutierrez. This is the error page javax.servlet.ServletException: javax.servlet.ServletContext.getResourcePaths(Ljava/lang/Strin g;)Ljava/util/ Set; at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:249) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilt er(Application FilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(Appli cationFilterCh ain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardW rapperValve.ja va:256) at org.apache.catalina.core.StandardPipeline$StandardPipelineValv eContext.invok eNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipel ine.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContextValve.invoke(StandardC ontextValve.ja va:191) at org.apache.catalina.core.StandardPipeline$StandardPipelineValv eContext.invok eNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipel ine.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContext.invoke(StandardContex t.java:2422) at org.apache.catalina.core.StandardHostValve.invoke(StandardHost Valve.java:180 ) at org.apache.catalina.core.StandardPipeline$StandardPipelineValv eContext.invok eNext(StandardPipeline.java:643) at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDi spatcherValve. java:171) at org.apache.catalina.core.StandardPipeline$StandardPipelineValv eContext.invok eNext(StandardPipeline.java:641) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReport Valve.java:163 ) at org.apache.catalina.core.StandardPipeline$StandardPipelineValv eContext.invok eNext(StandardPipeline.java:641) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipel ine.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEn gineValve.java :174) at org.apache.catalina.core.StandardPipeline$StandardPipelineValv eContext.invok eNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipel ine.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter. java:199) at org.apache.coyote.http11.Http11Processor.process(Http11Process or.java:828) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandle r.processConne ction(Http11Protocol.java:700) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoi nt.java:584) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run( ThreadPool.jav a:683) at java.lang.Thread.run(Thread.java:534) root cause java.lang.NoSuchMethodError: javax.servlet.ServletContext.getResourcePaths(Ljava/lang/Strin g;)Ljava/util/ Set; at org.apache.jasper.compiler.TldLocationsCache.processJars(TldLo cationsCache.j ava:216) at org.apache.jasper.compiler.TldLocationsCache.init(TldLocations Cache.java:158 ) at org.apache.jasper.compiler.TldLocationsCache.getLocation(TldLo cationsCache.j ava:357) at
problem with server.xml
Hello All, I'm trying to setup the mod_jk connector between tomcat 5.0.16 and apache 1.3.x on a linux box. I've got the connector compiled and installed in apache and I can point a browser at www.mydomain.com/servlet/foo and I get an error message from tomcat, not apache, saying resource not available,so I believe the connector is sucsefully talking to tomcat. The next step is to create a workers.properties and server.xml file for tomcat. The howto's I'm looking at have sample files, workers.properties looks pretty straight forward but I'm kinda confused about server.xml. Both howto's say to backup the default server.xml and start from scratch, I've pasted their template at the bottom. When I try using their server.xml tomcat won't even start, when I run the startup script tomcat fails without any error message, obviously I need to tweak some stuff. It looks like I should change your_domain to my domain name and docBase to where my application is but these changes don't fix things. Does anybody see what I'm doing wrong?? I've looked in the log files but didn't see anything helpful Thanx Dave Server port=8005 shutdown=SHUTDOWN debug=0 Service name=Tomcat-Apache Connector className=org.apache.ajp.tomcat4.Ajp13Connector address=127.0.0.1 port=8009 minProcessors=5 maxProcessors=75 enableLookups=false acceptCount=10 debug=0/ Engine name=your_engine debug=0 defaultHost=your_domain Logger className=org.apache.catalina.logger.FileLogger prefix=catalina_log. suffix=.txt timestamp=true/ Host name=your_domain debug=0 unpackWARs=true Context path= docBase=/home/tomcat/your_application debug=0 reloadable=true / /Host /Engine /Service /Server - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: New User Web.xml question
Tomcat Log for web app, after I add taglibs to web.xml: 2004-02-25 13:41:02 WebappLoader[]: Deploying class repositories to work directory C:\Program Files\Apache Group\Tomcat 4.1\work\Standalone\www.company.com\_ 2004-02-25 13:41:02 WebappLoader[]: Deploy class files /WEB-INF/classes to E:\Inetpub\wwwroot\www.company.com\WEB-INF\classes 2004-02-25 13:41:02 WebappLoader[]: Deploy JAR /WEB-INF/lib/dom.jar to E:\Inetpub\wwwroot\www.company.com\WEB-INF\lib\dom.jar 2004-02-25 13:41:02 WebappLoader[]: Deploy JAR /WEB-INF/lib/jaxen-full.jar to E:\Inetpub\wwwroot\www.company.com\WEB-INF\lib\jaxen-full.jar 2004-02-25 13:41:02 WebappLoader[]: Deploy JAR /WEB-INF/lib/jaxp-api.jar to E:\Inetpub\wwwroot\www.company.com\WEB-INF\lib\jaxp-api.jar 2004-02-25 13:41:02 WebappLoader[]: Deploy JAR /WEB-INF/lib/jdbc2_0-stdext.jar to E:\Inetpub\wwwroot\www.company.com\WEB-INF\lib\jdbc2_0-stdext.jar 2004-02-25 13:41:02 WebappLoader[]: Deploy JAR /WEB-INF/lib/jstl.jar to E:\Inetpub\wwwroot\www.company.com\WEB-INF\lib\jstl.jar 2004-02-25 13:41:02 WebappLoader[]: Deploy JAR /WEB-INF/lib/sax.jar to E:\Inetpub\wwwroot\www.company.com\WEB-INF\lib\sax.jar 2004-02-25 13:41:02 WebappLoader[]: Deploy JAR /WEB-INF/lib/saxpath.jar to E:\Inetpub\wwwroot\www.company.com\WEB-INF\lib\saxpath.jar 2004-02-25 13:41:02 WebappLoader[]: Deploy JAR /WEB-INF/lib/standard.jar to E:\Inetpub\wwwroot\www.company.com\WEB-INF\lib\standard.jar 2004-02-25 13:41:02 WebappLoader[]: Deploy JAR /WEB-INF/lib/xalan.jar to E:\Inetpub\wwwroot\www.company.com\WEB-INF\lib\xalan.jar 2004-02-25 13:41:02 WebappLoader[]: Deploy JAR /WEB-INF/lib/xercesImpl.jar to E:\Inetpub\wwwroot\www.company.com\WEB-INF\lib\xercesImpl.jar 2004-02-25 13:41:02 WebappLoader[]: Reloading checks are enabled for this Context 2004-02-25 13:41:02 ContextConfig[] Exception processing TLD at resource path /WEB-INF/c.tld javax.servlet.ServletException: Exception processing TLD at resource path /WEB-INF/c.tld at org.apache.catalina.startup.ContextConfig.tldScanTld(ContextConfig.java:1010 ) at org.apache.catalina.startup.ContextConfig.tldScan(ContextConfig.java:870) at org.apache.catalina.startup.ContextConfig.start(ContextConfig.java:647) at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java: 243) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSuppor t.java:166) at org.apache.catalina.core.StandardContext.start(StandardContext.java:3568) at org.apache.catalina.startup.HostConfig.checkWebXmlLastModified(HostConfig.ja va:614) at org.apache.catalina.startup.HostConfig.run(HostConfig.java:854) at java.lang.Thread.run(Thread.java:534) - Root Cause - java.lang.IllegalArgumentException: Invalid TLD resource path /WEB-INF/c.tld at org.apache.catalina.startup.ContextConfig.tldScanTld(ContextConfig.java:1002 ) at org.apache.catalina.startup.ContextConfig.tldScan(ContextConfig.java:870) at org.apache.catalina.startup.ContextConfig.start(ContextConfig.java:647) at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java: 243) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSuppor t.java:166) at org.apache.catalina.core.StandardContext.start(StandardContext.java:3568) at org.apache.catalina.startup.HostConfig.checkWebXmlLastModified(HostConfig.ja va:614) at org.apache.catalina.startup.HostConfig.run(HostConfig.java:854) at java.lang.Thread.run(Thread.java:534) 2004-02-25 13:41:02 ContextConfig[]: Marking this application unavailable due to previous error(s) 2004-02-25 13:41:02 StandardManager[]: Seeding random number generator class java.security.SecureRandom 2004-02-25 13:41:02 StandardManager[]: Seeding of random number generator has been completed 2004-02-25 13:41:02 StandardContext[]: Context startup failed due to previous errors 2004-02-25 13:41:39 StandardHost[www.company.com]: Removing web application at context path 2004-02-25 13:41:39 StandardHost[www.company.com]: ContainerBase.removeChild: stop: LifecycleException: Container StandardContext[] has not been started at org.apache.catalina.core.StandardContext.stop(StandardContext.java:3644) at org.apache.catalina.core.ContainerBase.removeChild(ContainerBase.java:1036) at org.apache.catalina.core.StandardHostDeployer.remove(StandardHostDeployer.ja va:470) at org.apache.catalina.core.StandardHost.remove(StandardHost.java:852) at org.apache.catalina.startup.HostConfig.undeployApps(HostConfig.java:758) at org.apache.catalina.startup.HostConfig.stop(HostConfig.java:738) at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:360) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSuppor t.java:166) at org.apache.catalina.core.ContainerBase.stop(ContainerBase.java:1221) at
RE: New User Web.xml question
Hi, When you get an error processing your web.xml, the entire context becomes unavailable: all requests to it will result in 4xx or 5xx errors, depending on the request. As for the specific error: http://marc.theaimsgroup.com/?l=tomcat-userw=2r=1s=Exception+processi ng+tldq=b Yoav Shapira Millennium ChemInformatics -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 25, 2004 2:31 PM To: [EMAIL PROTECTED] Subject: RE: New User Web.xml question Tomcat Log for web app, after I add taglibs to web.xml: 2004-02-25 13:41:02 WebappLoader[]: Deploying class repositories to work directory C:\Program Files\Apache Group\Tomcat 4.1\work\Standalone\www.company.com\_ 2004-02-25 13:41:02 WebappLoader[]: Deploy class files /WEB-INF/classes to E:\Inetpub\wwwroot\www.company.com\WEB-INF\classes 2004-02-25 13:41:02 WebappLoader[]: Deploy JAR /WEB-INF/lib/dom.jar to E:\Inetpub\wwwroot\www.company.com\WEB-INF\lib\dom.jar 2004-02-25 13:41:02 WebappLoader[]: Deploy JAR /WEB-INF/lib/jaxen-full.jar to E:\Inetpub\wwwroot\www.company.com\WEB-INF\lib\jaxen-full.jar 2004-02-25 13:41:02 WebappLoader[]: Deploy JAR /WEB-INF/lib/jaxp-api.jar to E:\Inetpub\wwwroot\www.company.com\WEB-INF\lib\jaxp-api.jar 2004-02-25 13:41:02 WebappLoader[]: Deploy JAR /WEB-INF/lib/jdbc2_0-stdext.jar to E:\Inetpub\wwwroot\www.company.com\WEB-INF\lib\jdbc2_0-stdext.jar 2004-02-25 13:41:02 WebappLoader[]: Deploy JAR /WEB-INF/lib/jstl.jar to E:\Inetpub\wwwroot\www.company.com\WEB-INF\lib\jstl.jar 2004-02-25 13:41:02 WebappLoader[]: Deploy JAR /WEB-INF/lib/sax.jar to E:\Inetpub\wwwroot\www.company.com\WEB-INF\lib\sax.jar 2004-02-25 13:41:02 WebappLoader[]: Deploy JAR /WEB-INF/lib/saxpath.jar to E:\Inetpub\wwwroot\www.company.com\WEB-INF\lib\saxpath.jar 2004-02-25 13:41:02 WebappLoader[]: Deploy JAR /WEB-INF/lib/standard.jar to E:\Inetpub\wwwroot\www.company.com\WEB-INF\lib\standard.jar 2004-02-25 13:41:02 WebappLoader[]: Deploy JAR /WEB-INF/lib/xalan.jar to E:\Inetpub\wwwroot\www.company.com\WEB-INF\lib\xalan.jar 2004-02-25 13:41:02 WebappLoader[]: Deploy JAR /WEB-INF/lib/xercesImpl.jar to E:\Inetpub\wwwroot\www.company.com\WEB-INF\lib\xercesImpl.jar 2004-02-25 13:41:02 WebappLoader[]: Reloading checks are enabled for this Context 2004-02-25 13:41:02 ContextConfig[] Exception processing TLD at resource path /WEB-INF/c.tld javax.servlet.ServletException: Exception processing TLD at resource path /WEB-INF/c.tld at org.apache.catalina.startup.ContextConfig.tldScanTld(ContextConfig.java :101 0 ) at org.apache.catalina.startup.ContextConfig.tldScan(ContextConfig.java:87 0) at org.apache.catalina.startup.ContextConfig.start(ContextConfig.java:647) at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig. java : 243) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleS uppo r t.java:166) at org.apache.catalina.core.StandardContext.start(StandardContext.java:356 8) at org.apache.catalina.startup.HostConfig.checkWebXmlLastModified(HostConf ig.j a va:614) at org.apache.catalina.startup.HostConfig.run(HostConfig.java:854) at java.lang.Thread.run(Thread.java:534) - Root Cause - java.lang.IllegalArgumentException: Invalid TLD resource path /WEB- INF/c.tld at org.apache.catalina.startup.ContextConfig.tldScanTld(ContextConfig.java :100 2 ) at org.apache.catalina.startup.ContextConfig.tldScan(ContextConfig.java:87 0) at org.apache.catalina.startup.ContextConfig.start(ContextConfig.java:647) at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig. java : 243) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleS uppo r t.java:166) at org.apache.catalina.core.StandardContext.start(StandardContext.java:356 8) at org.apache.catalina.startup.HostConfig.checkWebXmlLastModified(HostConf ig.j a va:614) at org.apache.catalina.startup.HostConfig.run(HostConfig.java:854) at java.lang.Thread.run(Thread.java:534) 2004-02-25 13:41:02 ContextConfig[]: Marking this application unavailable due to previous error(s) 2004-02-25 13:41:02 StandardManager[]: Seeding random number generator class java.security.SecureRandom 2004-02-25 13:41:02 StandardManager[]: Seeding of random number generator has been completed 2004-02-25 13:41:02 StandardContext[]: Context startup failed due to previous errors 2004-02-25 13:41:39 StandardHost[www.company.com]: Removing web application at context path 2004-02-25 13:41:39 StandardHost[www.company.com]: ContainerBase.removeChild: stop: LifecycleException: Container StandardContext[] has not been started at org.apache.catalina.core.StandardContext.stop(StandardContext.java:3644 ) at org.apache.catalina.core.ContainerBase.removeChild(ContainerBase.java:1 036) at org.apache.catalina.core.StandardHostDeployer.remove(StandardHostDeploy er.j a va:470) at
web.xml and schema document.
I'm pretty new to XML, and I can't seem to find any good resources on using schema in an XML document. Finding resources on writing schema is trivial. But no one seems to want to explain how to *use* them. Can someone give me an example of how to set up my web.xml file to use the 2.4 schema, rather than a DTD? I'd really appreciate this, as it seems from the specs that this would turn on EL globally, which would be valueable to me. Thank you. Carl - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: web.xml and schema document.
Hi, Can someone give me an example of how to set up my web.xml file to use the 2.4 schema, rather than a DTD? I'd really appreciate this, as it seems from the specs that this would turn on EL globally, which would be valueable to me. ?xml version=1.0 encoding=ISO-8859-1? web-app xmlns=http://java.sun.com/xml/ns/j2ee; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd; version=2.4 display-nameA Simple Application/display-name ... /web-app From the Servlet Specification v2.4, SRV.13.5.1. 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]
tomcat ability question
I have been working mainly with PHP and Python but we have some new goals and needs that have moved us towards Java. There is one more developer here who has been doing Access stuff mainly. We are looking to come together and in the next 2-5 years roll out all new applications. Some will be client apps running in Windows, Mac and maybe Linux and others will be web apps. Some apps need both front ends client and web. Here is an example of the types of apps we will be doing. 1. The entire registration process. Online and client. 2. Business office 3. POS 4. e-commerce 5. gradebook system. 6. web cms 7. etc lots more stuff. We want to have our apps share some logic. We would like to have most of the processing to be done on the server end with the web and client apps acting mainly as just a front end. This will enable our apps to share the same classes in many cases. Question: What is the best way to do this on the server end. Jboss? Tomcat? If the answer is Tomcat how does that work with the client apps? Everything I have seen for Tomcat is all web. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: tomcat ability question
Howdy, We want to have our apps share some logic. We would like to have most of the processing to be done on the server end with the web and client apps acting mainly as just a front end. This will enable our apps to share the same classes in many cases. Question: What is the best way to do this on the server end. Jboss? Tomcat? If the answer is Tomcat how does that work with the client apps? Everything I have seen for Tomcat is all web. It's hard to pick one platform for so many applications without knowing any of their details. That said: - It's easy to move from just tomcat to JBoss with embedded tomcat if you find yourself needing the JBoss features like EJBs. I like to keep things as simple as possible, so I'd start with just tomcat. - There seem to be a number of successful applications running Axis (http://ws.apache.org/axis/) or XML-RPC (http://ws.apache.org/xmlrpc/) on tomcat with various clients, including web, traditional application, and Java Web Start clients. This is a flexible approach as your clients can be nearly anything, including your own tomcat servers which are in turn serving your users. 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]
Re: web.xml and schema document.
I can't get my file with that intro to validate, because it lacks a DOCTYPE declaration... I'd like to be able to validate my web.xml file, if at all possible. What should the DOCTYPE be for this? Shapira, Yoav wrote: ?xml version=1.0 encoding=ISO-8859-1? web-app xmlns=http://java.sun.com/xml/ns/j2ee; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd; version=2.4 display-nameA Simple Application/display-name ... /web-app - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: web.xml and schema document.
Howdy, I can't get my file with that intro to validate, because it lacks a DOCTYPE declaration... I'd like to be able to validate my web.xml file, if at all possible. What should the DOCTYPE be for this? Using what tool? It's very rare top declare a DOCTYPE for a Schema document, a DOCTYPE goes with a DTD. 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]
A tangled knot: db, resources, Context, ant deploy, and Tomcat 5. 0.16-19
It starts with this error message: Cannot create JDBC driver of class '' for connect URL 'null', cause: No suitable driver. I have Tomcat 5.0.19 installed on Windows XP Professional--a default install from the binary, changing only one thing, the port from 8080 to 80. I copy my extra jars (JsqlConnect, mail.jar, JSTL jars, and JCIFS) into common/lib. Start it, runs fine, including management and admin apps. I build my template app following the developers guide: ant, cvs, directory structure. Put index.jsp and Hello.java in, 'ant deploy', both work correctly at /template. Need database access. Go to admin app, add global datasources that put the following into conf/server.xml (stuff in [] is hidden stuff): Resource name=jdbc/[server] type=javax.sql.DataSource/ ResourceParams name=jdbc/[server] parameter namemaxWait/name value5000/value /parameter parameter namemaxActive/name value4/value /parameter parameter namepassword/name value[password]/value /parameter parameter nameurl/name valuejdbc:JSQLConnect://[server].[domain].com//value /parameter parameter namedriverClassName/name valuecom.jnetdirect.jsql.JSQLDriver/value /parameter parameter namemaxIdle/name value2/value /parameter parameter nameusername/name value[username]/value /parameter /ResourceParams In my web.xml I have, first thing under web-app: resource-ref res-ref-namejdbc/[server]/res-ref-name res-typejavax.sql.DataSource/res-type res-authContainer/res-auth /resource-ref I add the following to index.jsp: % Context ctx = new InitialContext( ) ; DataSource ds = (DataSource) ctx.lookup( java:comp/env/jdbc/[server] ) ; Connection con = ds.getConnection( ) ; Statement st = con.createStatement( ) ; ResultSet rs = st.executeQuery( SELECT 1 + 1 [Sum] ) ; if( rs.next( ) ) out.println( rs.getString( Sum ) + br / ) ; rs.close( ) ; st.close( ) ; con.close( ) ; % And get the error mentioned above: Cannot create JDBC driver of class '' for connect URL 'null', cause: No suitable driver. I change index.jsp to: % Class.forName( com.jnetdirect.jsql.JSQLDriver ).newInstance(); Connection con = DriverManager.getConnection( jdbc:JSQLConnect://[server].[domain].com/, [username], [password] ) ; Statement st = con.createStatement( ) ; ResultSet rs = st.executeQuery( SELECT 1 + 1 [Sum] ) ; if( rs.next( ) ) out.println( rs.getString( Sum ) + br / ) ; rs.close( ) ; st.close( ) ; con.close( ) ; % And it works fine, including retrieving a recordset by query. So I find template.xml in conf/Catalina/localhost and paste the Resource and ResourceParams tags into it inside the Context tag, and go back to the first version of my database access code in index.jsp, 'ant reload'. Works fine. I'd like to use ResourceLink instead, but it's working. The problem is that when I undeploy and redeploy /template, /conf/Catalina/localhost/template.xml is overwritten with a fresh copy that contains an empty Context tag except for path and docBase attributes (the ant deploy task specifies a localwar, which simply adds the path to my working copy/build to docBase). Reading the configuration guidelines for contexts at http://jakarta.apache.org/tomcat/tomcat-5.0-doc/config/context.html, I think I should put the context xml fragment into a file context.xml in META-INF. But when I do so, I still get the empty, auto-generated Context in template.xml in conf/Catalina/localhost. When I change the deploy task in build.xml to copy a war to [tomcat]/webapps, I get no template.xml file, and no database access, as if my context.xml file is not being picked up. All this time, normal jsp stuff like c:out value=${ 'webapp working' } / continues to function correctly, and I'm having no problems deploying, undeploying, or reloading. So, the problem as it seems to me is one or both of the following: 1) I don't know where to put my Context fragment for it be picked up by ant deploy/Tomcat, which seems to be ignoring it and using a default generated Context; 2) I'm missing something in web.xml or my deploy configuration in build.xml that will prefer my Context fragment. Ideally, the datasources should be available server wide. Where then would I put the ResourceLink tags so that all applications can get at them? Anyone who can help me out here will be greatly appreciated. Justin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: International character problem in submitting a jsp form
On Wed, Feb 25, 2004 at 07:32:04PM +0200, Metin Zavrak wrote: The output is as follows: utf-8 en_US null tr Ä?üÅ?ıöçÄ?Ã?Å?Ä°Ã?Ã? What operating System are you using? I believe that Windows doesn't have a UTF-8 aware system terminal. Try using linux instead for a UTF terminal. Else write it to a file. I use Tomcat with JIRA[1] and have no problems with i18n. Cheers, Scott [1] - http://jira.atlassian.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: attributes of the element web-app?
Hi no error at all. I believe it is in the correct order: web-app display-nameWelcome to My JSP-Files/display-name iconcl6D11.gif/icon description Welcome to My JSPs /description /web-app The dtd is: !ELEMENT web-app (icon?, display-name?, description?, distributable?, context-param*, ... I was thinking the same thing the order that's why I changed it from my original post to the one above. I'm going to have to investigate the ATTLIST I may need a attributes on the child element icon. I can tell you getting images to appear in XML is tricky business. I have done it but using a XSL. I do have an XML that does it natively so I'll look more into that. Right now I don't think the dtd is constructed correctly for the image. At least it dosen't have the type of elements contructed in a dtd to do it as far as I can tell. -- George Hester __ David Smith [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] I'm surprised you didn't get some kind of error in the logs. DTDs also require a specific order to the elements. You appear to have put your icon element at the end when the DTD snippet you quoted clearly requires it at the beginning. Try it at the beginning and see what you get. --David George Hester wrote: OK I'm trying that now. I wasn't sure where the image should have gone. And oh yeah please pardon my XML bastardization. I should of said, child elements of the element web-app not attribute. Crap didn't work. Oh well. ?xml version=1.0 encoding=ISO-8859-1? !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN http://java.sun.com/dtd/web-app_2_3.dtd; web-app display-nameWelcome to My JSP-Files/display-name iconcl6D11.gif/icon description Welcome to My JSPs /description /web-app with C:\Inetpub\JSP_Files\cl6D11.gif JSP_Files is my web-app. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: attributes of the element web-app?
-Original Message- From: news [mailto:[EMAIL PROTECTED] On Behalf Of George Hester Sent: Wednesday, February 25, 2004 4:07 PM To: [EMAIL PROTECTED] Subject: Re: attributes of the element web-app? Hi no error at all. I believe it is in the correct order: web-app display-nameWelcome to My JSP-Files/display-name iconcl6D11.gif/icon description Welcome to My JSPs /description /web-app The dtd is: !ELEMENT web-app (icon?, display-name?, description?, distributable?, context-param*, ... Right, so you have an error in the order. A webapp is optionally an icon element, optionally a display-name, optionally a description..,etc, etc. You have Description, then icon. web-app iconcl6D11.gif/icon display-nameWelcome to My JSP-Files/display-name description Welcome to My JSPs /description /web-app I was thinking the same thing the order that's why I changed it from my original post to the one above. I'm going to have to investigate the ATTLIST I may need a attributes on the child element icon. I can tell you getting images to appear in XML is tricky business. I have done it but using a XSL. I do have an XML that does it natively so I'll look more into that. Right now I don't think the dtd is constructed correctly for the image. At least it dosen't have the type of elements contructed in a dtd to do it as far as I can tell. This sounds like you're 'embedding' an image in XML? (I'm not sure what you mean by to appear in XML). Tomcat only uses the filename, and tries to find that icon file, as Tim pointed out, The file name is a relative path within the web application's war file. So the file named in the 'icon' element is used, if found, by the deployer(or not) it wouldn't look inside the XML itself for the icon. (would it??) Have I totally misunderstood this last bit ? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: encodeURL / jsessionid
Hi, app1 and app2 are two applications under a single instance of TC, with different contexts (defined in the server.xml). http://localhost:8080/app1 http://localhost:8080/app2 I wish to persist data when linking across the two. I was under the impression that by using encodeURL or getRequestedSessionId(), and acquiring the session ID, I could accomplish this? Please instruct me otherwise. regards G. when you say 'app1' and 'app2', what do you mean? Sessions are not shared between two different web-apps. -Original Message- From: Jerald Powel [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 25, 2004 3:46 AM To: Tomcat Users List Subject: Re: encodeURL / jsessionid That was my first move, but it was null G. Antonio_Fiol_Bonnín wrote: Jerald Powel wrote: Hi, I wish to maintain state across contexts and have in app1: app2 when app2 is loaded the jsessionid is visible in the address bar: http://localhost:8086/app2/index.jsp;jsessionid=7DD63005E4142 E8C75A2E75 CBAC0534 Now what do I do with it? How do I access data set on the session on the previous context? Thanks a lot G. - Yahoo! Messenger - Communicate instantly...Ping your friends today! Download Messenger Now
Re: attributes of the element web-app?
Yeah man I don't keep my direction intact often. Yes it is not in the XML I want to show the icon but in the manager. Silly me. And by golly I still had the order incorrect. OK I changed the order correct this time: ?xml version=1.0 encoding=ISO-8859-1? !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN http://java.sun.com/dtd/web-app_2_3.dtd; web-app iconcl6D11.gif/icon display-nameWelcome to My JSP-Files/display-name description Welcome to My JSPs /description /web-app jeeze!!! OK let's see if it works now... -- George Hester __ Mike Curwen [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] -Original Message- From: news [mailto:[EMAIL PROTECTED] On Behalf Of George Hester Sent: Wednesday, February 25, 2004 4:07 PM To: [EMAIL PROTECTED] Subject: Re: attributes of the element web-app? Hi no error at all. I believe it is in the correct order: web-app display-nameWelcome to My JSP-Files/display-name iconcl6D11.gif/icon description Welcome to My JSPs /description /web-app The dtd is: !ELEMENT web-app (icon?, display-name?, description?, distributable?, context-param*, ... Right, so you have an error in the order. A webapp is optionally an icon element, optionally a display-name, optionally a description..,etc, etc. You have Description, then icon. web-app iconcl6D11.gif/icon display-nameWelcome to My JSP-Files/display-name description Welcome to My JSPs /description /web-app I was thinking the same thing the order that's why I changed it from my original post to the one above. I'm going to have to investigate the ATTLIST I may need a attributes on the child element icon. I can tell you getting images to appear in XML is tricky business. I have done it but using a XSL. I do have an XML that does it natively so I'll look more into that. Right now I don't think the dtd is constructed correctly for the image. At least it dosen't have the type of elements contructed in a dtd to do it as far as I can tell. This sounds like you're 'embedding' an image in XML? (I'm not sure what you mean by to appear in XML). Tomcat only uses the filename, and tries to find that icon file, as Tim pointed out, The file name is a relative path within the web application's war file. So the file named in the 'icon' element is used, if found, by the deployer(or not) it wouldn't look inside the XML itself for the icon. (would it??) Have I totally misunderstood this last bit ? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Servlet-Mapping Question, recursive capable?
I hope they hurry up and do it... it's not that big of a change and it would make life much easier.. for that matter it really annoys me how when your extension mapping, say *.do for struts, the servlet strips what you extension mapped off when it sends it to the servlet. IE if you matched /actions/blah.do with a *.do mapping, struts only gets /actions/blah to match by.. -David - Original Message - From: Daniel Gibby [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Wednesday, February 25, 2004 6:54 AM Subject: Re: Servlet-Mapping Question, recursive capable? I'm just predicting the future, and I think eventually the ** convention will be adopted in many systems and specs. I'm kinda going off topic, so sorry. dangby Tim Funk wrote: The mapping rules are dictated by the servlet spec. Its not tomcat specific. -Tim Daniel Gibby wrote: Too bad though. I really like ant's recursive matching capabilities. I think that eventually a 'rebash' shell will be written that supports ** as recursive so that grep catalina **/docs/*.java would look for only java files in a subdirectory somewhere named docs with the text catalina in it. How nice would that be! Then apache and tomcat will decide on supporting this as well... Daniel Gibby Tim Funk wrote: No. You can prefix match or file extension match, but not both at the same time. -Tim David Erickson wrote: Hi I would like to do something like: servlet-mapping servlet-nameaction/servlet-name url-pattern/docs/**.pdf/url-pattern /servlet-mapping So that anything in the /docs/ folder AND ANY of its subfolders with the .pdf extension gets sent to my action servlet. Is that possible with tomcat 4.1.24? If not does anybody know the class that matches those things so I can alter it? Thanks! -David - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat 4.1.29 CoyoteAdapter Exception
I had an issue with tomcat 4.1.x (don't remember which - but it was Feb. last year) and sun java 1.4 Tomcat would just hang at random times and require a restart. I downgraded to java 1.3 to solve it. Try another Java - perhaps from IBM. Or check bugzilla. Adam On 02/25/2004 07:39 PM Randall Svancara wrote: After further investigation, I am just going to chalk this one up as a stability issue with windows XP. The same version of tomcat running with same configuration on linux can sustain well over 1+++ hits using jmeter while the same configuration on windows barely handles 2000 hits before tomcat fails. Anyone know of a stable version of tomcat that works with windows. Do I need to downgrade to 4.0.x or upgrade to 5.0.x versions of tomcat for better stability on windowsor do I need to convince my boss what I have know all along, linux is superior to windows. Thanks. Randall -Original Message- From: Randall Svancara [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 25, 2004 8:05 AM To: Tomcat Users List Subject: RE: Tomcat 4.1.29 CoyoteAdapter Exception Ok, now I am thinking this error might be caused by Database Connection pooling. I increased Mysql's max connection limit from the default to 500. I hope this enough to satify my hungry application. Also I adjusted the apps xml configuration option maxActive to a value of 400 which is 100 less than the max. We will see if this works. -Original Message- From: Randall Svancara [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 25, 2004 7:47 AM To: Tomcat Users List Subject: RE: Tomcat 4.1.29 CoyoteAdapter Exception Thanks, I have had a difficult time reproducing this error on a predictable basis. All I can say is that it happens once per day, and I have temporarily wrote a perl script that checks the service to see if it is working properly, and if not, it shuts down tomcat and restarts it...A bandaid fix at best. I will give you a little more background on the webapp I have deployed. It is just a basic webapp with several jsp pages and a couple of servlets. I am using Database Connection Pooling with Mysql Connector J. The problem does not appear to happen on any one particular jsp or servlet, but I will keep digging further to see if it is or not. If I can create a reproducable test case, I will post it here. I will keep on researching the problem to see if I can pin point the exact error. Thanks for the advice on using news groups. It is my first experience with them. Thanks, Randall -Original Message- From: Adam Hardy [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 25, 2004 2:47 AM To: Tomcat Users List Subject: Re: Tomcat 4.1.29 CoyoteAdapter Exception Randall, I've often had issues that cause major problems, and my experience is that user groups and mailing lists are normally unable to help without there being an easily reproducible error. For instance, are you able to nail it down to a particular page or servlet? Does it happen regularly or at random? Can you make a test case? Sorry I can't be any help, but good luck finding it. Adam On 02/25/2004 12:03 AM Randall Svancara wrote: What would cause the coyote connector to return a null pointer exception. Every time this happens, mod_jk is unable to communicate with tomcat and as a result our web service is unusable. Is this a tomcat bug, or a problem with running tomcat on Windows XP. Anyway, I have looked through this user group and found some other people with this problem on Solaris, but no real answers. Thanks. I am running tomcat 4.1.29, apache 2.0.48, with mod_jk configured on Windows XP. Occasionally, I will receive the following error: 2004-02-23 15:40:07 CoyoteAdapter Requested cookie session id is A02AD09BF242D0D916799B2EBB0FCC92.worker1 2004-02-23 15:40:07 CoyoteAdapter An exception or error occurred in the container during the request processing java.lang.NullPointerException at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:164) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:193) at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:309) at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:387) at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:673) at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:615) at org.apache.jk.common.SocketConnection.runIt(ChannelSocket.java:786) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:666) at java.lang.Thread.run(Thread.java:534) -Original Message- From: Randall Svancara Sent: Tuesday, February 24, 2004 11:34 AM To: Tomcat Users List
Re: attributes of the element web-app?
No still didn't work. Oh well I have the icon in the root of the webapp maybe what I'm expecting is not what this really does. I just assumed the icon would display in the manager as display-name and description do. One other thing I have no war in this application. At least none that I know of. I made this virtual root by myself under IIS Inet pub. I sort of just popped the web.xml in a WEB-INF folder I made and set up all this to work on port 80. The manager is still 8080 but the web app can be accessed over port 80. -- George Hester __ Mike Curwen [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] -Original Message- From: news [mailto:[EMAIL PROTECTED] On Behalf Of George Hester Sent: Wednesday, February 25, 2004 4:07 PM To: [EMAIL PROTECTED] Subject: Re: attributes of the element web-app? Hi no error at all. I believe it is in the correct order: web-app display-nameWelcome to My JSP-Files/display-name iconcl6D11.gif/icon description Welcome to My JSPs /description /web-app The dtd is: !ELEMENT web-app (icon?, display-name?, description?, distributable?, context-param*, ... Right, so you have an error in the order. A webapp is optionally an icon element, optionally a display-name, optionally a description..,etc, etc. You have Description, then icon. web-app iconcl6D11.gif/icon display-nameWelcome to My JSP-Files/display-name description Welcome to My JSPs /description /web-app I was thinking the same thing the order that's why I changed it from my original post to the one above. I'm going to have to investigate the ATTLIST I may need a attributes on the child element icon. I can tell you getting images to appear in XML is tricky business. I have done it but using a XSL. I do have an XML that does it natively so I'll look more into that. Right now I don't think the dtd is constructed correctly for the image. At least it dosen't have the type of elements contructed in a dtd to do it as far as I can tell. This sounds like you're 'embedding' an image in XML? (I'm not sure what you mean by to appear in XML). Tomcat only uses the filename, and tries to find that icon file, as Tim pointed out, The file name is a relative path within the web application's war file. So the file named in the 'icon' element is used, if found, by the deployer(or not) it wouldn't look inside the XML itself for the icon. (would it??) Have I totally misunderstood this last bit ? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat 4.1.29 CoyoteAdapter Exception
Adam, thanks for the response, I will try your suggestions. Thanks again, Randall -Original Message- From: Adam Hardy [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 25, 2004 3:50 PM To: Tomcat Users List Subject: Re: Tomcat 4.1.29 CoyoteAdapter Exception I had an issue with tomcat 4.1.x (don't remember which - but it was Feb. last year) and sun java 1.4 Tomcat would just hang at random times and require a restart. I downgraded to java 1.3 to solve it. Try another Java - perhaps from IBM. Or check bugzilla. Adam On 02/25/2004 07:39 PM Randall Svancara wrote: After further investigation, I am just going to chalk this one up as a stability issue with windows XP. The same version of tomcat running with same configuration on linux can sustain well over 1+++ hits using jmeter while the same configuration on windows barely handles 2000 hits before tomcat fails. Anyone know of a stable version of tomcat that works with windows. Do I need to downgrade to 4.0.x or upgrade to 5.0.x versions of tomcat for better stability on windowsor do I need to convince my boss what I have know all along, linux is superior to windows. Thanks. Randall -Original Message- From: Randall Svancara [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 25, 2004 8:05 AM To: Tomcat Users List Subject: RE: Tomcat 4.1.29 CoyoteAdapter Exception Ok, now I am thinking this error might be caused by Database Connection pooling. I increased Mysql's max connection limit from the default to 500. I hope this enough to satify my hungry application. Also I adjusted the apps xml configuration option maxActive to a value of 400 which is 100 less than the max. We will see if this works. -Original Message- From: Randall Svancara [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 25, 2004 7:47 AM To: Tomcat Users List Subject: RE: Tomcat 4.1.29 CoyoteAdapter Exception Thanks, I have had a difficult time reproducing this error on a predictable basis. All I can say is that it happens once per day, and I have temporarily wrote a perl script that checks the service to see if it is working properly, and if not, it shuts down tomcat and restarts it...A bandaid fix at best. I will give you a little more background on the webapp I have deployed. It is just a basic webapp with several jsp pages and a couple of servlets. I am using Database Connection Pooling with Mysql Connector J. The problem does not appear to happen on any one particular jsp or servlet, but I will keep digging further to see if it is or not. If I can create a reproducable test case, I will post it here. I will keep on researching the problem to see if I can pin point the exact error. Thanks for the advice on using news groups. It is my first experience with them. Thanks, Randall -Original Message- From: Adam Hardy [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 25, 2004 2:47 AM To: Tomcat Users List Subject: Re: Tomcat 4.1.29 CoyoteAdapter Exception Randall, I've often had issues that cause major problems, and my experience is that user groups and mailing lists are normally unable to help without there being an easily reproducible error. For instance, are you able to nail it down to a particular page or servlet? Does it happen regularly or at random? Can you make a test case? Sorry I can't be any help, but good luck finding it. Adam On 02/25/2004 12:03 AM Randall Svancara wrote: What would cause the coyote connector to return a null pointer exception. Every time this happens, mod_jk is unable to communicate with tomcat and as a result our web service is unusable. Is this a tomcat bug, or a problem with running tomcat on Windows XP. Anyway, I have looked through this user group and found some other people with this problem on Solaris, but no real answers. Thanks. I am running tomcat 4.1.29, apache 2.0.48, with mod_jk configured on Windows XP. Occasionally, I will receive the following error: 2004-02-23 15:40:07 CoyoteAdapter Requested cookie session id is A02AD09BF242D0D916799B2EBB0FCC92.worker1 2004-02-23 15:40:07 CoyoteAdapter An exception or error occurred in the container during the request processing java.lang.NullPointerException at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:164) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:193) at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:309) at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:387) at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:673) at
RE: attributes of the element web-app?
It might also be that Tomcat does not implement this part of the spec, as it is (after all) optional. -Original Message- From: news [mailto:[EMAIL PROTECTED] On Behalf Of George Hester Sent: Wednesday, February 25, 2004 4:54 PM To: [EMAIL PROTECTED] Subject: Re: attributes of the element web-app? No still didn't work. Oh well I have the icon in the root of the webapp maybe what I'm expecting is not what this really does. I just assumed the icon would display in the manager as display-name and description do. One other thing I have no war in this application. At least none that I know of. I made this virtual root by myself under IIS Inet pub. I sort of just popped the web.xml in a WEB-INF folder I made and set up all this to work on port 80. The manager is still 8080 but the web app can be accessed over port 80. -- George Hester - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat error-page not working (was: RE: Tomcat and checked vs. unchecked exceptions)
From: Jerry Ford [mailto:[EMAIL PROTECTED] Wendy: Here's your problem: location/WEB-INF/jsp/exceptions/ServletException.jsp/location JSPs can't be run from inside the WEB-INF directory. Try moving your jsp/exceptions directory up one level. All of my JSP's are under WEB-INF, and they work fine. (I don't allow direct access to JSP's, everything goes through Struts/Tiles.) In fact that same location tag works fine in another webapp (which makes me think that there's some config problem in this one.) Yoav, this is Tomcat-only, on my development box, so no Apache error pages. I'm going to make a test webapp and a Servlet that throws various exceptions, to see if I can narrow this down. Obviously it's something I'm doing wrong, nobody else is having this problem. -- Wendy Smoak Application Systems Analyst, Sr. ASU IA Information Resources Management - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: encodeURL / jsessionid
No, sessions are not 'server' wide, they are scoped only to a single user, of a single application. I was looking up in 'cross context' and 'single-sign-on' in the tomcat docs (config docs for Context and Host, respectively), but they don't appear to mention sharing a session. Only the ability to dispatch between apps, or to be challenged only once for Auth. Anyone else have ideas ? ( I think Session sharing is, strictly speaking, against spec). -Original Message- From: Jerald Powel [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 25, 2004 4:43 PM To: Tomcat Users List Subject: RE: encodeURL / jsessionid Hi, app1 and app2 are two applications under a single instance of TC, with different contexts (defined in the server.xml). http://localhost:8080/app1 http://localhost:8080/app2 I wish to persist data when linking across the two. I was under the impression that by using encodeURL or getRequestedSessionId(), and acquiring the session ID, I could accomplish this? Please instruct me otherwise. regards G. when you say 'app1' and 'app2', what do you mean? Sessions are not shared between two different web-apps. -Original Message- From: Jerald Powel [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 25, 2004 3:46 AM To: Tomcat Users List Subject: Re: encodeURL / jsessionid That was my first move, but it was null G. Antonio_Fiol_Bonnín wrote: Jerald Powel wrote: Hi, I wish to maintain state across contexts and have in app1: app2 when app2 is loaded the jsessionid is visible in the address bar: http://localhost:8086/app2/index.jsp;jsessionid=7DD63005E4142 E8C75A2E75 CBAC0534 Now what do I do with it? How do I access data set on the session on the previous context? Thanks a lot G. - Yahoo! Messenger - Communicate instantly...Ping your friends today! Download Messenger Now - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: A tangled knot: db, resources, Context, ant deploy, and Tomca t 5. 0.16-19 (further info)
I've got database access working in two more ways, though the original problem remains. 1) Adding a ResourceLink to /template via the admin app. 2) Adding a DefaultContext tag to conf/server.xml, with the ResourceLinks inside. (I tried 3) adding the ResourceLink to the / context, but it wasn't visible in /template). The problem with 1 is that the change is written to conf/Catalina/localhost/template.xml, and doesn't survive 'ant remove'/'ant deploy'. I could leave it 'just so', but that adds a manual step to deployment on different servers that defeats the purpose of ant automation. The problem with 2 is that the DefaultContext shows up in the admin app under Service (Catalina), but clicking on it returns an error page. The db access continues to work, but server.xml can no longer be maintained through the admin app. So, the solution to this problem looks like one of two things: either knowing where to put the Context fragment in my project so that it survives deployment; or correctly adding a DefaultContext to Engine or Host in server.xml that doesn't break the admin app. An interesting point about the second option: There's no way to add DefaultContext to server.xml through the admin app that I can find--the actions available under Server (Catalina) don't include it. -Original Message- From: Justin Johnson [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 25, 2004 3:18 PM To: 'Tomcat Users List' Subject: A tangled knot: db, resources, Context, ant deploy, and Tomcat 5. 0.16-19 It starts with this error message: Cannot create JDBC driver of class '' for connect URL 'null', cause: No suitable driver. I have Tomcat 5.0.19 installed on Windows XP Professional--a default install from the binary, changing only one thing, the port from 8080 to 80. I copy my extra jars (JsqlConnect, mail.jar, JSTL jars, and JCIFS) into common/lib. Start it, runs fine, including management and admin apps. I build my template app following the developers guide: ant, cvs, directory structure. Put index.jsp and Hello.java in, 'ant deploy', both work correctly at /template. Need database access. Go to admin app, add global datasources that put the following into conf/server.xml (stuff in [] is hidden stuff): Resource name=jdbc/[server] type=javax.sql.DataSource/ ResourceParams name=jdbc/[server] parameter namemaxWait/name value5000/value /parameter parameter namemaxActive/name value4/value /parameter parameter namepassword/name value[password]/value /parameter parameter nameurl/name valuejdbc:JSQLConnect://[server].[domain].com//value /parameter parameter namedriverClassName/name valuecom.jnetdirect.jsql.JSQLDriver/value /parameter parameter namemaxIdle/name value2/value /parameter parameter nameusername/name value[username]/value /parameter /ResourceParams In my web.xml I have, first thing under web-app: resource-ref res-ref-namejdbc/[server]/res-ref-name res-typejavax.sql.DataSource/res-type res-authContainer/res-auth /resource-ref I add the following to index.jsp: % Context ctx = new InitialContext( ) ; DataSource ds = (DataSource) ctx.lookup( java:comp/env/jdbc/[server] ) ; Connection con = ds.getConnection( ) ; Statement st = con.createStatement( ) ; ResultSet rs = st.executeQuery( SELECT 1 + 1 [Sum] ) ; if( rs.next( ) ) out.println( rs.getString( Sum ) + br / ) ; rs.close( ) ; st.close( ) ; con.close( ) ; % And get the error mentioned above: Cannot create JDBC driver of class '' for connect URL 'null', cause: No suitable driver. I change index.jsp to: % Class.forName( com.jnetdirect.jsql.JSQLDriver ).newInstance(); Connection con = DriverManager.getConnection( jdbc:JSQLConnect://[server].[domain].com/, [username], [password] ) ; Statement st = con.createStatement( ) ; ResultSet rs = st.executeQuery( SELECT 1 + 1 [Sum] ) ; if( rs.next( ) ) out.println( rs.getString( Sum ) + br / ) ; rs.close( ) ; st.close( ) ; con.close( ) ; % And it works fine, including retrieving a recordset by query. So I find template.xml in conf/Catalina/localhost and paste the Resource and ResourceParams tags into it inside the Context tag, and go back to the first version of my database access code in index.jsp, 'ant reload'. Works fine. I'd like to use ResourceLink instead, but it's working. The problem is that when I undeploy and redeploy /template, /conf/Catalina/localhost/template.xml is overwritten with a fresh copy that contains an empty Context tag except for path and docBase
Re: attributes of the element web-app?
Yeah I kind of think so too. I believe for this to work a XSL stylesheet is necessary for the generated Manager html. You know: !ELEMENT web-app (icon?, display-name?, description?, distributable?, context-param*, filter*, filter-mapping*, listener*, servlet*, servlet-mapping*, session-config?, mime-mapping*, welcome-file-list?, error-page*, taglib*, resource-env-ref*, resource-ref*, security-constraint*, login-config?, security-role*, env-entry*, ejb-ref*, ejb-local-ref*) everything here is optional. Moving off this dtd issue. Do you know if Tomacat ever intends going the schema route away from the dtd route? Thanks. Any links you could suggest on Tomcat's use of the dtd in its XML usage? -- George Hester __ Mike Curwen [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] It might also be that Tomcat does not implement this part of the spec, as it is (after all) optional. -Original Message- From: news [mailto:[EMAIL PROTECTED] On Behalf Of George Hester Sent: Wednesday, February 25, 2004 4:54 PM To: [EMAIL PROTECTED] Subject: Re: attributes of the element web-app? No still didn't work. Oh well I have the icon in the root of the webapp maybe what I'm expecting is not what this really does. I just assumed the icon would display in the manager as display-name and description do. One other thing I have no war in this application. At least none that I know of. I made this virtual root by myself under IIS Inet pub. I sort of just popped the web.xml in a WEB-INF folder I made and set up all this to work on port 80. The manager is still 8080 but the web app can be accessed over port 80. -- George Hester - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: attributes of the element web-app?
At 07:15 PM 2/25/2004 -0500, you wrote: Yeah I kind of think so too. I believe for this to work a XSL stylesheet is necessary for the generated Manager html. You know: !ELEMENT web-app (icon?, display-name?, description?, distributable?, context-param*, filter*, filter-mapping*, listener*, servlet*, servlet-mapping*, session-config?, mime-mapping*, welcome-file-list?, error-page*, taglib*, resource-env-ref*, resource-ref*, security-constraint*, login-config?, security-role*, env-entry*, ejb-ref*, ejb-local-ref*) everything here is optional. Moving off this dtd issue. Do you know if Tomacat ever intends going the schema route away from the dtd route? Thanks. Any links you could suggest on Tomcat's use of the dtd in its XML usage? Huh? This isn't up to Tomcat. Tomcat follows the spec for web.xml. Other configuration files are proprietary. Each spec up to and including the 2.3 spec used a dtd. 2.4 uses XML Schema. Jake -- George Hester __ Mike Curwen [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] It might also be that Tomcat does not implement this part of the spec, as it is (after all) optional. -Original Message- From: news [mailto:[EMAIL PROTECTED] On Behalf Of George Hester Sent: Wednesday, February 25, 2004 4:54 PM To: [EMAIL PROTECTED] Subject: Re: attributes of the element web-app? No still didn't work. Oh well I have the icon in the root of the webapp maybe what I'm expecting is not what this really does. I just assumed the icon would display in the manager as display-name and description do. One other thing I have no war in this application. At least none that I know of. I made this virtual root by myself under IIS Inet pub. I sort of just popped the web.xml in a WEB-INF folder I made and set up all this to work on port 80. The manager is still 8080 but the web app can be accessed over port 80. -- George Hester - 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]
JK2 config problem
Hello all, Here's my problem: I would like to have two Tomcat processes running on the one machine, each with a my web-app available via the default context (/). Furthermore, I would like each site to be available via IIS. I have tried for days to get this up and running but with no luck. I could not find any substantial documentation on workers2.properties configuration anywhere. Therefore I have been cross-referencing with JK1 configuration and with the JK2 source code. Following is my set up. Tomcat 1 Directory: D:\tomcat41\ Name: Development The jk2.properties for this tomcat contains: channelSocket.port=8009 The workers2.properties for this tomcat (which is shared for all Tomcats) is attached. As you can see, I have tried to resolve requests from the different IP addresses to the different Tomcats. The server.xml file for this tomcat contains this connector definition: Connector className=org.apache.coyote.tomcat4.CoyoteConnector acceptCount=10 bufferSize=2048 compression=off connectionLinger=-1 connectionTimeout=2 connectionUploadTimeout=30 debug=0 disableUploadTimeout=false enableLookups=true maxKeepAliveRequests=100 maxProcessors=75 minProcessors=5 port=8009 protocolHandlerClassName=org.apache.jk.server.JkCoyoteHandler proxyPort=0 redirectPort=8443 scheme=http secure=false serverSocketTimeout=0 tcpNoDelay=true tomcatAuthentication=true useURIValidationHack=false Factory className=org.apache.catalina.net.DefaultServerSocketFactory/ /Connector Tomcat 2 Directory: D:\tc_system_test\ Name: System test The jk2.properties for this tomcat contains: channelSocket.port=8010 The server.xml file for this tomcat contains exactly the same connector definition as Tomcat 1 except the port is 8010 instead of 8009. IIS Site 1 (Development) IP: 203.8.163.166 jakarta virtual dir points to: D:\tomcat41\bin\native\ IIS Site 2 (System Test) IP: 203.8.163.164 jakarta virtual dir points to: D:\tc_esm_system_test\bin\native\ Symptons When I navigate to the development site via http://203.8.163.166/ it works and I get my default page. When I navigate to the system test site via http://203.8.163.164/ I get a zero size reply error. If I go directly to Tomcat everything works OK. Looking at the ISAPI logs I can see that the development site logs this: HttpFilterProc started Virtual Host redirection of 203.8.163.166 : 80 [/index.jsp] is a servlet url - should redirect to ajp13:203.8.163.166:8009 check if [/index.jsp] is pointing to the web-inf directory HttpExtensionProc started HttpExtensionProc got a worker for name ajp13:203.8.163.166:8009 channelSocket.receive(): Error receiving message body -1 53 workerEnv.processCallbacks() Error reading reply ajp13.service() ajpGetReply recoverable error 12 handler.response() Header[0] [Content-Type] = [text/html;charset=ISO-8859-1] handler.response() Header[1] [Content-Length] = [61] handler.response(): status=200 headers=2 Into jk_ws_service_t::head Into jk_ws_service_t::write HttpExtensionProc service() returned OK System test, on the other hand, contains this in the log: HttpFilterProc started In HttpFilterProc Virtual Host redirection of 203.8.163.164 : 80 HttpFilterProc [/index.jsp] is a servlet url - should redirect to ajp13:203.8.163.164:8010 HttpFilterProc check if [/index.jsp] is pointing to the web-inf directory It repeats these four lines 9 or 10 times and never reaches the HttpExtensionProc. Looking at the code I can see that the threadPool registry entry affects how the HttpExtensionProc is executed. I tried changing it from the existing value of 5 (which does not use a pool) to 10 (which should use the pool). It had no effect. Can anyone shed some light on this? I hope I have been clear in my explanation of the problem. If not, I would be happy to clarify. Thanks heaps for any help. Kent - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
JK2 config problem [RESOLVED]
Typical - as soon as I post I figure it out. All I had to do was alter the second IIS site so that the 'jakarta' virtual directory points to the same location as the first site (D:\tomcat41\bin\native\). With that modification, the existing workers2.properties file correctly forwards requests based on the host IP. In fact, the workers2.properties file can be simplified even further to be more readable. A simplified version is attached. Hope this info is useful to others . . . Regards, Kent Hello all, Here's my problem: I would like to have two Tomcat processes running on the one machine, each with a my web-app available via the default context (/). Furthermore, I would like each site to be available via IIS. I have tried for days to get this up and running but with no luck. I could not find any substantial documentation on workers2.properties configuration anywhere. Therefore I have been cross-referencing with JK1 configuration and with the JK2 source code. Following is my set up. Tomcat 1 Directory: D:\tomcat41\ Name: Development The jk2.properties for this tomcat contains: channelSocket.port=8009 The workers2.properties for this tomcat (which is shared for all Tomcats) is attached. As you can see, I have tried to resolve requests from the different IP addresses to the different Tomcats. The server.xml file for this tomcat contains this connector definition: Connector className=org.apache.coyote.tomcat4.CoyoteConnector acceptCount=10 bufferSize=2048 compression=off connectionLinger=-1 connectionTimeout=2 connectionUploadTimeout=30 debug=0 disableUploadTimeout=false enableLookups=true maxKeepAliveRequests=100 maxProcessors=75 minProcessors=5 port=8009 protocolHandlerClassName=org.apache.jk.server.JkCoyoteHandler proxyPort=0 redirectPort=8443 scheme=http secure=false serverSocketTimeout=0 tcpNoDelay=true tomcatAuthentication=true useURIValidationHack=false Factory className=org.apache.catalina.net.DefaultServerSocketFactory/ /Connector Tomcat 2 Directory: D:\tc_system_test\ Name: System test The jk2.properties for this tomcat contains: channelSocket.port=8010 The server.xml file for this tomcat contains exactly the same connector definition as Tomcat 1 except the port is 8010 instead of 8009. IIS Site 1 (Development) IP: 203.8.163.166 jakarta virtual dir points to: D:\tomcat41\bin\native\ IIS Site 2 (System Test) IP: 203.8.163.164 jakarta virtual dir points to: D:\tc_esm_system_test\bin\native\ Symptons When I navigate to the development site via http://203.8.163.166/ it works and I get my default page. When I navigate to the system test site via http://203.8.163.164/ I get a zero size reply error. If I go directly to Tomcat everything works OK. Looking at the ISAPI logs I can see that the development site logs this: HttpFilterProc started Virtual Host redirection of 203.8.163.166 : 80 [/index.jsp] is a servlet url - should redirect to ajp13:203.8.163.166:8009 check if [/index.jsp] is pointing to the web-inf directory HttpExtensionProc started HttpExtensionProc got a worker for name ajp13:203.8.163.166:8009 channelSocket.receive(): Error receiving message body -1 53 workerEnv.processCallbacks() Error reading reply ajp13.service() ajpGetReply recoverable error 12 handler.response() Header[0] [Content-Type] = [text/html;charset=ISO-8859-1] handler.response() Header[1] [Content-Length] = [61] handler.response(): status=200 headers=2 Into jk_ws_service_t::head Into jk_ws_service_t::write HttpExtensionProc service() returned OK System test, on the other hand, contains this in the log: HttpFilterProc started In HttpFilterProc Virtual Host redirection of 203.8.163.164 : 80 HttpFilterProc [/index.jsp] is a servlet url - should redirect to ajp13:203.8.163.164:8010 HttpFilterProc check if [/index.jsp] is pointing to the web-inf directory It repeats these four lines 9 or 10 times and never reaches the HttpExtensionProc. Looking at the code I can see that the threadPool registry entry affects how the HttpExtensionProc is executed. I tried changing it from the existing value of 5 (which does not use a pool) to 10 (which should use the pool). It had no effect. Can anyone shed some light on this? I hope I have been clear in my explanation of the problem. If not, I would be happy to clarify. Thanks heaps for any help. Kent - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Cluster error when starting up web application
Hi, I just got Tomcat 5.0.19 and after setting up the new delta based cluster manager, i get this during the startup my application : SEVERE: Session event listener threw exception java.lang.IllegalStateException: setAttribute: Session already invalidated at org.apache.catalina.cluster.session.DeltaSession.setAttribute(DeltaSession.java:1306) at org.apache.catalina.cluster.session.DeltaSession.setAttribute(DeltaSession.java:1283) at org.apache.catalina.cluster.session.DeltaSessionFacade.setAttribute(DeltaSessionFacade.java:17 7) at com.opensymphony.webwork.lifecycle.SessionLifecycleListener.sessionCreated(SessionLifecycleLis tener.java:50) at org.apache.catalina.cluster.session.DeltaSession.tellNew(DeltaSession.java:459) at org.apache.catalina.cluster.session.DeltaSession.setId(DeltaSession.java:431) at org.apache.catalina.cluster.session.DeltaManager.createSession(DeltaManager.java:377) at org.apache.catalina.cluster.session.DeltaManager.messageReceived(DeltaManager.java:895) at org.apache.catalina.cluster.session.DeltaManager.messageDataReceived(DeltaManager.java:794) at org.apache.catalina.cluster.tcp.SimpleTcpCluster.messageDataReceived(SimpleTcpCluster.java:561 ) at org.apache.catalina.cluster.io.ObjectReader.execute(ObjectReader.java:117) at org.apache.catalina.cluster.tcp.TcpReplicationThread.drainChannel(TcpReplicationThread.java:17 6) at org.apache.catalina.cluster.tcp.TcpReplicationThread.run(TcpReplicationThread.java:114) As far as I can tell, it's happening when I request a page that has the webwork2 RequestLifecycleFilter set for that url pattern. The doFilter function creates a HttpSession if none exists, which I assume calls the SessionLifecycleListener.sessionCreated(), but for some reason, it seems like the session is being invalidated prematurely.. Here's the relevant piece from my web.xml : filter filter-namecontainer/filter-name filter-class com.opensymphony.webwork.lifecycle.RequestLifecycleFilter/filter-class /filter filter-mapping filter-namecontainer/filter-name url-pattern/*/url-pattern !-- modify appropriately -- /filter-mapping listener listener-class com.opensymphony.webwork.lifecycle.SessionLifecycleListener/listener-class /listener listener listener-class com.opensymphony.webwork.lifecycle.ApplicationLifecycleListener/listener-class /listener and from my server.xml file, taken pretty much verbatim from the default server.xml: Cluster className=org.apache.catalina.cluster.tcp.SimpleTcpCluster managerClassName=org.apache.catalina.cluster.session.DeltaManager expireSessionsOnShutdown=false useDirtyFlag=true Membership className=org.apache.catalina.cluster.mcast.McastService mcastAddr=224.64.64.128 mcastPort=45600 mcastFrequency=500 mcastDropTime=3000/ Receiver className=org.apache.catalina.cluster.tcp.ReplicationListener tcpListenAddress=auto tcpListenPort=4060 tcpSelectorTimeout=100 tcpThreadCount=3/ Sender className=org.apache.catalina.cluster.tcp.ReplicationTransmitter replicationMode=pooled/ Valve className=org.apache.catalina.cluster.tcp.ReplicationValve filter=.*\.gif;.*\.js;.*\.jpg;.*\.htm;.*\.html;.*\.txt;/ /Cluster Anyone know what's going on? Or can provide some insight into what I may be missing? Thanks for any info. -a - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Cluster error when starting up web application
Upon further research, it seems that DeltaSession.setId() fires the sessionCreated events to registered listeners, but this happens before a session is declared valid ( i.e. setValid(true) has not been called ). so when a registered listener tries to utilize ( what it seems to believe is ) a newly created session, the setAttribute method throws the IllegalStateException.. Now I don't know too much about how the actual workings of the HttpSession should go, but in my opinion, the sessionCreated events should not be fired unless a valid session has been created. which seems to imply that maybe setValid() should doing the firing... However, that doesn't sit well with me since it doesn't make sense for a session to be truly valid unless it has a sessionId, which either forces there to be an implict order between setId() and setValid() which is no good, requiring that either/or check to see if the other has been truly satisfied, and setting up some sort of implicit sequence coupling. the alternative, as I see it, is move the tellNew() invocation to the DeltaManager ( it's declared public, so it's already exposed ). I tried that, by patching up the TC5 sources and it seemed to resolve the issue. Again, as I know little to nothing of how sessions should work and what other implications this refactoring may have, what should be my next course of action? Should I contact the webwork people? Is this not correct use of sessions and session listeners? Should I open up a bug and/or propose my patch? Thanks in advance for reading and/or responding, -a Aadi Deshpande wrote: Hi, I just got Tomcat 5.0.19 and after setting up the new delta based cluster manager, i get this during the startup my application : SEVERE: Session event listener threw exception java.lang.IllegalStateException: setAttribute: Session already invalidated at org.apache.catalina.cluster.session.DeltaSession.setAttribute(DeltaSession.java:1306) at org.apache.catalina.cluster.session.DeltaSession.setAttribute(DeltaSession.java:1283) at org.apache.catalina.cluster.session.DeltaSessionFacade.setAttribute(DeltaSessionFacade.java:17 7) at com.opensymphony.webwork.lifecycle.SessionLifecycleListener.sessionCreated(SessionLifecycleLis tener.java:50) at org.apache.catalina.cluster.session.DeltaSession.tellNew(DeltaSession.java:459) at org.apache.catalina.cluster.session.DeltaSession.setId(DeltaSession.java:431) at org.apache.catalina.cluster.session.DeltaManager.createSession(DeltaManager.java:377) at org.apache.catalina.cluster.session.DeltaManager.messageReceived(DeltaManager.java:895) at org.apache.catalina.cluster.session.DeltaManager.messageDataReceived(DeltaManager.java:794) at org.apache.catalina.cluster.tcp.SimpleTcpCluster.messageDataReceived(SimpleTcpCluster.java:561 ) at org.apache.catalina.cluster.io.ObjectReader.execute(ObjectReader.java:117) at org.apache.catalina.cluster.tcp.TcpReplicationThread.drainChannel(TcpReplicationThread.java:17 6) at org.apache.catalina.cluster.tcp.TcpReplicationThread.run(TcpReplicationThread.java:114) As far as I can tell, it's happening when I request a page that has the webwork2 RequestLifecycleFilter set for that url pattern. The doFilter function creates a HttpSession if none exists, which I assume calls the SessionLifecycleListener.sessionCreated(), but for some reason, it seems like the session is being invalidated prematurely.. Here's the relevant piece from my web.xml : filter filter-namecontainer/filter-name filter-class com.opensymphony.webwork.lifecycle.RequestLifecycleFilter/filter-class /filter filter-mapping filter-namecontainer/filter-name url-pattern/*/url-pattern !-- modify appropriately -- /filter-mapping listener listener-class com.opensymphony.webwork.lifecycle.SessionLifecycleListener/listener-class /listener listener listener-class com.opensymphony.webwork.lifecycle.ApplicationLifecycleListener/listener-class /listener and from my server.xml file, taken pretty much verbatim from the default server.xml: Cluster className=org.apache.catalina.cluster.tcp.SimpleTcpCluster managerClassName=org.apache.catalina.cluster.session.DeltaManager expireSessionsOnShutdown=false useDirtyFlag=true Membership className=org.apache.catalina.cluster.mcast.McastService mcastAddr=224.64.64.128 mcastPort=45600 mcastFrequency=500 mcastDropTime=3000/ Receiver className=org.apache.catalina.cluster.tcp.ReplicationListener tcpListenAddress=auto tcpListenPort=4060 tcpSelectorTimeout=100 tcpThreadCount=3/ Sender