Re: Urgent. pls help me out
Now, is this really urgent? I'll see if I can help. I'd point you to the tomcat/webapps/examples directory. These are some examples that come with tomcat. You'll find a WEB-INF directory there with a web.xml file within. This is what maps URLs to actual servlet classes. You can create your own directory under webapps and make your own WEB-INF/web.xml there. Follow the directory structure shown in the other web apps that come with tomcat. Under WEB-INF you can have classes (for your class files), and lib (for jars your app might need, such as your JDBC driver). You can put your development directories anywhere you like. Your build process (make, ant, etc.) should put the class files into your webapp directory. Instead of creating your directory under tomcat/webapps, you could put it elsewhere (in your own development tree) and edit the server.xml file (in tomcat/conf), to add your own context. Again, follow the examples. You'll need to change the docBase to point to where your web app lives. David zafar ahsan wrote: I have already installed tomcat and its working . ok now can anyone help me how should i move now, i mean i have written a servlet with jdbc(oracle thin layer) and its compiling without error. Now where should i put it and also whats the best way to organise my application. pls help me with an example, where i have to create a directory for my application development and deployment.and whats r the steps that i should follow now.Would be pleased to know all about it if anyone can have little time for me. thank u. _ Get 25MB, POP3, Spam Filtering with LYCOS MAIL PLUS for $19.95/year. http://login.mail.lycos.com/brandPage.shtml?pageId=plusref=lmtplus - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: newbie installation problem
R=Redhat, correct on the other letters... Steve Burrus wrote: Excuse my ignorance please, but what does RPM stand for exactly?? I guess that the PM is package management. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat Out of memory
I set CATALINA_OPTS (whcn using the catalina.sh script) Nate wrote: Thanks for the info, but I think our problem is more related to allocating the amount of memory we need than the -server option. Also, I'm not even sure that I am setting these in the right place. - Original Message - From: Claudio Pracilio [EMAIL PROTECTED] To: 'Tomcat Users List' [EMAIL PROTECTED] Sent: Wednesday, January 22, 2003 3:30 PM Subject: RE: Tomcat Out of memory Hi There, We have had problems with our JVM running out-of-memory on Linux with Suns JDK 1.3.1. This was resolved by not using the -server option. Not sure what the JVM does differently internally, but using the default -client option had resolved our problems. Regards, Claudio -Original Message- From: Nate [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 22, 2003 1:09 PM To: Tomcat Users List Subject: Tomcat Out of memory We are running Tomcat 4.0.6 on Windows 2000 server using JDK 1.4.0_01. Tomcat is set to run as a service. In our catalina.bat file we have set: JAVA_OPTS= -server -Xms512m -Xmx512m If I am not mistaken, this should start the VM in server mode, and allocate 512MB of memory for it to use. Our application gets an out of memory error when the vm has used about 64MB of memory, well short of what we have told it to use. Am I setting the JVM parameters in the right place, or is my syntax perhaps incorrect? When tomcat is run as a service, is the catalina.bat startup script even called? --Nate -- 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: About Tomcat-3.2.4 installation problem
If you could give more details about the errors you are getting, that would help. I've run the setup you seem to have without problems. The current tomcat is either 4.0.6, or 4.1.18. It might be nice to start with the newer version also. David farhan ahmed wrote: Dear All, I am trying to install Tomcat-3.2.4 with j2sdk1.3.1 on Sun Solaris 8.My path is already set.But it is not installing.Any good tip - With Yahoo! Mail you can get a bigger mailbox -- choose a size that fits your needs -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: request caching?
Thanks, I do set some values to prevent caching. response.setHeader(Pragma, no-cache); response.setHeader(Expires, 0); response.setHeader(Cache-control, no-cache, must-revalidate); I'll didn't really implement caching in the way you think. I just cache the Template object from loading my XSLT. I don't actually cache the result. I apply that template for every request (if my servlet gets called by the container!) I do want to move to Cocoon, but that won't happen for several months (at least not for the main app). Thanks, David Shapira, Yoav wrote: Howdy, So, before I spend a bunch of time pouring over the source, can someone tell me if tomcat 4 (or the HttpConnector) looks at the incomming URL and gives a cached result if the URL hasn't changed? I am using mod_jk with apache, but that hasn't changed since when I used tomcat 3.x. (nor has my apache version or config changed). Any ideas? What caching the web server is and isn't allowed to do is fairly well defined in the HTTP protocol specification: RFC 2616. By the way, the still experimental RFC 2295 is fairly interesting in this area. You can also check out the JavaDoc for methods like HttpServlet.getLastModified(HttpServletRequest req). You can override this method in your servlet if necessary. Alternatively, as the HTTP specifications detail, you can use various response headers to indicate the response shouldn't be cached. A google search on no-cache HTTP headers will give a ton of information on this subject. You probably want to do the above anyways to avoid a proprietary solution to caching pages like you have used in the past. Yoav Shapira Millennium ChemInformatics -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
request caching?
I've been using tomcat since 3.2.1 and use XSLT to take my servlet output and turn it into HTML. I wrote code to check the XSLT file modification date and auto-reload it if the file had been modified. So, in the browser, I could just hit reload and get updated XSLT. This is great for debugging and I would typicaly disable it with a property for production. My problem (and question) is about what happened when I moved to tomcat 4. We started using 4.0.4-le-jdk14 many months ago and I noticed that my auto reload doesn't work like before. My log says my XSLT was reloaded, but I don't see it in the browser unless I change the URL slightly. I can add a parameter and then I see the updated XSLT output. So, before I spend a bunch of time pouring over the source, can someone tell me if tomcat 4 (or the HttpConnector) looks at the incomming URL and gives a cached result if the URL hasn't changed? I am using mod_jk with apache, but that hasn't changed since when I used tomcat 3.x. (nor has my apache version or config changed). Any ideas? David -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: IPv6 Support in Tomcat
IPv6 is a jdk1.4 feature, that is not availble on Windows (due to problems with the IPv6 support in the OS). I'd guess tomcat will work with IPv6 if you get JDK1.4 on Solaris or Linux. See this web page for details. http://java.sun.com/j2se/1.4/docs/guide/net/ipv6_guide/ David Surendra Kumar wrote: Hi All Is IPv6 support available for any version of Tomcat ? Where can i get the documentation related to this ? Thanks Surendra -- 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: IPv6 Support in Tomcat
Surendra, I can't vouch for the tomcat implementation meeting the criteria set for on that web page. That is probably a question for the dev list. It sounds like if it was coded without IPv4 references, it should just work. David Surendra Kumar wrote: Hi David Thanks for the info. Is there anything specially needs to be done from tomcat side ? So If the jdk supports then tomcat also supports Ipv6. Is this correct ? Thanks Surendra - Original Message - From: David Kavanagh [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Thursday, January 09, 2003 10:33 AM Subject: Re: IPv6 Support in Tomcat IPv6 is a jdk1.4 feature, that is not availble on Windows (due to problems with the IPv6 support in the OS). I'd guess tomcat will work with IPv6 if you get JDK1.4 on Solaris or Linux. See this web page for details. http://java.sun.com/j2se/1.4/docs/guide/net/ipv6_guide/ David Surendra Kumar wrote: Hi All Is IPv6 support available for any version of Tomcat ? Where can i get the documentation related to this ? Thanks Surendra -- 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: app roll out.
Well, if you were just running tomcat, I'd say put your app in webapps/ROOT, but I'm not sure how to configure mod_jk to redirect all stuff from the server root to tomcat. If you are directing everything to tomcat, just bag apache altogether! David On 12/16/2002 4:28 PM, Alexander Wallace wrote: Hi there. Almost ready to deploy my app to test in real world. I'm using apache + tomcat (using mod_jk). My app name is wxyz, and I have purchased the domain name i want it to be under. I want to call www.mydomain.com and get my app's index. instead of typing the www.mydomain.com/wxyz. How can i do that? Can someone, if not tell me how, tell me where to read to learn how to do it? Sorry about the newbienezz of the email. I know nothing about this things. 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]
Re: RE: I don´t understand the objective of this open list !
Hmm, let me help... The note you were responding to was meant in good humor. Notice the smiley face at the end. That means that the comment was meant as a joke. I'm sorry if you aren't in that kind of mood right now. Why don't you try stating the problem(s) you are having, including OS/jdk/tomcat version numbers. David PS. Sometimes, I don't get a reponse to something I post. I just look elsewhere for help. (documentation, source code...) On 12/9/2002 9:19 AM, [EMAIL PROTECTED] wrote: Sorry, buy your words don´t give me fear. I only search technical help for something. i don´t have interest in to obtain enemies, I´d like friends that can help me. Only friends. I don´t need your threats. Thank´s. Mensaje citado por: Donie Kelly [EMAIL PROTECTED]: You're defiantly blacklisted now :) -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: 09 December 2002 13:40 To: [EMAIL PROTECTED] Subject: I don´t understand the objective of this open list ! In 3 opportunities i wrote to this stuped (sorry) list, and NEVER i found help. I hope that the people that participates of this list, don´t have damages about other people that don´t belong´s at your countries. Thank´s for NOTHING. -- 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: hashtable
Paul, I assume you are asking if you can store something in a session to share between pages. Yes, you can store an object (such as a Hashtable) in the session object. You can use session.setAttribute(key, value) or session.getAttribute() to retrieve it. David On 11/20/2002 10:31 PM, [EMAIL PROTECTED] wrote: Hello, Can anyone tell me, can a hash table be defined as a session and retrieved from another page as can an array? Thanks Paul. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: hashtable
I think another lister posted this answer. You should do this; int styles[] = (int [])session.getAttribute(styles); I'll also recommend testing the session before using it. I think if you get null from request.getSession(false), that means it timed out, or was marked invalid. David On 11/20/2002 11:02 PM, [EMAIL PROTECTED] wrote: Great, I have styles which is an int array (to become hashtable) and want to retrieve it from another page (you assume correctly). I have: session.setAttribute(styles, styles); which runs OK and: session.getAttribute(styles, styles); which is throwing a compiler error. It's been a while since I used session. Just reading the API, getAttribute takes a single parameter? With adjustment: int styles[] = session.getAttribute(styles); I get another compiler error. What am I doing wrong? Thanks Paul. Paul, I assume you are asking if you can store something in a session to share between pages. Yes, you can store an object (such as a Hashtable) in the session object. You can use session.setAttribute(key, value) or session.getAttribute() to retrieve it. David On 11/20/2002 10:31 PM, [EMAIL PROTECTED] wrote: Hello, Can anyone tell me, can a hash table be defined as a session and retrieved from another page as can an array? Thanks Paul. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: hashtable
Just to set the record straight, an array is treated like an object, so the int[] is OK. casting the result using (int []) works just fine. David On 11/20/2002 11:11 PM, [EMAIL PROTECTED] wrote: My two cents: 1. int is a java primitive type and your assigning an object to it, that's illegal. 2. You need to cast the call into an Int object something like: Int styles[] = (Int) session.getAttribute(styles); Hope this helps. On Wednesday, November 20, 2002, at 10:02 PM, [EMAIL PROTECTED] wrote: Great, I have styles which is an int array (to become hashtable) and want to retrieve it from another page (you assume correctly). I have: session.setAttribute(styles, styles); which runs OK and: session.getAttribute(styles, styles); which is throwing a compiler error. It's been a while since I used session. Just reading the API, getAttribute takes a single parameter? With adjustment: int styles[] = session.getAttribute(styles); I get another compiler error. What am I doing wrong? Thanks Paul. Paul, I assume you are asking if you can store something in a session to share between pages. Yes, you can store an object (such as a Hashtable) in the session object. You can use session.setAttribute(key, value) or session.getAttribute() to retrieve it. David On 11/20/2002 10:31 PM, [EMAIL PROTECTED] wrote: Hello, Can anyone tell me, can a hash table be defined as a session and retrieved from another page as can an array? Thanks 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] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: hashtable
The session lifetime (timeout) is defined in the web.xml for the application. Look after the servlet mappings. David On 11/20/2002 11:59 PM, [EMAIL PROTECTED] wrote: Thanks Gents, that's great. One last thing. Where is session in the API? I can't see httpSession anywhere. I am looking for session settings to define session life span etc. Thanks paul. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: session startup
Hmm, I think you might be missing the point of a session. It is something that is associated with a client. If you want something initialized when the app starts up, you need to put something in a servlet.init() method. In there, check to see if that thing is initialized, if not, initialize it. For sessions, you'd call request.getSession(true), when the user first hits the app, to create the session for that client. You can check for a valid session by calling request.getSession(false) first, testing for null... David On 11/21/2002 12:22 AM, [EMAIL PROTECTED] wrote: Relating to the previous posting. Now I have my hastable stored as a session, and am able to retrieve it, I would like the session to be created when the service (TC) starts up, or is restarted. I.e I would like the session to be available without initailsing it by loading a JSP page. Thanks Paul. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: hashtable
In my web.xml, I have (as a child of web-app), these lines. session-config session-timeout 30 /session-timeout /session-config This is in minutes. David On 11/21/2002 12:32 AM, [EMAIL PROTECTED] wrote: Regarding timout and web.xml..my web.xml looks like this: web-app display-nameWelcome to Tomcat/display-name description Welcome to Tomcat /description /web-app In other words has not been adjusted a great deal. I could sit here for hours and guess what the tag name is/are, and whether the arguement must takes milliseconds, seconds, minutes etc. What form are these two settings I am looking for? I would like the server to set session lifetime to server life i.e the session is persistent as long as the server is switched on. Thanks again Paul. The session lifetime (timeout) is defined in the web.xml for the application. Look after the servlet mappings. David On 11/20/2002 11:59 PM, [EMAIL PROTECTED] wrote: Thanks Gents, that's great. One last thing. Where is session in the API? I can't see httpSession anywhere. I am looking for session settings to define session life span etc. Thanks paul. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: [4.1.14] New test milestone released
you're kidding me! I was just looking for tomcat 4.1.14 after seeing something that changed in cvs and was tagged as being in 4.1.14. I'm downloading the source via anoncvs as I write this. Where is the binary available? Thanks, David On 11/8/2002 1:31 PM, Mauro Daniel Ardolino wrote: Remy: I've just downloaded Tomcat 4.1.14 and I'm testing it with my application that has no problems running on Tomcat 4.1.12. When I try to run my application (that Tomcat deploys ok), I receive this error message (on the web browser), may be is due to a change in Xerces, but my classes still compile ok with the xercesImpl.jar provided with Tomcat 4.1.14 (see down the root cause): javax.servlet.ServletException: Servlet execution threw an exception at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:260) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) ...AND SO ON -- ROOT CAUSE: -- java.lang.NoSuchMethodError: org.apache.xerces.util.NamespaceSupport.reset(Lorg/apache/xerces/util/SymbolTable;)V at org.apache.xml.serialize.XMLSerializer.reset(XMLSerializer.java:1424) at org.apache.xml.serialize.BaseMarkupSerializer.setOutputCharStream(BaseMarkupSerializer.java:335) at org.apache.xml.serialize.XMLSerializer.(XMLSerializer.java:199) at xml.DOMElementConverter.asXmlString(DOMElementConverter.java:41) at xml.DOMElementConverter.asXmlInputStream(DOMElementConverter.java:27) at query.rowFilters.definitions.RowsFilterDefinition.asXmlInputStream(RowsFilterDefinition.java:33) at servlets.ProductFilterFormServlet.doGet(ProductFilterFormServlet.java:46) at javax.servlet.http.HttpServlet.service(HttpServlet.java:740) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193) ...AND SO ON. I'm using 4.1.14 because I have to use symlinks (see thread about symlinks that has just been finished). Thanks. Mauro On Tue, 29 Oct 2002, Remy Maucherat wrote: A new test milestone of Tomcat 4.1 has just been released. Please help test this upcoming Tomcat release for compliance issues and other problems. Downloads: http://jakarta.apache.org/builds/jakarta-tomcat-4.0/test/v4.1.14/ Significant changes over 4.1.13 include a security manager bugfix. Over 4.1.12, Tomcat 4.1.14 includes bugfixes as well as performance improvements. The full list of changes is available in the release notes. http://jakarta.apache.org/builds/jakarta-tomcat-4.0/test/v4.1.14/RELEASE-NOTES Remy -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org
Re: 4.1.12 rpms
The LE-1.4 version also excludes several jars with additional features. I think JMS was one of them. I use the LE-1.4 version with 1.3.1, but add the jaxp, crimson and xalan jars. David Niaz Habib wrote: I believe the LE version is for jdk1.4. As jdk1.4 includes some of the XML parsers necessary to run tomcat, the LE version does not include them. -Original Message- From: Charles Baker [mailto:rascharles;yahoo.com] Sent: Sunday, November 03, 2002 6:23 PM To: tomcat Subject: 4.1.12 rpms What is the difference between the full and le versions of the 4.1.12 rpms? = [EMAIL PROTECTED] http://www.charleshbaker.com/~chb/ Hacking is a Good Thing! See http://www.tuxedo.org/~esr/faqs/hacker-howto.html __ Do you Yahoo!? Y! Web Hosting - Let the expert host your web site http://webhosting.yahoo.com/ -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org
Re: java -server
You can certainly use it if you like. Each app reacts differently to it. Our app was faster where it counted. We did find that running xalan with jdom was faster in client mode (can't say why, or what part was affected most). David Frank Liu wrote: isn't tomcat a server? why we don't use the java -server option? -- 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: java -server
Well, Javasoft provides some general discussion about what was done on the -server implementation. In general, the client VM will start up faster. The server VM will do more up-front optimization. You really need to try both and convince yourself which is better for you. David Frank Liu wrote: any good docs on good/bad side of -server and -client option? or maybe the only way is to try it? frank On Wed, 9 Oct 2002, David Kavanagh wrote: You can certainly use it if you like. Each app reacts differently to it. Our app was faster where it counted. We did find that running xalan with jdom was faster in client mode (can't say why, or what part was affected most). David Frank Liu wrote: isn't tomcat a server? why we don't use the java -server option? -- 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: What Java Profile tool do you use?
I've used OptimizeIt and JProbe. For each, I've configured tomcat like a normal app. They both are able to use Tomcat as a web app container to debug your web app, but I'm not sure why I should have done that. I like OptimizeIt a little better, but they both get the job done. David Hauck, Joe wrote: Hello all, What java profiling tool do you recommend for java servlets? (Memory consumption, garbage collection, process hogs, etc.) Thanks. Joe. -- 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: Checking Tomcat's Memory
Kris is right. These parameters ought to be tweaked for servers with decent amounts of memory installed. On another project our company is working on, we had a machine with 8G (a Sun 4-way server). We were able to set up to 3G on JDK1.3.1. To documentation I found indicated using ISM, about 3.8 was achievable We did have problems and switching to 2G max heap worked. So, I'd caution those trying to use anything higher than 2G on 1.3.1. Perhaps 1.4 has fixed this. I know the documentation says the special memory settings (NewRatio, etc...) are used a little differently. Follow this link for more details; http://java.sun.com/docs/hotspot/index.html David Kris Schneider wrote: Sun's 1.4 server (not client) JVM can use a 4GB heap on a 64-bit SPARC box. Otherwise, I think you're pretty much stuck at 2GB. How much physical memory and swap space is installed? How much is actually available for allocation to the JVM when Tomcat gets kicked off? I also tend to adjust some of the other options. Something typical (for 1.3, some things have changed for 1.4) might be: -Xms512m -Xmx512m -XX:MaxPermSize=96m -XX:NewSize=128m -XX:MaxNewSize=128m -XX:SurvivorRatio=8 I certainly don't claim that those numbers are generally optimal, but changing them from their defaults can provide dramatic results. A certain commercial app server I've used would just up die until things were tweaked out a bit - YMMV. This might also be of interest (for Sun JVMs anyway): http://java.sun.com/docs/hotspot/index.html Sexton, George wrote: I really doubt it. I seem to recall that for Windows 32 bit applications the maximum address space of an application is 2GB. I would try reducing the second parameter to below 2GB and see what happens. I'm sure Sun has some boxes that could do this... -Original Message- From: Marinko, Jeff [mailto:[EMAIL PROTECTED]] Sent: 15 August, 2002 3:28 PM To: 'Tomcat Users List' Subject: RE: Checking Tomcat's Memory Ah, there it is! So I would add additional JVM Option Number X with the -server, -Xms, -Xmx parameters and change JVM Option Count to account for this. I've managed to change the VM heap size through editing the catalina.bat script, however I get the following: Error occurred during initialization of VM Could not reserve enough space for object heap when I try to set my parameters at -Xms1024m -Xmx3072m (currently running at 128m and 1024m). Are there any VMs out there that can handle this kind of memory (1+ gigs to start)? Thanks! -Original Message- From: Sexton, George [mailto:[EMAIL PROTECTED]] Sent: Thursday, August 15, 2002 1:20 PM To: Tomcat Users List Subject: RE: Checking Tomcat's Memory HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\ServiceName\Parameter s
Re: Accessing Mapped Drives
I saw this problem with a java2 applet running with the plugin The file dialog could not see mapped drives. I only saw it on Win 98. Windows 2000 worked fine. What OS are you running? David Jacob Hookom wrote: What permissions do I need to setup for Tomcat to be able to access shared network drives on win2k? I'm able to access shares through an IDE of course, but Tomcat returns null for all io calls to these mapped drives. If anyone has accomplished this or can point me in the right direction, I would be much obliged :-) Regards, Jacob Hookom Comprehensive Computer Science University of Wisconsin, Eau Claire --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.380 / Virus Database: 213 - Release Date: 7/24/2002 -- 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: Command line jspc throws NPE for page using JSTL
Kris, Did you find the code that refers to that path? Is it assuming that is runs inside a webapp container? If so, sound like it might be a bug (unless it was never intended to run standalone). I'd bet you could make it work by messing with your classpath. David Kris Schneider wrote: I mucked around with the Jasper source a bit to get some exception info dumped: java.net.MalformedURLException: Path 'WEB-INF/lib/standard.jar' does not start with '/' at org.apache.jasper.servlet.JspCServletContext.getResource(JspCServletContext.java:278) at org.apache.jasper.JspCompilationContext.getResource(JspCompilationContext.java:235) at org.apache.jasper.compiler.TagLibraryInfoImpl.init(TagLibraryInfoImpl.java:196) at org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:354) at org.apache.jasper.compiler.Parser.parseDirective(Parser.java:381) at org.apache.jasper.compiler.Parser.parseElements(Parser.java:790) at org.apache.jasper.compiler.Parser.parse(Parser.java:122) at org.apache.jasper.compiler.ParserController.parse(ParserController.java:199) at org.apache.jasper.compiler.ParserController.parse(ParserController.java:153) at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:229) at org.apache.jasper.JspC.processFile(JspC.java:553) at org.apache.jasper.JspC.execute(JspC.java:778) at RunJspC.main(RunJspC.java:9) java.lang.NullPointerException at org.apache.jasper.compiler.TagLibraryInfoImpl.init(TagLibraryInfoImpl.java:215) at org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:354) at org.apache.jasper.compiler.Parser.parseDirective(Parser.java:381) at org.apache.jasper.compiler.Parser.parseElements(Parser.java:790) at org.apache.jasper.compiler.Parser.parse(Parser.java:122) at org.apache.jasper.compiler.ParserController.parse(ParserController.java:199) at org.apache.jasper.compiler.ParserController.parse(ParserController.java:153) at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:229) at org.apache.jasper.JspC.processFile(JspC.java:553) at org.apache.jasper.JspC.execute(JspC.java:778) at RunJspC.main(RunJspC.java:9) org.apache.jasper.JasperException 2002-08-09 10:55:36 - ERROR-the file '\index.jsp' generated the following general exception: java.lang.NullPointerException at org.apache.jasper.JspC.processFile(JspC.java:574) at org.apache.jasper.JspC.execute(JspC.java:778) at RunJspC.main(RunJspC.java:9) My RunJspC class just does this: public static void main(String[] args) { try { JspC jspc = new JspC(); jspc.setArgs(args); jspc.execute(); } catch (JasperException exc) { exc.printStackTrace(); } } Kris Schneider wrote: (Alrighty, this is actually attempt number 3 to get this note posted. Gotta get more caffeine to the gerbils powering the email server...) When I try to use jspc from the command line to compile a JSP page that uses JSTL (1.0.1), I get a NullPointerException. Here's the setup (apologies if my email client hoses long lines): JAVA_HOME=C:\jdk1.3 CATALINA_HOME=D:\jakarta-tomcat-4.1.8 JASPER_HOME=D:\jakarta-tomcat-4.1.8 Here's how jspc gets invoked and the resulting error: D:\jakarta-tomcat-4.1.8\webapps\jspcTest%JASPER_HOME%\bin\jspc -v4 -d WEB-INF\src\jspc -webinc WEB-INF\jspc-web.xml -uriroot . -webapp . 2002-08-09 09:07:44 - ERROR-the file '\index.jsp' generated the following general exception: java.lang.NullPointerException error:null Here's index.jsp: %@ page language=java % %@ taglib prefix=c uri=http://java.sun.com/jstl/core; % html headtitleJSPC Test/title/head bodyh1Welcome to the JSPC test page/h1/body /html Here's web.xml: ?xml version=1.0 encoding=ISO-8859-1? !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN http://java.sun.com/dtd/web-app_2_3.dtd; web-app welcome-file-list welcome-fileindex.jsp/welcome-file /welcome-file-list /web-app The only other components of the app are the JAR files for JSTL that are installed in WEB-INF\lib. Everything works fine running as an app under 4.1.8. Any ideas about what's going on? Also, does the v flag really do anything? I can't seem to get any verbose output no matter what it's set to. Thanks for any help. -- Kris Schneider mailto:[EMAIL PROTECTED] D.O.Tech http://www.dotech.com/ -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Java Profilers, OptimizeIt or JProbe
I'll give my 2 cents... Ive used OptimizeIt to profile our app on tomcat. I know they provide a way to specify the servlet container for debugging web apps, but I never figured out why I needed to do that. I simply treated tomcat as any other app and profiled it that way. I had to take some of the stuff that tomcat.sh was doing and build that into my project params. I did memory profiling and was very pleased with the tools OptimizeIt provided. David Shapira, Yoav wrote: Hi, Same as the other guy who replied: I've tried them both, I like OptimizeIt much better. That was true for OptimizeIt v3.11 and the recent v4.12. And like the other guy, it's really nice to have versions for my Solaris and Windows machines on the same CD ;) Yoav Shapira Millennium ChemInformatics -Original Message- From: Zhenxin Wang [mailto:[EMAIL PROTECTED]] Sent: Friday, July 26, 2002 8:24 PM To: [EMAIL PROTECTED] Subject: Java Profilers, OptimizeIt or JProbe Has anybody compared these two products, esp. when they integrate with Tomcat? Thanks! Zhenxin Wang DoCoMo USA Labs -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Windows Explorer Hangs when Tomcat is running
I haven't seen this. I start tomcat (4.0.4) manually, but I can run IE and WE just fine. David [EMAIL PROTECTED] wrote: Hi Folks, I am running Tomcat 4.0.1 version on my Windows NT box. I am experiencing a bizzare problem when i run Tomcat and try to open Explorer. I have tomcat in my startup, and it starts up properly. When Tomcat is running, if i try to open Explorer, sometimes the explorer window doesn't come up. (The same goes with IE too). If i kill tomcat, explorer props up immediately. I was wondering if anyone else has faced the problem like this before. If so, could someone throw some light on this? TIA Sridhar Srinivasan, EMAIL: [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: Issue on Tomcat 4.0.4 configuration
So, we should be able to get to th 192.168 non-routable address? Telesis Support - Bangalore wrote: Dear all, After Installing tomcat, i got the index page(Welcome) = but,couldn't get the example pages. I have pasted the error messages of this process.. I dont know what might be the reason. Expecting ur valuable reply.. Thanks.. bye, Murugan The url is http://192.168.77.102:8080/examples/jsp/num/numguess.jsp Apache Tomcat/4.0.4 - HTTP Status 500 - Internal Server Error -= --- type Exception report message Internal Server Error description The server encountered an internal error (Internal Server = Error) that prevented it from fulfilling this request. exception=20 javax.servlet.ServletException: Servlet.init() for servlet jsp threw = exception at = org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java= :946) at = org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:65= 5) at = org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve= .java:214) at = org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.jav= a:566) at = org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:47= 2) at = org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at = org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve= .java:190) at = org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.jav= a:566) at = org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorB= ase.java:475) at = org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.jav= a:564) at = org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:47= 2) at = org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at = org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2347= ) at = org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:= 180) at = org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.jav= a:566) at = org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherVal= ve.java:170) at = org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.jav= a:564) at = org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:= 170) at = org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.jav= a:564) at = org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468)= at = org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.jav= a:564) at = org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:47= 2) at = org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at = org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.j= ava:174) at = org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.jav= a:566) at = org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:47= 2) at = org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at = org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.ja= va:1027) at = org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1= 125) at java.lang.Thread.run(Thread.java:484) root cause=20 java.lang.NoSuchMethodError at = org.apache.jasper.compiler.TldLocationsCache.processJars(TldLocationsCach= e.java:202) at = org.apache.jasper.compiler.TldLocationsCache.(TldLocationsCache.java:139)= at = org.apache.jasper.EmbededServletOptions.(EmbededServletOptions.java:350) at org.apache.jasper.servlet.JspServlet.init(JspServlet.java:265) at = org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java= :918) at = org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:65= 5) at = org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve= .java:214) at = org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.jav= a:566) at = org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:47= 2) at = org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at = org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve= .java:190) at = org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.jav= a:566) at = org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorB= ase.java:475) at = org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.jav= a:564) at = org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:47= 2) at =
Re: Tomcat and static content
Kapil, You could look at the apache access log. It will tell when an image has been served. There is now way (that I know of) to configure apache to trap all image requests that would be handled by a tomcat context. Is that what you are trying to do? If so, your web app needs to use paths that are not within the web app context. You can set up aliases within httpd.conf to make it easier to link images from the web app to some convenient path on your httpd server. Hope this helps. David Kapil Sharma wrote: Can someone answer it please... kapil -Original Message- From: Kapil Sharma [mailto:[EMAIL PROTECTED]] Sent: 07 July 2002 00:03 To: 'Tomcat Users List' Subject: Tomcat and static content Hi, I have got a problem. I am using apache 1.3.26+tomcat 1.3.1. Is there any way to know that apache is serving all static content like .html/.gif/.jpeg? My virtual host (in apache) is running very slow and images are breaking.. Please help? Cheers kapil -- 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: Apache plugin for Tomcat 4.0.3 for Windows 2000
I just used my mod_jk configuration from tomcat 3.2.x on my 4.0.4 install. If you look in the server.xml for tomcat 4, you should find something about an AJP13 connector. That is what links with mod_jk. Just make sure the port numbers match (mine did). David Jamal Najmi wrote: Hi, I am new to Apache and Tomcat. I I have recently installed Apache HTTP Server 2.0.39 and Tomcat 4.0.3 on my Win 2000. I need to connect them so that Apache HTTP server forwards servlet and JSP requests to Tomcat. I have been trying to find the documentation on Apache plugin for Tomcat 4.0.3, but noluck. I can find instruction and mod_jk for Tomcat 3.3.x but not for Tomcat 4.0.3. I will really appreciate if someone can direct to where the software and instructions are. Thanks Jamal - Do You Yahoo!? New! SBC Yahoo! Dial - 1st Month Free unlimited access -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Apache plugin for Tomcat 4.0.3 for Windows 2000
oops, I should have mentioned, I'm using apache 1.3.x. Not 2.0.x. Might be a different story there... Jamal Najmi wrote: Hi, I am new to Apache and Tomcat. I I have recently installed Apache HTTP Server 2.0.39 and Tomcat 4.0.3 on my Win 2000. I need to connect them so that Apache HTTP server forwards servlet and JSP requests to Tomcat. I have been trying to find the documentation on Apache plugin for Tomcat 4.0.3, but noluck. I can find instruction and mod_jk for Tomcat 3.3.x but not for Tomcat 4.0.3. I will really appreciate if someone can direct to where the software and instructions are. Thanks Jamal - Do You Yahoo!? New! SBC Yahoo! Dial - 1st Month Free unlimited access -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Apache plugin for Tomcat 4.0.3 for Windows 2000
Steve, To be perfectly honest, I've never configured Apache 2.0. I'm still stuck in 1.3 and just haven't gotten around to (or been motivated to) upgrade. If I wanted to know about it, I'd first look in the httpd.conf file (if it still uses that) since there have been numerous comments there in the past. I found this link that might also help, there seems to be a section on configuration files... http://httpd.apache.org/docs-2.0/ Good luck! David STEVE R BURRUS wrote: David, you probably don't know me at all, (I am Steve Burrus!) but I was wondering if you could either supply me with the hyperlink to access any info on using the numerous directives with Apache 2 OR tell me about all of the more important directives that I should know about to get going with it!! *** --- David Kavanagh [EMAIL PROTECTED] wrote: oops, I should have mentioned, I'm using apache 1.3.x. Not 2.0.x. Might be a different story there... Jamal Najmi wrote: Hi, I am new to Apache and Tomcat. I I have recently installed Apache HTTP Server 2.0.39 and Tomcat 4.0.3 on my Win 2000. I need to connect them so that Apache HTTP server forwards servlet and JSP requests to Tomcat. I have been trying to find the documentation on Apache plugin for Tomcat 4.0.3, but noluck. I can find instruction and mod_jk for Tomcat 3.3.x but not for Tomcat 4.0.3. I will really appreciate if someone can direct to where the software and instructions are. Thanks Jamal - Do You Yahoo!? New! SBC Yahoo! Dial - 1st Month Free unlimited access -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] __ Do You Yahoo!? Sign up for SBC Yahoo! Dial - First Month Free http://sbc.yahoo.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Apache plugin for Tomcat 4.0.3 for Windows 2000
Jamal, I don't remember where I got my mod_jk connector. Try searching on google. From what I read on the apache site, the compiled connectors (and source) should be availble on the ftp site (and mirrors). And, you are right, the ajp13 connector code is included, the mod_jk is the apache module that talks ajp13 with tomcat. David Jamal Najmi wrote: Do the mod_jk and ASP13 connector libraries usually come with the Tomcat 4.0.3 installation? After reading the tomcat server.xml file I am under the impression that mod_jk is the connector. I am not sure where to get it though. Thanks Jamal David Kavanagh [EMAIL PROTECTED] wrote: I just used my mod_jk configuration from tomcat 3.2.x on my 4.0.4 install. If you look in the server.xml for tomcat 4, you should find something about an AJP13 connector. That is what links with mod_jk. Just make sure the port numbers match (mine did). David Jamal Najmi wrote: Hi, I am new to Apache and Tomcat. I I have recently installed Apache HTTP Server 2.0.39 and Tomcat 4.0.3 on my Win 2000. I need to connect them so that Apache HTTP server forwards servlet and JSP requests to Tomcat. I have been trying to find the documentation on Apache plugin for Tomcat 4.0.3, but noluck. I can find instruction and mod_jk for Tomcat 3.3.x but not for Tomcat 4.0.3. I will really appreciate if someone can direct to where the software and instructions are. Thanks Jamal - Do You Yahoo!? New! SBC Yahoo! Dial - 1st Month Free unlimited access -- To unsubscribe, e-mail: For additional commands, e-mail: - Do You Yahoo!? New! SBC Yahoo! Dial - 1st Month Free unlimited access
Re: -Xmx/-Xms Parameters, Where do they go???
I've added a line in my tomcat.sh that sets the TOMCAT_OPTS variable. You should really set -server since I've seen noticeable improvements over the -client option (which is the default). -server must be the first option. Then, use -Xms and -Xmx to increase your memory allocation. If you are using 1.3.x, you should look at -XX:NewSize and -XX:MaxNewSize for much larger mx/ms values. You can find more information about these at http://java.sun.com/docs/hotspot/index.html David bob McLaughlin wrote: The tomcat users guide states, that to improve performance, more memory can be allocated to tomcat in: Modify your JVM memory configuration. Normally the JVM allocates an initial size for the Java heap and that's it, if you need more then this amount of memory you will not get it. Nevertheless, in loaded sites, giving more memory to the JVM improves Tomcat's performance. You should use command line parameters such as -Xms/-Xmx/-ms/-mx to set the minimum/maximum size of the Java heap (and check to see if the performance was improved). QUESTION: Where does this command go? I assume the tomcat.sh or the startup.sh, but in which part of which one? Anyone doing this? Bob -- 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: BARCODE
I've done it using a barcode font. Simply load the fonts and render the string you wish to encode. You can generate a BufferedImage in the servlet, and stream a jpeg to the browser. Here is where I got the font I've used. http://www.zebex.com/free.asp Good luck! David Lee Chin Khiong wrote: DOES ANYBODY KNOWS HOW TO GENERATE BARCODE USING JAVA OR JSP ? -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: ideas invited
What I've done is to insert some commands at the top of tomcat.sh, then link it from /etc/rc2.d/S99tomcat to tomcathome/bin/tomcat.sh (if on solaris). on Linux, I put it in /etc/rc5.d David # Lalit Nagpal # wrote: hi, i want tomcat 4 to startup up auto whenever the machine is rebooted so i have put the entry tomcat_path/startup.sh. As suggested by some i have set the java path and tomcat home also in rc.local file before running the startup.sh file. still it does not seem to work. any bright ideas on this. thanx a lot # Lalit Nagpal # - Do You Yahoo!? Yahoo! Health - your guide to health and wellness -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: ideas invited
Well, it sounds like you are running on some flavor of unix. I've set up tomcat servers on solaris and linux. For Solaris you can put the startup script in /etc/rc2.d or /etc/rc3.d. If you run on Linux. I found you need to put it in /etc/rc5.d. If you don't use linux, don't worry about rc5.d. The commands I've put in the top of the tomcat.sh are to set environment variables. An alternative would be write your own script that sets the variables, then calls tomcat.sh (forwarding the commandline arguments). That way, tomcat.sh won't be altered. Come to think of it, I'll probably start doing this myself... David # Lalit Nagpal # wrote: so sorry, i did not understand what u meant ... where did rc5.d come from David Kavanagh [EMAIL PROTECTED] wrote: What I've done is to insert some commands at the top of tomcat.sh, then link it from /etc/rc2.d/S99tomcat to /bin/tomcat.sh (if on solaris). on Linux, I put it in /etc/rc5.d David # Lalit Nagpal # wrote: hi, i want tomcat 4 to startup up auto whenever the machine is rebooted so i have put the entry /startup.sh. As suggested by some i have set the java path and tomcat home also in rc.local file before running the startup.sh file. still it does not seem to work. any bright ideas on this. thanx a lot # Lalit Nagpal # - Do You Yahoo!? Yahoo! Health - your guide to health and wellness -- To unsubscribe: For additional commands: Troubles with the list: # Lalit Nagpal # - Do You Yahoo!? Yahoo! Health - your guide to health and wellness
Re: Monitoring Tomcat
I know it is not what you had in mind, but I wrote this servlet to allow me to ping it to see if tomcat was still up. With 3.2.x (which we still run on our production server), it would crash once every month or two and I needed to be able to check for that (my script pages me if it is down). I have a scripted telnet thing to issue an http get to my ping servlet url. David Pauline Cantaloup wrote: Hello, I made a search in the Tomcat User List Archive but for each message asking for some monitoring function in Tomcat, I didn't find any answer... Indeed, I would need a way to know about threads' managing and what happens to received requests (are some of them delayed or even dropped ?), in order to tune up my configuration and to prevent any crash. How to know if Tomcat's developpers already talked about such a thing, and above all, how to know what they said about this - I mean, do they think it's a useless function, or do they think it could be usefull but not enough to waste time on this now, etc. ? Thanks for your answers ! Pauline - CANTALOUP Pauline PCOTechnologies Burolines - 2 ter rue Marcel Doret 31700 Blagnac Tél. : 05.34.60.44.17 Web : www.pcotech.fr -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] package com.xerox.pix.servlet; import java.io.OutputStream; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import com.dotech.GenericFactory; /** * This class implements a basic servlet that responds to a GET request. * It can be used to see if the servlet container is up. * * @version $Revision: 1.2 $ $Date: 2002/02/16 20:20:47 $ * @author D. Kavanagh * @author [EMAIL PROTECTED] */ public class PingServlet extends LightServlet { public void doGet( HttpServletRequest request, HttpServletResponse response ){ GenericFactory.debugMax( this, Inside do Get ); OutputStream writer = null; try { setNoCache(response); response.setContentType( text/text ); writer = response.getOutputStream(); writer.write(0); }catch( Exception e ){ writeError( Got exception + e.getMessage() ); GenericFactory.debugException( this, e ); }finally { try { writer.close(); }catch( Exception e ){ } } } public void writeError( String message ){ // can't send html data, so just log it GenericFactory.debugMin( this, message ); } } -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: On timeout
In my web app, I check the session variable in each servlet and redirect to my login servlet if the sesssion is null. I use a helper method in my servlet baseclass. If you want to see it in action, try http:www.epixography.com/light/Start The session timeout is 30 minutes, so be prepared to wait! David Raphael Di Cicco wrote: Hi, I have had this problem for a long time. This may not be very difficult but still. I have a timeout on my server, let's say 10 minutes. After 10 minutes, all session variables are destructed, so the user gets an exception message once he tries to interact with the application. Is there anyway I can detect this so that I can warn the user ? Thanks, Raphaël -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
file access (security?)
I'm having a problem with TC4.0.3 (Win2K, JDK1.3.1) I have some code that reads a property file and tries to load fonts listed within. ClassLoader.getResource() is used to locate the prop file and font files I'm attaching the servlet test code. This code works fine under TC3.2.2 and TC3.3a BTW, the files being loaded are in a jar in my WEB-INF/lib directory. I've seen two problems: 1. when the font path contains a space, the resource URL is OK, but calling url.openStream() returns null. (works fine in TC3.x) 2. even if the input stream is good (as shown in the log below), there seems to be a problem creating a temp file. Could problem 2 be caused by some security features that have been put in place sincee TC3? Here is my catalina.out (the relavent section) file = fonts/Pgl_.ttf resource = jar:file:D:/work/pix.light/light/WEB-INF/lib/fonts.jar!/fonts/Pgl_.ttf input stream = java.util.zip.ZipFile$1@5dd910 java.io.IOException: The system cannot find the path specified at java.io.Win32FileSystem.createFileExclusively(Native Method) at java.io.File.checkAndCreate(File.java:1162) at java.io.File.createTempFile(File.java:1247) at java.awt.Font.createFont(Font.java:398) at com.xerox.pix.servlet.FontServlet.doGet(FontServlet.java:41) at javax.servlet.http.HttpServlet.service(HttpServlet.java:740) ... Thanks, David package com.xerox.pix.servlet; import java.awt.Font; import java.io.InputStream; import java.io.PrintWriter; import java.net.URL; import java.util.Enumeration; import java.util.Properties; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; /** * This class ... * * @version $Revision$ $Date$ * @author D. Kavanagh * @author [EMAIL PROTECTED] */ public class FontServlet extends LightServlet { public void doGet( HttpServletRequest request, HttpServletResponse response ){ PrintWriter writer = null; try { response.setHeader(Pragma, no-cache); response.setHeader(Expires, 0); response.setHeader(Cache-control, no-cache, must-revalidate); response.setContentType( text/html ); Properties props = new Properties(); props.load(getClass().getClassLoader().getResource(fonts/fonts.properties).openStream()); Enumeration enum = props.keys(); while (enum.hasMoreElements()) { String file = (String)props.get(enum.nextElement()); System.err.println(file = +file); URL url = getClass().getClassLoader().getResource(file); System.err.println(resource = +url); InputStream in = url.openStream(); System.err.println(input stream = +in); Font f = Font.createFont(Font.TRUETYPE_FONT, in); } writer = response.getWriter(); writer.println(htmlbodyh1loaded fonts!/ht/body/html); } catch (Exception e) { try { writer = response.getWriter(); writer.println(htmlbodyh1ERROR: +e.getMessage()+/ht/body/html); } catch (Exception ex) {} e.printStackTrace(); } finally { if (writer != null) writer.close(); } } } -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]