accessing ejbs deployed in jboss from tomcat/apache
Hi all: I have been able to integrate jboss-3.0.0_tomcat-4.0.3 with apache 2, mod_jk2.dll (on a win2k box). The static content is getting displayed correctly. The problem is that I am not able to access my EJBs using apache which talks to the jboss embeded tomcat. I can access my EJBs on port 8080 (the embeded tomcat) without any problems. Am I supposed to make a reference to my EJBs somewhere else as well? And where? There should be a way for the embeded tomcat when it receives a request from apache to talk to jboss. After all they are running in the same VM. Any help will be appreciated. Regards, Nanijon. - Do You Yahoo!? Yahoo! Finance - Get real-time stock quotes
Re: keystore.name
- Original Message - From: neal [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Friday, September 20, 2002 11:31 PM Subject: SSL: keystore.name The file generated from keytool was keystore.name ... not *.keystore. Could this be the reason we are getting the follwing error: java.io.IOException: keystore was tampered with, or password was no, the file name is not important. do you have the same password for the keystore and the certificate? If so, why did this happen and what is the solution? Thanks. Neal -- 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: mod_jk2, virtual hosts, JkUriSet
Hi jk2 freaks I've applied Dmitry patch on jakarta-tomcat-connectors-4.1.11-src, and now virtual hosts are working without using JkUriSet. (JkUriSet was not avalaible with Apache 1.3) I now can use Apache 2.0.40 or Apache 1.3.26 + TOMCAT 4.1.11 and virtual hosts using only workers2.properties and jk2.properties. Next step, using unix sockets Dom - Original Message - From: Dmitry Letin [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Saturday, September 21, 2002 3:43 AM Subject: Re: mod_jk2, virtual hosts, JkUriSet I finally found the bug (or whatever it is) that caused problems: in source file jk/native2/server/apache2/mod_jk2.c in line 680 (I have revision 1.49) that reads: uriEnv = workerEnv-uriMap-mapUri(env, workerEnv-uriMap,NULL,r-uri); NULL should be replaced to r-server-server_hostname (without the quotes of course) This NULL - was the reason for invalid handling of virtual hosts. I have not tested this a lot yet, but virtual hosts are dispached properly now :-) :-) This fix is for apache2 only. I actually typed manually the stuff above - could not do copy/paste - hope I made no typos Recompile mod_jk2.so after this change - and all works Dmitry Hello all, I'm having the same problem, and I've been banging my head against it on and off for about a week with no more success than anyone else... Essentially, we're all trying to map the root of different virtual hosts to a different context within tomcat, right? I started looking elsewhere and found that Resin's apache module utilizes the ServerName directive within a VirtualHost block to select different web apps... If it's a make-or-break deal, you might want to look there. Another workaround possibility that I'm toying with now is to use mod_rewrite within apache to redirect *.jsp requests from http://www.vhost1.com to http://www.vhost1.com/vh1/ and map the /vh1/*.jsp uri to the proper context. It just seems virtual host support via mod_jk2 is not possible without duct tape and bubble gum, which is a shame because the unix socket feature is fantastic... Ah, for the good old days of JServ/JSSI... - Original Message - From: Dmitry Letin [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Thursday, September 19, 2002 6:46 PM Subject: RE: mod_jk2, virtual hosts, JkUriSet Hi Robert, In my config files I of course use real domains. I did try to use only workers2.properties files for configuration. It seems that virtual host part is ignored, so that these are the same when jk2 selects worker: # The virtual host part seems to be ignored anyway # [uri:www.vhost1.com:80/*.jsp] - not working as well [uri:www.vhost1.com/*.jsp] worker=ajp13:localhost:8009 # The virtual host part seems to be ignored anyway # [uri:www.vhost2.com:80/*.jsp] - not working as well [uri:www.vhost2.com/*.jsp] worker=ajp13:localhost:8013 My problem comes from the fact that the virtual host part in uri seems to be ignored when jk2 selects a worker, and only url path is cheched by jk2 code. Because that part is the same it is dispached to the same tomcat instance. I do have proper entries in my /etc/hosts file (I'm on Linux) and I did try this as well [uri:142.54.3.10:80] alias=www.vhost1.com:80 It did not help. I promise to write a how-to on this if I manage to solve this problem :-) But I have doubts I can solve it :-( Dmitry -Original Message- From: Robert L Sowders [mailto:[EMAIL PROTECTED]] Sent: Thursday, September 19, 2002 6:32 PM To: Tomcat Users List Subject: Re: mod_jk2, virtual hosts, JkUriSet Forgot to mention, Here's a snip from the default workers2.properties file from the src [uri:127.0.0.1:8003] info=Example virtual host. Make sure myVirtualHost is in /etc/hosts to test it alias=myVirtualHost:8003 On a windows machine the hosts file is in c:\WinNT\system32\drivers\etc You'll also have to define the connector in the server.xml file. Robert L Sowders [EMAIL PROTECTED] 09/19/2002 02:48 PM Please respond to Tomcat Users List To: Tomcat Users List [EMAIL PROTECTED] cc: Subject:Re: mod_jk2, virtual hosts, JkUriSet H, looks like you got some funny domains for those VirtualHosts as well as some nonstandard JkUriSet statements. You probably have a problem with one or both. Others have been successful. http://www.mail-archive.com/tomcat-user@jakarta.apache.org/msg66171.html Make your virtual hosts as fully qualified domains and make your JkUriSet commands like the example. Leave the port selection up to the workers2.properties file. Regardless of how you do it, after you are successful a nice step by step How To would be appreciated by all. rls Dmitry Letin [EMAIL PROTECTED] 09/19/2002 01:24 PM Please respond to Tomcat Users List
Re: encoding problem
Nikola Stefanovski wrote: hello. i'm working with cyrillic characters and i can't get them to show ok. i'm working on win2000 and i've tried tomcat versions 3.2.3, 3.3a and 4.0.1. the page directive is specified as: %@ page contentType=text/html; charset=windows-1251 pageEncoding=windows-1251% this makes the static content of the jsp appear correctly, but the strings retrieved through an expression (%=bean.getString()%) are just question-marks. if i take out the page attribute, the browser shows some funny characters as it doesn't recognise the encoding. but if i then switch to cyrillic (windows) encoding manually, everything appears fine. i can't figure out where the catch is, any help? Sounds like you got something wrong in the database part of your web application. From what you've said, I can only conclude that what your JSP/Servlet reads is a totally incorrect string. Java supports only UNICODE, as it's internal character encoding. So, if you have an architecture like this: RDBMS - JDBC - JRE - Tomcat - Servlet(JSP) - HTTP then JDBC must read characters INTO the Unicode encoding. ServletResponse class will translate Unicode into specified HTTP encoding. Given your description of the problem, I'd say you have CP-1251 encoded text that gets just pasted into Unicode. This is irregular, since CP-1251 is not getting translated into proper Unicode characters. I'd say you have wrong setup of your DB. I've had similar problems with PostgreSQL and Tomcat, my data was CP-1250 and I was forcing it as Unicode. My problems went away when I translated CP-1250 into Unicode on the DB side and set DB encoding to UTF-8. I believe things would be OK if I switched to any other supported encoding of the DB. I'd say you have the same problem as I did - DB was of one encoding and data of the other. Nix. P.S. I'm on a vacation for the next ten days, so I won't be answering my mails. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
configuration problem
I'm having problems configuring the tomcat server. I've created a directory 'Book' in $CATALINA_HOME/webapps $CATALINA_HOME/webapps/Book /WEB-INF/classes I've added the following line in server.xml Context docBase=$CATALINA_HOME/webapps/Book path=Book /Context I've placed a class file called CartItem.class in Book/WEB-INF/classes I've got a directory Book/jsp that contains a file called ShoppingCart.jsp. I've restarted tomcat Now when I access http://localhost:8080/Book/jsp/ShoppingCart.jsp I get errors ShoppingCart_jsp.java:7: '.' expected import CartItem; ^ These are examples are from a book so I'm wondering what is wrong. The book was written with Tomcat3.x in mind so not sure whether this is my configuration problem or wrong code. From Tomcat Web Application Manager I can see that the configuration is somewhat correct since it's running. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: configuration problem
Your docBase in the Context ... element only needs a relative location of Book. Also, your path attribute requires a forward slash prefix. So, rewrite it like this: Context path=/Book docBase=Book Should work now. You only need to provide a fully qualified path in docBase if your app exists outside the defined appBase directoy defined in the parent Host ... element. Also, if you are literally using $CATALINA_HOME in your server.xml, I don't think that will be expanded to the actual value of that system variable, but I could be wrong. If I'm right, using it will not work any way you look at it. You'd probably have to replace $CATALNA_HOME with the actual path to where $CATALINA_HOME exists. jake At 06:26 PM 9/21/2002 +0800, you wrote: I'm having problems configuring the tomcat server. I've created a directory 'Book' in $CATALINA_HOME/webapps $CATALINA_HOME/webapps/Book /WEB-INF/classes I've added the following line in server.xml Context docBase=$CATALINA_HOME/webapps/Book path=Book /Context I've placed a class file called CartItem.class in Book/WEB-INF/classes I've got a directory Book/jsp that contains a file called ShoppingCart.jsp. I've restarted tomcat Now when I access http://localhost:8080/Book/jsp/ShoppingCart.jsp I get errors ShoppingCart_jsp.java:7: '.' expected import CartItem; ^ These are examples are from a book so I'm wondering what is wrong. The book was written with Tomcat3.x in mind so not sure whether this is my configuration problem or wrong code. From Tomcat Web Application Manager I can see that the configuration is somewhat correct since it's running. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: configuration problem
tried it but still the same problem. On Sat, 21 Sep 2002, Jacob Kjome wrote: Your docBase in the Context ... element only needs a relative location of Book. Also, your path attribute requires a forward slash prefix. So, rewrite it like this: Context path=/Book docBase=Book Should work now. You only need to provide a fully qualified path in docBase if your app exists outside the defined appBase directoy defined in the parent Host ... element. Also, if you are literally using $CATALINA_HOME in your server.xml, I don't think that will be expanded to the actual value of that system variable, but I could be wrong. If I'm right, using it will not work any way you look at it. You'd probably have to replace $CATALNA_HOME with the actual path to where $CATALINA_HOME exists. jake At 06:26 PM 9/21/2002 +0800, you wrote: I'm having problems configuring the tomcat server. I've created a directory 'Book' in $CATALINA_HOME/webapps $CATALINA_HOME/webapps/Book /WEB-INF/classes I've added the following line in server.xml Context docBase=$CATALINA_HOME/webapps/Book path=Book /Context I've placed a class file called CartItem.class in Book/WEB-INF/classes I've got a directory Book/jsp that contains a file called ShoppingCart.jsp. I've restarted tomcat Now when I access http://localhost:8080/Book/jsp/ShoppingCart.jsp I get errors ShoppingCart_jsp.java:7: '.' expected import CartItem; ^ These are examples are from a book so I'm wondering what is wrong. The book was written with Tomcat3.x in mind so not sure whether this is my configuration problem or wrong code. From Tomcat Web Application Manager I can see that the configuration is somewhat correct since it's running. -- 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]
How can I best extend WebdavServlet?
Hi all. I'm new to Tomcat4, although I've been using Tomcat3 for over two years. A major difference appears to be the classloader mechanism, which I'm having trouble getting to grips with. This leads to my question: Is it possible to write a class that extends the Tomcat4 WebdavServlet? If I try the obvious 'MyWebdavServlet extends WebdavServlet' in my own package, I get a ClassDefNotFound for org/apache/catalina/servlets/WebdavServlet when I try to call it. I guess this is something to do with the classloader, because if I put the same MyWebdavServlet into the org.apache.catalina.servlets package (which I know is a dodgy thing to do) and put that class under tomcat/server/classes, all works well... Can anyone explain this phenomenon? Has anyone written a class in their own package that extends WebdavServlet? Cheers Dave Small -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
jasper2
Hello, I'm trying to build tomcat 4.1.10 from the source and when I do an ant dist I get the following error message: file:/usr/local/tomcat-src/build.xml:67: Basedir /usr/local/jakarta-tomcat-jasper/jasper2 does not exist Where exactly can I download jasper? I have found nothing on jakarta.apache.org :-( Bye, Werner. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: configuration problem
You should probably put CartItem in a package. When you say import CartItem, the class file generated by the automated JSP compile is going to look for CartItem.class in the same package as it is in which isn't the case. The default package won't work unless the class you are using is one that you are directly running. Importing classes from the default package will not work unless both the class and the imports all exist in the default package. This is almost never the case. Just avoid the default package if you can. So, add something like the following in CartItem package org.atif.cart.CartItem; put CartItem.class into WEB-INF/classes/org/atif/cart/ finally, import org.atif.cart.CartItem in your JSP That should get things going. Jake At 07:25 PM 9/21/2002 +0800, you wrote: tried it but still the same problem. On Sat, 21 Sep 2002, Jacob Kjome wrote: Your docBase in the Context ... element only needs a relative location of Book. Also, your path attribute requires a forward slash prefix. So, rewrite it like this: Context path=/Book docBase=Book Should work now. You only need to provide a fully qualified path in docBase if your app exists outside the defined appBase directoy defined in the parent Host ... element. Also, if you are literally using $CATALINA_HOME in your server.xml, I don't think that will be expanded to the actual value of that system variable, but I could be wrong. If I'm right, using it will not work any way you look at it. You'd probably have to replace $CATALNA_HOME with the actual path to where $CATALINA_HOME exists. jake At 06:26 PM 9/21/2002 +0800, you wrote: I'm having problems configuring the tomcat server. I've created a directory 'Book' in $CATALINA_HOME/webapps $CATALINA_HOME/webapps/Book /WEB-INF/classes I've added the following line in server.xml Context docBase=$CATALINA_HOME/webapps/Book path=Book /Context I've placed a class file called CartItem.class in Book/WEB-INF/classes I've got a directory Book/jsp that contains a file called ShoppingCart.jsp. I've restarted tomcat Now when I access http://localhost:8080/Book/jsp/ShoppingCart.jsp I get errors ShoppingCart_jsp.java:7: '.' expected import CartItem; ^ These are examples are from a book so I'm wondering what is wrong. The book was written with Tomcat3.x in mind so not sure whether this is my configuration problem or wrong code. From Tomcat Web Application Manager I can see that the configuration is somewhat correct since it's running. -- 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: How can I best extend WebdavServlet?
If the class exists in a jar archive inside $TOMCAT_HOME/server/lib or server/classes your webapps cannot see it. Only the container sees that. You can remedy this by moving the jar file that contains the class you want to common/lib. That way, both the container and your webapp can see it. plain lib (or shared/lib in Tomcat-4.1.x) is where you put classes that only your webapps can see. Jake At 12:35 PM 9/21/2002 +0100, you wrote: Hi all. I'm new to Tomcat4, although I've been using Tomcat3 for over two years. A major difference appears to be the classloader mechanism, which I'm having trouble getting to grips with. This leads to my question: Is it possible to write a class that extends the Tomcat4 WebdavServlet? If I try the obvious 'MyWebdavServlet extends WebdavServlet' in my own package, I get a ClassDefNotFound for org/apache/catalina/servlets/WebdavServlet when I try to call it. I guess this is something to do with the classloader, because if I put the same MyWebdavServlet into the org.apache.catalina.servlets package (which I know is a dodgy thing to do) and put that class under tomcat/server/classes, all works well... Can anyone explain this phenomenon? Has anyone written a class in their own package that extends WebdavServlet? Cheers Dave Small -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Cannot shutdown tomcat
Hi! I'm using tomcat 4.1.10, on Linux Red Hat. I set the environment vars (JAVA_HOME and CATALINA_HOME), when I start tomcat (startup.sh), seems all run ok, but when I try to shutdown it, ... the shell does not respond: [tomcat@telemako bin]$ ./shutdown.sh Using CATALINA_BASE: /usr/local/jakarta-tomcat-4.1.10 Using CATALINA_HOME: /usr/local/jakarta-tomcat-4.1.10 Using CATALINA_TMPDIR: /usr/local/jakarta-tomcat-4.1.10/temp Using JAVA_HOME: /usr/local/j2sdk1.4.1/ I must do a Ctrl + c, and then kill the first tomcat process, then the other tomcat process die. I have been searchin in the mailing-list responses, but I cannot find a solution, any idea Thanx Marc -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: How can I best extend WebdavServlet?
- Original Message - From: Jacob Kjome [EMAIL PROTECTED] If the class exists in a jar archive inside $TOMCAT_HOME/server/lib or server/classes your webapps cannot see it. Only the container sees that. Thanks Jake. One question remains - if I reference the WebdavServlet within web.xml Tomcat seems able to find it ok in server/lib when I invoke the servlet. If I reference MyWebdavServlet within web.xml (and MyWebdavServlet extends WebdavServlet) Tomcat finds MyWebdavServlet but fails to find WebdavServlet (giving the ClassDefNotFound error). Is there something in the spec that the classloader can only load main classes and not classes that are used as a basis for these main classes (such as WebdavServlet)? cheers dave -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: configuration problem
It worked. Thanks On Sat, 21 Sep 2002, Jacob Kjome wrote: You should probably put CartItem in a package. When you say import CartItem, the class file generated by the automated JSP compile is going to look for CartItem.class in the same package as it is in which isn't the case. The default package won't work unless the class you are using is one that you are directly running. Importing classes from the default package will not work unless both the class and the imports all exist in the default package. This is almost never the case. Just avoid the default package if you can. So, add something like the following in CartItem package org.atif.cart.CartItem; put CartItem.class into WEB-INF/classes/org/atif/cart/ finally, import org.atif.cart.CartItem in your JSP That should get things going. Jake At 07:25 PM 9/21/2002 +0800, you wrote: tried it but still the same problem. On Sat, 21 Sep 2002, Jacob Kjome wrote: Your docBase in the Context ... element only needs a relative location of Book. Also, your path attribute requires a forward slash prefix. So, rewrite it like this: Context path=/Book docBase=Book Should work now. You only need to provide a fully qualified path in docBase if your app exists outside the defined appBase directoy defined in the parent Host ... element. Also, if you are literally using $CATALINA_HOME in your server.xml, I don't think that will be expanded to the actual value of that system variable, but I could be wrong. If I'm right, using it will not work any way you look at it. You'd probably have to replace $CATALNA_HOME with the actual path to where $CATALINA_HOME exists. jake At 06:26 PM 9/21/2002 +0800, you wrote: I'm having problems configuring the tomcat server. I've created a directory 'Book' in $CATALINA_HOME/webapps $CATALINA_HOME/webapps/Book /WEB-INF/classes I've added the following line in server.xml Context docBase=$CATALINA_HOME/webapps/Book path=Book /Context I've placed a class file called CartItem.class in Book/WEB-INF/classes I've got a directory Book/jsp that contains a file called ShoppingCart.jsp. I've restarted tomcat Now when I access http://localhost:8080/Book/jsp/ShoppingCart.jsp I get errors ShoppingCart_jsp.java:7: '.' expected import CartItem; ^ These are examples are from a book so I'm wondering what is wrong. The book was written with Tomcat3.x in mind so not sure whether this is my configuration problem or wrong code. From Tomcat Web Application Manager I can see that the configuration is somewhat correct since it's running. -- 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]
web.xml its OK !
Hi everybody! Thanks for try to help me. I found what was wrong... My web.xml file was write wrong - Web.xml, not web.xml !! I copy some files from another computer then the name of some files was modified.!? Now i'm mapping my servlets. Thanks!!
loadbalancer in workers.properties
Hi All. The doco's suggested that I can have 1,2 or more Tomcats running (ideally one on each box). The scripts for httpd.conf suggested a piece if s/w called loadbalancer eg. ... DocumentRoot /var/www/html ... JkMount /*.jsp loadbalancer JkMount /servlet/* loadbalancer *** etc Where can I download this loadbalancer ? THX -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: mod_jk2, virtual hosts, JkUriSet
Developers have already added this fix: http://www.mail-archive.com/tomcat-dev%40jakarta.apache.org/msg33556.html That was really fast. Dmitry - Original Message - From: Robert L Sowders [mailto:[EMAIL PROTECTED]] Sent: Сб 21/09/2002 2:16 To: Tomcat Users List CC: Dmitry Letin Subject: Re: mod_jk2, virtual hosts, JkUriSet Hello, I'm glad you got it working. Have you posted a bug at http://www.mail-archive.com/tomcat-dev%40jakarta.apache.org/ I'm sure the developers of JK2 would be interested in your patch? You might have already, their web site has not been updating for awhile now. rls
RE: mod_jk2, virtual hosts, JkUriSet
Dmitry, It looks like the code the developers added was different from your original code. Here's your code: uriEnv = workerEnv-uriMap-mapUri(env, workerEnv-uriMap,NULL,r-uri); NULL should be replaced to r-server-server_hostname (without the quotes of course) and here's their code: -uriEnv = workerEnv-uriMap-mapUri(env, workerEnv-uriMap,NULL,r-uri ); +uriEnv = workerEnv-uriMap-mapUri(env, workerEnv-uriMap, +r-server-is_virtual ? r-server-server_hostname : NULL, +r-uri ); Looks like they added a check for a virtual host before executing your code. Have you had a chance to test this? -Original Message- From: Dmitry Letin [mailto:[EMAIL PROTECTED]] Sent: September 21, 2002 8:50 AM To: [EMAIL PROTECTED] Subject: Re: mod_jk2, virtual hosts, JkUriSet Developers have already added this fix: http://www.mail-archive.com/tomcat-dev%40jakarta.apache.org/msg33556.html That was really fast. Dmitry - Original Message - From: Robert L Sowders [mailto:[EMAIL PROTECTED]] Sent: Сб 21/09/2002 2:16 To: Tomcat Users List CC: Dmitry Letin Subject: Re: mod_jk2, virtual hosts, JkUriSet Hello, I'm glad you got it working. Have you posted a bug at http://www.mail-archive.com/tomcat-dev%40jakarta.apache.org/ I'm sure the developers of JK2 would be interested in your patch? You might have already, their web site has not been updating for awhile now. rls -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Dumb Question com.justatest.test.MyServlet error
Open the InitSnoop.java source file. If the first line is not: package com.justatest.test; then that is your problem. The directory structure under WEB-INF/classes maps to the package stucture of your servlet and other java classes deployed in the webapp. Change the package name to the right one, recompile the class, redeploy and that should be it. Your servlet mapings are otherwise ok. Jon -Original Message- From: john-paul delaney [mailto:[EMAIL PROTECTED]] Sent: 21 September 2002 00:22 To: Tomcat Users List Subject: RE: Dumb Question com.justatest.test.MyServlet error Thanks Andreas... at first I didn't want to use any web.xml entries as this was just a test directory to run the examples of the oreilly book. I just wanted to compile the examples and run them without messing with web.xml. Nevertheless, I took your advice but I get the same server exceptions (cannot allocate servlet instance for path /jat/servlet/com.justatest.test.InitSnoop ... and ... cause NoClassDefFoundError: com/justatest/test/InitSnoop (wrong name: InitSnoop)) even when I run http://localhost:8080/jat/servlet/MyServletName after adding your entry into web.xml and restarting the server. It's looking like the problem lies somewhere else i.e. the url's I've been using are correct? thanks /j-p. On Fri, 20 Sep 2002, Andreas Mohrig wrote: A servlet residing in tomcat-root/webapps/jat/classes/com/justatest/test/MyServlet.class should be reachable under http://yourserver/jat/servlet/com.justatest.test.MyServlet , at lest if you put it in the right package (package com.justatest.test;, see the other answer below). If you define your servlet in your web.xml (which - in my humble opinion - you should always do), you get some more URLs for your servlet. The following will give you http://yourserver/jat/servlet/MyServletName and http://yourserver/jat/MyServletURL servlet servlet-nameMyServletName/servlet-name servlet-classcom.justatest.test.MyServlet/servlet-class /servlet servlet-mapping servlet-nameMyServletName/servlet-name url-pattern/MyServletURL/url-pattern /servlet-mapping Try it and tell us if it works for you too. --- JUSTATEST Art Online www.justatest.com -- 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: Solved! Dumb Question com.justatest.test.MyServlet error
That was it... thanks a bunch for figuring it out for me Jon. With Regards /j-p. On Sat, 21 Sep 2002, jon wingfield wrote: Open the InitSnoop.java source file. If the first line is not: package com.justatest.test; then that is your problem. The directory structure under WEB-INF/classes maps to the package stucture of your servlet and other java classes deployed in the webapp. Change the package name to the right one, recompile the class, redeploy and that should be it. Your servlet mapings are otherwise ok. Jon -Original Message- From: john-paul delaney [mailto:[EMAIL PROTECTED]] Sent: 21 September 2002 00:22 To: Tomcat Users List Subject: RE: Dumb Question com.justatest.test.MyServlet error Thanks Andreas... at first I didn't want to use any web.xml entries as this was just a test directory to run the examples of the oreilly book. I just wanted to compile the examples and run them without messing with web.xml. Nevertheless, I took your advice but I get the same server exceptions (cannot allocate servlet instance for path /jat/servlet/com.justatest.test.InitSnoop ... and ... cause NoClassDefFoundError: com/justatest/test/InitSnoop (wrong name: InitSnoop)) even when I run http://localhost:8080/jat/servlet/MyServletName after adding your entry into web.xml and restarting the server. It's looking like the problem lies somewhere else i.e. the url's I've been using are correct? thanks /j-p. On Fri, 20 Sep 2002, Andreas Mohrig wrote: A servlet residing in tomcat-root/webapps/jat/classes/com/justatest/test/MyServlet.class should be reachable under http://yourserver/jat/servlet/com.justatest.test.MyServlet , at lest if you put it in the right package (package com.justatest.test;, see the other answer below). If you define your servlet in your web.xml (which - in my humble opinion - you should always do), you get some more URLs for your servlet. The following will give you http://yourserver/jat/servlet/MyServletName and http://yourserver/jat/MyServletURL servlet servlet-nameMyServletName/servlet-name servlet-classcom.justatest.test.MyServlet/servlet-class /servlet servlet-mapping servlet-nameMyServletName/servlet-name url-pattern/MyServletURL/url-pattern /servlet-mapping Try it and tell us if it works for you too. --- JUSTATEST Art Online www.justatest.com -- 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] --- JUSTATEST Art Online www.justatest.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Apache2 and Tomcat4 on different boxes
snip Raj Mettai wrote: server.xml changes on Machine B(tomcat machine) --- Change the both the Engine Tag and Host tag defaultHost to tomcat hostName(ex: tomcat.apache.com) (This should match with your workers.properties host name.) Engine name=Standalone defaultHost=tomcat.apache.com debug=0 Host name=tomcat.apache.com debug=0 appBase=webapps unpackWARs=true /Host /Engine Hi All. In above modification to Enging and Host tags , R U referring to the top level container in the container hiararchy or the virtual host ??? THX -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
owner.group for TomCAt
Hi All. Should the owner.groupd for Tomcats be nobody.nogroup rather than root.root ??? -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: mod_jk2, virtual hosts, JkUriSet
Would you mind posting your Apache 2.0.40 httpd.conf and workers.properties files, Tomcat 4.1.11 server.xml and jk2.properties files? I'm still not able get this thing working. All I want to do is have two Apache virtual hosts pointing to one Tomcat 4.1.10 instance. This is driving me crazy... -Original Message- From: Dom [mailto:[EMAIL PROTECTED]] Sent: September 21, 2002 2:02 AM To: Tomcat Users List Subject: Re: mod_jk2, virtual hosts, JkUriSet Hi jk2 freaks I've applied Dmitry patch on jakarta-tomcat-connectors-4.1.11-src, and now virtual hosts are working without using JkUriSet. (JkUriSet was not avalaible with Apache 1.3) I now can use Apache 2.0.40 or Apache 1.3.26 + TOMCAT 4.1.11 and virtual hosts using only workers2.properties and jk2.properties. Next step, using unix sockets Dom - Original Message - From: Dmitry Letin [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Saturday, September 21, 2002 3:43 AM Subject: Re: mod_jk2, virtual hosts, JkUriSet I finally found the bug (or whatever it is) that caused problems: in source file jk/native2/server/apache2/mod_jk2.c in line 680 (I have revision 1.49) that reads: uriEnv = workerEnv-uriMap-mapUri(env, workerEnv-uriMap,NULL,r-uri); NULL should be replaced to r-server-server_hostname (without the quotes of course) This NULL - was the reason for invalid handling of virtual hosts. I have not tested this a lot yet, but virtual hosts are dispached properly now :-) :-) This fix is for apache2 only. I actually typed manually the stuff above - could not do copy/paste - hope I made no typos Recompile mod_jk2.so after this change - and all works Dmitry Hello all, I'm having the same problem, and I've been banging my head against it on and off for about a week with no more success than anyone else... Essentially, we're all trying to map the root of different virtual hosts to a different context within tomcat, right? I started looking elsewhere and found that Resin's apache module utilizes the ServerName directive within a VirtualHost block to select different web apps... If it's a make-or-break deal, you might want to look there. Another workaround possibility that I'm toying with now is to use mod_rewrite within apache to redirect *.jsp requests from http://www.vhost1.com to http://www.vhost1.com/vh1/ and map the /vh1/*.jsp uri to the proper context. It just seems virtual host support via mod_jk2 is not possible without duct tape and bubble gum, which is a shame because the unix socket feature is fantastic... Ah, for the good old days of JServ/JSSI... - Original Message - From: Dmitry Letin [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Thursday, September 19, 2002 6:46 PM Subject: RE: mod_jk2, virtual hosts, JkUriSet Hi Robert, In my config files I of course use real domains. I did try to use only workers2.properties files for configuration. It seems that virtual host part is ignored, so that these are the same when jk2 selects worker: # The virtual host part seems to be ignored anyway # [uri:www.vhost1.com:80/*.jsp] - not working as well [uri:www.vhost1.com/*.jsp] worker=ajp13:localhost:8009 # The virtual host part seems to be ignored anyway # [uri:www.vhost2.com:80/*.jsp] - not working as well [uri:www.vhost2.com/*.jsp] worker=ajp13:localhost:8013 My problem comes from the fact that the virtual host part in uri seems to be ignored when jk2 selects a worker, and only url path is cheched by jk2 code. Because that part is the same it is dispached to the same tomcat instance. I do have proper entries in my /etc/hosts file (I'm on Linux) and I did try this as well [uri:142.54.3.10:80] alias=www.vhost1.com:80 It did not help. I promise to write a how-to on this if I manage to solve this problem :-) But I have doubts I can solve it :-( Dmitry -Original Message- From: Robert L Sowders [mailto:[EMAIL PROTECTED]] Sent: Thursday, September 19, 2002 6:32 PM To: Tomcat Users List Subject: Re: mod_jk2, virtual hosts, JkUriSet Forgot to mention, Here's a snip from the default workers2.properties file from the src [uri:127.0.0.1:8003] info=Example virtual host. Make sure myVirtualHost is in /etc/hosts to test it alias=myVirtualHost:8003 On a windows machine the hosts file is in c:\WinNT\system32\drivers\etc You'll also have to define the connector in the server.xml file. Robert L Sowders [EMAIL PROTECTED] 09/19/2002 02:48 PM Please respond to Tomcat Users List To: Tomcat Users List [EMAIL PROTECTED] cc: Subject:Re: mod_jk2, virtual hosts, JkUriSet H, looks like you got some funny domains for those VirtualHosts as well as some nonstandard JkUriSet statements. You probably have a problem with one or both. Others have been successful.
RE: mod_jk2, virtual hosts, JkUriSet
Hi Dave, As I understand from the jk2 source code, the main apache server (that is not a virtual host) is reffered to in mod_jk2 code as NULL (for uri mapping purposes). Following this logic the check is right. I did not have this check in my fix because all my hosts in apache httpd.conf are virtual. I have not tested anything yet - it is a weekend after all Dmitry From: Short, Dave [mailto:[EMAIL PROTECTED]] Sent: Сб 21/09/2002 1:01 To: 'Tomcat Users List' CC: Subject: RE: mod_jk2, virtual hosts, JkUriSet Dmitry, It looks like the code the developers added was different from your original code. Here's your code: uriEnv = workerEnv-uriMap-mapUri(env, workerEnv-uriMap,NULL,r-uri); NULL should be replaced to r-server-server_hostname (without the quotes of course) and here's their code: -uriEnv = workerEnv-uriMap-mapUri(env, workerEnv-uriMap,NULL,r-uri ); +uriEnv = workerEnv-uriMap-mapUri(env, workerEnv-uriMap, +r-server-is_virtual ? r-server-server_hostname : NULL, +r-uri ); Looks like they added a check for a virtual host before executing your code. Have you had a chance to test this? -Original Message- From: Dmitry Letin [mailto:[EMAIL PROTECTED]] Sent: September 21, 2002 8:50 AM To: [EMAIL PROTECTED] Subject: Re: mod_jk2, virtual hosts, JkUriSet Developers have already added this fix: http://www.mail-archive.com/tomcat-dev%40jakarta.apache.org/msg33556.html That was really fast. Dmitry - Original Message - From: Robert L Sowders [mailto:[EMAIL PROTECTED]] Sent: Сб 21/09/2002 2:16 To: Tomcat Users List CC: Dmitry Letin Subject: Re: mod_jk2, virtual hosts, JkUriSet Hello, I'm glad you got it working. Have you posted a bug at http://www.mail-archive.com/tomcat-dev%40jakarta.apache.org/ I'm sure the developers of JK2 would be interested in your patch? You might have already, their web site has not been updating for awhile now. rls -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] winmail.dat -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: mod_jk2, virtual hosts, JkUriSet
Hi Dave RH 7.3, Apache 2.0.40, TC 4.1.11, j2sdk1.4.1 fcs - httpd.conf ( I use a vhosts.conf) : Nothing special, the regular : NameVirtualHost 10.0.0.11:80 VirtualHost 10.0.0.11:80 ServerName host1.net ... VirtualHost 10.0.0.11:80 ServerName host2.net ... - workers2.properties (complete for 2 v.hosts, only managing jsp's using lb load balancer) [shm] file=${serverRoot}/logs/shm.file size=1048576 [lb:lb] info=Default load balancer. debug=0 # Example socket channel, override port and host. [channel.socket:localhost:8009] port=8009 lb_factor=1 group=lb host=10.0.0.11 disabled=0 # define the worker [ajp13:localhost:8009] channel=channel.socket:localhost:8009 [uri:/host1.net/*.jsp] info=host1.net default context. group=lb debug=0 [uri:/host2.net/*.jsp] info=host2.net default context. group=lb debug=0 # Map /jkstatus to the status worker. # define the worker [status:status] # Uri mapping [uri:/jkstatus/*] worker=status:status - jk2.properties Stock : all lines commented - server.xml Stock, only added v. hosts Host name=host1.net ... Host name=host2.net ... And, of course, the patch from Dmitry, or the http://www.mail-archive.com/tomcat-dev%40jakarta.apache.org/msg33556.html one before compiling the connectors, both are working fine. My configure : ./configure --with-apxs=/usr/local/apache/bin/apxs --with-apxs2=/usr/local/a pache2/bin/apxs --with-tomcat41=/usr/local/jakarta-tomcat-4.1.11-LE-jdk14 Hope it will help you Dom - Original Message - From: Short, Dave [EMAIL PROTECTED] To: 'Tomcat Users List' [EMAIL PROTECTED] Sent: Saturday, September 21, 2002 10:30 PM Subject: RE: mod_jk2, virtual hosts, JkUriSet Would you mind posting your Apache 2.0.40 httpd.conf and workers.properties files, Tomcat 4.1.11 server.xml and jk2.properties files? I'm still not able get this thing working. All I want to do is have two Apache virtual hosts pointing to one Tomcat 4.1.10 instance. This is driving me crazy... -Original Message- From: Dom [mailto:[EMAIL PROTECTED]] Sent: September 21, 2002 2:02 AM To: Tomcat Users List Subject: Re: mod_jk2, virtual hosts, JkUriSet Hi jk2 freaks I've applied Dmitry patch on jakarta-tomcat-connectors-4.1.11-src, and now virtual hosts are working without using JkUriSet. (JkUriSet was not avalaible with Apache 1.3) I now can use Apache 2.0.40 or Apache 1.3.26 + TOMCAT 4.1.11 and virtual hosts using only workers2.properties and jk2.properties. Next step, using unix sockets Dom - Original Message - From: Dmitry Letin [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Saturday, September 21, 2002 3:43 AM Subject: Re: mod_jk2, virtual hosts, JkUriSet I finally found the bug (or whatever it is) that caused problems: in source file jk/native2/server/apache2/mod_jk2.c in line 680 (I have revision 1.49) that reads: uriEnv = workerEnv-uriMap-mapUri(env, workerEnv-uriMap,NULL,r-uri); NULL should be replaced to r-server-server_hostname (without the quotes of course) This NULL - was the reason for invalid handling of virtual hosts. I have not tested this a lot yet, but virtual hosts are dispached properly now :-) :-) This fix is for apache2 only. I actually typed manually the stuff above - could not do copy/paste - hope I made no typos Recompile mod_jk2.so after this change - and all works Dmitry Hello all, I'm having the same problem, and I've been banging my head against it on and off for about a week with no more success than anyone else... Essentially, we're all trying to map the root of different virtual hosts to a different context within tomcat, right? I started looking elsewhere and found that Resin's apache module utilizes the ServerName directive within a VirtualHost block to select different web apps... If it's a make-or-break deal, you might want to look there. Another workaround possibility that I'm toying with now is to use mod_rewrite within apache to redirect *.jsp requests from http://www.vhost1.com to http://www.vhost1.com/vh1/ and map the /vh1/*.jsp uri to the proper context. It just seems virtual host support via mod_jk2 is not possible without duct tape and bubble gum, which is a shame because the unix socket feature is fantastic... Ah, for the good old days of JServ/JSSI... - Original Message - From: Dmitry Letin [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Thursday, September 19, 2002 6:46 PM Subject: RE: mod_jk2, virtual hosts, JkUriSet Hi Robert, In my config files I of course use real domains. I did try to use only workers2.properties files for configuration. It seems that virtual host part is ignored, so that these are the same when jk2 selects worker: # The virtual host part seems to be ignored anyway # [uri:www.vhost1.com:80/*.jsp] - not working as well [uri:www.vhost1.com/*.jsp]
RE: accessing ejbs deployed in jboss from tomcat/apache
are you connecting to your beans through RMI or some other mechanism. I am implementing a simular situation using apache2 - mod_jk2 - tomcat - jonas. I have to tell java through setProperties where to locate the rmi registry. if this doesn't help you will have to send more information - like what error messages do you get? Thanks -Original Message- From: Nani Jon [mailto:[EMAIL PROTECTED]] Sent: Saturday, September 21, 2002 1:44 AM To: tomcat users Subject: accessing ejbs deployed in jboss from tomcat/apache Hi all: I have been able to integrate jboss-3.0.0_tomcat-4.0.3 with apache 2, mod_jk2.dll (on a win2k box). The static content is getting displayed correctly. The problem is that I am not able to access my EJBs using apache which talks to the jboss embeded tomcat. I can access my EJBs on port 8080 (the embeded tomcat) without any problems. Am I supposed to make a reference to my EJBs somewhere else as well? And where? There should be a way for the embeded tomcat when it receives a request from apache to talk to jboss. After all they are running in the same VM. Any help will be appreciated. Regards, Nanijon. - Do You Yahoo!? Yahoo! Finance - Get real-time stock quotes -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
How to use Port 80?
Hi Im running Tomcat 4.1.10 on Red Hat 7.3. Im trying to change the port to 80 from 8080. I made the following change in my server.xml From: Connector className=org.apache.coyote.tomcat4.CoyoteConnector port=8080 minProcessors=5 maxProcessors=75 enableLookups=true redirectPort=8443 acceptCount=10 debug=0 connectionTimeout=2 useURIValidationHack=false / to: Connector className=org.apache.coyote.tomcat4.CoyoteConnector port=80 minProcessors=5 maxProcessors=75 enableLookups=true redirectPort=8443 acceptCount=10 debug=0 connectionTimeout=2 useURIValidationHack=false / then I restart Tomcat4 with the Service Configuration utility and I get the following message in the browser when I go to http://localhost An error occured while loading http://localhost/: Could not connect to host localhost Thanks in advance for any help Hal Haig -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Tomcat4.0 with SSL on windows2000
Hello, I am trying to integrate tomcat4.0 will SSL on windows2000. I did the following steps. 1. Downloaded jsse and set the classpath for the jars 2. keytool -genkey -alias tomcat -keyalg RSA 3. keytool -certreq -keyalg RSA -alias tomcat -file certreq.csr 4. Submited the certreq.csr to verisign for 14days trial server ID 5. I got a file getcacert.cer and a certificate as a text by email. 6 Copied the text and save it as xxx.crt 7. Imported the getcacert.cer on to the IE5 Trusted root authoroities 8. Imported both getcacert.cer and xxx.crt to .keystore created in my home directory. 9. Uncommented the https part of connector in server.xml and made clientAuth=true 10.Started the tomcat Now the problem is when I enter the url https://localhost:8443 it is showing me the empty 'Client Authentication' dialog box. I do not understand where I have gone wrong. I tried another approch of creating the certificate using openssl and importing it to the .keystore. But while importing it gives me error public key and keystore doesn't match. Can anyone of you please help me as soon as possible with the steps to follow in achieving this. Thanking you, Regards Shubha
Re: How to use Port 80?
Could you have assigned 80 to HTTP requests already ??? - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, September 21, 2002 11:03 PM Subject: How to use Port 80? Hi Im running Tomcat 4.1.10 on Red Hat 7.3. Im trying to change the port to 80 from 8080. I made the following change in my server.xml From: Connector className=org.apache.coyote.tomcat4.CoyoteConnector port=8080 minProcessors=5 maxProcessors=75 enableLookups=true redirectPort=8443 acceptCount=10 debug=0 connectionTimeout=2 useURIValidationHack=false / to: Connector className=org.apache.coyote.tomcat4.CoyoteConnector port=80 minProcessors=5 maxProcessors=75 enableLookups=true redirectPort=8443 acceptCount=10 debug=0 connectionTimeout=2 useURIValidationHack=false / then I restart Tomcat4 with the Service Configuration utility and I get the following message in the browser when I go to http://localhost An error occured while loading http://localhost/: Could not connect to host localhost Thanks in advance for any help Hal Haig -- 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: How to use Port 80?
not intentionally, how would I know if I did that? -- Original Message -- Reply-To: Tomcat Users List [EMAIL PROTECTED] From: Arthur Chan [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Subject: Re: How to use Port 80? Date: Sat, 21 Sep 2002 23:34:53 -0400 Could you have assigned 80 to HTTP requests already ??? - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, September 21, 2002 11:03 PM Subject: How to use Port 80? Hi Im running Tomcat 4.1.10 on Red Hat 7.3. Im trying to change the port to 80 from 8080. I made the following change in my server.xml From: Connector className=org.apache.coyote.tomcat4.CoyoteConnector port=8080 minProcessors=5 maxProcessors=75 enableLookups=true redirectPort=8443 acceptCount=10 debug=0 connectionTimeout=2 useURIValidationHack=false / to: Connector className=org.apache.coyote.tomcat4.CoyoteConnector port=80 minProcessors=5 maxProcessors=75 enableLookups=true redirectPort=8443 acceptCount=10 debug=0 connectionTimeout=2 useURIValidationHack=false / then I restart Tomcat4 with the Service Configuration utility and I get the following message in the browser when I go to http://localhost An error occured while loading http://localhost/: Could not connect to host localhost Thanks in advance for any help Hal Haig -- 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: precompile or not Jsps?
Vincent == Vincent Gaboriau [EMAIL PROTECTED] writes: Vincent Hi all, Vincent How do you do with your JSPs? Vincent- You precompile them with JSPC? Vincent- You request all your JSPs with jsp_precompile parameter? Vincent- You wait for anybody requests the JSPs? Vincent What is the best solution for you? There is no best solution. You need to understand the tradeoffs and your goals. I'll try to list some of them here: Precompiling JSPs at build time: Advantages: -Earlier error detection, and a more robust build process. -No expensive and complicated calls to JSPC at runtime. -Reduced risk (if there was any) of accidently displaying your JSP code to users (as you can choose to not deploy them). -Reduced time to get the first view of a page. Disadvantages: -Completely integrating the modified servlet mappings can sometimes be complicated. -The resulting WAR file is specific to your current web container. Uing a servlet, like jsp_precompile, which causes all the JSP pages in an application to be compiled (I assume this is how this works, I've never tried it): Advantages: -Reduced time to get the first view of a page. -Easier to implement than precompiling JSPs at build time. -Somewhat earlier error detection. -In contrast to precompiling at build time, the WAR could still be portable to other web containers. Disadvantages: -Still need JSPC to be available at runtime, even if it's only called once per page. -Under undefined circumstances, could still somehow display JSP code to users. Doing neither of these, by just letting the web container compile JSP pages when they are first requested: Advantages: -No work to implement :) . -In iterative development, probably preferable to any precompilation strategy. Disadvantages: -Very late error detection, even deceptively later, if certain pages aren't requested very often. So, knowing all this, you should be able to make a reasonable decision, both for your development process, and your production deployment process. -- === David M. Karr ; Java/J2EE/XML/Unix/C++ [EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: How to use Port 80?
Normally that's the default - Apache (not Tomcat) uses it. Look at httpd.conf , the Listen directive, should read something like 192.168.4.5:80 ie the ip-addr:port In default RH u will find that under /etc/httpd/conf To look at a static list of port assignments : /etc/services I am not sure what u r tyring to do , but I hope that's helpful. - Original Message - From: [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Saturday, September 21, 2002 11:36 PM Subject: Re: How to use Port 80? not intentionally, how would I know if I did that? -- Original Message -- Reply-To: Tomcat Users List [EMAIL PROTECTED] From: Arthur Chan [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Subject: Re: How to use Port 80? Date: Sat, 21 Sep 2002 23:34:53 -0400 Could you have assigned 80 to HTTP requests already ??? - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, September 21, 2002 11:03 PM Subject: How to use Port 80? Hi Im running Tomcat 4.1.10 on Red Hat 7.3. Im trying to change the port to 80 from 8080. I made the following change in my server.xml From: Connector className=org.apache.coyote.tomcat4.CoyoteConnector port=8080 minProcessors=5 maxProcessors=75 enableLookups=true redirectPort=8443 acceptCount=10 debug=0 connectionTimeout=2 useURIValidationHack=false / to: Connector className=org.apache.coyote.tomcat4.CoyoteConnector port=80 minProcessors=5 maxProcessors=75 enableLookups=true redirectPort=8443 acceptCount=10 debug=0 connectionTimeout=2 useURIValidationHack=false / then I restart Tomcat4 with the Service Configuration utility and I get the following message in the browser when I go to http://localhost An error occured while loading http://localhost/: Could not connect to host localhost Thanks in advance for any help Hal Haig -- 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: How to use Port 80?
I looked in /etc/services and found ... ttp80/tcp www www-http# WorldWideWeb HTTP http 80/udp www www-http# HyperText Transfer Protocol ... I'm not sure how got there unless it was just part of RedHat 7.3. Im not running Apache or any other web server. Im trying to use Tomcat4 as my Web server. Should I change /etc/services and if so how? thanks again -- Original Message -- Reply-To: Tomcat Users List [EMAIL PROTECTED] From: Arthur Chan [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Subject: Re: How to use Port 80? Date: Sat, 21 Sep 2002 23:50:41 -0400 Normally that's the default - Apache (not Tomcat) uses it. Look at httpd.conf , the Listen directive, should read something like 192.168.4.5:80 ie the ip-addr:port In default RH u will find that under /etc/httpd/conf To look at a static list of port assignments : /etc/services I am not sure what u r tyring to do , but I hope that's helpful. - Original Message - From: [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Saturday, September 21, 2002 11:36 PM Subject: Re: How to use Port 80? not intentionally, how would I know if I did that? -- Original Message -- Reply-To: Tomcat Users List [EMAIL PROTECTED] From: Arthur Chan [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Subject: Re: How to use Port 80? Date: Sat, 21 Sep 2002 23:34:53 -0400 Could you have assigned 80 to HTTP requests already ??? - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, September 21, 2002 11:03 PM Subject: How to use Port 80? Hi Im running Tomcat 4.1.10 on Red Hat 7.3. Im trying to change the port to 80 from 8080. I made the following change in my server.xml From: Connector className=org.apache.coyote.tomcat4.CoyoteConnector port=8080 minProcessors=5 maxProcessors=75 enableLookups=true redirectPort=8443 acceptCount=10 debug=0 connectionTimeout=2 useURIValidationHack=false / to: Connector className=org.apache.coyote.tomcat4.CoyoteConnector port=80 minProcessors=5 maxProcessors=75 enableLookups=true redirectPort=8443 acceptCount=10 debug=0 connectionTimeout=2 useURIValidationHack=false / then I restart Tomcat4 with the Service Configuration utility and I get the following message in the browser when I go to http://localhost An error occured while loading http://localhost/: Could not connect to host localhost Thanks in advance for any help Hal Haig -- 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] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: How to use Port 80?
No, don't change /etc/services because u r waiting for HTTP requests on port 80. That's the default. I cannot help because I have not used Tomcat as a web-server ! Most use Apache as a web server. - Original Message - From: [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Saturday, September 21, 2002 11:56 PM Subject: Re: How to use Port 80? I looked in /etc/services and found ... ttp80/tcp www www-http# WorldWideWeb HTTP http 80/udp www www-http# HyperText Transfer Protocol ... I'm not sure how got there unless it was just part of RedHat 7.3. Im not running Apache or any other web server. Im trying to use Tomcat4 as my Web server. Should I change /etc/services and if so how? thanks again -- Original Message -- Reply-To: Tomcat Users List [EMAIL PROTECTED] From: Arthur Chan [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Subject: Re: How to use Port 80? Date: Sat, 21 Sep 2002 23:50:41 -0400 Normally that's the default - Apache (not Tomcat) uses it. Look at httpd.conf , the Listen directive, should read something like 192.168.4.5:80 ie the ip-addr:port In default RH u will find that under /etc/httpd/conf To look at a static list of port assignments : /etc/services I am not sure what u r tyring to do , but I hope that's helpful. - Original Message - From: [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Saturday, September 21, 2002 11:36 PM Subject: Re: How to use Port 80? not intentionally, how would I know if I did that? -- Original Message -- Reply-To: Tomcat Users List [EMAIL PROTECTED] From: Arthur Chan [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Subject: Re: How to use Port 80? Date: Sat, 21 Sep 2002 23:34:53 -0400 Could you have assigned 80 to HTTP requests already ??? - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, September 21, 2002 11:03 PM Subject: How to use Port 80? Hi Im running Tomcat 4.1.10 on Red Hat 7.3. Im trying to change the port to 80 from 8080. I made the following change in my server.xml From: Connector className=org.apache.coyote.tomcat4.CoyoteConnector port=8080 minProcessors=5 maxProcessors=75 enableLookups=true redirectPort=8443 acceptCount=10 debug=0 connectionTimeout=2 useURIValidationHack=false / to: Connector className=org.apache.coyote.tomcat4.CoyoteConnector port=80 minProcessors=5 maxProcessors=75 enableLookups=true redirectPort=8443 acceptCount=10 debug=0 connectionTimeout=2 useURIValidationHack=false / then I restart Tomcat4 with the Service Configuration utility and I get the following message in the browser when I go to http://localhost An error occured while loading http://localhost/: Could not connect to host localhost Thanks in advance for any help Hal Haig -- 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] -- 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: Postgresql DataSource Tomcat 4.1 SQLException
Hi Paul, I am a newbie too, but trying to help. I had a problem like yours recently and found an error in my server.xml. I know you checked that file already, but can you send those (also web.xml) files to me please to see what I can do? Thanks Jose On Fri, Sep 20, 2002 at 11:10:41AM -0500, Paul Salazar wrote: Hi, I am trying to setup a postgresql datasource on tomcat 4.1 with much frustration. I have read all the threads out there concerning this matter and I can't see to find anyone who has a working example. What I have is this: Redhat 7.2 server running: Postgresql 7.2 Tomcat 4.1 I have a working Tomcat app that can connect to the Db and perform queries when manually loading the driver 'Class.forName(org.postgresql.Driver); and then doing a getConnection using the URL, Name, Password. But when trying to get a connection using a Datasource, as in, Context ctx = new InitialContext(); Context envctx = (Context)ctx.lookup(java:/comp/env); DataSource ds = (DataSource)envctx.lookup(jdbc/postgres); //jndi name of the datasource Connection conn = ds.getConnection(); the getConnection() statement throws an SQLException: Cannot load JDBC driver class 'null' I have gone over all the server.xml and web.xml files with a fine tooth comb and assure you that is not the problem. I have also tried using the jxDBCon drivers with the same results. I have come to the conclusion that it must be a tomcat problem. Has anyone gotten this to work with this config?? Paul Salazar -- 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]