Re: Problems with a web application running a PHP script
> > --- > HARBOR: http://coolharbor.100free.com/index.htm > Now Tomcat is also a cool pojo application server > --- > - Original Message - > From: "Rocco Scappatura" <[EMAIL PROTECTED]> > To: "Tomcat Users List" > Sent: Tuesday, November 06, 2007 2:37 AM > Subject: Re: Problems with a web application running a PHP script > > >> >>> As Chuck mentioned , this script class is in 1.6 so you need to either >>> change the environment variable or if from service set it to 1.6. >>> Then there is just one other thing, in NB right >>> click->properties->source... >>> Check the source level... >>> ie you can be running on 1.6 but still tell NB to make it 1.5... which >>> will >>> also snooker you ;) >> >> OK, even if NB doesn't show me the choice to use 1.6 script class. I ve >> set the 1.5. > > That, to me seems to be the problem, if Netbeans is not giving you the > choice of 1.6 > it can only see JRE 1.5 Thanks for you hints. I will disinstall all JDK/JRE versions from my PC. I'm dowloading JDK 6 Update 3 and I will install it. Finally I do so that the Tomcat 5.5.25 (The one installed by hand) is used by projects. Moreover I will do so it is used 1.6 script class. BTW I have a folder (C:/Project) where all the projects are built. When the webapps work, then I will grab the WAR files and I put in the appropriate 'webapps' of my production environment. This seems to me the correct procedure that I infere from your argumentation. Thanks, rocsca Thanks, rocsca - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problems with a web application running a PHP script
--- HARBOR: http://coolharbor.100free.com/index.htm Now Tomcat is also a cool pojo application server --- Another FootNote Just so you understand where I'm trying to get you to... I'm trying to show you that instead of dropping a WAR into a TC and then looking at errors in a log. You can connect NB to that TC, keep the code in your DEV environment. Then errors are right there when you try run it, it will take you to the line of code that is bitching, you can right click and have a look at the javadocs and learn about the function, you can switch source levels and find it works on 1.6 but not 1.5, you can swap to a different TC and run it if you suspect a server settings. You can help yourself ;) Hope that gets you going... - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problems with a web application running a PHP script
--- HARBOR: http://coolharbor.100free.com/index.htm Now Tomcat is also a cool pojo application server --- FootNote Having a separate TC, (not using the embedded one in NB) is much better. When you compile and run (just make sure PROPERTIES->RUN) is using the new TC, then your project (even though the files are in your projects) runs in the NEW TC The log files and conf setting and all that stuff that are now in affect... are the ones in the NEW TC, ie that not hiding in weird places like the embedded TC, ie it is exactly the same as any other TC installation. Then I have other ones that I setup for port 80, and for testing clustering and all that stuff. So the one in my NB is purely for testing and I can screw around with server.xml etc without affecting those the production environment ie when it comes time to move to say the port 80 test level, then I literally copy the WAR into those TC's... ie I keep it seperate from the test versions the reason for this is that if you mix them its very easy to think a webapp is working and whats in fact happening is that its still running the webapp in NB... so then when someone deletes it, or changes it, the production server goes ape keep them seperate. Keep going you almost there... if you get this right, developing with TC like this is magic... - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problems with a web application running a PHP script
--- HARBOR: http://coolharbor.100free.com/index.htm Now Tomcat is also a cool pojo application server --- - Original Message - From: "Rocco Scappatura" <[EMAIL PROTECTED]> To: "Tomcat Users List" Sent: Tuesday, November 06, 2007 2:37 AM Subject: Re: Problems with a web application running a PHP script As Chuck mentioned , this script class is in 1.6 so you need to either change the environment variable or if from service set it to 1.6. Then there is just one other thing, in NB right click->properties->source... Check the source level... ie you can be running on 1.6 but still tell NB to make it 1.5... which will also snooker you ;) OK, even if NB doesn't show me the choice to use 1.6 script class. I ve set the 1.5. That, to me seems to be the problem, if Netbeans is not giving you the choice of 1.6 it can only see JRE 1.5 Scripting is a new feature in JRE 1.6! So you need to tell TC and NB to use the JRE 1.6 If TC running as a service if you double click on the feather in the task bar, and go to the JAVA tab, in the JVM setting you will see something like C:\jdk1.5.0_06\jre\bin\server\jvm.dll must be (find it on your machine) C:\jdk1.6\jre\bin\server\jvm.dll In NB, you go to TOOLS->PLATFORM MANAGER and show it where you have Java JRE/JDK 1.6 installed Then just make sure you existing project uses it at source level, ie it will still give you the option of compiling it as 1.5, but thats no good it must be 1.6. Other that this, I would like to know how I could solve my initial problem. As we understand it, your application is looking for a class that only comes in 1.6 It can find that class because the Java engine you running is 1.5. But as we understood it, it was working in the embedded TC that comes with NB, so that implies that it was working on JRE 1.6 and that the new TC was not... We THINK the problem is that you have things working on different JRE's on your machine... they must all work on the the same 1.6 one, then your DEV environment and various TC's will work together. Moreover I have another question. When I create a new project in NB, do I set the 'Project folder' as the folder where I put webapps (i.e.: suppose that I put every webapps in "C:\tomcat", then I have to set "Project Folder" to "C:\tomcat")?. NO... create a convenient projects folder on your machine and NB will put the files there. When you compile, and run, NB creates a build folder, and then ASKS the TC that you have SET, to run it. So it actually runs in that new TC you installed. When its all debugged... and I imagine now its taking you to a functions that it cant find (because the class is in JRE6), then you stop NB from running that Tomcat compile it and just drop the WAR into any TC the USES JRE 1.6 Infact, otherwise (in particular, I have defined a different engine, host, connector and so on) I can't start the web application after deployment with NB. NO, in the DEV environment you do nat have to deploy, just compile and run it or debug it. When you done you can deploy... but I prefer actually copying the WAR file from the project to WEBAPPS, that what other people will do. If you deploy it the TC wants to use the file now in TC webapps... but while you testing you still want it to use the files in NB BUILD (your test project) because you can debug that easily. Get the JRE the same for everything You may be collecting JRE's automatically on windows... it does that What I always to is get the actual JDK for java, stick that in a special folder, and tell the DEV environment to use it... then everytime browser JRE prompt for updates, it doesnt matter if the user on the machine installs all this stuff. If you install the JDK1.6 Then install TC (on windows its setup)... point at that JDK6 Then install NB (on windows its setup)... point at that JDK6 Then just show NB where the new TC is. You done! Good luck ;) Thanks, rocsca - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat 3.3.1a problem
I don't recognize the problem, but AJP12 was deprecated even for 3.3.1a (which, for Pid's benifit, was a single security issue bugfix release from 3.3.1). In any case, it will be a bottleneck for any attempt to scale your application. You should try with the AJP13 connector, which works better on 3.3.1a then either the AJP12 connector or the HTTP/1.0 connector (the HTTP/1.0 connector in particular is known to have issues on Windows). If you can set up a test environment, the other thing to try is 3.3.2 with the CoyoteConnector (either AJP13 or HTTP/1.1). Short-term it is probably less painful than upgrading to TC 5.5.x or TC 6.0.x. Additional information I'd like to see is the mod_jk version (AJP12, while still shipping with the most recent mod_jk hasn't been supported in a very long time. It wouldn't surprise me at all if it is broken on recent versions), and a thread dump if you can get one. Also turning up your JkLogLevel to debug on mod_jk might help. As Mark noted, 3.3.x is still somewhat officially supported (although I have trouble seeing what would trigger a 3.3.3 release, even if it does have some goodies in it :). If you can get the thread dump and/or the debug mod_jk logs, it may be better if you open a BZ report and attect them there, so they are easier for me to find. "Marko Krejic" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] Hi, We are running Tomcat 3.3.1a on a Windows Server 2003. A apache server is also installed on the machine as a proxy and it is connected with the tomcat through AJP12. Tomcat is running on JDK1.4.2_13. Now to our problem. We have been running this setup for quite a while (a few years). But until recently, the load has increased. It seems like when there are quite many connections, then suddenly it is not possible to read the requestbody anymore. We get the request and we are seeing the request header, but when we want to read the body, it all seems to hang... At this time it seems like the threads are just stacking up and nothing is processed. Other threads, such as timer-threads and file-listener threads, are running normally. It seems like only the request comming through the connectors (the AJP12 and HTTP) are hanging. Does anybody recognise these problems? And does anybody have any suggestions about how to fix this? We have tried to run without Apache and AJP12, but we got the same problem. I could mention that we know that we have mobile clients sending requests to the server and if the server is not responding within a certain time, they will "cut-off" the request. Could it be that tomcat is not "releasing" these requests? Please, any suggestions would be very apprieciated! Thanks in advance! Marko Krejic - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat causing high CPU load
Is there a link for Moskito? On Nov 6, 2007 6:21 AM, Leon Rosenberg <[EMAIL PROTECTED]> wrote: > Moskito can display monitoring traces instantly (path through > monitoring points) and measure time in each call and sub-calls, but it > requires some source code adoption. > > regards > Leon > > > On 11/5/07, Caldarale, Charles R <[EMAIL PROTECTED]> wrote: > > > From: Caldarale, Charles R > > > Subject: RE: Tomcat causing high CPU load > > > > > > There are also some 3rd-party tools to take thread dumps of > > > services (I think JProbe does, for example). > > > > Also, Lambda Probe (www.lambdaprobe.org) can display stack traces, but > > only one thread at a time. > > > > - Chuck > > > > > > THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY > > MATERIAL and is thus for use only by the intended recipient. If you > > received this in error, please contact the sender and delete the e-mail > > and its attachments from all computers. > > > > - > > To start a new topic, e-mail: users@tomcat.apache.org > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > - > To start a new topic, e-mail: users@tomcat.apache.org > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problems with a web application running a PHP script
> As Chuck mentioned , this script class is in 1.6 so you need to either > change the environment variable or if from service set it to 1.6. > Then there is just one other thing, in NB right > click->properties->source... > Check the source level... > ie you can be running on 1.6 but still tell NB to make it 1.5... which > will > also snooker you ;) OK, even if NB doesn't show me the choice to use 1.6 script class. I ve set the 1.5. Other that this, I would like to know how I could solve my initial problem. Moreover I have another question. When I create a new project in NB, do I set the 'Project folder' as the folder where I put webapps (i.e.: suppose that I put every webapps in "C:\tomcat", then I have to set "Project Folder" to "C:\tomcat")?. Infact, otherwise (in particular, I have defined a different engine, host, connector and so on) I can't start the web application after deployment with NB. Thanks, rocsca - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat 3.3.1a problem
Pid wrote: > Marko Krejic wrote: >> Hi, >> >> We are running Tomcat 3.3.1a on a Windows Server 2003. A apache server is >> also installed on the machine as a proxy and it is connected with the tomcat >> through AJP12. Tomcat is running on JDK1.4.2_13. > > The silence you experienced is people being dumbfounded that you're > running Tomcat 3 (versions up to and including 5.0 are now no longer > supported) This is not the case. Whilst 5.0.x is unsupported, 4.1.x is still supported (and will be for some time) and technically so is 3.3.x although 3.3.x is next on my list of things to ask the dev list if we want to de-support. and AJP12. Tomcat 3 is ancient. Indeed ;) Mark - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Heap out of memory error
> From: Bob Riaz [mailto:[EMAIL PROTECTED] > Subject: Heap out of memory error > > From time to time I have come across this error in the Tomcat logs: > java.lang.OutOfMemoryError: Java heap space If you're running Tomcat as a Windows service, use the tomcat6w.exe program to set initial and maximum heap sizes. If you're not running as a service, set JAVA_OPTS to include the -Xms and -Xmx parameters. And when you need something to put yourself to sleep, browse through this: http://java.sun.com/javase/technologies/hotspot/gc/index.jsp - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat causing high CPU load
Moskito can display monitoring traces instantly (path through monitoring points) and measure time in each call and sub-calls, but it requires some source code adoption. regards Leon On 11/5/07, Caldarale, Charles R <[EMAIL PROTECTED]> wrote: > > From: Caldarale, Charles R > > Subject: RE: Tomcat causing high CPU load > > > > There are also some 3rd-party tools to take thread dumps of > > services (I think JProbe does, for example). > > Also, Lambda Probe (www.lambdaprobe.org) can display stack traces, but > only one thread at a time. > > - Chuck > > > THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY > MATERIAL and is thus for use only by the intended recipient. If you > received this in error, please contact the sender and delete the e-mail > and its attachments from all computers. > > - > To start a new topic, e-mail: users@tomcat.apache.org > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat causing high CPU load
> From: Caldarale, Charles R > Subject: RE: Tomcat causing high CPU load > > There are also some 3rd-party tools to take thread dumps of > services (I think JProbe does, for example). Also, Lambda Probe (www.lambdaprobe.org) can display stack traces, but only one thread at a time. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Heap out of memory error
Hi all, I have web apps using the following: JDK 1.5 Tomcat 6 SQL Server 2000 Windows 2000 server >From time to time I have come across this error in the Tomcat logs: java.lang.OutOfMemoryError: Java heap space I understand the default heap size is 64M, and that it is possibe to configure Tomcat with a larger heap size. Would any one know how this is done? The instructions I've found on the web so far have not been helpful. Thanks. -bob - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat causing high CPU load
> From: Sai Bobba [mailto:[EMAIL PROTECTED] > Subject: Re: Tomcat causing high CPU load > > I've searched the web for taking thread dumps Try searching the Tomcat mailing list archives (http://marc.info/?l=tomcat-user) as well. For Windows, run the process from a command prompt, and enter a CTRL-break when you see the problem. If you're running it as a service, get the PID number from Task Manager and use it with the jstack.exe program. (Not sure if jstack is available with JDK 1.5, but it is included in JDK 6.) There are also some 3rd-party tools to take thread dumps of services (I think JProbe does, for example). - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat causing high CPU load
Many thanks. We've had several developers walk through the code to try to catch the possibity that the app may be sitting in a loop in some situations. The code seems ok, and, as I indicated, we've never been able to reproduce the situation. I've searched the web for taking thread dumps, as I don't know how to do that, butg haven't been able to find anything. Perhaps you could give me a pointer if you have the time. Thanks again for your attention. Bob On 11/4/07, Caldarale, Charles R <[EMAIL PROTECTED]> wrote: > > > From: Sai Bobba [mailto:[EMAIL PROTECTED] > > Subject: Tomcat causing high CPU load > > > > - Tomcat was responsible for this CPU > > load almost exclusively > > You need to differentiate between Tomcat and the webapps running within, > even though they are all running in the same process. It is highly > likely that it's your webapp stuck in a loop, not Tomcat itself. As a > first step, take several thread dumps when this high CPU usage is > observed, and see where the threads are spending their time. > > - Chuck > > > THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY > MATERIAL and is thus for use only by the intended recipient. If you > received this in error, please contact the sender and delete the e-mail > and its attachments from all computers. > > - > To start a new topic, e-mail: users@tomcat.apache.org > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >
Re: ClientAbortException writing file to servlet's output stream over SSL in IE
As far as I can tell, I don't have any such file catalina.policy. There isn't one in server/default/conf, nor in server/default/deploy/jbossweb-tomcat55.sar/conf. --Forwarded Message Attachment-- From: [EMAIL PROTECTED] To: users@tomcat.apache.org Subject: Re: ClientAbortException writing file to servlet's output stream over SSL in IE Date: Fri, 2 Nov 2007 20:39:02 -0500 Please display /conf/catalina.policy SocketPermission for your SocketConnection e.g. // grant codeBase "file:${catalina.home}/webapps/examples/-" { // permission java.net.SocketPermission "*.noaa.gov:80", "connect"; // }; M-- - Original Message - From: "Jake C" <[EMAIL PROTECTED]> To: Sent: Friday, November 02, 2007 7:36 PM Subject: ClientAbortException writing file to servlet's output stream over SSL in IE This is in JBOSS 4.0.5-GA. I would guess that it is using Tomcat 5.5 from the log line "[TomcatDeployer] deploy, ctxPath=/, warUrl=.../deploy/jbossweb-tomcat55.sar/ROOT.war/" This downloads a binary file. I know that the client is not closing the browser. It works just fine over HTTP. It works just fine in HTTPS in FireFox. It throws the following exception in IE: 11:41:42,202 INFO [Util] 0: Writing 16,384 bytes of 57,567 to buffer 11:41:42,202 INFO [Util] 0: Writing 16,384 bytes of 57,567 to buffer 11:41:42,202 INFO [Util] 0: Writing 16,384 bytes of 57,567 to buffer 11:41:42,202 ERROR [Util] Error serving file: ClientAbortException: java.net.SocketException: Connection reset by peer: socket write error at org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java: 366) at org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:433) at org.apache.tomcat.util.buf.ByteChunk.append(ByteChunk.java:348) at org.apache.catalina.connector.OutputBuffer.writeBytes(OutputBuffer.java:392) at org.apache.catalina.connector.OutputBuffer.write(OutputBuffer.java:381) at org.apache.catalina.connector.CoyoteOutputStream.write(CoyoteOutputStream.ja va:88) at com.mycompany.myproject.Util.download(Util.java:93) at com.mycompany.myproject.DocumentResource.getResource(DocumentResource.java:1 22) at org.jboss.seam.servlet.ResourceServlet.doGet(ResourceServlet.java:68) at javax.servlet.http.HttpServlet.service(HttpServlet.java:697) at javax.servlet.http.HttpServlet.service(HttpServlet.java:810) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application FilterChain.java:252) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh ain.java:173) at org.jboss.seam.web.ContextFilter.doFilter(ContextFilter.java:56) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application FilterChain.java:202) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh ain.java:173) at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:63) at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:57) at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49) at org.jboss.seam.debug.hot.HotDeployFilter.doFilter(HotDeployFilter.java:60) at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49) at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45) at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49) at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:79) at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49) at org.jboss.seam.web.SeamFilter.doFilter(SeamFilter.java:84) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application FilterChain.java:202) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh ain.java:173) at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.ja va:96) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application FilterChain.java:202) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh ain.java:173) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja va:213) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja va:178) at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssoci ationValve.java:175) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase java:432) at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java: 74) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126 ) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105 ) at org.jboss.web.tomcat.tc5.jca.CachedConn
RE: Problems with a web application running a PHP script
> From: Rocco Scappatura [mailto:[EMAIL PROTECTED] > Subject: Re: Problems with a web application running a PHP script > > Soory but I haven't understood what Chuck said in his first email. Just as a refresher, here's what I said: >> Possibly the correct JRE/JDK for Tomcat. The above class and method >> exist only in Java SE 6; what JVM are you trying to run Tomcat with? > However, I can't set a such source level (1.6). No one's asking you to set the source level for compilations; you just have to run with a 1.6 JVM, which it appears you're not actually doing (even though you have it installed). If you have other JRE/JDK levels installed, get rid of them to reduce the possibility of confusion. > Do I have to downgrade JDK to 1.5? No, the method you're trying to use exists only in 1.6. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problems with a web application running a PHP script
>> I have installed: >> >> - jdk 1.5.0.13 >> - jre 1.5.0.13 --> jre 1.6.0.02 >> >> In NB, Java platform is set for both TC is 'JDK 1.5 (Default)' whose >> folder path is 'C:\Programmi\Java\jdk1.5.0_13' (i.e.: The installation >> path for the jdk 1.5.0.13 that I have installed.) > > As Chuck mentioned , this script class is in 1.6 so you need to either > change the environment variable or if from service set it to 1.6. > Then there is just one other thing, in NB right > click->properties->source... > Check the source level... > ie you can be running on 1.6 but still tell NB to make it 1.5... which > will > also snooker you ;) > Soory but I haven't understood what Chuck said in his first email. However, I can't set a such source level (1.6). Do I have to downgrade JDK to 1.5? rocsca - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: running! a servlet at tomcat startup
Shouldn't have a race condition on init. init should only be called one time before any client connection is allowed to be served for the servlet. Now, if a process is kicked off in another thread in init and proper locking isn't used and two things access resources or classes then a race condition might ensue, but otherwise I don't see the exact problem. Proper locking should always be used in code one writes or at least the APIs being used should be studied enough to know how a given use case will impact them. If caching is handled as needed and it is just a warm up prep of the cache then a single first connection will work fine. It depends on exactly what is going on. Wade - Original Message From: Pid <[EMAIL PROTECTED]> To: Tomcat Users List Sent: Monday, November 5, 2007 12:08:25 PM Subject: Re: running! a servlet at tomcat startup Wade Chandler wrote: > Yes, and in the listener I would then utilize some kind of other web client to actually perform a first request. You can use something like HttpClient or one of the command line text browsers and Runtime.exec. It would probably be easier than trying to simulate with some other means, but I may be wrong..especially if you already know what you are doing will work without having to have the extra client connection, but it would seem a lot less code to just have a config file you fill in and a client which makes a simple http web request. I hope the populating of the cache is done programmatically, rather than by making connections, because AFAIK the Context won't start serving pages until it's finished starting up. You could have a race condition if you're using a listener or a servlet init() method, if your populating starts before the pages are available. p > - Original Message > From: "Caldarale, Charles R" <[EMAIL PROTECTED]> > To: Tomcat Users List > Sent: Monday, November 5, 2007 10:39:47 AM > Subject: RE: running! a servlet at tomcat startup > > >> From: loredana loredana [mailto:[EMAIL PROTECTED] >> Subject: Re: running! a servlet at tomcat startup >> >> In case ur wondering why I used a servlet to fill >> the cache is because I need some variables like >> request.getContenxtPath, getRealPath() etc. > > Wouldn't a ServletContextListener be more appropriate for this kind of > activity? See section 10 of the servlet spec for details. > > - Chuck > > > THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE > PROPRIETARY > MATERIAL and is thus for use only by the intended recipient. If you > received this in error, please contact the sender and delete the e-mail > and its attachments from all computers. > > - > To start a new topic, e-mail: users@tomcat.apache.org > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > - > To start a new topic, e-mail: users@tomcat.apache.org > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: running! a servlet at tomcat startup
Wade Chandler wrote: > Yes, and in the listener I would then utilize some kind of other web client > to actually perform a first request. You can use something like HttpClient or > one of the command line text browsers and Runtime.exec. It would probably be > easier than trying to simulate with some other means, but I may be > wrong..especially if you already know what you are doing will work without > having to have the extra client connection, but it would seem a lot less code > to just have a config file you fill in and a client which makes a simple http > web request. I hope the populating of the cache is done programmatically, rather than by making connections, because AFAIK the Context won't start serving pages until it's finished starting up. You could have a race condition if you're using a listener or a servlet init() method, if your populating starts before the pages are available. p > - Original Message > From: "Caldarale, Charles R" <[EMAIL PROTECTED]> > To: Tomcat Users List > Sent: Monday, November 5, 2007 10:39:47 AM > Subject: RE: running! a servlet at tomcat startup > > >> From: loredana loredana [mailto:[EMAIL PROTECTED] >> Subject: Re: running! a servlet at tomcat startup >> >> In case ur wondering why I used a servlet to fill >> the cache is because I need some variables like >> request.getContenxtPath, getRealPath() etc. > > Wouldn't a ServletContextListener be more appropriate for this kind of > activity? See section 10 of the servlet spec for details. > > - Chuck > > > THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE > PROPRIETARY > MATERIAL and is thus for use only by the intended recipient. If you > received this in error, please contact the sender and delete the e-mail > and its attachments from all computers. > > - > To start a new topic, e-mail: users@tomcat.apache.org > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > - > To start a new topic, e-mail: users@tomcat.apache.org > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: running! a servlet at tomcat startup
Yes, and in the listener I would then utilize some kind of other web client to actually perform a first request. You can use something like HttpClient or one of the command line text browsers and Runtime.exec. It would probably be easier than trying to simulate with some other means, but I may be wrong..especially if you already know what you are doing will work without having to have the extra client connection, but it would seem a lot less code to just have a config file you fill in and a client which makes a simple http web request. Wade - Original Message From: "Caldarale, Charles R" <[EMAIL PROTECTED]> To: Tomcat Users List Sent: Monday, November 5, 2007 10:39:47 AM Subject: RE: running! a servlet at tomcat startup > From: loredana loredana [mailto:[EMAIL PROTECTED] > Subject: Re: running! a servlet at tomcat startup > > In case ur wondering why I used a servlet to fill > the cache is because I need some variables like > request.getContenxtPath, getRealPath() etc. Wouldn't a ServletContextListener be more appropriate for this kind of activity? See section 10 of the servlet spec for details. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: running! a servlet at tomcat startup
> From: loredana loredana [mailto:[EMAIL PROTECTED] > Subject: Re: running! a servlet at tomcat startup > > In case ur wondering why I used a servlet to fill > the cache is because I need some variables like > request.getContenxtPath, getRealPath() etc. Wouldn't a ServletContextListener be more appropriate for this kind of activity? See section 10 of the servlet spec for details. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: running! a servlet at tomcat startup
ok. long story short: my web sites is formed of chunks of html-frames ...all these frames have content from a database. So to shorten page loading time, I used a cache system(Ehcache similar to OSCache for those who heard/used cache before). So I have a servlet that fills the cache, and the index.html loads the frames from cache). Problem iswhen the server is restarted or stoped, the cache is emptyed and after restart I have to re-call the servlet that fills it. It would be perfect if every time I restart tomcat this servlet to be called autmatically. In case ur wondering why I used a servlet to fill the cache is because I need some variables like request.getContenxtPath, getRealPath() etc. hope you understood why I need to do this. A really big thanks to the people that answered so far. Helps me a lot! - Original Message From: Wade Chandler <[EMAIL PROTECTED]> To: Tomcat Users List Sent: Monday, November 5, 2007 4:44:33 PM Subject: Re: running! a servlet at tomcat startup I can see why you might want to load on startup, but the ability to actually perform a get when there is not client makes no sense at all to me. What exactly are you planning to achieve by doing such a thing? Wade - Original Message From: loredana loredana <[EMAIL PROTECTED]> To: users@tomcat.apache.org Sent: Monday, November 5, 2007 3:32:01 AM Subject: running! a servlet at tomcat startup This issue is a classic one already I think. I've googled it and haven't found anything that could help solving this problem. I'm probably not the one to think about this but...if you would add the 1 to a servlet, and from the init() method you would somehow try to call the doGet() method, wouldn't that do it? wouldn't that run the servlet at startup? did anybody try this already? I am trying to do this but I'm having some problem creating HttpServletRequest and Response objects so I can call doGet(). So if anyone did this already, pls let me know how this issue can be fixed! 10x a lot! __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Can I install own JAR-Files of my application outside WEB-INF/lib with Tomcat 6?
> Haven't tried this myself, but as far as i understand it you can > re-activate the shared classloader by setting the "shared.loader" > property in conf/catalina.properties accordingly. It works, thank you for this idea. With kind regards, Ingolf. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: running! a servlet at tomcat startup
I can see why you might want to load on startup, but the ability to actually perform a get when there is not client makes no sense at all to me. What exactly are you planning to achieve by doing such a thing? Wade - Original Message From: loredana loredana <[EMAIL PROTECTED]> To: users@tomcat.apache.org Sent: Monday, November 5, 2007 3:32:01 AM Subject: running! a servlet at tomcat startup This issue is a classic one already I think. I've googled it and haven't found anything that could help solving this problem. I'm probably not the one to think about this but...if you would add the 1 to a servlet, and from the init() method you would somehow try to call the doGet() method, wouldn't that do it? wouldn't that run the servlet at startup? did anybody try this already? I am trying to do this but I'm having some problem creating HttpServletRequest and Response objects so I can call doGet(). So if anyone did this already, pls let me know how this issue can be fixed! 10x a lot! __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Can I install own JAR-Files of my application outside WEB-INF/lib with Tomcat 6?
Ingolf Knopf wrote: > Problem: Up to 50% of my war file contains of constant libraries (JDBC, Axis > an so on), and theese libraries blow up my application more than 8 MByte. It > takes much time to send such applications to our customers - and time is > something that none of our customers have in a case of a fault. > > With Tomcat 5.x came a "shared classloader" where I could put my "constant > libraries" into. Tomcat 6 has only the "common classloader", and the > documentation http://tomcat.apache.org/tomcat-6.0-doc/class-loader-howto.html > discourages me to install my own libraries inside the common classloader's > path. > > Is there an "official" way to keep constant libraries away from war files? > ( I myself would prefer a refernce in 'web.xml' or 'context.xml' e.g., even > if > this is not compatible with other J2EE application servers. ) Haven't tried this myself, but as far as i understand it you can re-activate the shared classloader by setting the "shared.loader" property in conf/catalina.properties accordingly. Regards mks - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: running! a servlet at tomcat startup
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Loredana, loredana loredana wrote: > This issue is a classic one already I think. Hardly anyone actually wants to do this. Why do /you/ want to do this? - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.7 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFHLyay9CaO5/Lv0PARAjkrAJ930aIwbV5smrCpPkqkU19gyXErmgCghI3v s/d106jHCS+bF3IkMd2+Opc= =PScw -END PGP SIGNATURE- - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Can I install own JAR-Files of my application outside WEB-INF/lib with Tomcat 6?
Ingolf- If you desire to load your own XML Parser you can use the *endorsed* mechanism by starting TOMCAT specifying the new endorsed dir e.g -Djava.endorsed.dirs=$CATALINA_HOME/endorsed *Other list members will be able to provide more assistance* Martin- Original Message - From: "Ingolf Knopf" <[EMAIL PROTECTED]> To: Sent: Monday, November 05, 2007 8:28 AM Subject: Can I install own JAR-Files of my application outside WEB-INF/lib with Tomcat 6? > Problem: Up to 50% of my war file contains of constant libraries (JDBC, Axis > an so on), and theese libraries blow up my application more than 8 MByte. It > takes much time to send such applications to our customers - and time is > something that none of our customers have in a case of a fault. > > With Tomcat 5.x came a "shared classloader" where I could put my "constant > libraries" into. Tomcat 6 has only the "common classloader", and the > documentation http://tomcat.apache.org/tomcat-6.0-doc/class-loader-howto.html > discourages me to install my own libraries inside the common classloader's > path. > > Is there an "official" way to keep constant libraries away from war files? > ( I myself would prefer a refernce in 'web.xml' or 'context.xml' e.g., even if > this is not compatible with other J2EE application servers. ) > > Ingolf. > > - > To start a new topic, e-mail: users@tomcat.apache.org > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[ANN] securityfilter development resuming
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 All, Sorry for the announcement about a different project, but there are a lot of interested parties, here, I'd imagine. securityfilter is resuming development! I am taking over the project from Max Cooper, who has maintained it quite well through the last release. I'm looking for some folks to (re-)join the developer mailing list and weigh-in on some issues, such as which new features to implement, and to provide some suggestions for implementation, etc. The last release was in 2004 and there are quite a few things that need to be done, including: 1. Implement features that never got in there, but should be (like support for transport-guarantee) 2. Apply patches and implement enhancements contributed by the community 3. Make any changes requires to properly support the servlet API changes since 2.3 (securityfilter 2.0 met 2.3 req's) 4. Possibly heavily re-factor the codebase. 5. Improve build system (read: upgrade to Maven) We'd love to have anyone join. If you're interested, please join either [EMAIL PROTECTED] or [EMAIL PROTECTED] (you can sign up for either or both from this page: http://sourceforge.net/mail/?group_id=59484) Thanks! - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.7 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFHLyFs9CaO5/Lv0PARAuLSAKCkvbAjJtd85Kx4XJDAX6nMBdslVQCgl53Q 6rm8/PgjSQN69FDx23w9Z04= =xlp8 -END PGP SIGNATURE- - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat 3.3.1a problem
Marko Krejic wrote: > Hi, > > We are running Tomcat 3.3.1a on a Windows Server 2003. A apache server is > also installed on the machine as a proxy and it is connected with the tomcat > through AJP12. Tomcat is running on JDK1.4.2_13. The silence you experienced is people being dumbfounded that you're running Tomcat 3 (versions up to and including 5.0 are now no longer supported) and AJP12. Tomcat 3 is ancient. (I'm hoping that the 'a' doesn't mean an alpha version.) > Now to our problem. We have been running this setup for quite a while (a few > years). But until recently, the load has increased. > It seems like when there are quite many connections, then suddenly it is not > possible to read the requestbody anymore. We get the request and we are > seeing the request header, but when we want to read the body, it all seems to > hang... At this time it seems like the threads are just stacking up and > nothing is processed. ... on the same server hardware one could presume? Could just be that your load is now too much for the server. If the application hasn't changed but things were previously stable, and the load has increased, then the thing that has changed is likely to lead you to the cause. > Other threads, such as timer-threads and file-listener threads, are running > normally. It seems like only the request comming through the connectors (the > AJP12 and HTTP) are hanging. > > Does anybody recognise these problems? And does anybody have any suggestions > about how to fix this? see below. > We have tried to run without Apache and AJP12, but we got the same problem. > > I could mention that we know that we have mobile clients sending requests to > the server and if the server is not responding within a certain time, they > will "cut-off" the request. Could it be that tomcat is not "releasing" these > requests? Could just be that your setup is old and overwhelmed. > Please, any suggestions would be very apprieciated! # Examine the servers performance under peak load conditions - determine if it's actually able to handle the demand. # Plan an upgrade to some newer hardware. # Plan an upgrade to a newer, supported version of Tomcat. Keeping up to date with releases is not essential, but you should stay reasonably current if you are able. p > Thanks in advance! > > Marko Krejic > - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: running! a servlet at tomcat startup
No access to request??? Which AppServer are you running??? M-- - Original Message - From: "Johnny Kewl" <[EMAIL PROTECTED]> To: "Tomcat Users List" Sent: Monday, November 05, 2007 6:16 AM Subject: Re: running! a servlet at tomcat startup > > -- - > HARBOR: http://coolharbor.100free.com/index.htm > Now Tomcat is also a cool pojo application server > -- - > - Original Message - > From: "Grzegorz Borkowski" <[EMAIL PROTECTED]> > To: "Tomcat Users List" > Sent: Monday, November 05, 2007 12:52 PM > Subject: Re: running! a servlet at tomcat startup > > > > > > > > Johnny Kewl wrote: > >> > >> - -- > >> > >> HARBOR: http://coolharbor.100free.com/index.htm > >> Now Tomcat is also a cool pojo application server > >> - -- > >> > >> - Original Message - From: "Johnny Kewl" <[EMAIL PROTECTED]> > >> To: "Tomcat Users List" > >> Sent: Monday, November 05, 2007 12:18 PM > >> Subject: Re: running! a servlet at tomcat startup > >> > >> > >>> > >>> --- > >>> > >>> HARBOR: http://coolharbor.100free.com/index.htm > >>> Now Tomcat is also a cool pojo application server > >>> --- > >>> > >>> - Original Message - From: "loredana loredana" > >>> <[EMAIL PROTECTED]> > >>> To: "Tomcat Users List" > >>> Sent: Monday, November 05, 2007 11:48 AM > >>> Subject: Re: running! a servlet at tomcat startup > >>> > >>> > >>> thanks for the response johnny. That's probably the only way it can be > >>> done.. Unfortunatelly for me, I need variables like > >>> request.getContextPath() and from init() method i can't "retrieve" those > >>> values. 10x a lot anyway. > >>> === > >>> Ah, I see now... > >>> Yes parsing context.xml is too much hassle.. > >>> > >>> Heres an idea... > >>> When someone drops a WAR in, the context always takes on the webapp > >>> name. > >>> ie for most apps... webapp name = context > >>> So try this... > >>>ServletContext context = getServletContext(); > >>>String sWebBase = context.getRealPath("/"); > >> > >> MEL just told me thatcontext.getServletContextName() > >> > >> is easier ;) > > > > Be careful! AFAIK, getServletContextName() returns "display-name" value, > > not real context name - please check API! > Thanks MEL is blushing ;) > > Yes and the way I suggested will give you an extra context/build/web > in the dev environment... so parsing gets a little tricky... unless of > course all you really looking for in the web base folder. > > OK, now I'm officially wondering... if one cant get at Request... is there a > better way > to find the name of the web-app/context? > > > >>> > >>> Than last folder is the context name... > >>> Some String parsing and you got it ;) > >>> > >>> Good luck > >>> > >>> === > >>> > >>> > >>> > >>> - Original Message > >>> From: Johnny Kewl <[EMAIL PROTECTED]> > >>> To: Tomcat Users List > >>> Sent: Monday, November 5, 2007 10:58:54 AM > >>> Subject: Re: running! a servlet at tomcat startup > >>> > >>> > >>> > >>> --- > >>> > >>> HARBOR: http://coolharbor.100free.com/index.htm > >>> Now Tomcat is also a cool pojo application server > >>> --- > >>> > >>> - Original Message - From: "loredana loredana" > >>> <[EMAIL PROTECTED]> > >>> To: > >>> Sent: Monday, November 05, 2007 10:32 AM > >>> Subject: running! a servlet at tomcat startup > >>> > >>> > >>> This issue is a classic one already I think. I've googled it and > >>> haven't > >>> found anything that could help solving this problem. I'm probably not > >>> the > >>> one to think about this but...if you would add the > >>> 1 to a servlet, and from the init() > >>> method you would somehow try to call the doGet() method, wouldn't that > >>> do > >>> it? wouldn't that run the servlet at startup? did anybody try this > >>> already? > >>> I am trying to do this but I'm having some problem creating > >>> HttpServletRequest and Response objects so I can call doGet(). So if > >>> anyone > >>> did this already, pls let me know how this issue can be fixed! 10x a > >>> lot! > >>> === > >>> Hi loredana, > >>> Not sure if you asking or answering ;) > >>> > >>> Yes, and then do stuff in the INIT method. > >>> No, why try call doGet() just init the functions that need initing, > >>> like > >>> the dBPool, or image processing. > >>> The doGet implies you want to return info to a browser there isnt > >>> one?
Can I install own JAR-Files of my application outside WEB-INF/lib with Tomcat 6?
Problem: Up to 50% of my war file contains of constant libraries (JDBC, Axis an so on), and theese libraries blow up my application more than 8 MByte. It takes much time to send such applications to our customers - and time is something that none of our customers have in a case of a fault. With Tomcat 5.x came a "shared classloader" where I could put my "constant libraries" into. Tomcat 6 has only the "common classloader", and the documentation http://tomcat.apache.org/tomcat-6.0-doc/class-loader-howto.html discourages me to install my own libraries inside the common classloader's path. Is there an "official" way to keep constant libraries away from war files? ( I myself would prefer a refernce in 'web.xml' or 'context.xml' e.g., even if this is not compatible with other J2EE application servers. ) Ingolf. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: running! a servlet at tomcat startup
See Servlet.getServletConfig() and ServletConfig.getServletContext(). Wade - Original Message From: Johnny Kewl <[EMAIL PROTECTED]> To: Tomcat Users List Sent: Monday, November 5, 2007 6:16:17 AM Subject: Re: running! a servlet at tomcat startup OK, now I'm officially wondering... if one cant get at Request... is there a better way to find the name of the web-app/context? - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: running! a servlet at tomcat startup
--- HARBOR: http://coolharbor.100free.com/index.htm Now Tomcat is also a cool pojo application server --- - Original Message - From: "Grzegorz Borkowski" <[EMAIL PROTECTED]> To: "Tomcat Users List" Sent: Monday, November 05, 2007 12:52 PM Subject: Re: running! a servlet at tomcat startup Johnny Kewl wrote: --- HARBOR: http://coolharbor.100free.com/index.htm Now Tomcat is also a cool pojo application server --- - Original Message - From: "Johnny Kewl" <[EMAIL PROTECTED]> To: "Tomcat Users List" Sent: Monday, November 05, 2007 12:18 PM Subject: Re: running! a servlet at tomcat startup --- HARBOR: http://coolharbor.100free.com/index.htm Now Tomcat is also a cool pojo application server --- - Original Message - From: "loredana loredana" <[EMAIL PROTECTED]> To: "Tomcat Users List" Sent: Monday, November 05, 2007 11:48 AM Subject: Re: running! a servlet at tomcat startup thanks for the response johnny. That's probably the only way it can be done.. Unfortunatelly for me, I need variables like request.getContextPath() and from init() method i can't "retrieve" those values. 10x a lot anyway. === Ah, I see now... Yes parsing context.xml is too much hassle.. Heres an idea... When someone drops a WAR in, the context always takes on the webapp name. ie for most apps... webapp name = context So try this... ServletContext context = getServletContext(); String sWebBase = context.getRealPath("/"); MEL just told me thatcontext.getServletContextName() is easier ;) Be careful! AFAIK, getServletContextName() returns "display-name" value, not real context name - please check API! Thanks MEL is blushing ;) Yes and the way I suggested will give you an extra context/build/web in the dev environment... so parsing gets a little tricky... unless of course all you really looking for in the web base folder. OK, now I'm officially wondering... if one cant get at Request... is there a better way to find the name of the web-app/context? Than last folder is the context name... Some String parsing and you got it ;) Good luck === - Original Message From: Johnny Kewl <[EMAIL PROTECTED]> To: Tomcat Users List Sent: Monday, November 5, 2007 10:58:54 AM Subject: Re: running! a servlet at tomcat startup --- HARBOR: http://coolharbor.100free.com/index.htm Now Tomcat is also a cool pojo application server --- - Original Message - From: "loredana loredana" <[EMAIL PROTECTED]> To: Sent: Monday, November 05, 2007 10:32 AM Subject: running! a servlet at tomcat startup This issue is a classic one already I think. I've googled it and haven't found anything that could help solving this problem. I'm probably not the one to think about this but...if you would add the 1 to a servlet, and from the init() method you would somehow try to call the doGet() method, wouldn't that do it? wouldn't that run the servlet at startup? did anybody try this already? I am trying to do this but I'm having some problem creating HttpServletRequest and Response objects so I can call doGet(). So if anyone did this already, pls let me know how this issue can be fixed! 10x a lot! === Hi loredana, Not sure if you asking or answering ;) Yes, and then do stuff in the INIT method. No, why try call doGet() just init the functions that need initing, like the dBPool, or image processing. The doGet implies you want to return info to a browser there isnt one? The Init method runs just once thats the idea. just lets you get the INIT out of the way, otherwise it will happen on the first browser request, and if it takes a long time the browser will seem very slow to the user... but that only happens once anyway. __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands,
Re: running! a servlet at tomcat startup
Johnny Kewl wrote: --- HARBOR: http://coolharbor.100free.com/index.htm Now Tomcat is also a cool pojo application server --- - Original Message - From: "Johnny Kewl" <[EMAIL PROTECTED]> To: "Tomcat Users List" Sent: Monday, November 05, 2007 12:18 PM Subject: Re: running! a servlet at tomcat startup --- HARBOR: http://coolharbor.100free.com/index.htm Now Tomcat is also a cool pojo application server --- - Original Message - From: "loredana loredana" <[EMAIL PROTECTED]> To: "Tomcat Users List" Sent: Monday, November 05, 2007 11:48 AM Subject: Re: running! a servlet at tomcat startup thanks for the response johnny. That's probably the only way it can be done.. Unfortunatelly for me, I need variables like request.getContextPath() and from init() method i can't "retrieve" those values. 10x a lot anyway. === Ah, I see now... Yes parsing context.xml is too much hassle.. Heres an idea... When someone drops a WAR in, the context always takes on the webapp name. ie for most apps... webapp name = context So try this... ServletContext context = getServletContext(); String sWebBase = context.getRealPath("/"); MEL just told me thatcontext.getServletContextName() is easier ;) Be careful! AFAIK, getServletContextName() returns "display-name" value, not real context name - please check API! Than last folder is the context name... Some String parsing and you got it ;) Good luck === - Original Message From: Johnny Kewl <[EMAIL PROTECTED]> To: Tomcat Users List Sent: Monday, November 5, 2007 10:58:54 AM Subject: Re: running! a servlet at tomcat startup --- HARBOR: http://coolharbor.100free.com/index.htm Now Tomcat is also a cool pojo application server --- - Original Message - From: "loredana loredana" <[EMAIL PROTECTED]> To: Sent: Monday, November 05, 2007 10:32 AM Subject: running! a servlet at tomcat startup This issue is a classic one already I think. I've googled it and haven't found anything that could help solving this problem. I'm probably not the one to think about this but...if you would add the 1 to a servlet, and from the init() method you would somehow try to call the doGet() method, wouldn't that do it? wouldn't that run the servlet at startup? did anybody try this already? I am trying to do this but I'm having some problem creating HttpServletRequest and Response objects so I can call doGet(). So if anyone did this already, pls let me know how this issue can be fixed! 10x a lot! === Hi loredana, Not sure if you asking or answering ;) Yes, and then do stuff in the INIT method. No, why try call doGet() just init the functions that need initing, like the dBPool, or image processing. The doGet implies you want to return info to a browser there isnt one? The Init method runs just once thats the idea. just lets you get the INIT out of the way, otherwise it will happen on the first browser request, and if it takes a long time the browser will seem very slow to the user... but that only happens once anyway. __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For add
Re: running! a servlet at tomcat startup
--- HARBOR: http://coolharbor.100free.com/index.htm Now Tomcat is also a cool pojo application server --- - Original Message - From: "Johnny Kewl" <[EMAIL PROTECTED]> To: "Tomcat Users List" Sent: Monday, November 05, 2007 12:18 PM Subject: Re: running! a servlet at tomcat startup --- HARBOR: http://coolharbor.100free.com/index.htm Now Tomcat is also a cool pojo application server --- - Original Message - From: "loredana loredana" <[EMAIL PROTECTED]> To: "Tomcat Users List" Sent: Monday, November 05, 2007 11:48 AM Subject: Re: running! a servlet at tomcat startup thanks for the response johnny. That's probably the only way it can be done.. Unfortunatelly for me, I need variables like request.getContextPath() and from init() method i can't "retrieve" those values. 10x a lot anyway. === Ah, I see now... Yes parsing context.xml is too much hassle.. Heres an idea... When someone drops a WAR in, the context always takes on the webapp name. ie for most apps... webapp name = context So try this... ServletContext context = getServletContext(); String sWebBase = context.getRealPath("/"); MEL just told me thatcontext.getServletContextName() is easier ;) Than last folder is the context name... Some String parsing and you got it ;) Good luck === - Original Message From: Johnny Kewl <[EMAIL PROTECTED]> To: Tomcat Users List Sent: Monday, November 5, 2007 10:58:54 AM Subject: Re: running! a servlet at tomcat startup --- HARBOR: http://coolharbor.100free.com/index.htm Now Tomcat is also a cool pojo application server --- - Original Message - From: "loredana loredana" <[EMAIL PROTECTED]> To: Sent: Monday, November 05, 2007 10:32 AM Subject: running! a servlet at tomcat startup This issue is a classic one already I think. I've googled it and haven't found anything that could help solving this problem. I'm probably not the one to think about this but...if you would add the 1 to a servlet, and from the init() method you would somehow try to call the doGet() method, wouldn't that do it? wouldn't that run the servlet at startup? did anybody try this already? I am trying to do this but I'm having some problem creating HttpServletRequest and Response objects so I can call doGet(). So if anyone did this already, pls let me know how this issue can be fixed! 10x a lot! === Hi loredana, Not sure if you asking or answering ;) Yes, and then do stuff in the INIT method. No, why try call doGet() just init the functions that need initing, like the dBPool, or image processing. The doGet implies you want to return info to a browser there isnt one? The Init method runs just once thats the idea. just lets you get the INIT out of the way, otherwise it will happen on the first browser request, and if it takes a long time the browser will seem very slow to the user... but that only happens once anyway. __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: running! a servlet at tomcat startup
--- HARBOR: http://coolharbor.100free.com/index.htm Now Tomcat is also a cool pojo application server --- - Original Message - From: "loredana loredana" <[EMAIL PROTECTED]> To: "Tomcat Users List" Sent: Monday, November 05, 2007 11:48 AM Subject: Re: running! a servlet at tomcat startup thanks for the response johnny. That's probably the only way it can be done.. Unfortunatelly for me, I need variables like request.getContextPath() and from init() method i can't "retrieve" those values. 10x a lot anyway. === Ah, I see now... Yes parsing context.xml is too much hassle.. Heres an idea... When someone drops a WAR in, the context always takes on the webapp name. ie for most apps... webapp name = context So try this... ServletContext context = getServletContext(); String sWebBase = context.getRealPath("/"); Than last folder is the context name... Some String parsing and you got it ;) Good luck === - Original Message From: Johnny Kewl <[EMAIL PROTECTED]> To: Tomcat Users List Sent: Monday, November 5, 2007 10:58:54 AM Subject: Re: running! a servlet at tomcat startup --- HARBOR: http://coolharbor.100free.com/index.htm Now Tomcat is also a cool pojo application server --- - Original Message - From: "loredana loredana" <[EMAIL PROTECTED]> To: Sent: Monday, November 05, 2007 10:32 AM Subject: running! a servlet at tomcat startup This issue is a classic one already I think. I've googled it and haven't found anything that could help solving this problem. I'm probably not the one to think about this but...if you would add the 1 to a servlet, and from the init() method you would somehow try to call the doGet() method, wouldn't that do it? wouldn't that run the servlet at startup? did anybody try this already? I am trying to do this but I'm having some problem creating HttpServletRequest and Response objects so I can call doGet(). So if anyone did this already, pls let me know how this issue can be fixed! 10x a lot! === Hi loredana, Not sure if you asking or answering ;) Yes, and then do stuff in the INIT method. No, why try call doGet() just init the functions that need initing, like the dBPool, or image processing. The doGet implies you want to return info to a browser there isnt one? The Init method runs just once thats the idea. just lets you get the INIT out of the way, otherwise it will happen on the first browser request, and if it takes a long time the browser will seem very slow to the user... but that only happens once anyway. __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: running! a servlet at tomcat startup
thanks for the response johnny. That's probably the only way it can be done.. Unfortunatelly for me, I need variables like request.getContextPath() and from init() method i can't "retrieve" those values. 10x a lot anyway. - Original Message From: Johnny Kewl <[EMAIL PROTECTED]> To: Tomcat Users List Sent: Monday, November 5, 2007 10:58:54 AM Subject: Re: running! a servlet at tomcat startup --- HARBOR: http://coolharbor.100free.com/index.htm Now Tomcat is also a cool pojo application server --- - Original Message - From: "loredana loredana" <[EMAIL PROTECTED]> To: Sent: Monday, November 05, 2007 10:32 AM Subject: running! a servlet at tomcat startup This issue is a classic one already I think. I've googled it and haven't found anything that could help solving this problem. I'm probably not the one to think about this but...if you would add the 1 to a servlet, and from the init() method you would somehow try to call the doGet() method, wouldn't that do it? wouldn't that run the servlet at startup? did anybody try this already? I am trying to do this but I'm having some problem creating HttpServletRequest and Response objects so I can call doGet(). So if anyone did this already, pls let me know how this issue can be fixed! 10x a lot! === Hi loredana, Not sure if you asking or answering ;) Yes, and then do stuff in the INIT method. No, why try call doGet() just init the functions that need initing, like the dBPool, or image processing. The doGet implies you want to return info to a browser there isnt one? The Init method runs just once thats the idea. just lets you get the INIT out of the way, otherwise it will happen on the first browser request, and if it takes a long time the browser will seem very slow to the user... but that only happens once anyway. __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: running! a servlet at tomcat startup
--- HARBOR: http://coolharbor.100free.com/index.htm Now Tomcat is also a cool pojo application server --- - Original Message - From: "loredana loredana" <[EMAIL PROTECTED]> To: Sent: Monday, November 05, 2007 10:32 AM Subject: running! a servlet at tomcat startup This issue is a classic one already I think. I've googled it and haven't found anything that could help solving this problem. I'm probably not the one to think about this but...if you would add the 1 to a servlet, and from the init() method you would somehow try to call the doGet() method, wouldn't that do it? wouldn't that run the servlet at startup? did anybody try this already? I am trying to do this but I'm having some problem creating HttpServletRequest and Response objects so I can call doGet(). So if anyone did this already, pls let me know how this issue can be fixed! 10x a lot! === Hi loredana, Not sure if you asking or answering ;) Yes, and then do stuff in the INIT method. No, why try call doGet() just init the functions that need initing, like the dBPool, or image processing. The doGet implies you want to return info to a browser there isnt one? The Init method runs just once thats the idea. just lets you get the INIT out of the way, otherwise it will happen on the first browser request, and if it takes a long time the browser will seem very slow to the user... but that only happens once anyway. __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problems with a web application running a PHP script
--- HARBOR: http://coolharbor.100free.com/index.htm Now Tomcat is also a cool pojo application server --- - Original Message - From: "Rocco Scappatura" <[EMAIL PROTECTED]> To: "Tomcat Users List" Sent: Monday, November 05, 2007 9:25 AM Subject: Re: Problems with a web application running a PHP script Firstly dont worry too much about the Tomcat Native library message, that is not the cause of the problem. OK. For the moment I will ignore it as suggested by Chuck. OK, so now you have the new Tomcat installed. + Tell netbeans to use it Go to TOOLS - > SERVER MANAGER and show netbeans where the new Tomcat is. I have added the TC 5.5.25 (The one I have installed) as J2EE platform. LOOK at the JRE in the NB 5.17 version of TC is using, it may be pointing at your JDK, not the JRE. When you install the new TC, make sure when it asks you that you point at the same one. ie you can have JRE 5 on the machine and TC can be told to use JDK 6 check that. I have installed: - jdk 1.5.0.13 - jre 1.5.0.13 --> jre 1.6.0.02 In NB, Java platform is set for both TC is 'JDK 1.5 (Default)' whose folder path is 'C:\Programmi\Java\jdk1.5.0_13' (i.e.: The installation path for the jdk 1.5.0.13 that I have installed.) As Chuck mentioned , this script class is in 1.6 so you need to either change the environment variable or if from service set it to 1.6. Then there is just one other thing, in NB right click->properties->source... Check the source level... ie you can be running on 1.6 but still tell NB to make it 1.5... which will also snooker you ;) Now in your application project, if your RIGHT CLICK -> RUN you will see you can tell it to use the new TC in that application. Now when you run it, it will probably take you to the line of code that is causing the problem You can swap between different tomcats and experiment. Infact.. I'm seeing some problems.. When you work in NB, you can start and stop the tomcats from the RUN tab, you can only have one running at a time. Before you deploy to the new tomcat, in NB RUN tab UNDEPLOY the application, and stop that TC because otherwise even if you drop the WAR into tomcat it will still look at the application in NB NB does not have to use the embedded TC Have fun Thanks. I will investigate to solve the problems and I eventually ask you if I still cant run PHP scripts in my application. Bye, rocsca - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
running! a servlet at tomcat startup
This issue is a classic one already I think. I've googled it and haven't found anything that could help solving this problem. I'm probably not the one to think about this but...if you would add the 1 to a servlet, and from the init() method you would somehow try to call the doGet() method, wouldn't that do it? wouldn't that run the servlet at startup? did anybody try this already? I am trying to do this but I'm having some problem creating HttpServletRequest and Response objects so I can call doGet(). So if anyone did this already, pls let me know how this issue can be fixed! 10x a lot! __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]