Re: ServletContextListener
lightbulb432 wrote: Can requests potentially arrive at a servlet before the ServletContextListener's contextInitialized method has completed? I ask because the method occurs as a notification once the servlet context is ready to accept requests. Is there a chance, then, that a request could begin being served while your contextInitialized method is being carried out (especially if it's long-running)? Is contextInitialized suitable only for things like logging the fact that a context is ready, or can it be used for setup that MUST occur before the first request is accepted? If not the latter, what can be used to serve this function? The spec says: "All ServletContextListeners are notified of context initialization before any filter or servlet in the web application is initialized. " Depends on what they do to know if they complete before servlets are started. p smime.p7s Description: S/MIME Cryptographic Signature
Re: Invalid Content-Length error for the size greater than
"Mark Thomas" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Christopher Schultz wrote: >> Mark Thomas wrote: >>> It's fixed in Tomcat. See Bill's reply to your original post on this >>> topic for possible mod_jk / AJP issues. >> >> Oh, sorry. I see that it's a bug in the Java half of the Jk connector. > I haven't looked at the code, but from Bill's post it looks like he > has and there are possible issues with mod_jk and and Tomcat AJP > connectors. > Yes, the exception is thrown because the first character in the Content-Length header isn't a digit, so I'm guessing that it is coming in with a leading '-' from mod_jk. Otherwise, while the Java side could be improved, the JK Connector would handle this correctly. >> Since the Java part of the connector is bundled with Tomcat, is that >> considered to be "part" of mod_jk (which I always thought of as the >> c/c++ apache httpd module) or "part" of Tomcat? For instance, if I were >> to log a bug... where would it go? I don't see a proper product in >> bugzilla (Connectors, Tomcat Connectors, mod_jk, Apache mod_jk, ... none >> of those exist). > I'd use Connector:AJP but it doesn't really matter. > >> I'd even be happy to provide a patch; I already made the mods in a fresh >> source copy and they compile... no testing, yet. > Great. When you are happy with your patch, open a bugzilla entry and > attach the patch. > > Mark > > > - > To start a new topic, e-mail: users@tomcat.apache.org > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat Deployer Problem
Hi, listen I've only done this programmaticly before, so here goes... I think you confusing the type of compilation they talking about... it doesnt compile the whole application, just the JSP files. You still need to compile your project. If you look at the netbeans folders, assuming thats what you using, you will see AFTER you have compiled the project that in creates a BUILD folder which holds all the classes and the JSP files. THATS what they want you to point at... and its the JSP's that will be compiled. If you want to, I think you can replace all the class files with the java equivalent, and it will then compile those as well. Products like NB are so good, and incidentally are actually using this exact same method, that to me, its pointless, why not just deploy the WAR file, but ok maybe you want it this way. SO.. build: MUST point at the output of Netbeans the BUILD folder. ALSO remember that you on windows and you have to use "C" paths ie C:\projects\ixania\build IS WRONG use C:\\projects\\ixania\\build webapp: Is simply the full path to the location of your WAR again once you have compiled in NB the WAR will be located in the DIST folder. Note if you look at the ant script for DEPLOY you dont need the BUILD folder if you have the WAR... its already done path: Is the most interesting its the URI or context path of your application normally it is the same name as your webapp, and for normal WAR deployment it has to be that way... ie when you drop a WAR into the webapp folder but with this it can actually be anything so if you type /TESTING/MYAPP When its deployed it will be addressed as http://loacalhost:8080/TESTING/MYAPP/ Naturally you need to install ant put it in your classpath, use run->cmd to get a Dos box, move to the folder with this build script in it, and run ant deploy, or whatever other task you want. Have fun. - Original Message - From: "Skijor" <[EMAIL PROTECTED]> To: Sent: Saturday, June 09, 2007 5:12 PM Subject: Tomcat Deployer Problem Does anyone use the tomcat deployer? Will someone show me an example deployer.properties with the following properties defined and where they map to on your filesystem? The manual lacks an example and I can't figure it out from the build.xml file. build:C:\webapps\ixania\build webapp:ixania path:/ixania Is it correct to put this file at the root of the deployer installation and try to run it from there? How does the deployer find the source code using ${build}/webapp${path}? thanks - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
ServletContextListener
Can requests potentially arrive at a servlet before the ServletContextListener's contextInitialized method has completed? I ask because the method occurs as a notification once the servlet context is ready to accept requests. Is there a chance, then, that a request could begin being served while your contextInitialized method is being carried out (especially if it's long-running)? Is contextInitialized suitable only for things like logging the fact that a context is ready, or can it be used for setup that MUST occur before the first request is accepted? If not the latter, what can be used to serve this function? -- View this message in context: http://www.nabble.com/ServletContextListener-tf3894944.html#a11042104 Sent from the Tomcat - User mailing list archive at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: ajp advantages over http connector
Tomcat wrote: Hello is there any advantage using ajp over http connector ? what are those advantages? There are different use cases. You'll find some differences of opinion as regards the advantages. AJP is a connector protocol, you can't use it to serve directly, either use mod_jk or mod_proxy_ajp. You can serve HTTP behind mod_proxy_http in a cluster behind Apache HTTPD. I use AJP in preference to HTTP in a cluster behind Apache (via mod_proxy_ajp) to provide application services to our site where some static files are better served through a cache. Don't know offhand if there are stats for comparison. What is your particular situation? p Cheers Adam - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] smime.p7s Description: S/MIME Cryptographic Signature
Tomcat Deployer Problem
Does anyone use the tomcat deployer? Will someone show me an example deployer.properties with the following properties defined and where they map to on your filesystem? The manual lacks an example and I can't figure it out from the build.xml file. build:C:\webapps\ixania\build webapp:ixania path:/ixania Is it correct to put this file at the root of the deployer installation and try to run it from there? How does the deployer find the source code using ${build}/webapp${path}? thanks Building a website is a piece of cake. Yahoo! Small Business gives you all the tools to get online. http://smallbusiness.yahoo.com/webhosting - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
ajp advantages over http connector
Hello is there any advantage using ajp over http connector ? what are those advantages? Cheers Adam - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomcat Deployer Problem
Does anyone use the tomcat deployer? Will someone show me an example deployer.properties with the following properties defined and where they map to on your filesystem? The manual lacks an example and I can't figure it out from the build.xml file. build:C:\webapps\ixania\build webapp:ixania path:/ixania Is it correct to put this file at the root of the deployer installation and try to run it from there? How does the deployer find the source code using ${build}/webapp${path}? thanks - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Invalid Content-Length error for the size greater than
Christopher Schultz wrote: > Mark Thomas wrote: >> It's fixed in Tomcat. See Bill's reply to your original post on this >> topic for possible mod_jk / AJP issues. > > Oh, sorry. I see that it's a bug in the Java half of the Jk connector. I haven't looked at the code, but from Bill's post it looks like he has and there are possible issues with mod_jk and and Tomcat AJP connectors. > Since the Java part of the connector is bundled with Tomcat, is that > considered to be "part" of mod_jk (which I always thought of as the > c/c++ apache httpd module) or "part" of Tomcat? For instance, if I were > to log a bug... where would it go? I don't see a proper product in > bugzilla (Connectors, Tomcat Connectors, mod_jk, Apache mod_jk, ... none > of those exist). I'd use Connector:AJP but it doesn't really matter. > I'd even be happy to provide a patch; I already made the mods in a fresh > source copy and they compile... no testing, yet. Great. When you are happy with your patch, open a bugzilla entry and attach the patch. Mark - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Invalid Content-Length error for the size greater than
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Mark, Mark Thomas wrote: > Christopher Schultz wrote: >> Filip, >> >> Filip Hanik - Dev Lists wrote: >>> the servlet specification defines Content-Length as an int. even >>> though in some places tomcat has it as a long, you are still running >>> into this limitation so the problem is in the spec, and needs to be >>> corrected there >> I've seen this before in other containers, and honestly, I consider it a >> bug. > > It's fixed in Tomcat. See Bill's reply to your original post on this > topic for possible mod_jk / AJP issues. Oh, sorry. I see that it's a bug in the Java half of the Jk connector. Since the Java part of the connector is bundled with Tomcat, is that considered to be "part" of mod_jk (which I always thought of as the c/c++ apache httpd module) or "part" of Tomcat? For instance, if I were to log a bug... where would it go? I don't see a proper product in bugzilla (Connectors, Tomcat Connectors, mod_jk, Apache mod_jk, ... none of those exist). I'd even be happy to provide a patch; I already made the mods in a fresh source copy and they compile... no testing, yet. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.7 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFGarkM9CaO5/Lv0PARAlEPAJ9d82hPF95qz3pcvTqvQhTg2mcwmACfZEM2 J0fmFINyti8bj8maVhlqPVo= =51CX -END PGP SIGNATURE- - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Invalid Content-Length error for the size greater than
Christopher Schultz wrote: > Filip, > > Filip Hanik - Dev Lists wrote: >> the servlet specification defines Content-Length as an int. even >> though in some places tomcat has it as a long, you are still running >> into this limitation so the problem is in the spec, and needs to be >> corrected there > > I've seen this before in other containers, and honestly, I consider it a > bug. It's fixed in Tomcat. See Bill's reply to your original post on this topic for possible mod_jk / AJP issues. Mark - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Invalid Content-Length error for the size greater than
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Filip, Filip Hanik - Dev Lists wrote: > the servlet specification defines Content-Length as an int. even > though in some places tomcat has it as a long, you are still running > into this limitation so the problem is in the spec, and needs to be > corrected there I've seen this before in other containers, and honestly, I consider it a bug. Yes, the servlet specification defines Content-Length as an int. However, you can see in the stack trace that Tomcat isn't using the servlet API to fetch the Content-Length from the HTTP headers. Instead, Tomcat could parse the header as a long integer and issue a warning if the value is larger than Integer.MAX_VALUE. This would still allow servlet code to fetch the Content-Length of a request using request.getHeaderString("Content-Length") and parsing it as a long integer. Just my two cents. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.7 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFGaqcE9CaO5/Lv0PARAk7TAJwJ+ZuGzoc1TnfhQT9deTEYF8G19QCePsix cgM2luMToGtjfW8rygm16fI= =hNAm -END PGP SIGNATURE- - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat5.5 Ubuntu startup error
Thanks for all your help, i have finally got the server running on localhost:8080. I pointed the JAVA_HOME at the sun jdk instead of the default ubuntu jvm However i am now having a problem integrating it with apache2 mod_jk It wont read .jsp files, the browser genrates this error: Service Temporarily Unavailable The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later. And the server logs say this -> [Sat Jun 09 20:06:34 2007] [17814:5824] [info] ajp_connection_tcp_get_message::jk_ajp_common.c (955): Tomcat has forced a connection close for socket 17 [Sat Jun 09 20:06:34 2007] [17814:5824] [error] ajp_get_reply::jk_ajp_common.c (1531): Tomcat is down or refused connection. No response has been sent to the client (yet) [Sat Jun 09 20:06:34 2007] [17814:5824] [info] ajp_service::jk_ajp_common.c (1751): Receiving from tomcat failed, recoverable operation attempt=0 [Sat Jun 09 20:06:34 2007] [17814:5824] [info] ajp_service::jk_ajp_common.c (1783): Sending request to tomcat failed, recoverable operation attempt=1 [Sat Jun 09 20:07:04 2007] [17814:5824] [info] ajp_connection_tcp_get_message::jk_ajp_common.c (955): Tomcat has forced a connection close for socket 17 [Sat Jun 09 20:07:04 2007] [17814:5824] [error] ajp_get_reply::jk_ajp_common.c (1531): Tomcat is down or refused connection. No response has been sent to the client (yet) [Sat Jun 09 20:07:04 2007] [17814:5824] [info] ajp_service::jk_ajp_common.c (1751): Receiving from tomcat failed, recoverable operation attempt=1 [Sat Jun 09 20:07:04 2007] [17814:5824] [info] ajp_service::jk_ajp_common.c (1783): Sending request to tomcat failed, recoverable operation attempt=2 [Sat Jun 09 20:07:04 2007] [17814:5824] [error] ajp_service::jk_ajp_common.c (1794): Error connecting to tomcat. Tomcat is probably not started or is listening on the wrong port. worker=worker1 failed [Sat Jun 09 20:07:04 2007] [17814:5824] [info] jk_handler::mod_jk.c (1978): Service error=0 for worker=worker1 Does anybody know what is going wrong with this? Cheers Will On 6/8/07, Matthew Whittaker-Williams <[EMAIL PROTECTED]> wrote: On Friday 08 June 2007 15:16, Leonel wrote: > On 6/7/07, Will Parkinson <[EMAIL PROTECTED]> wrote: > > Hi All, > > > > I am having a few problems with tomcat 5.5 on ubuntu feisty > > > > When i start the tomcat service, its outputs that its started ok, but > > when i view the status (/etc/init.d/tomcat5.5 status) it says the service > > is not running. > > > > This is in the /var/log/tomcat5.5/catalina.out logfile > > > > libgcj: unknown option: -Xmx128M > > 08/06/2007 14:04:55 5890 jsvc.exec error: Cannot create Java VM > > 08/06/2007 14:04:55 5889 jsvc.exec error: Service exit with a return > > value of 1 > > > > > > Does anybody know how to fix this problem? Or does anybody know where to > > find the libgcj file so i can fix it myself? > > > > Cheers > > > > Will > > enable multiverse and install sun-java6-jdk Where did you place these options? and did you set it in JAVA_OPTS or CATALINA_OPTS? Here is my line which works fine: /etc/default/tomcat/tomcat-5.5 JAVA_OPTS="-Xmx4g -Xms2g -XX:NewSize=1g -XX:MaxPermSize=512m -XX:SurvivorRatio=4 -XX: +UseParallelGC -XX:+AggressiveHeap -Djava.awt.headless=true" Kind regards Matthew - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Will Parkinson MediaArchitecs / BusinessPartner Ph: (07) 3846 2873 Mob: 0433 143 272 0424 433 816