Re: Tomcat running CGI scripts!!
Just read http://jakarta.apache.org/tomcat/tomcat-3.3-doc/tomcat-apache-howto.html. In "Making Apache Serve your Context's Static Files" you find a sample configuration that can help you. In your configuration every request is served by tomcat (ApJServMount / /root) and here only static files are served by tomcat. Bye, Peter. -- Mag. Peter Hrastnik tele.ring Telekom Service GmbH A-1030 Wien, Hainburgerstr. 33 Tel.: +43/1/931012/3277, Mobil: +43/650/6503277 "Corey M. Ellis" wrote: > > Hi everyone, > > I have a dilemna, that I would like to know if there is a solution. We have > Apache and Tomcat configured and is up and running a java application. We > have mounted the entire / to tomcat so every request essentially goes to > him. This setup was for application reasons, and cannot be changed without > major changes to the application. > > Now we never had a reason to run cgi scripts on this server, but now we do, > and hence the problem. When we place a perl script in > /usr/local/apache/cgi-bin/ "Everything works when the Apache is running by > itself with the Tomcat include file commented out, but when Apache has the > include file with tomcat running. The cgi-bin scripts fail, they just print > out the text files. > > I am desperate need of a solution that will have the following outcome, > Apache and Tomcat running, with Tomcat mounting the entire Apache tree, and > also the ability to place cgi scripts in a directory that will be run either > through Tomcat some kind of way, or through Apache directly, it doesn't > matter how they are run, as long as they can run. > > Any advice, and configuration tips will be greatly helpful. And also > remember, the Tomcat must maintain the entire Apache tree. Config file for > Tomcat looks like this. > > > ### > # Apache JServ Configuration File > # > > ### > > # Note: this file should be appended or included into your httpd.conf > > # Tell Apache on win32 to load the Apache JServ communication module > # LoadModule jserv_module modules/ApacheModuleJServ.dll > > # Tell Apache on Unix to load the Apache JServ communication module > # For shared object builds only!!! > # @LOAD_OR_NOT@LoadModule jserv_module @LIBEXECDIR@/mod_jserv.so > LoadModule jserv_module libexec/mod_jserv.so > > > # Do not edit! > ApJServManual on > ApJServDefaultProtocol ajpv12 > ApJServSecretKey DISABLED > ApJServMountCopy on > ApJServLogLevel debug > > ### Change if you run tomcat on a different host > #ApJServDefaultHost localhost > ApJServDefaultPort 8007 > > All jsp files will go to tomcat > ApJServMount default /root > > AddType text/jsp .jsp > AddHandler jserv-servlet .jsp > > ## Context mapping - all requests go to tomcat > > ApJServMount / /root > > ## Context mapping - you need to "deploy" > # ( copy or ln -s ) the context into htdocs > ## > > # ApJservMount /CONTEXT/servlet /root > # > # AllowOverride None > # Allow from all > # > > AuthType Basic > AuthName "For internal users only" > AuthUserFile /usr/local/apache/users > AuthType Basic > > > require user webodigo > > > > > Thanks in advance > > = > Corey M. Ellis > Network Administrator > 11 Broadway, Suite 365, New York, NY 10004 > [EMAIL PROTECTED] Phone: 212.809.2002 x:16 > Fax: 212.809.2092 Mobile: 917.868.8535 > Odigo: 279170 > > Odigo. Communication Redefined. www.odigo.com
Re: Apache Won't Redirect Servlet Requests to Tomcat
Did you check the DocumentRoot of Apache in the httpd.conf file? It has to be set so that apache can access the requested file also. Bye, Peter. -- Mag. Peter Hrastnik tele.ring Telekom Service GmbH A-1030 Wien, Hainburgerstr. 33 Tel.: +43/1/931012/3277, Mobil: +43/650/6503277 Jeremy Staines wrote: > > I've seen this problem posted and answered many times but I still cannot get > the problem solved. > > I am running Tomcat 3.2.3 on Apache 1.3.12, OS Linux Redhat 6.2. Adapter = > mod_jk-noeapi.so. When I start apache i get the following in the error log > > [Fri Aug 3 10:19:43 2001] [notice] Apache/1.3.12 Ben-SSL/1.39 (Unix) mod_jk > configured -- resuming normal operations > > When I access http://localhost:8080/examples/servlet/HelloWorldExample > things are fine but when I don't specify the port number the URL is not > found. > > I think I have read all the docs issued with tomcat. > > I've also, included the mod_jk.conf-auto in httpd.conf > I've also altered the relevant parts in workers.properties (see below) > > Does anyone have any ideas what can be going wrong? > > Thanks in advance > > Jeremy > > # > # $Header: /home/cvspublic/jakarta-tomcat/src/etc/Attic/workers.properties,v > 1.3.2.2 2000/10/16 01:59:22 larryi Exp $ > # $Revision: 1.3.2.2 $ > # $Date: 2000/10/16 01:59:22 $ > # > # > # workers.properties - > # > # This file provides jk derived plugins with with the needed information to > # connect to the different tomcat workers. > # > # As a general note, the characters $( and ) are used internally to define > # macros. Do not use them in your own configuration!!! > # > # Whenever you see a set of lines such as: > # x=value > # y=$(x)\something > # > # the final value for y will be value\something > # > # Normaly all you will need to modify is the first properties, i.e. > # workers.tomcat_home, workers.java_home and ps. Most of the configuration > # is derived from these. > # > # When you are done updating workers.tomcat_home, workers.java_home and ps > # you should have 3 workers configured: > # > # - An ajp12 worker that connects to localhost:8007 > # - An ajp13 worker that connects to localhost:8009 > # - A jni inprocess worker. > # - A load balancer worker > # > # However by default the plugins will only use the ajp12 worker. To have > # the plugins use other workers you should modify the worker.list property. > # > # > > # > # workers.tomcat_home should point to the location where you > # installed tomcat. This is where you have your conf, webapps and lib > # directories. > # > #workers.tomcat_home=c:\jakarta-tomcat > workers.tomcat_home=/usr/local/jakarta-tomcat-3.2.3 > > # > # workers.java_home should point to your Java installation. Normally > # you should have a bin and lib directories beneath it. > # > #workers.java_home=c:\jdk1.2.2 > workers.java_home=/usr/local/java > > # > # You should configure your environment slash... ps=\ on NT and / on UNIX > # and maybe something different elsewhere. > # > #ps=\ > ps=/ > > # > #-- ADVANCED MODE > #- > # > > # > #-- DEFAULT worket list -- > #- > # > # > # The workers that your plugins should create and work with > # > worker.list=ajp12, ajp13 > > # > #-- DEFAULT ajp12 WORKER DEFINITION -- > #- > # > > # > # Defining a worker named ajp12 and of type ajp12 > # Note that the name and the type do not have to match. > # > worker.ajp12.port=8007 > worker.ajp12.host=localhost > worker.ajp12.type=ajp12 > # > # Specifies the load balance factor when used with > # a load balancing worker. > # Note: > # > lbfactor must be > 0 > # > Low lbfactor means less work done by the worker. > worker.ajp12.lbfactor=1 > > # > #-- DEFAULT ajp13 WORKER DEFINITION -- > #- > # > > # > # Defining a worker named ajp13 and of type ajp13 > # Note that the name and the type do not have to match. > # > worker.ajp13.port=8009 > worker.ajp13.host=localhost > worker.ajp13.type=ajp13 > # > # Specifies the load balance factor when used with > # a load balancing worker. > # Note: > # > lbfactor must be > 0 > # > Low lbfactor means less work done by the worker. >
Re: JDBC and Pool
> Enrique Lopez wrote: > > Hello I'm using tomcat 3.2.2, Apache and MySQL and I want to know what > is the better solution to initialice a MySQL connection pool ? > > Best regards > > Enrique López Try PoolMan (http://www.codestudio.com). We are running a mission critical site that stores session information in a database using PoolMan as the connection pool and had no troubles (at least with version 2.0.3). Bye, Peter. -- Mag. Peter Hrastnik tele.ring Telekom Service GmbH A-1030 Wien, Hainburgerstr. 33 Tel.: +43/1/931012/3277, Mobil: +43/650/6503277
Re: streaming pdfs through servlet...
I had a similar problem in a php project in the past. There are browser/acrobat-plugin combinations that cause strange behaviour when passing through a pdf stream. Try using some other browser/acrobat combinations to track your problem down. If another combination works, you know that your jsp code is basically ok. Bye, Peter. -- Mag. Peter Hrastnik tele.ring Telekom Service GmbH A-1030 Wien, Hainburgerstr. 33 Tel.: +43/1/931012/3277, Mobil: +43/650/6503277 Chris Gross wrote: > > This is my first post to this list. Hi. > > I've written a quick little servlet to stream pdf files from my database to > the browser but I'm encountering a strange little problem. The first time I > call the servlet the page loads (I can see adobe's little plugin > initializing) but nothing ever displays. All I see is a whitespace in the > browser. But if I then immediately hit the refresh button then the pdf > shows up. Has anyone ever seen anything like this before? I'm not even > sure where the problem lays, i.e. with the plugin, with the browser, with > tomcat, or with my servlet. > > Adobe plugin version 5 > IE version 5.5 > > Thanks, > Chris > > ps. Here's my servlet. > > package com.chessys.trecs; > > import javax.servlet.*; > import javax.servlet.http.*; > import java.io.*; > import java.util.*; > import java.sql.*; > > public class ReportManager extends HttpServlet { > private static final String CONTENT_TYPE = "application/pdf"; > /**Initialize global variables*/ > public void init() throws ServletException { > } > /**Process the HTTP Get request*/ > public void doGet(HttpServletRequest request, HttpServletResponse > response) throws ServletException, IOException { > response.setContentType(CONTENT_TYPE); > ServletOutputStream out = response.getOutputStream(); > > Connection dbConnection = (Connection) request.getSession( > false ).getAttribute( "chesapeake_database_connection"); > > try { > Statement stmt = dbConnection.createStatement(); > > ResultSet rs = stmt.executeQuery("Select PDFImage from reportsinpdf > where reportid = " + request.getParameter("id")); > > if (rs.next()) { > byte [] pdf = rs.getBytes(1); > out.write(pdf); > out.flush(); > } > > } catch (Exception e) { > //Yeah i should probably do something here > }; > > out.close(); > } > > public void doPost(HttpServletRequest request, HttpServletResponse > response) throws ServletException, IOException { > doGet(request,response); > } > /**Clean up resources*/ > public void destroy() { > } > }
Re: strange way to start tomcat
The first time a jsp script is requested, it has to be compiled. This procedure takes some time. But I agree with you: Waiting some minutes is very long. What processor, memory etc do you have and is the machine loaded (use top to display the load). Perhaps you should try to use another JVM? That the sequence (start, stop, start, start) works could have following reasons: * The first time you start, everything seems to be ok. * Then you stop. * The next startup tells you, that the port is already used, so tomcat was not stopped properly. Did you do a ps -edaf to view your processes after the shutdown? Perhaps there are hanging java processes/threads? * The next time you start is the same as before: the port is used already I think that something triggers the compilation of your jsp while you perform that procedure and tomcat is not shut down at all. When you try to access your jsp afterwards, it is already compiled and so it is served faster. I would try another, more up-to-date JVM. Bye, Peter. -- Mag. Peter Hrastnik tele.ring Telekom Service GmbH A-1030 Wien, Hainburgerstr. 33 Tel.: +43/1/931012/3277, Mobil: +43/650/6503277 Krishna Muthyala wrote: > > Alex > > Looks like the port on which tomcat is using is being > already used by something else , hence the bind > exception > > kris > --- Alex Madon <[EMAIL PROTECTED]> wrote: > > Hello > > I downloaded tomcat 3.2.2 binaries distribution and > > installed it in my > > /opt (SuSE linux 7.0) dir. > > > > The sequence from the doc: > > TOMCAT_HOME=/opt/jakarta-tomcat-3.2.2 ; export > > TOMCAT_HOME; > > JAVA_HOME=/usr/lib/jdk1.1.8/; export JAVA_HOME; > > bin/startup.sh > > > > didn't work: > > the server serves pages only very very slow (have to > > wait to minutes to > > get a page) > > when I connect to port 8080. > > > > The only way I found to make it work is to issue the > > forllowing sequence > > of > > startup.sh and shutdown.sh: > > > > bin/startup.sh > > bin/shutdown.sh > > bin/startup.sh > > bin/startup.sh > > > > Follwos the output of issuing the commands. > > Does somebody has an idea to make it work on the > > first bin/startup.sh? > > > > Thanks > > Alex > > > > > > > > --- > > torino:/opt/jakarta-tomcat-3.2.2 # bin/tomcat.sh > > start > > Using classpath: > > > >/opt/jakarta-tomcat-3.2.2/lib/ant.jar:/opt/jakarta-tomcat-3.2.2/lib/jasper.jar:/opt/jakarta-tomcat-3.2.2/lib/jaxp.jar:/opt/jakarta-tomcat-3.2.2/lib/parser.jar:/opt/jakarta-tomcat-3.2.2/lib/servlet.jar:/opt/jakarta-tomcat-3.2.2/lib/test:/opt/jakarta-tomcat-3.2.2/lib/webserver.jar > > torino:/opt/jakarta-tomcat-3.2.2 # Starting tomcat. > > Check > > logs/tomcat.log for error messages > > 2001-07-05 09:49:40 - ContextManager: Adding context > > Ctx( /examples ) > > 2001-07-05 09:49:40 - ContextManager: Adding context > > Ctx( /admin ) > > 2001-07-05 09:49:40 - ContextManager: Adding context > > Ctx( ) > > 2001-07-05 09:49:40 - ContextManager: Adding context > > Ctx( /test ) > > 2001-07-05 09:49:46 - PoolTcpConnector: Starting > > HttpConnectionHandler > > on 8080 > > > > torino:/opt/jakarta-tomcat-3.2.2 # > > torino:/opt/jakarta-tomcat-3.2.2 # bin/tomcat.sh > > stop > > Using classpath: > > > >/opt/jakarta-tomcat-3.2.2/lib/ant.jar:/opt/jakarta-tomcat-3.2.2/lib/jasper.jar:/opt/jakarta-tomcat-3.2.2/lib/jaxp.jar:/opt/jakarta-tomcat-3.2.2/lib/parser.jar:/opt/jakarta-tomcat-3.2.2/lib/servlet.jar:/opt/jakarta-tomcat-3.2.2/lib/test:/opt/jakarta-tomcat-3.2.2/lib/webserver.jar > > Stop tomcat > > 2001-07-05 09:49:46 - PoolTcpConnector: Starting > > Ajp12ConnectionHandler > > on 8007 > > torino:/opt/jakarta-tomcat-3.2.2 # bin/tomcat.sh > > start > > Using classpath: > > > >/opt/jakarta-tomcat-3.2.2/lib/ant.jar:/opt/jakarta-tomcat-3.2.2/lib/jasper.jar:/opt/jakarta-tomcat-3.2.2/lib/jaxp.jar:/opt/jakarta-tomcat-3.2.2/lib/parser.jar:/opt/jakarta-tomcat-3.2.2/lib/servlet.jar:/opt/jakarta-tomcat-3.2.2/lib/test:/opt/jakarta-tomcat-3.2.2/lib/webserver.jar > > torino:/opt/jakarta-tomcat-3.2.2 # Starting tomcat. > > Check > > logs/tomcat.log for error messages > > 2001-07-05 09:49:55 - ContextManager: Adding context > > Ctx( /examples ) > > 2001-07-05 09:49:55 - ContextManager: Adding context > > Ctx( /admin ) > > 2001-07-05 09:49:55 - ContextManager: Adding context > > Ctx( ) > > 2001-07-05 09:49:55 - ContextManager: Adding context > > Ctx( /test ) > > FATAL:j
Re: several tomcat instances running at the same time
On Wed, 27 Jun 2001, Mario Vera wrote: > Hi!! > > I have a little problem. > > I have Tomcat 3.1 installed on SUN 1, near to 200 users use the > application. This causes that the application becomes very slow (Is a WEB > GIS). > > I have just one Tomcat instance running on sun system. I believe that maybe > if turn on another instance next to the current one, the speed could > improve. > > Is it correct and possible? It's worth trying it. I think it that 2 instances perform better than one, especially if you have enough memory. But that's just a guess. > > How I can have several instances running at the same time? You have to start each instance with an own server.xml file (use the -f parameter). Example: server1.xml and server2.xml. You have to set the ports of your connectors also differently for each instance (e.g. ajp12 connector of server 1 to 8007 and of server 2 8009) in their server xml file. The next thing you have to do (I don't think that you want that your user connect to 2 different ports) is to set up an apache http server, wich directs jsp or servlet request to server1 or server2. This is done using the apache module mod_jk. This is also described in some of the how-to's. Take a look for further information here: http://jakarta.apache.org/tomcat/tomcat-3.2-doc/index.html Bye, Peter. -- Mag. Peter Hrastnik tele.ring Telekom Service GmbH A-1030 Wien, Hainburgerstr. 33 Tel.: +43/1/931012/3277, Mobil: +43/650/6503277 > Regards. > > Aprovechando que hay mucha gente que habla español, va la versión en > español. > > Hola > > Tengo un pequeño problema. > > Tengo instalado Tomcat 3.1 en Sun 1, 200 usuarios aproximadamente > utilizan la aplicación. Esto provoca que la aplicación sea muy lenta (es un > sistema de información geografica para Internet). > > Tengo solamente una instancia de Tomcat corriendo en el sistema. Creo que si > corro otra instancia de Tomcat, la velocidad mejorará. > > ¿Es correcto y posible esto? > > ¿Como puedo tener varias instancias de Tomcat corriendo al mismo tiempo. > > Gracias!! > > PD. como se podran dar cuenta, soy uno mas de la comunidad de habla hispana. > >
Re: URL encoding and ';' rather than '?'
I checked mod_jk of the nightly build of 2001-05-17 and it wasn't fixed in this version. Bye, Peter. On Sat, 2 Jun 2001, Charles Baker wrote: > Thanks. I read the bug report you listed below. I'm > still not certain from what is says that this has been > fixed in 3.2.2 or later. Does anyone know? I guess I > can upgrade since this is just my personal dev box and > see. > > --- Peter Hrastnik <[EMAIL PROTECTED]> wrote: > > It's a know bug. It is listed at the Apache bug > > database having the bug id > > 1388. You can find more information here: > > > http://nagoya.apache.org/bugzilla/show_bug.cgi?id=1388 > > > > Bye, > > Peter. > > > > -- > > Mag. Peter Hrastnik > > tele.ring Telekom Service GmbH > > A-1030 Wien, Hainburgerstr. 33 > > Tel.: +43/1/931012/3277, Mobil: +43/650/6503277 > > > > > > > > On Sat, 2 Jun 2001, Charles Baker wrote: > > > > > I've been browsing the archives but still haven't > > seen > > > what I'm looking for. Why does Tomcat use ';' > > rather > > > than '?' when an URL gets encoded? > > > > > > Example: > > > > > > URL = "http://my.domain/some_form.htm";; > > > > > > response.sendRedirect(response.encodeRedirectURL(URL)); > > > > > > Yeilds an url like this: > > > > > http://my.domain/some_form.htm;jsessionid=lidfano10 > > > > > > and a 404 not found error. > > > > > > I use JRun at work because my company is > > predjudiced > > > against free software, and it uses the '?' to > > separate > > > the url and the query string which I thought was > > > standard. BTW, I'm using Tomcat 3.2.1 and Apache > > > 1.3.14 on Mandrake 7.2. I saw some workarounds > > posted > > > to the list, but I'm curious as to why Tomcat > > behaves > > > this way. Does either 3.2.2, 3.3 or 4.0 do things > > > differently? I know 4.0 is the cutting or perhaps > > > bleeding edge, but is 3.3 mostly stable though it > > > hasn't been through beta testing yet? > > > > > > > > > = > > > - > > > [EMAIL PROTECTED] > > > Hacking is a "Good Thing!" > > > See > > http://www.tuxedo.org/~esr/faqs/hacker-howto.html > > > > > > __ > > > Do You Yahoo!? > > > Get personalized email addresses from Yahoo! Mail > > - only $35 > > > a year! http://personal.mail.yahoo.com/ > > > > > > > > = > - > [EMAIL PROTECTED] > Hacking is a "Good Thing!" > See http://www.tuxedo.org/~esr/faqs/hacker-howto.html > > __ > Do You Yahoo!? > Get personalized email addresses from Yahoo! Mail - only $35 > a year! http://personal.mail.yahoo.com/ >
Re: URL encoding and ';' rather than '?'
It's a know bug. It is listed at the Apache bug database having the bug id 1388. You can find more information here: http://nagoya.apache.org/bugzilla/show_bug.cgi?id=1388 Bye, Peter. -- Mag. Peter Hrastnik tele.ring Telekom Service GmbH A-1030 Wien, Hainburgerstr. 33 Tel.: +43/1/931012/3277, Mobil: +43/650/6503277 On Sat, 2 Jun 2001, Charles Baker wrote: > I've been browsing the archives but still haven't seen > what I'm looking for. Why does Tomcat use ';' rather > than '?' when an URL gets encoded? > > Example: > > URL = "http://my.domain/some_form.htm";; > response.sendRedirect(response.encodeRedirectURL(URL)); > > Yeilds an url like this: > http://my.domain/some_form.htm;jsessionid=lidfano10 > > and a 404 not found error. > > I use JRun at work because my company is predjudiced > against free software, and it uses the '?' to separate > the url and the query string which I thought was > standard. BTW, I'm using Tomcat 3.2.1 and Apache > 1.3.14 on Mandrake 7.2. I saw some workarounds posted > to the list, but I'm curious as to why Tomcat behaves > this way. Does either 3.2.2, 3.3 or 4.0 do things > differently? I know 4.0 is the cutting or perhaps > bleeding edge, but is 3.3 mostly stable though it > hasn't been through beta testing yet? > > > = > - > [EMAIL PROTECTED] > Hacking is a "Good Thing!" > See http://www.tuxedo.org/~esr/faqs/hacker-howto.html > > __ > Do You Yahoo!? > Get personalized email addresses from Yahoo! Mail - only $35 > a year! http://personal.mail.yahoo.com/ >
Re: response.encodeURL and Apache 1.3.12
Thans a lot, Peter. Leon Nicholls wrote: > > Hi Peter > > Had the same problem. I needed a solution quickly so I just patched the > code to get it to work. > Firstly, I created a class to handle the sessions: > --- > public final class SessionPatch > { > private static StandardManager sm; > private static SessionPatch sp; > > private SessionPatch() > { > sm = new StandardManager(); > sm.setSessionTimeOut(30); > try > { > sm.start(); > } catch(IllegalStateException ex ) {} > } > > public static SessionPatch getInstance() > { > if (sm == null) > { > sp = new SessionPatch(); > } > return sp; > } > > public HttpSession getNewSession() > { > return sm.getNewSession(""); > } > > public HttpSession findSession(String id) > { > return sm.findSession(id); > } > } > -- > Then I used the following code on each page: > - > SessionPatch patch = SessionPatch.getInstance(); > HttpSession patchedSession; > if > ((patchedSession=patch.findSession(request.getParameter("jsessionid")))= > =null) > patchedSession = patch.getNewSession(); > - > > Then you can use patchedSession as your session object: > -- > patchedSession.setAttribute("user", user); > > "unconditional.xml?jsessionid="+patchedSession.getId() > > --- > > Ugly solution, but it works until I have time to figure out something > better. > > Leon > > -Original Message- > From: Peter Hrastnik [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, May 15, 2001 8:40 AM > To: [EMAIL PROTECTED] > Subject: response.encodeURL and Apache 1.3.12 > > encodeURL appends ";jsessionid=something" to the given URL (e.g. > response.encodeURL(test.jsp) results in test.jsp;jsessionid=something). > The Apache webserver can't handle such URLs. In other words, it is not > possible to use the (for production systems recommended) tomcat-apache > environment without using cookies to handle sessions. I know that > there's a workaround with Apache's mod_rewrite module but IMHO this > isn't a good solution. > > So I created a special encodeURL function that appends the session id > somehow like "test.jsp?jsessionid=something" but I can't figure out how > to tell tomcat to use that request variable as the session id. > > Thanx for your help, > Peter. > > -- > Mag. Peter Hrastnik > tele.ring Telekom Service GmbH > A-1030 Wien, Hainburgerstr. 33 > Tel.: +43/1/931012/3277, Mobil: +43/650/6503277
Re: response.encodeURL and Apache 1.3.12
For example "http://www.myserver.com/test.jsp;jsessionid=something"; gives a 404 file not found error whereas "http://www.myserver.com/test.jsp"; works without any problem. If I am connecting directly to tomcat "http://www.myserver.com:8080/test.jsp;jsessionid=something"; (in my case it's listening on 8080) it works too and jsessionid is used as the session id. Which version of Apache do you use and are you sure, you are going to apache first to get .jsps and you aren't connecting directly to tomcat, that is listening on port 80? Bye, Peter. Paul Nock wrote: > > Saw your comments on tomcat-user distribution list, and I'm curious what you > mean by "Apache webserver can't handle" ;jsessionid=? What is the > problem you see when using jsessionid? > > I have Apache/Tomcat and use ;jsessionid= re-writing and my sessions seem to > work fine. If there's something I've missed though, I'm going to need to > fix it too... > > Paul > > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED]]On Behalf Of Peter Hrastnik > Sent: Tuesday, May 15, 2001 6:40 AM > To: [EMAIL PROTECTED] > Subject: response.encodeURL and Apache 1.3.12 > > encodeURL appends ";jsessionid=something" to the given URL (e.g. > response.encodeURL(test.jsp) results in test.jsp;jsessionid=something). > The Apache webserver can't handle such URLs. In other words, it is not > possible to use the (for production systems recommended) tomcat-apache > environment without using cookies to handle sessions. I know that > there's a workaround with Apache's mod_rewrite module but IMHO this > isn't a good solution. > > So I created a special encodeURL function that appends the session id > somehow like "test.jsp?jsessionid=something" but I can't figure out how > to tell tomcat to use that request variable as the session id. > > Thanx for your help, > Peter. > > -- > Mag. Peter Hrastnik > tele.ring Telekom Service GmbH > A-1030 Wien, Hainburgerstr. 33 > Tel.: +43/1/931012/3277, Mobil: +43/650/6503277 -- Mag. Peter Hrastnik tele.ring Telekom Service GmbH A-1030 Wien, Hainburgerstr. 33 Tel.: +43/1/931012/3277, Mobil: +43/650/6503277
response.encodeURL and Apache 1.3.12
encodeURL appends ";jsessionid=something" to the given URL (e.g. response.encodeURL(test.jsp) results in test.jsp;jsessionid=something). The Apache webserver can't handle such URLs. In other words, it is not possible to use the (for production systems recommended) tomcat-apache environment without using cookies to handle sessions. I know that there's a workaround with Apache's mod_rewrite module but IMHO this isn't a good solution. So I created a special encodeURL function that appends the session id somehow like "test.jsp?jsessionid=something" but I can't figure out how to tell tomcat to use that request variable as the session id. Thanx for your help, Peter. -- Mag. Peter Hrastnik tele.ring Telekom Service GmbH A-1030 Wien, Hainburgerstr. 33 Tel.: +43/1/931012/3277, Mobil: +43/650/6503277
Re: multiple instances of tomcat
It is possible: You must have two different server.xml files. In the server.xml file you can configure that port in the http connector element. You also need to have 2 startup-scripts that call tomcat with the appropriate server.xml file. You don't need Apache to do this. Bye, Peter. -- Mag. Peter Hrastnik tele.ring Telekom Service GmbH A-1030 Wien, Hainburgerstr. 33 Tel.: +43/1/931012/3277, Mobil: +43/650/6503277 teh j wrote: > > Hello all > > I was just wondering whether it would be possible to > have two different tomcat processes (running on > different ports) simultaneously? > > From looking at the 'Minimalistic Usres Guide' it > seems this can be done with Apache, but can it be done > with Tomcat as a standalond JSP server? > > thanks! > Jason > > _ > http://store.yahoo.com.au - Yahoo! Store > - It's time you had your business online!
Re: mod_jk anyone?
I haven't tried it out, but with mod_jk you can define workers. These workers have properties and one of these properties is called "host", where you can set the host where tomcat is running on. So it should be no problem. You can find the mod_jk documentation here: http://jakarta.apache.org/tomcat/jakarta-tomcat/src/doc/mod_jk-howto.html Bye, Peter. -- Mag. Peter Hrastnik tele.ring Telekom Service GmbH A-1030 Wien, Hainburgerstr. 33 Tel.: +43/1/931012/3277, Mobil: +43/650/6503277 Laurence Mayer wrote: > > Can someone at least tell me if it is possible? > > Thanks > Laurence > > -Original Message- > From: Laurence Mayer [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, May 02, 2001 12:25 PM > To: '[EMAIL PROTECTED]' > Subject: FW: mod_jk anyone? > > -Original Message- > From: Laurence Mayer [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, May 02, 2001 10:17 AM > To: '[EMAIL PROTECTED]' > Subject: mod_jk > > Hi, > Can anyone point me to the installation document to install > apache and tomcat on separate boxes using mod_jk. > > Any tips would also be greatly appreciated. > > Thanks > Laurence
Re: Boycott China - please read - your life may depend on it
Can you please stop discussing this off-topic stuff in this mailing-list !!! Thanx, Peter. -- Mag. Peter Hrastnik tele.ring Telekom Service GmbH A-1030 Wien, Hainburgerstr. 33 Tel.: +43/1/931012/3277, Mobil: +43/650/6503277
Re: Tomcat crashes
Did you really set the environment: In startup.sh you should add BEFORE the line where tomcat.sh is executed: _JAVA_SR_SIGNUM=16 export _JAVA_SR_SIGNUM And if this really doesn't work, try to change your Java distribution. The early beta of Sun Java 1.3.1 is known to have the bug fixed. You can also som other java implementations except IBM Java: this implementation has also a thread problem. Bye, Peter. Eduard Witteveen wrote: > > Peter Hrastnik <[EMAIL PROTECTED]> wrote: > > It's a thread-problem with the SUN JVM on linux. I posted a solution > > that worked for me on 2001-04-26 with the subject "Re: Beating a dead > > Horse I know but.". > Thanx for the information, altrough it doesnt work. > > -- > Eduard WitteveenSysteemontwikkelaar NOS Internet > Mediacentrum Kamer 203, tel. +31(0)35 6773059 > > Sed quis custodiet ipsos custodes? : The sixth Satire from Juvenal
Re: Tomcat crashes
It's a thread-problem with the SUN JVM on linux. I posted a solution that worked for me on 2001-04-26 with the subject "Re: Beating a dead Horse I know but.". Bye, Peter. -- Mag. Peter Hrastnik tele.ring Telekom Service GmbH A-1030 Wien, Hainburgerstr. 33 Tel.: +43/1/931012/3277, Mobil: +43/650/6503277 Eduard Witteveen wrote: > > Hello, > > I try to run SOAP (from apache) on my system, but everytime the SOAP part get's >executed, the server crashes. > > This happens after i put xerces and soap on my system. I created a symlink to both >of them from withing the lib directory: > > lrwxrwxrwx1 root root 32 Apr 25 18:31 soap.jar -> >/usr/local/soap-2_1/lib/soap.jar > lrwxrwxrwx1 root root 34 Apr 25 18:30 xerces.jar -> >/usr/local/xerces-1_3_1/xerces.jar > > (and i run it as root, so cant be rights thingie) > > And i also added the following lines to the conf/server.xml > > docBase="/usr/local/soap-2_1/webapps/soap" > debug="1" > reloadable="true" > > > > I start tomcat: > Guessing TOMCAT_HOME from tomcat.sh to ./.. > Setting TOMCAT_HOME to ./.. > Using classpath: >./../lib/ant.jar:./../lib/jasper.jar:./../lib/jaxp.jar:./../lib/parser.jar:./../lib/servlet.jar:./../lib/soap.jar:./../lib/test:./../lib/webserver.jar:./../lib/xerces.jar:/usr/java/jdk1.3.0_02/lib/tools.jar:/usr/java/jdk1.3.0_02/lib/tools.jar:. > > I go to: http://localhost:8080/soap/admin/index.html and as soon as i click on list, >tomcat is crashing with the following lines: > > # HotSpot Virtual Machine Error, Unexpected Signal 11 > # Please report this error at > # http://java.sun.com/cgi-bin/bugreport.cgi > # > # Error ID: 4F533F4C494E55580E43505005BC > # > # Problematic Thread: prio=1 tid=0x81fa5c0 nid=0xa94 runnable > # > > How can i solve this problem(i already tried an absolute path, and putting >xerces.jar at first in the classpath) > > -- > Eduard WitteveenSysteemontwikkelaar NOS Internet > Mediacentrum Kamer 203, tel. +31(0)35 6773059 > > Sed quis custodiet ipsos custodes? : The sixth Satire from Juvenal
Re: Beating a dead Horse I know but.....
I had the same problem as you but I got a feedback from SUN: Hi Peter Hrastnik, Thank you for using our bug submit page. The bug you have reported is a duplicate of the Bug ID: 4372197. For more information on this, please refer to the Bug ID: 4372197 at: http://developer.java.sun.com/developer/bugParade/bugs/4372197.html The bug has been fixed for ladybird (1.3.1). You can download the early beta of ladybird at: http://developer.java.sun.com/developer/earlyAccess/j2sdk131/ The beta may NOT already contain the fix, unfortunately. (Our records do not definitively show whether the fix made it into the beta version.) So if there are to much threads (~ too much traffic), the JVM crashes. Instead of switching to an early beta (I use SUN Java 1.3.0v2), I added this to my tomcat environment (as proposed in one of the bug comments): _JAVA_SR_SIGNUM=16 And it worked! The JVM runs stable now. Instead of crashing 5 times a day, it doesn't crash anymore. Bye, Peter. -- Mag. Peter Hrastnik tele.ring Telekom Service GmbH A-1030 Wien, Hainburgerstr. 33 Tel.: +43/1/931012-3277 Simon Chatfield wrote: > > > I and a few other people have posted these problems in the past to no > real conclusion, but I'm getting this problem almost daily with tomcat > in ssl mode. > > Using jdk version 1.2.2, 1.3.0_v2 and everything between, with and > without the JIT activated. After a day or two of uptime the > JVM crashes with nothing but this error... > > # > # HotSpot Virtual Machine Error, Internal Error > # Please report this error at > # http://java.sun.com/cgi-bin/bugreport.cgi > # > # Error ID: 43113F32554E54494D45110E43505002C5 > # > # Problematic Thread: prio=1 tid=0x8148e78 nid=0x7ee9 suspended > # > > I have submitted this bug to SUN but still haven't gotten a response. > This error is not issolatable to a particular line of code or JSP > page, but I can count on it failing within 3 days of uptime. This ONLY > happens with tomcat's jvm, (rmi services on the same machine are fine) > This happens on both linux and solaris. It only appears to happen when > running in SSL mode. > > Once again, sorry for these repeated posts, but I was hoping this > extra info might sparc someone's though processes for a solution or > one of the tomcat developers to look into the problem. > > Thanks > > > -Simon > >
Re: New to user-mailing-list (mod_jk)
If these are really all steps you performed after a new install: Where did you get the mod_jk.so from and if you compiled it yourself or downloaded it: into which directory did you copy it? It seems (error message) that apache cannot find the module. Execute "strace /usr/sbin/httpd -X" to see which file apache tries to open and/or follow the steps described in the mod_jk howto. It worked perfectly for me without any problems on RedHat 6.2 with apache 1.3.12 (php3 as shared lib) and a self-compiled mod_jk.so. Bye, Peter. -- Mag. Peter Hrastnik tele.ring Telekom Service GmbH A-1030 Wien, Hainburgerstr. 33 Tel.: +43/1/931012-3277 Rick wrote: > > Ik didnt work !!! > > I have been working for 1 hour to reinstall everything > this is what I did (after a clean red hat 7.0 install) > > 01: cd /tmp/apache1.3.19 > 02: ./configure --prefix=/usr/local/apache --enable-module=so > 03: cd /tmp/php4.0.4 > 04: > ./configure --with-mysql --with-apache=../apache1.3.19 --enable-track-vars > 05: make > 06:.make install > 07: cd /tmp/apache1.3.19 > 08: ./configure --activate-module=src/modules/php4/libphp4.a > 09: make > 10: make install > 11: cd /tmp/php4.0.4 > 12: cp php.ini-dist /usr/local/lib/php.ini > > *** edit httpd.conf *** > 13: AddType application/x-httpd-php .php > > unzip/tar Tomcat to /usr/local/jakarta-tomcat *** > 14: cd /usr/local/jakarta-tomcat/bin > > edit tomcat to let tomcat know where the JDK is *** > 15: ./startup.sh > > copy mod_jk.so to /apache/libexec *** > *** edit httpd.conf *** > Include "/usr/local/jakarta-tomcat/conf/mod_jk.conf-auto" > > 16: cd /usr/local/apache/bin > 17: ./apachectl start > > the SAME error again > > - > Sytax error on line 8 of /usr/local/jakarta-tomcat/conf/mod_jk.conf-auto: > Invalid command 'LoadModule', perhaps mis-spelled or defined by a module not > included in the server configuration > ./apachectl start: httpd could not be started > > - > > now I can completey start all over again... > does anybody know the configuration that does enable the use of LoadModule ? > > rick > > - Original Message - > From: "Wesselmann, Marcus" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Friday, April 20, 2001 2:54 PM > Subject: AW: New to user-mailing-list > > Hi, > > At compile-time you only have to use --enable-module=so > > When Apache is compiled and installed you enable mod_jk with an appropiate > LoadModule entry in httpd.conf. > > At least that worked fine for me :) > > Regards, > > Marcus > > -Ursprüngliche Nachricht- > Von: Rick [mailto:[EMAIL PROTECTED]] > Gesendet: Freitag, 20. April 2001 14:16 > An: [EMAIL PROTECTED] > Betreff: Re: New to user-mailing-list > > sorry to bother you once more with the same question > but before I really configure apache (I might do something wrong, and let me > start all over again) > > should I use: --enable-shared or --enable-module=so > > in the configuration to enable me to use mod_jk.so > > I read the documentation, but this talked about stuff Im not familiar > with... > > regards > rick
Re: JDBC driver for oracle
http://www.oracle.com You have to subscribe to Oracle Technology Network (that's free) before you can download it. Bye, Peter. Jack Li wrote: > > Hi, > > Where can I have a free JDBC driver for oracle? > > Thanks, > Jack -- Mag. Peter Hrastnik tele.ring Telekom Service GmbH A-1030 Wien, Hainburgerstr. 33 Tel.: +43/1/931012-3277
Shutdown problem red-hat 6.2
Hi ! We are running tomcat 3.2 and IBMJava2 SDK 1.3 on an Intel Red Hat 6.2 machine with Apache 1.3.12 and mod_jserv. When shutdown.sh is called, it is very rare that the contexts are removed and java processes are still running for some minutes. Sometimes they don't disappear at all and have to be removed manually with kill. If you try to startup, it won't work because these processes are still running. Sometimes startup does not work even though no tomcat-java processes exist. Tomcat receives the request (there is no Internal Server Error as it occures when tomcat is not running) but does not deliver anything. Does anybody have an idea how to solve this problems? Thanx for your help, Peter. -- Mag. Peter Hrastnik tele.ring Telekom Service GmbH A-1030 Wien, Hainburgerstr. 33 Tel.: +43/1/931012-3277 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]