Clustering
Hello I am looking at running a cluster of Tomcat servers running on separate machine behind a cluster of web servers. I need the same session information stored and to be available across all instances of Tomcat - I can't guarantee that requests from the same client will end up at the same instance of Tomcat. So here are my potential solutions. I'd really appreciate people's comments on the stability/usability of each, please ? 1. Use the Persistent Manager component, provided by Tomcat itself, with a JDBC based store. This looks great until I read that the implementation is considered experimental. What are people's experiences with this and how long will it be before this is considered stable ? 2. Write my own Filter which goes to the database and restores session stuff information for a client every time. 3. Use JavaGroups (http://www.filip.net/tomcat/tomcat-javagroups-article.html). Looks great but there is a single point of failure - what happens if the JavaGroups component goes down ? Does anyone have any experience with this ? What is reliability and performance like ? Thanks Chris - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
mod_jk config problems
Hello I am trying to configure mod_jk to link Apache to Tomcat which I have done before with TC 3 and 4.0. I am trying to do it with 4.1.18/Apache 1.3. There is no sample workers.properties file with 4.1.18 - is this deliberate ? Anyway, I made my own but I can't get my requests through ! The mod_jk log is saying this: [Tue Jan 28 16:15:31 2003] [jk_ajp_common.c (1245)]: ERROR: can't resolve tomcat address locahost [Tue Jan 28 16:15:31 2003] [jk_ajp_common.c (1247)]: ERROR: invalid host and port locahost 8009 [Tue Jan 28 16:15:31 2003] [jk_worker.c (174)]: wc_create_worker validate failed for worker1 [Tue Jan 28 16:15:31 2003] [jk_worker.c (244)]: build_worker_map failed to create workerworker1 So something is happening with the workers - looks like a failure to resolve to localhost on port 8009. Can't think why that wouldn't work. Any ideas out there ? We are on Apache 1.3 so I am not keen on using jk2 - this seems to demand recompilation of Apache 1.3. Is that correct ? Apache also complained about JkLogStampFormat in the mod_jk.conf file. This directive is given on one of the sample pages. Anyone know why ? I downloaded and installed mod_jk-1.3 and jk_jnicb.so to my shared library directory. from http://jakarta.apache.org/builds/jakarta-tomcat-connectors/jk/release/v1.2.2/bin/linux/i386/ Thanks Chris -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: RE: mod_jk config problems
Check the logs...it is looking for locahost, not localhost. Note the missing l. Ouch. I had just spotted it after sending the email - I altered it to use my hostname instead and realised that worked. In my defence, the mistake is on the online documentation, although I should have read it properly ! I copied/pasted from http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jk2/jk/workershowto.html#A sample worker.properties I suppose that should be fixed. Chris Check the logs...it is looking for locahost, not localhost. Note the missing l. Here's the minimum required workers.properties file: # BEGIN workers.properties # Definition for Ajp13 worker worker.list=ajp13 worker.ajp13.port=8009 worker.ajp13.host=localhost worker.ajp13.type=ajp13 # END workers.properties John -Original Message- From: Chris Faulkner [mailto:[EMAIL PROTECTED]] Sent: Tuesday, January 28, 2003 11:21 AM To: Tomcat Users List Subject: mod_jk config problems Hello I am trying to configure mod_jk to link Apache to Tomcat which I have done before with TC 3 and 4.0. I am trying to do it with 4.1.18/Apache 1.3. There is no sample workers.properties file with 4.1.18 - is this deliberate ? Anyway, I made my own but I can't get my requests through ! The mod_jk log is saying this: [Tue Jan 28 16:15:31 2003] [jk_ajp_common.c (1245)]: ERROR: can't resolve tomcat address locahost [Tue Jan 28 16:15:31 2003] [jk_ajp_common.c (1247)]: ERROR: invalid host and port locahost 8009 [Tue Jan 28 16:15:31 2003] [jk_worker.c (174)]: wc_create_worker validate failed for worker1 [Tue Jan 28 16:15:31 2003] [jk_worker.c (244)]: build_worker_map failed to create workerworker1 So something is happening with the workers - looks like a failure to resolve to localhost on port 8009. Can't think why that wouldn't work. Any ideas out there ? We are on Apache 1.3 so I am not keen on using jk2 - this seems to demand recompilation of Apache 1.3. Is that correct ? Apache also complained about JkLogStampFormat in the mod_jk.conf file. This directive is given on one of the sample pages. Anyone know why ? I downloaded and installed mod_jk-1.3 and jk_jnicb.so to my shared library directory. from http://jakarta.apache.org/builds/jakarta-tomcat-connectors/jk/release/v1.2.2 /bin/linux/i386/ Thanks Chris -- 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]
j_security_check and login
Hello all I've been using JBoss and Tomcat for a while and have started to move what we have in JBoss/Tomcat to a Tomcat only environment. It is all OK so far. We have a login mehanism wich uses the JDBCRealm stuff. Usernames/pwds/roles are stored in the database. I have protected a set of pages and it all works, I can login via j_security_check and get to my protected pages. So that is fine and I understand the mechanism. However, we have a servlet which was called immediately after the j_security_check which performed some site-specific stuff (eg setting a cookie, logging the login attempt, etc). This was the code that we used in JBoss, this was called instead of j_security_check upon login. This worked in JBOss but not in Tomcat. String path=/context/ourLoginServlet; response.setStatus(302,Found); response.setHeader(Location, path); String rdString = new String(/j_security_check?j_username=+request.getParameter(j_username) +j_password=+request.getParameter(j_password)+); RequestDispatcher rd = application.getRequestDispatcher(rdString); rd.include(request,response); if (!response.isCommitted()) { response.reset(); } You can see what is happening, we create a RequestDispatcher object which called j_security_check which is included in the reponse. I know this is not ideal because as a GET request, it puts the username/pwd in the access log. So, I'd like to know why this fails in Tomcat. Given that Tomcat was our servlet container in JBOss, it may be be some config thing. I'd also like to do it better. Essentially, I could do it by changing that the page that Tomcat redirects to after a successful login. I could set that page to ourLoginServlet. Is there anyway of doing that transparently? I saw an email in the archives that gave this % session.setAttribute(tomcat.auth.originalLocation, /ourLoginServlet); %. I thought I could put that in my login.jsp page and that after j_secutiy_check, we'd get our login servlet called. However, this doesn't seem to change the first page you get sent to after j_security_check. Any idea why not or what the setting should be ? I also tried a filter on j_secutiy_check but for some reason, POSTS to j_security_check don't show up in teh access log so I can't set up a filter on it. Any idea what ? Thanks so much for any help or comments. Chris -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: R: JDBC Connection
Its not that it doesn't accept ZIP files, just that it doesn't look for them by default. The reason that Tomcat doesn't pick up anything other than jars is that it loops all *.jar files in its lib directory and adds them to the CLASSPATH before starting java. I needed to get a zip file onto the classpath so I edited the startup script so that it also looped .zip files. It worked fine. Chris Faulkner AFAIK Tomcat4 doesn't accept ZIPped class archives, but only JARred ones. So, if you use a .zip JDBC driver archive, you should unzip it and either put unzipped classes in classes dir, or archive them in a .jar archive. Regards Alessio -Messaggio originale- Da: Juan [mailto:[EMAIL PROTECTED]] Inviato: mercoledì 19 giugno 2002 12.24 A: [EMAIL PROTECTED] Oggetto: JDBC Connection Hello, I'm trying to connecting with MySQL, but I'm getting the following error: javax.servlet.ServletException: No suitable driver at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImp l.java:457) at org.apache.jsp.index$jsp._jspService(index$jsp.java:805) ... The JDBC driver is at the classpath, and I'm able to connect using a standard Java application. But with Tomcat I'm getting an error. Am I missing anything? Thanks in advance, Juan José Velázquez Garcia Web Development www.htmlspider.com.br -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] - Disclaimer - This email and any attachments thereto may contain information which is confidential and/or protected by intellectual property rights and are intended for the sole use of the recipient(s) named above. Any use of the information contained herein (including, but not limited to, total or partial reproduction, communication or distribution in any form) or the taking of any action in reliance on the contents, by persons other than the designated recipient(s) is strictly prohibited. If you have received this email in error, please notify the sender either by telephone or by email and delete the material from any computer. Thank you for your cooperation. -- 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: Resolution to JNDI DataSource=null problem
HI Thanks for the notes about the JNDI datasource=null problem I've got this working on my system, although only with mod_jk and not mod_webapp. I want to get the pooling going so the paragraph below is helpful. What I;d also like to know is where and how you specify the pool parameters, for the Tyrex ConnectionPool. I am familiar with JBOSS where you can specify parameters regarding the pool (eg max no. of connections, how long to keep open, etc). Is the same possible with Tyrex and Tomcat ? Or does anyone have sample config about how to do this with OracleConnectionPoolDataSource ? Thanks Chris Then I started getting connections, and threw a small party to celebrate. They weren't pooling properly, and I found some notes on the net about that as well. Instead of getting a datasource from the contect: DataSource ds = (DataSource)envCtx.lookup(jdbc/datafoo); Connection c = ds.getConnection(); To get a connection from a pool with Tyrex, one does this: ConnectionPoolDataSource pds = (ConnectionPoolDataSource)envCtx.lookup(jdbc/datafoo); PooledConnection ds = pds.getPooledConnection(); Connection c = ds.getConnection(); Hopefully my experiences here will be of help to others by way of searching the list :) Nick -- The aptly-named morons.org is an obscenity-laced screed... -- Robert P. Lockwood, Catholic League director of research Nick Johnson, version 2.0 http://www.spatula.net/ -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: context variable in web.xml does not work in tomcat 4
HI I also had this problem. I moved the variables to the top of my web.xml and it worked. Honest. It seems that TC 4 is fussy about the order of the entries. Chris -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: Adobe Acrobat
Have a look at fop, also part of the Apache project. You can embed it into your JSP/servlet code. http://xml.apache.org/fop/ Chris Hi: How do I render my html pages to pdf for printing. My servelet generated html table is too wide and columns get cut off if I print directly using the print icon on the browser... Thanks -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: Starting server during boot with access to X-Windows
Hi Have you tried Xvfb which is a virtual frame buffer ? I have a Tomcat app which also needs access to X for drawing. We simply start an Xvfb instance on a virtual display (:1.0,:2.0, etc) and then use that. We have an xvfb script in init.d for starting which essentially does this. /usr/X11R6/bin/Xvfb :1.0 -screen 0 1280x1024x24 -shmem # Starts a virtual 24 bit device on :1.0 and upon shutdown kill -TERM `cat /tmp/.X1-lock` Xvfb comes shipped with most ofthe Linux distros and is also available if you look around for Solaris and HP-UX. Chris Hi, I have the following problem: we want to start tomcat during boot time. The servlets can produce some charts thus the server needs access to X-Windows (thus the server needs permission to do that). I do know how to start the server during boot but how can it be assured that it will have access to X-Windows? Zsolt -- Zsolt Koppany -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
database connect to db overr mod_webapp - possible bug
Hi I have a JSP which,when called direct into Tomcat (4.0.1) on Linux works fine. It connects to a database, retrieves results, fine. http://host_a:8080/ism/JSP/file.jsp?param1=valueparam2=value host_a is a vrtual host defined in my apache config and in the DNS servers on our LAN. In the virtual host setting of Apache, I have WebAppConnection coni warp localhost:8008 WebAppDeploy ism coni/ism/ Static pages,servlets and JSP are fine across mod_webapp. However, when I try my database JSP, I get errors. This code is in the JSP when I go through 8080 and it WORKS, it connects to the DB and all goes OK. So my configuration of the jdbc/IsmDB must be OK. I created the JDBC datasources as outlined at the Tomcat website. Context initCtx = new InitialContext(); Context envCtx = (Context) initCtx.lookup(java:comp/env); javax.sql.DataSource ds = (javax.sql.DataSource)envCtx.lookup(jdbc/IsmDB); Connection conn = ds.getConnection(); However, when I connect to the page via Apache, the third line fails the connection to the database fails. I replace those 4 lines with the following and it works. String sConn = jdbc:oracle:thin:@ip:port:sid; // connnection string DriverManager.registerDriver( new oracle.jdbc.driver.OracleDriver() ); Connection conn=DriverManager.getConnection( sConn, user, password ); Statement stmt= conn.createStatement(); So have I missed some configuration to make the database connection work over mod_webapp or is this a bug ? Thanks Chris -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: RE: database connect to db overr mod_webapp - possible bug
Hi can we see the errors? Wow - fast response. Thank-you. Iactually just noticed that someone else found the exact same thing. He got no replies. http://groups.google.com/groups?q=mod_webapp+JDBChl=enselm=7774774d.0109191826.5240aa0%40posting.google.comrnum=1 On the web page,I see this; java.lang.NullPointerException at org.apache.jsp.ism$jsp._jspService(ism$jsp.java:123) 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(JspServlet.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) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:201) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2344) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566) at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:163) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.connector.warp.WarpRequestHandler.handle(WarpRequestHandler.java:215) at org.apache.catalina.connector.warp.WarpConnection.run(WarpConnection.java:194) at java.lang.Thread.run(Thread.java:484) The errors in the apache log file in $CATALINA_HOME/logs are as follows: 2002-02-12 13:10:16 StandardWrapperValve[jsp]: Servlet.service() for servlet jsp threw exception java.lang.NullPointerException at org.apache.jsp.ismResult_0005fn$jsp._jspService(ismResult_0005fn$jsp. java:124) 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(JspSer vlet.java:202) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:3 82) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:474) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl icationFilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF ilterChain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV alve.java:243) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline .java:566) Thanks Chris -Original Message- From: Chris Faulkner [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 12, 2002 7:26 AM To: Tomcat Users List Subject: database connect to db overr mod_webapp - possible bug Hi I have a JSP which,when called direct into Tomcat (4.0.1) on Linux works fine. It connects to a database, retrieves results, fine. http://host_a:8080/ism/JSP/file.jsp?param1=valueparam2=value host_a is a vrtual host defined in my apache config and in the DNS servers on our LAN. In the virtual host setting of Apache, I have WebAppConnection coni warp localhost:8008 WebAppDeploy ism coni
Re: AW: RE: database connect to db overr mod_webapp - possible bug
Hi Its the third line - I commented them all out and put them in one by one. javax.sql.DataSource ds = (javax.sql.DataSource)envCtx.lookup(jdbc/IsmDB); Chris Can you tell us which of the 4 lines causes the NPE ? (Have a look at the genrated source in the work direectory line 123) -Ursprüngliche Nachricht- Von: Chris Faulkner [mailto:[EMAIL PROTECTED]] Gesendet: Dienstag, 12. Februar 2002 14:40 An: Tomcat Users List Betreff: Re: RE: database connect to db overr mod_webapp - possible bug snip/ -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
rewrite in Tomcat over 8080
Hello again Does anyone know how to do a rewrite in Tomcat ? I have set up rewrites in Apache- is there an equivalent that will work to redirect requests sent into Tomcat on 8080 ? Thanks Chris Faulkner -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: AW: AW: RE: database connect to db overr mod_webapp - possible bug
Hi Thanks for the help and the URL may well help. However, I can't tell from it which bits of the configuration are supposed to go where in the mod_webbapp Connector setup. Am I supposed to put the resource or resource-ref in the Connector set-up ?!! I've sort of reached the point now where I've had enough of mod_webapp. You only have to look at this list for a day or two to see how many queries it raises. I wonder whether the comments and recommendations on the website to use mod_webapp are borne out of a desire to get it tested or out of a genuine belief that it is actually better. I'm going to use ajp13 for a while. Chris So the lookup in the second line that fails and return a null. Context envCtx = (Context) initCtx.lookup(java:comp/env); I'm currently not using JNI but I remembered a post some time ago. May be this helps: http://mikal.org/interests/java/tomcat/archive/view?mesg=45843 -Ursprüngliche Nachricht- Von: Chris Faulkner [mailto:[EMAIL PROTECTED]] Gesendet: Dienstag, 12. Februar 2002 14:57 An: Tomcat Users List Betreff: Re: AW: RE: database connect to db overr mod_webapp - possible bug Hi Its the third line - I commented them all out and put them in one by one. javax.sql.DataSource ds = (javax.sql.DataSource)envCtx.lookup(jdbc/IsmDB); -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Mod_Webapp
Hi I have an app which Iam upgrading from Tomcat 3 to 4, implementing mod_webapp. Whereas I used to have http://server/dir where dir lived on Apache were it contained all static html, gifs and also as a context /dir on Tomcat where I put my JSP and servlets. So I would only mount the following on ajp12. JkMount /ism/*.jsp ajp12 JkMount /ism/servlet/* ajp12 As far as Ican see, with mod_webapp, you have to mount the whole of /ism/, thereby forcing all static content into Tomcat. Is there any way around this ? The release notes say that mod_webapp fowards *all requests uunder the specified context path to Tomcat for processing. When Tomcat 4.0 final is released, it will automatically configure itself to serve static resources from Apache... Having read that 4.0.1 was production quality, I thought that it was a formal release of version 4. What is Tomcat 4.0 final as opposed to production quality, released 4.0.1? This feels like a shortcoming in mod_webapp and the way that things are mounted with mod_webapp. I have posted and seen questions asking whether you can mount /*.jsp in mod_webapp but never seen a satisfactory respose or solution. Thanks Chris Kevin HaleBoyes a écrit : This may seem long but I wanted to include anything I thought was relevant. CATALINA_HOME=/usr/local/jakarta/jakarta-tomcat-4.0.2-b2 JAVA_HOME=/usr/java/jdk1.3.1_02 I added a new Host entry to server.xml for my new website. This is the only change I made to the stock server.xml. Host name=192.168.0.52 debug=0 appBase=webapps unpackWARs=true Realm className=org.apache.catalina.realm.MemoryRealm / Valve className=org.apache.catalina.valves.AccessLogValve directory=logs prefix=192.168.0.52_access_log. suffix=.txt pattern=common/ Logger className=org.apache.catalina.logger.FileLogger prefix=192.168.0.52_log. suffix=.txt timestamp=true/ Context path=/manager docBase=manager debug=0 privileged=true/ Context path= docBase=NewWebsite debug=0 reloadable=true Logger className=org.apache.catalina.logger.FileLogger prefix=NewWebsite_log. suffix=.txt timestamp=true/ /Context /Host This works great. When I point my browser at http://192.168.0.52:8080/ I get my home page and the JSP/servlet stuff works as expected. Like so many other, the next step is to set up the Warp connector so that I can front Tomcat with Apache. I changed the stock httpd.conf (RedHat 7.2 i386) by adding a new VirtualHost section to correspond to NewWebsite above. I installed mod_webapp.so from the downloaded webapp-module-1.0.2-tc402 archive. NameVirtualHost 192.168.0.52 LoadModule webapp_module modules/mod_webapp.so WebAppConnection warpConnection warp 192.168.0.52:8008 WebAppDeploy examples warpConnection /examples/ VirtualHost 192.168.0.52 ServerName 192.168.0.52 WebAppDeploy NewWebsite warpConnection / /VirtualHost The address 192.168.0.52 will eventually become a properly DNS-registered name www.NewWebsite.com (names and ip addresses may have been changed to protect the guilty). The intention is to have any request for http://192.168.0.52/ be redirected by mod_webapp to the NewWebsite Tomcat context. But that is not what happens. Instead, the browser sits as if it is loading something that never comes and there are no messages in any of the apache tomcat log files on the server. Not even an access log entry. On startup of httpd I get the following message in the httpd error log. [Thu Jan 31 12:49:58 2002] [warn] Loaded DSO modules/mod_webapp.so uses plain Apache 1.3 API, this module might crash under EAPI! (please recompile it with -DEAPI) [Thu Jan 31 12:49:59 2002] [notice] Apache/1.3.20 (Unix) (Red-Hat/Linux) mod_python/2.7.6 Python/1.5.2 mod_ssl/2.8.4 OpenSSL/0.9.6b DAV/1.0.2 PHP/4.0.6 mod_perl/1.24_01 mod_throttle/3.1.2 configured -- resuming normal operations [Thu Jan 31 12:49:59 2002] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec) [Thu Jan 31 12:53:08 2002] [error] Connection warpConnection cannot connect [Thu Jan 31 12:53:08 2002] [error] Cannot open connection warpConnection [Thu Jan 31 12:53:08 2002] [error] Connection warpConnection cannot connect [Thu Jan 31 12:53:08 2002] [error] Cannot open connection warpConnection [Thu Jan 31 12:53:08 2002] [error] Connection warpConnection cannot connect [Thu Jan 31 12:53:08 2002] [error] Cannot open connection warpConnection [Thu Jan 31 12:53:08 2002] [error] Connection warpConnection cannot connect [Thu Jan 31 12:53:08 2002] [error] Cannot open connection warpConnection [Thu Jan 31 12:53:08 2002] [error] Connection warpConnection cannot connect [Thu Jan 31 12:53:08 2002] [error] Cannot open connection warpConnection [Thu Jan 31 12:53:08 2002] [error] Connection warpConnection cannot connect
Re: Free Load Testing Tool
Hi I use siege which under some kind of Linux GPL and is at : http://www.joedog.org/siege/index.shtml It's a command-line based, multi-user, multi-threaded tool which means that you aren't simulating the same client using the same session. JMeter, from my experience with it, doesn't do that. Its easy to configure, you can create the usual .rc files in your home directory so you can keep running new tests without respecifying or even re-loading configurations. I've used some of the other GUI tools in the past, such as JMeter but siege is best, IMO. From the web site, it needs Unix fork() so it doesn't work on Windows. Oh well. Chris Hi, Can anyone please let me know some Load Testing Tools, to test a JSP application, which are there for Free. Also their reliability (if possible) as compared to Webload as 10. Thanks, Sumit. The information contained in this e-mail and any files transmitted with it may be privileged and confidential. If the reader of this message, regardless of the address or routing, is not an intended recipient, you are hereby notified that you have received this transmittal in error and any review, use, distribution, dissemination or copying is strictly prohibited. If you have received this message in error, please delete this e-mail and all files transmitted with it from your system and notify the sender by reply e-mail or by calling 1-888-338-6076. -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
jdk processes
Hello We've been running Apache 1.3.12 and Tomcat (3.2.3 and 4.0.1), to service servlet content. We are using Sun's JDK 1.3.0_02 on Linux (RedHat). We are finding that the site runs reasonably well but we see that the number of JDK processes rises over a period of time and when it reaches over 120, it tends to lock up Apache - at which point we have to restart the whole site. On Tomcat 3.2.3, we used the AJP12 connector and used the parameters for the minimum and maximum spare servers - all to no effect. With Tomcat 4.0.1, we are using the mod_webapp connector but I'm not sure whether there are similar parameters, the page at http://jakarta.apache.org/tomcat/tomcat-4.0-doc/config/warp.html isn't finished.Can anyone tell me whether there are similar parameters ? The site gets about 250,000 to 300,000 hits per day (most of which just goes through Apache) and about 15000 requests of the various servlets. Is there anything we can do to limit the way that the JVM/ JDK processes rise ? Is there anything in the servlets which might be causing this ? IN Tomcat 3, we had a cron job which monitored the jdkprocesses and occassionally restarted Tomcat. No doubt people out there are wincing now,but hey, it worked !InTomcat 4,it looks like the same job won't work because in TC4, youhave to restart Apache everytime TC4 is restarted. Chris -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: RE: jdk processes
Hi Thanks for your comments. You should have a look in the server.xml file and at your httpd.conf to see if it is similar like this : (maxTheads should be the same as the apache threads) Ajp13Connector port=8009 maxThreads=150 maxSpareThreads=50 minSpareThreads=10 / (thanx Henri..) We haven't used AJP13 since mod_webapp is the supposed to be the preferred method with TC 4.0.1. We used AJP12 with TC 3.2.3 and set the parameters as you show. We still got the same problems so we're not overconfident that AJP13 will fix them. Interesting to read what you say about the restarts - I'll try restarting TC with no Apache restarts. On the session timeout, I have that set to 10 minutes (from the default 30). If there is one thread per session then maybe I ought to go to 5 minutes or less ! Where is the parameter that govens how often the session are checked. In Apache JServ, I recall something like checkInterval in the zone.properties file. Maybe TC4 is cleverer onthat one. Chris Advice is anyway to run jdk13 instead of the ajp12 you specified. On Tomcat 3.2.3, we used the AJP12 connector and used the parameters for the minimum and maximum spare servers - all to no effect. With Tomcat 4.0.1, we are using the mod_webapp connector but I'm not sure whether there are similar parameters, the page at http://jakarta.apache.org/tomcat/tomcat-4.0-doc/config/warp.html isn't finished.Can anyone tell me whether there are similar parameters ? Hmm.. don't know if it has these parameters, but the cvs version of mod_webapp automatically tries to deploy an webapp when it is not available directly after startup (which means : you can start apache after tomcat or restart tomcat any time you like). The site gets about 250,000 to 300,000 hits per day (most of which just goes through Apache) and about 15000 requests of the various servlets. Is there anything we can do to limit the way that the JVM/ JDK processes rise ? Is there anything in the servlets which might be causing this ? Your session timeout is probably 30 minutes. As far as I know, every session has is thread.. So that might explain the high number of threads.. Mvgr, Martin -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: Dynamic XML/XSLT with Tomcat 4.0
HI Use Cocoon within Tomcat. You'll findit in the Apache XMLproject. http://xml.apache.org/ Chris Hello, I would like to use XML/XSLT in my project. The problem is that my XML pages (and possibly XSLT pages) will be dynamic not static. I think, JSPs should generate the content, but how do I tell Tomcat to process them with the XSLT processor? Sincerely, Sergei Batiuk. -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
/servlet path from Apache to Tomcat
HI I'm using Tomcat 4.0.1 and Apache (with mod_webapp). When on AJP12 with Tomcat, I was able to place some servlets in my ROOT context. Then, by using the directive JkMount /servlet ajp12, I was able to call servlets below http://host/servlet/ Now, with Tomcat 4.0.1 for example, I can put SnoopServlet in the ROOT/WEB-INF/classes directory and reach http://host:8080/servlet/SnoopServlet So its OK through Tomcat standalone. How do I make that available through apache (http://host/servlet/SnoopServlet). I don't want a servlet context. I just want to leave some of my servlets in the ROOT context and allow them to be picked up by the /servlet path mapped by the invoker servlet, as with AJP12 and AJP13. Any ideas ? Chris -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Support for AJP13
Hello I've just upgraded from Tomcat 3.2.3 to 4.0.1. Our system uses Apache for static content so I was used to configuring ajp12. I note in the new version that there is ajp13, although I have configured the integration to use the new MOD_WEBAPP connector. Which method is now supported within Tomcat - ajp12, ajp13 or MOD_WEBAPP ? Are there any statistics out there about performance ? Sorry if the answer is elsewhere in the documentation - I did look around. Thanks Chris Faulkner Oramap Ltd -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Support for AJP13
Hello I've just upgraded from Tomcat 3.2.3 to 4.0.1. Our system uses Apache for static content so I was used to configuring ajp12. I note in the new version that there is ajp13, although I have configured the integration to use the new MOD_WEBAPP connector. Which method is now supported within Tomcat - ajp12, ajp13 or MOD_WEBAPP ? Are there any statistics out there about performance ? Sorry if the answer is elsewhere in the documentation - I did look around. Thanks Chris Faulkner Oramap Ltd -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
RE: Servlet Aliasing
Hi I was running IISand Tomcat. but the priciple should be the same here. I just went through this one, myself. The /Servlet/ bit gets put on by a parameter to the InvokerInterceptor class which you can find and change to / ( I found that a null value didn't work ). I removed the /TomcatContext/ section by uncommenting the virtual host section at the end of server.xml and adding a context path for the context (TomcatContext). Chris Faulkner Chris Faulkner Genawarehouse Ltd - The Genamap people www.genaware.com Tel :+44 (0)116 212 5059 Mobile :+44 (0)7887 562096 Email :[EMAIL PROTECTED] -- -Original Message- From: ryan [mailto:[EMAIL PROTECTED]] Sent: 06 June 2001 23:20 To: [EMAIL PROTECTED] Subject: Servlet Aliasing I am running tomcat 3.22, with mod_jk, and apache 1.3.20. Apache serves my static context and tomcat does my jsp. All works well but I am now trying to migrate my old jserv set up over to my tomcat box. In my jserv set up I have zones set up to access a package of servlets that are accessed like http://www..com/AServletName I can get it to work if called like so: http://www..com/TomcatContext/Servlet/AServletName I need to lose the TomcatContext/Servlet stuff. I have tried adding entries to my web.xml like so: servlet servlet-name AServletName /servlet-name servlet-class com.packagename.AServletClass /servlet-class /servlet servlet-mapping servlet-name AServletName /servlet-name url-pattern /AServletName /url-pattern /servlet-mapping to no avail. There must be another step I am missing but I can find no docs on it anywhere. Please Help ryan
RE: IIS and Tomcat
Hi Where is the redirector - I think there is am ISAPI filters tab on the proeprties for the jakarta virtual directory but you need to use the one on the properties off the Internet Information Services branch of IIS (I think). Anyway, when I had the redirector on the former it didn'twork, on the latter it did. That was the mistake I made. Also I had to reboot the machine to get it enabled. Restarting Tomcat and IIS wouldn't enable it. Chris -Original Message- From: Winer, Matthew [mailto:[EMAIL PROTECTED]] Sent: 07 June 2001 20:01 To: '[EMAIL PROTECTED]' Subject: IIS and Tomcat I am trying to get Tomcat 3.2.2 and IIS in Win2000 to work. I have gone through the registry and made sure everything is correct. I installed JDK 1.3.1. But I am still not getting a green arrow in IIS for the redirector. If anybody could give me a hand it would be appreciated. Thank you for your help -Matt Winer
IIS and Tomcat
Hi I am just trying to get my servlets tested on IIS (windows 2000) and Tomcat. I have done all the set-up steps, the isapi_redirect stuff seems to be functioning. I have IIS on W2K with Tomcat 3.2.2 and JDK 1.3.0_02. IIS is on the usual port 80. If I start up tomcat run, tomcat starts and initialises everything (IIS is also running at this time) http://localhost:8080/examples/servlet/SnoopServlet I can see that its coming from Tomcat. If I hit http://localhost/examples/servlet/SnoopServlet This also works and it tells me that the port is 80 and the server is Tomcat. However, I know that the port 80 is being served by IIS and I can see the request in the IIS logs, being redirected to /jakarta/isapi_redirect.dll. Why is it telling me that the web server is Tomcat ? So it all looks good, except that if I do a tomcat stop, then the servlet requests to IIS start to fail. Is this expected ? If so, can I run tomcat without opening up that 8080 port ? Maybe I'm a bit confused but I'd like to have tomcat managing my servlets without essentially having a second web server running. Secondly, how do I get a jar loaded and get access to the classes within that jar ? Where do I put it and how can classes in it be aliased ? Thirdly, and probably related, how can I use the servlet tag in my .shtml web pages. I was using Apache JSSI previously. Thanks very much Chris Faulkner
RE: IIS and Tomcat
Hi Thanks, this pretty much confirms what I thought. The crucial question, though, is whether I can have Tomcat functioning in harness with IIS to serve my servlets but not have it operation as a web server. When its running in support of IIS, I also have the Tomcat web server running on port 8080. Maybe I've overdone my install ! The other bit I'm stuck on is how to install a jar and access the classes in it. Thanks very much Chris -Original Message- From: Todd Sussman [mailto:[EMAIL PROTECTED]] Sent: 06 June 2001 07:36 To: [EMAIL PROTECTED] Subject: RE: IIS and Tomcat The messages show you are running IIS as the webserver and it is redirecting the servlets to tomcat. When you shutdown tomcat, IIS can no longer redirect the servlets to tomcat and therefor you get an error. I have never set Tomcat as a stand alone server, but it can be done. Todd -Original Message- From: Chris Faulkner [mailto:[EMAIL PROTECTED]] Sent: Tuesday, June 05, 2001 12:50 AM To: [EMAIL PROTECTED] Subject: IIS and Tomcat Hi I am just trying to get my servlets tested on IIS (windows 2000) and Tomcat. I have done all the set-up steps, the isapi_redirect stuff seems to be functioning. I have IIS on W2K with Tomcat 3.2.2 and JDK 1.3.0_02. IIS is on the usual port 80. If I start up tomcat run, tomcat starts and initialises everything (IIS is also running at this time) http://localhost:8080/examples/servlet/SnoopServlet I can see that its coming from Tomcat. If I hit http://localhost/examples/servlet/SnoopServlet This also works and it tells me that the port is 80 and the server is Tomcat. However, I know that the port 80 is being served by IIS and I can see the request in the IIS logs, being redirected to /jakarta/isapi_redirect.dll. Why is it telling me that the web server is Tomcat ? So it all looks good, except that if I do a tomcat stop, then the servlet requests to IIS start to fail. Is this expected ? If so, can I run tomcat without opening up that 8080 port ? Maybe I'm a bit confused but I'd like to have tomcat managing my servlets without essentially having a second web server running. Secondly, how do I get a jar loaded and get access to the classes within that jar ? Where do I put it and how can classes in it be aliased ? Thirdly, and probably related, how can I use the servlet tag in my .shtml web pages. I was using Apache JSSI previously. Thanks very much Chris Faulkner