How to use setRequestedSessionId
Hi, I'm not sure how to do this and was hoping for some pointers. I have a filter that intercepts the session in the request. I then compare the Session Id to another value and based on some calculations either accept or reject the Session Id. Here's the question. How do I invalidate the session and assign my own Session Id to the request? Or have the request reuse an existing session object. setRequestedSessionId does not seem to be available from the filter, so I don't know how to change the session associated with the request. I wrote my own version of the Standard Manager, but the manager doesn't have access to the request, so I can't do it there. One of the uses for this is to not create a session everytime a particular page is hit by a monitoring system (every 5 seconds). Tomcat will create a new session every time, which is wasteful. If I could reuse the session in this case, that would be ideal. Would a HttpRequestWrapper work here and if so can anyone provide an example. I couldn't find any. I'm using Tomcat 4.03 on Linux. Thanks, Subir -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
classpath problem
hello, Tomcat 4.0 can't find my classes and my associated resources that are in the Web-inf/lib directory of my Web application. When i set the classpath dynnamically in the catalina.bat for example, Tomcat can'find the HttpServlet.class I can't understand why i have this kind of problem because i believed that Tomcat load automatically the jar file that is put in the Web-inf directory of a web application !!! Patrick PIERRA Linedata Services Luxembourg 00 352 29 56 65 282 [EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Loaded DSO /usr/lib/apache/mod_webapp.so uses plain Apache 1.3API, this module might crash under EAPI!
Mauricio Tia Ni Gong Lin wrote: I am using mod_webapp to connect apache web server version 1.3.20 with Tomcat 4, but the following warning message is showed when I start the apache web server: -- [Fri May 31 17:47:00 2002] [warn] Loaded DSO /usr/lib/apache/mod_webapp.so uses plain Apache 1.3 API, this module might crash under EAPI! (please recompile it with -DEAPI). --- The apache web server is running, but i cannot access jsp files via mod_webapp. When i set the http://www.ppgi.fua.br:8080/inscricao/inscricao.jsp, the Tomcat show me the page. But when i try http://www.ppgi.fua.br/inscricao/inscricao.jsp, the Apache Server can't find the page. Is there anything wrong? To get ride of the message. Try with a newer mod_webapp. (aka from cvs). Regards, Mauricio Lin -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: classpath problem
WEB-INF is case sensitive. can't be Web-inf does this make a difference? fillup On 6/3/02 1:16 AM, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: hello, Tomcat 4.0 can't find my classes and my associated resources that are in the Web-inf/lib directory of my Web application. When i set the classpath dynnamically in the catalina.bat for example, Tomcat can'find the HttpServlet.class I can't understand why i have this kind of problem because i believed that Tomcat load automatically the jar file that is put in the Web-inf directory of a web application !!! Patrick PIERRA Linedata Services Luxembourg 00 352 29 56 65 282 [EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Apache 2.x and tomcat 4.x integration - Unix
so should I using mod_jk2. Not sure why the developers have created two versions anyways, I though maybe mod_jk2 was for apache 2 - Original Message - From: Nikola Milutinovic [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Monday, June 03, 2002 6:04 AM Subject: Re: Apache 2.x and tomcat 4.x integration - Unix whats the difference between mod_jk and mod_jk2 I believe mod_jk2 uses improved AJPv1.4 protocol for communication and is generally the future of mod_jk and AJPv1.3 Nix. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
iis redirector and status code not 200
I have noticed the following problem. When my servlet wishes to return a status code other than 200 and wants to include a body, if I include a content length header, browsers get hung and cannot handle it. This only happens through the ISAPI redirector but when accessing the servlet straight to tomcat it works fine. Any ideas how to get around this problem (other than dropping the content length)? I imagine the problem relates to the return code returned by the ISAPI redirector to IIS whihc does not care what the actual status of the request was and always asks IIS to leave it open TIA, David
Re: classpath problem
When i put WEB-INF instead Web-inf windows reformat the name into Web-inf. Please note that the name Web-inf was created by Tomcat when i deploy the WAR. Patrick PIERRA Linedata Services Luxembourg 00 352 29 56 65 282 [EMAIL PROTECTED] Phillip Morelock subscriptions@phillipmorTo: Tomcat Users List [EMAIL PROTECTED] elock.com cc: Subject: Re: classpath problem 06/03/02 10:23 AM Please respond to Tomcat Users List WEB-INF is case sensitive. can't be Web-inf does this make a difference? fillup On 6/3/02 1:16 AM, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: hello, Tomcat 4.0 can't find my classes and my associated resources that are in the Web-inf/lib directory of my Web application. When i set the classpath dynnamically in the catalina.bat for example, Tomcat can'find the HttpServlet.class I can't understand why i have this kind of problem because i believed that Tomcat load automatically the jar file that is put in the Web-inf directory of a web application !!! Patrick PIERRA Linedata Services Luxembourg 00 352 29 56 65 282 [EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Apache-Tomcat an VirtualHosts, here they are
Yes please. I didn't get the html doc. Rupert -Original Message- From: Nikola Milutinovic [mailto:[EMAIL PROTECTED]] Sent: 03 June 2002 07:08 To: Tomcat Users List Subject: Re: Apache-Tomcat an VirtualHosts, here they are Your mail just contains a style sheet and a signiture. The main document is missing. --- I have just checked. I have sent an e-mail with two files attached: vh_howto.html vh_howto.css The client is Outlook Express 5.5. I can re-send with Netscape 6.2 if you wish. Nix. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: classpath problem
well that is what's wrong you need to go to the dos prompt and rename it to something else, then rename it WEB-INF with that case. f On 6/3/02 2:06 AM, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: When i put WEB-INF instead Web-inf windows reformat the name into Web-inf. Please note that the name Web-inf was created by Tomcat when i deploy the WAR. Patrick PIERRA Linedata Services Luxembourg 00 352 29 56 65 282 [EMAIL PROTECTED] Phillip Morelock subscriptions@phillipmorTo: Tomcat Users List [EMAIL PROTECTED] elock.com cc: Subject: Re: classpath problem 06/03/02 10:23 AM Please respond to Tomcat Users List WEB-INF is case sensitive. can't be Web-inf does this make a difference? fillup On 6/3/02 1:16 AM, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: hello, Tomcat 4.0 can't find my classes and my associated resources that are in the Web-inf/lib directory of my Web application. When i set the classpath dynnamically in the catalina.bat for example, Tomcat can'find the HttpServlet.class I can't understand why i have this kind of problem because i believed that Tomcat load automatically the jar file that is put in the Web-inf directory of a web application !!! Patrick PIERRA Linedata Services Luxembourg 00 352 29 56 65 282 [EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
tomacat apache virtual host
Hi all! I tried to generate the virtual host code to include in httpd.conf by tomcat server.xml, but I can't specified a servername different from the ip address specified in virtual host tag. Have anyone some hint for me? Regards Valeria Cavallini -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Apache-Tomcat and VirtualHosts, second try
I'm posting a zip this time. Nix. vh_howto.zip Description: Zip compressed data -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Apache 2.x and tomcat 4.x integration - Unix
so should I using mod_jk2. Bear in mind that mod_jk2 might still be experimental. Nix.
Serlvet manager of tomcat
Dear, I am using Tomcat 4.0.1 on Sun JDK1.3, i would like to if there are `better` manager of tomcat, so that, say, i can view the currently instantiated servlet, or idle/zombies servlet...? During the developement of my web-application, my developers reported that sometimes tomcat fail to respond. And even i did a shutdown.sh, tomcat simply dead did not shutdown completely. I need to do `kill PID` on it. As a developer/deploy-er, i would like to know which servlet(s) hang (?) the tomcat conainter. The default `manager` web-apps does not provide this features. One last question, doing a ps fax | less on my redhat system returns, say: 25794 pts/2S 0:04 /usr/local/jdk1.3.1_02/bin/i386/native_threads/java - 25839 pts/2S 0:00 \_ /usr/local/jdk1.3.1_02/bin/i386/native_threads/ja 25840 pts/2S 0:30 \_ /usr/local/jdk1.3.1_02/bin/i386/native_thread 25841 pts/2S 0:00 \_ /usr/local/jdk1.3.1_02/bin/i386/native_thread 25842 pts/2S 0:00 \_ /usr/local/jdk1.3.1_02/bin/i386/native_thread 25843 pts/2S 0:03 \_ /usr/local/jdk1.3.1_02/bin/i386/native_thread 25844 pts/2S 0:00 \_ /usr/local/jdk1.3.1_02/bin/i386/native_thread 25845 pts/2S 0:00 \_ /usr/local/jdk1.3.1_02/bin/i386/native_thread 25846 pts/2S 0:01 \_ /usr/local/jdk1.3.1_02/bin/i386/native_thread The parent .native_threads... was actually the mother of all servlet...does the above each child `thread` (or proecess?) corresponds to ONE and only one servlet (instance)? Best regards, Simon. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Any way to tell how many sessions exist?
I wanted to write a JSP to display server stats. I was hoping to be able to get all the sessions, show how many there were, what their ages were, etc. But it appears that access to the collection of sessions has been deprecated from the Servlet 2.3 API. Is there a way to get at this info, preferrably in a container-independent manner? I will settle for a Tomcat-specific solution. TIA, -- Rick -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: RequestWrappers
here is an example posted by Craig to wrap the response(in a filter), but you can see how to wrap the request from this example. http://www.mail-archive.com/tomcat-user@jakarta.apache.org/msg41615.html Charlie -Original Message- From: Joe Tomcat [mailto:[EMAIL PROTECTED]] Sent: Sunday, June 02, 2002 10:36 PM To: Tomcat Users List Subject: Re: RequestWrappers On Sunday 02 June 2002 16:41, you wrote: does anyone have any experience with making custom RequestWrappers with Catalina? I keep finding that my custom RequestWrapper is being wrapped by a catalina RequestWrapper -- making mine useless. Has anyone had this problem and solved it? There seems to be very little documentation or tutorials about this subject. I think it's in the more esoteric section of things. I would like to know, too. I tried to use a request wrapper but I couldn't get it to work correctly so I gave up. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Apache-Tomcat and VirtualHosts, second try
Nikola, Thanks for the virtualHost file it has helped a great deal. One more question. I've had this working on 3.x using ContextManager but is it still possible on tomcat 4.x eg. http://www.blablah.com:8080/index.jspwhich serves up a jsp page however I need this to be done on apache (2.x) http://www.blablah.com/index.jsp Apache deals with the image files and tomcat deals with jsp/servlets. I;ve used a root context for each virtual host before but is it possible in 4.x ?? - Original Message - From: Nikola Milutinovic [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Monday, June 03, 2002 10:45 AM Subject: Apache-Tomcat and VirtualHosts, second try I'm posting a zip this time. Nix. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Apache-Tomcat and VirtualHosts, second try
Nikola, Thanks for the virtualHost file it has helped a great deal. Glad to have helped. One more question. I've had this working on 3.x using ContextManager but is it still possible on tomcat 4.x eg. http://www.blablah.com:8080/index.jspwhich serves up a jsp page however I need this to be done on apache (2.x) http://www.blablah.com/index.jsp Apache deals with the image files and tomcat deals with jsp/servlets. I;ve used a root context for each virtual host before but is it possible in 4.x ?? For separating Active from Static content, you'll need either mod_jk or mod_jk2, since mod_webapp serves the entire webapp context. And you'll also need Ant to deploy it, if you have separate document trees in Tomcat and Apache (a good choice). Nix.
RE: Tomcat is the best ?!
Walid, Take a look at Resin from www.caucho.com. I've found that it doesn't have as many spec. compliance issues as tomcat, is much faster to develop with (as it automatically reloads and compiles any servlet, jsp, and config changes), and is loads faster in raw performance. I really enjoyed working with Tomcat, but I think that once you try a quality, production grade server like Resin, you won't go back. Chris Wilson [EMAIL PROTECTED] http://www.wondergeek.com/ -Original Message- From: Walid Al-Abbadi [mailto:[EMAIL PROTECTED]] Sent: Sunday, June 02, 2002 10:51 PM To: [EMAIL PROTECTED] Subject: Tomcat is the best ?! i just want to know if i have an app work with jsp's ..is the best app server can i work with is Tomcat ? and why ?..or there is other servers best in performance than it !.. this applied too on Apache web server ! Actually, i dont know about other servers work with jsp's except Tomcat , so i asked that question! ..but i'm looking for best performance in my application.. i'll appreciate any help for explaning these points to me .. thanks in advance , Walid Al-Abbadi -- To unsubscribe, e-mail: mailto:tomcat-user- [EMAIL PROTECTED] For additional commands, e-mail: mailto:tomcat-user- [EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: classpath problem
All Tomcat is doing is expanding the directory. If it was Web-inf there, then that is what it will be expanded as. One thing to do is to make sure that Windows explorer isn't just displaying it that way even though it is properly upper-cased. You might want to look at it though the command line and see if the case is still Web-inf. If you configure Explorer to show classic folders, you will be less likely to run into this problem.. Jake At 02:14 AM 6/3/2002 -0700, you wrote: well that is what's wrong you need to go to the dos prompt and rename it to something else, then rename it WEB-INF with that case. f On 6/3/02 2:06 AM, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: When i put WEB-INF instead Web-inf windows reformat the name into Web-inf. Please note that the name Web-inf was created by Tomcat when i deploy the WAR. Patrick PIERRA Linedata Services Luxembourg 00 352 29 56 65 282 [EMAIL PROTECTED] Phillip Morelock subscriptions@phillipmorTo: Tomcat Users List [EMAIL PROTECTED] elock.com cc: Subject: Re: classpath problem 06/03/02 10:23 AM Please respond to Tomcat Users List WEB-INF is case sensitive. can't be Web-inf does this make a difference? fillup On 6/3/02 1:16 AM, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: hello, Tomcat 4.0 can't find my classes and my associated resources that are in the Web-inf/lib directory of my Web application. When i set the classpath dynnamically in the catalina.bat for example, Tomcat can'find the HttpServlet.class I can't understand why i have this kind of problem because i believed that Tomcat load automatically the jar file that is put in the Web-inf directory of a web application !!! Patrick PIERRA Linedata Services Luxembourg 00 352 29 56 65 282 [EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: log() method
Howdy, Actually, if I am not mistaken, the log() method is in the ServletContext. Therefore, it should go into your context's log. Do you have a Logger element for your context in server.xml? I do, and that's where my log() statements go. By the way, I'm a big fan of log4j, use it all the time and everywhere. Strongly recommended for logging purposes. Yoav Shapira Millennium ChemInformatics -Original Message- From: Scott Purcell [mailto:[EMAIL PROTECTED]] Sent: Friday, May 31, 2002 5:08 PM To: [EMAIL PROTECTED] Subject: log() method I am running Tomcat 4.0.3 on a NT box here, and I am trying to use the log(my message here); method. The log() method should put the messages into the error log, but I am not seeing any activity there. In my installdir I have a logs dir and inside there there are Four(4) logs. catalina.log localhost_access_log localhost_examples_log localhost_log I have been tailing each of those, but I never see my messages. Also, they do not go to stdout, as I am starting tomcat in a cmd window, and the log() does not go there. Thanks, Scott Purcell -- To unsubscribe, e-mail: mailto:tomcat-user- [EMAIL PROTECTED] For additional commands, e-mail: mailto:tomcat-user- [EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
tyrex build issues
Hello everyone, I am trying to build tomcat 4 from source. I followed the Building.txt file but when I issue the ant commands my build fails at tyrex naming. Here are the errors: Note: sun.tools.javac.Main has been deprecated. [javac] /usr/local/jakarta-tomcat-4.0.3/catalina/src/share/org/apache/naming/factory/TyrexTransactionFactory.java:75: Class tyrex.tm.Tyrex not found in import. [javac] import tyrex.tm.Tyrex; The are about three of these erros then I get the ever popular build failed: 4 errors, 2 warnings BUILD FAILED Can anyone give me some insite to what I ma doing wrong? THanks for the help. --chad -- Chad Kellerman -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Class org/w3c/dom/NodeList violates loader constraints
hello, i have a class which try to load an xml file on the startup of tomcat 4.0. i receive this error : if someone could help me to resolve it ? java.lang.LinkageError: Class org/w3c/dom/NodeList violates loader constraints at lds.odata.web.dataconnectivity.JDBC_OdataConnection.initConnectionParameters(JDBC_OdataConnection.java:126) at lds.odata.web.dataconnectivity.JDBC_OdataConnection.proceedConnection(JDBC_OdataConnection.java:153) at lds.odata.web.servlets.OdataJDBCinitializer.init(OdataJDBCinitializer.java:50) at javax.servlet.GenericServlet.init(GenericServlet.java:258) at org.apache.catalina.core.StandardWrapper.load(Unknown Source) at org.apache.catalina.core.StandardContext.loadOnStartup(Unknown Source) at org.apache.catalina.core.StandardContext.start(Unknown Source) at org.apache.catalina.core.ContainerBase.addChild(Unknown Source) at org.apache.catalina.core.StandardHost.addChild(Unknown Source) at org.apache.catalina.core.StandardHost.install(Unknown Source) at org.apache.catalina.startup.HostConfig.deployApps(Unknown Source) at org.apache.catalina.startup.HostConfig.start(Unknown Source) at org.apache.catalina.startup.HostConfig.lifecycleEvent(Unknown Source) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(Unknown Source) at org.apache.catalina.core.ContainerBase.start(Unknown Source) at org.apache.catalina.core.ContainerBase.start(Unknown Source) at org.apache.catalina.core.StandardEngine.start(Unknown Source) at org.apache.catalina.core.StandardService.start(Unknown Source) at org.apache.catalina.core.StandardServer.start(Unknown Source) at org.apache.catalina.startup.Catalina.start(Unknown Source) at org.apache.catalina.startup.Catalina.execute(Unknown Source) at org.apache.catalina.startup.Catalina.process(Unknown Source) 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(Unknown Source) Patrick PIERRA Linedata Services Luxembourg 00 352 29 56 65 282 [EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
MS Driver (again)
Has anyone gotten either the Beta 2 or the finalized driver to work via DataSource? I am getting nowhere fast with this - does it even work? I *can* connect w/o using DataSource, but I'm trying to get database pooling working with Tomcat connecting to a MS SQL Server 2000 database, and this seems like it should be a viable option. Thanks in advance. Here is the relevant code snippet: Context ctx = new InitialContext(); Context envCtx = (Context)ctx.lookup(java:comp/env); System.out.println(Got first context.); NamingEnumeration enum =ctx.listBindings(java:comp/env/jdbc); while( enum.hasMore() ) { System.out.println(Binding: + ((Binding)enum.next()).toString() ); } DataSource ds = (DataSource)envCtx.lookup(jdbc/nutrosDB); System.out.println(Got the second context.); if (ds != null) { System.out.println(Getting the connection from the context.); connection = ds.getConnection(); } == DataSource is null. Here is the output: Got first context. Binding: nutrosDB: org.apache.naming.ResourceRef:Reference Class Name: javax.sql.DataSource Type: scope Content: Shareable Type: auth Content: Container Type: user Content: Type: factory Content: com.microsoft.jdbcx.sqlserver.SQLServerDataSourceFactory Type: password Content: Type: url Content: jdbc:microsoft:sqlserver://192.168.9.253;user=;Password=;DatabaseName=NutrosDev Type: driverClassName Content: com.microsoft.jdbc.sqlserver.SQLServerDriver Type: database Content: NutrosDev Got the second context. = Here is the server.xml snippet: Resource name=jdbc/nutrosDB auth=Container type=javax.sql.DataSource/ ResourceParams name=jdbc/nutrosDB parameter namedatabase/namevalueNutrosDev/value /parameter parameter namefactory/namevaluecom.microsoft.jdbcx.sqlserver.SQLServerDataSourceFactory/value /parameter parameter namedriverClassName/namevaluecom.microsoft.jdbc.sqlserver.SQLServerDriver/value /parameter parameter nameurl/namevaluejdbc:microsoft:sqlserver://192.168.9.253;user=;Password=;DatabaseName=N utrosDev/value /parameter parameter nameuser/namevalue/value /parameter parameter namepassword/namevalue/value /parameter /ResourceParams And the web.xml snippet: resource-env-ref descriptiontest jdbc/nutrosDB/description resource-env-ref-namejdbc/nutrosDB/resource-env-ref-name resource-env-ref-typejavax.sql.DataSource/resource-env-ref-type /resource-env-ref -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Create the webapp DSO
Thanks! -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Tomcat is the best ?!
-Original Message- From: Chris Wilson [mailto:[EMAIL PROTECTED]] Sent: Monday, June 03, 2002 6:28 AM To: 'Tomcat Users List' Subject: RE: Tomcat is the best ?! Walid, Take a look at Resin from www.caucho.com. I've found that it doesn't have as many spec. compliance issues as tomcat, is much faster to develop with (as it automatically reloads and compiles any servlet, jsp, and config changes), and is loads faster in raw performance. I really enjoyed working with Tomcat, but I think that once you try a quality, production grade server like Resin, you won't go back. snip I noticed Resin's web site has a link about clustering and such. Which makes me wonder - how are people doing this in Tomcat, if they are doing it all? Are there any whitepapers anywhere on the various ways of accomplishing this? Any experiences to share? -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: tyrex build issues
I think I saw something on the tomcat-dev list about backing out changes to Tyrex. You may want to look at the tomcat-dev archives or try building from CVS. Hope this helps, Jason -Original Message- From: chad kellerman [mailto:[EMAIL PROTECTED]] Sent: Monday, June 03, 2002 9:50 AM To: Tomcat Users List Subject: tyrex build issues Hello everyone, I am trying to build tomcat 4 from source. I followed the Building.txt file but when I issue the ant commands my build fails at tyrex naming. Here are the errors: Note: sun.tools.javac.Main has been deprecated. [javac] /usr/local/jakarta-tomcat-4.0.3/catalina/src/share/org/apache/naming/factory/TyrexTransactionFactory.java:75: Class tyrex.tm.Tyrex not found in import. [javac] import tyrex.tm.Tyrex; The are about three of these erros then I get the ever popular build failed: 4 errors, 2 warnings BUILD FAILED Can anyone give me some insite to what I ma doing wrong? THanks for the help. --chad -- Chad Kellerman -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Help with Tomcat and IIS
I installed Tomcat 4.0.3 and followed the How To directions for redirecting when using IIS. JSP pages are served correctly through Tomcat http://local host:8080/examples/jsp/dates/date.jsp but when I try and serve a simple jsp http://localhost/test.jsp where test.jsp is html head titleWelcome JSP/title /head body bgcolor=white h3 Welcome /h3 pb Today is %= new java.util.Date() %. Have a nice day! :-) /b/p /body /html I receive the error ...titleApache Tomcat/4.0.3 - Error report/title ...Apache Tomcat/4.0.3 - HTTP Status 404 - /jakarta/isapi_redirector.dll ...type/b Status report ...message/b u/jakarta/isapi_redirector.dll ...description/b uThe requested resource (/jakarta/isapi_redirector.dll) is not available. through IIS. I checked the authority to the /jakarta virtual directory and it does have Execute permission. Any ideas would be appreciated. Robert A. Rogerson Phone: 905-826-7761 Cell: 416-562-1039 Email:[EMAIL PROTECTED]
Re: Class org/w3c/dom/NodeList violates loader constraints
Hello Patrick, Do you have DOM packages in WEB-INF/lib or WEB-INF/classes? If so, this violates the Sun classloading spec and, as of Tomcat 4.0.2, this is enforcedalthough not very cleanly until the latest betas of Tomcat 4.0.4 and 4.1. The solution is to move your DOM classes into a parent classloader such as TOMCAT_HOME/lib, TOMCAT_HOME/common/lib or use the ones that come from the JDK (if you use 1.4...either the default ones or ones you override in JAVA_HOME/jre/lib/endorsed...or TOMCAT_HOME/common/endorsed if you use Tomcat 4.1). Jake Monday, June 03, 2002, 9:24:13 AM, you wrote: PPlc hello, PPlc i have a class which try to load an xml file on the startup of tomcat 4.0. PPlc i receive this error : PPlc if someone could help me to resolve it ? PPlc java.lang.LinkageError: Class org/w3c/dom/NodeList violates loader PPlc constraints PPlc at PPlc lds.odata.web.dataconnectivity.JDBC_OdataConnection.initConnectionParameters(JDBC_OdataConnection.java:126) PPlc at PPlc lds.odata.web.dataconnectivity.JDBC_OdataConnection.proceedConnection(JDBC_OdataConnection.java:153) PPlc at PPlc lds.odata.web.servlets.OdataJDBCinitializer.init(OdataJDBCinitializer.java:50) PPlc at javax.servlet.GenericServlet.init(GenericServlet.java:258) PPlc at org.apache.catalina.core.StandardWrapper.load(Unknown Source) PPlc at org.apache.catalina.core.StandardContext.loadOnStartup(Unknown PPlc Source) PPlc at org.apache.catalina.core.StandardContext.start(Unknown Source) PPlc at org.apache.catalina.core.ContainerBase.addChild(Unknown Source) PPlc at org.apache.catalina.core.StandardHost.addChild(Unknown Source) PPlc at org.apache.catalina.core.StandardHost.install(Unknown Source) PPlc at org.apache.catalina.startup.HostConfig.deployApps(Unknown PPlc Source) PPlc at org.apache.catalina.startup.HostConfig.start(Unknown Source) PPlc at org.apache.catalina.startup.HostConfig.lifecycleEvent(Unknown PPlc Source) PPlc at PPlc org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(Unknown PPlc Source) PPlc at org.apache.catalina.core.ContainerBase.start(Unknown Source) PPlc at org.apache.catalina.core.ContainerBase.start(Unknown Source) PPlc at org.apache.catalina.core.StandardEngine.start(Unknown Source) PPlc at org.apache.catalina.core.StandardService.start(Unknown Source) PPlc at org.apache.catalina.core.StandardServer.start(Unknown Source) PPlc at org.apache.catalina.startup.Catalina.start(Unknown Source) PPlc at org.apache.catalina.startup.Catalina.execute(Unknown Source) PPlc at org.apache.catalina.startup.Catalina.process(Unknown Source) PPlc at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) PPlc at PPlc sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) PPlc at PPlc sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) PPlc at java.lang.reflect.Method.invoke(Method.java:324) PPlc at org.apache.catalina.startup.Bootstrap.main(Unknown Source) PPlc Patrick PIERRA PPlc Linedata Services Luxembourg PPlc 00 352 29 56 65 282 PPlc [EMAIL PROTECTED] PPlc -- PPlc To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] PPlc For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- Best regards, Jacobmailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Help with Tomcat and IIS
Robert A. Rogerson wrote: I installed Tomcat 4.0.3 and followed the How To directions for redirecting when using IIS. JSP pages are served correctly through Tomcat http://local host:8080/examples/jsp/dates/date.jsp but when I try and serve a simple jsp http://localhost/test.jsp where test.jsp is html head titleWelcome JSP/title /head body bgcolor=white h3 Welcome /h3 pb Today is %= new java.util.Date() %. Have a nice day! :-) /b/p /body /html I receive the error ...titleApache Tomcat/4.0.3 - Error report/title ...Apache Tomcat/4.0.3 - HTTP Status 404 - /jakarta/isapi_redirector.dll ...type/b Status report ...message/b u/jakarta/isapi_redirector.dll ...description/b uThe requested resource (/jakarta/isapi_redirector.dll) is not available. through IIS. I checked the authority to the /jakarta virtual directory and it does have Execute permission. Any ideas would be appreciated. 1. In %CATALINA_HOME%/conf/server.xml make sure the line Context path= docBase=ROOT reloadable=true debug=0/ is uncommented (in 403 as shipped, it's commented). 2. Put test.jsp in %CATALINA_HOME%/webapps/ROOT 3. Unless you switched Tomcat's port to 80, I think your URL has to be http://localhost:8080/test.jsp HTH P. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: MS Driver (again)
Hello Sean, See this email. It has links to a few resources that tell about a proven way to use DBCP. http://marc.theaimsgroup.com/?l=tomcat-userm=102242646003357w=2 Take a look at your parameters. For instance, user should be username. Just check and double check that all your configuration is proper and matches up with an example that has been proven to work (link above). Jake Monday, June 03, 2002, 9:25:33 AM, you wrote: SL Has anyone gotten either the Beta 2 or the finalized driver to work via DataSource? I am getting SL nowhere fast with this - does it even work? I *can* connect w/o using DataSource, but I'm trying SL to get database pooling working with Tomcat connecting to a MS SQL Server 2000 database, and SL this seems like it should be a viable option. Thanks in advance. SL Here is the relevant code snippet: SL Context ctx = new InitialContext(); SL Context envCtx = (Context)ctx.lookup(java:comp/env); SL System.out.println(Got first context.); SL NamingEnumeration enum =ctx.listBindings(java:comp/env/jdbc); SLwhile( enum.hasMore() ) { SL System.out.println(Binding: + ((Binding)enum.next()).toString() ); SL} SL DataSource ds = (DataSource)envCtx.lookup(jdbc/nutrosDB); SL System.out.println(Got the second context.); SL if (ds != null) SL { SL System.out.println(Getting the connection from the context.); SL connection = ds.getConnection(); SL } SL == SL DataSource is null. Here is the output: SL Got first context. SL Binding: nutrosDB: org.apache.naming.ResourceRef:Reference Class Name: javax.sql.DataSource SL Type: scope SL Content: Shareable SL Type: auth SL Content: Container SL Type: user SL Content: SL Type: factory SL Content: com.microsoft.jdbcx.sqlserver.SQLServerDataSourceFactory SL Type: password SL Content: SL Type: url SL Content: jdbc:microsoft:sqlserver://192.168.9.253;user=;Password=;DatabaseName=NutrosDev SL Type: driverClassName SL Content: com.microsoft.jdbc.sqlserver.SQLServerDriver SL Type: database SL Content: NutrosDev SL Got the second context. SL = SL Here is the server.xml snippet: SL Resource name=jdbc/nutrosDB auth=Container SL type=javax.sql.DataSource/ SL ResourceParams name=jdbc/nutrosDB SL parameter SL namedatabase/namevalueNutrosDev/value SL /parameter SL parameter SL namefactory/namevaluecom.microsoft.jdbcx.sqlserver.SQLServerDataSourceFactory/value SL /parameter SL parameter SL namedriverClassName/namevaluecom.microsoft.jdbc.sqlserver.SQLServerDriver/value SL /parameter SL parameter SL nameurl/namevaluejdbc:microsoft:sqlserver://192.168.9.253;user=;Password=;DatabaseName=N SL utrosDev/value SL /parameter SL parameter SL nameuser/namevalue/value SL /parameter SL parameter SL namepassword/namevalue/value SL /parameter SL /ResourceParams SL And the web.xml snippet: SL resource-env-ref SL descriptiontest jdbc/nutrosDB/description SL resource-env-ref-namejdbc/nutrosDB/resource-env-ref-name SL resource-env-ref-typejavax.sql.DataSource/resource-env-ref-type SL /resource-env-ref SL -- SL To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] SL For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- Best regards, Jacobmailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
apache module authentication remote_user
Hi, I am attempting to set up a tomcat 4.0.3 server to work with apache 1.3.x and an apache module for kerberos authentication. (both servers are on solaris) On successful authentication the remote_user variable in apache is populated. I thought that this should be passed to tomcat as a header so that it could be access with the request.getHeader() call, but this does not work. Should this work? Is there a configuration step that I missed? If I have the wrong expectations, can anyone point me in the right direction. Do I need to implement the Realm interface in order to do custom authentication? Any umich.edu people on the list already solved this issue? Thanks for any advice, Jeff -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Creating a queue with acceptCount
Hi. I have a jakarta4 (catalina) server running on my computer, and I'm trying to set it up to queue requests when all its processors are busy. My server.xml file's relevant tag looks like this: !-- Define a non-SSL HTTP/1.1 Connector on port 8180 -- Connector className=org.apache.catalina.connector.http.HttpConnector port=8180 minProcessors=1 maxProcessors=2 enableLookups=true redirectPort=8543 acceptCount=10 debug=100 connectionTimeout=6/ The problem is that whenever I have more than two simultaneous requests, the server rejects the next request, and I can't figure out why. According to the acceptCount parameter, it's supposed to queue the next 10 requests after its processors are full, isn't it? P.S. I've also tried replacing the http connector with HTTP 1.0 connector, as I saw someone suggest, but it didn't do the trick. Thanks for your help, Oz. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
AW: http 302 issue on tomcat 4.0.1
I think you can't configure tomcat to disable the feature directly. I see currently two places where you could tweak tomcat: - Modify tomcat source (that part that is responsible for the welcom-file) - Create a filter Either a input filter that forwards the requests to the page. Here you have to implement somthing to know whe you should redirect. Or use a outputfilter that throws away the result from tomcat if the result is a 302 to index.htm and includes the desired page. -Ursprüngliche Nachricht- Von: remy.menetrieux [mailto:[EMAIL PROTECTED]] Gesendet: Montag, 3. Juni 2002 17:27 An: [EMAIL PROTECTED]; [EMAIL PROTECTED] Betreff: http 302 issue on tomcat 4.0.1 When browsers request my url containing a filename, Tomcat does not internally redirect this request, it sends a HTTP 302 redirect. How can we configure and patch Tomcat to disable this feature ? -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Syntax error using mod_webapp
Hi everybody, I configured the apache web server 1.3.24 integration with tomcat 4.0 (using mod_webapp) at my home and everything is doing well. I have been trying the same configuration at my job, but when I start the apache web server, the following message is displayed? --- [Mon Jun 3 11:37:09 2002] [warn] module mod_webapp.c is already added, skipping [Mon Jun 03 11:37:09 2002] 8365 (wa_main.c:77) WebApp Library initializing [Mon Jun 03 11:37:09 2002] 8365 (wa_main.c:81) Initializing APR [Mon Jun 03 11:37:09 2002] 8365 (pr_info.c:66) INFO provider initialized [Mon Jun 03 11:37:09 2002] 8365 (pr_warp.c:62) WARP provider initialized [Mon Jun 03 11:37:09 2002] 8365 (wa_main.c:101) WebApp Library initialized [Mon Jun 03 11:37:09 2002] 8365 (wa_config.c:167) Created connection conn (Prov: warp Param: localhost:8008) Syntax error on line 986 of /usr/local/apache/conf/httpd.conf: Invalid virtual host name Note: line 986 is WebAppDeploy examplesconn /examples My httpd.conf is: LoadModule webapp_module libexec/mod_webapp.so AddModule mod_webapp.c IfModule mod_webapp.c WebAppConnection conn warp localhost:8008 WebAppDeploy examplesconn /examples WebAppInfo /webapp-info /IfModule I NEED A HELP. Regards, Lin. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
AW: Syntax error using mod_webapp
Make shure that ServerName is set before the webapp directives. -Ursprüngliche Nachricht- Von: Mauricio Tia Ni Gong Lin [mailto:[EMAIL PROTECTED]] Gesendet: Montag, 3. Juni 2002 17:43 An: [EMAIL PROTECTED] Betreff: Syntax error using mod_webapp Syntax error on line 986 of /usr/local/apache/conf/httpd.conf: Invalid virtual host name -- -- Note: line 986 is WebAppDeploy examplesconn /examples My httpd.conf is: LoadModule webapp_module libexec/mod_webapp.so AddModule mod_webapp.c IfModule mod_webapp.c WebAppConnection conn warp localhost:8008 WebAppDeploy examplesconn /examples WebAppInfo /webapp-info /IfModule -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Tomcat is the best ?!
Well, there are two ways, I guess (haven't done it yet): 1. Use the JDBC session state management (Server.xml) 2. Borland AppServer, Web Edition ($500 for computer). It gives you fault tolerance, load balancing, etc. and allows you to set up on copy of Web Edition as Apache and use it to load balance it (at least that is what they rep told me). Adam Greene ROMulin Group Inc 885 Main St, Suite 16 Moncton, NB E1C 1G5 Ph: (506) 863-1014 x4 Fx: (506) 854-6886 http://www.romulin.com/ -Original Message- From: Sean LeBlanc [mailto:[EMAIL PROTECTED]] Sent: Monday, June 03, 2002 11:40 AM To: 'Tomcat Users List' Subject: RE: Tomcat is the best ?! -Original Message- From: Chris Wilson [mailto:[EMAIL PROTECTED]] Sent: Monday, June 03, 2002 6:28 AM To: 'Tomcat Users List' Subject: RE: Tomcat is the best ?! Walid, Take a look at Resin from www.caucho.com. I've found that it doesn't have as many spec. compliance issues as tomcat, is much faster to develop with (as it automatically reloads and compiles any servlet, jsp, and config changes), and is loads faster in raw performance. I really enjoyed working with Tomcat, but I think that once you try a quality, production grade server like Resin, you won't go back. snip I noticed Resin's web site has a link about clustering and such. Which makes me wonder - how are people doing this in Tomcat, if they are doing it all? Are there any whitepapers anywhere on the various ways of accomplishing this? Any experiences to share? -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: AW: Syntax error using mod_webapp
I just find out the problem. The server name is not set up. I forgot this detail. Thank you for the response, Regards, Lin. Make shure that ServerName is set before the webapp directives. -Ursprüngliche Nachricht- Von: Mauricio Tia Ni Gong Lin [mailto:[EMAIL PROTECTED]] Gesendet: Montag, 3. Juni 2002 17:43 An: [EMAIL PROTECTED] Betreff: Syntax error using mod_webapp Syntax error on line 986 of /usr/local/apache/conf/httpd.conf: Invalid virtual host name -- -- Note: line 986 is WebAppDeploy examplesconn /examples My httpd.conf is: LoadModule webapp_module libexec/mod_webapp.so AddModule mod_webapp.c IfModule mod_webapp.c WebAppConnection conn warp localhost:8008 WebAppDeploy examplesconn /examples WebAppInfo /webapp-info /IfModule -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: http 302 issue on tomcat 4.0.1
Do you set the filter using mod_ext_filter module? I think that filters could be the solution for my problem. My problem is: I have set the Directory Index to be index.jsp in my httpd.conf file. When a user tries to access http://www.mysite.com, user is redirected to http://www.mysite.com/index.jsp. However, if you hit the back button, it goes from http://www.mysite.com/index.jsp to http://www.mysite.com and then back to http://www.mysite.com/index.jsp Cheers Hari -Original Message- From: Ralph Einfeldt [mailto:[EMAIL PROTECTED]] Sent: Monday, June 03, 2002 11:45 AM To: Tomcat Users List Subject: AW: http 302 issue on tomcat 4.0.1 I think you can't configure tomcat to disable the feature directly. I see currently two places where you could tweak tomcat: - Modify tomcat source (that part that is responsible for the welcom-file) - Create a filter Either a input filter that forwards the requests to the page. Here you have to implement somthing to know whe you should redirect. Or use a outputfilter that throws away the result from tomcat if the result is a 302 to index.htm and includes the desired page. -Ursprüngliche Nachricht- Von: remy.menetrieux [mailto:[EMAIL PROTECTED]] Gesendet: Montag, 3. Juni 2002 17:27 An: [EMAIL PROTECTED]; [EMAIL PROTECTED] Betreff: http 302 issue on tomcat 4.0.1 When browsers request my url containing a filename, Tomcat does not internally redirect this request, it sends a HTTP 302 redirect. How can we configure and patch Tomcat to disable this feature ? -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] winmail.dat Description: application/ms-tnef -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Problem getting external libraries to load
I am running tomcat 3.3 on RedHat Linux 7.1. I have a web application and I am trying to use the MySQL JDBC Drivers. I have placed the mm.mysql-2.0.4-bin.jar file in numerous locations, but when I try and load the driver I get the ClassNotFound Error. I put the jar file in all of the following locations without success (I tried every combination of the jar file in all of the locations): -$TOMCAT_HOME/lib -$TOMCAT_HOME/lib/apps -$TOMCAT_HOME/lib/common -$TOMCAT_HOME/webapps/myjspapp/WEB-INF/lib -I expanded the jar file into $TOMCAT_HOME/webapps/myjspapp/WEB-INF/classes -I edited tomcat.sh and added the jar file to the classpath that tomcat uses when it starts up. This is becoming very frustrating and if anyone has a solution I would greatly appreciate it! -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: How to use setRequestedSessionId
On Mon, 3 Jun 2002, Subir Sengupta wrote: Date: Mon, 3 Jun 2002 00:24:33 -0700 From: Subir Sengupta [EMAIL PROTECTED] Reply-To: Tomcat Users List [EMAIL PROTECTED] To: '[EMAIL PROTECTED]' [EMAIL PROTECTED] Subject: How to use setRequestedSessionId Hi, I'm not sure how to do this and was hoping for some pointers. I have a filter that intercepts the session in the request. I then compare the Session Id to another value and based on some calculations either accept or reject the Session Id. Here's the question. How do I invalidate the session and assign my own Session Id to the request? Or have the request reuse an existing session object. setRequestedSessionId does not seem to be available from the filter, so I don't know how to change the session associated with the request. I wrote my own version of the Standard Manager, but the manager doesn't have access to the request, so I can't do it there. One of the uses for this is to not create a session everytime a particular page is hit by a monitoring system (every 5 seconds). Tomcat will create a new session every time, which is wasteful. If I could reuse the session in this case, that would be ideal. Would a HttpRequestWrapper work here and if so can anyone provide an example. I couldn't find any. I'm using Tomcat 4.03 on Linux. It sounds to me like you are approaching this problem from the wrong direction. Tomcat creates a session automatically in only two circumstances -- when you are using form-based login or the single sign-on facility. In all other cases, the application must ask for sessions to be created. My bet is that you are running into the fact that JSP pages ask for sessions to be created by default. This is simple to turn off -- just put the following at the top of the page your monitoring system is accessing: %@ page session=false % and making sure that you're not using form-based login or single sign-on for this webapp. If you really have your heart set on selectively creating the session or not, you're best off by creating a Filter that creates a wrapper around the request that overrides the getSession() methods. Your wrapper implementation can look at the request and decide whether or not to really create it -- if so, call super.getSession() and return the value, or otherwise just return null. (As an added bonus, this will work on any Servlet 2.3 container, because it does not involve modifying the container internals.) Thanks, Subir Craig McClanahan -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Problem getting tomcat 4.0.3 to run
I am trying to run tomcat 4.0.3 on RedHat Linux 7.1. I downloaded the binary distribution and unpacked it. When I try and run $CATALINA_HOME/bin/startup.sh, I get the message about the classpath that tomcat is using, but then nothing happens. When I run $CATALINA_HOME/bin/catalina.sh start, I get the same thing as before. If I run $CATALINA_HOME/bin/catalina.sh run, I get a segmentation fault error. Any ideas? -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
AW: http 302 issue on tomcat 4.0.1
I was thinking of servlet filters not apache 2.0 filters. http://www.javaworld.com/javaworld/jw-06-2001/jw-0622-filters.html -Ursprüngliche Nachricht- Von: Harippriya Sivapatham [mailto:[EMAIL PROTECTED]] Gesendet: Montag, 3. Juni 2002 18:10 An: 'Tomcat Users List' Betreff: RE: http 302 issue on tomcat 4.0.1 Do you set the filter using mod_ext_filter module? I think that filters could be the solution for my problem. My problem is: I have set the Directory Index to be index.jsp in my httpd.conf file. When a user tries to access http://www.mysite.com, user is redirected to http://www.mysite.com/index.jsp. However, if you hit the back button, it goes from http://www.mysite.com/index.jsp to http://www.mysite.com and then back to http://www.mysite.com/index.jsp Cheers Hari -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Syntax error using mod_webapp
IfModule mod_webapp.c WebAppConnection conn warp localhost:8008 WebAppDeploy examplesconn /examples/ /IfModule ^ Isn`t this necesary ? the trailing / ? - Original Message - From: Mauricio Tia Ni Gong Lin [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, June 03, 2002 11:42 AM Subject: Syntax error using mod_webapp Hi everybody, I configured the apache web server 1.3.24 integration with tomcat 4.0 (using mod_webapp) at my home and everything is doing well. I have been trying the same configuration at my job, but when I start the apache web server, the following message is displayed? --- [Mon Jun 3 11:37:09 2002] [warn] module mod_webapp.c is already added, skipping [Mon Jun 03 11:37:09 2002] 8365 (wa_main.c:77) WebApp Library initializing [Mon Jun 03 11:37:09 2002] 8365 (wa_main.c:81) Initializing APR [Mon Jun 03 11:37:09 2002] 8365 (pr_info.c:66) INFO provider initialized [Mon Jun 03 11:37:09 2002] 8365 (pr_warp.c:62) WARP provider initialized [Mon Jun 03 11:37:09 2002] 8365 (wa_main.c:101) WebApp Library initialized [Mon Jun 03 11:37:09 2002] 8365 (wa_config.c:167) Created connection conn (Prov: warp Param: localhost:8008) Syntax error on line 986 of /usr/local/apache/conf/httpd.conf: Invalid virtual host name Note: line 986 is WebAppDeploy examplesconn /examples My httpd.conf is: LoadModule webapp_module libexec/mod_webapp.so AddModule mod_webapp.c IfModule mod_webapp.c WebAppConnection conn warp localhost:8008 WebAppDeploy examplesconn /examples WebAppInfo /webapp-info /IfModule I NEED A HELP. Regards, Lin. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Help with Tomcat and IIS
The /jakarta/isapi_redirector.dll URI should never be forwarded to Tomcat. It occurrence indicates that the isapi_redirector.dll filter is being called more than once per request. In the past this error was most often accomplished on WinNT/Win2k systems by adding the filter via the Admin console and incorrectly adding it again via the Filter DLLs registry key. The Filter DLLs is for Win9x only. There have also been instances of the dll filter being added globally and to an individual web server causing it to be called twice. Cheers, Larry -Original Message- From: Robert A. Rogerson [mailto:[EMAIL PROTECTED]] Sent: Monday, June 03, 2002 11:55 AM To: [EMAIL PROTECTED] Subject: Help with Tomcat and IIS I installed Tomcat 4.0.3 and followed the How To directions for redirecting when using IIS. JSP pages are served correctly through Tomcat http://local host:8080/examples/jsp/dates/date.jsp but when I try and serve a simple jsp http://localhost/test.jsp where test.jsp is html head titleWelcome JSP/title /head body bgcolor=white h3 Welcome /h3 pb Today is %= new java.util.Date() %. Have a nice day! :-) /b/p /body /html I receive the error ...titleApache Tomcat/4.0.3 - Error report/title ...Apache Tomcat/4.0.3 - HTTP Status 404 - /jakarta/isapi_redirector.dll ...type/b Status report ...message/b u/jakarta/isapi_redirector.dll ...description/b uThe requested resource (/jakarta/isapi_redirector.dll) is not available. through IIS. I checked the authority to the /jakarta virtual directory and it does have Execute permission. Any ideas would be appreciated. Robert A. Rogerson Phone: 905-826-7761 Cell: 416-562-1039 Email:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Tomcat / JBoss / JNDI lookup not working - HELP!
I have seperate instances of Tomcat and JBoss running on the same machine. I'm trying to do a JNDI lookup of a JMS queue that's configured in JBoss from Tomcat but cannot get it to work. I can see the JNDI tree from the JBoss' JNDIView and all looks fine, here's a a snapshot of the Global JNDI Namespace: Global JNDI Namespace +- XAConnectionFactory (class: org.jboss.mq.SpyXAConnectionFactory) +- jmx:miller-dp:rmi (class: org.jboss.jmx.server.RMIConnectorImpl) +- TopicConnectionFactory[link - ConnectionFactory] (class: javax.naming.LinkRef) +- UserTransactionSessionFactory (class: org.jboss.tm.usertx.server.UserTransactionSessionFactoryImpl) +- RMIXAConnectionFactory (class: org.jboss.mq.SpyXAConnectionFactory) +- QueueConnectionFactory[link - ConnectionFactory] (class: javax.naming.LinkRef) +- topic (class: org.jnp.interfaces.NamingContext) | +- example (class: org.jboss.mq.SpyTopic) | +- testTopic (class: org.jboss.mq.SpyTopic) | +- bob (class: org.jboss.mq.SpyTopic) +- queue (class: org.jnp.interfaces.NamingContext) | +- D (class: org.jboss.mq.SpyQueue) | +- C (class: org.jboss.mq.SpyQueue) | +- loggingQueue (class: org.jboss.mq.SpyQueue) | +- B (class: org.jboss.mq.SpyQueue) | +- A (class: org.jboss.mq.SpyQueue) | +- controlQueue (class: org.jboss.mq.SpyQueue) | +- testQueue (class: org.jboss.mq.SpyQueue) | +- ex (class: org.jboss.mq.SpyQueue) | +- DLQ (class: org.jboss.mq.SpyQueue) | +- F (class: org.jboss.mq.SpyQueue) | +- E (class: org.jboss.mq.SpyQueue) +- ConnectionFactory (class: org.jboss.mq.SpyConnectionFactory) +- RMIConnectionFactory (class: org.jboss.mq.SpyConnectionFactory) +- UserTransaction (class: org.jboss.tm.usertx.client.ClientUserTransaction) +- jmx (class: org.jboss.jmx.server.JMXAdaptorImpl) +- servercollector (class: org.jboss.management.ServerDataCollector) +- UILXAConnectionFactory (class: org.jboss.mq.SpyXAConnectionFactory) +- UILConnectionFactory (class: org.jboss.mq.SpyConnectionFactory) I've copied the JNDI Properties to the tomcat/common/classes directory, and copied all the client JARS to the tomcat/classes/lib directory. Froma JSP running under Tomcat, I do a new InitialContext() and then do a lookup on QueueConnectionFactory I get: javax.servlet.ServletException: Name QueueConnectionFactory is not bound in this Context at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContex tImpl.java:463) at org.apache.jsp.test_0005fjndi$jsp._jspService(test_0005fjndi$jsp.java:17 3) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServle t.java:202) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:382) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:474) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) When i I do execute the following code: Hashtable env = ctx.getEnvironment(); Enumeration enum = env.keys(); System.out.println(displayEnv number of keys +env.size()); while (enum.hasMoreElements()) { String key = (String)enum.nextElement(); Object value = env.get(key); System.out.println(key+=+value); } I get: java.naming.factory.initial=org.apache.naming.java.javaURLContextFactory java.naming.provider.url=localhost:1099 java.naming.factory.url.pkgs=org.apache.naming:org.jboss.naming:org.jnp. interfaces What am I doing wrong??? I've been banging my head against a wall for three days over this. Does anyone have any clues??? Oh, btw, I tried changing the JBoss JNDI port to 1066, but it made no difference. Thanks. Andy Miller [EMAIL PROTECTED] HP Invent
RE: How to use setRequestedSessionId
Craig, Thanks for the clarification. I didn't realize that JSP was creating the sessions. I was blaming Tomcat! Could you point me at an example of a RequestWrapper. I couldn't find one anywhere. Thanks again, Subir -Original Message- From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]] Sent: Monday, June 03, 2002 9:10 AM To: Tomcat Users List Subject: Re: How to use setRequestedSessionId On Mon, 3 Jun 2002, Subir Sengupta wrote: Date: Mon, 3 Jun 2002 00:24:33 -0700 From: Subir Sengupta [EMAIL PROTECTED] Reply-To: Tomcat Users List [EMAIL PROTECTED] To: '[EMAIL PROTECTED]' [EMAIL PROTECTED] Subject: How to use setRequestedSessionId Hi, I'm not sure how to do this and was hoping for some pointers. I have a filter that intercepts the session in the request. I then compare the Session Id to another value and based on some calculations either accept or reject the Session Id. Here's the question. How do I invalidate the session and assign my own Session Id to the request? Or have the request reuse an existing session object. setRequestedSessionId does not seem to be available from the filter, so I don't know how to change the session associated with the request. I wrote my own version of the Standard Manager, but the manager doesn't have access to the request, so I can't do it there. One of the uses for this is to not create a session everytime a particular page is hit by a monitoring system (every 5 seconds). Tomcat will create a new session every time, which is wasteful. If I could reuse the session in this case, that would be ideal. Would a HttpRequestWrapper work here and if so can anyone provide an example. I couldn't find any. I'm using Tomcat 4.03 on Linux. It sounds to me like you are approaching this problem from the wrong direction. Tomcat creates a session automatically in only two circumstances -- when you are using form-based login or the single sign-on facility. In all other cases, the application must ask for sessions to be created. My bet is that you are running into the fact that JSP pages ask for sessions to be created by default. This is simple to turn off -- just put the following at the top of the page your monitoring system is accessing: %@ page session=false % and making sure that you're not using form-based login or single sign-on for this webapp. If you really have your heart set on selectively creating the session or not, you're best off by creating a Filter that creates a wrapper around the request that overrides the getSession() methods. Your wrapper implementation can look at the request and decide whether or not to really create it -- if so, call super.getSession() and return the value, or otherwise just return null. (As an added bonus, this will work on any Servlet 2.3 container, because it does not involve modifying the container internals.) Thanks, Subir Craig McClanahan -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: request.getReader() hanging
Can you reproduce it? Does it utilize the whole available CPU? Rossen -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Friday, May 31, 2002 1:21 PM To: [EMAIL PROTECTED] Subject: request.getReader() hanging hi all recently upgraded, or attempted to upgrade, to tomcat 4.0.3, but have hit a brick wall.i had a servlet with the following code snippet running perfectly fine in 3.2.3 but it's not having any of it with tomcat 4.0.3 BufferedReader br = request.getReader(); String line = null; StringBuffer envelope = new StringBuffer(); while ((line = br.readLine()) != null) { envelope.append(line); } br.close(); I'm basically sending through a stream of xml data and trying to read it in the servlet's post method. What happens is when it gets to the readLine() method above, it just hangs forever. Trying to read just one character with a simple read() produces the same behaviour. I've checked the request.content-length and it indicates the data is there. No exceptions are thrown or anything. I'm not reading any parameters from the request object beforehand either. Running Apache 1.3, Tomcat 4.0.3, Solaris 8, with mod_jk I've read and adhered to the Servlet API Specification, version 2.2, section 5.1, as a previous post about a similar problem suggested, but still no joy please help cheers ** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify [EMAIL PROTECTED] This footnote also confirms that this email message has been swept by MIMEsweeper for the presence of computer viruses. ** -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
AW: How to use setRequestedSessionId
Have a look at: http://www.mail-archive.com/tomcat-user@jakarta.apache.org/msg41615.html -Ursprüngliche Nachricht- Von: Subir Sengupta [mailto:[EMAIL PROTECTED]] Gesendet: Montag, 3. Juni 2002 18:37 An: 'Tomcat Users List' Betreff: RE: How to use setRequestedSessionId Could you point me at an example of a RequestWrapper. I couldn't find one anywhere. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
server.xml
Can someone send a complete server.xml with just the bits for mod_jk using apache and virtual host. Since I've noticed you need to add some listener tags for ApacheConfig which isnt documented in the server.xml. thanks -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Tomcat / JBoss / JNDI lookup not working - HELP!
On Mon, 3 Jun 2002 11:48:14 -0500 Miller, Andy [EMAIL PROTECTED] wrote: I have seperate instances of Tomcat and JBoss running on the same machine. I'm trying to do a JNDI lookup of a JMS queue that's configured in JBoss from Tomcat but cannot get it to work. I have not taken the time to fully analyze your problem, but I have had similar problems with JNDI lookups JBoss 3.0 / Tomcat 4.0. What I had to do, was to set the initial factory as a System property before creating the InitialContext for the first time, like this: System.setProperty(java.naming.factory.initial, org.jnp.interfaces.NamingContextFactory); Good luck! Yours, Haakon Hansen, Norway -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Classes in JAR File found, but unpacked Classes not found
Hi Folks, I'm using Apache Tomcat 4.0.3 and JSE 1.4.0 and Windows NT 4.0 Service Pack 5 I'm setting up a JDBC Realm with an Oracle 9i Database. As the Driver I use oracle.jdbc.driver.OracleDriver wich are distributet by Oracle in the classes12.zip File. If I unpack the driver file to $CATALINA_HOME$\common\classes Tomcat doesn't find it. Catalina.start: LifecycleException: Exception opening database connection: java.sql.SQLException: oracle.jdbc.driver.OracleDriver LifecycleException: Exception opening database connection: java.sql.SQLException: oracle.jdbc.driver.OracleDriver at org.apache.catalina.realm.JDBCRealm.start(JDBCRealm.java:615) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1108) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:343) . If I wrap the packages up in a jar file and place ist like: $CATALINA_HOME$\common\lib\classes12.jar then Tomcat finds it. I always thought that the classes dirs were for the unpacked class files and the lib dirs for the classes in jar files. But elsewise equivalent. Is the behaviour, that I discover a bug or is it a feature? Did I misconfiguere something? Where should I look next? The Realm is configuered this way: Realm className=org.apache.catalina.realm.JDBCRealm debug=99 driverName=oracle.jdbc.driver.OracleDriver connectionName=X connectionPassword=X connectionURL=jdbc:oracle:thin:X:X userTable=Benutzer userNameCol=Name userCredCol=Passwort userRoleTable=Benutzer roleNameCol=Rolle / Thanks a lot in advance, Martin
RE: Tomcat / JBoss / JNDI lookup not working - HELP!
That was all it took! Thanks a million! -Original Message- From: Håkon Hansen [mailto:[EMAIL PROTECTED]] Sent: Monday, June 03, 2002 11:23 AM To: Tomcat Users List Subject: Re: Tomcat / JBoss / JNDI lookup not working - HELP! On Mon, 3 Jun 2002 11:48:14 -0500 Miller, Andy [EMAIL PROTECTED] wrote: I have seperate instances of Tomcat and JBoss running on the same machine. I'm trying to do a JNDI lookup of a JMS queue that's configured in JBoss from Tomcat but cannot get it to work. I have not taken the time to fully analyze your problem, but I have had similar problems with JNDI lookups JBoss 3.0 / Tomcat 4.0. What I had to do, was to set the initial factory as a System property before creating the InitialContext for the first time, like this: System.setProperty(java.naming.factory.initial, org.jnp.interfaces.NamingContextFactory); Good luck! Yours, Haakon Hansen, Norway -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
mod_jk - apache2
Can someone check out http://www.rapit.net/mod_jk.so it has been build for apache 2.x on redhat linux and tomcat 4.0.3 . Make sure it is working fine ??? -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Tomcat / JBoss / JNDI lookup not working - HELP!
On Mon, 3 Jun 2002 12:32:11 -0500 Miller, Andy [EMAIL PROTECTED] wrote: You are very welcome :-) Yours, Haakon Hansen, Norway -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: server.xml
Have a look in the Tomcat documentation, the listeners tags are documented there (under Administrators - Config.Ref/Connectors - AJP) -Original Message- From: Ron [mailto:[EMAIL PROTECTED]] Sent: Sunday, May 05, 2002 1:05 PM To: Tomcat Users List Subject: server.xml Can someone send a complete server.xml with just the bits for mod_jk using apache and virtual host. Since I've noticed you need to add some listener tags for ApacheConfig which isnt documented in the server.xml. thanks -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: AW: How to use setRequestedSessionId
On Mon, 3 Jun 2002, Ralph Einfeldt wrote: Date: Mon, 3 Jun 2002 19:03:46 +0200 From: Ralph Einfeldt [EMAIL PROTECTED] Reply-To: Tomcat Users List [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Subject: AW: How to use setRequestedSessionId Have a look at: http://www.mail-archive.com/tomcat-user@jakarta.apache.org/msg41615.html Ralph, thanks for pointing people to the archives :-). There is lots of good stuff there. This one, happens to be a ResponseWrapper -- the principles of writing a request wrapper are really similar. The outline of a conditionally create the session filter might be lke this: public class MyFilter implements Filter { public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { HttpServletRequestWrapper wrapper = new MyWrapper((HttpServletRequest) request; chain.doFilter(wrapper, response); } } and the corresponding wrapper class would look like: public class MyWrapper extends HttpServletRequestWrapper { public HttpSession getSession() { if (ok to create session) { return super.getSession(); } else { return (null); } public HttpSession getSession(boolean create) { if (ok to create session) { return super.getSession(create); } else { return (null); } } } All of the rest of the HttpServletRequest methods get delegated through to the original request -- you only need to override the stuff you want to customize. The wrapper instance is ultimately passed on to your servlet or JSP page, which doesn't necessarily know that the wrapping took place. Filters and wrappers are very cool -- it's worth your time learning how to use them. One source of information is the tutorial on web applications that is availavle with the Java Web Services Developer Pack (http://java.sun.com/webservices/), which includes Tomcat 4 as its server. Useful homework exercise - write a Filter and request wrapper that add a new request parameter to the request, under certain conditions. Craig -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
http 302 issue on tomcat 4.0.1
Hello, When browsers request my url containing a filename, Tomcat does not internally redirect this request, it sends a HTTP 302 redirect. How can we configure and patch Tomcat to disable this feature ? Thx for any help. Here is what we get : GET / HTTP/1.0 host: www.SiteName.com HTTP/1.1 302 Moved Temporarily Content-Type: text/html Date: Tue, 28 May 2002 10:34:13 GMT Location: http://www.SiteName.com/index.htm Server: Apache Tomcat/4.0.1 (HTTP/1.1 Connector) Connection: close htmlheadtitleApache Tomcat/4.0.1 - Error report/titleSTYLE!--H1{font-family : sans-serif,Arial,Tahoma;color : white;background-color : #0086b2;} BODY{font-family : sans-serif,Arial,Tahoma;color : black;background-color : white;} B{color : white;background-color : #0086b2;} HR{color : #0086b2;} --/STYLE /headbodyh1Apache Tomcat/4.0.1 - HTTP Status 302 - Moved Temporarily/h1HR size=1 noshadepbtype/b Status report/ppbmessage/b uMoved Temporarily/u/ppbdescription/b uThe requested resource (Moved Temporarily) has moved temporarily to a new location./u/pHR size=1 noshade/body/html
RE: AW: How to use setRequestedSessionId
Craig, Thanks for this example. It's very very useful. I did search for request wrappers but didn't find anything. There were some postings yesterday from people looking for RequestWrapper examples. I'll point them to this posting. I'll take a look at the tutorial and do the homework. Thanks again, Subir -Original Message- From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]] Sent: Monday, June 03, 2002 11:23 AM To: Tomcat Users List Subject: Re: AW: How to use setRequestedSessionId On Mon, 3 Jun 2002, Ralph Einfeldt wrote: Date: Mon, 3 Jun 2002 19:03:46 +0200 From: Ralph Einfeldt [EMAIL PROTECTED] Reply-To: Tomcat Users List [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Subject: AW: How to use setRequestedSessionId Have a look at: http://www.mail-archive.com/tomcat-user@jakarta.apache.org/msg41615.html Ralph, thanks for pointing people to the archives :-). There is lots of good stuff there. This one, happens to be a ResponseWrapper -- the principles of writing a request wrapper are really similar. The outline of a conditionally create the session filter might be lke this: public class MyFilter implements Filter { public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { HttpServletRequestWrapper wrapper = new MyWrapper((HttpServletRequest) request; chain.doFilter(wrapper, response); } } and the corresponding wrapper class would look like: public class MyWrapper extends HttpServletRequestWrapper { public HttpSession getSession() { if (ok to create session) { return super.getSession(); } else { return (null); } public HttpSession getSession(boolean create) { if (ok to create session) { return super.getSession(create); } else { return (null); } } } All of the rest of the HttpServletRequest methods get delegated through to the original request -- you only need to override the stuff you want to customize. The wrapper instance is ultimately passed on to your servlet or JSP page, which doesn't necessarily know that the wrapping took place. Filters and wrappers are very cool -- it's worth your time learning how to use them. One source of information is the tutorial on web applications that is availavle with the Java Web Services Developer Pack (http://java.sun.com/webservices/), which includes Tomcat 4 as its server. Useful homework exercise - write a Filter and request wrapper that add a new request parameter to the request, under certain conditions. Craig -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: RequestWrappers
Hi, Craig answered one of my questions and posted an example of a RequestWrapper. Here it is http://www.mail-archive.com/tomcat-user%40jakarta.apache.org/msg55350.html Subir -Original Message- From: Cox, Charlie [mailto:[EMAIL PROTECTED]] Sent: Monday, June 03, 2002 4:48 AM To: 'Tomcat Users List' Subject: RE: RequestWrappers here is an example posted by Craig to wrap the response(in a filter), but you can see how to wrap the request from this example. http://www.mail-archive.com/tomcat-user@jakarta.apache.org/msg41615.html Charlie -Original Message- From: Joe Tomcat [mailto:[EMAIL PROTECTED]] Sent: Sunday, June 02, 2002 10:36 PM To: Tomcat Users List Subject: Re: RequestWrappers On Sunday 02 June 2002 16:41, you wrote: does anyone have any experience with making custom RequestWrappers with Catalina? I keep finding that my custom RequestWrapper is being wrapped by a catalina RequestWrapper -- making mine useless. Has anyone had this problem and solved it? There seems to be very little documentation or tutorials about this subject. I think it's in the more esoteric section of things. I would like to know, too. I tried to use a request wrapper but I couldn't get it to work correctly so I gave up. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: RequestWrappers
thanks all, I will take a look Subir Sengupta writes: Hi, Craig answered one of my questions and posted an example of a RequestWrapper. Here it is http://www.mail-archive.com/tomcat-user%40jakarta.apache.org/msg55350.html Subir -Original Message- From: Cox, Charlie [mailto:[EMAIL PROTECTED]] Sent: Monday, June 03, 2002 4:48 AM To: 'Tomcat Users List' Subject: RE: RequestWrappers here is an example posted by Craig to wrap the response(in a filter), but you can see how to wrap the request from this example. http://www.mail-archive.com/tomcat-user@jakarta.apache.org/msg41615.html Charlie -Original Message- From: Joe Tomcat [mailto:[EMAIL PROTECTED]] Sent: Sunday, June 02, 2002 10:36 PM To: Tomcat Users List Subject: Re: RequestWrappers On Sunday 02 June 2002 16:41, you wrote: does anyone have any experience with making custom RequestWrappers with Catalina? I keep finding that my custom RequestWrapper is being wrapped by a catalina RequestWrapper -- making mine useless. Has anyone had this problem and solved it? There seems to be very little documentation or tutorials about this subject. I think it's in the more esoteric section of things. I would like to know, too. I tried to use a request wrapper but I couldn't get it to work correctly so I gave up. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Problem with parameters
Hi, I'm new to Tomcat and urgent I've to set up an application. I find that Tomcat 4.0.3 have problem during parsing parameters example: http://myurl?access=name1redir=../another_urlkey2=value2 After parsing: access=name1, redir=null I find RequestUtil.parseParameters(Map map, byte[] data, String encoding) lies Debugging shows: key=access value=name1 key=redir key=../another_urlkey2 value=value2 I don't know what about standarts but probably change = to % and its hex code could help or parsing request.getQueryString() myself (but the app isn't mine, is quite big and I'd like to avoid this solutution). What do you advice me ? I checked others servers like Tomcat 3.2.1 and Resin and they works ok I need stable, fast and at this moment freeware server Arek -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
WARP Connector and Contexts
I am trying to setup tomcat 4.0.3 and Apache 1.3.24 such that I can forward all requests coming to Apache for http://www.virttest2.com to tomcat for all web applications inside the webapps folder I do not want to use multiple WebAppDeploy directives in my Apache httpd.conf. Now the problem is that if i use a WebAppDeploy . conn / then the files inside webapps/ROOT are the only ones being served. I also want the webapps/examples to also be served when a person goes to http://www.virttest2.com/examples . In my current setup all requests to http://www.virttest2.com/examples shows an error Apache Tomcat/4.0.3 - HTTP Status 404 - /examples/jsp/. I want to do this without adding a WebAppDeploy examples conn /examples in my httpd.conf . i.e i donot want to add a WebAppDeploy for every Web Application that is auto deployed for that particular host. Is there a way i can do this? I have included the following in my httpd.conf: # Load the module LoadModule webapp_module libexec/mod_webapp.so AddModule mod_webapp.c VirtualHost 192.168.1.93 DocumentRoot /domains/www.virttest2.com/web ServerName www.virttest2.com WebAppConnection conn_www.virttest2.com_http warp localhost:8011 WebAppDeploy . conn_www.virttest2.com_http / /VirtualHost My server.xml has the below settings: !-- The Server JVM -- Server port=8010 shutdown=SHUTDOWN debug=0 !-- Define an Apache-Connector Service for unsecured-- Service name=Domain-Private-HTTP !-- the connector for non-https traffic -- Connector className = org.apache.catalina.connector.warp.WarpConnector port=8011 minProcessors=2 maxProcessors=10 scheme=http secure=false enableLookups=true appBase=webapps acceptCount=10 debug=0/ !-- The WarpEngine in action -- Engine className = org.apache.catalina.connector.warp.WarpEngine name=Domain-Private-HTTP debug=0 Logger className = org.apache.catalina.logger.FileLogger prefix=private_http_log. suffix=.txt timestamp=true/ Realm className = org.apache.catalina.realm.MemoryRealm / !-- Define the virtual hosts in use -- Host className = org.apache.catalina.connector.warp.WarpHost name=virttest2.com debug=0 appBase=webapps unpackWARs=true Context path= docBase=ROOT debug=0/ /Host /Engine /Service /Server Warm Regards, Divyank Turakhia
Re: WARP Connector and Contexts
Unfortunately without WebAppDeploy statements, Apache won't know which requests to forward to Tomcat. Not atleast without modifications to the mod_webapp module itself. They are crucial for Apache/Tomcat working together. Or you could use Tomcat standalone. RS Divyank Turakhia [EMAIL PROTECTED] on 06/03/2002 03:05:29 PM Please respond to Tomcat Users List [EMAIL PROTECTED] To:'Tomcat Users List' [EMAIL PROTECTED] cc: Subject:WARP Connector and Contexts I am trying to setup tomcat 4.0.3 and Apache 1.3.24 such that I can forward all requests coming to Apache for http://www.virttest2.com to tomcat for all web applications inside the webapps folder I do not want to use multiple WebAppDeploy directives in my Apache httpd.conf. Now the problem is that if i use a WebAppDeploy . conn / then the files inside webapps/ROOT are the only ones being served. I also want the webapps/examples to also be served when a person goes to http://www.virttest2.com/examples . In my current setup all requests to http://www.virttest2.com/examples shows an error Apache Tomcat/4.0.3 - HTTP Status 404 - /examples/jsp/. I want to do this without adding a WebAppDeploy examples conn /examples in my httpd.conf . i.e i donot want to add a WebAppDeploy for every Web Application that is auto deployed for that particular host. Is there a way i can do this? I have included the following in my httpd.conf: # Load the module LoadModule webapp_module libexec/mod_webapp.so AddModule mod_webapp.c VirtualHost 192.168.1.93 DocumentRoot /domains/www.virttest2.com/web ServerName www.virttest2.com WebAppConnection conn_www.virttest2.com_http warp localhost:8011 WebAppDeploy . conn_www.virttest2.com_http / /VirtualHost My server.xml has the below settings: !-- The Server JVM -- Server port=8010 shutdown=SHUTDOWN debug=0 !-- Define an Apache-Connector Service for unsecured-- Service name=Domain-Private-HTTP !-- the connector for non-https traffic -- Connector className = org.apache.catalina.connector.warp.WarpConnector port=8011 minProcessors=2 maxProcessors=10 scheme=http secure=false enableLookups=true appBase=webapps acceptCount=10 debug=0/ !-- The WarpEngine in action -- Engine className = org.apache.catalina.connector.warp.WarpEngine name=Domain-Private-HTTP debug=0 Logger className = org.apache.catalina.logger.FileLogger prefix=private_http_log. suffix=.txt timestamp=true/ Realm className = org.apache.catalina.realm.MemoryRealm / !-- Define the virtual hosts in use -- Host className = org.apache.catalina.connector.warp.WarpHost name=virttest2.com debug=0 appBase=webapps unpackWARs=true Context path= docBase=ROOT debug=0/ /Host /Engine /Service /Server Warm Regards, Divyank Turakhia -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Any way to tell how many sessions exist?
You can use javax.sevlet.http.HttpSessionListener for this purpose. Dennis. -Original Message- From: Rick Mann [mailto:[EMAIL PROTECTED]] Sent: maandag 3 juni 2002 13:20 To: tomcat user jakarta.apache.org Subject: Any way to tell how many sessions exist? I wanted to write a JSP to display server stats. I was hoping to be able to get all the sessions, show how many there were, what their ages were, etc. But it appears that access to the collection of sessions has been deprecated from the Servlet 2.3 API. Is there a way to get at this info, preferrably in a container-independent manner? I will settle for a Tomcat-specific solution. TIA, -- Rick -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
jdbcpool
I'm using the commons-pool, commons-dbcp to connect to mysql from tomcat 4. Everything works fine when I develop but if I leave the site unattened for a period of time, mysql times out the connections in the pool. I'd really like to set the maxIdle parameter to 0 so that if there are idle connections they leave the pool. Basically setting the min pool size to 0 is what I want to do. I haven't seen a minPoolSize parameter though. The documentation says if I set maxIdle to 0 that means unlimited. That won't work I guess. Is there a solution to this problem? Thanks Dennis -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Q: Ldap/Jndi Realm under tomcat 3.3.1 ???
Hello, I'm trying to configure tomcat in such a way that it uses LDAP for authentication of users... So far without any luck... The tomcat documentation doesn't help me very much neither does the mail archive or google... The documents I found are either about version 3.2.x or 4.0x, but the methods used for those versions don't apply to 3.3.1 Can anyone tell me how to configure tomcat 3.3.1 with LDAP authentication ? greetz, Milo -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
JSP page is working for intranet not for internet
We have a chat system installed. The jsp is working perfectly from intranet. However, we can not make it run from outside intranet. Anybody has any clue about this? Configuration problem? Thanks, Ron -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Help with Tomcat and IIS
Hi Larry. I checked my registry (NT4 SP6) and the only reference to islapi_rediector.dll is under HKEY_LOCAL_MACHINE/SOFTWARE/Apache Software Foundation/Jakarta Isapi Redirector/1.0/extension_uri=/jakarta/isapi_redirector.dll. I did notice in other docs that the redirector should only be entered for Filter DLLs for Win98. Could I be confused and the extension_uri=/jakarta/isapi_redictor.dll should not exist? Thanks, Rob -Original Message- From: Larry Isaacs [mailto:[EMAIL PROTECTED]] Sent: Monday, June 03, 2002 11:31 AM To: Tomcat Users List Subject: RE: Help with Tomcat and IIS The /jakarta/isapi_redirector.dll URI should never be forwarded to Tomcat. It occurrence indicates that the isapi_redirector.dll filter is being called more than once per request. In the past this error was most often accomplished on WinNT/Win2k systems by adding the filter via the Admin console and incorrectly adding it again via the Filter DLLs registry key. The Filter DLLs is for Win9x only. There have also been instances of the dll filter being added globally and to an individual web server causing it to be called twice. Cheers, Larry -Original Message- From: Robert A. Rogerson [mailto:[EMAIL PROTECTED]] Sent: Monday, June 03, 2002 11:55 AM To: [EMAIL PROTECTED] Subject: Help with Tomcat and IIS I installed Tomcat 4.0.3 and followed the How To directions for redirecting when using IIS. JSP pages are served correctly through Tomcat http://local host:8080/examples/jsp/dates/date.jsp but when I try and serve a simple jsp http://localhost/test.jsp where test.jsp is html head titleWelcome JSP/title /head body bgcolor=white h3 Welcome /h3 pb Today is %= new java.util.Date() %. Have a nice day! :-) /b/p /body /html I receive the error ...titleApache Tomcat/4.0.3 - Error report/title ...Apache Tomcat/4.0.3 - HTTP Status 404 - /jakarta/isapi_redirector.dll ...type/b Status report ...message/b u/jakarta/isapi_redirector.dll ...description/b uThe requested resource (/jakarta/isapi_redirector.dll) is not available. through IIS. I checked the authority to the /jakarta virtual directory and it does have Execute permission. Any ideas would be appreciated. Robert A. Rogerson Phone: 905-826-7761 Cell: 416-562-1039 Email:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Any way to tell how many sessions exist?
Excellent suggestions to all. Thank you. I should have remembered the session listener. I got tripped up on the session attribute listener. Thanks! -- Rick -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Any way to tell how many sessions exist?
This is a good way to cut straight to it, but this is more expensive and less portable than HttpSessionListener or HttpSessionBindingListener solutions. If you want container independent I would go with HttpSessionBindingListeners as they seem to be supported best across containers. cheers fillup On 6/3/02 2:39 PM, Subir Sengupta [EMAIL PROTECTED] wrote: Standard Manager has a findSessions() method, which will return an array of all session in the Hashtable. -Original Message- From: Rick Mann [mailto:[EMAIL PROTECTED]] Sent: Monday, June 03, 2002 4:20 AM To: tomcat user jakarta.apache.org Subject: Any way to tell how many sessions exist? I wanted to write a JSP to display server stats. I was hoping to be able to get all the sessions, show how many there were, what their ages were, etc. But it appears that access to the collection of sessions has been deprecated from the Servlet 2.3 API. Is there a way to get at this info, preferrably in a container-independent manner? I will settle for a Tomcat-specific solution. TIA, -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: prohibit stopping tomcat by generic user
On Linux, I assume? You didn't say. And you are probably running with an apache connector? type ls -l /path/to/tomcat tell us what's there. If you already know all about permissions, etc., then I would look at man su specifically the -c flag. fillup On 6/3/02 4:18 PM, Leland Chen [EMAIL PROTECTED] wrote: Hi, I have tomcat web server configured run as nobody, but it can be stoped by any generic user using shutdown.sh script. Even the CATALINA_BASE is not set correctly, tomcat web server can be shutdown by any user account. Is there any way to prohibit this ? Thanks, Leland htmlDIVnbsp;/DIV/html _ Join the world -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Does Tomcat want to stand alone?
Hi, I've been playing with tomcat a little bit, I like JSP, and it does that well, but when it comes to operating on it's own as a web server, I have been a bit frustrated. I don't seem to be able to find mechanisms in Tomcat that support things like URL rewriting or content negotiation. Granted that content negotiation can be acheived with java code, and I suspect one could also write java to do something that aproximated rewriting, but these are standard features of most web servers, and I am wondering if this functionality exists and I am not finding it within tomcat, or if there are implementations of this functionality available somewhere. It seems silly to have to write this sort of thing that is standard on other servers. If not, is this something Tomcat is working towards? I'm fond of metaphors, so let me ask it another way: Is Tomcat destined to be as independant as it's namesake, or is it really a housecat that will always be found sitting in the window at 1 httpd way? Gus
Re: Apache-Tomcat and VirtualHosts, second try
You can also rewrite *.jsp to /jsp/*.jsp Then use ProxyPass and ProxyPassReverse to serv up any /jsp/ from a local tomcat instance. That avoids connectors entirely. - Original Message - From: Nikola Milutinovic [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Monday, June 03, 2002 8:25 AM Subject: Re: Apache-Tomcat and VirtualHosts, second try Nikola, Thanks for the virtualHost file it has helped a great deal. Glad to have helped. One more question. I've had this working on 3.x using ContextManager but is it still possible on tomcat 4.x eg. http://www.blablah.com:8080/index.jspwhich serves up a jsp page however I need this to be done on apache (2.x) http://www.blablah.com/index.jsp Apache deals with the image files and tomcat deals with jsp/servlets. I;ve used a root context for each virtual host before but is it possible in 4.x ?? For separating Active from Static content, you'll need either mod_jk or mod_jk2, since mod_webapp serves the entire webapp context. And you'll also need Ant to deploy it, if you have separate document trees in Tomcat and Apache (a good choice). Nix. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
MAC OS 10/Tomcat 4.0.1 problem with JARs
I have a jar file that contains properties that my servlet reads in via ResourceBundle. I have put my jar file under $CATALINA_HOME/lib, $CATALINA_HOME/common/lib, $CATALINA/webapps/app/WEB-INF/lib, ./classes, etc.. and it still can't find my jar file. I have 4.0.3 on my XP machine and have it working with it under common/lib. I have it found on a Solaris box under ./lib on a 3.2.x version of Tomcat. Any pointers on where I can put this on MAC OS X? Thanks, Kathy __ Do You Yahoo!? Yahoo! - Official partner of 2002 FIFA World Cup http://fifaworldcup.yahoo.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Does Tomcat want to stand alone?
response.encodeUrl for url rewriting methinks I almost invariably use Tomcat as a standalone server, for your average website where you might use something like php or whatever, but you want a more robust application design, it's fine. Content negotiation is a pit I have not stepped into, maybe someone else can speak more to that. fillup On 6/3/02 5:29 PM, Gus Heck [EMAIL PROTECTED] wrote: Hi, I've been playing with tomcat a little bit, I like JSP, and it does that well, but when it comes to operating on it's own as a web server, I have been a bit frustrated. I don't seem to be able to find mechanisms in Tomcat that support things like URL rewriting or content negotiation. Granted that content negotiation can be acheived with java code, and I suspect one could also write java to do something that aproximated rewriting, but these are standard features of most web servers, and I am wondering if this functionality exists and I am not finding it within tomcat, or if there are implementations of this functionality available somewhere. It seems silly to have to write this sort of thing that is standard on other servers. If not, is this something Tomcat is working towards? I'm fond of metaphors, so let me ask it another way: Is Tomcat destined to be as independant as it's namesake, or is it really a housecat that will always be found sitting in the window at 1 httpd way? Gus -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Converting an Applet to gif, jpg to load into servlet
Hi All, Does anyone know how to convert a simple applet (AWT) to gif, jpg file. Our main goal is to run the applet in the background (server side) and load the respective images into a servlet/JSP page. We have had some success with this but for some unknown reason much of the color in the applet like background is lost and we get a gif, jpg file with all the text but a black background. Any thoughts on this subject would be greatly appreciated. Regards, George Shafik
Re: Does Tomcat want to stand alone?
But this is within the servlet/jsp page, not the config file. unless I misunderstand you. there is no response until a page has been settled on for processing right? This means to redirect a request I would have to have a phantom page that tomcat decided to serv that then redirected to the real page. One of the top features of redirection is to have the user ask for one thing, and not need it to exist physically on the file system. Of course I may be entirely missing something here :) Actually I expect that I am missing something which is why I have asked tomcat users :) Gus - Original Message - From: Phillip Morelock [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Monday, June 03, 2002 8:35 PM Subject: Re: Does Tomcat want to stand alone? response.encodeUrl for url rewriting methinks I almost invariably use Tomcat as a standalone server, for your average website where you might use something like php or whatever, but you want a more robust application design, it's fine. Content negotiation is a pit I have not stepped into, maybe someone else can speak more to that. fillup On 6/3/02 5:29 PM, Gus Heck [EMAIL PROTECTED] wrote: Hi, I've been playing with tomcat a little bit, I like JSP, and it does that well, but when it comes to operating on it's own as a web server, I have been a bit frustrated. I don't seem to be able to find mechanisms in Tomcat that support things like URL rewriting or content negotiation. Granted that content negotiation can be acheived with java code, and I suspect one could also write java to do something that aproximated rewriting, but these are standard features of most web servers, and I am wondering if this functionality exists and I am not finding it within tomcat, or if there are implementations of this functionality available somewhere. It seems silly to have to write this sort of thing that is standard on other servers. If not, is this something Tomcat is working towards? I'm fond of metaphors, so let me ask it another way: Is Tomcat destined to be as independant as it's namesake, or is it really a housecat that will always be found sitting in the window at 1 httpd way? Gus -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Does Tomcat want to stand alone?
But this is within the servlet/jsp page, not the config file. unless I misunderstand you. there is no response until a page has been settled on for processing right? This means to redirect a request I would have to have a phantom page that tomcat decided to serv that then redirected to the real page. One of the top features of redirection is to have the user ask for one thing, and not need it to exist physically on the file system. Of course I may be entirely missing something here :) You are :) First, look into frameworks like struts. They do exactly what you're talking about. (Struts is another jakarta project). Second, get creative with your servlet mappings: check out the servlet specification for what's allowed in a servlet mapping. The thing about the servlet / jsp specifications, they are really supposed to be broad bases that are highly portable and highly flexible, at the expense of some of the convenience features of an environment like ASP or PHP. Struts uses this paradigm: *.do or *.action or whatever file extension. Struts catches all requests for *.do and dynamically instantiates appropriate developer-defined handlers for these actions. It's very cool. Second, even with struts or without it, I've written very simple servlets (like 50 lines) that essentially are mini-dispatchers -- they load-on-startup and read a flat file of forwarding dispatches. That way you can forward any request like: fandango/* to a particular servlet and from that servlet you can check out the url and see where you want to dispatch it (this is very easy -- but again, struts does this all automagically and securely for you). I don't remember the exact details of every servlet-mapping rule, but the spec is usually very helpful in that. I also have some friends at a very high-profile entertainment company who use WebLogic (off topic...) and they use the Struts framework in that environment for an extremely high-traffic, high-security, yadda yadda deployment that has exactly the kinds of flexibility requirements you're asking for. Struts is written to the servlet spec, so it's almost invariably portable. You might not know about the request dispatcher object too. javax.servlet.http.RequestDispatcher -- or maybe it's javax.servlet.RequestDispatcher. This has a forward method that allows you to internally forward a request on the server to another servlet or jsp. In fact this is how my apps work -- servlets take all user input, and do all the processing / database work / error-intensive / security-conscious tasks, etc. -- and then forward the request to a simple display-only jsp (after putting items into the request scope hashtable). This is kind of the right way to do things, although there are obviously a million shades of gray. I can forward to A.jsp if condition A is satisfied, or B.jsp otherwise, etc. Does this help? cheers fillup On 6/3/02 6:17 PM, Gus Heck [EMAIL PROTECTED] wrote: But this is within the servlet/jsp page, not the config file. unless I misunderstand you. there is no response until a page has been settled on for processing right? This means to redirect a request I would have to have a phantom page that tomcat decided to serv that then redirected to the real page. One of the top features of redirection is to have the user ask for one thing, and not need it to exist physically on the file system. Of course I may be entirely missing something here :) Actually I expect that I am missing something which is why I have asked tomcat users :) Gus - Original Message - From: Phillip Morelock [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Monday, June 03, 2002 8:35 PM Subject: Re: Does Tomcat want to stand alone? response.encodeUrl for url rewriting methinks I almost invariably use Tomcat as a standalone server, for your average website where you might use something like php or whatever, but you want a more robust application design, it's fine. Content negotiation is a pit I have not stepped into, maybe someone else can speak more to that. fillup On 6/3/02 5:29 PM, Gus Heck [EMAIL PROTECTED] wrote: Hi, I've been playing with tomcat a little bit, I like JSP, and it does that well, but when it comes to operating on it's own as a web server, I have been a bit frustrated. I don't seem to be able to find mechanisms in Tomcat that support things like URL rewriting or content negotiation. Granted that content negotiation can be acheived with java code, and I suspect one could also write java to do something that aproximated rewriting, but these are standard features of most web servers, and I am wondering if this functionality exists and I am not finding it within tomcat, or if there are implementations of this functionality available somewhere. It seems silly to have to write this sort of thing that is standard on other servers. If not, is this something Tomcat is working towards?
Detect Cookie Rejection
Does anyone know of a way to detect when cookies are not accepted by a browser. My site uses session cookies and I'd like to be able to redirect people somewhere to tell them that the site requires cookies and what to do to activate them... I'm sure that someone else has already solved this problem. Any ideas? Cavan Morris -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: New Apache 2.0 / Tomcat 4.0.3 Windows Setup Guide
Looking forward to the linux version! I need to set them up on RedHat 7.2/7.3 Setting up Apache 2.0/Tomcat 4.0.3 has been one of those low priority tasks I have at work for a new project. I guess the interesting part for me has been mod_jk, mod_jk2, mod_webapp etc ie joining to Tomcat. Getting the right versions, compiling the source .. documenting it for the next person. Do mod_jk and mod_webapp serve the same purpose? Someone asked my why do I need Apache, why not use Tomcat alone. I am familiar with the security and configuration of Apache, need to use SSL, mixed context of html, perl, servlets and jsp. That is as good as my answer gets. I wonder if anyone would suggest Tomcat standalone who has been there done that. They sure did not teach this stuff at university :) Cheers Martin On Tue, 4 Jun 2002 13:49, you wrote: I've just published my updated setup guide for Apache 2.0 and Tomcat 4.0.3 on Windows. Interested parties may find it here: http://sitepoint.com/article.php/305 It covers everything from obtaining and installing a working version of mod_jk to setting up Tomcat as a Windows service without using any 3rd party software. I also plan to publish a Linux version of this setup guide within a week. Feedback is welcome! -Kevin Yank Technical Content Director, SitePoint.com -- Martin Shears BS(MathsCompSci)| Email: [EMAIL PROTECTED] Chariot NetConnect | Web: http://www.chariot.net.au/ Technical Services Group | Phone (+61): 08 8359 2955 6/63 Pirie St ADELAIDE S.Aust | Fax(+61): 08 8359 3413 You are reminded that this e-mail and its attachments are subject to Chariot Internet Limited's legal disclaimer located at http://www.chariot.net.au/disclaimer.htm. You are encouraged to read it carefully to be aware of risks involved in electronic communication. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: New Apache 2.0 / Tomcat 4.0.3 Windows Setup Guide
Yes, mod_jk and mod_webapp serve the same purpose. At the moment, however, the only connector that works with Apache 2.x on Windows is mod_jk, and the only connector that works in Apache 2.x on Linux is mod_webapp. Strange state of affairs. :-P As for Apache/Tomcat versus Tomcat standalone, yes -- the configurability, flexibility, expandability, scaleability, and security of Apache are the main reasons to stick with Apache as your primary server. When it comes down to it, Tomcat is still just a REFERENCE IMPLEMENTATION of the Java Servlets/JSP specification. ___ Kevin Yank Technical Content Director SitePoint.com - Master the Web! e: [EMAIL PROTECTED] w: www.sitepoint.com ___ -Original Message- From: Martin Shears [mailto:[EMAIL PROTECTED]] Sent: June 4, 2002 12:51 AM To: Tomcat Users List Subject: Re: New Apache 2.0 / Tomcat 4.0.3 Windows Setup Guide Looking forward to the linux version! I need to set them up on RedHat 7.2/7.3 Setting up Apache 2.0/Tomcat 4.0.3 has been one of those low priority tasks I have at work for a new project. I guess the interesting part for me has been mod_jk, mod_jk2, mod_webapp etc ie joining to Tomcat. Getting the right versions, compiling the source .. documenting it for the next person. Do mod_jk and mod_webapp serve the same purpose? Someone asked my why do I need Apache, why not use Tomcat alone. I am familiar with the security and configuration of Apache, need to use SSL, mixed context of html, perl, servlets and jsp. That is as good as my answer gets. I wonder if anyone would suggest Tomcat standalone who has been there done that. They sure did not teach this stuff at university :) Cheers Martin On Tue, 4 Jun 2002 13:49, you wrote: I've just published my updated setup guide for Apache 2.0 and Tomcat 4.0.3 on Windows. Interested parties may find it here: http://sitepoint.com/article.php/305 It covers everything from obtaining and installing a working version of mod_jk to setting up Tomcat as a Windows service without using any 3rd party software. I also plan to publish a Linux version of this setup guide within a week. Feedback is welcome! -Kevin Yank Technical Content Director, SitePoint.com -- Martin Shears BS(MathsCompSci)| Email: [EMAIL PROTECTED] Chariot NetConnect | Web: http://www.chariot.net.au/ Technical Services Group | Phone (+61): 08 8359 2955 6/63 Pirie St ADELAIDE S.Aust | Fax(+61): 08 8359 3413 You are reminded that this e-mail and its attachments are subject to Chariot Internet Limited's legal disclaimer located at http://www.chariot.net.au/disclaimer.htm. You are encouraged to read it carefully to be aware of risks involved in electronic communication. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Detect Cookie Rejection
in the olden days, the days before tomcat, when servlets were just a twinkle in Bill Joy's eye, when I walked uphill to school 5 miles in the snow, we used to: 1. Make a page that uses a meta refresh to another page. The session needs to have been created here. 2. Use the url rewriting mechanism to generate the url for the meta refresh. In jsp, it's response.encodeUrl i think. look that up. 3. In this page, because it came via url rewriting, you'll still have the session, so you'll know who it is, and then you read the cookies raw from the request. See if the session came in. you may not have to do all that or you might do something else. I think I learned this trick at a now-defunct dotcom I worked at during the gold rush, on ASP with NT4. cheers fillup On 6/3/02 9:42 PM, Cavan Morris [EMAIL PROTECTED] wrote: Does anyone know of a way to detect when cookies are not accepted by a browser. My site uses session cookies and I'd like to be able to redirect people somewhere to tell them that the site requires cookies and what to do to activate them... I'm sure that someone else has already solved this problem. Any ideas? Cavan Morris -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Detect Cookie Rejection
Have you thought about using JavaScript for this? My copy of the Rhinoceros book is at home, but I know you can read write cookies: what happens if you try this with cookies disabled I don't know, but I imagine you should be able to detect the condition easily. (E.g try to set cookie foo to bar then read value back). Cheers, Simon -Original Message- From: Cavan Morris [mailto:[EMAIL PROTECTED]] Sent: Tuesday, 4 June 2002 2:42 PM To: [EMAIL PROTECTED] Subject: Detect Cookie Rejection Does anyone know of a way to detect when cookies are not accepted by a browser. My site uses session cookies and I'd like to be able to redirect people somewhere to tell them that the site requires cookies and what to do to activate them... I'm sure that someone else has already solved this problem. Any ideas? Cavan Morris -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Detect Cookie Rejection
what if they have cookies and javascript disabled? with one comes the other, often. fillup On 6/3/02 10:04 PM, Simon Crase [EMAIL PROTECTED] wrote: Have you thought about using JavaScript for this? My copy of the Rhinoceros book is at home, but I know you can read write cookies: what happens if you try this with cookies disabled I don't know, but I imagine you should be able to detect the condition easily. (E.g try to set cookie foo to bar then read value back). Cheers, Simon -Original Message- From: Cavan Morris [mailto:[EMAIL PROTECTED]] Sent: Tuesday, 4 June 2002 2:42 PM To: [EMAIL PROTECTED] Subject: Detect Cookie Rejection Does anyone know of a way to detect when cookies are not accepted by a browser. My site uses session cookies and I'd like to be able to redirect people somewhere to tell them that the site requires cookies and what to do to activate them... I'm sure that someone else has already solved this problem. Any ideas? Cavan Morris -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Detect Cookie Rejection
Does anyone know of a way to detect when cookies are not accepted by a browser. My site uses session cookies and I'd like to be able to redirect people somewhere to tell them that the site requires cookies and what to do to activate them... If a request comes in with one of your pages as it's referer, but no cookie, then the browser probably doesn't support cookies, or your cookie expired in the interval. Of course, some browsers can be configured to omit the referer header, and I guess some don't support it at all. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: New Apache 2.0 / Tomcat 4.0.3 Windows Setup Guide
aha that explains why I could not get mod_jk to work! On Tue, 4 Jun 2002 14:28, you wrote: Yes, mod_jk and mod_webapp serve the same purpose. At the moment, however, the only connector that works with Apache 2.x on Windows is mod_jk, and the only connector that works in Apache 2.x on Linux is mod_webapp. Strange state of affairs. :-P As for Apache/Tomcat versus Tomcat standalone, yes -- the configurability, flexibility, expandability, scaleability, and security of Apache are the main reasons to stick with Apache as your primary server. When it comes down to it, Tomcat is still just a REFERENCE IMPLEMENTATION of the Java Servlets/JSP specification. ___ Kevin Yank Technical Content Director SitePoint.com - Master the Web! e: [EMAIL PROTECTED] w: www.sitepoint.com ___ -Original Message- From: Martin Shears [mailto:[EMAIL PROTECTED]] Sent: June 4, 2002 12:51 AM To: Tomcat Users List Subject: Re: New Apache 2.0 / Tomcat 4.0.3 Windows Setup Guide Looking forward to the linux version! I need to set them up on RedHat 7.2/7.3 Setting up Apache 2.0/Tomcat 4.0.3 has been one of those low priority tasks I have at work for a new project. I guess the interesting part for me has been mod_jk, mod_jk2, mod_webapp etc ie joining to Tomcat. Getting the right versions, compiling the source .. documenting it for the next person. Do mod_jk and mod_webapp serve the same purpose? Someone asked my why do I need Apache, why not use Tomcat alone. I am familiar with the security and configuration of Apache, need to use SSL, mixed context of html, perl, servlets and jsp. That is as good as my answer gets. I wonder if anyone would suggest Tomcat standalone who has been there done that. They sure did not teach this stuff at university :) Cheers Martin On Tue, 4 Jun 2002 13:49, you wrote: I've just published my updated setup guide for Apache 2.0 and Tomcat 4.0.3 on Windows. Interested parties may find it here: http://sitepoint.com/article.php/305 It covers everything from obtaining and installing a working version of mod_jk to setting up Tomcat as a Windows service without using any 3rd party software. I also plan to publish a Linux version of this setup guide within a week. Feedback is welcome! -Kevin Yank Technical Content Director, SitePoint.com -- Martin Shears BS(MathsCompSci)| Email: [EMAIL PROTECTED] Chariot NetConnect | Web: http://www.chariot.net.au/ Technical Services Group | Phone (+61): 08 8359 2955 6/63 Pirie St ADELAIDE S.Aust | Fax(+61): 08 8359 3413 You are reminded that this e-mail and its attachments are subject to Chariot Internet Limited's legal disclaimer located at http://www.chariot.net.au/disclaimer.htm. You are encouraged to read it carefully to be aware of risks involved in electronic communication. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Out of Memory Error - plz help
hello friends, I get this wierd error Out of Memory --- No Stack Trace. Actually i have a form that a student fills up attaches his mark statement (scanned image) and photograph. The form is received properly on the server but then the server goes down any time - giving the output as Out of Memory Error - No Stack Trace in catalina.out file. Any ideas, plz help Regards = # Lalit Nagpal # __ Do You Yahoo!? Yahoo! - Official partner of 2002 FIFA World Cup http://fifaworldcup.yahoo.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Detect Cookie Rejection
First page of application can contain some HTML warning them that they need both JavaScript cookies. You have an onLoad that triggers function to check for cookies then redirect to your first real page. Then if JavaScript or cookies disabled, they don't get directed and see your message instead. Cheers, Simon -Original Message- From: Phillip Morelock [mailto:[EMAIL PROTECTED]] Sent: Tuesday, 4 June 2002 3:11 PM To: Tomcat Users List Subject: Re: Detect Cookie Rejection what if they have cookies and javascript disabled? with one comes the other, often. fillup On 6/3/02 10:04 PM, Simon Crase [EMAIL PROTECTED] wrote: Have you thought about using JavaScript for this? My copy of the Rhinoceros book is at home, but I know you can read write cookies: what happens if you try this with cookies disabled I don't know, but I imagine you should be able to detect the condition easily. (E.g try to set cookie foo to bar then read value back). Cheers, Simon -Original Message- From: Cavan Morris [mailto:[EMAIL PROTECTED]] Sent: Tuesday, 4 June 2002 2:42 PM To: [EMAIL PROTECTED] Subject: Detect Cookie Rejection Does anyone know of a way to detect when cookies are not accepted by a browser. My site uses session cookies and I'd like to be able to redirect people somewhere to tell them that the site requires cookies and what to do to activate them... I'm sure that someone else has already solved this problem. Any ideas? Cavan Morris -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Detect Cookie Rejection
On Mon, 3 Jun 2002, Cavan Morris wrote: Date: Mon, 3 Jun 2002 21:42:01 -0700 From: Cavan Morris [EMAIL PROTECTED] Reply-To: Tomcat Users List [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: Detect Cookie Rejection Does anyone know of a way to detect when cookies are not accepted by a browser. My site uses session cookies and I'd like to be able to redirect people somewhere to tell them that the site requires cookies and what to do to activate them... I'm sure that someone else has already solved this problem. Any ideas? The only way to know for sure is to set a cookie on a response, and see if it comes back on the following request. You have absolutely no clue from looking just at the current request. Just as an example, I run Netscape 6, configured to warn me every time about accepting a cookie -- so you can't even look at the User-Agent header and predict whether *I* am going to accept your cookie or not. This is exactly what the servlet container does for you for session IDs, as long as you use URL rewriting (done with the response.encodeURL() method) to create all of your hyperlinks. The container will send the initial session id both ways (encoded in the URLs, and as a cookie). If the session id comes back later as a cookie, the container recognizes this and stops doing the rewriting -- otherwise it continues. But the only safe thing for your application to do is *always* call encodeURL() to generate all of your hyperlink destinations that should be part of the same session. Cavan Morris Craig -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]