Re: [OT] How much RAM can java use
Leon Rosenberg wrote: Debian 3.1, kernel 2.6.x-smp (32 bit) or Debian 3.1, kernel 2.6.x-smp-emt64 (64 bit) Hardware: AMD Opteron and Xeon64 (both 64 bit) SUN jdk1.5 and/or jdk1.4.2 4 GB total RAM for 32-bit linux, with 3/1 memory partitioning 16GB total RAM for 64-bit linux. I've tested 32/64 bit JVMs extensively and done considerable amount of JAVA_OPTS tuning for my company's application. On a 32-bit machine you can't reliably go above a -Xms=1600m without getting OOM errors. With a 3/1 split your virtual page table size for the entire JVM process must be below 3GB total virtual memory. That's 3GB allocated, not commited. The JVM allocates a lot more memory besides the heap. With the 64-bit JVMs, the sky's the limit, however the 64-bit address also make your application take up more space relative to a 32-bit JVM. A 3.2GB 64-bit heap space isn't going to double the amount of identical objects you can create as compared to a 32-bit 1.6GB heap space because all pointer references will occupy twice the space. -ryan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomcat Session Replication Question
Can somebody tell me if there is a way to determine when session replication is complete after a new tomcat instance joins the cluster? When updating our cluster we usually restart one tomcat instance at a time. What we noticed is if we restart the second one too quickly after the first rejoins the cluster some sessions are lost because we did not provide enough time for all the sessions to replicate. Thanks, Ryan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Security manager w/ manager app
All: Is it possible to start Tomcat w/ the security manager enabled if I were to use the Tomcat Web Application Manager? -- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: 64 Bit Machines and Tomcat
J R wrote: Are there 64 bit counterparts? If not, would the 32 bit ones definitely work? Uhm, too many pronouns. "Ones?" You mean the binaries? Java .class files are all binary bytecode, the bytecode is architecture independent and well defined. All you need is a Java Virtual Machine for your architecture to execute the binaries. So the binaries, in theory, will run all any hardware architecture with a suitable JVM available. If by "ones" you mean "JVMs" then yes, there is an AMD64 JVM available for download at java.sun.com. In addition, I'm pretty sure Blackdown will compile 64-bit as well. These machines are Intel Zeon processors (dual) Are they EM64T Xeons, or the older 32-bit only Xeons? -ryan JR --- "J. Ryan Earl" <[EMAIL PROTECTED]> wrote: J R wrote: I tried to install Tomcat, and got the following: ./configure [...] configure: error: Unsupported CPU architecture "x86_64" How do I fix? Is there files out there to fix that? Is there any particular reason you need to build Tomcat? Why not just go with a prebuilt binary Tomcat installation? I assume you're using the AMD64 JDK? -ryan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Start your day with Yahoo! - make it your home page http://www.yahoo.com/r/hs - 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: 64 Bit Machines and Tomcat
J R wrote: I tried to install Tomcat, and got the following: ./configure [...] configure: error: Unsupported CPU architecture "x86_64" How do I fix? Is there files out there to fix that? Is there any particular reason you need to build Tomcat? Why not just go with a prebuilt binary Tomcat installation? I assume you're using the AMD64 JDK? -ryan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Clusters - Disabling or restricting autodiscovery via multicast (security question)
When using tomcat clusters on an untrusted subnet or using a routable multicast address, i see the potential for a rogue tomcat instance to join a cluster in order to hijack session information. This doesn't seem to be cured by any firewalling of incoming connections to the valid servers, as, from what i have read, the valid servers will do a unicast conect to the rogue sever on the address/port specified by the rogue server's multicast transmission and will transfer session data to it. If this is incorrect, I'd be grateful for an explanation. If this is correct, Is there any way to restrict autodiscovery of cluster membership to a known list of IPs or disable auto discovery alltogether? Thanks, Ryan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DeltaManager: calculation of deltas
I'm trying to understand how the DeltaManager determines the deltas of a session. From what I could find out by browsing the source code, there is no way to know whether a session attribute is dirty unless is it "set" again, e.g. HttpSession.setAttribute(Object obj). In other words, if the following piece of servlet code were serviced within the context of a DeltaManager, I could not expect the Count object to be broadcast to the cluster as a delta: Count count = (Count) request.getSession().getAttribute("count"); count.value++; I would have to ensure that the following code were executed in order to broadcast the "count" attribute as a delta: request.getSession().setAttribute("count", count); 1. Are my findings correct? 2. If my findings are correct, where is the justification for this logic? Is there some specification or other official documentation that acknowledges that this is acceptable? Regards, -Ryan Heaton -- This message may contain confidential information, and is intended only for the use of the individual(s) to whom it is addressed. -- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problem Bringing up Admin
All of the dependencies appear to be valid. I can bring up http://localhost:8080 and go into the manager and the examples, but not admin. Also, the msh service that I am installing Tomcat for is not working in the same fashion. I figure that the users on this list are probably a lot more familiar with the admin servlet then Hermes MSH. Anyone have any idea what would give me these dependency errors? Thanks, Ryan Peddireddy Srikanth wrote: hmm, i dont think struts need to be downloaded seperately are u using JDK 1.4 or 1.5 ?? if u r using 1.4 u have to download compatabliity package and configure its contents in ur tomcat installation by following the steps in Running.txt On 7/26/05, J. Ryan Kelley <[EMAIL PROTECTED]> wrote: yeah, my user is added to tomcat-users.xml, but i don't even get a prompt to attempt to loginI have a feeling that some of my dependencies are not complete. I never installed struts, but there is a struts.jar file in my $CATALINA_HOME/server/webapps/admin/WEB-INF/lib directory...the reason that i think this is some of the following entries I found in my catalina.out log file ... ... Jul 25, 2005 9:18:53 PM org.apache.struts.action.ActionServlet init SEVERE: Unable to initialize Struts ActionServlet due to an unexpected exception or error thrown, so marking the servlet as unavailable. Most likely, this is due to an incorrect or missing library dependency. java.lang.NoClassDefFoundError: org/apache/commons/modeler/Registry at java.lang.Class.getDeclaredMethods0(Native Method) at java.lang.Class.privateGetDeclaredMethods(Class.java:1655) at java.lang.Class.getMethod0(Class.java:1901) at java.lang.Class.getMethod(Class.java:984) at org.apache.commons.beanutils.MethodUtils.getMatchingAccessibleMethod(MethodUtils.java:535) at org.apache.commons.beanutils.MethodUtils.invokeMethod(MethodUtils.java:209) at org.apache.commons.digester.CallMethodRule.end(CallMethodRule.java:585) at org.apache.commons.digester.Rule.end(Rule.java:228) at org.apache.commons.digester.Digester.endElement(Digester.java:1067) at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source) at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source) at org.apache.commons.digester.Digester.parse(Digester.java:1591) at org.apache.struts.action.ActionServlet.initServlet(ActionServlet.java:1140) at org.apache.struts.action.ActionServlet.init(ActionServlet.java:326) at org.apache.webapp.admin.ApplicationServlet.init(ApplicationServlet.java:105) at javax.servlet.GenericServlet.init(GenericServlet.java:211) at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1091) at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:750) at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:641) at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:539) at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:499) at admin.login_jsp._jspService(login_jsp.java:66) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672) at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:463) at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:398) at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301) at org.apache.catalina.authenticator.FormAuthenticator.authenticate(FormAuthenticator.java:238) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:446) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapt
Re: Problem Bringing up Admin
nvoke(ErrorReportValve.java:105) at javax.servlet.GenericServlet.init(GenericServlet.java:211) at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1091) at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:750) at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:641) at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:539) at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:499) at admin.login_jsp._jspService(login_jsp.java:66) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672) at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:463) at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:398) at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301) at org.apache.catalina.authenticator.FormAuthenticator.authenticate(FormAuthenticator.java:238) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:446) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744) at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527) at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684) at java.lang.Thread.run(Thread.java:534) Jul 25, 2005 9:18:53 PM org.apache.catalina.core.ApplicationContext log INFO: Marking servlet admin.login_jsp as unavailable Jul 25, 2005 9:18:53 PM org.apache.catalina.authenticator.FormAuthenticator authenticate WARNING: Unexpected error forwarding to login page javax.servlet.UnavailableException: org/apache/commons/modeler/Registry so obviously (it seems to me anyway) my issue is that admin.login_jsp is being marked unavailable because of messed up dependencies, do I need to download struts? Thanks again for helping out a newbie, Ryan Peddireddy Srikanth wrote: hmm if u have manger application running , try depploying (or redeploying ) admin application theu it and then try to login I hope u added the user with which r trying to login into admin in tomcat-users.xml If u have tried all these already and still failed then I too dont have a clue :-( On 7/25/05, J. Ryan Kelley <[EMAIL PROTECTED]> wrote: Yes, those files are exactly where you say they should be. Thanks. Ryan Peddireddy Srikanth wrote: may be you would have done this but I want to know... whethere you extracted all files from that admin archive (zip or tar) and placed the files in respective folders like admin.xml in "\conf\Catalina\localhost" admin folder in "\server\webapps\" Srikanth On 7/22/05, J. Ryan Kelley <[EMAIL PROTECTED]> wrote: I've installed tomcat 5.5.9 and downloaded the admin package. When I attempt to access http://localhost:8080/admin/ I get a blank screen the first time, then if i reload I get the following error message in my browser. HTTP Status 503 - Servlet admin.login_jsp is currently unavailable *type* Status report *message* _Servlet admin.login_jsp is currently unavailable_ *description* _The requested service (Servlet admin.login_jsp is currently unavailable) is not currently available._ Apache Tomcat /5.5.9 I've read around on several forums, and the usual cause of this seems to be duplicate instances of the file struts.jar, however I can only locate the struts.jar file that is in $CATALINA_HOME/server/webapps/admin/WEB-INF/lib. Is anyone familiar with this problem, I'm sure that it's probably a basic solution, i'm a complete and total newbie to tomcat.
Re: Problem Bringing up Admin
Yes, those files are exactly where you say they should be. Thanks. Ryan Peddireddy Srikanth wrote: may be you would have done this but I want to know... whethere you extracted all files from that admin archive (zip or tar) and placed the files in respective folders like admin.xml in "\conf\Catalina\localhost" admin folder in "\server\webapps\" Srikanth On 7/22/05, J. Ryan Kelley <[EMAIL PROTECTED]> wrote: I've installed tomcat 5.5.9 and downloaded the admin package. When I attempt to access http://localhost:8080/admin/ I get a blank screen the first time, then if i reload I get the following error message in my browser. HTTP Status 503 - Servlet admin.login_jsp is currently unavailable *type* Status report *message* _Servlet admin.login_jsp is currently unavailable_ *description* _The requested service (Servlet admin.login_jsp is currently unavailable) is not currently available._ Apache Tomcat /5.5.9 I've read around on several forums, and the usual cause of this seems to be duplicate instances of the file struts.jar, however I can only locate the struts.jar file that is in $CATALINA_HOME/server/webapps/admin/WEB-INF/lib. Is anyone familiar with this problem, I'm sure that it's probably a basic solution, i'm a complete and total newbie to tomcat. Thanks in advance, -- J. Ryan Kelley Trinity Transport, Inc. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- J. Ryan Kelley Trinity Transport, Inc. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Problem Bringing up Admin
I've installed tomcat 5.5.9 and downloaded the admin package. When I attempt to access http://localhost:8080/admin/ I get a blank screen the first time, then if i reload I get the following error message in my browser. HTTP Status 503 - Servlet admin.login_jsp is currently unavailable *type* Status report *message* _Servlet admin.login_jsp is currently unavailable_ *description* _The requested service (Servlet admin.login_jsp is currently unavailable) is not currently available._ Apache Tomcat /5.5.9 I've read around on several forums, and the usual cause of this seems to be duplicate instances of the file struts.jar, however I can only locate the struts.jar file that is in $CATALINA_HOME/server/webapps/admin/WEB-INF/lib. Is anyone familiar with this problem, I'm sure that it's probably a basic solution, i'm a complete and total newbie to tomcat. Thanks in advance, -- J. Ryan Kelley Trinity Transport, Inc.
Re: Max thread/session timeouts
As a reference, in conf/server.xml I set my thread limit to 1 max threads, 1000 max idle threads, and 100 on startup. I've seen my as many as 7K threads busy within my application. This is on a 32bit 2.6 Linux kernel with 2GB of RAM (-Xmx1500m). On the 2.4 kernel I found practical limitations in how many "threads" the kernel could multiplex between, saw frequent system hangs under high load where the whole server would become unusable. On either linux kernel, you probably want to increase your maximum number of file descriptors in /etc/security/limits.conf for your Tomcat user account(s). 16K nofile as default works great for me. How much more memory you need really depends on your application. 500 threads isn't that much memory overhead, but if each thread goes off and creates a bunch of objects while it's working you'll need to assure heapspace is available accordingly. The short answer is: try it out, play with it. 500 threads isn't a whole lot. -ryan Kenneth Litwak wrote: We're running an application on Tomcat that often hits the limit of 150 threads. Can someone with experience changing this value give me advice on it? How big can you make this number? How much extra memory do I need if I say change it to, say, 500? Thanks. Ken - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Can't set login ID
I'm using tomcat 5.5.7. When I go to configure it though the monitor and try to set the login account it doens't seem to save them. After setting and hitting Apply/OK and then re-opening the configuration screen the setting is always set back to Local System Account?? Thanks ,Ryan
Clusters - Disabling or restricting autodiscovery (security question)
When using tomcat clusters on an untrusted subnet or using a routable multicast address, i see the potential for a rogue tomcat instance to join a cluster in order to hijack session information. This doesn't seem to be cured by any firewalling of incoming connections to the valid servers, as, from what i have read, the valid servers will conect to the rogue sever on the address/port specified by the rogue server's multicast transmission and will transfer session data to it. If this isn't correct, I'd be grateful for an explanation. If this is correct, Is there any way to restrict autodiscovery of cluster membership to a known list of IPs or disable auto discovery alltogether? Thanks, Ryan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Clusters - Disabling or restricting autodiscovery
When using tomcat clusters on an untrusted subnet or using a routable multicast address, i see the potential for a rogue tomcat instance to join a cluster in order to hijack session information. Is there any way to restrict autodiscovery of cluster membership to a known list of IPs or disable auto discovery alltogether? Thanks, Ryan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Classpath issues with embedded tomcat
Hello all, I'm running embedded tomcat 5.5.9. Let's say that I have one version of X.jar in my main classpath when I launch my embedded Tomcat, and also a different version of X.jar in a deployed webapp under WEB-INF/lib. Is there a way to force tomcat to use the X.jar version that it's in WEB-INF/lib and NOT the one that's in the main classpath? The default class loading behavior uses the X.jar in the main classpath and not the X.jar in WEB-INF/lib, which is causing problems since the deployed webapp doesn't suppor the version of X.jar that the parent classloader has already loaded. Any help is greatly appreciated! Thanks, Ryan
Problem configuring context resource in embedded tomcat 5.5.9
Hello all, I'm trying to manually configure a context resource using embedded Tomcat 5.5.9. I'm not sure if ordering is important in the code below, but perhaps one of you could shed some light. I don't get any exceptions or anything, but my webapp isn't able to find the resource. Here is the relevant code: // - BEGIN LOAD CUSTOM WEBAPPS try { // Configure JDBC data source. ContextResource ctxResource = new ContextResource(); ctxResource.setName("jdbc/juddiDB"); ctxResource.setAuth("Container"); ctxResource.setType("javax.sql.DataSource"); ctxResource.setProperty("maxActive", "100"); ctxResource.setProperty("maxIdle", "30"); ctxResource.setProperty("maxWait", "1"); ctxResource.setProperty("user", "user"); ctxResource.setProperty("password", "pass"); ctxResource.setProperty("driverClassName", "org.firebirdsql.jdbc.FBDriver"); ctxResource.setProperty("url", "jdbc:firebirdsql://localhost:3050/juddi?autoReconnect=true"); ctxResource.setProperty("validationQuery", "select count(*) from PUBLISHER"); NamingResources namingResources = rootcontext.getNamingResources(); namingResources.addResource(ctxResource); tomcat-user@jakarta.apache.org // Load and configure the UDDI registry webapp. Context ctx = this.embedded.createContext("/juddi", getPath() + "/webapps/juddi"); ctx.setPrivileged(true); this.host.addChild(ctx); // add context to host ctx.getNamingResources().addResource(ctxResource); } catch (Exception e) { e.printStackTrace(); } // - END LOAD CUSTOM WEBAPPS --- All of the above code is executed after the root context is created and initialized, and before the embedded tomcat engine is started. Any ideas? Thanks! Ryan
Properly setting src attribute for an img tag in a JSP
All, Can someone at least let me know what the proper way to set the src attribute on an img tag is? I've currently used relative "../img/image.jpg" and also the following: When using either I'm seeing the same URL show up at the browser when getting properties on the unfound image. I'm able to load that image in the browser using that path only after I've taken the file name off and see the directory listing. Then I'm able to put the image name back in and access the image. This is really getting frustrating as I can't get a single image to show up in any of my JSP's. I even tried creating a simple HTML page, not a JSP, with an img tag and that image can't be found either. Same type of case as mentioned in my previous post. It can't load the image from that URL. But as soon as I hack off the file name and get the directory listing I can then readd the file name and the file will load in the browser. Any clue?? I'm completely stuck on this one. Ryan -Original Message- From: Anoop kumar V [mailto:[EMAIL PROTECTED] Sent: Monday, June 27, 2005 4:34 PM To: Tomcat Users List Subject: Re: img tag's src not working for image files in a JSP in tomcat 5.5 Even I faced this frustrating problem recently - I couldnt really solved it and just switched images - (I created a new image and it somehow worked). I am just trying to get u a workaround (not exactly a cause analysis of your problem) - HTH -Anoop On 6/27/05, Ryan Champlin <[EMAIL PROTECTED]> wrote: > I've tried clearing my browser cach and tried both Firefox and IE. Neither > seem to be able to access those images at that location. So I don't think > it's the browser necessarily. > > Not using SSL and don't have any security in place for this application. > > Ryan > > -Original Message- > From: Jason Bainbridge [mailto:[EMAIL PROTECTED] > Sent: Monday, June 27, 2005 3:46 PM > To: Tomcat Users List > Subject: Re: img tag's src not working for image files in a JSP in > tomcat 5.5 > > > Sounds like a browser caching issue or maybe some referrer checking > getting in the way although I don't how that would be setup in Tomcat. > > Are you using SSL or have any other types of constriants in place? > > Regards, > -- > Jason Bainbridge > http://kde.org - [EMAIL PROTECTED] > Personal Site - http://jasonbainbridge.com > > On 6/27/05, Ryan Champlin <[EMAIL PROTECTED]> wrote: > > All, > > > > I've read quite a few articles on this issue and tried all the solutions > > given and none of them seem to be working. > > I'm using Netbeans 4.1 with Tomcat 5.5. My application is using the MVC > > patter so I have a controller that is using the request dispatcher to > > forward a request to a JSP page. > > > > Basically I have an application at the context "/Company". > > > > I have all my images in a folder called "img" and all my JSP's in a folder > > called "jsp". > > > > I've tried using relative paths to the image directory and the images don't > > show up in the browser however if I look at the URL it seems right. > > I right-clicked to get properties and copied the URL: > > > > http://localhost:8085/Company/img/image.jpg > > > > If I paste that into a browser I get a 404 error from Tomcat. However, if > > I take off the image name and do: > > > > http://localhost:8085/Company/img > > > > I get a listing of the image files. If I click on the link for the image > > "image.jpg" it opens the file in the browser and I see the URL as: > > > > http://localhost:8085/Company/img/image.jpg > > > > which is exactly the same as what I had manually typed in. Doesn't make > > any sense to me as to why it works one way and not the other. Possibly a > > permissions issue? > > > > Can anyone shed some light on why I can't get my image files to show up in > > my JSP pages? > > > > Thanks, > > Ryan > > > > > > > > - > 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] > > -- Thanks and best regards, Anoop - 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: img tag's src not working for image files in a JSP in tomcat 5.5
I've tried clearing my browser cach and tried both Firefox and IE. Neither seem to be able to access those images at that location. So I don't think it's the browser necessarily. Not using SSL and don't have any security in place for this application. Ryan -Original Message- From: Jason Bainbridge [mailto:[EMAIL PROTECTED] Sent: Monday, June 27, 2005 3:46 PM To: Tomcat Users List Subject: Re: img tag's src not working for image files in a JSP in tomcat 5.5 Sounds like a browser caching issue or maybe some referrer checking getting in the way although I don't how that would be setup in Tomcat. Are you using SSL or have any other types of constriants in place? Regards, -- Jason Bainbridge http://kde.org - [EMAIL PROTECTED] Personal Site - http://jasonbainbridge.com On 6/27/05, Ryan Champlin <[EMAIL PROTECTED]> wrote: > All, > > I've read quite a few articles on this issue and tried all the solutions > given and none of them seem to be working. > I'm using Netbeans 4.1 with Tomcat 5.5. My application is using the MVC > patter so I have a controller that is using the request dispatcher to forward > a request to a JSP page. > > Basically I have an application at the context "/Company". > > I have all my images in a folder called "img" and all my JSP's in a folder > called "jsp". > > I've tried using relative paths to the image directory and the images don't > show up in the browser however if I look at the URL it seems right. > I right-clicked to get properties and copied the URL: > > http://localhost:8085/Company/img/image.jpg > > If I paste that into a browser I get a 404 error from Tomcat. However, if I > take off the image name and do: > > http://localhost:8085/Company/img > > I get a listing of the image files. If I click on the link for the image > "image.jpg" it opens the file in the browser and I see the URL as: > > http://localhost:8085/Company/img/image.jpg > > which is exactly the same as what I had manually typed in. Doesn't make any > sense to me as to why it works one way and not the other. Possibly a > permissions issue? > > Can anyone shed some light on why I can't get my image files to show up in my > JSP pages? > > Thanks, > Ryan > > > - 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]
img tag's src not working for image files in a JSP in tomcat 5.5
All, I've read quite a few articles on this issue and tried all the solutions given and none of them seem to be working. I'm using Netbeans 4.1 with Tomcat 5.5. My application is using the MVC patter so I have a controller that is using the request dispatcher to forward a request to a JSP page. Basically I have an application at the context "/Company". I have all my images in a folder called "img" and all my JSP's in a folder called "jsp". I've tried using relative paths to the image directory and the images don't show up in the browser however if I look at the URL it seems right. I right-clicked to get properties and copied the URL: http://localhost:8085/Company/img/image.jpg If I paste that into a browser I get a 404 error from Tomcat. However, if I take off the image name and do: http://localhost:8085/Company/img I get a listing of the image files. If I click on the link for the image "image.jpg" it opens the file in the browser and I see the URL as: http://localhost:8085/Company/img/image.jpg which is exactly the same as what I had manually typed in. Doesn't make any sense to me as to why it works one way and not the other. Possibly a permissions issue? Can anyone shed some light on why I can't get my image files to show up in my JSP pages? Thanks, Ryan
SSL keystore with more than one key entry - which alias is used?
If the keystore that Tomcat uses contains more than one entry where Entry type = keyEntry, how does Tomcat choose which one to use when sending a certificate to the client? It seems as though the alias name is not significant - any alias will do. After some experimenting it seems it uses the first one found. Is this correct? Or is some other method used? Thanks for your time. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
ConcurrentModificationException in 5.0.27
We discovered what appears to be a bug regarding a ConcurrentModificationException Tomcat 5.0.27. The problem arises when two web apps are deployed that are trying to interact with each other in some way. The exception isn't thrown when one of the web apps is taken out of the loop. Here is the relevant error: May 25, 2005 2:41:01 PM org.apache.jk.server.JkMain start INFO: Jk running ID=0 time=10/131 config=C:\Program Files\Apache Software Foundation\Tomcat 5.0\conf\jk2.properties May 25, 2005 2:41:02 PM org.apache.coyote.http11.Http11Protocol start INFO: Starting Coyote HTTP/1.1 on http-8441 May 25, 2005 2:41:02 PM org.apache.coyote.http11.Http11Protocol start INFO: Starting Coyote HTTP/1.1 on http-8080 May 25, 2005 2:41:02 PM org.apache.coyote.tomcat5.MapperListener init WARNING: Error registering contexts java.util.ConcurrentModificationException at java.util.HashMap$HashIterator.nextEntry(Unknown Source) at java.util.HashMap$EntryIterator.next(Unknown Source) at java.util.HashMap.putAllForCreate(Unknown Source) at java.util.HashMap.clone(Unknown Source) at mx4j.server.DefaultMBeanRepository.clone(DefaultMBeanRepository.java:56) at mx4j.server.MBeanServerImpl.findMBeansByPattern(MBeanServerImpl.java:1603) at mx4j.server.MBeanServerImpl.queryObjectNames(MBeanServerImpl.java:1568) at mx4j.server.MBeanServerImpl.queryMBeans(MBeanServerImpl.java:1512) at org.apache.coyote.tomcat5.MapperListener.init(MapperListener.java:115) at org.apache.coyote.tomcat5.CoyoteConnector.start(CoyoteConnector.java:1537) at org.apache.catalina.core.StandardService.start(StandardService.java:489) at org.apache.catalina.core.StandardServer.start(StandardServer.java:2313) at org.apache.catalina.startup.Catalina.start(Catalina.java:556) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:284) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:422) May 25, 2005 2:41:02 PM org.apache.catalina.startup.Catalina start INFO: Server startup in 37674 ms Regards, Ryan
RE: Tomcat processes
Generally speaking, one process with a lot of threads should perform better than distributing the threads among multiple processes because you're not doing as much context switching and it's more efficient on caches. J. Ryan Earl Systems/Network Engineer dynaConnections Corporation 512.306.9898 -Original Message- From: Iannis Hanen [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 04, 2005 12:01 PM To: tomcat-user@jakarta.apache.org Subject: Tomcat processes Hi everyone, I have a question related to the scalability and performance of Tomcat. Typically, when tomcat gets started, it creates one process that spawns all the threads required to answer the requests for all the deployed web applications. Let's assume that I have 6 distinct web applications to deploy on a tomcat instance. If tomcat runs on a single high end server machine (with multi CPU), I am wondering which approach would scale better: 1) launch tomcat once with the 6 web applications (the "regular" way) 2) create two server.xml files (one server.xml including 3 web apps, and another one containing the remaining 3), and start two tomcat instances (running on different port obviously) on the same machine. 3) Follow approach 2 except that each tomcat instance contains all 6 web apps (and some load balancer is put in front). In short, I am wondering if having multiple tomcat processes running on a multi CPU box would scale better than having a single tomcat process dealing with everything. Is there a way to tune up the number or tomcat processes from server.xml or elsewhere? I could not find anything related to the number of processes to spawn at all. In some app server, it is possible to create several process for the same application. Is there anything similar in Tomcat? Best regards, Iannis - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
New logs showing up under Tomcat 5.5.9
All: Just upgraded to 5.5.9 yesterday. Can anyone quickly tell me what the extra log files are in the logs directory? I'm getting: admin.2005-04-28.log, catalina.2005-04-28.log, host- manager.2005-04-28.log, localhost.2005-04-28.log, and manager.2005-04-28.log They're all 0 bytes. Can I stop them from showing up? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: is it worth upgrading to tomcat 5.5.9 over jdk1.4?
I don't think you lose anything, assuming your application works fine. You gain: * A 64-bit Sun JVM for x86-64. * SNMP monitoring of the JVM. * The ability to attach a profiling to a running JVM and see what all the threads are doing--useful for catching production problems as they occur. I didn't notice any negative side affects migrating our application over from the Sun JRE 1.4.2 => 1.5.0, it "just worked." J. Ryan Earl Systems/Network Engineer dynaConnections Corporation 512.306.9898 -Original Message- From: Guy Katz [mailto:[EMAIL PROTECTED] Sent: Friday, April 29, 2005 8:02 AM To: Tomcat Users List Subject: is it worth upgrading to tomcat 5.5.9 over jdk1.4? hi all; my question is if its a good idea to upgrade to 5.5.x but over jdk 1.4. would i still get more stability, performance, etc...? what will i loose? thanks in advance ofr you help. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Clustering "application scope replication"
Let me rephrase the question, how does Tomcat determine what is a session attribute. What if there are classes that implement java.io.Serializable that have nothing to do with "session attributes?" -ryan -Original Message- From: J. Ryan Earl [mailto:[EMAIL PROTECTED] Sent: Friday, April 22, 2005 10:19 AM To: Lionel Farbos; Tomcat Users List Subject: RE: Clustering "application scope replication" I've read that document many times, and that does not answer my question. -ryan -Original Message- From: Lionel Farbos [mailto:[EMAIL PROTECTED] Sent: Friday, April 22, 2005 9:50 AM To: Tomcat Users List Cc: [EMAIL PROTECTED] Subject: Re: Clustering "application scope replication" As it is explained in the doc : "All your session attributes must implement java.io.Serializable" On Fri, 22 Apr 2005 09:44:01 -0500 "J. Ryan Earl" <[EMAIL PROTECTED]> wrote: > How does Tomcat know what to serialize? Does it just use the Reflection > package and serialize out -everything- that implements java.io.Serializable? > > -ryan > > -Original Message- > From: Lionel Farbos [mailto:[EMAIL PROTECTED] > Sent: Friday, April 22, 2005 9:11 AM > To: Tomcat Users List > Cc: [EMAIL PROTECTED] > Subject: Re: Clustering "application scope replication" > > > Hi > > For your needs, you can use > session replication > (http://jakarta.apache.org/tomcat/tomcat-5.5-doc/cluster-howto.html) > or > your own mechanisms and tables with datas in a database ... > Regards. > > On Fri, 22 Apr 2005 15:15:54 +0200 > "Joakim Ahlén" <[EMAIL PROTECTED]> wrote: > > > Ok, too bad. Is there any way of storing objects if we want them in > "cluster scope"? > > > > An ugly hack would be to use one single HttpSession with a special > session-id to store global objects, and somehow fetch objects from within > this HttpSession from inside requests that belongs to other sessions. I > can't see how this could be done though, since request.getSession() can't > fetch other sessions than its own. This would probably also have to include > some tomcat specific magic which i wouldn't want. > > > > Any help is appreciated on how to handle this problem! > > > > Thanks > > > > Joakim > > > > On Fri, Apr 22, 2005 at 08:07:21AM -0500, Jess Holle wrote: > > > The servlet spec says this data is local to a given JVM. > > > > > > I suppose a servlet engine could expand beyond the spec, but I'd be > > > surprised if Tomcat did here. > > > > > > Joakim Ahlén wrote: > > > > > > >Hi! > > > > > > > >We have a cluster of two tomcat 5.5.9-machines using session > replication. > > > >However, we also have data in application scope (set with > > > >getServletContext().setAttribute(...)) which as far as i have found in > the > > > >docs, is not replicated. > > > > > > > >Is there any way to accomplish this with tomcat? If not, is there any > plan > > > >to develop support for it? Do other application servers have support > for > > > >this? > > > > > > > >Hope you can help me. > > > > > > > >Regards > > > > > > > >Joakim > > > > > > > >- > > > >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] > > > > > > > - > > 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] > > > - > 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Clustering "application scope replication"
I've read that document many times, and that does not answer my question. -ryan -Original Message- From: Lionel Farbos [mailto:[EMAIL PROTECTED] Sent: Friday, April 22, 2005 9:50 AM To: Tomcat Users List Cc: [EMAIL PROTECTED] Subject: Re: Clustering "application scope replication" As it is explained in the doc : "All your session attributes must implement java.io.Serializable" On Fri, 22 Apr 2005 09:44:01 -0500 "J. Ryan Earl" <[EMAIL PROTECTED]> wrote: > How does Tomcat know what to serialize? Does it just use the Reflection > package and serialize out -everything- that implements java.io.Serializable? > > -ryan > > -Original Message- > From: Lionel Farbos [mailto:[EMAIL PROTECTED] > Sent: Friday, April 22, 2005 9:11 AM > To: Tomcat Users List > Cc: [EMAIL PROTECTED] > Subject: Re: Clustering "application scope replication" > > > Hi > > For your needs, you can use > session replication > (http://jakarta.apache.org/tomcat/tomcat-5.5-doc/cluster-howto.html) > or > your own mechanisms and tables with datas in a database ... > Regards. > > On Fri, 22 Apr 2005 15:15:54 +0200 > "Joakim Ahlén" <[EMAIL PROTECTED]> wrote: > > > Ok, too bad. Is there any way of storing objects if we want them in > "cluster scope"? > > > > An ugly hack would be to use one single HttpSession with a special > session-id to store global objects, and somehow fetch objects from within > this HttpSession from inside requests that belongs to other sessions. I > can't see how this could be done though, since request.getSession() can't > fetch other sessions than its own. This would probably also have to include > some tomcat specific magic which i wouldn't want. > > > > Any help is appreciated on how to handle this problem! > > > > Thanks > > > > Joakim > > > > On Fri, Apr 22, 2005 at 08:07:21AM -0500, Jess Holle wrote: > > > The servlet spec says this data is local to a given JVM. > > > > > > I suppose a servlet engine could expand beyond the spec, but I'd be > > > surprised if Tomcat did here. > > > > > > Joakim Ahlén wrote: > > > > > > >Hi! > > > > > > > >We have a cluster of two tomcat 5.5.9-machines using session > replication. > > > >However, we also have data in application scope (set with > > > >getServletContext().setAttribute(...)) which as far as i have found in > the > > > >docs, is not replicated. > > > > > > > >Is there any way to accomplish this with tomcat? If not, is there any > plan > > > >to develop support for it? Do other application servers have support > for > > > >this? > > > > > > > >Hope you can help me. > > > > > > > >Regards > > > > > > > >Joakim > > > > > > > >- > > > >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] > > > > > > > - > > 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] > > > - > 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: Clustering "application scope replication"
How does Tomcat know what to serialize? Does it just use the Reflection package and serialize out -everything- that implements java.io.Serializable? -ryan -Original Message- From: Lionel Farbos [mailto:[EMAIL PROTECTED] Sent: Friday, April 22, 2005 9:11 AM To: Tomcat Users List Cc: [EMAIL PROTECTED] Subject: Re: Clustering "application scope replication" Hi For your needs, you can use session replication (http://jakarta.apache.org/tomcat/tomcat-5.5-doc/cluster-howto.html) or your own mechanisms and tables with datas in a database ... Regards. On Fri, 22 Apr 2005 15:15:54 +0200 "Joakim Ahlén" <[EMAIL PROTECTED]> wrote: > Ok, too bad. Is there any way of storing objects if we want them in "cluster scope"? > > An ugly hack would be to use one single HttpSession with a special session-id to store global objects, and somehow fetch objects from within this HttpSession from inside requests that belongs to other sessions. I can't see how this could be done though, since request.getSession() can't fetch other sessions than its own. This would probably also have to include some tomcat specific magic which i wouldn't want. > > Any help is appreciated on how to handle this problem! > > Thanks > > Joakim > > On Fri, Apr 22, 2005 at 08:07:21AM -0500, Jess Holle wrote: > > The servlet spec says this data is local to a given JVM. > > > > I suppose a servlet engine could expand beyond the spec, but I'd be > > surprised if Tomcat did here. > > > > Joakim Ahlén wrote: > > > > >Hi! > > > > > >We have a cluster of two tomcat 5.5.9-machines using session replication. > > >However, we also have data in application scope (set with > > >getServletContext().setAttribute(...)) which as far as i have found in the > > >docs, is not replicated. > > > > > >Is there any way to accomplish this with tomcat? If not, is there any plan > > >to develop support for it? Do other application servers have support for > > >this? > > > > > >Hope you can help me. > > > > > >Regards > > > > > >Joakim > > > > > >- > > >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] > > > > - > 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: OutOfMemoryError - 100 thread limit?
Awesome, I'm glad that was solved as I'm about to do the same thing with our application: running multiple instances of the application on a single tomcat instance housing many virtual hosts. Thanks for the http://java.sun.com/docs/hotspot/VMOptions.html link Peter. -ryan -Original Message- From: Caldarale, Charles R [mailto:[EMAIL PROTECTED] Sent: Thursday, April 21, 2005 11:52 AM To: Tomcat Users List Subject: RE: OutOfMemoryError - 100 thread limit? > From: LeeAnn Pultz [mailto:[EMAIL PROTECTED] > Subject: Re: OutOfMemoryError - 100 thread limit? > > It had -XX:MaxPermSize=128m in the process description. Ahah, as they say. > Can anyone give me any information on what this does? Is > this the "perm gen" that Chuck mentioned before? Yes, this controls the size of the permanent generation. The permanent generation portion of the heap is where class objects (instances of java.lang.Class) are allocated. If you have a lot of classes - which app servers frequently do - the size of this space needs to be increased. A quick scan of the 1.4.2 HotSpot source shows the default value to be 64m. > Are there any caveats to setting this memory option? Other than it subtracts from the total heap space for normal object, no. - 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 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: OutOfMemoryError - 100 thread limit?
This is a really interesting and confusing problem... Can you tell how much memory the OS is actually committing to Java? ie Check the resident stable set (RSS) = how much of the virtual memory space has been physically commited to memory. # ps axl|grep java 0 501 2623 1 21 0 1264252 79112 - Sl ? 0:09 /usr/java/jre1.5.0_02/bin/java -Xmx1000m The above says I have 1264252KB allocated but only 79112KB committed to physical memory. I'm curious what yours looks like. I know the the JVM reported it was using less memory, but I'd be curious to see what the OS thinks. Maybe even try raising your maximum heap size to say 1024MB? Which JVM are you using again? Which other JVMs have you tried? -ryan PS I just checked a production instance, and it looks like: $ ps axl|grep java 0 101 24243 1 16 0 2275516 906312 322497 Sl ?465:48 /opt/sun-jdk-1.4.2.07/bin/java ~900MB of over 2GB of virtual memory commited, it's apparently got quite a few threads running: $ ps ax -L |grep java|wc -l 2016 How does your application compare when it runs out of memory? -Original Message- From: LeeAnn Pultz [mailto:[EMAIL PROTECTED] Sent: Thursday, April 21, 2005 11:21 AM To: Tomcat Users List Subject: Re: OutOfMemoryError - 100 thread limit? Not a silly question :) We have 1 servlet that is the main entry point, everything else is done with standard java classes. We have no jsp's. At 09:13 AM 4/21/2005, you wrote: >silly question, does this webapp have like thousands of JSP and >servlets and preload the JSP's? > >peter > >- >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] LeeAnn Pultz ExtraView Corporation [EMAIL PROTECTED] 831-461-7100 x115 - 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: OutOfMemoryError - 100 thread limit?
I, for one, am awaiting LeeAnn's response with abated breath. =) -ryan -Original Message- From: Caldarale, Charles R [mailto:[EMAIL PROTECTED] Sent: Thursday, April 21, 2005 9:53 AM To: Tomcat Users List Subject: RE: OutOfMemoryError - 100 thread limit? > From: Peter Lin [mailto:[EMAIL PROTECTED] > Subject: Re: OutOfMemoryError - 100 thread limit? > > if it doesn't work, then back to square one :) It would be even better to get some real data with the -XX:+PrintGCDetails, so we can stop speculating... - 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 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: OutOfMemoryError - 100 thread limit?
Peter Lin reproduced and fixed the problem LeeAnn is seeing, and said "If I set my heap to -Xms256m -Xmx512m I'm able to load the 18 webapps just fine. the total memory used after all the webapps are loaded is 152Megs." He didn't mention anything about adjusting the perm gen space. -ryan -Original Message- From: Caldarale, Charles R [mailto:[EMAIL PROTECTED] Sent: Thursday, April 21, 2005 9:19 AM To: Tomcat Users List Subject: RE: OutOfMemoryError - 100 thread limit? > From: J. Ryan Earl [mailto:[EMAIL PROTECTED] > Subject: RE: OutOfMemoryError - 100 thread limit? > > So let me get this straight, LeeAnn is specifying a maximum > heap size of 512MB and a minimum size of 128MB. It looks > like the heap doesn't get adjusted up when the servlets are > initializing? Thus she needs to increase her minimum heapsize, > so something like -Xms512m should fix it? Probably not, since I suspect she's running out of perm gen space. IIRC, the perm gen size is calculated from -Xmx, which is already at 512m. Using the PrintGCDetails will tell us for sure. If that shows perm gen space to be exhausted, then adjusting -XX:MaxPermSize should fix it. - 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 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: OutOfMemoryError - 100 thread limit?
So let me get this straight, LeeAnn is specifying a maximum heap size of 512MB and a minimum size of 128MB. It looks like the heap doesn't get adjusted up when the servlets are initializing? Thus she needs to increase her minimum heapsize, so something like -Xms512m should fix it? -ryan -Original Message- From: Peter Lin [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 20, 2005 8:35 PM To: Tomcat Users List Subject: Re: OutOfMemoryError - 100 thread limit? ok, I just tried starting tomcat with the default heap size and 18 instances of my webapp and it got OOME just as you see. If I set my heap to -Xms256m -Xmx512m I'm able to load the 18 webapps just fine. the total memory used after all the webapps are loaded is 152Megs. the total number of webapps is 25 webapps including the default tomcat webapps and a few more. so basically you'll need to set the heap larger enough and it should work. If i do some math, we can calculate a rough estimate for the min heap (154 - 64)/25 = 3.6megs so basically, you'll need to multiply the number of webapps by 4 megs to figure out the heap setting. peter lin On 4/20/05, LeeAnn Pultz <[EMAIL PROTECTED]> wrote: > when you say 50 threads, do you mean 50 separate web applications? > > My concern right now is that we seem to be limited to 17-18 copies of our > web app on a particular installation of tomcat. And that > is just hitting the login page - not doing any work. Practically, for > applications with many users, we may be limited to 7-10 copies of our > application on a tomcat. > > Maybe I'm expecting too much? Perhaps that's a reasonable number of > concurrent webapps that can be run on a tomcat? But if that is the case, > it would be good to know what the limiting factor is, if it's not number of > threads or amount of memory. > > thanks for much for your help! > > > At 05:48 PM 4/20/2005, you wrote: > >ahh ok. .. my confusion. > > > >back to the problem you see. I've tested tomcat with 30-40 threads > >without any problems in the past. Even with heavy weight JSTL tags in > >JSP's, I'm able to go up to 50 threads with tomcat4.1. > > > >I'll try hitting tomcat's status servlet with 50 threads tonight and > >see what happens. > > > > > >peter > > > > > >On 4/20/05, LeeAnn Pultz <[EMAIL PROTECTED]> wrote: > > > I think we've gotten things a bit confused :) > > > > > > The application itself is not thread intensive - our original tests show > > > that each separate copy of the web application started up 3 active threads. > > > > > > Further testing, when we added in debugging code that would spin up dozens > > > of threads just to see if we could cause the tomcat to get the error if we > > > started one application up and had tons of threads, showed that we could > > > get 800+ threads with no problems (no outofmemory errors) and that the > > > problem does not in fact seem to be specifically related to the number of > > > threads the application creates. > > > > > > In fact, regardless of whether each instance of the application spins up 3 > > > threads (real situation) or 10+ (debug code only) threads, we still get the > > > out of memory error not when we hit a certain number of threads, but > > > actually when we hit a certain number of servlets having been initialized. > > > > > > Testing a very simple servlet, I can start up >25 instances of the servlet > > > with no OOM error. > > > Testing our application's servlet, I can only start up 17-18 instances of > > > the servlet before getting an OOM error. > > > > > > At this point I am going through our standard application servlet, trying > > > to isolate what work it does that may cause a problem when we do it 17 or > > > 18 times on one installation of tomcat. > > > > > > > > > At 05:16 PM 4/20/2005, you wrote: > > > >if your application is thread heavy, I would recommend changing it so > > > >that one thread can manage several processes. creating 800+ threads is > > > >going to hit a scalability and reliability wall very quickly. In > > > >general, you want to make sure the number of threads remain constant > > > >under constant load. If it doesn't the server will eventually crash as > > > >you currently see. I'm guessing the application is using threads to > > > >handle async processes, which is good, but spawning new threads with > > > >every request isn't going to work. > > > > > > > >hope th
RE: OutOfMemoryError - 100 thread limit?
After you've started your application, do a "ps ax|grep java" and see if that value is really making it into the command line; I'm doubting it is. To set these options, I added a the following the the .bash_profile of my tomcat user: export JAVA_OPTS="-Xmx1000m" -ryan -Original Message- From: LeeAnn Pultz [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 20, 2005 4:35 PM To: Tomcat Users List Subject: RE: OutOfMemoryError - 100 thread limit? Thanks - I'll try that - we do have CATALINA_OPTS set in catalina.sh of -Xms128m and -Xmx512m. At 02:12 PM 4/20/2005, you wrote: > > From: LeeAnn Pultz [mailto:[EMAIL PROTECTED] > > Subject: Re: OutOfMemoryError - 100 thread limit? > > > > [Full GC 47271K->47262K(129792K), 0.7056980 secs] > > > > If anyone has any suggestions on other things that I could > > check for ? > >It still looks like your heap size is too small - 128MB isn't much these >days. Assuming you're using a Sun 1.4 JVM or later, try specifying >-XX:+PrintGCDetails on the command line to see data about the individual >generations of the heap to see which one is becoming exhausted. > > - 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 unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] LeeAnn Pultz ExtraView Corporation [EMAIL PROTECTED] 831-461-7100 x115 - 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: Need help exporting contexts not under webapps/
Yea, I accidently hit the send button on the last email before I was done writing it, but it's working. I just had to create two context files under conf/Catalina/localhost/ -ryan -Original Message- From: Gurumoorthy [mailto:[EMAIL PROTECTED] Sent: Tuesday, April 19, 2005 1:33 PM To: Tomcat Users List Subject: Re: Need help exporting contexts not under webapps/ Did you manage to get it right ? I would recommend that you use lower case context path name Regards Guru - Original Message - From: "J. Ryan Earl" <[EMAIL PROTECTED]> To: "Tomcat Users List" Sent: Tuesday, April 19, 2005 6:56 PM Subject: RE: Need help exporting contexts not under webapps/ > Thanks for the reply, I actually figured it a few hours later. I was trying > to do 2/ in your list. I added a PICS.xml and a DOCS.xml under the > ${CATALINA_HOME}/conf/Catalina/localhost/ directory which gave me the PICS > and DOCS contexts. ie: > > [EMAIL PROTECTED] localhost]$ pwd > /home/tomcat/jakarta-tomcat-5.5.9/conf/Catalina/localhost > [EMAIL PROTECTED] localhost]$ ls > DOCS.xml host-manager.xml manager.xml PICS.xml > [EMAIL PROTECTED] localhost]$ cat PICS.xml > privileged="true" antiResourceLocking="false" > antiJARLocking="false"> > > [EMAIL PROTECTED] localhost]$ cat PICS.xml > privileged="true" antiResourceLocking="false" > antiJARLocking="false"> > > [EMAIL PROTECTED] localhost]$ cat PICS.xml DOCS.xml > privileged="true" antiResourceLocking="false" > antiJARLocking="false"> > > privileged="true" antiResourceLocking="false" > antiJARLocking="false"> > > > > > -Original Message- > From: QM [mailto:[EMAIL PROTECTED] > Sent: Monday, April 18, 2005 8:30 PM > To: Tomcat Users List > Subject: Re: Need help exporting contexts not under webapps/ > > > On Mon, Apr 18, 2005 at 01:16:04PM -0500, J. Ryan Earl wrote: > : So my question is, in short, given a directory structure of static files, > : how do you get Tomcat to serve said static content off of an arbitrary > URI? > > So, are you trying to > 1/ have a Tomcat-run webapp serve content that exists outside of the > context path? > > 2/ setup the static content as its own webapp (context)? > > > For #1, the (portable, spec-friendly) way is to write a servlet or > filter to intercept requests for a given URI, open the matching file as > an InputStream, and push the data to the client via the Response > OutputStream. > > For #2, I don't remember the exact syntax off the top of my head so I > won't waste your time with something that may not work. =) But it's > definitely possible for a webapp to not exist under the "webapps/" > directory. > > Just make sure said webapp has a WEB-INF directory and a web.xml. Even > a web.xml of just > > should do. > > -QM > > -- > > software -- http://www.brandxdev.net/ > tech news -- http://www.RoarNetworX.com/ > code scan -- http://www.JxRef.org/ > > - > 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] > - 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: Need help exporting contexts not under webapps/
Thanks for the reply, I actually figured it a few hours later. I was trying to do 2/ in your list. I added a PICS.xml and a DOCS.xml under the ${CATALINA_HOME}/conf/Catalina/localhost/ directory which gave me the PICS and DOCS contexts. ie: [EMAIL PROTECTED] localhost]$ pwd /home/tomcat/jakarta-tomcat-5.5.9/conf/Catalina/localhost [EMAIL PROTECTED] localhost]$ ls DOCS.xml host-manager.xml manager.xml PICS.xml [EMAIL PROTECTED] localhost]$ cat PICS.xml [EMAIL PROTECTED] localhost]$ cat PICS.xml [EMAIL PROTECTED] localhost]$ cat PICS.xml DOCS.xml -Original Message- From: QM [mailto:[EMAIL PROTECTED] Sent: Monday, April 18, 2005 8:30 PM To: Tomcat Users List Subject: Re: Need help exporting contexts not under webapps/ On Mon, Apr 18, 2005 at 01:16:04PM -0500, J. Ryan Earl wrote: : So my question is, in short, given a directory structure of static files, : how do you get Tomcat to serve said static content off of an arbitrary URI? So, are you trying to 1/ have a Tomcat-run webapp serve content that exists outside of the context path? 2/ setup the static content as its own webapp (context)? For #1, the (portable, spec-friendly) way is to write a servlet or filter to intercept requests for a given URI, open the matching file as an InputStream, and push the data to the client via the Response OutputStream. For #2, I don't remember the exact syntax off the top of my head so I won't waste your time with something that may not work. =) But it's definitely possible for a webapp to not exist under the "webapps/" directory. Just make sure said webapp has a WEB-INF directory and a web.xml. Even a web.xml of just should do. -QM -- software -- http://www.brandxdev.net/ tech news -- http://www.RoarNetworX.com/ code scan -- http://www.JxRef.org/ - 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]
Need help exporting contexts not under webapps/
Hello, I'm in the process of bringing an in-house application up under Tomcat. Previously we were using Jetty as the servlet container, but for various reason I'm trying to get said application running with Tomcat 5.5.9 and Java 1.5.0. The problem I'm having is that there are two directories with a large amount of static files (pictures, videos, documents, and other forms of media) that are mounted outside of the webapps/ home. Under Jetty, there is a configuration directive that I can use to export these directories under a URL path. I'm trying to do that in Tomcat, and the documentation has been somewhat confusing. What I've gathered is that this type of configuration should be put under ${CATALINA_HOME}/conf/context.xml however I have been able to do this successfully. I've tried putting the following in context.xml but it gives me errors: So my question is, in short, given a directory structure of static files, how do you get Tomcat to serve said static content off of an arbitrary URI? Ideas? Thanks in advance, -ryan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Changing .systemPrefs location
All: I'm running various Tomcat instances on the same system, using the same JDK. One problem I'm running into is: * One web app is running as user1 * Another web app is running as user2 * Both web apps use the same JDK * Both web apps use system preferences * When one web app is started, it writes .system.lock, and .systemRootModFile, and won't allow the other web app to start cleanly because those files are not writable. Is there a way to tell one Tomcat instance to use /a/.systemPrefs, and the other to use /b/.systemPrefs to avoid this deadlock? Thanks. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat5 java.lang.OutOfMemoryError
I posted a how-to on this just yesterday I think. Try the archives. It's typically a good idea to check there before you post. -Original Message- From: "SARMIENTO Claudia COGA"<[EMAIL PROTECTED]> To: "'Tomcat Users List'" Date: Mon Jan 10 10:49:20 PST 2005 Subject: Tomcat5 java.lang.OutOfMemoryError >Hello all: >I have problems with memory in Tomcat, this happen when the servlet try to >forward the result jsp only if the result is too big (a set of rows in a >period date) >Th bean doesn't have problems, but the servlet yes, so i think i need to >change my configuration to set more memory at startup. (Actually is the >default) > >I work in Tomcat 5.0.25 under W2000 with tomcat as a service, i read that i >have to re-install tomcat >(http://marc.theaimsgroup.com/?l=tomcat-user&m=104331482014538&w=2) the >notes is for tomcat 4, is the same for tomcat 5.0? > >Thanks! >Claudia > >PD: > >This is the exactly error: > >2005-01-10 11:26:42 StandardWrapperValve[invoker]: Servlet.service() para >servlet invoker lanzó excepción >java.lang.OutOfMemoryError > > >- >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] > ___ Check-out GO.com GO get your free GO E-Mail account with expanded storage of 6 MB! http://mail.go.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Errors Starting Up Tomcat 5.5
I just read that you need jre 1.5 or later and I was using j2sdk1.4.2_06. Could this be the cause of the errors I am seeing? I will update it and give it a try. Ryan Parsons Technical Services wrote: You are correct. I guess I was hallucinating again. Rip the files from the download and reinstall them. Or just reinstall Tomcat. You may think about re-downloading Tomcat. In the mean time grab the web.xml from the servlet_examples\WEB-INF\ folder and post it. If it is foobarred then you may have other issues. There haven't been any other post on this, that I can remember, thus it sounds like a bad install or download. Did you do a checksum on the download? Running out of ideas. Sorry. Doug - Original Message - From: "Ryan Austin" <[EMAIL PROTECTED]> To: "Tomcat Users List" Sent: Monday, January 10, 2005 3:51 PM Subject: Re: Errors Starting Up Tomcat 5.5 There are no war files in the webapps directory. The servlets-examples folder has all the html files unpacked. If I take out the servlets-examples folder and restart tomcat, the errors do not show up. Right now, tomcat is being run as root. I have not touched the web.xml file. I am running version 5.5.4 No other apps have been installed. Thanks, Ryan Parsons Technical Services wrote: Stop Tomcat Make sure the Servlet Examples war file is still in the webapps folder and then delete the folder. Start Tomcat The war file should be deployed and the folder recreated. If no go: Make sure the permissions on all files and folders under the Tomcat directory belong to the Tomcat user. If Tomcat is running as tcuser and root owns the file then things break. Do a ls -l You may have gotten a corrupted file on down load or on install. If all else fails, remove the folder and the war file. Restart Tomcat and check for errors. Then stop Tomcat and copy a fresh copy of the war file into the wepapps folder and start Tomcat. Other things to consider: Did you make any changes to the default web.xml? What version of 5.5 are you running? Have you installed any other apps on this install? Doug - Original Message - From: "Ryan Austin" <[EMAIL PROTECTED]> To: "Tomcat Users List" Sent: Monday, January 10, 2005 12:44 PM Subject: Re: Errors Starting Up Tomcat 5.5 Has the examples ever worked? The WEbDAV and JSP Examples work but the Servlet Examples give the error below. Did you just try to add them? I didn't add them, they came with the Tomcat Installation. Are you letting Tomcat deploy them from the war? They aren't win a war file, they came unpacked in a servlets-examples directory Have you tried to pull a virgin copy of the war file? see above. What OS are you on? Linux Are you hiring and how much.. Oops. Never mind that last one, got carried away a bit. lol Could this be a problem with the version? Should I install 5.0 and try it? Thanks, Ryan Doug - Original Message - From: "Ryan Austin" <[EMAIL PROTECTED]> To: Sent: Friday, January 07, 2005 10:13 PM Subject: Errors Starting Up Tomcat 5.5 Hi All, I can start up tomcat and run the main page http://localhost:8080, but if I try to go to the servlets examples it can't find the page... In the catalina.out log, there are errors that are only there when I keep the servlets-examples directory in the webapps folder, if I take it out all the errors are gone. Here are the error.. any help would be greatly appreciated INFO: jsp: init Jan 7, 2005 7:04:03 PM org.apache.tomcat.util.digester.Digester fatalError SEVERE: Parse Fatal Error at line 1 column 3: The markup declarations contained or pointed to by the document type declaration must be well-formed. org.xml.sax.SAXParseException: The markup declarations contained or pointed to by the document type declaration must be well-formed. at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source) at org.apache.xerces.util.ErrorHandlerWrapper.fatalError(Unknown Source) at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source) at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source) at org.apache.xerces.impl.XMLScanner.reportFatalError(Unknown Source) at org.apache.xerces.impl.XMLDTDScannerImpl.scanDecls(Unknown Source) at org.apache.xerces.impl.XMLDTDScannerImpl.scanDTDExternalSubset(Unknown Source) at org.apache.xerces.impl.XMLDocumentScannerImpl$DTDDispatcher.dispatch(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
Re: Errors Starting Up Tomcat 5.5
There are no war files in the webapps directory. The servlets-examples folder has all the html files unpacked. If I take out the servlets-examples folder and restart tomcat, the errors do not show up. Right now, tomcat is being run as root. I have not touched the web.xml file. I am running version 5.5.4 No other apps have been installed. Thanks, Ryan Parsons Technical Services wrote: Stop Tomcat Make sure the Servlet Examples war file is still in the webapps folder and then delete the folder. Start Tomcat The war file should be deployed and the folder recreated. If no go: Make sure the permissions on all files and folders under the Tomcat directory belong to the Tomcat user. If Tomcat is running as tcuser and root owns the file then things break. Do a ls -l You may have gotten a corrupted file on down load or on install. If all else fails, remove the folder and the war file. Restart Tomcat and check for errors. Then stop Tomcat and copy a fresh copy of the war file into the wepapps folder and start Tomcat. Other things to consider: Did you make any changes to the default web.xml? What version of 5.5 are you running? Have you installed any other apps on this install? Doug - Original Message - From: "Ryan Austin" <[EMAIL PROTECTED]> To: "Tomcat Users List" Sent: Monday, January 10, 2005 12:44 PM Subject: Re: Errors Starting Up Tomcat 5.5 Has the examples ever worked? The WEbDAV and JSP Examples work but the Servlet Examples give the error below. Did you just try to add them? I didn't add them, they came with the Tomcat Installation. Are you letting Tomcat deploy them from the war? They aren't win a war file, they came unpacked in a servlets-examples directory Have you tried to pull a virgin copy of the war file? see above. What OS are you on? Linux Are you hiring and how much.. Oops. Never mind that last one, got carried away a bit. lol Could this be a problem with the version? Should I install 5.0 and try it? Thanks, Ryan Doug - Original Message - From: "Ryan Austin" <[EMAIL PROTECTED]> To: Sent: Friday, January 07, 2005 10:13 PM Subject: Errors Starting Up Tomcat 5.5 Hi All, I can start up tomcat and run the main page http://localhost:8080, but if I try to go to the servlets examples it can't find the page... In the catalina.out log, there are errors that are only there when I keep the servlets-examples directory in the webapps folder, if I take it out all the errors are gone. Here are the error.. any help would be greatly appreciated INFO: jsp: init Jan 7, 2005 7:04:03 PM org.apache.tomcat.util.digester.Digester fatalError SEVERE: Parse Fatal Error at line 1 column 3: The markup declarations contained or pointed to by the document type declaration must be well-formed. org.xml.sax.SAXParseException: The markup declarations contained or pointed to by the document type declaration must be well-formed. at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source) at org.apache.xerces.util.ErrorHandlerWrapper.fatalError(Unknown Source) at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source) at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source) at org.apache.xerces.impl.XMLScanner.reportFatalError(Unknown Source) at org.apache.xerces.impl.XMLDTDScannerImpl.scanDecls(Unknown Source) at org.apache.xerces.impl.XMLDTDScannerImpl.scanDTDExternalSubset(Unknown Source) at org.apache.xerces.impl.XMLDocumentScannerImpl$DTDDispatcher.dispatch(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source) at org.apache.tomcat.util.digester.Digester.parse(Digester.java:1561) at org.apache.catalina.startup.ContextConfig.applicationWebConfig(ContextConfig.java:302) at org.apache.catalina.startup.ContextConfig.start(ContextConfig.java:955) at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:249) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4012) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:755) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525) at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:886) at org.apache.catalina.startup.Host
Re: Errors Starting Up Tomcat 5.5
Has the examples ever worked? The WEbDAV and JSP Examples work but the Servlet Examples give the error below. Did you just try to add them? I didn't add them, they came with the Tomcat Installation. Are you letting Tomcat deploy them from the war? They aren't win a war file, they came unpacked in a servlets-examples directory Have you tried to pull a virgin copy of the war file? see above. What OS are you on? Linux Are you hiring and how much.. Oops. Never mind that last one, got carried away a bit. lol Could this be a problem with the version? Should I install 5.0 and try it? Thanks, Ryan Doug - Original Message ----- From: "Ryan Austin" <[EMAIL PROTECTED]> To: Sent: Friday, January 07, 2005 10:13 PM Subject: Errors Starting Up Tomcat 5.5 Hi All, I can start up tomcat and run the main page http://localhost:8080, but if I try to go to the servlets examples it can't find the page... In the catalina.out log, there are errors that are only there when I keep the servlets-examples directory in the webapps folder, if I take it out all the errors are gone. Here are the error.. any help would be greatly appreciated INFO: jsp: init Jan 7, 2005 7:04:03 PM org.apache.tomcat.util.digester.Digester fatalError SEVERE: Parse Fatal Error at line 1 column 3: The markup declarations contained or pointed to by the document type declaration must be well-formed. org.xml.sax.SAXParseException: The markup declarations contained or pointed to by the document type declaration must be well-formed. at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source) at org.apache.xerces.util.ErrorHandlerWrapper.fatalError(Unknown Source) at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source) at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source) at org.apache.xerces.impl.XMLScanner.reportFatalError(Unknown Source) at org.apache.xerces.impl.XMLDTDScannerImpl.scanDecls(Unknown Source) at org.apache.xerces.impl.XMLDTDScannerImpl.scanDTDExternalSubset(Unknown Source) at org.apache.xerces.impl.XMLDocumentScannerImpl$DTDDispatcher.dispatch(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source) at org.apache.tomcat.util.digester.Digester.parse(Digester.java:1561) at org.apache.catalina.startup.ContextConfig.applicationWebConfig(ContextConfig.java:302) at org.apache.catalina.startup.ContextConfig.start(ContextConfig.java:955) at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:249) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4012) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:755) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525) at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:886) at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:849) at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:474) at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1079) at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:310) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1011) at org.apache.catalina.core.StandardHost.start(StandardHost.java:718) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1003) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:437) at org.apache.catalina.core.StandardService.start(StandardService.java:450) at org.apache.catalina.core.StandardServer.start(StandardServer.java:2010) at org.apache.catalina.startup.Catalina.start(Catalina.java:537) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:271) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.j
Re: Re: Out of Memory when compiling JSP (Struts app on Tomcat 4.1.27)
If you're nervous about registry work, back up your registry. Then open regedit and find: HKLM\SYSTEM\CurrentControlSet\Services\Apache Tomcat 4.1\Parameters (You can choose a different control set as well, and for Tomcat 5 users, this is under ...\Services\Tomcat5\Parameters.) You should see some Java startup options there already. They are named "JVM Option Number x" where x is a zero-based option count. The x *must* be incremented by one each time. If you skip a number, only the options before the skip will be loaded. e.g. If you set options 0, 1, 3, 4, and 5, then only 0 and 1 will be loaded. The rest will be ignored. Also, you must set the "JVM Option Count" key to the total number of options you have set. This will be one more than your highest option number. Think of it as an array where the options are the elements and the option count is the array length. I would guess that's how it's implemented. -Original Message- From: "David Johnson"<[EMAIL PROTECTED]> To: "Tomcat Users List" Date: Thu Jan 06 07:40:27 PST 2005 Subject: Re: Out of Memory when compiling JSP (Struts app on Tomcat 4.1.27) >Cool. Thanks > >the question is how do I get all of these options working when tomcat >runs as a service... > > > > >On Thu, 6 Jan 2005 15:28:30 -, Dale, Matt <[EMAIL PROTECTED]> wrote: >> It could also be that the Permanent Generation has filled up, look up the >> docs on how to increase that or start with -XX:MaxPermSize=128M >> >> -Original Message- >> From: SANTOS, DANIEL (SBCSI) [mailto:[EMAIL PROTECTED] >> Sent: 06 January 2005 14:57 >> To: Tomcat Users List; [EMAIL PROTECTED] >> Subject: RE: Out of Memory when compiling JSP (Struts app on Tomcat >> 4.1.27) >> >> Chachany, >> >> It sounds like it's using the default of -Xmx64m. Probably the best way >> to troubleshoot out or memory errors is to see what is really happening >> with garbage collecting, the same way that you tune it. If you can add >> these options, then the JVM will spit out all kinds of useful >> information: >> >> -XX:+PrintTenuringDistribution -XX:+PrintGCDetails -Xverbosegc >> >> But it sounds like the problem is that it's not getting the options. >> What you really need to figure out is exactly how the service is getting >> started. For instance, if it's calling tomcat.exe then I don't believe >> that the JAVA_OPTS environment variable is ever looked at since that is >> in the startup.sh and startup.bat files (I'm not 100% certain about that >> however). >> >> Find out how it's starting. Also, post the version of Java you are >> using (since the options I gave you above don't work on all versions, I >> think 1.4 and up or 1.3 and up). But the -Xverbosegc works all the way >> back to 1.1 if I'm correct. >> >> Daniel >> >> -Original Message- >> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] >> Sent: Thursday, January 06, 2005 8:25 AM >> To: tomcat-user@jakarta.apache.org >> Subject: Out of Memory when compiling JSP (Struts app on Tomcat 4.1.27) >> >> Hi all >> >> I'm working on an application currently that is experiencing some >> intermittent memory problems when installed onto our "integration >> test" server, but not on the development staff's local laptops. >> >> I have attempted to increase the maximum memory available to Tomcat by >> creating a global environment variable (because tomcat runs as a >> service) >> >> JAVA_OPTS=-Xmx512M >> >> Which doesnt seem to have made a difference. Is this the best way to >> increaqte the memory available to an application? Is my syntax wrong? >> Are there other options I can set that will help? >> >> The weird thing is that when I look at the memory usage of Tomcat.exe, >> the most memory it has used is 110,000 >> >> there seems to be no pattern to the memory errors (as usual) and it >> happens a lot when compiling JSP files. >> >> The system memory seems high, but not horribly so. I see the following >> in Task Manager >> >> MEM Usage = 885,000 (varies) >> >> Commit Charge: >> Limit : 2,522,244 >> Peak : 958,260 >> >> Anyone? >> >> Thanks! >> >> - >> 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] >> >> >> - >> 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] > ___ Check-out GO.com GO get your free GO E-Mail account with expanded storage of 6 MB! http://mail.go.com ---
Errors Starting Up Tomcat 5.5
Hi All, I can start up tomcat and run the main page http://localhost:8080, but if I try to go to the servlets examples it can't find the page... In the catalina.out log, there are errors that are only there when I keep the servlets-examples directory in the webapps folder, if I take it out all the errors are gone. Here are the error.. any help would be greatly appreciated INFO: jsp: init Jan 7, 2005 7:04:03 PM org.apache.tomcat.util.digester.Digester fatalError SEVERE: Parse Fatal Error at line 1 column 3: The markup declarations contained or pointed to by the document type declaration must be well-formed. org.xml.sax.SAXParseException: The markup declarations contained or pointed to by the document type declaration must be well-formed. at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source) at org.apache.xerces.util.ErrorHandlerWrapper.fatalError(Unknown Source) at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source) at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source) at org.apache.xerces.impl.XMLScanner.reportFatalError(Unknown Source) at org.apache.xerces.impl.XMLDTDScannerImpl.scanDecls(Unknown Source) at org.apache.xerces.impl.XMLDTDScannerImpl.scanDTDExternalSubset(Unknown Source) at org.apache.xerces.impl.XMLDocumentScannerImpl$DTDDispatcher.dispatch(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source) at org.apache.tomcat.util.digester.Digester.parse(Digester.java:1561) at org.apache.catalina.startup.ContextConfig.applicationWebConfig(ContextConfig.java:302) at org.apache.catalina.startup.ContextConfig.start(ContextConfig.java:955) at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:249) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4012) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:755) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525) at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:886) at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:849) at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:474) at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1079) at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:310) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1011) at org.apache.catalina.core.StandardHost.start(StandardHost.java:718) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1003) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:437) at org.apache.catalina.core.StandardService.start(StandardService.java:450) at org.apache.catalina.core.StandardServer.start(StandardServer.java:2010) at org.apache.catalina.startup.Catalina.start(Catalina.java:537) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:271) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:409) Jan 7, 2005 7:04:03 PM org.apache.catalina.startup.ContextConfig applicationWebConfig SEVERE: Parse error in application web.xml org.xml.sax.SAXParseException: The markup declarations contained or pointed to by the document type declaration must be well-formed. at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source) at org.apache.tomcat.util.digester.Digester.parse(Digester.java:1561) at org.apache.catalina.startup.ContextConfig.applicationWebConfig(ContextConfig.java:302) at org.apache.catalina.startup.ContextConfig.start(ContextConfig.java:955) at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:249) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119) at org.apache.catalina.core.StandardCont
Re: web.xml servlet mappings, url pattern and CGI.PATH_INFO (tomcat 4.1.31)
I don't know anything about ColdFusion, but if I understand you right, you're wanting to tack extra information onto a url beyond the file name and retrieve it somewhere for use, like so: http:index.cfm/someParam Then the page is actually index.cfm, and when it is run it will be able to see the "someParam". Is this correct? If so, my first thought is a query string. Can you use one instead of the above? Next, here's why what you're trying to do with the url-pattern won't work. The '*' in a url-pattern isn't actually a normal wildcard. There are only a couple of specific ways it can be used: 1) /* or /something/* or /.../* - This is path mapping. When a request is made, the longest matching pattern is used. 2) *.something - This is extension mapping. Anything with the extension you specify will be matched. (For full rules on url-pattern matching, see the Servlet spec, chapter 11.) I suppose you could map a pattern like /cfm/* to your own servlet, which would extract the file name from the path and request it from the cfm servlet and also do something with your extra information. This early in the morning, I can't think of a good way to do what you want easily. -Original Message- From: "Jack Eidsness"<[EMAIL PROTECTED]> To: "Tomcat Users List" Date: Mon Jan 03 13:09:01 PST 2005 Subject: web.xml servlet mappings, url pattern and CGI.PATH_INFO (tomcat 4.1.31) >I am new to the J2EE world, so hopefully I will not use terms incorrectly. > >Due to circumstances beyond my control, coldfusion has been retrofitted >into a J2EE web application and I have recently taken on the task of >trying to make previously existing cfm code work as part of a tomcat >installation. I have found (so far) only one thing that doesn't work >like it used to, and its a significant problem for me. > >CGI apps can have a false path appended after the script name, which is >written into the CGI.PATH_INFO variable, so that it can be available to >scripts. It would seem that tomcat is less flexible than apache httpd >about when this information will be supplied. At least, jakarta-tomcat >4.1.31 doesn't want to play ball. I have not yet experimented with >version 5.x. > >I have found a lot of discussion of this matter, but no conclusive >answer as to what the workaround is, nor, as i fear, that there is no >viable workaround. > >By default, my coldfusion war file came with this in the web.xml: > > > CfmServlet > *.cfm > > >attempting to browse (via the coyote thingie) to >http://{server}/cfusion/htdocs/index.cfm >will bring up the right page, but >http://{server}/cfusion/htdocs/index.cfm/fake_path >this gets me a 404. > >So far, I have only found one way to make tomcat give me the correct >PATH_INFO - >If I do this: > /htdocs/index.cfm/* >then I will be able to run the right script and CGI.PATH_INFO is set to >"/fake_path". > >Naturally, if you have more than a couple situations where you use >PATH_INFO, this configuration becomes quickly unmanageable, and >unreasonable. ("grep -iRl path_info ." will only get me so far) > >Is there a way to make this work without naming every cfm file that >might use PATH_INFO in the web.xml? > >For anyone interested in helping, here are some things that I have tried >that did not work (in each case, I have tried it as a replacement, >breaking the normal way it works for possible experimental value, or as >an additional servlet-mapping): > >If I do this: > *.cfm/* >I get an error in the jakarta logs when the web.xml is read; > >java.lang.IllegalArgumentException: Invalid *.cfm/* in >servlet mapping > >I looked up the source code and it says you can't start a servlet >mapping's url-pattern with "*." and have a "/" in the pattern at once. :/ > >If I do this (nevermind that its not exactly what I want): > *.cfm* >Then the second * is not expanded as a wildcard. i.e. a file named >"index.cfm*" (literal '*' character) could be processed as a cfm file. > >If I do this > /*.cfm/* >I get a 404. > >Thanks in advance for any time that any of you spend considering this issue, > ___ Check-out GO.com GO get your free GO E-Mail account with expanded storage of 6 MB! http://mail.go.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Re: JSP compilation problem
As QM mentioned, Tomcat 5.0 doesn't support Java 5.0 "out of the box", so to speak. I believe there's a patch you need to make them play nicely. Tomcat 5.5, as he pointed out, is very tight with Java 5.0. -Original Message- From: "Frank W. Zammetti"<[EMAIL PROTECTED]> To: "Tomcat Users List" Date: Sun Jan 02 11:46:49 PST 2005 Subject: Re: JSP compilation problem >Very interesting... Switching to JDK 1.4.2 solved the problem. I didn't >even do an uninstall/reinstall... I always install my SDK to c:\java, so >all I did was rename it and copy the directory over from another PC, so >any paths and registry settings should still be valid, there's just an >older version in it's place. I made sure to delete the Tomcat work >folder for the app, started up Tomcat and tried it, everything worked >fine... JSP class was generared, servlet compiled, and page came up, no >problem. > >So... Is there actually a problem using JDK 5.0 with Tomcat 5.0.29? If >so, what version of Tomcat is OK with 5.0? (assuming any are, which I DO >assume). Or is this just some sort of fluke situation? > >In any case, my problem is solved, and that was the resolution. > ___ Check-out GO.com GO get your free GO E-Mail account with expanded storage of 6 MB! http://mail.go.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
kaffe and tomcat 5.5.4
I'm running tomcat 5.54 on the "free" kaffe vm instead of Sun's JDK. When I start tomcat with the startup.sh script as root, everything runs perfectly. However I'm having trouble launching the process with JSVC. Does anybody know if JSVC can be made to work with java VMs other than SUN's? Jsvc debug output says it cannot find the file jvm.cfg, and also the actual vm file library names from the sun jdk appear to be hard-coded into the jsvc source because they cannot be found in the kaffe vm as well. If anyone has any helpful information, I would be most grateful. It is disappointing that Tomcat 5.5.4 runs perfectly on Kaffe only to be stopped by limitations in the commons-daemon... Perhaps there is another way to run tomcat 5.54 on port 80 as an unprivileged user in linux? thank you, Ryan Harris > From: > Ryan Harris > <[EMAIL PROTECTED]> >To: > debian-java@lists.debian.org > Subject: > Tomcat 5.5.4 works with kaffe > Date: > Fri, 31 Dec 2004 11:59:02 -0600 > > I installed and am running apache tomcat 5.5.4 with Kaffe instead of > Sun's Non-Free Java 1.5. My Google searching found a few tips on how > to > get 5.0.27 working with kaffe, and it worked on 5.5.4 also. > > > The only additional libraries I had to install were available in the > debian unstable packages: > > libjessie-java, libgnucrypto-java, and kjc > > I also installed the compatibility libraries which include the JMX.JAR > from the apache tomcat binaries distribution > (jakarta-tomcat-5.5.4-compat.tar.gz). > > Next I added the following environment variables to the file > bin/catalina.sh: > > JAVA_HOME=/usr/lib/kaffe > > #Change the compiler for jsps and give kaffe lots of memory > # i don't know how much is really needed, but I set it to 500 > Megs, > #the usual default for kaffe is 64M) > > JAVA_OPTS="-Dbuild.compiler=kjc -Xmx500M" > > #the gnucrypto and libjessie reside in this directory > JSSE_HOME=/usr/share/java > > export JAVA_HOME JAVA_OPTS JSSE_HOME > > And then I modified the following lines (near line 100-110) in > bin/catalina.sh > > # Add on extra jar files to CLASSPATH > if [ -n "$JSSE_HOME" ]; then > > #Added these lines to replace > #the Sun Java Security stuff > > > CLASSPATH="$CLASSPATH":"$JSSE_HOME"/gnu-crypto.jar:"$JSSE_HOME"/jsse.jar:"$JSSE_HOME"/javax-crypto.jar > CLASSPATH="$CLASSPATH":"$JSSE_HOME"/javax-security.jar > > > #I Commented out this line. Yuck. > > #CLASSPATH="$CLASSPATH":"$JSSE_HOME"/lib/jcert.jar:"$JSSE_HOME"/lib/jnet.jar:"$JSSE_HOME"/lib/jsse.jar > > fi > > #add this for the jmx dependencies from the > compatibility package > CLASSPATH="$CLASSPATH":"$CATALINA_HOME"/bin/jmx.jar > > > CLASSPATH="$CLASSPATH":"$CATALINA_HOME"/bin/bootstrap.jar:"$CATALINA_HOME"/bin/commons-logging-api.jar > > > > > > Last I had to create the log folder and the temp folder in > the tomcat directory because it wouldn't do it on its own... > I did something like this > > mkdir /var/log/tomcat5.5.4 > > ln -s /var/log/tomcat5.5.4 /usr/local/share/tomcat5.5.4/logs > > mkdir /usr/local/share/tomcat5.5.4/temp > > > > Then all I had to do was execute the startup.sh script in the bin > directory... and it worked > > > > > > > > > > > -- > To UNSUBSCRIBE, email to [EMAIL PROTECTED] > with a subject of "unsubscribe". Trouble? Contact > [EMAIL PROTECTED] > > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Re: JSP compilation problem
First, I apologize if I came of sounding rude before. As an infrequent visitor to this list, I wasn't aware that you are a frequent contributor. I also don't seem to have received the other reply you mention. My next thought is that you might have two versions of Java installed. If so, which version is Tomcat using? Are you sure you compiled the servlet with the same one? -Original Message- From: "Frank W. Zammetti"<[EMAIL PROTECTED]> To: "Tomcat Users List" Date: Sat Jan 01 07:22:09 PST 2005 Subject: Re: JSP compilation problem >I did not post twice Ryan. If two posts appeared, it is the same >problem with the list processor that we've been seeing for weeks now. > >I did post a reply however... I tried your suggestion and manually >compiled. I have NO classpath variable in the environment (I thought >this might have been a classpath issue, and I guess it could still be, >but I don't see how at this point). I manually put servlet-api.jar, >jsp-api.jar and jasper-runtime.jar in /tomcat/common/lib on the >classpath and compiled, and it compiles cleanly. So the problem would >not appear to be a problem with the generated servlet. Any other ideas? > >Thank you! > ___ Check-out GO.com GO get your free GO E-Mail account with expanded storage of 6 MB! http://mail.go.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: JSP compilation problem
I answered you yesterday on this. There's generally no reason to post the same question two days in a row. Just wait and see if an answer shows up. Your problem is (still) that you have one or more errors in your JSP. If you can't figure out where the compiler output is, then go and compile the translated servlet manually. -Original Message- From: "Frank W. Zammetti"<[EMAIL PROTECTED]> To: "Tomcat User" Date: Thu Dec 30 06:53:31 PST 2004 Subject: JSP compilation problem >Hello. I'm using Tomcat 5.0.29. Working from home today and trying to >run a working application on my laptop, and I'm seeing an exception when >trying to access the first JSP of the app. Here's the on-screen display: [...] >exception >org.apache.jasper.JasperException: Unable to compile class for JSP [...] ___ Check-out GO.com GO get your free GO E-Mail account with expanded storage of 6 MB! http://mail.go.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: java.lang.NullPointerException in tomcat 5.5.4
In your login.jsp you're calling the dispatch method of gnu.beanfactory.servlet.Dispatcher and most likely passing it null as an argument. I don't know anything about this "beanfactory", so I can't say much more at the moment. -Original Message- From: "ssk 2001"<[EMAIL PROTECTED]> To: tomcat-user@jakarta.apache.org Date: Fri Dec 31 00:08:20 PST 2004 Subject: java.lang.NullPointerException in tomcat 5.5.4 > I installed tomcat 5.5.4 ,jdk1.5 and beanfactory 1.0.1. When run the > application it gave the error which is shown below , Pls can anyone help it > solve this.. >HTTP STATUS ERROR 500 [...] >root cause >java.lang.NullPointerException [...] gnu.beanfactory.servlet.Dispatcher.dispatch(Dispatcher.java:58) org.apache.jsp.login_jsp._jspService(org.apache.jsp.login_jsp:101) [...] ___ Check-out GO.com GO get your free GO E-Mail account with expanded storage of 6 MB! http://mail.go.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: JSP compilation problem
Quite simply, you have an error in your JSP that is preventing the translated servlet from compiling. If you don't know where to look for the compiler output, then just go and manually compile the servlet. -Original Message- From: "Frank W. Zammetti"<[EMAIL PROTECTED]> To: "Tomcat User" Date: Thu Dec 30 06:53:31 PST 2004 Subject: JSP compilation problem [...] >HTTP Status 500 - >type Exception report >message >description The server encountered an internal error () that prevented >it from fulfilling this request. >exception >org.apache.jasper.JasperException: Unable to compile class for JSP [...] >root cause >Compile failed; see the compiler error output for details. [...] ___ Check-out GO.com GO get your free GO E-Mail account with expanded storage of 6 MB! http://mail.go.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Context not auto-reloading
I have the following context file in conf\Catalina\localhost, but get no reloading on change of webapp contents. Can someone point out what I'm doing wrong? ___ Check-out GO.com GO get your free GO E-Mail account with expanded storage of 6 MB! http://mail.go.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Multipe Tomcat instances
OK. I understand the separation point. I think as long as I can start separate instances by referencing a separate server.xml file, I'll do it that way. If I need to upgrade one web app, then I can split it out then. Thanks for the input. It's appreciated. -- On Wed, 2004-12-01 at 09:05, Shapira, Yoav wrote: > Hi, > Both Tim's and QM's approaches are viable, and I use them as well under > certain circumstances. But by default I just have completely separate > Tomcat installations. The only things they might share are the > hardware, OS, and JDK, depending on the requirements. So while the > CATALINA_BASE splitting is possible, I don't actually do it in practice. > > The motivation for me is complete separation, so that if one application > requires a Tomcat upgrade it can be done separately from others. But > then again I'm somewhat of a fanatic when it comes to webapp > self-containment. (Although it's served me well). - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Multipe Tomcat instances
On Mon, 2004-11-29 at 14:53, Shapira, Yoav wrote: > Hi, > I do it this way all the time. The biggest pro is complete separation. > If one app gets whacky (heavy load, OutOfMemoryError, malicious attack), > others are not affected at all. If one app needs to be upgraded or a > bug fix shipped, or its server restarted, again, others are not affected > at all. How do you handle the server.xml and the other configuration? Do you start Tomcat with an option to read a different config file, or do you have separate installations of Tomcat for each and every webapp? > Cons include inability to run these apps on the same port (this can be > overcome by putting a common front end, which I usually do with another > Tomcat running only the balancer app), and increased > monitoring/maintenance needed (which again can be mitigated with tools > like nagios). I'm not that familiar with the balancer app. Can you explain a little or is that pretty clear somewhere in the docs? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Multipe Tomcat instances
Does anyone have experience with setting up multiple instances of Tomcat instead of having multiple hosts being served under one instance? If anyone does, what are some pros and/or cons to doing things this way? Thanks. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: OutOfMemory exceptions
I read in another thread about setting up one Tomcat instance per host. Is that something you'd recommend doing? At least then a redeploy wouldn't affect other webapps running on that same host... Maybe this should be another thread if it gets much attention. -- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: OutOfMemory exceptions
On Tue, 2004-11-23 at 09:17, Shapira, Yoav wrote: > Yes and no. You are vastly oversimplifying the real world here. It's > extremely difficult to come up with a webapp that can truly be reloaded > without a memory loss. Would undeploying the webapp follow the same route (meaning some memory loss)? > No, I don't, because Java's heap cannot be split up that way without > incurring 1-2 orders of magnitude of overhead. I know of good profilers > and use them regularly, but none at this point can do the above in > production without bringing even huge systems to a crawl. What profilers do you use? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: OutOfMemory exceptions
On Tue, 2004-11-23 at 09:05, Shapira, Yoav wrote: > No, and such a decision could never be made. OK. So, reloading webapps should clean up items in memory consumed by that particular webapp, then? Do you know of a good memory profiler that can be run while webapps are up and return to me what each webapp is using? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
OutOfMemory exceptions
All: I've seen a few threads regarding the OutOfMemory problems. Has it been decided that reloading webapps is one of the causes of this? And, if so, would an undeploy and a new deploy fix that issue? Thanks. -- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: swallowOutput and catalina.out
Back at it... This is what I have in my log4j.properties file: # Set root logger priority to DEBUG and its appenders log4j.rootLogger=DEBUG, A1 # A1 PROPERTIES log4j.appender.A1=org.apache.log4j.DailyRollingFileAppender log4j.appender.A1.File=webapp.log log4j.appender.A1.DatePattern='.'-ww log4j.appender.A1.layout=org.apache.log4j.PatternLayout log4j.appender.A1.layout.ConversionPattern=%x - %d{ISO8601} [%t] %-5p %c - %m%n Shouldn't this stop messages going to the console (stderr or stdout)? Yet, I see all of this webapp's messages in catalina2004-11-19.txt inside the $TOMCAT/logs directory. Can someone point me to what I'm missing? Just to clarify, my goal is to get every piece of logged information to go to separate files, but everything from each webapp to its own log file. Thanks. -- On Wed, 2004-10-27 at 10:01, Shapira, Yoav wrote: > Hi, > > >Is there a link you can point me toward to get log4j going instead of > >catalina.out? > > > >If I implement that now, then I'll be good to go to move to Tomcat 5.5? > > Link: http://logging.apache.org/log4j. > Steps: > 1. Download log4j 1.2.8 .zip file > 2. Extract file wherever, take log4j-1.2.8.jar and put in WEB-INF/lib of > your webapp > 3. Write a log4j.properties file defining a file appender which writes > to logs/myapplog.txt (an example is provided in the log4j docs, both in > the short manual and in the PropertyConfigurator class JavaDoc). Put > this file in WEB-INF/classes. > > That's it. > > Yoav > > > > This e-mail, including any attachments, is a confidential business > communication, and may contain information that is confidential, proprietary > and/or privileged. This e-mail is intended only for the individual(s) to > whom it is addressed, and may not be saved, copied, printed, disclosed or > used by anyone else. If you are not the(an) intended recipient, please > immediately delete this e-mail from your computer system and notify the > sender. Thank you. > > > ----- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] -- Ryan Daly Network Administrator Concurrent Technologies Corporation 100 CTC Drive Johnstown, PA US 15904-1935(V) 814.269.6889 (F) 814.269.2685 91 3E E1 09 16 D1 5A 67 1A CA 16 C7 E0 C1 74 72 ftp.ctcgsc.org:/pub/PGP-keys/rd.asc
SSL mutual authentication problem with Tomcat5
Hello, I'm trying to have a standalone Java client communicate via SSL with a remote Tomcat5 server. I'm setting the two system properties for specifying the SSL trust store path and trust store password. The client is able to successfully communicate via SSL when Tomcat is configured to not require client-side authentication (for example in tomcat the configuration attribute 'clientAuth="false"' would be used). However, when I turn on this attribute and require client-side authentication, the client fails to communicate successfully with the Tomcat5 server. The following exception is generated: java.rmi.RemoteException: HTTP transport error: java.net.SocketException: Software caused connection abort: recv failed; nested exception is: HTTP transport error: java.net.SocketException: Software caused connection abort: recv failed at . Is there anything else that must occur on the client side when the remote web server requires a client-side certification authentication? I'm still new to SSL, so perhaps I have the basic concept confused. Do I have to import another certification in the client-side keystore for this to work? I looked in the SSL HOW-TO but didn't find an answer to my question. I also tried importing all of the certificates in the client keystore into the "cacerts" file in JAVA_HOME/jre/lib/security/cacerts. Here is the connector configuration for SSL in server.xml: Thank you for any help that you may be able to provide. -- Ryan
RE: swallowOutput and catalina.out
On Wed, 2004-10-27 at 09:55, Shapira, Yoav wrote: > Hi, > Yeah. System.out is for novices and small apps. Real apps need a real > logging toolkit. Is there a link you can point me toward to get log4j going instead of catalina.out? If I implement that now, then I'll be good to go to move to Tomcat 5.5? -- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: swallowOutput and catalina.out
You implemented log4j to log what usually goes into catalina.out? -- On Wed, 2004-10-27 at 09:34, Ben Souther wrote: > > > > This is how I did it before implementing log4j. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: swallowOutput and catalina.out
On Wed, 2004-10-27 at 09:27, Shapira, Yoav wrote: > Hi, > Hmm, I'm not sure if swallowOutput on the DefaultContext works. I've > only used it on a proper Context declaration. What Tomcat version are > you using? Sorry. That would've helped. It's Tomcat v5.0.28. If you're saying it should go in the Context, you're talking about conf/Catalina/hostname/webapp.xml, right? I do have it in there, as well. I have a few of one of my webapp's context config below: -- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
swallowOutput and catalina.out
All: Sorry if I've missed a thread regarding this. I have multiple web applications on a single instance of Tomcat. I want to get all of the logging that goes to catalina.out to go to the individual web app logs. I'm trying to use swallowOutput, but I'm not sure if I have it in the right spot. Something is obviously not configured properly because I still see output going to catalina.out. What I have is something like this: Is this anything close to what I should be doing? Does swallotOutput go somewhere else? Thanks. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: web.xml
Hi Schalk, You could probably use XML entities to do that, I haven't tried it but I think it would probably work ... Simple example: http://xmlwriter.net/xml_guide/entity_declaration.shtml web.xml example: http://www.adtmag.com/java/article.asp?id=5785 HTH, Ryan -Original Message- From: Schalk Neethling [mailto:[EMAIL PROTECTED] Sent: 11 August 2004 16:50 To: Tomcat Users List Subject: RE: web.xml Hey there everyone! When deploying a webapp on Tomcat I know that all of the webapp specific config stuff goes into web.xml but, I want to know if there is a way that one can create a seperate .xml file that will contain an application specific config information, for example my-app.xml. The situation I want to use in for is for example having a website that has some configuration information loaded into it's web.xml file. Then I want to integrate a seperate application(a cms system) into this application but I do not want to have to manually edit the 'root' applications web.xml and would rather want the cms's configuration contained in it's own .xml called something like cms.xml. Is this possible? -- Kind Regards Schalk Neethling Web Developer.Designer.Programmer.President Volume4.Development.Multimedia.Branding emotionalize.conceptualize.visualize.realize Tel: +27125468436 Fax: +27125468436 email:[EMAIL PROTECTED] web: www.volume4.co.za This message contains information that is considered to be sensitive or confidential and may not be forwarded or disclosed to any other party without the permission of the sender. If you received this message in error, please notify me immediately so that I can correct and delete the original email. Thank you. - 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: How do you set cache-control for static (gif, jpg) resources
Hi, You could write a servlet filter and only map it to those resources in web.xml Ryan -Original Message- From: Keith Bottner [mailto:[EMAIL PROTECTED] Sent: 30 July 2004 13:53 To: [EMAIL PROTECTED] Subject: How do you set cache-control for static (gif, jpg) resources I am trying to find out how I can set my static content for images, javascript and css to have a different cache-control setting. It appears that Tomcat always returns Cache-Control: no-cache with every response. I want to specify certain static resources such as gif and jpg to have Cache-Control: public,max-age=7200. Does anyone know how to configure Tomcat to do this? I have Googled everywhere with no luck! Keith - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomcat and PHP
I have PHP 3.x and Tomcat 4.x installed on a SLES box. What do I need to configure in Tomcat so that it knows what to do w/ .php files? Tomcat is acting as the webserver and not apache. thanks, ryan -- Ryan McCain Northrop Grumman Linux System Administrator 3 email: [EMAIL PROTECTED] Phone: 225.219.0556 Fax: 225.219.0540 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: JNDI / pooling
http://jakarta.apache.org/tomcat/tomcat-5.0-doc/jndi-resources-howto.html See the 'Adding Custom Resource Factories' section. Ryan. -Original Message- From: Viorel Dragomir [mailto:[EMAIL PROTECTED] Sent: 09 July 2004 13:12 To: Tomcat Users List Subject: JNDI / pooling Hi, I can't describe exactly the problem because I'm not familiar with all the terms... But the big picture is that I want to create a pool of ftp connections to work like a database connection and I want to get the connection from JNDI. So far I extended BaseKeyedPoolableObjectFactory and StackKeyedObjectPool and it works fine like this: FTPConnectionPool pool = new FTPConnectionPool(); String key = "key"; try{ FTPClient ftp = pool.borrowClient(key); if( ftp.sendNoOp() ){ System.out.println("OK"); }else{ System.out.println("NOPE"); } pool.returnClient( key, ftp ); }catch(Exception ex){ ex.printStackTrace(); } But I want to make it work from "JNDI" almost like a datasource InitialContext ctx = new InitialContext(); DataSource ds = (DataSource) ctx.lookup("java:comp/env/jdbc/backup"); Anyway I am completely lost if it can be done or not. So far I get an exception when I try to start Tomcat: GlobalResourcesLifecycleListener: Exception processing Global JNDI Resources javax.naming.NamingException: Could not create resource factory instance, null at org.apache.naming.factory.ResourceFactory.getObjectInstance(ResourceFactory. java:146) at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:301) at org.apache.naming.NamingContext.lookup(NamingContext.java:834) at org.apache.naming.NamingContext.lookup(NamingContext.java:194) regards, viorel - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: mod_jk2 ./configure problem/query
At 06:41 AM 5/07/2004 +0100, you wrote: I read your article before posting that question but I didn't realise it applied to my situation. Were you getting that error message when you ran ./configure ?? I did for a while. Then I found out the one in my path was the wrong version of apr-config. I had one in /usr/bin for memory and the other in /usr/local/apache/bin (the directory where I had installed Apache). I think at the time I went in and modified the config file and told it don't bother looking for it, which worked, but then later I blew that directory away and restarted everything from scratch. Interestingly the second time around it seemed to work fine... Which probably doesn't help you any. Cheers, Ryan. -- Ryan McConigley - Systems Administrator _.-, Computer Science University of Western Australia.--' '-._ Tel: (+61 8) 6488 7082 - Fax: (+61 8) 6488 1089 _/`- _ '. [EMAIL PROTECTED] - http://www.csse.uwa.edu.au/~ryan ''._`.. \ ` \; "You're just jealous because the voices are talking to me";_\ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: mod_jk2 ./configure problem/query
At 03:35 AM 5/07/2004 +0100, you wrote: I am having problems installing mod_jk2 and although I have not isolated what it is, one thing is worrying me. I have installed Apache 2.0.49 and Tomcat 5.0.25 (on Redhat 9) from source and they both run fine. When I run the command: ./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-apr-lib=/usr/lib --with-tomcat-41=/usr/local/tomcat --with-java-home=/usr/local/java --with- jni I get the following error: ./configure: line 1: apr-config: command not found I run the Linux "find" command and apr-config is indeed in /usr/lib (and two other places aswell) so why is it throwing that error message. I have discussed this problem with a couple of list members who have overcome installation issues themselves but they are using Fedora 2 or rpm installations of Apache. Do I actually need "--with-apr-lib=/usr/lib" ? (He asks in a novice type of way) Woohoo. A question I can answer. I had this problem about two weeks ago. Here is the weblink (thanks to [EMAIL PROTECTED]) I used to solve my problem --> http://cymulacrum.net/writings/tomcat5/a1375.html (needed to be modified slightly) And my own walk-through notes are here --> http://www.csse.uwa.edu.au/~ryan/tech/mod_jk2.html Essentially you need to add in one/some additional libraries into one of the make files. Just make sure you get the right library paths, but see the web pages for the details as I'm guessing its a system dependant thing. Cheers, Ryan. -- Ryan McConigley - Systems Administrator _.-, Computer Science University of Western Australia.--' '-._ Tel: (+61 8) 6488 7082 - Fax: (+61 8) 6488 1089 _/`- _ '. [EMAIL PROTECTED] - http://www.csse.uwa.edu.au/~ryan ''._`.. \ ` \; "You're just jealous because the voices are talking to me";_\ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Change to Port 80
Thanks for the response. Thats what I thought it was, and when I changed it previously, my browser just hangs and says "Waiting for connection" Any ideas? Thanks, Ryan >>> [EMAIL PROTECTED] 7/1/2004 3:56:49 PM >>> Ryan McCain wrote: > How do I configure Tomcat to run on port 80 as opposed to 8080? I > changed a few parameters in the xml config file, but nothing seemed to > have took. The element contains a "port" attribute. Shouldn't be hard to grep '8080' in server.xml and change it :-) -- Hassan Schroeder - [EMAIL PROTECTED] Webtuitive Design === (+1) 408-938-0567 === http://webtuitive.com dream. code. - 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]
Change to Port 80
How do I configure Tomcat to run on port 80 as opposed to 8080? I changed a few parameters in the xml config file, but nothing seemed to have took. OS=SUSE Linux Tomcat=4.x Thanks, Ryan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: What about Tomcat under java 1.5?
At 08:18 PM 30/06/2004 -0700, you wrote: Does it work any "faster"? Sun claims that 1.5 (aka 5.0) is "very efficient and robust"... Is that a load of bull? I couldn't say. I'm not a power user of it and at the same time we upgraded from 1.4 we upgraded the hardware and software of the machine, so it runs faster now, but I would expect it to just from the change in hardware alone. (A PIII 1G to a PIV 2.4G). Cheers, Ryan. -- Ryan McConigley - Systems Administrator _.-, Computer Science University of Western Australia.--' '-._ Tel: (+61 8) 6488 7082 - Fax: (+61 8) 6488 1089 _/`- _ '. [EMAIL PROTECTED] - http://www.csse.uwa.edu.au/~ryan ''._`.. \ ` \; "You're just jealous because the voices are talking to me";_\ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: What about Tomcat under java 1.5?
At 08:05 PM 30/06/2004 -0700, you wrote: Just wondering if people tried it . I have. Seems to work fine for me with no hassles. Cheers, Ryan. -- Ryan McConigley - Systems Administrator _.-, Computer Science University of Western Australia.--' '-._ Tel: (+61 8) 6488 7082 - Fax: (+61 8) 6488 1089 _/`- _ '. [EMAIL PROTECTED] - http://www.csse.uwa.edu.au/~ryan ''._`.. \ ` \; "You're just jealous because the voices are talking to me";_\ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Apache2, Tomcat5 and mod_jk2 configuration problems
At 12:16 PM 24/06/2004 +0800, you wrote: Hi Ryan, I should have asked this earlier, but are you using the RPM version of Apache or compiling the source tarball ? I notice that your directory is /usr/local, which indicates that you are probably using the source tarball (for RH9 rpms, it would be /etc/httpd). If you are using the source tarball, there are a LOT of things that are different. I believe you are missing a package, hence the gdbm error. I cannot recall at the moment what the name of the package is -- can you do a search on rpmfind ? Another thing: apxs is located inside /usr/local/httpd-2.0.49 -- just do a "find /usr/local/httpd-2.0.49 -name apxs" to locate it. Did you do a Minimal install for Red Hat ? You will need to ensure that you have the necessary packages installed. See this for a short list : http://cymulacrum.net/writings/tomcat5/c875.html#JK2_INTEGRATION_SETUP You probably don't need apr and apr-util because you installed Apache from source. As promised, here are my notes on installing mod_jk2 with Apache 2.0.49 and Tomcat 5.0.25. This is under RedHat 9.0 and the paths and things are a straight cut and paste from my system here, so may not match up for all accounts. Key problem I had was the libraries, once that was figured out it was some minor typos in the configuration files, and then its all up and going now. Cheers, Ryan. Notes --> mod_jk2 (tomcat connector) Download mod_jk2 http://apache.ausgamers.com/jakarta/tomcat-connectors/jk2/source/jakarta-tomcat-connectors-jk2-2.0.4-src.tar.gz Check the http://apache.ausgamers.com/jakarta/tomcat-connectors/jk2/ page for information/status on mod_jk2 Uncompress the archive gzip -dc jakarta-tomcat-connectors-jk2-2.0.4-src.tar.gz | tar -xvf - Compile cd to /usr/local/src/jakarta-tomcat-connectors-jk2-2.0.4-src/jk/native2 ./configure --with-apxs2=/usr/local/httpd/bin/apxs --with-apr-lib=/usr/lib --with-tomcat-41=/usr/local/tomcat --with-java-home=/usr/java/jdk --with-jni edit ./server/apache2/Makefile Find the block --> ifdef APR_LIBDIR_LA JK_LDFLAGS=-L${APACHE2_LIBDIR} -lcrypt else JK_LDFLAGS=-lcrypt ${APR_LIBS} endif And change it to this: ifdef APR_LIBDIR_LA JK_LDFLAGS=-L${APACHE2_LIBDIR} -lcrypt else JK_LDFLAGS=-lcrypt ${APR_LIBS} JK_LDFLAGS=-lcrypt ${APR_LIBS} -L/usr/local/httpd-2.0.49/lib -laprutil-0 -lgdbm -ldb-4.0 -lexpat endif Note the extra LDFLAGS --> JK_LDFLAGS=-lcrypt ${APR_LIBS} -L/usr/local/httpd-2.0.49/lib -laprutil-0 -lgdbm -ldb-4.0 -lexpat To know what flags to add, run apu-config --link-ld --libs That will output something like -L/usr/lib -laprutil-0 -lgdbm -lexpat Then check the version of apu-config. I discovered that I had two versions. One in /usr/bin and another in /usr/local/httpd/bin/ /usr/bin/apu-config --link-ld --libs -L/usr/lib -laprutil-0 -lgdbm -lexpat /usr/local/httpd/bin/apu-config --link-ld --libs -L/usr/local/httpd/bin -laprutil-0 -lgdbm -ldb-4.2 -lexpat When I tried adding the "-ldb-4.2" flag it didn't like it, so I did a bit of a search and tried -L/usr/local/httpd/bin -laprutil-0 -lgdbm -ldb-4.0 -lexpat instead which worked. (I think the path for db-4.2 may need to be added to my /etc/ld.so.conf file?) cd ../build/jk2/apache2 Run apxs /usr/local/httpd/bin/apxs -n jk2 -i mod_jk2.so Should see something like: [EMAIL PROTECTED] apache2]# /usr/local/httpd/bin/apxs -n jk2 -i mod_jk2.so /usr/local/httpd-2.0.49/build/instdso.sh SH_LIBTOOL='/usr/local/httpd-2.0.49/build/libtool' mod_jk2.so /usr/local/httpd-2.0.49/modules /usr/local/httpd-2.0.49/build/libtool --mode=install cp mod_jk2.so /usr/local/httpd-2.0.49/modules/ cp mod_jk2.so /usr/local/httpd-2.0.49/modules/mod_jk2.so Warning! dlname not found in /usr/local/httpd-2.0.49/modules/mod_jk2.so. Assuming installing a .so rather than a libtool archive. chmod 755 /usr/local/httpd-2.0.49/modules/mod_jk2.so Copy the created share object modules to the apache module di
Re: Apache2, Tomcat5 and mod_jk2 configuration problems
At 12:16 PM 24/06/2004 +0800, you wrote: Hi Ryan, I should have asked this earlier, but are you using the RPM version of Apache or compiling the source tarball ? I notice that your directory is /usr/local, which indicates that you are probably using the source tarball (for RH9 rpms, it would be /etc/httpd). If you are using the source tarball, there are a LOT of things that are different. I believe you are missing a package, hence the gdbm error. I cannot recall at the moment what the name of the package is -- can you do a search on rpmfind ? Another thing: apxs is located inside /usr/local/httpd-2.0.49 -- just do a "find /usr/local/httpd-2.0.49 -name apxs" to locate it. Did you do a Minimal install for Red Hat ? You will need to ensure that you have the necessary packages installed. See this for a short list : http://cymulacrum.net/writings/tomcat5/c875.html#JK2_INTEGRATION_SETUP You probably don't need apr and apr-util because you installed Apache from source. I just got it working. I had installed it from source, was a library problem. Just writing up my documentation at the moment. I'll send you a copy of that when I'm done. Cheers, Ryan. -- Ryan McConigley - Systems Administrator _.-, Computer Science University of Western Australia.--' '-._ Tel: (+61 8) 6488 7082 - Fax: (+61 8) 6488 1089 _/`- _ '. [EMAIL PROTECTED] - http://www.csse.uwa.edu.au/~ryan ''._`.. \ ` \; "You're just jealous because the voices are talking to me";_\ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Apache2, Tomcat5 and mod_jk2 configuration problems
At 10:09 PM 23/06/2004 +0800, you wrote: Hi Ryan, It sounds like an error similar to one Andrew Clute encountered on Red Hat Enterprise Linux 3 (apr_md5_final). I transcribed some of the steps he took here : http://cymulacrum.net/writings/tomcat5/a1375.html Can you test it first ? If it works, I would like to add a comment to the document that says that the steps apply to Red Hat 9 as well. Regards, pascal chong Thanks for that. I gave that a whirl, putting in the extra library and that solved the problem of the "undefined symbol apr_md5_final" error, but now I'm getting the following error instead: INFO: APR not loaded, disabling jni components: java.io.IOException: java.lang.UnsatisfiedLinkError: /usr/local/httpd-2.0.49/modules/jkjni.so: /usr/local/httpd-2.0.49/lib/libaprutil-0.so.0: undefined symbol: gdbm_errno Which would appear that that linked library isn't correct. Any hints? Ryan McConigley wrote: Greetings, I have a problem. I am trying to get Tomcat (5.0.25), Apache (2.0.49) and mod_jk2 (2.0.4) all to talk to each other under RedHat 9.0. So far I can get Apache up and working on port 80 and Tomcat works fine on port 8080. However, my users want to be able to use .jsp pages on their virtual hosts. I did have it working fine on the old machine we had (Redhat 7.3, Apache 1.3, Tomcat 4 and mod_jk) but we upgraded and now its not working. One thing I have noticed is when Tomcat starts up there is the message: INFO: APR not loaded, disabling jni components: java.io.IOException: java.lang.UnsatisfiedLinkError: /usr/local/httpd-2.0.49/modules/jkjni.so: /usr/local/httpd-2.0.49/modules/jkjni.so: undefined symbol: apr_md5_final I assumed I was getting this because Apache was not compilied in with apr support, so I recompiled it with --with-apr and --with-apr-util. Apache still works, but when I tried to recompile mod_jk2 it tells me now that my apxs can not be found, even though prior it was finding it ok and its quite clearly in the location specified. I'm not sure if that is a critical error or not or how to overcome it. I have been trying different compile options, but still not getting much luck. When you click on a .jsp page, all that happens is the browser just sits there continually loading. In the tomcat logs you get a line which says "INFO: No next" and thats it. Can anyone shed some light on my problem, before I do physical harm to the box in question. The configuration files are as follows: Also, can I have .jsp files enabled for some virtual servers and not for others, or is it an all or nothing affair? <*snip*> -- Ryan McConigley - Systems Administrator _.-, Computer Science University of Western Australia.--' '-._ Tel: (+61 8) 6488 7082 - Fax: (+61 8) 6488 1089 _/`- _ '. [EMAIL PROTECTED] - http://www.csse.uwa.edu.au/~ryan ''._`.. \ ` \; "You're just jealous because the voices are talking to me";_\ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Apache2, Tomcat5 and mod_jk2 configuration problems
JkUriSet info "Map the Tomcat docs to the Web server uri space" # -- -- jk2.properties # jk2.properties # Configured for chennel UNIX # Set the desired handler list handler.list=spr,requiest,chennelUnix # UNIX Domain socket location chennelUnix.file=/usr/local/tomcat/work/jk2.socket # Dynamic library serverRoot=/etc/httpd apr.NativeSo=/usr/local/httpd/modules/jkjni.so --- --server.xml debug="0"/> debug="0"/> factory org.apache.catalina.users.MemoryUserDatabaseFactory pathname conf/tomcat-users.xml directory="logs" prefix="localhost_log." suffix=".txt" timestamp="true"/> --> --- -- Ryan McConigley - Systems Administrator _.-, Computer Science University of Western Australia .--' '-._ Tel: (+61 8) 6488 7082 - Fax: (+61 8) 6488 1089 _/`- _ '. [EMAIL PROTECTED] - http://www.csse.uwa.edu.au/~ryan ''._`.. \ ` \; "You're just jealous because the voices are talking to me";_\ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat 4.1.24 stops responding due to attack
Hi, It may not be an 'attack' ... probably just due to RH9s threading lib ... See this message for the possible solution: http://marc.theaimsgroup.com/?l=tomcat-user&m=108670043100516&w=2 Also see the following messages for further explanations: http://marc.theaimsgroup.com/?l=tomcat-user&w=2&r=1&s=tomcat+jitters%2C+then +hangs+-+please+help&q=b HTH, Ryan. -Original Message- From: Kedar [mailto:[EMAIL PROTECTED] Sent: 22 June 2004 05:09 To: [EMAIL PROTECTED] Subject: Tomcat 4.1.24 stops responding due to attack Hi, I am facing following problem : Problem : After working properly for a day or 2, I cannot access my website. Only way to restart is kill the process and again run "startup.sh". I cannot stop normally using "shutdown.sh" Configuration : Red Hat Linux release 9 (Shrike), Tomcat 4.1.24, Postgres 7.3.4 Points Checked - 1. The tomcat is not down, I can see process by "ps -ef" 2. However, as a result of "netstat -tcp" I am getting some unknown users accessing my "mysqld". Under normal working conditions I can recognise the IP address and accessed processes listed under "netstat -tcp" Actually I am not using "mysql" at all. No other application on server is using mysqld. 3. The default Apache 80 port can be accessed normally(Tomcat is running on 8080). 4. I have changed the port to 8081, but problem persists. Is it that someone is making lot of fake connections to slow down my tomcat, or am I infected by virus? Any hint or pointer will be appreciated. Regards, Kedar - 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]
please...
Please take me off this list. I am not very computer literate and my email is being accosted with things that do not pertain to me. I realize that this is all my fault but would like to stop receiving all of these emails from the mailing list. I am simply a rep for acs, international that would like to be able to view her leads online like I was able to a couple of days ago. Sorry about the inconvenience. Sincerely, ryan deneveu [EMAIL PROTECTED] Why Wait? Move to EarthLink.
RE: tomcat hangs
Hi Matt, See this message for the probable solution: http://marc.theaimsgroup.com/?l=tomcat-user&m=108670043100516&w=2 Also see the following messages for further explanations: http://marc.theaimsgroup.com/?l=tomcat-user&w=2&r=1&s=tomcat+jitters%2C+then +hangs+-+please+help&q=b HTH, Ryan. -Original Message- From: Matt Tucker [mailto:[EMAIL PROTECTED] Sent: 09 June 2004 16:41 To: Tomcat Users List Subject: tomcat hangs Hello, I know I've seen this issue discussed in a lot of places but I've yet to see a definitive solution. Here's our problem: we are running three instances of tomcat on our server. Two of them are running live webapps for two clients and one is for development. One app has been running for about a month and has been "hanging" (not accepting requests) more and more frequently (it's happening at least once a day). The second app has been running for a couple weeks and did not hang at first but has started to hang once in awhile and it appears to be happening more frequently. This does not seem to be related to usage as neither app is getting a lot of traffic when they go down. Here's our setup: Red Hat Linux 9 Apache 2.0.49 Tomcat 5.0.19 Java 1.4.2 we are using mod_proxy to forward requests from apache to tomcat. It went down this morning and we did a thread dump as was suggested elsewhere and couldn't find anything that was suspect. There is nothing in catalina.out to indicate why this is happening. Someone here suggested that perhaps it has something to do with writing to catalina.out. This is legacy code and catalina.out is used for logging. The previous developers are logging every single SQL statement to catalina.out. This file is getting very, very large. Could this have anything to do with it? Any help on this would be greatly appreciated as our customers are getting more and more annoyed. Thanks. Matt Tucker thoughtbot cell: 617 775 0742 office: 617 876 4780 www.thoughtbot.com - 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: Tomcat 5.0.x deadlock
It is more than likely a problem with the NPTL stuff that was included in RedHat 9. Setting the LD_ASSUME_KERNEL environment variable to 2.4.1 will probably fix your problem, so in /etc/profile (or equivalent) add: export LD_ASSUME_KERNEL=2.4.1; There are plenty of details about this in the archives ... Ryan. -Original Message- From: Stefano Lissa [mailto:[EMAIL PROTECTED] Sent: 08 June 2004 14:07 To: Tomcat Users List Subject: Re: Tomcat 5.0.x deadlock Ryan Lissack wrote: >Hi, > >Does Tomcat stop responding on both RedHat 8 and RedHat 9 or just the one on >RedHat 9 ? > > sorry Ryan, just a mistake, they both are RedHat 9 (Shrike)... at least a common element... Thank you. Stefano. -- Email.it, the professional e-mail, gratis per te: http://www.email.it/f Sponsor: Alimentazione biologica, fanghi di Guam, aloe vera, * prodotti di bellezza Erbolario. Dove? Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=1305&d=8-61533&d=8-6 - 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: Tomcat 5.0.x deadlock
Hi, Does Tomcat stop responding on both RedHat 8 and RedHat 9 or just the one on RedHat 9 ? Ryan. -Original Message- From: Stefano Lissa [mailto:[EMAIL PROTECTED] Sent: 08 June 2004 13:31 To: Tomcat Users List Subject: Tomcat 5.0.x deadlock Hi, this my situation: two indipendent servers, the first with red hat 8, jdk 1.4.1, tomcat 5.0.16, no connectors, no Apache. The second with red hat 9, jdk 1.4.2_04, tomcat 5.0.19, no Apache. Randomly I find Tomcat stop responding: no CPU load, no JVM activity, no information on catalina.out and localhost_log. No one web app respond, even the manager is not accessible. This situattion is not connected to a high load, on a server I have no high load at all. It seems a server deadlock... the only way to recover is to restart tomcat. Same situation? Some ideas? I haven't changed tomcat jars, they are clean installations. Can I setup Tomcat on a way to track what happen? Thank you. Bye, Stefano. -- Email.it, the professional e-mail, gratis per te: http://www.email.it/f Sponsor: Natsabe.it la più grande erboristeria online italiana * prezzi bassi tutto l'anno ! Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=1298&d=8-6it/cgi-bin/foclick.cgi ?mid=1306&d=8-6 - 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]
Custom Authenticator for Flash Remoting?
I am writing a custom authenticator for flash remoting. Flash remoting uses a binary message format that is stored in the request body, and it has its own credentials header in the message. That means I have to read the body from the inputstream in the authenticator to retrieve the credentials, but the gateway Servlet that actually processes the message also needs to read the message from the request body. Is there any way to wrap the HttpRequest from an authenticator so I can read the input stream in a buffer and hand a buffered input stream on for the Servlet to process? I tried to override the invoke method of Authenticator hoping that I could wrap the request from there and then call super to hand it along to AuthenticatorBase, but this threw an exception. Any Ideas? --Ryan
Re: Re: Tomcat 4.1.30 HTTP->HTTPS redirect problem (second attempt)
Ah, thanks! I'll have to go with option 2 as I'm pretty well tied to Tomcat 4 and I have to develop toward IE. -Original Message- From: "Bill Barker"<[EMAIL PROTECTED]> To: [EMAIL PROTECTED] Date: Sat Jun 05 21:47:40 PDT 2004 Subject: Re: Tomcat 4.1.30 HTTP->HTTPS redirect problem (second attempt) >This is a pretty well known bug in MSIE. The short version is that that TC >4.1.x sends two redirects to get you to the login page, and MSIE gets >confused. The options to get around this are: >1) Don't use MSIE. >2) Use the default SSL port (e.g. 443). >3) Use TC 5.0.x instead of TC 4.1.x. > >"Ryan Stewart" <[EMAIL PROTECTED]> wrote in message >news:[EMAIL PROTECTED] >> I posted a question about this about a week ago, but haven't seen any >reply. >> >> I've set up Tomcat 4.1.30 for secure access via SSL. Unsecure port is >8080, secure port is 8081. I use Tomcat for J2EE application development, >and the problem is related to that. Using basic authentication, things work >fine. When I move from an unsecure to a secure area of my application, the >dialog box pops up and upon entering the correct user/password, I'm >redirected to the secure port. However, if I change to form based >authentication, when trying to send me to the login form, it sends me to the >unsecure port using https. In other words: >> https://localhost:8080/secureApp/login.jsp >> >> It should be sending me to 8081. Any clue why this would happen? Snippets >from my connectors in server.xml are below. If you need other info, just >ask. >> >> > port="8080" ... redirectPort="8081" scheme="http" secure="false" ...> >> > className="org.apache.catalina.net.DefaultServerSocketFactory"/> >> >> > port="8009" ... redirectPort="8081" scheme="http" secure="false" ... > >> > className="org.apache.catalina.net.DefaultServerSocketFactory"/> >> >> > port="8081" ... scheme="https" secure="true"> >> > clientAuth="false" keystoreFile=".keystore" protocol="TLS"/> >> ___ Check-out GO.com GO get your free GO E-Mail account with expanded storage of 6 MB! http://mail.go.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Re: Tomcat 4.1.30 HTTP->HTTPS redirect problem (second attempt)
No, you misunderstand. Port 8080 is the unsecure port, so trying to access it with https gives a "cannot find server" error. That's my problem. For some reason, the server is trying to redirect to an unsecure port using a secure protocol, which doesn't work. -Original Message- From: "Ariel Valentin"<[EMAIL PROTECTED]> To: [EMAIL PROTECTED] Date: Sat Jun 05 19:01:31 PDT 2004 Subject: Re: Tomcat 4.1.30 HTTP->HTTPS redirect problem (second attempt) >What is happening once you are logged in? >Does it continue to use the secure protocol on port 8080? >https://localhost:8080/ > >Mr. Ariel S. Valentin >mailto: [EMAIL PROTECTED] > > > > >>From: Ryan Stewart <[EMAIL PROTECTED]> >>Reply-To: "Tomcat Users List" <[EMAIL PROTECTED]> >>To: [EMAIL PROTECTED] >>Subject: Tomcat 4.1.30 HTTP->HTTPS redirect problem (second attempt) >>Date: Fri, 4 Jun 2004 20:24:52 -0700 (PDT) >> >>I posted a question about this about a week ago, but haven't seen any >>reply. >> >>I've set up Tomcat 4.1.30 for secure access via SSL. Unsecure port is 8080, >>secure port is 8081. I use Tomcat for J2EE application development, and the >>problem is related to that. Using basic authentication, things work fine. >>When I move from an unsecure to a secure area of my application, the dialog >>box pops up and upon entering the correct user/password, I'm redirected to >>the secure port. However, if I change to form based authentication, when >>trying to send me to the login form, it sends me to the unsecure port using >>https. In other words: >>https://localhost:8080/secureApp/login.jsp >> >>It should be sending me to 8081. Any clue why this would happen? Snippets >>from my connectors in server.xml are below. If you need other info, just >>ask. >> >>>port="8080" ... redirectPort="8081" scheme="http" secure="false" ...> >> >className="org.apache.catalina.net.DefaultServerSocketFactory"/> >> >>>port="8009" ... redirectPort="8081" scheme="http" secure="false" ... > >> >className="org.apache.catalina.net.DefaultServerSocketFactory"/> >> >>>port="8081" ... scheme="https" secure="true"> >> >clientAuth="false" keystoreFile=".keystore" protocol="TLS"/> >> ___ Check-out GO.com GO get your free GO E-Mail account with expanded storage of 6 MB! http://mail.go.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: value for useBean class attribute invalid
-Original Message- From: "Ben"<[EMAIL PROTECTED]> To: [EMAIL PROTECTED] Date: Fri Jun 04 18:59:40 PDT 2004 Subject: value for useBean class attribute invalid >Hi there, > >I'm trying to set up a simple beans backed jsp application. I set up >everything, the bean compiles, the context for the web app is set. *snip* >package my.packages; > >public class PrimitiveBean implements java.io.Serializable >{ > String content = "PrimitiveBean says hi!"; > > PrimitiveBean() { > } > *snip* One problem I see is that your constructor isn't public, therefore the bean can't be instantiated by any class outside the package it is in. If that's not the problem, I'd make doubly sure your WEB-INF folder is being picked up correctly. ___ Check-out GO.com GO get your free GO E-Mail account with expanded storage of 6 MB! http://mail.go.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomcat 4.1.30 HTTP->HTTPS redirect problem (second attempt)
I posted a question about this about a week ago, but haven't seen any reply. I've set up Tomcat 4.1.30 for secure access via SSL. Unsecure port is 8080, secure port is 8081. I use Tomcat for J2EE application development, and the problem is related to that. Using basic authentication, things work fine. When I move from an unsecure to a secure area of my application, the dialog box pops up and upon entering the correct user/password, I'm redirected to the secure port. However, if I change to form based authentication, when trying to send me to the login form, it sends me to the unsecure port using https. In other words: https://localhost:8080/secureApp/login.jsp It should be sending me to 8081. Any clue why this would happen? Snippets from my connectors in server.xml are below. If you need other info, just ask. ___ Check-out GO.com GO get your free GO E-Mail account with expanded storage of 6 MB! http://mail.go.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
mod_JK2 static installation problem
I've been trying to install the mod_jk 2 module statically into Apache version 2.0.49 using the directions on the Jakarta site but continue to have a failed install requesting that I configure Apache before installing mod_jk. However if I install apache first it doesn't install mod_jk statically. Below is the directions from the site followed by the pertinent parts of my make file. Any help on the subject would be appreciated. I've looked around and mostly find that people use the so module way of installing. Thanks, Ryan Peterson --- /home/apache20/httpd-2.0.43 is the directory where the httpd-2.0 sources are located. [EMAIL PROTECTED] ~ $ ./configure --with-apache=/home/apache20/httpd-2.0.43 [EMAIL PROTECTED] ~ $ make Install the mod_jk library and other files in /home/apache20/httpd-2.0.43/modules: [EMAIL PROTECTED] ~ $ make install It is not possible to configure Apache directly because the config.m4 of mod_jk must be added to the configure of httpd-2.0. [EMAIL PROTECTED] ~ $ cd /home/apache20/httpd-2.0.43 [EMAIL PROTECTED] ~ $ sh buildconf [EMAIL PROTECTED] ~ $ configure ... --with-mod_jk [EMAIL PROTECTED] ~ $ make [EMAIL PROTECTED] ~ $ make install --- APACHEV=2.0.49 JKV=2.0.4 OBJ=/usr/local/ SRC=/home/jgordon/toinstall/ STAGE=$(SRC)stage/ APACHE=httpd-$(APACHEV) APACHEO=$(OBJ)$(APACHE) apache: $(APACHEO)/bin/httpd >apache $(APACHEO)/bin/httpd: httpd-$(APACHEV).tar.gz openssl jakarta-tomcat-connectors-jk2-src-current.tar.gz cd $(STAGE); tar xzf $(SRC)httpd-$(APACHEV).tar.gz; \ cd $(STAGE); tar xzf $(SRC)jakarta-tomcat-connectors-jk2-src-current.tar.gz; \ cd jakarta-tomcat-connectors-jk2-$(JKV)-src/jk/native2; pwd; echo "cd done"; \ ./buildconf.sh; pwd; echo "buildconf done"; \ ./configure --with-apache2=${STAGE}${APACHE}; pwd; echo "configure done"; \ make; pwd; echo "make1 done"; \ make install; pwd; echo "make2 done"; \ cd $(STAGE)httpd-$(APACHEV); \ sh buildconf; \ ./configure --prefix=$(APACHEO) --enable-ssl --with-mod_jk --enable-rewrite; \ make; \ make install - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Secure web.xml and WEB-INF
-Original Message- From: "Bond, James Bond"<[EMAIL PROTECTED]> To: "Tomcat Users List"<[EMAIL PROTECTED]> Date: Sun May 30 22:40:16 PDT 2004 Subject: Secure web.xml and WEB-INF >Hello. Please, give me some tips how to secure (deny for reading in >browser) access to web.xml and WEB-INF folder? Any suggestions are welcome:) >Thanks > WEB-INF is inaccessible to the client as per the Java Servlet Specification. ___ Check-out GO.com GO get your free GO E-Mail account with expanded storage of 6 MB! http://mail.go.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Secure web.xml and WEB-INF
-Original Message- From: "Bond, James Bond"<[EMAIL PROTECTED]> To: "Tomcat Users List"<[EMAIL PROTECTED]> Date: Sun May 30 22:40:16 PDT 2004 Subject: Secure web.xml and WEB-INF >Hello. Please, give me some tips how to secure (deny for reading in >browser) access to web.xml and WEB-INF folder? Any suggestions are welcome:) >Thanks > WEB-INF is inaccessible to the client as per the Java Servlet Specification. ___ Check-out GO.com GO get your free GO E-Mail account with expanded storage of 6 MB! http://mail.go.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Secure web.xml and WEB-INF
-Original Message- From: "Bond, James Bond"<[EMAIL PROTECTED]> To: "Tomcat Users List"<[EMAIL PROTECTED]> Date: Sun May 30 22:40:16 PDT 2004 Subject: Secure web.xml and WEB-INF >Hello. Please, give me some tips how to secure (deny for reading in >browser) access to web.xml and WEB-INF folder? Any suggestions are welcome:) >Thanks > WEB-INF is inaccessible to the client as per the Java Servlet Specification. ___ Check-out GO.com GO get your free GO E-Mail account with expanded storage of 6 MB! http://mail.go.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomcat 4.1.30 SSL redirect half working
This is my first time using a mailing list, so hopefully I'm doing this right. I assume the same basic rules as usenet--text only, no attachments, bottom post, etc? Okay, my problem: I've set up Tomcat 4.1.30 for secure access via SSL. Unsecure port is 8080, secure port is 8081. I use Tomcat for J2EE application development, and the problem is related to that. Using basic authentication, things work fine. When I move from an unsecure to a secure area of my application, the dialog box pops up and upon entering the correct user/password, I'm redirected to the secure port. However, if I change to form based authentication, when trying to send me to the form, it sends me to the unsecure port using https. In other words: https://localhost:8080/secureApp/login.jsp It should be sending me to 8081. Any clue why this would happen? My connectors in server.xml are below. If you need other info, just ask. ___ Check-out GO.com GO get your free GO E-Mail account with expanded storage of 6 MB! http://mail.go.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat Hung!!! Help needed
Hi Emerson, Yep, for some reason I did think you were the original poster ;) I do not think there would be any benefit by setting this in your case. Regards, Ryan. -Original Message- From: Emerson Cargnin [mailto:[EMAIL PROTECTED] Sent: 25 May 2004 18:10 To: Tomcat Users List Subject: Re: Tomcat Hung!!! Help needed actually, my problem is memory consuming, I think you thought I had questioned first :) I'm using suse 9.1, does this export help in something in my case? thaks Emerson Ryan Lissack wrote: > Hi, > > Yes it will more than likely fix your problem. It is a problem with RedHat > 9 and NPTL. Search the archives for further information. > > Also you are probably better off using the following: > > export LD_ASSUME_KERNEL=2.4.1 > > Ryan. > > > -Original Message- > From: Emerson Cargnin [mailto:[EMAIL PROTECTED] > Sent: 25 May 2004 17:28 > To: Tomcat Users List > Subject: Re: Tomcat Hung!!! Help needed > > > my kernel is 2.4.21-99, does help using this export? :) > > > Zsolt Koppany wrote: > >>Did you try: >> >>export LD_ASSUME_KERNEL=2.2.5 >> >>... start tomcat now >> >>Zsolt >> >> >> >>>-Original Message- >>>From: Innovest Ken [mailto:[EMAIL PROTECTED] >>>Sent: Tuesday, May 25, 2004 6:08 AM >>>To: [EMAIL PROTECTED] >>>Subject: Tomcat Hung!!! Help needed >>> >>> >>>hello all, >>> >>>Currently, I have Tomcat 4.1.30 running on Linux >>>Redhat 9, using jdk 1.4.2_03. It is now running live >>>and every day it will hang at least once. We are >>>unable to see any error message in the log file. The >>>site is having a hit of 20 request per second with >>>most of the requests need the database connection. >>> >>>I did a thread dump before the tomcat hangs, but it is >>>too big to be displayed here. >>> >>>I can post any more info upon request. Any help??? >>>Thanks >>> >>>Here is part of the server.xml: >>> >>>>>className="org.apache.coyote.tomcat4.CoyoteConnector" >>>acceptCount="150" bufferSize="2048" compression="off" >>>connectionLinger="-1" connectionTimeout="2" >>>connectionUploadTimeout="30" debug="0" >>>disableUploadTimeout="true" enableLookups="false" >>>maxKeepAliveRequests="100" maxProcessors="150" >>>minProcessors="50" port="80" >>>protocolHandlerClassName="org.apache.coyote.http11.Http11Protocol" >>>proxyPort="0" redirectPort="8443" scheme="http" >>>secure="false" serverSocketTimeout="0" >>>tcpNoDelay="true" useURIValidationHack="false"> >>> >>className="org.apache.catalina.net.DefaultServerSocketFactory" >>>/> >>> >>> >>>innovest >>> >>> >>> >>> >>> >>>__ >>>Do you Yahoo!? >>>Friends. Fun. Try the all-new Yahoo! Messenger. >>>http://messenger.yahoo.com/ >>> >>>- >>>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] >> >> > > > -- Emerson Cargnin Analista de Sistemas Setor de Desenvolvimento de Sistemas - TRE-SC tel : (048) - 251-3700 - Ramal 3181 - 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: Tomcat Hung!!! Help needed
Hi, Yes it will more than likely fix your problem. It is a problem with RedHat 9 and NPTL. Search the archives for further information. Also you are probably better off using the following: export LD_ASSUME_KERNEL=2.4.1 Ryan. -Original Message- From: Emerson Cargnin [mailto:[EMAIL PROTECTED] Sent: 25 May 2004 17:28 To: Tomcat Users List Subject: Re: Tomcat Hung!!! Help needed my kernel is 2.4.21-99, does help using this export? :) Zsolt Koppany wrote: > Did you try: > > export LD_ASSUME_KERNEL=2.2.5 > > ... start tomcat now > > Zsolt > > >>-Original Message- >>From: Innovest Ken [mailto:[EMAIL PROTECTED] >>Sent: Tuesday, May 25, 2004 6:08 AM >>To: [EMAIL PROTECTED] >>Subject: Tomcat Hung!!! Help needed >> >> >>hello all, >> >>Currently, I have Tomcat 4.1.30 running on Linux >>Redhat 9, using jdk 1.4.2_03. It is now running live >>and every day it will hang at least once. We are >>unable to see any error message in the log file. The >>site is having a hit of 20 request per second with >>most of the requests need the database connection. >> >>I did a thread dump before the tomcat hangs, but it is >>too big to be displayed here. >> >>I can post any more info upon request. Any help??? >>Thanks >> >>Here is part of the server.xml: >> >>>className="org.apache.coyote.tomcat4.CoyoteConnector" >>acceptCount="150" bufferSize="2048" compression="off" >>connectionLinger="-1" connectionTimeout="2" >>connectionUploadTimeout="30" debug="0" >>disableUploadTimeout="true" enableLookups="false" >>maxKeepAliveRequests="100" maxProcessors="150" >>minProcessors="50" port="80" >>protocolHandlerClassName="org.apache.coyote.http11.Http11Protocol" >>proxyPort="0" redirectPort="8443" scheme="http" >>secure="false" serverSocketTimeout="0" >>tcpNoDelay="true" useURIValidationHack="false"> >> >className="org.apache.catalina.net.DefaultServerSocketFactory" >>/> >> >> >>innovest >> >> >> >> >> >>__ >>Do you Yahoo!? >>Friends. Fun. Try the all-new Yahoo! Messenger. >>http://messenger.yahoo.com/ >> >>- >>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] > > -- Emerson Cargnin Analista de Sistemas Setor de Desenvolvimento de Sistemas - TRE-SC tel : (048) - 251-3700 - Ramal 3181 - 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: session data in Tomcat 5
Hi, >> I've included that, and other tips, in my (brief) 4.x -> 5.x upgrade >> guide: >> http://www.brandxdev.net/misc/tomcat_upgrade.site Thanks for making that available, quite useful. Regards, Ryan. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat having strange 'hickups'
Hi, If it is running on a machine with multiple CPUs, you can use the concurrent collector. The collector then runs on one of the CPUs while the application continues to run on the others, the other threads will still be suspended for a short period (during the marking phase) but it can be an improvement. Note that there is a trade-off in that the collection will typically take longer. First things first though, you should tune the size of the total heap and, importantly, the size of your young generation. This has a very large impact on garbage collection performance. You will of course have to profile you app and test extensively to find the best settings for your application. I found the following links to be helpful: http://ph.sun.com/events/presentation/files/java_tech_day/hotspotperformance .pdf http://www1.sitraka.com/JUG/meetings/presentations/sep02/JUG%20Sept%202002.P PT http://java.sun.com/docs/hotspot/PerformanceFAQ.html http://www.javaperformancetuning.com/news/qotm026.shtml http://www.run.montefiore.ulg.ac.be/~skivee/java-perf/j2se141-gc-options.php http://java.sun.com/developer/technicalArticles/Programming/GCPortal/ http://java.sun.com/docs/hotspot/gc1.4.2/index.html http://java.sun.com/developer/technicalArticles/Programming/turbo/ http://www.javaworld.com/javaworld/jw-03-2003/jw-0307-j2segc.html http://performance.netbeans.org/reports/gc/ http://www.tagtraum.com/ http://jakarta.apache.org/tomcat/articles/performance.pdf Regards, Ryan. -Original Message- From: Wojciech Sobczuk [mailto:[EMAIL PROTECTED] Sent: 13 May 2004 17:51 To: Tomcat Users List Subject: Re: Tomcat having strange 'hickups' It is possible. Any nice website about tuning the garbage collector? How to make it so it seamlessly works in the background and does not halt the whole server? Best reagards, Wojtek Michiel Toneman wrote: > > Are you sure this isn't related to heavy garbage collection in the JVM? > > jvmstat has some good tools to monitor memory usage an garbage > collection in your app. > > Michiel > > Wojciech Sobczuk wrote: > >> Hello, >> >> I'm running Tomcat 5.0.18 on RedHat 9, started with the following >> commandline: >> /usr/java/j2sdk1.4.2_01//bin/java -Xmx256m -server >> -Djava.endorsed.dirs=/usr/java/jakarta-tomcat/common/endorsed >> -classpath >> /usr/java/j2sdk1.4.2_01//lib/tools.jar:/usr/java/jakarta-tomcat/bin/bootstra p.jar:/usr/java/jakarta-tomcat/bin/commons-logging-api.jar >> -Dcatalina.base=/usr/java/jakarta-tomcat >> -Dcatalina.home=/usr/java/jakarta-tomcat >> -Djava.io.tmpdir=/usr/java/jakarta-tomcat/temp >> org.apache.catalina.startup.Bootstrap start >> >> and with development=false and fork=true in the jsp servlet >> configuration. >> >> This installation is serving around 20 hits per day, much of it >> is DB intensive. Before i set development=false and fork=true I had >> big hangups when I changed the JSPs and Tomcat started recompiling >> them - the whole engine practically stopped for a few minutes and the >> load went up to 16 on the server. Now development and fork variables >> are set correctly for deployment, but I am still having a strange >> problem. Every now and then (probably every few hours, I can't tell >> exactly) Tomcat stops for around 20 seconds. I noticed it when >> browsing one of my sites, everything was working fast, and then at a >> certain point, after I clicked on a link, the browser started >> connecting to the server and waited for the response for a long >> time. When I checked the load on the box it was 1-2 (normally it's >> 0.5), but didn't notice any processes hogging the CPU with 'top'. I >> already fixed all DB connection leaks I had so that can't be the >> issue here. Traffic peaks can't be it either, I have constant traffic. >> >> I know that this isn't a precise description of the error I'm >> encountering but I don't have any more information at this point. >> I'm hoping that someone encountered this already and can help me, or >> perhaps you can give me directions how to figure out what's wrong. >> >> Best regards, >> W. Sobczuk >> >> >> - >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> > > -- Wojciech Sobczuk [EMAIL PROTECTED] +48 501 456 923 - 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: Tomcat 4.1 HttpServletRequest.getServerPort() returns incorre ct port ?
Hi Bill, Thanks for the clarification. Best regards, Ryan. -Original Message- From: news [mailto:[EMAIL PROTECTED] Behalf Of Bill Barker Sent: 12 May 2004 07:22 To: [EMAIL PROTECTED] Subject: Re: Tomcat 4.1 HttpServletRequest.getServerPort() returns incorrect port ? "Ryan Lissack" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi, > > In our setup we have a hardware load-balancer which forwards normal requests > to our cluster of Tomcat servers. For SSL requests, the load balancer first > forwards to an hardware SSL accelerator and then on to one of our Tomcat > servers. Each Tomcat instance has 2 connectors configured. > > For normal requests, clients connect to load balancer on port 80 and the > load balancer then forwards the request to a Tomcat instance on port 8800. > > For secure requests, clients connect to the load balancer on port 443, the > load balancer then forwards to the SSL accelerator and then the load > balancer forwards to a Tomcat instance on port 8801. > > The problem I am having is that the getServerPort method *always* returns 80 > for all requests even though I know they were received on either port 8800 > or 8801 (netstat also confirms this). If I connect directly to the servers > (http://server:8800), the port is correctly reported. > > I can access the correct port by inspecting the incoming requests using > reflection (request.request.connector.port) but this is obviously far from > ideal (non-portable etc). > > Does anyone have an idea why this is occurring or perhaps a way around the > problem ? This is occurring because getServerPort returns the value that the request was sent to (i.e. the value in the 'Host' HTTP header). This is necessary so that it is possible to form URLs that refer back to the server (e.g. response.sendRedirect). The way around the problem is to upgrade to Tomcat 5, and use request.getLocalPort. This returns the port that the request was received on. > > Thanks, > Ryan. > > Tomcat 4.1.24, Sun Java 1.4.2, RedHat 9 - 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: Off Topic - Java Graphing Package
Hi, This might help : http://www.manageability.org/blog/stuff/open-source-structured-graphics-libr aries-in-java/view Ryan. -Original Message- From: Andy Eastham [mailto:[EMAIL PROTECTED] Sent: 12 May 2004 10:41 To: 'Tomcat Users List' Subject: Off Topic - Java Graphing Package Hi, Sorry this is a bit off topic, but can anyone recommend an open source or freeware toolkit for building bar charts and graphs in java? I am going to use it within Tomcat, but I could probably use something that's aimed at applets if I had the source code. Thanks to anyone who responds. Best regards, Andy - 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]