Re: Mysql driver problem...
I got that same message myself many times. Are you trying from the root context? If so, you'll need resource-ref descriptionDB Connection/description res-ref-namejdbc/root/res-ref-name res-typejavax.sql.DataSource/res-type res-authContainer/res-auth /resource-ref in web.xml and Context path=/root docBase=root debug=5 reloadable=true crossContext=true in server.xml that's what worked for me anyway Shawn On Mon, 2002-12-30 at 16:22, Keith Pemberton wrote: Ok, first off sorry if this is a little vague and I can write more details later. Anyway, I am new at this stuff with setting up the mysql driver to work with tomcat by setting a JNDI Datasource. I followed the directions under that heading in the documentation from the Tomcat website for the mysql driver, but I keep getting a Cannot load JDBC driver class 'null' message when I try to create a connection using the driver. I put the .jar file in the $TOMCAT/common/lib directory and restarted tomcat. Anyone have any quick tips for me to try? I can post my code later if yall need it; it's just late right now and I don't feel like cutting and pasting. Anyway, thanks in advance! Keith -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- shawn [EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Mysql driver problem...
Well, my JNDI name for the resource is jdbc/gatep5 and that is what I have as the ResourceParams name=jdbc/gatep5. Then I translated that name into the web.xml which is under the ROOT directory of $Tomcat/webapps. Shouldn't this be ok? Keith On Mon, 2002-12-30 at 02:03, shawn wrote: I got that same message myself many times. Are you trying from the root context? If so, you'll need resource-ref descriptionDB Connection/description res-ref-namejdbc/root/res-ref-name res-typejavax.sql.DataSource/res-type res-authContainer/res-auth /resource-ref in web.xml and Context path=/root docBase=root debug=5 reloadable=true crossContext=true in server.xml that's what worked for me anyway Shawn On Mon, 2002-12-30 at 16:22, Keith Pemberton wrote: Ok, first off sorry if this is a little vague and I can write more details later. Anyway, I am new at this stuff with setting up the mysql driver to work with tomcat by setting a JNDI Datasource. I followed the directions under that heading in the documentation from the Tomcat website for the mysql driver, but I keep getting a Cannot load JDBC driver class 'null' message when I try to create a connection using the driver. I put the .jar file in the $TOMCAT/common/lib directory and restarted tomcat. Anyone have any quick tips for me to try? I can post my code later if yall need it; it's just late right now and I don't feel like cutting and pasting. Anyway, thanks in advance! Keith -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- shawn [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: Mysql driver problem...
just like the example, I should think that would be ok. my point was Context path=/root docBase=root debug=5 reloadable=true crossContext=true and not sililar to the following which I found in server.xml !-- Tomcat Root Context -- !-- Context path= docBase=ROOT debug=0/ -- I tried Context path= docBase=ROOT debug=0/ and got the same message you did. On Mon, 2002-12-30 at 17:09, Keith Pemberton wrote: Well, my JNDI name for the resource is jdbc/gatep5 and that is what I have as the ResourceParams name=jdbc/gatep5. Then I translated that name into the web.xml which is under the ROOT directory of $Tomcat/webapps. Shouldn't this be ok? Keith On Mon, 2002-12-30 at 02:03, shawn wrote: I got that same message myself many times. Are you trying from the root context? If so, you'll need resource-ref descriptionDB Connection/description res-ref-namejdbc/root/res-ref-name res-typejavax.sql.DataSource/res-type res-authContainer/res-auth /resource-ref in web.xml and Context path=/root docBase=root debug=5 reloadable=true crossContext=true in server.xml that's what worked for me anyway Shawn On Mon, 2002-12-30 at 16:22, Keith Pemberton wrote: Ok, first off sorry if this is a little vague and I can write more details later. Anyway, I am new at this stuff with setting up the mysql driver to work with tomcat by setting a JNDI Datasource. I followed the directions under that heading in the documentation from the Tomcat website for the mysql driver, but I keep getting a Cannot load JDBC driver class 'null' message when I try to create a connection using the driver. I put the .jar file in the $TOMCAT/common/lib directory and restarted tomcat. Anyone have any quick tips for me to try? I can post my code later if yall need it; it's just late right now and I don't feel like cutting and pasting. Anyway, thanks in advance! Keith -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- shawn [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] -- shawn [EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Tomcat log entries
These are typical 'code red' (afaik?) entries in your log.. Some infected server is still trying to infect your server, not that it will be infected but it will try for a certain amount of times at least. You could create a valid link to a null sized file to handle it. Which causes less load on your system than an 404. other than that.. There's little to be done about it.. (unless you can track down the admin of that box, and tell him to fix his server) Rob -Original Message- From: Laszlo Nadai [mailto:[EMAIL PROTECTED]] Sent: Sunday, December 29, 2002 5:39 To: 'Tomcat Users List' Subject: Tomcat log entries I am fairly new to Tomcat, scripts, etc. I found the following and similar entries in my access log file: 64.160.45.159 - - [28/Dec/2002:15:00:17 -0800] GET /scripts/root.exe?/c+dir HTTP/1.0 404 624 64.160.45.159 - - [28/Dec/2002:15:00:17 -0800] GET /MSADC/root.exe?/c+dir HTTP/1.0 404 618 64.160.45.159 - - [28/Dec/2002:15:00:17 -0800] GET /c/winnt/system32/cmd.exe?/c+dir HTTP/1.0 404 648 64.160.45.159 - - [28/Dec/2002:15:00:18 -0800] GET /d/winnt/system32/cmd.exe?/c+dir HTTP/1.0 404 648 64.160.45.159 - - [28/Dec/2002:15:00:19 -0800] GET /scripts/..%c1%1c../winnt/system32/cmd.exe?/c+dir HTTP/1.0 400 718 64.160.45.159 - - [28/Dec/2002:15:00:19 -0800] GET /scripts/..%c0%af../winnt/system32/cmd.exe?/c+dir HTTP/1.0 404 687 64.160.45.159 - - [28/Dec/2002:15:00:19 -0800] GET /scripts/..%c1%9c../winnt/system32/cmd.exe?/c+dir HTTP/1.0 404 687 64.160.45.159 - - [28/Dec/2002:15:00:20 -0800] GET /scripts/..%%35%63../winnt/system32/cmd.exe?/c+dir HTTP/1.0 400 721 64.160.45.159 - - [28/Dec/2002:15:00:20 -0800] GET /scripts/..%%35c../winnt/system32/cmd.exe?/c+dir HTTP/1.0 400 715 64.160.45.159 - - [28/Dec/2002:16:01:56 -0800] GET /scripts/root.exe?/c+dir HTTP/1.0 404 624 64.160.45.159 - - [28/Dec/2002:16:01:56 -0800] GET /MSADC/root.exe?/c+dir HTTP/1.0 404 618 64.160.45.159 - - [28/Dec/2002:16:01:58 -0800] GET /c/winnt/system32/cmd.exe?/c+dir HTTP/1.0 404 648 64.160.45.159 - - [28/Dec/2002:16:02:00 -0800] GET /d/winnt/system32/cmd.exe?/c+dir HTTP/1.0 404 648 64.160.45.159 - - [28/Dec/2002:16:02:04 -0800] GET /scripts/..%c1%1c../winnt/system32/cmd.exe?/c+dir HTTP/1.0 400 718 64.160.45.159 - - [28/Dec/2002:16:02:06 -0800] GET /scripts/..%c0%af../winnt/system32/cmd.exe?/c+dir HTTP/1.0 404 687 64.160.45.159 - - [28/Dec/2002:16:02:07 -0800] GET /scripts/..%c1%9c../winnt/system32/cmd.exe?/c+dir HTTP/1.0 404 687 64.160.45.159 - - [28/Dec/2002:16:02:09 -0800] GET /scripts/..%%35%63../winnt/system32/cmd.exe?/c+dir HTTP/1.0 400 721 64.160.45.159 - - [28/Dec/2002:16:02:10 -0800] GET /scripts/..%%35c../winnt/system32/cmd.exe?/c+dir HTTP/1.0 400 715 64.165.213.97 - - [28/Dec/2002:16:38:12 -0800] GET /scripts/root.exe?/c+dir HTTP/1.0 404 624 64.165.213.97 - - [28/Dec/2002:16:38:16 -0800] GET /MSADC/root.exe?/c+dir HTTP/1.0 404 618 64.165.213.97 - - [28/Dec/2002:16:38:20 -0800] GET /c/winnt/system32/cmd.exe?/c+dir HTTP/1.0 404 648 64.165.213.97 - - [28/Dec/2002:16:38:24 -0800] GET /d/winnt/system32/cmd.exe?/c+dir HTTP/1.0 404 648 Can someone tell me what someone else was trying to do? Based on the log, should I change any settings in my config? Thanks, laszlo - [This E-mail scanned for viruses by declude AntiVirus Software] -- 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: Mysql driver problem...
Hi, for me the mysql driver worked fine, i used the Mark Matthews JDBC Driver for MySQL, put in under WEB-INF/lib of my application, and it got connected the first time.. - Original Message - From: Keith Pemberton To: Tomcat Users List Sent: Monday, December 30, 2002 1:39 PM Subject: Re: Mysql driver problem... Well, my JNDI name for the resource is jdbc/gatep5 and that is what I have as the ResourceParams name=jdbc/gatep5. Then I translated that name into the web.xml which is under the ROOT directory of $Tomcat/webapps. Shouldn't this be ok? Keith On Mon, 2002-12-30 at 02:03, shawn wrote: I got that same message myself many times. Are you trying from the root context? If so, you'll need resource-ref descriptionDB Connection/description res-ref-namejdbc/root/res-ref-name res-typejavax.sql.DataSource/res-type res-authContainer/res-auth /resource-ref in web.xml and Context path=/root docBase=root debug=5 reloadable=true crossContext=true in server.xml that's what worked for me anyway Shawn On Mon, 2002-12-30 at 16:22, Keith Pemberton wrote: Ok, first off sorry if this is a little vague and I can write more details later. Anyway, I am new at this stuff with setting up the mysql driver to work with tomcat by setting a JNDI Datasource. I followed the directions under that heading in the documentation from the Tomcat website for the mysql driver, but I keep getting a Cannot load JDBC driver class 'null' message when I try to create a connection using the driver. I put the .jar file in the $TOMCAT/common/lib directory and restarted tomcat. Anyone have any quick tips for me to try? I can post my code later if yall need it; it's just late right now and I don't feel like cutting and pasting. Anyway, thanks in advance! Keith -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- shawn [EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: apache and tomcat
With export JAVA_HOME=/path/to/java Without the quotes.. And if you want to set this for your login, echo export JAVA_HOME=/path/to/java ~/.bash_profile WITH the quotes this time :-) or edit your ~/.bash_profile with your favourite editor and copy the top line into that file. There are numerous howto's and docs that tell you how to do this however.. Search for bash tutorial with google.. Rob Augustinus -Original Message- From: Jianping Zhu [mailto:[EMAIL PROTECTED]] Sent: Sunday, December 29, 2002 8:30 To: Tomcat Users List Cc: [EMAIL PROTECTED] Subject: RE: apache and tomcat How can i set up the environment varible JAVA_HOME for apache tomcat in redhat linux 7.1 with bash shell? thanks -- 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]
What Happened to my Apache Tomcat/4.1.18 Console Window.
Hi, I installed Apache Tomcat/4.1.18, Everthing runs fine but i don't see a Dos Window which i had in Apache Tomcat/4.0 on Windows XP system. I'm Using JSP and printing some statements out, which i need to see in the window, but i don't have a dos window/consloe to see it. How do i activate this dos window to see my messages and what is going behind the server? Please help me get it. Thanks. __ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Warning: messages in catalina.out
I am little concerned about Warning messages I see in my catalina.out file. The pages appear to be fine but I get these messages quite a bit. Are these session timeout and restart messages? Dec 29, 2002 6:33:10 PM org.apache.jk.common.ChannelSocket processConnection WARNING: server has closed the current connection (-1) Dec 29, 2002 6:33:10 PM org.apache.jk.common.ChannelSocket processConnection WARNING: server has closed the current connection (-1) Also during startup the following entry is in the file INFO: Initializing Coyote HTTP/1.1 on port 8080 mod_jk location: libexec/mod_jk.so Make sure it is installed corectly or set the config location Using ApacheConfig modJk=PATH_TO_MOD_JK.SO_OR_DLL / Is this because it is inccorectly configured? Thanks in advance Rob Cartier -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Jakarta/tomcat crashing with MySQL
Hi all, I have recently been facing a strange problem. Tomcat has been going down along with MySQL and I can't find any log entries for this. Tomcat is configured to use the mysql database for user and group verification. Even if the backend mysql goes down, tomcat is not suppose to crash (especially, without reporting anything in the log). Rather, it should report an error page upon access and resume working when the database is restored. I thought may be it was a bug in the older version (4.0-dev) so I upgraded tomcat to 4.1.18 (latest, I suppose), but the problem still exhibits. This crashing thing happens even when there is no access to the tomcat server and there is no application installed. The server will simply go down on it's own without reporting anything in the log. Can someone please let me if it's know problem and how one can possibly come around it? It's really annoying to restart tomcat every couple of days (yes, my mysql has a problem, because of which it goes down too frequently, but that should not in any way affect tomcat). Thanks a lot. -- Regards, -Naba -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Tomcat stability problem
Could be the VM garbage collecting ? How often does this happen ? Jim D. - Original Message - From: Ben Glorie [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, December 27, 2002 12:59 PM Subject: Tomcat stability problem We're running Tomcat 4.1.12 on a dual-proc PIII with 512MB RAM. The application consists of 100,000+ HTML pages and approx. 100 jsp pages. We get approx. 60,000 page views per day. Performance is fine, but occasionally the system runs into the following problem: - when you request a jsp page in the browser, there is a delay of 5-10 seconds, then the page is loaded into the browser - even though the HTML code is complete and all images are visible, the browser still appears to be loading something (load bar is creeping) - then after approx. 30 seconds the loading stops (because of a page timeout?) - static HTML pages are not affected, they load as quickly as usual Although the problem seems to happen more frequently on busy days, it does not seem to be related to peak traffic: it has also happened at quiet times, and sometimes within an hour after a Tomcat restart (up to 4 days after a restart). Does anybody have any ideas on what is happening and how we can solve it? Some configuration details: - catalina.sh: CATALINA_OPTS=-Xmx128M (we've ordered more RAM, as soon as it has arrived we're planning to change this to -Xmx512M - server.xml: Connector className=org.apache.coyote.tomcat4.CoyoteConnector port=80 minProcessors=10 maxProcessors=110 enableLookups=true redirectPort=8443 acceptCount=10 debug=0 connectionTimeout=1 useURIValidationHack=false / - web.xml (on public site): session-config session-timeout10/session-timeout /session-config Thanks a lot for your help. -- 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: Newbie: Java Mail Problem
David- It looks like something strange is happening with your configuration. I am not familiar with the example that you are talking about, but if you look at the exception, it looks like it is trying to connect to port 25 (smtp) of localhost, and not your verizon SMTP server. Localhost normally resolves to your own machine (your XP box in this case), and I doubt you have an SMTP server running there, and thus the connection failure. Perhaps there is another location you must use to specify the verizon server? On a related note, be prepared to potentially have problems once you have the example pointed to the right server. Not all servers allow ad-hoc connections to their SMTP server. If you find yourself in this boat (it pointing to verizon but still getting connection failures) let me know and I can try to step you through debugging SMTP connectivity errors. Parker Burden Senior Systems Engineer JC4I/INRI/DMS 757-249-1234 [EMAIL PROTECTED] -Original Message- From: David Diskin [mailto:[EMAIL PROTECTED]] Sent: Saturday, December 28, 2002 4:32 PM To: [EMAIL PROTECTED] Subject: Newbie: Java Mail Problem I've just set up Tomcat 4.1.18 on my Windows XP Home PC. I installed it as a service. I have no problem connecting to the Tomcat main web page. I reconfigured conf/server.xml and changed to value of mail.smtp.host to smtp.verizon.net, my isp mail server. However, when I go to run the jsp send mail example, I get the following exception. Can anyone help on this? == ENCOUNTERED EXCEPTION: javax.mail.SendFailedException: Sending failed; nested exception is: javax.mail.MessagingException: Could not connect to SMTP host: localhost, port: 25; nested exception is: java.net.ConnectException: Connection refused: connect javax.mail.SendFailedException: Sending failed; nested exception is: javax.mail.MessagingException: Could not connect to SMTP host: localhost, port: 25; nested exception is: java.net.ConnectException: Connection refused: connect at javax.mail.Transport.send0(Transport.java:219) at javax.mail.Transport.send(Transport.java:81) at SendMailServlet.doPost(SendMailServlet.java:75) at javax.servlet.http.HttpServlet.service(HttpServlet.java:760) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application FilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh ain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja va:260) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok eNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja va:191) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok eNext(StandardPipeline.java:643) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase .java:493) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok eNext(StandardPipeline.java:641) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2415) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180 ) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok eNext(StandardPipeline.java:643) at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve. java:170) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok eNext(StandardPipeline.java:641) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172 ) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok eNext(StandardPipeline.java:641) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java :174) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok eNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223) at
Please reply--Important print writer problem.
Hi Friends, I am receiving the sam eproblem which you have put on the site.I am following MVC architecture and working with IBM WPOrtal server.I have my JSP packaged within the par file(PORTLET ARCHIVE).I have a code in my JSP which writes some zip content to the browser using servletoutput stream The aim is to download the zip file to the client machine my invoking the browsers default download box.This works fine if i have the JSP outside the PAR file but when i have this JSP inside the par it gives the exception. java.lang.IllegalStateException Writer has already been obtained. Please let me know the solution ASAP.Its important for me. pasted below is the piece of code i am using in the jsp % // Create a object of CreateZip CreateZip createZip = new CreateZip(); // It stores Report Path. String reportPath = C:/www/web-data/fieldconnect/llreports/YASIR.txt; // Create a object of PrintWriter PrintWriter printWriter = new PrintWriter(new FileOutputStream(new File(reportPath))); printWriter.print(WritWriWritWWrWWriting data to text file...Writing data to text file...riting data to text file...Writing data to text file...Writing data to text file...Writing data to text file...iting data to text file...Writing data to text file...riting data to text file...Writing data to text file...ing data to text file...Writing data to text file...ting data to text file...Writing data to text file...ing data to text file...Writing data to text file...Writing data to text file...Writing data to text file...Writing data to text file...Writing data to text file); printWriter.flush(); printWriter.close(); // It stores path of text file String path = C:/www/web-data/fieldconnect/llreports/; // It stores name of text file String fileName = YASIR.txt; // making zip of text file generated createZip.makeZip(fileName,path); String zipPath = C:/www/web-data/fieldconnect/llreports/YASIR.zip; File deleteZipFile = new File(zipPath); int zipsize = (int)deleteZipFile.length(); byte abyte0[] = new byte[zipsize]; ByteArrayOutputStream ba = new ByteArrayOutputStream(zipsize); File deleteTxtFile = new File(reportPath); if (deleteTxtFile.exists()){ deleteTxtFile.delete(); } //PrintWriter zipWriter = new PrintWriter(new FileOutputStream()); FileInputStream fileInputStream = new FileInputStream(zipPath); BufferedInputStream bufferedinputstream = new BufferedInputStream(fileInputStream); int i; while((i = bufferedinputstream.read(abyte0)) != -1){ ba.write(abyte0,0,i); } bufferedinputstream.close(); HttpServletResponse sResponse = (HttpServletResponse)((PortletResponseImpl)response).getServletResponse(); sResponse.setContentType(application/zip); sResponse.setContentLength(ba.size()); sResponse.setHeader(Content-Type,application/octet-stream); sResponse.setHeader(Content-Disposition,attachment; filename=\YASIR.zip\); if (ba != null) { ServletOutputStream sout = sResponse.getOutputStream(); ba.writeTo(sout); ba.flush(); ba.close(); sout.close(); } if (deleteZipFile.exists()){ deleteZipFile.delete(); } % Thanks, Yasir.
jspC
Hello, I just want to precompile jsp files with duplicate name files. For example, I have two files named: /hello.jsp /test/hello.jsp. When I use a code like this (using Ant): = target name=jspCC mkdir dir=${jsp.java}/ mkdir dir=${jsp.class}/ java taskname=jasper classname=org.apache.jasper.JspC fork=true failonerror=true classpathref=myClasspath arg value=-v4 / arg value=-dd / arg value=jsp_java / arg value=-die / arg value=-webapp / arg value=docroot / /java javac srcdir=jsp_java destdir=jsp_class debug=false deprecation=false optimize = false includes=**/*.java classpath refid=myClasspath / /javac /target === then I have a compilation error like this: === [javac] D:\docroot\hello_jsp.java:8: duplicate c lass: org.apache.jsp.hello_jsp [javac] public class hello_jsp extends HttpJspBase { === How can I avoid this? -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Urgent - Issue with Tomcat/mod_jk?
Hi, Here I am getting kernel out of memery killing java process in syslog messages(/var/log/messages) not in catalina.out. Here I tried with max heap size too(-Xms256m -Xmx256m), ending with no result. What I thoght is sun jvm is not properly handling memory allocation/dealloctaion on redhat 7.2/7.3, so I tried with IBM jvm 1.4 on redhat 7.2 with tomcat 4.0.4. Surprisingly I am not getting broken pipe errors as well as tomcat crashing problems Thank you very much for your response Thks, --Venkat -Original Message- From: Ben Ricker [mailto:[EMAIL PROTECTED]] Sent: Thu 12/26/2002 9:42 AM To: Tomcat Users List Cc: Subject:RE: Urgent - Issue with Tomcat/mod_jk? I beleive we are dealing with a different problem. My app has been running on Tomcat 4.0.6 for weeks until I had the problem recently. There was no crash. What happened was, it seems, a user REALLY fat-fingered the enter key or some smart person sent the same request to the server 180 times within one minute. I traced back through my access logs for Apache and caught the massive number if requests for one URL at the same time I had the problem. All of these requests overwhelmed the number of AJP13 processors I had configured (well, they are still at the default setting) and also caused a massive opening of database connections. Anyway, as to your problem: You may not have enough memory setup for your JVM. Do you send amx -Xm and -Xs parameters to Tomcat using JAVA_OPTS? You may be getting more load then Tomcat can handle due to a RAM constraint. Ben Ricker On Tue, 2002-12-24 at 13:39, Venkat Reddy Valluri wrote: Hi , Even I too getting the same problem(lots of broken pipe errors )with catalina 4.0.4(redhat 7.3, j2sdk1.4.1) connecting apache 2.0.40(redat 7.3) on diffrenet machine with mod_jk, But what happened is after it ran for cuople of hours, tomcat crases, giving kernel out of memory error in syslog messages Did you get any workaround for this Thks, --Venkat -Original Message- From: Ben Ricker [mailto:[EMAIL PROTECTED]] Sent: Mon 12/23/2002 5:49 PM To: Tomcat Users List Cc: Subject: Re: Urgent - Issue with Tomcat/mod_jk? I had suspected that in the problem earlier in the day (the part of the email I posted at the end if the last email you replied to). However, what did not make sense was the connection pool woth the database also going up. If I understand the stuff below, after 85 concurrent connections (max connections + accept count) I would start getting the Out of Processors error. However, I cannot see how this would cause the DATABASE connection pool to grow as large as it did (we usually handle 50k connections a business day with 5 pooled connections; during the earlier problem, the database connections went to *30*, our maximum). Additionally, why would we contine to get the following error: 2002-12-23 09:07:28 Ajp13Processor[12009][18] process: invoke java.io.IOException: Broken pipe at java.net.SocketOutputStream.socketWrite(Native Method) at java.net.SocketOutputStream.write(SocketOutputStream.java:91) at org.apache.ajp.Ajp13.send(Ajp13.java:525) at org.apache.ajp.RequestHandler.finish(RequestHandler.java:501) at org.apache.ajp.Ajp13.finish(Ajp13.java:395) at org.apache.ajp.tomcat4.Ajp13Response.finishResponse(Ajp13Response.java:196) at org.apache.ajp.tomcat4.Ajp13Processor.process(Ajp13Processor.java:464) at org.apache.ajp.tomcat4.Ajp13Processor.run(Ajp13Processor.java:551) at java.lang.Thread.run(Thread.java:479) without seeing the Out of Processor msgs? I may be looking at two independent problems: one a scalability issue with the ajp13 processors (which are at the ddefault setting, btw) and some other issue I am in the dark about. Anyway, these questions are rhetorical. Thanks for the reply and do not feel obliged to answer back. I need to start putting pressure on the developers to help me out here. Thanks again, Ben Ricker On Mon, 2002-12-23 at 16:07, Mark Eggers wrote: Ben, Disclaimer: I'm not a Tomcat developer, but I do use it to develop software and integrate applications. In $CATALINA_HOME/conf/server.xml you should see an entry similar to the following: !-- Define an AJP 1.3 Connector on port 8009 -- Connector className=org.apache.ajp.tomcat4.Ajp13Connector port=8009 minProcessors=5 maxProcessors=75 acceptCount=10 debug=0/ I'm using 4.1.18, so your entry may be a bit different. It looks like from your error messages that you may be running out of processors. The following information is taken from Tomcat's 4.1.18 documentation. If you have the documentation installed somewhere, the URL is: http://localhost/tomcat-docs/config/jk.html acceptCount: The maximum queue length for incoming
RE: Newbie: Java Mail Problem
On that note, if you're using Windows 2000 and XP Professional, you can simply install a SMTP service on your computer. It's part of IIS, though, which means you'll have to install that if you haven't already. If you want to see if you have it installed, goto Start-Control Panel-Administrative Tools. If you have it installed, you should see a shortcut there that says Internet Information Services. Open that up, and you can configure both IIS and any of it's related services, including SMTP. If you don't have it installed, and want to install it, goto Start-Control Panel-Add or Remove Programs and click on Add/Remove Windows Components. You'll be shown a list of things that you can install, one of which is IIS. Might be overkill, though, and if you do install it or have it running, you want to make EXTRA sure your computer isn't visible to the outside world on port 25. You can configure the SMTP service to deny connections from anything but localhost, for example. John -Original Message- From: Burden, Parker To: Tomcat Users List Sent: 12/30/02 8:56 AM Subject: RE: Newbie: Java Mail Problem David- It looks like something strange is happening with your configuration. I am not familiar with the example that you are talking about, but if you look at the exception, it looks like it is trying to connect to port 25 (smtp) of localhost, and not your verizon SMTP server. Localhost normally resolves to your own machine (your XP box in this case), and I doubt you have an SMTP server running there, and thus the connection failure. Perhaps there is another location you must use to specify the verizon server? On a related note, be prepared to potentially have problems once you have the example pointed to the right server. Not all servers allow ad-hoc connections to their SMTP server. If you find yourself in this boat (it pointing to verizon but still getting connection failures) let me know and I can try to step you through debugging SMTP connectivity errors. Parker Burden Senior Systems Engineer JC4I/INRI/DMS 757-249-1234 [EMAIL PROTECTED] -Original Message- From: David Diskin [mailto:[EMAIL PROTECTED]] Sent: Saturday, December 28, 2002 4:32 PM To: [EMAIL PROTECTED] Subject: Newbie: Java Mail Problem I've just set up Tomcat 4.1.18 on my Windows XP Home PC. I installed it as a service. I have no problem connecting to the Tomcat main web page. I reconfigured conf/server.xml and changed to value of mail.smtp.host to smtp.verizon.net, my isp mail server. However, when I go to run the jsp send mail example, I get the following exception. Can anyone help on this? == ENCOUNTERED EXCEPTION: javax.mail.SendFailedException: Sending failed; nested exception is: javax.mail.MessagingException: Could not connect to SMTP host: localhost, port: 25; nested exception is: java.net.ConnectException: Connection refused: connect javax.mail.SendFailedException: Sending failed; nested exception is: javax.mail.MessagingException: Could not connect to SMTP host: localhost, port: 25; nested exception is: java.net.ConnectException: Connection refused: connect at javax.mail.Transport.send0(Transport.java:219) at javax.mail.Transport.send(Transport.java:81) at SendMailServlet.doPost(SendMailServlet.java:75) at javax.servlet.http.HttpServlet.service(HttpServlet.java:760) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica tion FilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt erCh ain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv e.ja va:260) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i nvok eNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4 80) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv e.ja va:191) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i nvok eNext(StandardPipeline.java:643) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(Authenticator Base .java:493) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i nvok eNext(StandardPipeline.java:641) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4 80) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:241 5) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java :180 ) at
Re: session id's really unique?
You run the risk of getting duplicate session id's. However, across contexts you'll have separate Managers, and therefore different sets of sessions. So, you don't run the risk of one context gaining access to another context's sessions. The risk is the one discussed in the other session id thread where if you get duplicate session id's in the same context. Then you've got serious problems. shawn wrote: If I use RequestDispatcher.forward(request, response) to another context am I running the risk of session id conflicts? -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
running tomcat as a non-root user?
Hi, Has anybody tried running tomcat as a non-root user in Linux? If so, how do you proceed (ie. making script setuid doesn't work for me). Pls advice. Thanks alot! -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Mysql driver problem...
I got it to work finally. I actually had to use the Context path= docBase=ROOT debug=5 reloadable=true crossContext=true As soon as I did that everything was fine. Thanks for the help and suggestions. Keith On Mon, 2002-12-30 at 02:39, shawn wrote: just like the example, I should think that would be ok. my point was Context path=/root docBase=root debug=5 reloadable=true crossContext=true and not sililar to the following which I found in server.xml !-- Tomcat Root Context -- !-- Context path= docBase=ROOT debug=0/ -- I tried Context path= docBase=ROOT debug=0/ and got the same message you did. On Mon, 2002-12-30 at 17:09, Keith Pemberton wrote: Well, my JNDI name for the resource is jdbc/gatep5 and that is what I have as the ResourceParams name=jdbc/gatep5. Then I translated that name into the web.xml which is under the ROOT directory of $Tomcat/webapps. Shouldn't this be ok? Keith On Mon, 2002-12-30 at 02:03, shawn wrote: I got that same message myself many times. Are you trying from the root context? If so, you'll need resource-ref descriptionDB Connection/description res-ref-namejdbc/root/res-ref-name res-typejavax.sql.DataSource/res-type res-authContainer/res-auth /resource-ref in web.xml and Context path=/root docBase=root debug=5 reloadable=true crossContext=true in server.xml that's what worked for me anyway Shawn On Mon, 2002-12-30 at 16:22, Keith Pemberton wrote: Ok, first off sorry if this is a little vague and I can write more details later. Anyway, I am new at this stuff with setting up the mysql driver to work with tomcat by setting a JNDI Datasource. I followed the directions under that heading in the documentation from the Tomcat website for the mysql driver, but I keep getting a Cannot load JDBC driver class 'null' message when I try to create a connection using the driver. I put the .jar file in the $TOMCAT/common/lib directory and restarted tomcat. Anyone have any quick tips for me to try? I can post my code later if yall need it; it's just late right now and I don't feel like cutting and pasting. Anyway, thanks in advance! Keith -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- shawn [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] -- shawn [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]
Apache 1.3 calling mod_jk2 twice
I have Linux redhat 7.3, Apapche 1.3.27 + mod_jk2 and configure it to use jni. When apache starts up calling jk2_init() twice so second VM initialization failed. Anybody knows why? -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: running tomcat as a non-root user?
I have a howto document in pdf and sxw (Open Office) format that may be of help. http://www.atsga.com/docs/ Mike -Original Message- From: waimun [mailto:[EMAIL PROTECTED]] Sent: Monday, December 30, 2002 10:25 AM To: [EMAIL PROTECTED] Subject: running tomcat as a non-root user? Hi, Has anybody tried running tomcat as a non-root user in Linux? If so, how do you proceed (ie. making script setuid doesn't work for me). Pls advice. Thanks alot! -- 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]
New Version 4.1.18 Out of Memory Errors
Hello. I have 1 Gig of Ram on my Linux server and was running 4.0.1. Tomcat and never had any problems with memory Now, I just upgraded to Tomcat 4.1.18 and I keep getting Out of Memory errors! Here's the memory at certain intervals: at the time of out of memory error CPU states: 3.5% user, 24.8% system, 0.0% nice, 71.6% idle Mem: 900944K av, 878020K used, 22924K free, 0K shrd, 67528K buff Swap: 248968K av, 24064K used, 224904K free 367560K cached restarted tomcat Mem: 900944K av, 848780K used, 52164K free, 0K shrd, 71712K buff Swap: 248968K av, 14996K used, 233972K free 377256K cached rebooted server (tomcat came back on) Mem: 900944K av, 848780K used, 52164K free, 0K shrd, 71712K buff Swap: 248968K av, 14996K used, 233972K free 377256K cached tomcat then turned off Mem: 900944K av, 186288K used, 714656K free, 0K shrd, 16048K buff Swap: 248968K av, 0K used, 248968K free 112936K cached tomcat then turned back on Mem: 900944K av, 286704K used, 614240K free, 0K shrd, 19256K buff Swap: 248968K av, 0K used, 248968K free 123956K cached This is very strange! Has anyone else gotten these errors with this new version? If anyone needs more info, let me know. Thanks, Robert -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
New Version 4.1.18 Out of Memory Errors...continued...
Oops, I almost forget to send out the catalina logHere it is: Dec 30, 2002 11:08:29 AM org.apache.jk.common.ChannelSocket processConnection INFO: server has been restarted or reset this connection Dec 30, 2002 11:08:34 AM org.apache.tomcat.util.log.CommonLogHandler log SEVERE: Caught exception executing org.apache.jk.common.SocketConnection@80f521, terminating thread java.lang.OutOfMemoryError Dec 30, 2002 11:11:59 AM org.apache.jk.common.ChannelSocket processConnection INFO: server has been restarted or reset this connection Dec 30, 2002 11:12:47 AM org.apache.jk.common.ChannelSocket processConnection INFO: server has been restarted or reset this connection Dec 30, 2002 11:13:51 AM org.apache.tomcat.util.log.CommonLogHandler log SEVERE: Caught exception executing org.apache.jk.common.SocketConnection@673ee6, terminating thread java.lang.OutOfMemoryError Dec 30, 2002 11:13:53 AM org.apache.tomcat.util.log.CommonLogHandler log SEVERE: Caught exception executing org.apache.jk.common.SocketConnection@2566c1, terminating thread java.lang.OutOfMemoryError java.lang.OutOfMemoryError java.lang.OutOfMemoryError Dec 30, 2002 11:18:51 AM org.apache.tomcat.util.log.CommonLogHandler log SEVERE: Caught exception executing org.apache.jk.common.SocketAcceptor@f63fa1, terminating thread java.lang.OutOfMemoryError Dec 30, 2002 11:21:08 AM org.apache.jk.common.ChannelSocket processConnection INFO: server has been restarted or reset this connection Dec 30, 2002 11:31:34 AM org.apache.tomcat.util.log.CommonLogHandler log SEVERE: Caught exception executing org.apache.jk.common.SocketConnection@71bffb, terminating thread java.lang.OutOfMemoryError Dec 30, 2002 11:32:42 AM org.apache.jk.common.ChannelSocket processConnection INFO: server has been restarted or reset this connection -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: New Version 4.1.18 Out of Memory Errors...continued...
have you increase the maximum memory for the jvm? with -Xmx256mb as a example. cu Torsten Fohrer On Monday 30 December 2002 17:51, you wrote: Oops, I almost forget to send out the catalina logHere it is: Dec 30, 2002 11:08:29 AM org.apache.jk.common.ChannelSocket processConnection INFO: server has been restarted or reset this connection Dec 30, 2002 11:08:34 AM org.apache.tomcat.util.log.CommonLogHandler log SEVERE: Caught exception executing org.apache.jk.common.SocketConnection@80f521, terminating thread java.lang.OutOfMemoryError Dec 30, 2002 11:11:59 AM org.apache.jk.common.ChannelSocket processConnection INFO: server has been restarted or reset this connection Dec 30, 2002 11:12:47 AM org.apache.jk.common.ChannelSocket processConnection INFO: server has been restarted or reset this connection Dec 30, 2002 11:13:51 AM org.apache.tomcat.util.log.CommonLogHandler log SEVERE: Caught exception executing org.apache.jk.common.SocketConnection@673ee6, terminating thread java.lang.OutOfMemoryError Dec 30, 2002 11:13:53 AM org.apache.tomcat.util.log.CommonLogHandler log SEVERE: Caught exception executing org.apache.jk.common.SocketConnection@2566c1, terminating thread java.lang.OutOfMemoryError java.lang.OutOfMemoryError java.lang.OutOfMemoryError Dec 30, 2002 11:18:51 AM org.apache.tomcat.util.log.CommonLogHandler log SEVERE: Caught exception executing org.apache.jk.common.SocketAcceptor@f63fa1, terminating thread java.lang.OutOfMemoryError Dec 30, 2002 11:21:08 AM org.apache.jk.common.ChannelSocket processConnection INFO: server has been restarted or reset this connection Dec 30, 2002 11:31:34 AM org.apache.tomcat.util.log.CommonLogHandler log SEVERE: Caught exception executing org.apache.jk.common.SocketConnection@71bffb, terminating thread java.lang.OutOfMemoryError Dec 30, 2002 11:32:42 AM org.apache.jk.common.ChannelSocket processConnection INFO: server has been restarted or reset this connection -- 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: New Version 4.1.18 Out of Memory Errors...continued...
Where is that setting? -Original Message- From: Torsten Fohrer [mailto:[EMAIL PROTECTED]] Sent: Monday, December 30, 2002 11:08 AM To: Tomcat Users List Subject: Re: New Version 4.1.18 Out of Memory Errors...continued... have you increase the maximum memory for the jvm? with -Xmx256mb as a example. cu Torsten Fohrer On Monday 30 December 2002 17:51, you wrote: Oops, I almost forget to send out the catalina logHere it is: Dec 30, 2002 11:08:29 AM org.apache.jk.common.ChannelSocket processConnection INFO: server has been restarted or reset this connection Dec 30, 2002 11:08:34 AM org.apache.tomcat.util.log.CommonLogHandler log SEVERE: Caught exception executing org.apache.jk.common.SocketConnection@80f521, terminating thread java.lang.OutOfMemoryError Dec 30, 2002 11:11:59 AM org.apache.jk.common.ChannelSocket processConnection INFO: server has been restarted or reset this connection Dec 30, 2002 11:12:47 AM org.apache.jk.common.ChannelSocket processConnection INFO: server has been restarted or reset this connection Dec 30, 2002 11:13:51 AM org.apache.tomcat.util.log.CommonLogHandler log SEVERE: Caught exception executing org.apache.jk.common.SocketConnection@673ee6, terminating thread java.lang.OutOfMemoryError Dec 30, 2002 11:13:53 AM org.apache.tomcat.util.log.CommonLogHandler log SEVERE: Caught exception executing org.apache.jk.common.SocketConnection@2566c1, terminating thread java.lang.OutOfMemoryError java.lang.OutOfMemoryError java.lang.OutOfMemoryError Dec 30, 2002 11:18:51 AM org.apache.tomcat.util.log.CommonLogHandler log SEVERE: Caught exception executing org.apache.jk.common.SocketAcceptor@f63fa1, terminating thread java.lang.OutOfMemoryError Dec 30, 2002 11:21:08 AM org.apache.jk.common.ChannelSocket processConnection INFO: server has been restarted or reset this connection Dec 30, 2002 11:31:34 AM org.apache.tomcat.util.log.CommonLogHandler log SEVERE: Caught exception executing org.apache.jk.common.SocketConnection@71bffb, terminating thread java.lang.OutOfMemoryError Dec 30, 2002 11:32:42 AM org.apache.jk.common.ChannelSocket processConnection INFO: server has been restarted or reset this connection -- 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: Tomcat stability problem
This happens anywhere between a few hours and a few days after a restart of Tomcat. On quiet days as well as on busy days. I have set -Xincgc (despite the performance decrease that this is likely to cause) but need more time to know if that helps. I have also found a few places where I can improve my code (in particular, database connections were sometimes not closed); perhaps that will also have a positive effect. -Original Message- From: Jim D. Results [mailto:[EMAIL PROTECTED]] Sent: Monday, December 30, 2002 2:39 PM To: Tomcat Users List; [EMAIL PROTECTED] Subject: Re: Tomcat stability problem Could be the VM garbage collecting ? How often does this happen ? Jim D. - Original Message - From: Ben Glorie [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, December 27, 2002 12:59 PM Subject: Tomcat stability problem We're running Tomcat 4.1.12 on a dual-proc PIII with 512MB RAM. The application consists of 100,000+ HTML pages and approx. 100 jsp pages. We get approx. 60,000 page views per day. Performance is fine, but occasionally the system runs into the following problem: - when you request a jsp page in the browser, there is a delay of 5-10 seconds, then the page is loaded into the browser - even though the HTML code is complete and all images are visible, the browser still appears to be loading something (load bar is creeping) - then after approx. 30 seconds the loading stops (because of a page timeout?) - static HTML pages are not affected, they load as quickly as usual Although the problem seems to happen more frequently on busy days, it does not seem to be related to peak traffic: it has also happened at quiet times, and sometimes within an hour after a Tomcat restart (up to 4 days after a restart). Does anybody have any ideas on what is happening and how we can solve it? Some configuration details: - catalina.sh: CATALINA_OPTS=-Xmx128M (we've ordered more RAM, as soon as it has arrived we're planning to change this to -Xmx512M - server.xml: Connector className=org.apache.coyote.tomcat4.CoyoteConnector port=80 minProcessors=10 maxProcessors=110 enableLookups=true redirectPort=8443 acceptCount=10 debug=0 connectionTimeout=1 useURIValidationHack=false / - web.xml (on public site): session-config session-timeout10/session-timeout /session-config Thanks a lot for your help. -- 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: tomcat as service
That's wonderful and all, but it still doesn't change the fact that Tomcat doesn't run as a service with 1.4.1_01. I also have this problem. -B [EMAIL PROTECTED] 12/26/02 09:49AM We use the Java Wrapper Service with JDK 1.4 to run Tomcat as an NT service. You can find it at: http://wrapper.sourceforge.net/doc/english/index.html In addition to working cross platform (Windows NT and Unix), you can test the service from the command line before and after installing it. They supply sample configurations for Tomcat. Gary Herwig Posedu wrote: hi! i tried to run tomcat as service with jdk14 and i doesnt work. there is no error. with jdk 1.3 there were no problems. is there any nown bug with version 1.4 of jdk thx for helping,.. herwig -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- Gary Gwin CEO and Founder Cafesoft 858.455.1800 x205 http://www.cafesoft.com * * * * The Cafesoft Access Management System, Cams, is security* * software that provides single sign-on authentication and* * centralized access control for Apache, Tomcat, and custom * * resources. * * * * -- 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: running tomcat as a non-root user?
Waimun: I run Tomcat as non-root. Apache has to be run as root if you use the default port 80, but Tomcat has no such requirement. If you installed Tomcat as root, use chown to change owner for all files and subdirectores of your tomcat installation, then you should be able to run it as the user that owns the installation. Or reinstall into a non-root area. Jerry waimun wrote: Hi, Has anybody tried running tomcat as a non-root user in Linux? If so, how do you proceed (ie. making script setuid doesn't work for me). Pls advice. Thanks alot! -- 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]
Virtual Hosting with Tomcat
Hi there, I need to setup virtual hosting with Tomcat. We are not running the full Apache server, just Tomcat and its web piece. Can this be done? Everything I have found so far refers to Apache not Tomcat on its own. Any help would be greatly appreciated. Thanks, Mike -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: tomcat as service
That's funny, I have had it running as a service on Win2K for nearly 3 weeks. Guess I better tell the user's its not working. To answer the original question; no, there are no known issues. I don't use the wrapper, I simply select the Run as service option when I install Tomcat. -Original Message- From: Becky Phaneuf [mailto:[EMAIL PROTECTED]] Sent: Monday, December 30, 2002 12:20 PM To: [EMAIL PROTECTED] Subject: Re: tomcat as service That's wonderful and all, but it still doesn't change the fact that Tomcat doesn't run as a service with 1.4.1_01. I also have this problem. -B [EMAIL PROTECTED] 12/26/02 09:49AM We use the Java Wrapper Service with JDK 1.4 to run Tomcat as an NT service. You can find it at: http://wrapper.sourceforge.net/doc/english/index.html In addition to working cross platform (Windows NT and Unix), you can test the service from the command line before and after installing it. They supply sample configurations for Tomcat. Gary Herwig Posedu wrote: hi! i tried to run tomcat as service with jdk14 and i doesnt work. there is no error. with jdk 1.3 there were no problems. is there any nown bug with version 1.4 of jdk thx for helping,.. herwig -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- Gary Gwin CEO and Founder Cafesoft 858.455.1800 x205 http://www.cafesoft.com * * * * The Cafesoft Access Management System, Cams, is security* * software that provides single sign-on authentication and* * centralized access control for Apache, Tomcat, and custom * * resources. * * * * -- 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: Virtual Hosting with Tomcat
I'd say to just send requests directly to Tomcat on it's port..usually 8180 or 8080 http://yoursite.com:8180 then edit the server.xml file to point to where you want it to serve your webpages. Here's an example config: Host name=yoursite.com Context path= docBase=/home/mydirectory/public_html debug=0/ Aliaswww.yoursite.com/Alias /Host you'll put that in your server.xml file in between: Service name=Tomcat-Standalone !-- Define the top level container in our container hierarchy -- Engine name=Standalone defaultHost=localhost debug=0 Host name=yoursite.com Context path= docBase=/home/mydirectory/public_html debug=0/ Aliaswww.yoursite.com/Alias /Host /Engine /Service -Original Message- From: Mike Rixford [mailto:[EMAIL PROTECTED]] Sent: Monday, December 30, 2002 11:31 AM To: Tomcat Users List Subject: Virtual Hosting with Tomcat Hi there, I need to setup virtual hosting with Tomcat. We are not running the full Apache server, just Tomcat and its web piece. Can this be done? Everything I have found so far refers to Apache not Tomcat on its own. Any help would be greatly appreciated. Thanks, Mike -- 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: tomcat as service
Please verify the exact version of Java and Tomcat you've got on that machine. Thanks -B [EMAIL PROTECTED] 12/30/02 09:37AM That's funny, I have had it running as a service on Win2K for nearly 3 weeks. Guess I better tell the user's its not working. To answer the original question; no, there are no known issues. I don't use the wrapper, I simply select the Run as service option when I install Tomcat. -Original Message- From: Becky Phaneuf [mailto:[EMAIL PROTECTED]] Sent: Monday, December 30, 2002 12:20 PM To: [EMAIL PROTECTED] Subject: Re: tomcat as service That's wonderful and all, but it still doesn't change the fact that Tomcat doesn't run as a service with 1.4.1_01. I also have this problem. -B [EMAIL PROTECTED] 12/26/02 09:49AM We use the Java Wrapper Service with JDK 1.4 to run Tomcat as an NT service. You can find it at: http://wrapper.sourceforge.net/doc/english/index.html In addition to working cross platform (Windows NT and Unix), you can test the service from the command line before and after installing it. They supply sample configurations for Tomcat. Gary Herwig Posedu wrote: hi! i tried to run tomcat as service with jdk14 and i doesnt work. there is no error. with jdk 1.3 there were no problems. is there any nown bug with version 1.4 of jdk thx for helping,.. herwig -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- Gary Gwin CEO and Founder Cafesoft 858.455.1800 x205 http://www.cafesoft.com * * * * The Cafesoft Access Management System, Cams, is security* * software that provides single sign-on authentication and* * centralized access control for Apache, Tomcat, and custom * * resources. * * * * -- 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: Newbie: Java Mail Problem
Parker, Hi. What a surprise to get a reply from someone I actually know. I solved the problem, but I forgot to notify the list. It turned out that Tomcat wasn't actually shut down and restarted properly. Now, it works fine. Have a happy New Year! David Burden, Parker wrote: David- It looks like something strange is happening with your configuration. I am not familiar with the example that you are talking about, but if you look at the exception, it looks like it is trying to connect to port 25 (smtp) of localhost, and not your verizon SMTP server. Localhost normally resolves to your own machine (your XP box in this case), and I doubt you have an SMTP server running there, and thus the connection failure. Perhaps there is another location you must use to specify the verizon server? On a related note, be prepared to potentially have problems once you have the example pointed to the right server. Not all servers allow ad-hoc connections to their SMTP server. If you find yourself in this boat (it pointing to verizon but still getting connection failures) let me know and I can try to step you through debugging SMTP connectivity errors. Parker Burden Senior Systems Engineer JC4I/INRI/DMS 757-249-1234 [EMAIL PROTECTED] -Original Message- From: David Diskin [mailto:[EMAIL PROTECTED]] Sent: Saturday, December 28, 2002 4:32 PM To: [EMAIL PROTECTED] Subject: Newbie: Java Mail Problem I've just set up Tomcat 4.1.18 on my Windows XP Home PC. I installed it as a service. I have no problem connecting to the Tomcat main web page. I reconfigured conf/server.xml and changed to value of mail.smtp.host to smtp.verizon.net, my isp mail server. However, when I go to run the jsp send mail example, I get the following exception. Can anyone help on this? == ENCOUNTERED EXCEPTION: javax.mail.SendFailedException: Sending failed; nested exception is: javax.mail.MessagingException: Could not connect to SMTP host: localhost, port: 25; nested exception is: java.net.ConnectException: Connection refused: connect javax.mail.SendFailedException: Sending failed; nested exception is: javax.mail.MessagingException: Could not connect to SMTP host: localhost, port: 25; nested exception is: java.net.ConnectException: Connection refused: connect at javax.mail.Transport.send0(Transport.java:219) at javax.mail.Transport.send(Transport.java:81) at SendMailServlet.doPost(SendMailServlet.java:75) at javax.servlet.http.HttpServlet.service(HttpServlet.java:760) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application FilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh ain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja va:260) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok eNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja va:191) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok eNext(StandardPipeline.java:643) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase .java:493) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok eNext(StandardPipeline.java:641) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2415) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180 ) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok eNext(StandardPipeline.java:643) at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve. java:170) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok eNext(StandardPipeline.java:641) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172 ) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok eNext(StandardPipeline.java:641) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java :174) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok eNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at
RE: tomcat as service
Tomcat 4.0.4 and Java 1.4.1_01-b01 in production. Tomcat 4.0.6 and Java 1.4.1_01-b01 for development. -Original Message- From: Becky Phaneuf [mailto:[EMAIL PROTECTED]] Sent: Monday, December 30, 2002 12:41 PM To: [EMAIL PROTECTED] Subject: RE: tomcat as service Please verify the exact version of Java and Tomcat you've got on that machine. Thanks -B [EMAIL PROTECTED] 12/30/02 09:37AM That's funny, I have had it running as a service on Win2K for nearly 3 weeks. Guess I better tell the user's its not working. To answer the original question; no, there are no known issues. I don't use the wrapper, I simply select the Run as service option when I install Tomcat. -Original Message- From: Becky Phaneuf [mailto:[EMAIL PROTECTED]] Sent: Monday, December 30, 2002 12:20 PM To: [EMAIL PROTECTED] Subject: Re: tomcat as service That's wonderful and all, but it still doesn't change the fact that Tomcat doesn't run as a service with 1.4.1_01. I also have this problem. -B [EMAIL PROTECTED] 12/26/02 09:49AM We use the Java Wrapper Service with JDK 1.4 to run Tomcat as an NT service. You can find it at: http://wrapper.sourceforge.net/doc/english/index.html In addition to working cross platform (Windows NT and Unix), you can test the service from the command line before and after installing it. They supply sample configurations for Tomcat. Gary Herwig Posedu wrote: hi! i tried to run tomcat as service with jdk14 and i doesnt work. there is no error. with jdk 1.3 there were no problems. is there any nown bug with version 1.4 of jdk thx for helping,.. herwig -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- Gary Gwin CEO and Founder Cafesoft 858.455.1800 x205 http://www.cafesoft.com * * * * The Cafesoft Access Management System, Cams, is security* * software that provides single sign-on authentication and* * centralized access control for Apache, Tomcat, and custom * * resources. * * * * -- 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: Newbie: Java Mail Problem
I resolved the problem. It turns out that I had not really stopped and restarted the Tomcat service after reconfiguring server.xml, even though I thought I had. Now, it works fine. Thanks everyone! David Burden, Parker wrote: David- It looks like something strange is happening with your configuration. I am not familiar with the example that you are talking about, but if you look at the exception, it looks like it is trying to connect to port 25 (smtp) of localhost, and not your verizon SMTP server. Localhost normally resolves to your own machine (your XP box in this case), and I doubt you have an SMTP server running there, and thus the connection failure. Perhaps there is another location you must use to specify the verizon server? On a related note, be prepared to potentially have problems once you have the example pointed to the right server. Not all servers allow ad-hoc connections to their SMTP server. If you find yourself in this boat (it pointing to verizon but still getting connection failures) let me know and I can try to step you through debugging SMTP connectivity errors. Parker Burden Senior Systems Engineer JC4I/INRI/DMS 757-249-1234 [EMAIL PROTECTED] -Original Message- From: David Diskin [mailto:[EMAIL PROTECTED]] Sent: Saturday, December 28, 2002 4:32 PM To: [EMAIL PROTECTED] Subject: Newbie: Java Mail Problem I've just set up Tomcat 4.1.18 on my Windows XP Home PC. I installed it as a service. I have no problem connecting to the Tomcat main web page. I reconfigured conf/server.xml and changed to value of mail.smtp.host to smtp.verizon.net, my isp mail server. However, when I go to run the jsp send mail example, I get the following exception. Can anyone help on this? == ENCOUNTERED EXCEPTION: javax.mail.SendFailedException: Sending failed; nested exception is: javax.mail.MessagingException: Could not connect to SMTP host: localhost, port: 25; nested exception is: java.net.ConnectException: Connection refused: connect javax.mail.SendFailedException: Sending failed; nested exception is: javax.mail.MessagingException: Could not connect to SMTP host: localhost, port: 25; nested exception is: java.net.ConnectException: Connection refused: connect at javax.mail.Transport.send0(Transport.java:219) at javax.mail.Transport.send(Transport.java:81) at SendMailServlet.doPost(SendMailServlet.java:75) at javax.servlet.http.HttpServlet.service(HttpServlet.java:760) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application FilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh ain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja va:260) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok eNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja va:191) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok eNext(StandardPipeline.java:643) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase .java:493) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok eNext(StandardPipeline.java:641) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2415) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180 ) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok eNext(StandardPipeline.java:643) at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve. java:170) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok eNext(StandardPipeline.java:641) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172 ) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok eNext(StandardPipeline.java:641) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java :174) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok eNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223) at
Re: Virtual Hosting with Tomcat
Virtual hosting in Tomcat can be achieved using the Host element (see server.xml). Also for this to work, the host name must be registered in the DNS server. See http://jakarta.apache.org/tomcat/tomcat-4.1-doc/config/host.html for details. Also see Host name Aliases (referred in the above doc). RS Mike Rixford mrixford@SeeBeyoTo: Tomcat Users List nd.com [EMAIL PROTECTED] cc: 12/30/02 11:30 AMSubject: Virtual Hosting with Tomcat Please respond to Tomcat Users List Hi there, I need to setup virtual hosting with Tomcat. We are not running the full Apache server, just Tomcat and its web piece. Can this be done? Everything I have found so far refers to Apache not Tomcat on its own. Any help would be greatly appreciated. Thanks, Mike -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] This transmission is intended to be strictly confidential. If you are not the intended recipient of this message, you may not disclose, print, copy or disseminate this information. If you have received this in error, please reply and notify the sender (only) and delete the message. Unauthorized interception of this e-mail is a violation of federal criminal law. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re[2]: tomcat as service
Hello Becky, So, you haven't gotten it to work and, therefore, it doesn't? Hmmm..., don't be so quick with your conclusions. Works fine for me with j2sdk1.4.1_01 and Tomcat-4.1.18 on Win2k (sp3). http://www.mattkelli.com/tech/tomcat/ntservice.htm Jake Monday, December 30, 2002, 11:19:34 AM, you wrote: BP That's wonderful and all, but it still doesn't change the fact that BP Tomcat doesn't run as a service with 1.4.1_01. I also have this BP problem. BP -B [EMAIL PROTECTED] 12/26/02 09:49AM BP We use the Java Wrapper Service with JDK 1.4 to run Tomcat as an NT BP service. You can find it at: BPhttp://wrapper.sourceforge.net/doc/english/index.html BP In addition to working cross platform (Windows NT and Unix), you can BP test the service from the command line before and after installing it. BP They supply sample configurations for Tomcat. BP Gary BP Herwig Posedu wrote: hi! i tried to run tomcat as service with jdk14 and i doesnt work. there BP is no error. with jdk 1.3 there were no problems. is there any nown bug with version 1.4 of jdk thx for helping,.. herwig -- To unsubscribe, e-mail: BP mailto:[EMAIL PROTECTED] For additional commands, e-mail: BP mailto:[EMAIL PROTECTED] -- Best regards, Jacobmailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: tomcat as service
There's the difference. We are using Tomcat 4.1.18. I didn't see the problem in earlier Tomcat versions either. -B [EMAIL PROTECTED] 12/30/02 09:48AM Tomcat 4.0.4 and Java 1.4.1_01-b01 in production. Tomcat 4.0.6 and Java 1.4.1_01-b01 for development. -Original Message- From: Becky Phaneuf [mailto:[EMAIL PROTECTED]] Sent: Monday, December 30, 2002 12:41 PM To: [EMAIL PROTECTED] Subject: RE: tomcat as service Please verify the exact version of Java and Tomcat you've got on that machine. Thanks -B [EMAIL PROTECTED] 12/30/02 09:37AM That's funny, I have had it running as a service on Win2K for nearly 3 weeks. Guess I better tell the user's its not working. To answer the original question; no, there are no known issues. I don't use the wrapper, I simply select the Run as service option when I install Tomcat. -Original Message- From: Becky Phaneuf [mailto:[EMAIL PROTECTED]] Sent: Monday, December 30, 2002 12:20 PM To: [EMAIL PROTECTED] Subject: Re: tomcat as service That's wonderful and all, but it still doesn't change the fact that Tomcat doesn't run as a service with 1.4.1_01. I also have this problem. -B [EMAIL PROTECTED] 12/26/02 09:49AM We use the Java Wrapper Service with JDK 1.4 to run Tomcat as an NT service. You can find it at: http://wrapper.sourceforge.net/doc/english/index.html In addition to working cross platform (Windows NT and Unix), you can test the service from the command line before and after installing it. They supply sample configurations for Tomcat. Gary Herwig Posedu wrote: hi! i tried to run tomcat as service with jdk14 and i doesnt work. there is no error. with jdk 1.3 there were no problems. is there any nown bug with version 1.4 of jdk thx for helping,.. herwig -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- Gary Gwin CEO and Founder Cafesoft 858.455.1800 x205 http://www.cafesoft.com * * * * The Cafesoft Access Management System, Cams, is security* * software that provides single sign-on authentication and* * centralized access control for Apache, Tomcat, and custom * * resources. * * * * -- 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: running tomcat as a non-root user?
assume a user named 'tomcat' already created, and a group named 'tomcat' already created. at a command prompt, as root: chown -R tomcat:tomcat $CATALINA_HOME su - tomcat $CATALINA_HOME/bin/startup.sh exit Note that if you are running Tomcat on port 80, it must run as root. You shouldn't have to change the permissions on any of the Tomcat files from what they are in a default install...I never have. John -Original Message- From: waimun To: [EMAIL PROTECTED] Sent: 12/30/02 10:25 AM Subject: running tomcat as a non-root user? Hi, Has anybody tried running tomcat as a non-root user in Linux? If so, how do you proceed (ie. making script setuid doesn't work for me). Pls advice. Thanks alot! -- 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: tomcat as service
Are you sure? I setup Apache and Tomcat with 1.4.1_01 last Friday night and it works like a charm on XP Pro. Apache 2.0.43 Tomcat 4.1.18 JDK 1.4.1_01 Apache and Tomcat running as services. I created a HOWTO for the process: http://www.johnturner.com/howto John -Original Message- From: Becky Phaneuf To: [EMAIL PROTECTED] Sent: 12/30/02 12:19 PM Subject: Re: tomcat as service That's wonderful and all, but it still doesn't change the fact that Tomcat doesn't run as a service with 1.4.1_01. I also have this problem. -B [EMAIL PROTECTED] 12/26/02 09:49AM We use the Java Wrapper Service with JDK 1.4 to run Tomcat as an NT service. You can find it at: http://wrapper.sourceforge.net/doc/english/index.html In addition to working cross platform (Windows NT and Unix), you can test the service from the command line before and after installing it. They supply sample configurations for Tomcat. Gary Herwig Posedu wrote: hi! i tried to run tomcat as service with jdk14 and i doesnt work. there is no error. with jdk 1.3 there were no problems. is there any nown bug with version 1.4 of jdk thx for helping,.. herwig --- - -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- Gary Gwin CEO and Founder Cafesoft 858.455.1800 x205 http://www.cafesoft.com * * * * The Cafesoft Access Management System, Cams, is security* * software that provides single sign-on authentication and* * centralized access control for Apache, Tomcat, and custom * * resources. * * * * -- 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: tomcat as service
I'm using 2.0.43, 4.1.18, and JDK 1.4.1_01, XP Pro. Works like a charm, though it's just a desktop...I haven't done anything serious with it, or put it under extreme loads. John -Original Message- From: Becky Phaneuf To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: 12/30/02 1:07 PM Subject: RE: tomcat as service There's the difference. We are using Tomcat 4.1.18. I didn't see the problem in earlier Tomcat versions either. -B [EMAIL PROTECTED] 12/30/02 09:48AM Tomcat 4.0.4 and Java 1.4.1_01-b01 in production. Tomcat 4.0.6 and Java 1.4.1_01-b01 for development. -Original Message- From: Becky Phaneuf [mailto:[EMAIL PROTECTED]] Sent: Monday, December 30, 2002 12:41 PM To: [EMAIL PROTECTED] Subject: RE: tomcat as service Please verify the exact version of Java and Tomcat you've got on that machine. Thanks -B [EMAIL PROTECTED] 12/30/02 09:37AM That's funny, I have had it running as a service on Win2K for nearly 3 weeks. Guess I better tell the user's its not working. To answer the original question; no, there are no known issues. I don't use the wrapper, I simply select the Run as service option when I install Tomcat. -Original Message- From: Becky Phaneuf [mailto:[EMAIL PROTECTED]] Sent: Monday, December 30, 2002 12:20 PM To: [EMAIL PROTECTED] Subject: Re: tomcat as service That's wonderful and all, but it still doesn't change the fact that Tomcat doesn't run as a service with 1.4.1_01. I also have this problem. -B [EMAIL PROTECTED] 12/26/02 09:49AM We use the Java Wrapper Service with JDK 1.4 to run Tomcat as an NT service. You can find it at: http://wrapper.sourceforge.net/doc/english/index.html In addition to working cross platform (Windows NT and Unix), you can test the service from the command line before and after installing it. They supply sample configurations for Tomcat. Gary Herwig Posedu wrote: hi! i tried to run tomcat as service with jdk14 and i doesnt work. there is no error. with jdk 1.3 there were no problems. is there any nown bug with version 1.4 of jdk thx for helping,.. herwig --- - -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- Gary Gwin CEO and Founder Cafesoft 858.455.1800 x205 http://www.cafesoft.com * * * * The Cafesoft Access Management System, Cams, is security* * software that provides single sign-on authentication and* * centralized access control for Apache, Tomcat, and custom * * resources. * * * * -- 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] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Re[2]: tomcat as service
SP2 here, and a fresh installation of Tomcat 4.1.18 and JDK 1.4.1_01. Yeah, of course I'm going to assume it doesn't work. All my environment variables are configured properly and I've installed Tomcat at least 5 times now on other machines so I know how it goes. Runs fine when started via the batch file. What would you assume? -B [EMAIL PROTECTED] 12/30/02 10:08AM Hello Becky, So, you haven't gotten it to work and, therefore, it doesn't? Hmmm..., don't be so quick with your conclusions. Works fine for me with j2sdk1.4.1_01 and Tomcat-4.1.18 on Win2k (sp3). http://www.mattkelli.com/tech/tomcat/ntservice.htm Jake Monday, December 30, 2002, 11:19:34 AM, you wrote: BP That's wonderful and all, but it still doesn't change the fact that BP Tomcat doesn't run as a service with 1.4.1_01. I also have this BP problem. BP -B [EMAIL PROTECTED] 12/26/02 09:49AM BP We use the Java Wrapper Service with JDK 1.4 to run Tomcat as an NT BP service. You can find it at: BPhttp://wrapper.sourceforge.net/doc/english/index.html BP In addition to working cross platform (Windows NT and Unix), you can BP test the service from the command line before and after installing it. BP They supply sample configurations for Tomcat. BP Gary BP Herwig Posedu wrote: hi! i tried to run tomcat as service with jdk14 and i doesnt work. there BP is no error. with jdk 1.3 there were no problems. is there any nown bug with version 1.4 of jdk thx for helping,.. herwig -- To unsubscribe, e-mail: BP mailto:[EMAIL PROTECTED] For additional commands, e-mail: BP mailto:[EMAIL PROTECTED] -- Best regards, Jacobmailto:[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: tomcat as service
We're not running XP Pro, but I'll give your how to a shot. -B [EMAIL PROTECTED] 12/30/02 10:17AM Are you sure? I setup Apache and Tomcat with 1.4.1_01 last Friday night and it works like a charm on XP Pro. Apache 2.0.43 Tomcat 4.1.18 JDK 1.4.1_01 Apache and Tomcat running as services. I created a HOWTO for the process: http://www.johnturner.com/howto John -Original Message- From: Becky Phaneuf To: [EMAIL PROTECTED] Sent: 12/30/02 12:19 PM Subject: Re: tomcat as service That's wonderful and all, but it still doesn't change the fact that Tomcat doesn't run as a service with 1.4.1_01. I also have this problem. -B [EMAIL PROTECTED] 12/26/02 09:49AM We use the Java Wrapper Service with JDK 1.4 to run Tomcat as an NT service. You can find it at: http://wrapper.sourceforge.net/doc/english/index.html In addition to working cross platform (Windows NT and Unix), you can test the service from the command line before and after installing it. They supply sample configurations for Tomcat. Gary Herwig Posedu wrote: hi! i tried to run tomcat as service with jdk14 and i doesnt work. there is no error. with jdk 1.3 there were no problems. is there any nown bug with version 1.4 of jdk thx for helping,.. herwig --- - -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- Gary Gwin CEO and Founder Cafesoft 858.455.1800 x205 http://www.cafesoft.com * * * * The Cafesoft Access Management System, Cams, is security* * software that provides single sign-on authentication and* * centralized access control for Apache, Tomcat, and custom * * resources. * * * * -- 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: tomcat as service
I'm running Apache 2.0.43, Tomcat 4.1.18, and JDK 1.4.1_01 on Win2k(SP3) and it fired up as a service out of the box. I'm only using it as a test machine but have deployed some .war's against it and it worked as advertised. Regards, Drew -Original Message- From: Becky Phaneuf [mailto:[EMAIL PROTECTED]] Sent: Monday, December 30, 2002 1:25 PM To: [EMAIL PROTECTED] Subject: RE: tomcat as service We're not running XP Pro, but I'll give your how to a shot. -B [EMAIL PROTECTED] 12/30/02 10:17AM Are you sure? I setup Apache and Tomcat with 1.4.1_01 last Friday night and it works like a charm on XP Pro. Apache 2.0.43 Tomcat 4.1.18 JDK 1.4.1_01 Apache and Tomcat running as services. I created a HOWTO for the process: http://www.johnturner.com/howto John -Original Message- From: Becky Phaneuf To: [EMAIL PROTECTED] Sent: 12/30/02 12:19 PM Subject: Re: tomcat as service That's wonderful and all, but it still doesn't change the fact that Tomcat doesn't run as a service with 1.4.1_01. I also have this problem. -B [EMAIL PROTECTED] 12/26/02 09:49AM We use the Java Wrapper Service with JDK 1.4 to run Tomcat as an NT service. You can find it at: http://wrapper.sourceforge.net/doc/english/index.html In addition to working cross platform (Windows NT and Unix), you can test the service from the command line before and after installing it. They supply sample configurations for Tomcat. Gary Herwig Posedu wrote: hi! i tried to run tomcat as service with jdk14 and i doesnt work. there is no error. with jdk 1.3 there were no problems. is there any nown bug with version 1.4 of jdk thx for helping,.. herwig --- - -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- Gary Gwin CEO and Founder Cafesoft 858.455.1800 x205 http://www.cafesoft.com * * * * The Cafesoft Access Management System, Cams, is security* * software that provides single sign-on authentication and* * centralized access control for Apache, Tomcat, and custom * * resources. * * * * -- 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: application context loaded twice
On Mon, 30 Dec 2002, Mohan Radhakrishnan wrote: Date: Mon, 30 Dec 2002 09:52:15 +0530 From: Mohan Radhakrishnan [EMAIL PROTECTED] Reply-To: Tomcat Users List [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Subject: application context loaded twice Hi, Why would Context path= docBase=x debug=0 load my application context twice? My listener is called twice while the following line Context path=name docBase=x debug=0 loads it only once. What am I missing ? Appreciate help. Let's think for a moment about how Tomcat auto-deploys applications from the webapps subdirectory. Basically, it does the following: * Scans all the Context elements that you've created, and deploys an app under the context path you specified. In the case of your first example, you're creating the root webapp for this virtual host from the contents of $CATALINA_HOME/webapps/x. * Scans all the directories in webapps to see if they contain a web application. If so, they are deployed under a context path derived from the directory name. So, Tomcat sees directory x and deploys the *same* webapp under context path /x. If you do not want this to happen, you need to either ensure that the directory name matches the context path without the leading slash (use special directory name ROOT for the root webapp, since you cannot have a zero-length filename on most OSs), or put your context directory someplace other than webapps and use an absolute path for the docBase attribute. So why didn't your second example load the app twice? Simple -- name is not a valid context path because it does not start with a slash, so this Context entry was not loaded (although I'll bet there are log messages that would tell you about this). Mohan Craig -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: running tomcat as a non-root user?
Additionally, you can add the su tomcat -c in a wrapper script that calls the startup.sh file. Mine looks like this: case $1 in start) echo -n Starting Tomcat... /bin/su tomcat -c /usr/local/tomcat1/bin/startup.sh /bin/su tomcat -c /usr/local/tomcat2/bin/startup.sh ;; That way, you CAN use root (and a startup script) to start Tomcat and still get the security benefits of running as an unpriveledged, locked user. Ben Ricker Wellinx.com On Mon, 2002-12-30 at 12:15, Turner, John wrote: assume a user named 'tomcat' already created, and a group named 'tomcat' already created. at a command prompt, as root: chown -R tomcat:tomcat $CATALINA_HOME su - tomcat $CATALINA_HOME/bin/startup.sh exit Note that if you are running Tomcat on port 80, it must run as root. You shouldn't have to change the permissions on any of the Tomcat files from what they are in a default install...I never have. John -Original Message- From: waimun To: [EMAIL PROTECTED] Sent: 12/30/02 10:25 AM Subject: running tomcat as a non-root user? Hi, Has anybody tried running tomcat as a non-root user in Linux? If so, how do you proceed (ie. making script setuid doesn't work for me). Pls advice. Thanks alot! -- 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] -- Ben Ricker [EMAIL PROTECTED] Wellinx.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Tomcat connection pool parameters??
We are implementing the Tomcat 4.1.12 connection pooling. We have 4 different datasources bound to different databases with the same connection pooling parameters except for the database url. We are into a strange problem where Tomcat closes the connection after a period of inactivity(around 2 mins) and when we try to establish a connection to it, an Exception saying closed connection is thrown. Some times it says SQlException: Exhausted ResultSet and if the jsp page which is trying to retrieve the connection is refreshed after a while I get an Exception saying End of TNS data channel. Does anyone have a configuration for the Tomcat connection pooling that has worked out well..Is there anything that I am not setting right in the server.xml?? Any suggestions will be very helpful.. Here is the server.xml connection pool settings.. ResourceParams name=jdbc/classroom parameter namefactory/name valueorg.apache.commons.dbcp.BasicDataSourceFactory/value /parameter parameter namedriverClassName/name valueoracle.jdbc.driver.OracleDriver/value /parameter parameter nameurl/name valueurl not specified here/value /parameter parameter nameusername/name valueoraclass/value /parameter parameter namepassword/name valueelite8/value /parameter parameter namemaxActive/name value20/value /parameter parameter namemaxIdle/name value10/value /parameter parameter namemaxWait/name value-1/value /parameter parameter nameremoveAbandoned/name valuetrue/value /parameter /ResourceParams Resource name=jdbc/ejournals auth=Container type=javax.sql.DataSource/ ResourceParams name=jdbc/ejournals parameter namefactory/name valueorg.apache.commons.dbcp.BasicDataSourceFactory/value /parameter parameter namedriverClassName/name valueoracle.jdbc.driver.OracleDriver/value /parameter parameter nameurl/name valueurl not specified here/value /parameter parameter nameusername/name valueejourn1/value /parameter parameter namepassword/name valueeasy123/value /parameter
problem: cannot use Tomcat's container managed securitythrough ISAPI filter
I'm using security-constraint to restrict access to the manager and other applications. I've had no trouble using both Memory and JNDI realms when accessing through the Coyote HTTP/1.1 Connector, but not when I use IIS and the isapi_redirector.dll (or isapi_redirector2.dll). With the ISAPI filter, my login attempts are rejected and the Windows security log suggests the attempts are going against the Windows domain rather than the tomcat realm. The isapi_redirector2.dll application log entries suggest something called jk2_service_iis_get_roles in the ISAPI filter is attempting to determine the role of the user rather than letting Tomcat do this. Is there a way to use Tomcat's container managed security through the ISAPI filter? TIA!
RE: running tomcat as a non-root user?
Additionally, you can add the su tomcat -c in a wrapper script That is basically what I do. It has the advantage that you can put different tomcats under different users (and thus enforce file system access). Even better would be to chroot tomcat. I don't have that worked out (yet). --- Noel -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
reducing tomcat jasper memory footprint
Hi, I'm using Apache 1.3.26 and 3 tomcat 4.0.4 instances with AJP13 loadbalancing . Our application is a CMS where all the published articles are generated offline as JSP-Files, one jsp per article. We had hige problems with the memory footprint. Due to the fact that every jsp is generated as a class and there are about 200 new artices per day the permanent segment of the JVM heap gets filled with all the classes, and I get an OutOfMemoryError. My workaround for now is setting -XX:PermSize and --XX:MapPermSize to higher values, but this just delays application hang-up. With 64 megs of permSize our Server had an approx. uptime of 1 day now it's about 3-4 days. Is there any way to unload jsp-Files (unload the class) ? llap, julian
Problem configuring tomcat 4.1.18 LE with IIS 5.0/JDK1.4 using jni
I have succesfully been able to configure tomcat 4.1.18 LE to work with IIS 4.0/JDK1.4 using sockets. I would like to configure it to use JNI though and that's where I am running into a problem. When I configure with JNI, it is able to successully load the example webapps, but not my webapp. The difference is that my webapp is compiled using JDK1.4. This is the error I get: 2002-12-30 19:25:17 HostConfig[localhost] Error deploying web application directory report java.lang.UnsupportedClassVersionError: com/paramark/reporter/Reporting (Unsupported major.minor version 48.0) at java.lang.ClassLoader.defineClass0(Native Method) at java.lang.ClassLoader.defineClass(Unknown Source) at java.security.SecureClassLoader.defineClass(Unknown Source) at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1664) at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:953) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1394) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1274) at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:884) at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:821) at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3420) at org.apache.catalina.core.StandardContext.start(StandardContext.java:3608) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:821) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:807) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:579) at org.apache.catalina.core.StandardHostDeployer.install(StandardHostDeployer.java:257) at org.apache.catalina.core.StandardHost.install(StandardHost.java:772) at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:569) at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:411) at org.apache.catalina.startup.HostConfig.start(HostConfig.java:879) at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:368) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:166) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1196) at org.apache.catalina.core.StandardHost.start(StandardHost.java:738) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:347) at org.apache.catalina.core.StandardService.start(StandardService.java:497) at org.apache.catalina.core.StandardServer.start(StandardServer.java:2189) at org.apache.catalina.startup.CatalinaService.start(CatalinaService.java:273) at java.lang.reflect.Method.invoke(Native Method) at org.apache.catalina.startup.BootstrapService.start(BootstrapService.java:245) at org.apache.catalina.startup.BootstrapService.main(BootstrapService.java:307) at java.lang.reflect.Method.invoke(Native Method) at org.apache.jk.apr.TomcatStarter.run(TomcatStarter.java:127) at java.lang.Thread.run(Unknown Source) I have set the JAVA_HOME environment variable to point to jdk1.4 and also pass java.home as jvm argument. I also include tools.jar from jdk1.4 in the classpath as jvm argument. I was under the assumption that the LE edition of tomcat 4.1.18 is supposed to work with JDK1.4. Is there something else that I am missing? thanks in advance for your help, Vikas. __ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
tomcat/apache connector startup failure: NCDFE fprorg/apache/commons/logging/LogFactory
Having trouble to make ajp13 connector work (jk2 with Apache 2). Tomcat fails connecting initializing with the following error: SEVERE: Can't create apr java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory As a consequence of this problem (I think it is related), I cannot access the dynamic pages from apache. Tomcat works great (http://localhost:8080/examples/) while http://localhost/examples/ returns a 500 Error (Connection refused on port 8019 - errno 111). (nb: I modified the default port to be 8019 instead of 8009). I've tried several variations of the jk2.properties and workers2.properties without success. Spent a lot of time on the mailing lists archives without success neither. I moved the commons-logging.jar from $TOMCAT/server/lib/ to $TOMCAT/common/lib as advised in some mails. This didn't work. Even if if had worked, it seems it would have been inapropriate: see http://issues.apache.org/bugzilla/show_bug.cgi?id=13689 I also used the attached jsp deployed in $TOMCAT/webapps/ROOT to see the CLASSPATH which is outputed as /usr/local/java/lib/tools.jar:/opt/tomcat/bin/bootstrap.jar which seems normal to me. I didn't try to modify the CLASSPATH in catalina.sh as it doesn't seem like the correct thing to do neither. It seems like this is a ClassLoader problem. If there is a way to enable debugging for the class loader, I am also interested. I found this: http://jakarta.apache.org/tomcat/tomcat-4.1-doc/config/loader.html But didn't find yet how to use it. It seems that I am not the only one to have had this problem. I spent already too much time on it so I will accept any idea/hints on how to make this work. I am using - linux OS (Mandrake 9.0) - JDK 1.4.1_01-b01 - tomcat-4.1.18-LE-jdk14.jar - jakarta-tomcat-connectors-4.1.18-src.tar.gz - Apache 2.0.43 Error details: INFO: Starting Coyote HTTP/1.1 on port 8080 Dec 30, 2002 8:58:03 PM org.apache.jk.server.JkMain newHandler SEVERE: Can't create apr java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory at org.apache.jk.apr.AprImpl.clinit(AprImpl.java:340) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:140) at org.apache.jk.server.JkMain.newHandler(JkMain.java:556) at org.apache.jk.server.JkMain.start(JkMain.java:341) at org.apache.jk.server.JkCoyoteHandler.start(JkCoyoteHandler.java:169) at org.apache.coyote.tomcat4.CoyoteConnector.start(CoyoteConnector.java:1056) at org.apache.catalina.core.StandardService.start(StandardService.java:506) at org.apache.catalina.core.StandardServer.start(StandardServer.java:2189) at org.apache.catalina.startup.Catalina.start(Catalina.java:512) at org.apache.catalina.startup.Catalina.execute(Catalina.java:400) at org.apache.catalina.startup.Catalina.process(Catalina.java:180) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203) Dec 30, 2002 8:58:03 PM org.apache.jk.common.ChannelSocket init INFO: JK2: ajp13 listening on /0.0.0.0:8009 Dec 30, 2002 8:58:03 PM org.apache.jk.server.JkMain start INFO: Jk running ID=0 time=2/239 config=/opt/tomcat/conf/jk2.properties -- Jerome Lacoste (Frisurf) [EMAIL PROTECTED] CoffeeBreaks -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: reducing tomcat jasper memory footprint
I don't have an answer to your exact question, but given the numbers you cite I would try to come up with an alternative design. Perhaps you can create one JSP page that uses dynamic includes to incorporate the text of the article? Just a thought. -Original Message- From: Julian Löffelhardt [mailto:[EMAIL PROTECTED]] Sent: Monday, December 30, 2002 2:37 PM To: Tomcat Users List Subject: reducing tomcat jasper memory footprint Hi, I'm using Apache 1.3.26 and 3 tomcat 4.0.4 instances with AJP13 loadbalancing . Our application is a CMS where all the published articles are generated offline as JSP-Files, one jsp per article. We had hige problems with the memory footprint. Due to the fact that every jsp is generated as a class and there are about 200 new artices per day the permanent segment of the JVM heap gets filled with all the classes, and I get an OutOfMemoryError. My workaround for now is setting -XX:PermSize and --XX:MapPermSize to higher values, but this just delays application hang-up. With 64 megs of permSize our Server had an approx. uptime of 1 day now it's about 3-4 days. Is there any way to unload jsp-Files (unload the class) ? llap, julian -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Apache HTTPD Tomcat: Where does mod_jk step in?
Ladies and Gentlemen: I'm using Apache 2.0.43 and Tomcat 4.1.12 with JK on Win2K. I'm using the JkMount directives to send all requests to /servlets/ and /*.jsp to Tomcat. However, I need to know where in the server processing JK actually intercepts those requests and shoots them off to tomcat, and what preprocessing Tomcat does to them afterwards. Can Tomcat use it's own Realms to handle authentication or does Apache need to do that? Do aliases map the request in Apache before JK grabs them? WORKFLOW. That's what I need to understand. Does anyone know much about that? Is there some documentation available somewhere on this workflow? I've ripped www.apache.org and jakarta.apache.org apart and found nothing. Help me, Obi-Wan Kenobi. You're my only hope. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: reducing tomcat jasper memory footprint
Could this be also related to the leaks of the java compiler? Did you try to precompile the JSPs before deploying them (using JSPC) ? Perhaps does that help? Jerome On Mon, 2002-12-30 at 20:37, Julian Löffelhardt wrote: Hi, I'm using Apache 1.3.26 and 3 tomcat 4.0.4 instances with AJP13 loadbalancing . Our application is a CMS where all the published articles are generated offline as JSP-Files, one jsp per article. We had hige problems with the memory footprint. Due to the fact that every jsp is generated as a class and there are about 200 new artices per day the permanent segment of the JVM heap gets filled with all the classes, and I get an OutOfMemoryError. My workaround for now is setting -XX:PermSize and --XX:MapPermSize to higher values, but this just delays application hang-up. With 64 megs of permSize our Server had an approx. uptime of 1 day now it's about 3-4 days. Is there any way to unload jsp-Files (unload the class) ? llap, julian -- Jerome Lacoste (Frisurf) [EMAIL PROTECTED] CoffeeBreaks -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: reducing tomcat jasper memory footprint
If I'd only known about this problem a few months earlier Sad truth is that I can't change this (too) jsp-centric design. llap, julian - Original Message - From: Wagoner, Mark [EMAIL PROTECTED] To: 'Tomcat Users List' [EMAIL PROTECTED] Sent: Monday, December 30, 2002 8:48 PM Subject: RE: reducing tomcat jasper memory footprint I don't have an answer to your exact question, but given the numbers you cite I would try to come up with an alternative design. Perhaps you can create one JSP page that uses dynamic includes to incorporate the text of the article? Just a thought. -Original Message- From: Julian Löffelhardt [mailto:[EMAIL PROTECTED]] Sent: Monday, December 30, 2002 2:37 PM To: Tomcat Users List Subject: reducing tomcat jasper memory footprint Hi, I'm using Apache 1.3.26 and 3 tomcat 4.0.4 instances with AJP13 loadbalancing . Our application is a CMS where all the published articles are generated offline as JSP-Files, one jsp per article. We had hige problems with the memory footprint. Due to the fact that every jsp is generated as a class and there are about 200 new artices per day the permanent segment of the JVM heap gets filled with all the classes, and I get an OutOfMemoryError. My workaround for now is setting -XX:PermSize and --XX:MapPermSize to higher values, but this just delays application hang-up. With 64 megs of permSize our Server had an approx. uptime of 1 day now it's about 3-4 days. Is there any way to unload jsp-Files (unload the class) ? llap, julian -- 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: reducing tomcat jasper memory footprint
Hi, I use jikes to compile the pages. Since raising the JVM permanent segment size delays the error the problem seems to come from the sheer size of the loaded class files. So theorectically it shouldn't matter wheter the pages are precompiled or not. Anyway I 'm about to set up a test specifically for this, to measure how many pages can be loaded before an error occurs. llap, julian - Original Message - From: Jerome Lacoste (Frisurf) [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Monday, December 30, 2002 8:51 PM Subject: Re: reducing tomcat jasper memory footprint Could this be also related to the leaks of the java compiler? Did you try to precompile the JSPs before deploying them (using JSPC) ? Perhaps does that help? Jerome On Mon, 2002-12-30 at 20:37, Julian Löffelhardt wrote: Hi, I'm using Apache 1.3.26 and 3 tomcat 4.0.4 instances with AJP13 loadbalancing . Our application is a CMS where all the published articles are generated offline as JSP-Files, one jsp per article. We had hige problems with the memory footprint. Due to the fact that every jsp is generated as a class and there are about 200 new artices per day the permanent segment of the JVM heap gets filled with all the classes, and I get an OutOfMemoryError. My workaround for now is setting -XX:PermSize and --XX:MapPermSize to higher values, but this just delays application hang-up. With 64 megs of permSize our Server had an approx. uptime of 1 day now it's about 3-4 days. Is there any way to unload jsp-Files (unload the class) ? llap, julian -- Jerome Lacoste (Frisurf) [EMAIL PROTECTED] CoffeeBreaks -- 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: reducing tomcat jasper memory footprint
On Monday 30 December 2002 02:37 pm, Julian Löffelhardt wrote: Hi, I'm using Apache 1.3.26 and 3 tomcat 4.0.4 instances with AJP13 loadbalancing . Our application is a CMS where all the published articles are generated offline as JSP-Files, one jsp per article. We had hige problems with the memory footprint. Due to the fact that every jsp is generated as a class and there are about 200 new artices per day the permanent segment of the JVM heap gets filled with all the classes, and I get an OutOfMemoryError. My workaround for now is setting -XX:PermSize and --XX:MapPermSize to higher values, but this just delays application hang-up. With 64 megs of permSize our Server had an approx. uptime of 1 day now it's about 3-4 days. Is there any way to unload jsp-Files (unload the class) ? llap, julian JAVAC leaks memory every time a JSP class is compiled. The more JSPs are compiled or the more often JSP classes are compiled, the more memory is leaked. You exacerbate this problem by generating a JSP per article often. IMHO, generating a JSP per article is misusing the technology. JSP is a templating solution whereas one JSP describes a layout of any number of end documents. I suggest you change your software to generate an HTML file per artcile rather than a JSP. Paul -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: tomcat as service
Mine worked out of the box as well. However, after stopping the NT service, starting the server using the batch file, deploying a war, shutting the server down via batch, restarting it via batch, confirming it runs without errors, shutting it down via batch, and THEN attempting to starting it as a service, it wouldn't start but there were also no errors. Note again, none of you have the same exact configuration. I believe it's a service pack 2 thing, but we're not allowed to upgrade to SP3 to test that theory. -B [EMAIL PROTECTED] 12/30/02 10:30AM I'm running Apache 2.0.43, Tomcat 4.1.18, and JDK 1.4.1_01 on Win2k(SP3) and it fired up as a service out of the box. I'm only using it as a test machine but have deployed some .war's against it and it worked as advertised. Regards, Drew -Original Message- From: Becky Phaneuf [mailto:[EMAIL PROTECTED]] Sent: Monday, December 30, 2002 1:25 PM To: [EMAIL PROTECTED] Subject: RE: tomcat as service We're not running XP Pro, but I'll give your how to a shot. -B [EMAIL PROTECTED] 12/30/02 10:17AM Are you sure? I setup Apache and Tomcat with 1.4.1_01 last Friday night and it works like a charm on XP Pro. Apache 2.0.43 Tomcat 4.1.18 JDK 1.4.1_01 Apache and Tomcat running as services. I created a HOWTO for the process: http://www.johnturner.com/howto John -Original Message- From: Becky Phaneuf To: [EMAIL PROTECTED] Sent: 12/30/02 12:19 PM Subject: Re: tomcat as service That's wonderful and all, but it still doesn't change the fact that Tomcat doesn't run as a service with 1.4.1_01. I also have this problem. -B [EMAIL PROTECTED] 12/26/02 09:49AM We use the Java Wrapper Service with JDK 1.4 to run Tomcat as an NT service. You can find it at: http://wrapper.sourceforge.net/doc/english/index.html In addition to working cross platform (Windows NT and Unix), you can test the service from the command line before and after installing it. They supply sample configurations for Tomcat. Gary Herwig Posedu wrote: hi! i tried to run tomcat as service with jdk14 and i doesnt work. there is no error. with jdk 1.3 there were no problems. is there any nown bug with version 1.4 of jdk thx for helping,.. herwig --- - -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- Gary Gwin CEO and Founder Cafesoft 858.455.1800 x205 http://www.cafesoft.com * * * * The Cafesoft Access Management System, Cams, is security* * software that provides single sign-on authentication and* * centralized access control for Apache, Tomcat, and custom * * resources. * * * * -- 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: reducing tomcat jasper memory footprint
Julian, I would have to agree that creating a JSP per article is a bit much. How did you or your group arrive at using this solution? The other possible solutions I have seen would include a single JSP that pulls the data from a database or creating XML files that are formatted with XSLT instead of JSP's Is the system doing some processing that requires one page or article or requires JSP capabilities that aren't found in XML/XSLT files? Sincerely, Pantek Incorporated Justin L. Spies URI: http://www.pantek.com Ph 440.519.1802 Fax 440.248.5274 Cell 440.336.3317 -Original Message- From: Paul Yunusov [mailto:[EMAIL PROTECTED]] Sent: Monday, December 30, 2002 3:31 PM To: Tomcat Users List Subject: Re: reducing tomcat jasper memory footprint On Monday 30 December 2002 02:37 pm, Julian Löffelhardt wrote: Hi, I'm using Apache 1.3.26 and 3 tomcat 4.0.4 instances with AJP13 loadbalancing . Our application is a CMS where all the published articles are generated offline as JSP-Files, one jsp per article. We had hige problems with the memory footprint. Due to the fact that every jsp is generated as a class and there are about 200 new artices per day the permanent segment of the JVM heap gets filled with all the classes, and I get an OutOfMemoryError. My workaround for now is setting -XX:PermSize and --XX:MapPermSize to higher values, but this just delays application hang-up. With 64 megs of permSize our Server had an approx. uptime of 1 day now it's about 3-4 days. Is there any way to unload jsp-Files (unload the class) ? llap, julian JAVAC leaks memory every time a JSP class is compiled. The more JSPs are compiled or the more often JSP classes are compiled, the more memory is leaked. You exacerbate this problem by generating a JSP per article often. IMHO, generating a JSP per article is misusing the technology. JSP is a templating solution whereas one JSP describes a layout of any number of end documents. I suggest you change your software to generate an HTML file per artcile rather than a JSP. Paul -- 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: reducing tomcat jasper memory footprint
Paul Yunusov wrote: On Monday 30 December 2002 02:37 pm, Julian Löffelhardt wrote: Hi, I'm using Apache 1.3.26 and 3 tomcat 4.0.4 instances with AJP13 loadbalancing . Our application is a CMS where all the published articles are generated offline as JSP-Files, one jsp per article. We had hige problems with the memory footprint. Due to the fact that every jsp is generated as a class and there are about 200 new artices per day the permanent segment of the JVM heap gets filled with all the classes, and I get an OutOfMemoryError. My workaround for now is setting -XX:PermSize and --XX:MapPermSize to higher values, but this just delays application hang-up. With 64 megs of permSize our Server had an approx. uptime of 1 day now it's about 3-4 days. Is there any way to unload jsp-Files (unload the class) ? llap, julian JAVAC leaks memory every time a JSP class is compiled. The more JSPs are compiled or the more often JSP classes are compiled, the more memory is leaked. You exacerbate this problem by generating a JSP per article often. IMHO, generating a JSP per article is misusing the technology. JSP is a templating solution whereas one JSP describes a layout of any number of end documents. I suggest you change your software to generate an HTML file per artcile rather than a JSP. Maybe it's abusing the technology, but it really should work fine. Workarounds for the problem include using jikes, or using javac out of process (I don't quite remember how it is configured; since Jasper 2 uses Ant javac task to compile, it should be in the Ant docs on the javac task). Remy -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: reducing tomcat jasper memory footprint
On Mon, 30 Dec 2002, Julian Löffelhardt wrote: Date: Mon, 30 Dec 2002 20:37:10 +0100 From: Julian Löffelhardt [EMAIL PROTECTED] Reply-To: Tomcat Users List [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Subject: reducing tomcat jasper memory footprint Hi, I'm using Apache 1.3.26 and 3 tomcat 4.0.4 instances with AJP13 loadbalancing . Our application is a CMS where all the published articles are generated offline as JSP-Files, one jsp per article. We had hige problems with the memory footprint. Due to the fact that every jsp is generated as a class and there are about 200 new artices per day the permanent segment of the JVM heap gets filled with all the classes, and I get an OutOfMemoryError. My workaround for now is setting -XX:PermSize and --XX:MapPermSize to higher values, but this just delays application hang-up. With 64 megs of permSize our Server had an approx. uptime of 1 day now it's about 3-4 days. Is there any way to unload jsp-Files (unload the class) ? There is not. But I can't help thinking that a better strategy might be to use a single JSP page (or perhaps one per different layout of the published articles) that build the content dynamically, instead of using a separate JSP page per article. Or else, maybe you could generate static HTML files instead of JSP that then has to be compiled and executed every time the article is read. llap, julian Craig -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: reducing tomcat jasper memory footprint
One question with regard to using jsp files as included content: I'm having a requirement to include files with more or less simple html content. That's in order to make editing easier for other users. I currently keep some html content in files which I reference by a database id. So a view jsp file is taking some content directly from the database and some by including a file with a name like content[ID].jsp But because I need session tracking and the possibility exists that i have url links in the included content from time to time, I decided to have jsp include files instead of html. Otherwise I couldn't use encodeURL to add session ids for browsers that disallow cookies. Actually it's unlikely that I'd use more Java than this encodeURL() so I would consider using some other technique to do it, if I knew another way. The only thing I could think of would be a filter servlet to encode the urls of those include html files on-the-fly. Any better or easier ideas? Michael -Original Message- From: Justin L. Spies [mailto:[EMAIL PROTECTED]] Sent: Montag, 30. Dezember 2002 21:34 To: 'Tomcat Users List'; [EMAIL PROTECTED] Subject: RE: reducing tomcat jasper memory footprint Julian, I would have to agree that creating a JSP per article is a bit much. How did you or your group arrive at using this solution? The other possible solutions I have seen would include a single JSP that pulls the data from a database or creating XML files that are formatted with XSLT instead of JSP's Is the system doing some processing that requires one page or article or requires JSP -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Apache HTTPD Tomcat: Where does mod_jk step in?
On Mon, 30 Dec 2002, Johnson, Garrett wrote: Ladies and Gentlemen: I'm using Apache 2.0.43 and Tomcat 4.1.12 with JK on Win2K. I'm using the JkMount directives to send all requests to /servlets/ and /*.jsp to Tomcat. However, I need to know where in the server processing JK actually intercepts those requests and shoots them off to tomcat, and what preprocessing Tomcat does to them afterwards. Can Tomcat use it's own Realms to handle authentication or does Apache need to do that? Do aliases map the request in Apache before JK grabs them? WORKFLOW. That's what I need to understand. Does anyone know much about that? Is there some documentation available somewhere on this workflow? I've ripped www.apache.org and jakarta.apache.org apart and found nothing. Help me, Obi-Wan Kenobi. You're my only hope. Use the source, Luke. (Sorry, you asked for that one :-). Milt Epstein Research Programmer Integration and Software Engineering (ISE) Campus Information Technologies and Educational Services (CITES) University of Illinois at Urbana-Champaign (UIUC) [EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Apache HTTPD Tomcat: Where does mod_jk step in?
ROFLMAO John -Original Message- From: Milt Epstein [mailto:[EMAIL PROTECTED]] Sent: Monday, December 30, 2002 3:54 PM To: Tomcat Users List Subject: Re: Apache HTTPD Tomcat: Where does mod_jk step in? On Mon, 30 Dec 2002, Johnson, Garrett wrote: Ladies and Gentlemen: I'm using Apache 2.0.43 and Tomcat 4.1.12 with JK on Win2K. I'm using the JkMount directives to send all requests to /servlets/ and /*.jsp to Tomcat. However, I need to know where in the server processing JK actually intercepts those requests and shoots them off to tomcat, and what preprocessing Tomcat does to them afterwards. Can Tomcat use it's own Realms to handle authentication or does Apache need to do that? Do aliases map the request in Apache before JK grabs them? WORKFLOW. That's what I need to understand. Does anyone know much about that? Is there some documentation available somewhere on this workflow? I've ripped www.apache.org and jakarta.apache.org apart and found nothing. Help me, Obi-Wan Kenobi. You're my only hope. Use the source, Luke. (Sorry, you asked for that one :-). Milt Epstein Research Programmer Integration and Software Engineering (ISE) Campus Information Technologies and Educational Services (CITES) University of Illinois at Urbana-Champaign (UIUC) [EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.434 / Virus Database: 243 - Release Date: 12/25/2002 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.434 / Virus Database: 243 - Release Date: 12/25/2002 -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Tomcat Ant custom taks
I believe there is an O'Reilly book on using Ant. Gee Jee wrote: Hi, I've been sort of using the Tomcat library for Ant custom tasks. I got some of it to work by using the information on the Tomcat website. However, I did not find a consise overview of this library. Is this available somewhere? It seems very useful as a part of my build scripts. Gerard Janssen -- 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: Tomcat Ant custom taks
Not sure if this is what you're looking for, but you can go here: http://jakarta.apache.org/tomcat/tomcat-4.1-doc/catalina/docs/api/index.html and click on the org.apache.catalina.ant package link. BTW, a good Ant book is Java Development withAnt. Mark At 12/30/2002 01:59 PM, you wrote: I believe there is an O'Reilly book on using Ant. Gee Jee wrote: Hi, I've been sort of using the Tomcat library for Ant custom tasks. I got some of it to work by using the information on the Tomcat website. However, I did not find a consise overview of this library. Is this available somewhere? It seems very useful as a part of my build scripts. Gerard Janssen -- 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: reducing tomcat jasper memory footprint
the a bad thing is that the jasper generated code creates for each request all string object new. So hundred unneeded String objects consuming a lot off memory. And so big pages with many poor texts without codeneeds a big amount of memory. Torsten Fohrer On Monday 30 December 2002 20:37, you wrote: Hi, I'm using Apache 1.3.26 and 3 tomcat 4.0.4 instances with AJP13 loadbalancing . Our application is a CMS where all the published articles are generated offline as JSP-Files, one jsp per article. We had hige problems with the memory footprint. Due to the fact that every jsp is generated as a class and there are about 200 new artices per day the permanent segment of the JVM heap gets filled with all the classes, and I get an OutOfMemoryError. My workaround for now is setting -XX:PermSize and --XX:MapPermSize to higher values, but this just delays application hang-up. With 64 megs of permSize our Server had an approx. uptime of 1 day now it's about 3-4 days. Is there any way to unload jsp-Files (unload the class) ? llap, julian -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: reducing tomcat jasper memory footprint
Could you explain this further? What exactly is the many poor 'texts'? Thanks Torsten. -Dan -Original Message- From: Torsten Fohrer [mailto:[EMAIL PROTECTED]] Sent: Monday, December 30, 2002 4:39 PM To: Tomcat Users List Subject: Re: reducing tomcat jasper memory footprint the a bad thing is that the jasper generated code creates for each request all string object new. So hundred unneeded String objects consuming a lot off memory. And so big pages with many poor texts without codeneeds a big amount of memory. Torsten Fohrer On Monday 30 December 2002 20:37, you wrote: Hi, I'm using Apache 1.3.26 and 3 tomcat 4.0.4 instances with AJP13 loadbalancing . Our application is a CMS where all the published articles are generated offline as JSP-Files, one jsp per article. We had hige problems with the memory footprint. Due to the fact that every jsp is generated as a class and there are about 200 new artices per day the permanent segment of the JVM heap gets filled with all the classes, and I get an OutOfMemoryError. My workaround for now is setting -XX:PermSize and --XX:MapPermSize to higher values, but this just delays application hang-up. With 64 megs of permSize our Server had an approx. uptime of 1 day now it's about 3-4 days. Is there any way to unload jsp-Files (unload the class) ? llap, julian -- 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]
ServletContextListener cannot load Oracle JDBC driver
Hi, I have a ServletContextListener which loads application resources from an Oracle database when application is installed. But a SQLException(see below) is thorwn becase DBCP cannot load JDBC driver. The JDBC driver(ojdbc14.jar) is installed in the ${CATALINA_HOME}/common/lib according to the instructions in the JNDI resources tutorial. I use 'ant install' task and DBCP connection pooling (commons-dbcp.jar are in ${CATALINA_HOME}/common/lib and WEB-INF/lib, but I d'ont think this is the problem). All work well until I want to load the resouces in the ServletContextListener(If I d'ont use the ServletContextListener, all work well). I use the follwoing environment: Win2000 professional with SP3, j2sdk-1.4.1_01 tomcat 4.1.8 Oracle 9i JDBC driver : ojdbc14.jar (I have tried classes12.jar with jdk1.3.1, the problem also occurs). Config in the server.xml: DefaultContext Resource name=jdbc/ClassifiedDb auth=Container type=javax.sql.DataSource/ ResourceParams name=jdbc/ClassifiedDb parameter nameusername/name valuescott/value /parameter parameter namepassword/name valuetiger/value /parameter parameter namedriverClassName/name valueoracle.jdbc.driver.OracleDriver/value /parameter parameter nameurl/name valuejdbc:oracle:thin:@localhost:1521:ora/value /parameter /ResourceParams /DefaultContext The config in the web.xml resource-ref description Resource reference to a factory for java.sql.Connection instances that may be used for talking to a particular database that is configured in the server.xml file. /description res-ref-name jdbc/ClassifiedDb /res-ref-name res-type javax.sql.DataSource /res-type res-auth Container /res-auth /resource-ref java.sql.SQLException: Cannot load JDBC driver class 'null' at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSou rce.java:529) at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource .java:312) at com.chinatown.classified.dao.AbstractDAO.getConnection(AbstractDAO.ja va:51) at com.chinatown.classified.dao.CategoryDAO.findAllProvence(CategoryDAO. java:46) at com.chinatown.classified.context.CategoryContextListener.contextIniti alized(CategoryContextListener.java:73) at org.apache.catalina.core.StandardContext.listenerStart(StandardContex t.java:3269) at org.apache.catalina.core.StandardContext.start(StandardContext.java:3 598) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase .java:821) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:80 7) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:579) at org.apache.catalina.core.StandardHostDeployer.install(StandardHostDep loyer.java:257) at org.apache.catalina.core.StandardHost.install(StandardHost.java:772) at org.apache.catalina.servlets.ManagerServlet.install(ManagerServlet.ja va:650) at org.apache.catalina.servlets.ManagerServlet.doGet(ManagerServlet.java :342) at javax.servlet.http.HttpServlet.service(HttpServlet.java:740) Any help will be apprecied. Peiqiang Han -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Tomcat Ant custom taks
Some other books Java Tools for ExtermeProgramming also handles EE and Junit etc I think the Java Development with Ant is way far better than O'reilly book. The project documentation is actually pretty good too. At 05:18 PM 12/30/2002 -0500, you wrote: Not sure if this is what you're looking for, but you can go here: http://jakarta.apache.org/tomcat/tomcat-4.1-doc/catalina/docs/api/index.html and click on the org.apache.catalina.ant package link. BTW, a good Ant book is Java Development withAnt. Mark At 12/30/2002 01:59 PM, you wrote: I believe there is an O'Reilly book on using Ant. Gee Jee wrote: Hi, I've been sort of using the Tomcat library for Ant custom tasks. I got some of it to work by using the information on the Tomcat website. However, I did not find a consise overview of this library. Is this available somewhere? It seems very useful as a part of my build scripts. Gerard Janssen -- 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: reducing tomcat jasper memory footprint
Hi, My problem isin't javac memory leakes. Due to the apache/tomcat documentation I was aware of this an setup jikes as my jsp compiler. I'm also using JDK 1.4.1 so the javac issues should be solved, nonetheless. The main problem is as follows: 1. Every article every page in general is a jsp page 2. All the pages are generated by a legacy CMS-System (imperia) and I can't change the structure of it's works. 3. Every jsp page, once loaded, consumes memory, since the class remains loaded. 4. We have 1000s of pages , every day some 200-300 new, so memory use increases. Conclusion: The way we use jsp's for a cms is faulty. But I can't do anything about this. Increasing permSize of the JVM helps a lot. Maybe it would be a good idea to include some hints about -XX:MaxPermSize and XX:PermSize into the documentation because it really helps lessen the problems. But: Is there any generic way to get a stable tomcat with huge number of jsp's ? Thanks for all ya feedback llap + happy new year... julian - Original Message - From: Remy Maucherat [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Monday, December 30, 2002 9:40 PM Subject: Re: reducing tomcat jasper memory footprint Paul Yunusov wrote: On Monday 30 December 2002 02:37 pm, Julian Löffelhardt wrote: Hi, I'm using Apache 1.3.26 and 3 tomcat 4.0.4 instances with AJP13 loadbalancing . Our application is a CMS where all the published articles are generated offline as JSP-Files, one jsp per article. We had hige problems with the memory footprint. Due to the fact that every jsp is generated as a class and there are about 200 new artices per day the permanent segment of the JVM heap gets filled with all the classes, and I get an OutOfMemoryError. My workaround for now is setting -XX:PermSize and --XX:MapPermSize to higher values, but this just delays application hang-up. With 64 megs of permSize our Server had an approx. uptime of 1 day now it's about 3-4 days. Is there any way to unload jsp-Files (unload the class) ? llap, julian JAVAC leaks memory every time a JSP class is compiled. The more JSPs are compiled or the more often JSP classes are compiled, the more memory is leaked. You exacerbate this problem by generating a JSP per article often. IMHO, generating a JSP per article is misusing the technology. JSP is a templating solution whereas one JSP describes a layout of any number of end documents. I suggest you change your software to generate an HTML file per artcile rather than a JSP. Maybe it's abusing the technology, but it really should work fine. Workarounds for the problem include using jikes, or using javac out of process (I don't quite remember how it is configured; since Jasper 2 uses Ant javac task to compile, it should be in the Ant docs on the javac task). Remy -- 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: session id's really unique?
Just to confirm, If I send use RequestDispatcher.forward(request, response) and send it to another context, that session will be newly managed under the new context (or by the original context) and therefore there is no risk of duplicate id's. The other issue is to be patched. Shawn Sorry to be paranoid. Can't help it though. On Mon, 2002-12-30 at 23:58, Glenn Olander wrote: You run the risk of getting duplicate session id's. However, across contexts you'll have separate Managers, and therefore different sets of sessions. So, you don't run the risk of one context gaining access to another context's sessions. The risk is the one discussed in the other session id thread where if you get duplicate session id's in the same context. Then you've got serious problems. shawn wrote: If I use RequestDispatcher.forward(request, response) to another context am I running the risk of session id conflicts? -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- shawn [EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
JBuilder and SUN EE server
How can i intergate JBulder 8 with Sun J2EE Server? -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: running tomcat as a non-root user?
Thanks to all those who responded; John, Mike, Jerry, Ben, Noel. Yes, I got it working. Season greetings. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Ant Build Script Fails to Invoke Manager with install command
Can anyone suggest what's wrong? As a relative newbie, I've been modifying and using the example build.xml file provided with the tomcat-docs. I am using it from Intellij IDEA. It's working fine, except I can't get the install target to work. The catalina-ant.jar file has been added to the Build File Properties Additional Classpath in IDEA's Ant Dialog. I am getting a http 401 authentication error. I have provided a build.properties file in the top level directory and Ant seems to find it ok. I see the message: Loading c:\Projects\BookClubEmail\build.properties Here's the build.properties file: manager.password=lydlyd manager.username=diskind Here's the text version of the ANT IDEA Message Window: install C:\Projects\BookClubEmail\build.xml:367: java.io.IOException: Server returned HTTP response code: 401 for URL: http://localhost:8080/manager/install?path=%2FBookClubEmailwar=file%3A%2F%2FC%3A%5CProjects%5CBookClubEmail%2Fbuild C:\Projects\BookClubEmail\build.xml:367: java.io.IOException: Server returned HTTP response code: 401 for URL: http://localhost:8080/manager/install?path=%2FBookClubEmailwar=file%3A%2F%2FC%3A%5CProjects%5CBookClubEmail%2Fbuild C:\Projects\BookClubEmail\build.xml:367: java.io.IOException: Server returned HTTP response code: 401 for URL: http://localhost:8080/manager/install?path=%2FBookClubEmailwar=file%3A%2F%2FC%3A%5CProjects%5CBookClubEmail%2Fbuild Build completed with 3 errors. Time: 11 s -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Ant Build Script Fails to Invoke Manager with install command
Did you update conf/web.xml to add a manager username/password/role? 401 means unathorized access to a password protected page At 12:21 AM 12/31/2002 -0500, you wrote: Can anyone suggest what's wrong? As a relative newbie, I've been modifying and using the example build.xml file provided with the tomcat-docs. I am using it from Intellij IDEA. It's working fine, except I can't get the install target to work. The catalina-ant.jar file has been added to the Build File Properties Additional Classpath in IDEA's Ant Dialog. I am getting a http 401 authentication error. I have provided a build.properties file in the top level directory and Ant seems to find it ok. I see the message: Loading c:\Projects\BookClubEmail\build.properties Here's the build.properties file: manager.password=lydlyd manager.username=diskind Here's the text version of the ANT IDEA Message Window: install C:\Projects\BookClubEmail\build.xml:367: java.io.IOException: Server returned HTTP response code: 401 for URL: http://localhost:8080/manager/install?path=%2FBookClubEmailwar=file%3A%2F%2FC%3A%5CProjects%5CBookClubEmail%2Fbuild C:\Projects\BookClubEmail\build.xml:367: java.io.IOException: Server returned HTTP response code: 401 for URL: http://localhost:8080/manager/install?path=%2FBookClubEmailwar=file%3A%2F%2FC%3A%5CProjects%5CBookClubEmail%2Fbuild C:\Projects\BookClubEmail\build.xml:367: java.io.IOException: Server returned HTTP response code: 401 for URL: http://localhost:8080/manager/install?path=%2FBookClubEmailwar=file%3A%2F%2FC%3A%5CProjects%5CBookClubEmail%2Fbuild Build completed with 3 errors. Time: 11 s -- 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 about a tomcat instance create tool?
I see that there is a manager application, but this only manages one instance of tomcat... How about a tool that would create multiple instances of tomcat, with a virtual host, etc that is templated version of tomcat. In this manner, I can create 10 different instances of tomcat, without worrying about port conflicts, etc. I could do it as a java webapp, or even a webmin module Any interest or thoughts? -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
info. on tomcat contexts
Hi, We would like to read up on the context declarations in the server.xml. Our application context listener is called twice. What is the best way to debug this short of plowing through the source code? Context path= docBase=SmartManage debug=0... This type of context declaration loads the context twice. Any pointers would be really appreciated. Even after reading articles on the web on this matter we are not able to come to a conclusion about this. Thanks, Mohan -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Warning: messages in catalina.out
The first one is usually just that the client hit the stop button in the browser. At the moment, the AJP13 protocol doesn't support out-of-band messages to tell Tomcat about this, so it just drops the connection instead. The second one is just a warning (which will at least be correct in 4.1.19 :) that the auto-config listener is guessing the location of mod_jk.so/dll. If it's working, you can ignore it. Rob Cartier [EMAIL PROTECTED] wrote in message 000a01c2aff8$c8e387a0$0201a8c0@europa">news:000a01c2aff8$c8e387a0$0201a8c0@europa... I am little concerned about Warning messages I see in my catalina.out file. The pages appear to be fine but I get these messages quite a bit. Are these session timeout and restart messages? Dec 29, 2002 6:33:10 PM org.apache.jk.common.ChannelSocket processConnection WARNING: server has closed the current connection (-1) Dec 29, 2002 6:33:10 PM org.apache.jk.common.ChannelSocket processConnection WARNING: server has closed the current connection (-1) Also during startup the following entry is in the file INFO: Initializing Coyote HTTP/1.1 on port 8080 mod_jk location: libexec/mod_jk.so Make sure it is installed corectly or set the config location Using ApacheConfig modJk=PATH_TO_MOD_JK.SO_OR_DLL / Is this because it is inccorectly configured? Thanks in advance Rob Cartier -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Apache HTTPD Tomcat: Where does mod_jk step in?
Now that we are done attacking clones :) The workflow is pretty simple. In the map-to-storage hook, mod_jk detects that the request should be handled by Tomcat, and registers itself as the handler. Later, when the handler hook is called (I forget the name for Apache2, and don't feel like looking it up :), mod_jk passes the request information (e.g. RequestURI, RequestMethod, Headers) to Tomcat, who then processes the Request normally (i.e. not much differently than if it had been recieved by the HTTP/1.1 connector). The Connector also aranges to send the data in the Response OutputStream/Writer back to mod_jk as the data is available. When mod_jk recieves the output, it sends it back to the client. It's been a while since I've gone through the Apache2 hooks, but I believe that Alias directives aren't handled in map-to-storage, so they should be orthoganal to the mod_jk directives (which is useful when you want Apache2 to serve static content). Unless you set tomcatAuthentication=false on the connector (and don't configure security via Apache directives), then Tomcat's Realms will handle all authentication/authorization. But it is not a two-way thing. You need to set 'JkMount /MyApp/protected/* ajp13' to prevent Apache from serving static content without authorization. Johnson, Garrett [EMAIL PROTECTED] wrote in message 5DE7B60BFBA5D411B961000629D5225552D787@NYCCNDX3">news:5DE7B60BFBA5D411B961000629D5225552D787@NYCCNDX3... Ladies and Gentlemen: I'm using Apache 2.0.43 and Tomcat 4.1.12 with JK on Win2K. I'm using the JkMount directives to send all requests to /servlets/ and /*.jsp to Tomcat. However, I need to know where in the server processing JK actually intercepts those requests and shoots them off to tomcat, and what preprocessing Tomcat does to them afterwards. Can Tomcat use it's own Realms to handle authentication or does Apache need to do that? Do aliases map the request in Apache before JK grabs them? WORKFLOW. That's what I need to understand. Does anyone know much about that? Is there some documentation available somewhere on this workflow? I've ripped www.apache.org and jakarta.apache.org apart and found nothing. Help me, Obi-Wan Kenobi. You're my only hope. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Please reply--Important print writer problem.
You should not ever attempt to use an OutputStream from a JSP page. The entire point of JSP pages is to output text! JSP pages will always grab the Writer (per the spec), before your code has a chance to execute. I'd suggest converting your JSP to a Servlet (not hard, based on the code below). You should then be able to use the OutputStream happily. Yasir [EMAIL PROTECTED] wrote in message 02ae01c2b009$144cd8d0$[EMAIL PROTECTED]">news:02ae01c2b009$144cd8d0$[EMAIL PROTECTED]... Hi Friends, I am receiving the sam eproblem which you have put on the site.I am following MVC architecture and working with IBM WPOrtal server.I have my JSP packaged within the par file(PORTLET ARCHIVE).I have a code in my JSP which writes some zip content to the browser using servletoutput stream The aim is to download the zip file to the client machine my invoking the browsers default download box.This works fine if i have the JSP outside the PAR file but when i have this JSP inside the par it gives the exception. java.lang.IllegalStateException Writer has already been obtained. Please let me know the solution ASAP.Its important for me. pasted below is the piece of code i am using in the jsp % // Create a object of CreateZip CreateZip createZip = new CreateZip(); // It stores Report Path. String reportPath = C:/www/web-data/fieldconnect/llreports/YASIR.txt; // Create a object of PrintWriter PrintWriter printWriter = new PrintWriter(new FileOutputStream(new File(reportPath))); printWriter.print(WritWriWritWWrWWriting data to text file...Writing data to text file...riting data to text file...Writing data to text file...Writing data to text file...Writing data to text file...iting data to text file...Writing data to text file...riting data to text file...Writing data to text file...ing data to text file...Writing data to text file...ting data to text file...Writing data to text file...ing data to text file...Writing data to text file...Writing data to text file...Writing data to text file...Writing data to text file...Writing data to text file); printWriter.flush(); printWriter.close(); // It stores path of text file String path = C:/www/web-data/fieldconnect/llreports/; // It stores name of text file String fileName = YASIR.txt; // making zip of text file generated createZip.makeZip(fileName,path); String zipPath = C:/www/web-data/fieldconnect/llreports/YASIR.zip; File deleteZipFile = new File(zipPath); int zipsize = (int)deleteZipFile.length(); byte abyte0[] = new byte[zipsize]; ByteArrayOutputStream ba = new ByteArrayOutputStream(zipsize); File deleteTxtFile = new File(reportPath); if (deleteTxtFile.exists()){ deleteTxtFile.delete(); } //PrintWriter zipWriter = new PrintWriter(new FileOutputStream()); FileInputStream fileInputStream = new FileInputStream(zipPath); BufferedInputStream bufferedinputstream = new BufferedInputStream(fileInputStream); int i; while((i = bufferedinputstream.read(abyte0)) != -1){ ba.write(abyte0,0,i); } bufferedinputstream.close(); HttpServletResponse sResponse = (HttpServletResponse)((PortletResponseImpl)response).getServletResponse(); sResponse.setContentType(application/zip); sResponse.setContentLength(ba.size()); sResponse.setHeader(Content-Type,application/octet-stream); sResponse.setHeader(Content-Disposition,attachment; filename=\YASIR.zip\); if (ba != null) { ServletOutputStream sout = sResponse.getOutputStream(); ba.writeTo(sout); ba.flush(); ba.close(); sout.close(); } if (deleteZipFile.exists()){ deleteZipFile.delete(); } % Thanks, Yasir. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Console output in Tomcat
Hi all, When I used Java Web Server, it ran in the console, and if I had a statement like System.out.println(someValue) in my servlet, I was able to see the output on the console. Where does all this output go in Tomcat? I am not able to see anything printed by System.out.println(). Thanks, Raj ** Message from InterScan E-Mail VirusWall NT ** ** No virus found in attached file noname.htm ** No virus found in attached file noname.htm This mail has been scanned by Interscan Viruswall * End of message *** -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]