RE: How do I handle International Characters
A method we have used with success for inbound request encoding is to add a Servlet Filter to our application whose sole job is to call request.setCharacterEncoding(UTF-8) Allistair. -Original Message- From: Christoph Kutzinski [mailto:[EMAIL PROTECTED] Sent: 10 May 2005 08:54 To: Tomcat Users List Subject: Re: How do I handle International Characters Lutz Zetzsche wrote: Hi Harry, Am Montag, 9. Mai 2005 20:53 schrieb Harry Mantheakis: Browsers should (and mostly do, I think) respect the encoding you specify when setting the response content-type (and the meta-tag content-type) so you can simply assume (in your filter) that your form-data will be in UTF-8. Clients still need to, of course, set their browsers to display the relevant charsets correctly. As far as HTML forms are concerned, you can force the browser to submit them to the server using a particular charset by adding the accept-charset attribute to the form tag, i.e.: form accept-charset=utf-8 ... ... /form http://www.w3.org/TR/REC-html40/interact/forms.html#adef-acce pt-charset This does however not work with Internet Explorer. I had this problem in the past. IE insists on using the page charset and ignores the accept-charset attribute. There were some more information at this URL (http://ppewww.ph.gla.ac.uk/~flavell/charset/form-i18n.html), but it is currently not available. HTH Christoph - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE --- QAS Ltd. Developers of QuickAddress Software a href=http://www.qas.com;www.qas.com/a Registered in England: No 2582055 Registered in Australia: No 082 851 474 --- /FONT - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Help needed with Hibernate persistent servlet
Hi, Hibernate needs a bunch of other jar files too. There is a text file in the H3 distrib indicating which are requisite and which are mandatory. You do not menion whether this HibernateUtil you are using as a servlet has an overridden init() method that creates the SessionFactory. Finally, the way we set the Hibernate sub-system up here is to use a ContextListener for our application which calls HibernateUtil.init which instances the SessionFactory. Another way to go about Hibernate3 usage in web apps is to use the Inversion of Control part of Spring. Cheers, Allistair. -Original Message- From: David Haynes [mailto:[EMAIL PROTECTED] Sent: 10 May 2005 19:30 To: tomcat-user@jakarta.apache.org Subject: Help needed with Hibernate persistent servlet I feel that I am almost there, but can't quite get the last problem out of the way. I am using Tomcat 5.5.7, NetBeans 4.1rc2, and Hibernate 3.0.3. I have set up the web.xml for my project to start the HibernateUtil as a load-on-startup servlet and confirmed that the proper libraries (jar files) are in place under WEB-INF/lib. I know that the servlet is running since I put the declaration into the global web.xml and got back the duplicate service error. My problem is that I am getting NoClassDefFoundError. Looking at the java generated for my jsp, I see that the class not found is the one which references my persistent object. ( i.e. when I reference HibernateUtil.currentSession() ) Do I need to do something else to make the persistent object visible to my jsp? The jsp does import my package containing HibernateUtil and the org.hibernate.* set as well. Googling seems to indicate that getting this to work is an often seen problem, but there not a lot of details about how to fix this. I have checked all the fixes I can find but nothing seems to be working. Thanks for any ideas/help. -david- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE --- QAS Ltd. Developers of QuickAddress Software a href=http://www.qas.com;www.qas.com/a Registered in England: No 2582055 Registered in Australia: No 082 851 474 --- /FONT - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: url-pattern in web.xml -- looking for explanations and best practice
URL patterns are quite limited for the web.xml. The document you want is actually the Servlet Specification PDF from Sun's J2EE website. You can achieve what you are talking about using the JK module with Apache or IIS as this forwards requests from the web server to Tomcat. It allows the ! to say not this URL pattern. Cheers, Allistair. -Original Message- From: Tim Diggins [mailto:[EMAIL PROTECTED] Sent: 11 May 2005 15:26 To: tomcat-user@jakarta.apache.org Subject: url-pattern in web.xml -- looking for explanations and best practice Hi- I'm trying to configure my tomcat 5.0.28 webapp so that one servlet (a Spring dispatcher as it happens, but that's irrelevant) receives virtually everything except standard static non-text file patterns (*.css, *.png, *.gif, etc.) which I want served up statically. I've been trying various options for url-pattern within servlet mapping and have been getting very confused... Some questions therefore... 1) Is there a definition / documentation of what the syntax for a url-pattern is? I've tried and tried googling and looking, but can't find such a thing (I'm not sure that it's standardised across different containers, but there seems to be no definition in the tomcat docs that I could find). Obviously, if anyone can refer me to this, then I don't need the other questions answered! 2) is there any way to say - if a url includes a ~ (tilde character) then route it to a particular servlet. The following give errors: url-pattern*~*/url-pattern url-pattern~//url-pattern url-pattern~*/url-pattern But oddly the following doesn't: url-pattern*.~/url-pattern *error looks like: 11-May-2005 15:13:07 org.apache.catalina.startup.ContextConfig applicationConfig SEVERE: Parse error in application web.xml java.lang.IllegalArgumentException: Invalid url-pattern ~/*.* in servlet mapping at org.apache.commons.digester.Digester.createSAXException(Digester.java :2540) at org.apache.commons.digester.Digester.createSAXException(Digester.java :2566) -- 3) is there any way to specify NO extension (like a request for directory) and exclude things with an extension? 4) is there any way to specify what you want to go to the default (static) servlet and then state a sink for anything else (invert the default-specific servlet mapping in other words). 5) is there some obvious best practice I'm missing here (excluding making my urls less interpretable). Many thanks Tim - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE --- QAS Ltd. Developers of QuickAddress Software a href=http://www.qas.com;www.qas.com/a Registered in England: No 2582055 Registered in Australia: No 082 851 474 --- /FONT - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: tomcat 5.5.9 version stable?
yes, it says so on the tomcat homepage. -Original Message- From: Woodchuck [mailto:[EMAIL PROTECTED] Sent: 12 May 2005 16:57 To: tomcat Subject: tomcat 5.5.9 version stable? hihi all, is the tomcat 5.5.9 version a 'stable' version? when i go to browse the download folder i see versions marked with '-alpha' and '-beta'... but none marked with '-stable' does that mean 'stable' versions are the ones without any markings (ie. 'alpha' or 'beta')? thanks in advance! woodchuck Yahoo! Mail Stay connected, organized, and protected. Take the tour: http://tour.mail.yahoo.com/mailtour.html - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE --- QAS Ltd. Registered in England: No 2582055 Registered in Australia: No 082 851 474 --- /FONT - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[OT] Configuration of 5 country sites and 1 web application base
Dear List, I'm after some external advice on how best to configure Tomcat and our web application. The web application is intended to run 5 international country web sites. The code base is aware of its need to run different sites, and uses various parameters in calling backend services to acquire the relvant content for page building and so on. We will be running each website with its own country domain, e.g www.domain.co.uk www.domain.com as well as wishing to run subdomains sub.domain.co.uk sub.domain.com The question is, is it better to run 1 web application to serve all these sites, or would you run each site as a separate web application and configure the build process appropriately. Being able to bring down 1 particular site is the main benefit I can see for separate web applications, whereas more centralised configuration may be a benefit for 1 web application. I'd really like to hear your opinions if you do the same thing or have thoughts on this topic. Thanks in advance, Allistair. FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE --- QAS Ltd. Registered in England: No 2582055 Registered in Australia: No 082 851 474 --- /FONT - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: tomcat unable to serve struts action
I think it's odd that /index.do is coming through from Apache and it throws an error. Known alternatives are URL rewriting and creating a JSP that contains a call to the action using a redirect/forward. There's an example of doing this in the struts-example webapp where they forward using struts-logic to welcome.do Cheers, Allistair. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: 14 June 2005 13:42 To: Tomcat Users List Subject: tomcat unable to serve struts action Hi, I have an application using Apache 2.0.54, Tomcat 5.0.27 Struts 1.1 on a Windows 2003 SP1 box. *.jsp and *.do get forwarded to Tomcat for processing. When a particular folder is requested in a URL with no filename, I want a struts action to get called. For example http://test.site.com/foldername should result in http://test.site.com/index.do I have configured the triggering of the /index.do in Apache and it does seem to pass the request onto Tomcat as I see the following in the tomcat access log. However Tomcat is unable to process the action and its causing the errorpage to trigger. xxx.xxx.xxx.xxx - - [14/Jun/2005:13:37:16 +] GET /index.do HTTP/1.1 200 12608 xxx.xxx.xxx.xxx - - [14/Jun/2005:13:37:17 +] GET /errorpage.jsp HTTP/1.1 200 11317 If I access http://test.site.com/index.do directly the page is correctly served. Should it be possible for Tomcat to process a struts action as a default page through Apache? Is there another way I can do this? Thanks in advance, Michelle. FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE --- QAS Ltd. Registered in England: No 2582055 Registered in Australia: No 082 851 474 --- /FONT - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: getRemoteUser() always returns null
Hi, Try setting tomcatAuthentication=false on the connector, or jk2.properties file Cheers, Allistair. -Original Message- From: Scott Heitkamp [mailto:[EMAIL PROTECTED] Sent: 21 June 2005 21:40 To: tomcat-user@jakarta.apache.org Subject: getRemoteUser() always returns null I'm currently using tomcat with the apache connector. I use apache to authenicate the user and then allow them to access certain servlets in tomcat. My problem is that when I call getRemoteUser in the servlet, it always returns null even though I was authenticated through apache. I'm assuming that it's because the request isn't sending the Authorization Header to tomcat. How do I get it? __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE --- QAS Ltd. Registered in England: No 2582055 Registered in Australia: No 082 851 474 --- /FONT - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat and Internet Explorers caching
Hi, Not an answer as such, but all our dev machines (and we do LOTS of changes per 5 minutes) have Automatically switched on, and we don't experience this problem. Like I say, not a solution, but perhaps you are looking in the wrong direction. Cheers, Allistair. -Original Message- From: Øyvind Johansen [mailto:[EMAIL PROTECTED] Sent: 22 June 2005 11:11 To: 'Tomcat Users List' Subject: Tomcat and Internet Explorers caching Hello! Our web-application uses a combination of JSP-pages and a controller servlet. When viewing these pages with Internet Explorer weird things tend to happen. I found out that if Internet Explorers caching is set to automatic checking for newer versions on the server everything goes wrong. Instead of sending requests to the servlet, IE just simply takes an answer from its cache, and thus presenting the wrong results. When changing the setting to always the problem disappears. Now, telling every user to change this setting would require almost as much work as convincing them that Firefox and/or Opera are much better. So, are there any ways to tell IE that it shouldn't cache my servlet/jsp-pages? Regards, Øyvind Johansen ElectricTimeCar - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE --- QAS Ltd. Registered in England: No 2582055 Registered in Australia: No 082 851 474 --- /FONT - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[OT] Sharing session with manual jsessionid
Hi, We are using embedded XML requests within out browser and I would like to share information through 1 session since these XML requests create new requests with their own sessions. I am obtaining the outer session with session.getId and manually adding jsessionid=%= session.getId() % to the XML requests in the hope that the jsessionid will override the presence of cookies in the internal JSP that the XML request hits. However, it does not, and the internal JSP generates another session id. I don't think this can be helped can it? Cheers, Allistair FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE --- QAS Ltd. Registered in England: No 2582055 Registered in Australia: No 082 851 474 --- /FONT - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [OT] Sharing session with manual jsessionid
Thanks for the info. I have been trying with ; but to no avail, so it must be the case (and it will be) that the parent page's session id is already a cookie AND I am passing it as a URL, so the cookie is winning. Since the XML requests are generated by JavaScript client-side objects, there is little scope for tampering with headers but I can look at the other JSP end to see if I can do anything I suppose. Thanks again. -Original Message- From: Jon Wingfield [mailto:[EMAIL PROTECTED] Sent: 24 June 2005 15:13 To: Tomcat Users List Subject: Re: [OT] Sharing session with manual jsessionid The jsessionid would have to be a path parameter not a url parameter (append prefixed with a semi-colon rather than a question mark). There was a thread last week called isRequestedSessionIdFromURL() returns false which discussed what happens when the id is both in the url and a cookie: the cookie wins. You'll have to make sure the xml requests don't have the cookie header. (It sounds like that is the case as a new session is generated.) HTH, Jon Allistair Crossley wrote: Hi, We are using embedded XML requests within out browser and I would like to share information through 1 session since these XML requests create new requests with their own sessions. I am obtaining the outer session with session.getId and manually adding jsessionid=%= session.getId() % to the XML requests in the hope that the jsessionid will override the presence of cookies in the internal JSP that the XML request hits. However, it does not, and the internal JSP generates another session id. I don't think this can be helped can it? Cheers, Allistair FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE --- QAS Ltd. Registered in England: No 2582055 Registered in Australia: No 082 851 474 --- /FONT - 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: [OT] Sharing session with manual jsessionid
I've come up with the only solution I can see that will work. The parent appends it's session id as now, and the target JSP (inside the XML call) uses JSTL sql tags to retrieve information using the parent session id as a key into that state table. It works and I don't see a way for me to mess with headers with my method. Cheers, Allistair. -Original Message- From: Jon Wingfield [mailto:[EMAIL PROTECTED] Sent: 24 June 2005 15:47 To: Tomcat Users List Subject: Re: [OT] Sharing session with manual jsessionid I commiserate. Only last week I tried to override the cookie header for an AJAX request using setRequestHeader. It didn't work :( Allistair Crossley wrote: Thanks for the info. I have been trying with ; but to no avail, so it must be the case (and it will be) that the parent page's session id is already a cookie AND I am passing it as a URL, so the cookie is winning. Since the XML requests are generated by JavaScript client-side objects, there is little scope for tampering with headers but I can look at the other JSP end to see if I can do anything I suppose. Thanks again. -Original Message- From: Jon Wingfield [mailto:[EMAIL PROTECTED] Sent: 24 June 2005 15:13 To: Tomcat Users List Subject: Re: [OT] Sharing session with manual jsessionid The jsessionid would have to be a path parameter not a url parameter (append prefixed with a semi-colon rather than a question mark). There was a thread last week called isRequestedSessionIdFromURL() returns false which discussed what happens when the id is both in the url and a cookie: the cookie wins. You'll have to make sure the xml requests don't have the cookie header. (It sounds like that is the case as a new session is generated.) HTH, Jon Allistair Crossley wrote: Hi, We are using embedded XML requests within out browser and I would like to share information through 1 session since these XML requests create new requests with their own sessions. I am obtaining the outer session with session.getId and manually adding jsessionid=%= session.getId() % to the XML requests in the hope that the jsessionid will override the presence of cookies in the internal JSP that the XML request hits. However, it does not, and the internal JSP generates another session id. I don't think this can be helped can it? Cheers, Allistair FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE --- QAS Ltd. Registered in England: No 2582055 Registered in Australia: No 082 851 474 --- /FONT - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE --- QAS Ltd. Registered in England: No 2582055 Registered in Australia: No 082 851 474 --- /FONT - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: ClientAbortException: java.net.SocketException: Connection reset by peer: socket write error
Which line of code is on 71? helloworldservlet.ServletVideo.streamBinaryData(ServletVideo.java:71) In your finally block, you are closing the servlet output stream, I wonder if that's causing tomcat a problem since it usually closes the servlet output stream itself? Humour me and change if( outstr != null ) { outstr.flush(); outstr.close(); } to if( outstr != null ) { outstr.flush(); } -Original Message- From: Adriana Suarez [mailto:[EMAIL PROTECTED] Sent: 28 June 2005 04:33 To: tomcat-user@jakarta.apache.org Subject: ClientAbortException: java.net.SocketException: Connection reset by peer: socket write error Hello, I got this exception and I don't know how to solve it, I have a web application with a servlet which sends video with formats avi, mpeg, and mov, it shows the video but the tomcat throws this exception: ClientAbortException: java.net.SocketException: Connection reset by peer: socket write error at org.apache.coyote.tomcat5.OutputBuffer.realWriteBytes(OutputBu ffer.java:373) at org.apache.tomcat.util.buf.ByteChunk.append(ByteChunk.java:323) at org.apache.coyote.tomcat5.OutputBuffer.writeBytes(OutputBuffer .java:401) at org.apache.coyote.tomcat5.OutputBuffer.write(OutputBuffer.java:388) at org.apache.coyote.tomcat5.CoyoteOutputStream.write(CoyoteOutpu tStream.java:76) at java.io.BufferedOutputStream.write(BufferedOutputStream.java:106) at helloworldservlet.ServletVideo.streamBinaryData(ServletVideo.java:71) at helloworldservlet.ServletVideo.doGet(ServletVideo.java:37) at javax.servlet.http.HttpServlet.service(HttpServlet.java:689) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilt er(ApplicationFilterChain.java:237) at org.apache.catalina.core.ApplicationFilterChain.doFilter(Appli cationFilterChain.java:157) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardW rapperValve.java:214) at org.apache.catalina.core.StandardValveContext.invokeNext(Stand ardValveContext.java:104) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipel ine.java:520) at org.apache.catalina.core.StandardContextValve.invokeInternal(S tandardContextValve.java:198) at org.apache.catalina.core.StandardContextValve.invoke(StandardC ontextValve.java:152) at org.apache.catalina.core.StandardValveContext.invokeNext(Stand ardValveContext.java:104) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipel ine.java:520) at org.apache.catalina.core.StandardHostValve.invoke(StandardHost Valve.java:137) at org.apache.catalina.core.StandardValveContext.invokeNext(Stand ardValveContext.java:104) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReport Valve.java:117) at org.apache.catalina.core.StandardValveContext.invokeNext(Stand ardValveContext.java:102) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipel ine.java:520) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEn gineValve.java:109) at org.apache.catalina.core.StandardValveContext.invokeNext(Stand ardValveContext.java:104) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipel ine.java:520) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929) at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter. java:160) at org.apache.coyote.http11.Http11Processor.process(Http11Process or.java:799) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandle r.processConnection(Http11Protocol.java:705) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoi nt.java:577) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run( ThreadPool.java:683) at java.lang.Thread.run(Thread.java:534) and this is where the code fails: private void streamBinaryData(String urlstr,String format,ServletOutputStream outstr, HttpServletResponse resp) { String ErrorStr = null; try{ //find the right mime type and set it as contenttype resp.setContentType(getMimeType(format)); BufferedInputStream bis = null; BufferedOutputStream bos = null; try{ URL url = new URL(urlstr); URLConnection urlc= url.openConnection(); int length =urlc.getContentLength(); resp.setContentLength(length); // Use Buffered Stream for reading/writing. InputStream in = urlc.getInputStream(); bis = new BufferedInputStream(in); bos = new BufferedOutputStream(outstr); byte[] buff = new byte[length]; int bytesRead; // Simple
RE: Convert URL path from directory/ to directory/index.htm (Spring related)
Hi, You'd normally attempt to do this with URL rewriting at the web server side. I read that tomcat does not really offer URL rewriting at this time if used as a web server, I could be wrong. For what it's worth, we place index.jsp documents in folders that the user may request that do a erquest forward to index.htm which is then picked up by Spring. If using IIS you can also specifying default documents like index.htm which the web server will try until it gets a bite from Tomcat All the best, Allistair. -Original Message- From: Andy [mailto:[EMAIL PROTECTED] Sent: 29 June 2005 14:18 To: tomcat-user@jakarta.apache.org Subject: Convert URL path from directory/ to directory/index.htm (Spring related) Hi, Is there anyway to get Tomcat to convert a request such as myserver.com/directory into myserver.com/directory/index.htm. The reason for this is that in Spring you have to specify a wild card to match against the URL path in order to invoke the DispatcherServlet, if this wild card is *.htm then a requested without index.htm in it results in a 404 from Tomcat. i.e. myserver.com/directory - gives a 404 response myserver.com/directory/index.htm - invokes Spring to deal with the request Perhaps this is an issue I can solve within Spring but thought I'd try the Tomcat angle first. This is what I have in my web.xml for Spring - servlet servlet-nameabc/servlet-name servlet-classorg.springframework.web.servlet.DispatcherServl et/servlet-cl ass load-on-startup1/load-on-startup /servlet servlet-mapping servlet-nameabc/servlet-name url-pattern*.htm/url-pattern /servlet-mapping Thanks, Andy. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE --- QAS Ltd. Registered in England: No 2582055 Registered in Australia: No 082 851 474 --- /FONT - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[OT] wildcard servlet mapping also catching jsps
Hi Guys, Having a real ball ache with a requirement. We want to handle any URL with a Spring controller (servlet for those not into Spring). Therefore http://ourserver/wacky/url http://ourserver/something We want coming to our controller. Why? Because we have fancy page lookup and redirect services that the servlet should use to send out the resultant JSP or redirect. We run IIS - JK - Tomcat. To achieve getting arbitrary URLs into our controller we have 1. Mapping in JK's conf, i.e /*=ajp13 to route everything to the ajp13 tomcat worker. 2. Mapping in application web.xml for the controller servlet with mapping /* (everything!) 3. The Spring controller too needs a mapping itself /* but that's not really important I think. So we make one of those requests. And sure enough it gets to our controller servlet. We're happy. Until what happens next. The controller, sends back a JSP view, probably via request forwarding or whatever. However, the web.xml /* mapping to the controller picks up the JSP request/forward whatever, and so the JSP is never run as we're in a loop. Why oh why can't servlet-mapping elements allow for exclusions I don't know. Perhaps someone out there has an amazing idea that will ease the pain here :) Looking forward to solutions if indeed there are any. All the best, Allistair PS: I tried an ugly hack by adding the Tomcat JSP Servlet to my application web.xml and mapping *.jsp to it - did not work. FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE --- QAS Ltd. Registered in England: No 2582055 Registered in Australia: No 082 851 474 --- /FONT - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat in production
Tomcat serves requests with threads and allows by default configuration around the 80 mark. If it cannot handle them all, they get stacked up until threads become free. Most people would probably agree that 80 concurrent requests would not happen in most systems that often. You can do various bits and pieces to prepare your application for production. Someone already mentioned using a load tool like JMeter to test your worst case scenario. Invariably that will either lead you to be happy or not so. If not, you need to look at why your applicaton is not performing .. things like network connectivity, database connections, raw algorithms, legacy integrations and interoperability with other systems, will all have in impact per request thread on your system. You can use profiling tools to get under the bonnet a lot more to see where memory and time is being lost within your code. In terms of configuration, there is no make this production capable. There are things like switchin off class-reloading on the web application and turning off development mode in the conf/web.xml file and perhaps you'd want to tweak the request processor thread counts, but really you need to 1) have an idea of what your worst case/scaling case of user load will be 2) test optimise test optimise test optimise until your load tests fit your expectation. You can't just say, this is my server size, what can that handle, without factoring in (a) what you want it to handle and (b) what you're application is going to do. Cheers, Allistair. -Original Message- From: Bruno Georges [mailto:[EMAIL PROTECTED] Sent: 01 July 2005 13:36 To: Tomcat Users List Cc: 'Tomcat Users List' Subject: Re: Tomcat in production Adam I don't know personnaly how tomcat behave in production for heavier load than 10 concurrent request, but if you want to do the test in your own environemtn, which I guess has a different bandwith and network equipment, etc... I would suggest you to use tools to simulate the load, [and also against your own webapps which may be the bottleneck.] There are commerical products which can cover this. Apache as one which is usually found under its bin directory: ab I like also JMeter, also from the Apache / Jakarta guys. With JMeter you can set the number of concurrent connections and the type of request, it is very complete. you can run it form one machine, but again your box network interface will be taking the load, so maybe you can use different box, etc... your choice Bruno Georges Glencore International AG Tel. +41 41 709 3204 Fax +41 41 709 3000 Adam Lipscombe [EMAIL PROTECTED] To: 'Tomcat Users List' tomcat-user@jakarta.apache.org pensys.comcc: Subject: Tomcat in production 01.07.05 14:14 Please respond to Distribute: Tomcat Users Personal? |---| List | [ ] x | |---| Folks, We are developing an app that is currently deploys in TC 5.0.28 using Java 1.4.2_04. The DB is MySQL. Our first release is almost complete, and I have been tasked with understanding what the issues might be in putting this live in a production environment. Our customers typical server will be a dedicated blade running Win2k3 or RedHat Linux, dual Xeon processors, 2GB RAM. 1. Does anyone have an idea of how many concurrent
RE: Handling exceptions declaratively
Hi, doPost/doGet throw ServletException. I think the problem lies in that you are wrapping your exception but this does not translate to the exception actually being of class UserNotFoundException. You'd need to actually throw your own exception which could extend ServletException for example. Cheers, Allistair. -Original Message- From: Carlos Bracho [mailto:[EMAIL PROTECTED] Sent: 04 July 2005 12:37 To: tomcat-user@jakarta.apache.org Subject: Handling exceptions declaratively Hello everybody. I am trying to handling exceptions declaratively, here is part of my the web.xml file: error-page exception-typeladw.model.UserNotFoundException/exception-type location/error.jsp/location /error-page error-page exception-typeladw.model.IlegalAccessException/exception-type location/error.jsp/location /error-page error-page exception-typeladw.model.InvalidFileNameException/exception-type location/error.jsp/location /error-page servlet servlet-nametestServlet/servlet-name servlet-classladw.controller.testServlet/servlet-class /servlet servlet-mapping servlet-nametestServlet/servlet-name url-pattern/testServlet/url-pattern /servlet-mapping I created a test servlet with the following code: /* * testServlet.java * * Created on 3 de julio de 2005, 03:17 PM */ package ladw.controller; import java.io.*; import java.net.*; import ladw.model.UserNotFoundException; import javax.servlet.*; import javax.servlet.http.*; public class testServlet extends HttpServlet { protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { throw new ServletException(Wrapped UserNotFoundException,new UserNotFoundException()); } protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { } } When I write this urL http://localhost:8080/LADW/testServlet in my browser I got the follow error: ladw.model.UserNotFoundException: User does not exist ladw.controller.testServlet.doGet(testServlet.java:28) javax.servlet.http.HttpServlet.service(HttpServlet.java:697) javax.servlet.http.HttpServlet.service(HttpServlet.java:810) org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter( MonitorFilter.java:362) What is wrong in the error pages declaration??? why the error page does not appear? -- -- Carlos J, Bracho M. -- e-mail: [EMAIL PROTECTED] MSN: [EMAIL PROTECTED] +58 416 409 21 75 -- FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE --- QAS Ltd. Registered in England: No 2582055 Registered in Australia: No 082 851 474 --- /FONT - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: EL not working...
EL comes with the Servlet 2.4 spec which is supported in Tomcat 5x. I believe you may be able to get EL like behaviour with the Struts-EL taglib, but you won't get it out of the box on Tomcat 4. Allistair. -Original Message- From: Richard Reyes [mailto:[EMAIL PROTECTED] Sent: 07 July 2005 09:38 To: Tomcat Users List Subject: EL not working... Hello Guys, EL is not working under tomcat 4. how can i make it work? Please help Thanks Richard - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE --- QAS Ltd. Registered in England: No 2582055 Registered in Australia: No 082 851 474 --- /FONT - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: EL not working...
Yes it will be in pageContext, so %= pageContext.getAttribute(username) % Hi Guys/Allistair, I got this code . bean:cookie name=%= Konstants.COOKIE_USERNAME % id=username/ . . . td align=lefthtml:text property=usernamesize=15 value=${username.value} //td Any suggestions how to access the cookie value? Thanks Richard On 7/7/05, Allistair Crossley [EMAIL PROTECTED] wrote: EL comes with the Servlet 2.4 spec which is supported in Tomcat 5x. I believe you may be able to get EL like behaviour with the Struts-EL taglib, but you won't get it out of the box on Tomcat 4. Allistair. -Original Message- From: Richard Reyes [mailto:[EMAIL PROTECTED] Sent: 07 July 2005 09:38 To: Tomcat Users List Subject: EL not working... Hello Guys, EL is not working under tomcat 4. how can i make it work? Please help Thanks Richard - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE --- QAS Ltd. Registered in England: No 2582055 Registered in Australia: No 082 851 474 --- /FONT - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Multi-click from the same user
Your idea sounds like it makes sense but I can see that you may have trouble, since even if you can identify a duplicate request, you will have lost (I think) the request/response link on each subsequent click of the button (which generates unique requests). I do not think you'd be able to connect an arbitrary request with a reponse that was intended for an earlier request, but maybe I am wrong. Allistair -Original Message- From: Antonio PAROLINI [mailto:[EMAIL PROTECTED] Sent: 07 July 2005 10:05 To: tomcat-user@jakarta.apache.org Subject: Multi-click from the same user Hello, We have a Struts intranet-web site running under tomcat 4.1.24. Some of the application function are pretty slow ( more than 10 secondes), and sometime users get mad and click 10 times on the same button. Tomcat raise 10 thread and on such slow operation, the server can get very slowed down. Aside of javascript solutions ( blocking the button to be clicked twice), is there a tomcat configuration solution for this probleme ? I would imaging for instance, a HTTP connector that detect that the same call is being made by the same browser (or same UserPrincipal), to the same url with the same parameters , and instead of raising a new thread, wait for the 1 thread to end and returns its result ... Am I dreaming ? Thanks in advance for your help. Antonio Parolini ** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. ** - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE --- QAS Ltd. Registered in England: No 2582055 Registered in Australia: No 082 851 474 --- /FONT - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: EL not working...
Hi, I've just checked the bean taglib api and id is the page scope variable name that the cookie value gets put into, therefore bean:cookie name=%= Konstants.COOKIE_USERNAME % id=username / %= pageContext.getAttribute(username) % Really ought to be doing the job :) -Original Message- From: Richard Reyes [mailto:[EMAIL PROTECTED] Sent: 07 July 2005 10:24 To: Allistair Crossley Cc: Tomcat Users List Subject: Re: EL not working... Thanks Allistair, But it throws an error... E:\LABDRIVE\jakarta-tomcat-5.0.28\work\Catalina\localhost\wds- ap\org\apache\jsp\bigler\serverpages\login_jsp.java:237: cannot resolve symbol symbol : method setValue (java.lang.Object) location: class org.apache.struts.taglib.html.TextTag _jspx_th_html_text_0.setValue( pageContext.getAttribute(username) ); ^ On 7/7/05, Allistair Crossley [EMAIL PROTECTED] wrote: Yes it will be in pageContext, so %= pageContext.getAttribute(username) % Hi Guys/Allistair, I got this code . bean:cookie name=%= Konstants.COOKIE_USERNAME % id=username/ . . . td align=lefthtml:text property=usernamesize=15 value=${username.value} //td Any suggestions how to access the cookie value? Thanks Richard On 7/7/05, Allistair Crossley [EMAIL PROTECTED] wrote: EL comes with the Servlet 2.4 spec which is supported in Tomcat 5x. I believe you may be able to get EL like behaviour with the Struts-EL taglib, but you won't get it out of the box on Tomcat 4. Allistair. -Original Message- From: Richard Reyes [mailto:[EMAIL PROTECTED] Sent: 07 July 2005 09:38 To: Tomcat Users List Subject: EL not working... Hello Guys, EL is not working under tomcat 4. how can i make it work? Please help Thanks Richard - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE --- QAS Ltd. Registered in England: No 2582055 Registered in Australia: No 082 851 474 --- /FONT - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Rép. : RE: Multi-click from the same user
The common way that this is achieved is similar to the previous poster. When a user clicks the button, you would actually move them to another page straightaway that spawns the 1 request thread and makes it very clear not to refresh the page. This is the strategy you can see with online booking services in particular like flights, holidays and so on, where it's essential that the user books once. -Original Message- From: Antonio PAROLINI [mailto:[EMAIL PROTECTED] Sent: 07 July 2005 15:26 To: tomcat-user@jakarta.apache.org Subject: Rép. : RE: Multi-click from the same user Allistair, I have the same doubts you have... if the filter solution is not enough, I'll try to dig deeper into the tomcat source to find out... Antonio [EMAIL PROTECTED] 07/07 11:16 Your idea sounds like it makes sense but I can see that you may have trouble, since even if you can identify a duplicate request, you will have lost (I think) the request/response link on each subsequent click of the button (which generates unique requests). I do not think you'd be able to connect an arbitrary request with a reponse that was intended for an earlier request, but maybe I am wrong. Allistair -Original Message- From: Antonio PAROLINI [mailto:[EMAIL PROTECTED] Sent: 07 July 2005 10:05 To: tomcat-user@jakarta.apache.org Subject: Multi-click from the same user Hello, We have a Struts intranet-web site running under tomcat 4.1.24. Some of the application function are pretty slow ( more than 10 secondes), and sometime users get mad and click 10 times on the same button. Tomcat raise 10 thread and on such slow operation, the server can get very slowed down. Aside of javascript solutions ( blocking the button to be clicked twice), is there a tomcat configuration solution for this probleme ? I would imaging for instance, a HTTP connector that detect that the same call is being made by the same browser (or same UserPrincipal), to the same url with the same parameters , and instead of raising a new thread, wait for the 1 thread to end and returns its result ... Am I dreaming ? Thanks in advance for your help. Antonio Parolini ** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. ** - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE --- QAS Ltd. Registered in England: No 2582055 Registered in Australia: No 082 851 474 --- /FONT - 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: Perf Issue: HttpClient.executeMethod takes more time if there are more number of threads in the process
Complete stab in the dark here ... Tomcat serves a maximum number of threads at a time (request processing threads). It may be that Tomcat's timings are accurate for the threads *when* it executes them, but your HTTP Client will be seeing a queue when Tomcat has no spare request thread capacity. You can tweak this with the max processors attribute for Tomcat's connectors. Just a guess, take with pinch of salt. Allistair -Original Message- From: Bhaskar [mailto:[EMAIL PROTECTED] Sent: 13 July 2005 08:09 To: Tomcat Users List Subject: Perf Issue: HttpClient.executeMethod takes more time if there are more number of threads in the process Hi, I am running tomcat 5.0.28 on Linux (2.6.9-5.ELsmp #1 SMP Wed Jan 5 19:29:47 EST 2005 x86_64 x86_64 x86_64 GNU/Linux). I am having another test box which runs java process with 1000 threads(each thread will send 1 http requests to above tomcat server in the delay of 1 ms). This test process uses the HttpCommon api's to make use of http connection pool's keep alive capability. Each thread in the above test process will send the post request to the tomcat using HttpClient.excecuteMethod. If I check the avg response time in the tomcat server it is somewhere around 12 to 20 ms But in the test process, the time taken to execute the HttpClient.executeMethod varies between 3 ms to 21855 ms (avg: 1723.61 ms) Parallely (still above test process is running) I start same test process from the same test box with 10 threads (each thread will send 10 http requests to above tomcat in the delay of 1 ms). Now I see the time taken to execute the HttpCleint.executeMethod varies between 9ms to 146 ms (avg: 32.47 ms). The difference between first process and second process is number of threads. I am trying to understand the reason on why HttpClient.executeMethod is taking more time if I have more number of threads trying to send the http request? Do I need to fine tune something to make it better? Is it a expected behaviour ? if yes, any reason? Or I am doing something wrong my code ? TIA, Bhaskar PS: java version 1.4.2-02 Java(TM) 2 Runtime Environment, Standard Edition (build Blackdown-1.4.2-02) Java HotSpot(TM) Client VM (build Blackdown-1.4.2-02, mixed mode) At some point if I check the number of established connections thru netstat in test box, I see the following figure: # netstat -a|grep tomcatserver|grep ESTABLISHED|wc -l 528 FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE --- QAS Ltd. Registered in England: No 2582055 Registered in Australia: No 082 851 474 --- /FONT - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Perf Issue: HttpClient.executeMethod takes more time if there are more number of threads in the process
Hi, Tomcat's max threads by default is usually around 75. I you fire 10 at it then they all get serviced immediately. If you send 1000, all 75 get taken up, meaning a queue forms for the 1000-75 remaining threads until Tomcat has spare threads for them. Allistair -Original Message- From: Bhaskar [mailto:[EMAIL PROTECTED] Sent: 13 July 2005 09:26 To: Tomcat Users List Subject: Re: Perf Issue: HttpClient.executeMethod takes more time if there are more number of threads in the process In my testbox, both of the following processes are running simultaniously: java testprocess 1: 1000 threads (avg time to execute the executeMethod:1723.61 ms) java testprocess 2: 10 threads (avg resp time to execute the executeMethod: 32 ms) If it is to do with max processor attribute of Tomcat server side then how come I am seeing good response with another test java process which had less number of threads ? More over in tomcat, I am seeing the average response time as 12 to 20 ms. If there is a problem in tomcat side, then i might have seen huge numbers here. Bhaskar Allistair Crossley wrote: Complete stab in the dark here ... Tomcat serves a maximum number of threads at a time (request processing threads). It may be that Tomcat's timings are accurate for the threads *when* it executes them, but your HTTP Client will be seeing a queue when Tomcat has no spare request thread capacity. You can tweak this with the max processors attribute for Tomcat's connectors. Just a guess, take with pinch of salt. Allistair -Original Message- From: Bhaskar [mailto:[EMAIL PROTECTED] Sent: 13 July 2005 08:09 To: Tomcat Users List Subject: Perf Issue: HttpClient.executeMethod takes more time if there are more number of threads in the process Hi, I am running tomcat 5.0.28 on Linux (2.6.9-5.ELsmp #1 SMP Wed Jan 5 19:29:47 EST 2005 x86_64 x86_64 x86_64 GNU/Linux). I am having another test box which runs java process with 1000 threads(each thread will send 1 http requests to above tomcat server in the delay of 1 ms). This test process uses the HttpCommon api's to make use of http connection pool's keep alive capability. Each thread in the above test process will send the post request to the tomcat using HttpClient.excecuteMethod. If I check the avg response time in the tomcat server it is somewhere around 12 to 20 ms But in the test process, the time taken to execute the HttpClient.executeMethod varies between 3 ms to 21855 ms (avg: 1723.61 ms) Parallely (still above test process is running) I start same test process from the same test box with 10 threads (each thread will send 10 http requests to above tomcat in the delay of 1 ms). Now I see the time taken to execute the HttpCleint.executeMethod varies between 9ms to 146 ms (avg: 32.47 ms). The difference between first process and second process is number of threads. I am trying to understand the reason on why HttpClient.executeMethod is taking more time if I have more number of threads trying to send the http request? Do I need to fine tune something to make it better? Is it a expected behaviour ? if yes, any reason? Or I am doing something wrong my code ? TIA, Bhaskar PS: java version 1.4.2-02 Java(TM) 2 Runtime Environment, Standard Edition (build Blackdown-1.4.2-02) Java HotSpot(TM) Client VM (build Blackdown-1.4.2-02, mixed mode) At some point if I check the number of established connections thru netstat in test box, I see the following figure: # netstat -a|grep tomcatserver|grep ESTABLISHED|wc -l 528 FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE --- QAS Ltd. Registered in England: No 2582055 Registered in Australia: No 082 851 474 --- /FONT - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE --- QAS Ltd. Registered in England: No 2582055 Registered in Australia: No 082 851 474 --- /FONT - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Perf Issue: HttpClient.executeMethod takes more time if there are more number of threads in the process
Hi, I would think that is because Tomcat's max threads by default is usually around 75. I you fire 10 at it then they all get serviced immediately. If you send 1000, all 75 get taken up, meaning a queue forms for the 1000-75 remaining threads until Tomcat has spare threads for them. Allistair -Original Message- From: Bhaskar [mailto:[EMAIL PROTECTED] Sent: 13 July 2005 09:26 To: Tomcat Users List Subject: Re: Perf Issue: HttpClient.executeMethod takes more time if there are more number of threads in the process In my testbox, both of the following processes are running simultaniously: java testprocess 1: 1000 threads (avg time to execute the executeMethod:1723.61 ms) java testprocess 2: 10 threads (avg resp time to execute the executeMethod: 32 ms) If it is to do with max processor attribute of Tomcat server side then how come I am seeing good response with another test java process which had less number of threads ? More over in tomcat, I am seeing the average response time as 12 to 20 ms. If there is a problem in tomcat side, then i might have seen huge numbers here. Bhaskar Allistair Crossley wrote: Complete stab in the dark here ... Tomcat serves a maximum number of threads at a time (request processing threads). It may be that Tomcat's timings are accurate for the threads *when* it executes them, but your HTTP Client will be seeing a queue when Tomcat has no spare request thread capacity. You can tweak this with the max processors attribute for Tomcat's connectors. Just a guess, take with pinch of salt. Allistair -Original Message- From: Bhaskar [mailto:[EMAIL PROTECTED] Sent: 13 July 2005 08:09 To: Tomcat Users List Subject: Perf Issue: HttpClient.executeMethod takes more time if there are more number of threads in the process Hi, I am running tomcat 5.0.28 on Linux (2.6.9-5.ELsmp #1 SMP Wed Jan 5 19:29:47 EST 2005 x86_64 x86_64 x86_64 GNU/Linux). I am having another test box which runs java process with 1000 threads(each thread will send 1 http requests to above tomcat server in the delay of 1 ms). This test process uses the HttpCommon api's to make use of http connection pool's keep alive capability. Each thread in the above test process will send the post request to the tomcat using HttpClient.excecuteMethod. If I check the avg response time in the tomcat server it is somewhere around 12 to 20 ms But in the test process, the time taken to execute the HttpClient.executeMethod varies between 3 ms to 21855 ms (avg: 1723.61 ms) Parallely (still above test process is running) I start same test process from the same test box with 10 threads (each thread will send 10 http requests to above tomcat in the delay of 1 ms). Now I see the time taken to execute the HttpCleint.executeMethod varies between 9ms to 146 ms (avg: 32.47 ms). The difference between first process and second process is number of threads. I am trying to understand the reason on why HttpClient.executeMethod is taking more time if I have more number of threads trying to send the http request? Do I need to fine tune something to make it better? Is it a expected behaviour ? if yes, any reason? Or I am doing something wrong my code ? TIA, Bhaskar PS: java version 1.4.2-02 Java(TM) 2 Runtime Environment, Standard Edition (build Blackdown-1.4.2-02) Java HotSpot(TM) Client VM (build Blackdown-1.4.2-02, mixed mode) At some point if I check the number of established connections thru netstat in test box, I see the following figure: # netstat -a|grep tomcatserver|grep ESTABLISHED|wc -l 528 FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE --- QAS Ltd. Registered in England: No 2582055 Registered in Australia: No 082 851 474 --- /FONT - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE --- QAS Ltd. Registered in England: No 2582055 Registered in Australia: No 082 851 474 --- /FONT - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: 500 - Internal server error
That's your answer then, give Tomcat more memory, or look for leaks in your code with a profiler. -Original Message- From: Ayyanar Inbamohan [mailto:[EMAIL PROTECTED] Sent: 13 July 2005 12:07 To: Tomcat Users List Subject: Re: 500 - Internal server error It is throwing out of memeory error --- Tim Funk [EMAIL PROTECTED] wrote: You'll need to check the logs. When you have such a high load, it can be any number of reasons. -Tim Ayyanar Inbamohan wrote: Hi all, My web application run in an intranet site, i used jmeter for testing the Load and performance, when the concurrent user is set to 500 in jmeter to test the application i am getting 500 - Internal server error what is the cause for this problem, any solutions, - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE --- QAS Ltd. Registered in England: No 2582055 Registered in Australia: No 082 851 474 --- /FONT - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat vs Jboss-Tomcat
Has anyone pointed out to you that JBoss uses Tomcat for JSP/Servlets? Therefore the question is not is Tomcat better, but what management features you need and which functionality from the J2EE stack you require. Allistair. -Original Message- From: Sridhar [mailto:[EMAIL PROTECTED] Sent: 19 July 2005 14:41 To: Tomcat Users List Subject: Re: Tomcat vs Jboss-Tomcat Hi, Tomcat is better for the JSPs, But my main problem is my server able to handle 2000+ requests per second.So which is better one Web Server or Application Server. Rgds Sridhar - Original Message - From: Raghupathy,Gurumoorthy [EMAIL PROTECTED] To: 'Tomcat Users List' tomcat-user@jakarta.apache.org Sent: Tuesday, July 19, 2005 3:54 PM Subject: RE: Tomcat vs Jboss-Tomcat For only jsp use tomcat ... More easy to configure and run -Original Message- From: ohaya [mailto:[EMAIL PROTECTED] Sent: 19 July 2005 10:57 To: Tomcat Users List Subject: Re: Tomcat vs Jboss-Tomcat Sridhar, For just JSPs, you only need Tomcat. I think that JBoss will be needed if you use EJBs. Jim Sridhar wrote: Hi Everybody, Is it any difference will come between Tomcat and Jboss-Tomcat. Which is best for Executing executing only JSPs. Regards Sridhar - 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] FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE --- QAS Ltd. Registered in England: No 2582055 Registered in Australia: No 082 851 474 --- /FONT - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: tomcat 5.5.9, JSP, EL evaluation
Hi, 1. Check your JSP imports the c tag library 2. Check your web.xml schema is for J2EE 2.4 web-app xmlns=http://java.sun.com/xml/ns/j2ee; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; version=2.4 xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd; 3. You don't need to use c:out for this kind of thing. Just ${users} in the page works. Many people don't seem to realise this. Allistair. -Original Message- From: Walther Hautermann [mailto:[EMAIL PROTECTED] Sent: 26 July 2005 09:37 To: tomcat-user@jakarta.apache.org Subject: tomcat 5.5.9, JSP, EL evaluation Hi, My jsp page contains a c:out value=${users}/. The result is ${users}. I had a look in the generated .java and it seems the ${users} is not evaluated : _jspx_th_c_out_0.setValue(new String(${users})); Is there something to configure with tomcat 5.5.9 to enable the evaluation of the EL ? Thanks for your help. Walther FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE --- QAS Ltd. Registered in England: No 2582055 Registered in Australia: No 082 851 474 --- /FONT - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: tomcat 5.5.9, JSP, EL evaluation
Hi, You don't need to import the tag libraries for EL etc.. only in your pages. However, the new schema will cause problems for your web.xml in other ways. Here is a valid web.xml ?xml version=1.0 encoding=UTF-8? web-app xmlns=http://java.sun.com/xml/ns/j2ee; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; version=2.4 xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd; context-param param-namecontextConfigLocation/param-name param-value/WEB-INF/applicationContext.xml/param-value /context-param listener listener-class org.springframework.web.context.ContextLoaderListener /listener-class /listener listener listener-class com.opensymphony.oscache.web.CacheContextListener /listener-class /listener listener listener-class com.qas.newmedia.internet.core.framework.listener.ContextListener /listener-class /listener filter filter-nameUrlRewriteFilter/filter-name filter-classorg.tuckey.web.filters.urlrewrite.UrlRewriteFilter/filter-class init-param param-namelogLevel/param-name param-valueERROR/param-value /init-param /filter filter-mapping filter-nameUrlRewriteFilter/filter-name url-pattern/*/url-pattern /filter-mapping servlet servlet-namespringFrontController/servlet-name servlet-classorg.springframework.web.servlet.DispatcherServlet/servlet-class load-on-startup1/load-on-startup /servlet servlet-mapping servlet-namespringFrontController/servlet-name url-pattern*.do/url-pattern /servlet-mapping session-config session-timeout10/session-timeout /session-config mime-mapping extensionpdf/extension mime-typeapplication/pdf/mime-type /mime-mapping welcome-file-list welcome-fileindex.jsp/welcome-file welcome-fileindex.html/welcome-file welcome-fileindex.htm/welcome-file /welcome-file-list !-- error-page error-code404/error-code location/views/errors/404.html/location /error-page -- error-page exception-typecom.qas.newmedia.internet.core.page.exception.PageException/exception-type location/jsp/errors/pageNotFound.html/location /error-page jsp-config taglib taglib-uriqas/taglib-uri taglib-location/WEB-INF/tld/qas.tld/taglib-location /taglib taglib taglib-urioscache/taglib-uri taglib-location/WEB-INF/tld/oscache.tld/taglib-location /taglib taglib taglib-urispring/taglib-uri taglib-location/WEB-INF/tld/spring.tld/taglib-location /taglib jsp-property-group display-nameQAS.com/display-name url-pattern*.jsp/url-pattern el-ignoredfalse/el-ignored scripting-invalidfalse/scripting-invalid is-xmlfalse/is-xml /jsp-property-group /jsp-config /web-app -Original Message- From: Walther Hautermann [mailto:[EMAIL PROTECTED] Sent: 26 July 2005 10:00 To: Tomcat Users List Subject: RE: tomcat 5.5.9, JSP, EL evaluation Hi Allistair, Now the definition of the taglibs in the web.xml seems to be wrong. Could you provide me an example? Thx -Original Message- From: Allistair Crossley [mailto:[EMAIL PROTECTED] Sent: mardi 26 juillet 2005 10:43 To: Tomcat Users List Subject: RE: tomcat 5.5.9, JSP, EL evaluation Hi, 1. Check your JSP imports the c tag library 2. Check your web.xml schema is for J2EE 2.4 web-app xmlns=http://java.sun.com/xml/ns/j2ee; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; version=2.4 xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd; 3. You don't need to use c:out for this kind of thing. Just ${users} in the page works. Many people don't seem to realise this. Allistair. -Original Message- From: Walther Hautermann [mailto:[EMAIL PROTECTED] Sent: 26 July 2005 09:37 To: tomcat-user@jakarta.apache.org Subject: tomcat 5.5.9, JSP, EL evaluation Hi, My jsp page
Requests that are not handled by ROOT
Hi, Mind's gone a little blank, should know this but our webapp has a setup such that a filter maps /* requests and handles them. However, Tomcat is preventing requests that do not match /abc with a 404 I think because it thinks abc is another web application if it has /abc/def E.g /index.do HTTP/1.1 200 - /utilities/index.do HTTP/1.1 404 - My question is how do I get all requests (i.e both those above) to get handled by the ROOT web application? Cheers, Allistair FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE --- QAS Ltd. Registered in England: No 2582055 Registered in Australia: No 082 851 474 --- /FONT
RE: Requests that are not handled by ROOT
According to the spec /* is everything in the web application. Well, I did try * but that killed all my requests with 404 errors. Any further suggestions? Thx. -Original Message- From: Raghupathy,Gurumoorthy [mailto:[EMAIL PROTECTED] Sent: 26 July 2005 11:38 To: 'Tomcat Users List' Subject: RE: Requests that are not handled by ROOT Try filter map with * instead of /* Regards Guru -Original Message- From: Allistair Crossley [mailto:[EMAIL PROTECTED] Sent: 26 July 2005 11:36 To: tomcat-user@jakarta.apache.org Subject: Requests that are not handled by ROOT Hi, Mind's gone a little blank, should know this but our webapp has a setup such that a filter maps /* requests and handles them. However, Tomcat is preventing requests that do not match /abc with a 404 I think because it thinks abc is another web application if it has /abc/def E.g /index.do HTTP/1.1 200 - /utilities/index.do HTTP/1.1 404 - My question is how do I get all requests (i.e both those above) to get handled by the ROOT web application? Cheers, Allistair FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE --- QAS Ltd. Registered in England: No 2582055 Registered in Australia: No 082 851 474 --- /FONT - 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: Requests that are not handled by ROOT
My bad. It is actually coming into the web application afterall with /*. Cheers! -Original Message- From: Allistair Crossley Sent: 26 July 2005 11:46 To: Tomcat Users List Subject: RE: Requests that are not handled by ROOT According to the spec /* is everything in the web application. Well, I did try * but that killed all my requests with 404 errors. Any further suggestions? Thx. -Original Message- From: Raghupathy,Gurumoorthy [mailto:[EMAIL PROTECTED] Sent: 26 July 2005 11:38 To: 'Tomcat Users List' Subject: RE: Requests that are not handled by ROOT Try filter map with * instead of /* Regards Guru -Original Message- From: Allistair Crossley [mailto:[EMAIL PROTECTED] Sent: 26 July 2005 11:36 To: tomcat-user@jakarta.apache.org Subject: Requests that are not handled by ROOT Hi, Mind's gone a little blank, should know this but our webapp has a setup such that a filter maps /* requests and handles them. However, Tomcat is preventing requests that do not match /abc with a 404 I think because it thinks abc is another web application if it has /abc/def E.g /index.do HTTP/1.1 200 - /utilities/index.do HTTP/1.1 404 - My question is how do I get all requests (i.e both those above) to get handled by the ROOT web application? Cheers, Allistair FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE --- QAS Ltd. Registered in England: No 2582055 Registered in Australia: No 082 851 474 --- /FONT - 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: Problem running tomcat with a CMS application
from memory you need to ensure you add users and roles to the tomcat-users.xml file? it's all in the manual. -Original Message- From: Patrick saad [mailto:[EMAIL PROTECTED] Sent: 26 July 2005 15:39 To: tomcat-user@jakarta.apache.org Subject: Problem running tomcat with a CMS application Hy, I am trying to run a CMS program called magnolia on my http://localhost:8080/magnolia/ I made sure that everything is installed properly: tomcat 4.1.31, mysql. I downloaded the .war file and dropped it in my webapps folder. I also made sure that my environment variables for CATALINA HOME are properly set to my tomcat folder. After running the startup.bat, I try and log on to http://localhost:8080/magnolia/ but with no success, I get an unauthorized access: --- HTTP Status 403 Access to the specified resource () has been forbidden. by tomcat. -- Is there something that I am doing wrong in my installation? I previously had installed another CMS program, but I removed it and reinstalled tomcat 4.1.31. Is there something that is blocking me from doing my installation ? Please help! Patrick S. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE --- QAS Ltd. Registered in England: No 2582055 Registered in Australia: No 082 851 474 --- /FONT - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Problem running tomcat with a CMS application
Okidokes :o) -Original Message- From: David Smith [mailto:[EMAIL PROTECTED] Sent: 26 July 2005 16:02 To: Tomcat Users List Subject: Re: Problem running tomcat with a CMS application Normally you're right on the money. In this case Magnolia manages it's own authorization through a repository. --David Allistair Crossley wrote: from memory you need to ensure you add users and roles to the tomcat-users.xml file? it's all in the manual. -Original Message- From: Patrick saad [mailto:[EMAIL PROTECTED] Sent: 26 July 2005 15:39 To: tomcat-user@jakarta.apache.org Subject: Problem running tomcat with a CMS application Hy, I am trying to run a CMS program called magnolia on my http://localhost:8080/magnolia/ I made sure that everything is installed properly: tomcat 4.1.31, mysql. I downloaded the .war file and dropped it in my webapps folder. I also made sure that my environment variables for CATALINA HOME are properly set to my tomcat folder. After running the startup.bat, I try and log on to http://localhost:8080/magnolia/ but with no success, I get an unauthorized access: --- HTTP Status 403 Access to the specified resource () has been forbidden. by tomcat. -- Is there something that I am doing wrong in my installation? I previously had installed another CMS program, but I removed it and reinstalled tomcat 4.1.31. Is there something that is blocking me from doing my installation ? Please help! Patrick S. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE --- QAS Ltd. Registered in England: No 2582055 Registered in Australia: No 082 851 474 --- /FONT - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- === David Smith Network Operations Supervisor Department of Entomology College of Agriculture Life Sciences Cornell University 2132 Comstock Hall Ithaca, NY 14853 Phone: 607.255.9571 Fax: 607.255.0939 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE --- QAS Ltd. Registered in England: No 2582055 Registered in Australia: No 082 851 474 --- /FONT - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Cannot create JDBC driver of class - help!!
Is Context not supposed to be within a Host element? You also have a lowercase c in context rather than Context. You also will want jdbc/ before the name for the datasource. In fact, I think you need to read the manual (I am assuming Tomcat 5.0, otherwise look at your version). http://jakarta.apache.org/tomcat/tomcat-5.0-doc/jndi-datasource-examples-howto.html Allistair. -Original Message- From: Anish Tom Ashley [mailto:[EMAIL PROTECTED] Sent: 01 August 2005 16:30 To: tomcat-user@jakarta.apache.org Subject: Cannot create JDBC driver of class - help!! Importance: High Hi, I'm trying to create a struts based application which tries to access MySQL dB using mysql-connector-java-3.1.10 connector. I'm having problem with my getConnection() code. The following error is occurring. org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver of class ' ' for connect URL 'null' at org.apache.commons.dbcp.BasicDataSource.createDataSource(Basic DataSource.jav a:780) at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDat aSource.java:5 40) at com.tavant.app1_2.dao.MySQLLoader.executeQuery(MySQLLoader.java:29) at com.tavant.app1_2.action.HomePageAction.execute(HomePageAction .java:28) at org.apache.struts.action.RequestProcessor.processActionPerform (RequestProces sor.java:419) at org.apache.struts.action.RequestProcessor.process(RequestProce ssor.java:224) at org.apache.struts.action.ActionServlet.process(ActionServlet.j ava:1194) at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432) ..etcetc I've pasted the server.xml, web.xml and my java program only including relevant parts. server.xml ?xml version='1.0' encoding='utf-8'? Server context path=/teststruts docBase=teststruts.war debug=1 reloadable=true Resource name=mydatasource type=javax.sql.DataSource/ ResourceParams name=mydatasource parameter namefactory/name valueorg.apache.commons.dbcp.BasicDataSourceFactory/value /parameter parameter namemaxWait/name value5000/value /parameter parameter namemaxActive/name value4/value /parameter parameter namepassword/name valuef_695248/value /parameter parameter nameurl/name valuejdbc:mysql://localhost:3306/tavant/value /parameter parameter namedriverClassName/name valuecom.mysql.jdbc.Driver/value /parameter parameter namemaxIdle/name value2/value /parameter parameter nameusername/name valueroot/value /parameter /ResourceParams /context /Server -- -- - web.xml ?xml version=1.0 encoding=ISO-8859-1? !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN http://java.sun.com/j2ee/dtds/web-app_2_3.dtd; web-app resource-ref description Resource reference to a factory for java.sql.Connection instances that may be used for talking to a particular database that is configured in the server.xml file. /description res-ref-namemydatasource/res-ref-name res-typejavax.sql.DataSource/res-type res-authContainer/res-auth /resource-ref /web-app -- -- - MySQLLoader.java package com.tavant.app1_2.dao; import java.sql.Connection; import java.sql.SQLException; import java.sql.Statement; import javax.naming.Context; import javax.naming.InitialContext; import javax.sql.DataSource; public class MySQLLoader { public void executeQuery() { try { InitialContext ctx = new InitialContext(); Context ctx2 = (Context)ctx.lookup(java:comp/env); DataSource ds = (DataSource)ctx2.lookup(mydatasource); Connection conn = ds.getConnection(); Statement stmt = conn.createStatement(); stmt.executeUpdate(Insert into customer values('001','Anish','001'));
RE: How to set auto-commit to false on a Tomcat Connection-Pool?
I found this on the web for Struts using org.apache.commons.dbcp.BasicDataSource which I believe Tomcat also uses. Therefore perhaps you can try defaultAutoCommit instead. data-source key=homeDS type=org.apache.commons.dbcp.BasicDataSource set-property property=driverClassName value=oracle.jdbc.driver.OracleDriver / set-property property=url value=jdbc:oracle:thin:@localhost:1521:DBLOCAL / set-property property=username value=user / set-property property=password value=pwd / set-property property=maxActive value=10 / set-property property=maxWait value=5000 / set-property property=defaultAutoCommit value=false / set-property property=defaultReadOnly value=false / set-property property=validationQuery value=SELECT SYSDATE FROM DUAL / /data-source Allistair -Original Message- From: starki78 [mailto:[EMAIL PROTECTED] Sent: 02 August 2005 09:38 To: tomcat-user Subject: How to set auto-commit to false on a Tomcat Connection-Pool? Hi, my example works but I cannot set the autocommit paramter, but this is quite important to me. Can someone give me advice? Thanks Starki ResourceParams name=jdbc/test parameter namevalidationQuery/name valueselect * from dual/value /parameter parameter namemaxWait/name value5000/value /parameter parameter namemaxActive/name value4/value /parameter parameter namepassword/name valuextest/value /parameter parameter nameurl/name valuejdbc:oracle:thin:@xinfosap.w1:1521:orcl;autocommit=fals e/value /parameter parameter namedriverClassName/name valueoracle.jdbc.driver.OracleDriver/value /parameter parameter nameauto-commit/name valuefalse/value /parameter parameter nameautoCommit/name valuefalse/value /parameter parameter nameautocommit/name valuefalse/value /parameter parameter namemaxIdle/name value2/value /parameter parameter nameusername/name valuextest/value /parameter /ResourceParams 6X velocizzare la tua navigazione a 56k? 6X Web Accelerator di Libero! Scaricalo su INTERNET GRATIS 6X http://www.libero.it - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE --- QAS Ltd. Registered in England: No 2582055 Registered in Australia: No 082 851 474 --- /FONT - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: tomcat 5.5, jdk1.5 on user mode debian stable hangs after a few days
Hi, Hanging, memory up 50%, sounds very much like an OutOfMemoryException to me. I know from experience that Tomcat can hang with no memory and not log to stdout either (although most of the time it does). Have you profiled your application under a load test? Cheers, Allistair. -Original Message- From: MDK [mailto:[EMAIL PROTECTED] Sent: 02 August 2005 10:23 To: tomcat-user@jakarta.apache.org Subject: tomcat 5.5, jdk1.5 on user mode debian stable hangs after a few days Hello, I've searched far and wide for a definitive answer to this problem, but have found nothing that relates to my situation. I did find a few similar issues, but 1. I have no System.exit in my code 2. I am not using the root context and still after a few days tomcat stops responding. The problem also doesnt go away after i stop and re-start tomcat. And occasionally it wont stop with ./bin/shutdown.sh so i have to kill -9 the first process to stop it. when it is running, the CPU usage runs at over 90% and the memory usage goes up to 50% or so. It doesnt even respond when i telnet to localhost 8080. does anyone know a viable fix for this problem ? thanks, martin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE --- QAS Ltd. Registered in England: No 2582055 Registered in Australia: No 082 851 474 --- /FONT - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: tomcat 5.5, jdk1.5 on user mode debian stable hangs after a few days
Hi, You can get JProbe freeware for profiling and use JMeter to issue load to your web application. Does the same phenoneneneneom occur with a vanilla Tomcat 5.5 install with included webapps like jsp-examples. First figure out if it is your webapp that's causing it. Allistair. -Original Message- From: MDK [mailto:[EMAIL PROTECTED] Sent: 02 August 2005 12:29 To: Tomcat Users List Subject: Re: tomcat 5.5, jdk1.5 on user mode debian stable hangs after a few days no, the odd thing is, it wasnt even being used (and its a very simple application, of course, thats a relative term) i installed the app, tested it once and logged out. I came back to it a few days later and the whole thing is hanging. If you can recommed any tools i can use to detect what is happening that would be much appreciated the app itself uses spring, openamf (an open source flash remoting connector) with some jdbc (mysql) so i guess that any one of these (and my code) could be the culprit. I'll look into each of these individually and see if they could be causing the problem. thanks. martin Allistair Crossley wrote: Hi, Hanging, memory up 50%, sounds very much like an OutOfMemoryException to me. I know from experience that Tomcat can hang with no memory and not log to stdout either (although most of the time it does). Have you profiled your application under a load test? Cheers, Allistair. -Original Message- From: MDK [mailto:[EMAIL PROTECTED] Sent: 02 August 2005 10:23 To: tomcat-user@jakarta.apache.org Subject: tomcat 5.5, jdk1.5 on user mode debian stable hangs after a few days Hello, I've searched far and wide for a definitive answer to this problem, but have found nothing that relates to my situation. I did find a few similar issues, but 1. I have no System.exit in my code 2. I am not using the root context and still after a few days tomcat stops responding. The problem also doesnt go away after i stop and re-start tomcat. And occasionally it wont stop with ./bin/shutdown.sh so i have to kill -9 the first process to stop it. when it is running, the CPU usage runs at over 90% and the memory usage goes up to 50% or so. It doesnt even respond when i telnet to localhost 8080. does anyone know a viable fix for this problem ? thanks, martin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE --- QAS Ltd. Registered in England: No 2582055 Registered in Australia: No 082 851 474 --- /FONT - 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: Logging With Tomcat 5.5
Don't confuse not understanding with not sufficient. The instructions do lead to a correct configuration. However, here it is more explicitly. Allistair. Per-webapp logging == 1. Add log4j's jar to both your webapp's WEB-INF/lib folders 2. Add log4j.properties to both your webapp's WEB-INF/classes folders. *Minimally*, add log4j.rootCategory=debug, R log4j.appender.R=org.apache.log4j.RollingFileAppender log4j.appender.R.File=c:/jakarta-tomcat/logs/webapp-name.log log4j.appender.R.MaxFileSize=1500KB log4j.appender.R.MaxBackupIndex=1 log4j.appender.R.layout=org.apache.log4j.PatternLayout log4j.appender.R.layout.ConversionPattern=%d - %5p (%C:%L) - %m%n to those log4j.properties files changing the File path appropriately. Ideally you will pick up the log4j manual and create appenders that map to packages. Tomcat logging with log4j = I've found the best way is 1. Add log4j jar to common/lib, add commons-logging.jar to common/lib 2. Add log4j.properties to common/classes with content log4j.rootCategory=error, R log4j.appender.R=org.apache.log4j.RollingFileAppender log4j.appender.R.File=c:/jakarta-tomcat/logs/tomcat.log log4j.appender.R.MaxFileSize=1500KB log4j.appender.R.MaxBackupIndex=1 log4j.appender.R.layout=org.apache.log4j.PatternLayout log4j.appender.R.layout.ConversionPattern=%d - %5p (%C:%L) - %m%n log4j.logger.org.apache.commons.modeler=INFO, R log4j.logger.org.apache.tomcat.util.digester=ERROR, R log4j.logger.org.apache.catalina.loader=INFO, R log4j.logger.org.apache.catalina.session=INFO, R log4j.logger.org.apache.catalina=DEBUG, R log4j.logger.org.apache.commons.digester=INFO, R log4j.logger.org.apache.commons.beanutils=INFO, R log4j.logger.org.apache.jasper=INFO, R log4j.additivity.org.apache.catalina=false Tomcat logging per-webapp = Add to your webapp's log4j.properties files log4j.logger.org.apache.catalina.core.ContainerBase.[Catalina].[localhost][/webappname]=DEBUG, R -Original Message- From: Scott Purcell [mailto:[EMAIL PROTECTED] Sent: 02 August 2005 14:22 To: tomcat-user@jakarta.apache.org Subject: Logging With Tomcat 5.5 Hello, I am sure this topic has been beaten to death, but I am having trouble understanding how the Log4J works, and how I can configure it on my localbox. First off, I am running Tomcat 5.5 and I have created two webapp contexts. One is a dev site, and the other is a production site. I am using struts (I don't think it matters). I would to be able to have two sets of rolling logs. One for dev, and the other for production. I am trying to decipher the readme at http://jakarta.apache.org/tomcat/tomcat-5.5-doc/logging.html; but I am not truly sure if this is for all webapps, or what this is implying. I would like to get all Tomcat messages (errors, etc) and my actual logging all in either one or two files per webapp. Can someone please assist me in this? The readme just doesn't cut it, or I am interpreting it wrongly. Or maybe there is an example setup somewhere. Any info would be appreciated. Sincerely Scott - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE --- QAS Ltd. Registered in England: No 2582055 Registered in Australia: No 082 851 474 --- /FONT - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Logging With Tomcat 5.5
Hi, You don't change Catalina (for most purposes). Just change end part /webappname to your web application name, and yes, add it into the web application's log4j. E.g if your webapp was called banana You would add (in addition to the root logger etc..) into webapps/banana/WEB-INF/classes/log4j.properties log4j.logger.org.apache.catalina.core.ContainerBase.[Catalina].[localhost][/banana]=DEBUG, R Allistair. -Original Message- From: Scott Purcell [mailto:[EMAIL PROTECTED] Sent: 02 August 2005 14:49 To: Tomcat Users List Subject: RE: Logging With Tomcat 5.5 Allistair, That last instruction log4j.logger.org.apache.catalina.core.ContainerBase.[Catalina ].[localhost][/webappname]=DEBUG, R What do I change the [Catalina] value to? and that does go into the log4j.properties file under the webapp? Thanks, Scott -Original Message- From: Allistair Crossley [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 02, 2005 8:31 AM To: Tomcat Users List Subject: RE: Logging With Tomcat 5.5 Don't confuse not understanding with not sufficient. The instructions do lead to a correct configuration. However, here it is more explicitly. Allistair. Per-webapp logging == 1. Add log4j's jar to both your webapp's WEB-INF/lib folders 2. Add log4j.properties to both your webapp's WEB-INF/classes folders. *Minimally*, add log4j.rootCategory=debug, R log4j.appender.R=org.apache.log4j.RollingFileAppender log4j.appender.R.File=c:/jakarta-tomcat/logs/webapp-name.log log4j.appender.R.MaxFileSize=1500KB log4j.appender.R.MaxBackupIndex=1 log4j.appender.R.layout=org.apache.log4j.PatternLayout log4j.appender.R.layout.ConversionPattern=%d - %5p (%C:%L) - %m%n to those log4j.properties files changing the File path appropriately. Ideally you will pick up the log4j manual and create appenders that map to packages. Tomcat logging with log4j = I've found the best way is 1. Add log4j jar to common/lib, add commons-logging.jar to common/lib 2. Add log4j.properties to common/classes with content log4j.rootCategory=error, R log4j.appender.R=org.apache.log4j.RollingFileAppender log4j.appender.R.File=c:/jakarta-tomcat/logs/tomcat.log log4j.appender.R.MaxFileSize=1500KB log4j.appender.R.MaxBackupIndex=1 log4j.appender.R.layout=org.apache.log4j.PatternLayout log4j.appender.R.layout.ConversionPattern=%d - %5p (%C:%L) - %m%n log4j.logger.org.apache.commons.modeler=INFO, R log4j.logger.org.apache.tomcat.util.digester=ERROR, R log4j.logger.org.apache.catalina.loader=INFO, R log4j.logger.org.apache.catalina.session=INFO, R log4j.logger.org.apache.catalina=DEBUG, R log4j.logger.org.apache.commons.digester=INFO, R log4j.logger.org.apache.commons.beanutils=INFO, R log4j.logger.org.apache.jasper=INFO, R log4j.additivity.org.apache.catalina=false Tomcat logging per-webapp = Add to your webapp's log4j.properties files log4j.logger.org.apache.catalina.core.ContainerBase.[Catalina] .[localhost][/webappname]=DEBUG, R -Original Message- From: Scott Purcell [mailto:[EMAIL PROTECTED] Sent: 02 August 2005 14:22 To: tomcat-user@jakarta.apache.org Subject: Logging With Tomcat 5.5 Hello, I am sure this topic has been beaten to death, but I am having trouble understanding how the Log4J works, and how I can configure it on my localbox. First off, I am running Tomcat 5.5 and I have created two webapp contexts. One is a dev site, and the other is a production site. I am using struts (I don't think it matters). I would to be able to have two sets of rolling logs. One for dev, and the other for production. I am trying to decipher the readme at http://jakarta.apache.org/tomcat/tomcat-5.5-doc/logging.html; but I am not truly sure if this is for all webapps, or what this is implying. I would like to get all Tomcat messages (errors, etc) and my actual logging all in either one or two files per webapp. Can someone please assist me in this? The readme just doesn't cut it, or I am interpreting it wrongly. Or maybe there is an example setup somewhere. Any info would be appreciated. Sincerely Scott - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE --- QAS Ltd. Registered in England: No 2582055 Registered in Australia: No 082 851 474 --- /FONT - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe
RE: Upgrading from 5.0.28 to 5.5.9?
Yes, some of which are pointed out in my blog at www.adcworks.com/blog -Original Message- From: Bjørn T Johansen [mailto:[EMAIL PROTECTED] Sent: 02 August 2005 22:44 To: Tomcat Users List Subject: Upgrading from 5.0.28 to 5.5.9? Anything one should be aware of when moving from 5.0.28 to 5.5.9? Also, any reasons not to make the move? Regards, BTJ -- -- - Bjørn T Johansen [EMAIL PROTECTED] -- - Someone wrote: I understand that if you play a Windows CD backwards you hear strange Satanic messages To which someone replied: It's even worse than that; play it forwards and it installs Windows -- - - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE --- QAS Ltd. Registered in England: No 2582055 Registered in Australia: No 082 851 474 --- /FONT - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Blog: JK1.2 load balancing as solution to 100% uptime
Hi Chaps, If anyone is interested, I blogged last night on my experience setting up 2 tomcats on 1 server and then load balancing them with JK 1.2, and tested that bringing 1 down, and then back up did not lose any requests. This for my web application is an ideal way to avoid downtime during class patching or full builds, although for those needing session replication, the blog does not cover that. Take it or leave it :), I've also added this to the Tomcat links wiki. Allistair FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE --- QAS Ltd. Registered in England: No 2582055 Registered in Australia: No 082 851 474 --- /FONT
RE: Blog: JK1.2 load balancing as solution to 100% uptime
Oops! :) http://www.adcworks.com/blog/index.php/archives/2005/08/03/load-balancing-with-tomcat-55-and-jk-12/ Cheers, Allistair. -Original Message- From: Mladen Turk [mailto:[EMAIL PROTECTED] Sent: 04 August 2005 12:42 To: Tomcat Users List Subject: Re: Blog: JK1.2 load balancing as solution to 100% uptime Allistair Crossley wrote: Hi Chaps, If anyone is interested, I blogged last night on my experience setting up ... It would be great if you provide a link to your blog :) Regards, Mladen. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE --- QAS Ltd. Registered in England: No 2582055 Registered in Australia: No 082 851 474 --- /FONT - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Easy EL question
you use .key or .value, e.g item.value['key'] item.key Allistair -Original Message- From: Guillaume Lederrey [mailto:[EMAIL PROTECTED] Sent: 08 August 2005 10:34 To: Tomcat Users List Subject: Easy EL question Hello ! I'm still having problem with all the different syntax used in JSP... so excuse my question if it sound really stupid ! I'm having to iterate on the values of a Map. So I'd like something like that : c:catch c:set var=items value=${itemsMap.values}/ /c:catch c:forEach items=${items} var=item [do something] /c:forEach Of course, it doesnt work because there is no getter in a Map to get the values ... There is probably a very easy and standard way to do exactly that ... could you help me on that one ? Thanks Guillaume - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE --- QAS Ltd. Registered in England: No 2582055 Registered in Australia: No 082 851 474 --- /FONT - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Easy EL question
Hi, With what you supplied, the answer was the best you could have expected. The deletedDma item per loop iteration is of type MapEntry. This has getKey and getValue, hence why you can call deletedDma.key and deletedDma.value. In html your link would be a href=/DMAAssistant/ChooseDeletedDMAToCancelRemove?id=${deletedDma.value.id}Remove/a I am not sure if you can pass this into the html:link tag. Try ... // you don't need this block by the way c:catch c:set var=deletedDmas value=${dmaAssistantSession.deletedDmasSimple}/ /c:catch ul id=overviewDeletedDmas c:forEach items=${dmaAssistantSession.deletedDmasSimple} var=deletedDma li html:link action=/DMAAssistant/ChooseDeletedDMAToCancelRemove paramId=id paramName=deletedDma.value paramProperty=id bean:message name=deletedDma.value property=label / /html:link /li /c:forEach /ul -Original Message- From: Guillaume Lederrey [mailto:[EMAIL PROTECTED] Sent: 08 August 2005 12:10 To: Tomcat Users List Subject: Re: Easy EL question Thanks for your answer ! But I'm afraid I dont really understand how to use it ... Do you mean I should iterate on the keys of my Map ? But then the question is of course How do I iterate on the keys ?. Maybe I should be more precise in my example, so here is my actual code (which doesnt work). dmaAssistantSession.deletedDmasSimple is a Map of beans (id, label). The key to the Map is the id of the bean itself (but I dont use the key here). c:catch c:set var=deletedDmas value=${dmaAssistantSession.deletedDmasSimple}/ /c:catch ul id=overviewDeletedDmas c:forEach items=${deletedDmas} var=deletedDma li html:link action=/DMAAssistant/ChooseDeletedDMAToCancelRemove paramId=id paramName=deletedDma paramProperty=id bean:message name=deletedDma property=label/ /html:link /li /c:forEach /ul Thanks a lot for the answer, but I would be even more thankfull if a bit more explanation goes with it ... On 8/8/05, Allistair Crossley [EMAIL PROTECTED] wrote: you use .key or .value, e.g item.value['key'] item.key Allistair -Original Message- From: Guillaume Lederrey [mailto:[EMAIL PROTECTED] Sent: 08 August 2005 10:34 To: Tomcat Users List Subject: Easy EL question Hello ! I'm still having problem with all the different syntax used in JSP... so excuse my question if it sound really stupid ! I'm having to iterate on the values of a Map. So I'd like something like that : c:catch c:set var=items value=${itemsMap.values}/ /c:catch c:forEach items=${items} var=item [do something] /c:forEach Of course, it doesnt work because there is no getter in a Map to get the values ... There is probably a very easy and standard way to do exactly that ... could you help me on that one ? Thanks Guillaume - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE --- QAS Ltd. Registered in England: No 2582055 Registered in Australia: No 082 851 474 --- /FONT - 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: Has anyone used Tomcat 5.5.9 connecting to MS SQL Server using JNDI?
Hi, Can you please send more information, such as error messages, stdout logging and the configuration for your pool. Cheers, Allistair. -Original Message- From: Wylie, Ian [mailto:[EMAIL PROTECTED] Sent: 11 August 2005 10:28 To: Tomcat Users List Subject: RE: Has anyone used Tomcat 5.5.9 connecting to MS SQL Server using JNDI? David, Thanks for the link. I have followed the instructions but unfortunately get similar errors to what I had previously I am afraid. In a situation like this I am sure I could get the company to pay for some support for this type of problem, but I am unsure who would be best to help with this. Without further help, I will have to sideline the upgrade to 5.5, until there is more info out there for the connecting using JNDI with a MS SQL Server example. In my opinion the people who develop Tomcat should provide an example of JNDI for ALL major databases. This is one of the things that makes the Tomcat offering lacking somewhat in maturity. It seems to me it is relatively easy to get the basic JSP / Servlet stuff up and running in no time, but it has always been a hassle to get JNDI to work in Tomcat. The Tomcat folks provide MySQL and an Oracle example but they need to provide examples for MS SQL Server, DB2 and Sybase. Thanks for your help though - as it may have worked... :-) Best Regards, Ian Ian Wylie Business Intelligence Architect Business Information Technology (BIT) Pfizer Global Pharmaceuticals (PGP) -Original Message- From: David Thielen [mailto:[EMAIL PROTECTED] Sent: 10 August 2005 14:56 To: Tomcat Users List Subject: RE: Has anyone used Tomcat 5.5.9 connecting to MS SQL Server using JNDI? http://thielen.typepad.com/programming/2005/07/hibernate_on_to.html David Thielen 303-499-2544 www.windwardreports.com -Original Message- From: Wylie, Ian [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 10, 2005 4:37 AM To: tomcat-user@jakarta.apache.org Subject: Has anyone used Tomcat 5.5.9 connecting to MS SQL Server using JNDI? Hi All, I have just installed Tomcat 5.5.9 on our Dev Server. I managed with a bit of work and a few searches on the web to get Tomcat 4.1.x working with MS SQL Server using JNDI and database pooled connections to work. This has been working well for some time now. However, there is quite a few advantages for upgrading the current system to Tomcat 5.5, not least of which, is improvements to the list and functionality of tools that aid with Java debugging! I cannot get Tomcat 5.5.9 working with JNDI and MS SQL Server at the moment. I have already read all the various official docs on JNDI how-to and searched the web but even after all that and changing various things that others have recommended, I cannot get the JNDI to work. Has anyone out there successfully using JNDI with Tomcat and MS SQL Server? If so please can you put another professional out of there misery! Many thanks, Best Regards, _ http://www.pfizer.co.uk/Ian Wylie - [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] Business Intelligence Architect Business Information Technology (BIT) Pfizer Global Pharmaceuticals (PGP) Direct: +44 (0)1737 330422 Address: Pfizer Ltd, Walton Oaks (IPC 2G), Dorking Road, Tadworth, Surrey, KT20 7NS. LEGAL NOTICE Unless expressly stated otherwise, this message is confidential and may be privileged. It is intended for the addressee(s) only. Access to this e-mail by anyone else is unauthorised. If you are not an addressee, any disclosure or copying of the contents of this e-mail or any action taken (or not taken) in reliance on it is unauthorised and may be unlawful. If you are not an addressee, please inform the sender immediately. Pfizer Limited is registered in England under No. 526209 with its registered office at Ramsgate Road, Sandwich, Kent CT13 9NJ _ - 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] FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE --- QAS Ltd. Registered in England: No 2582055 Registered in Australia: No 082 851 474 --- /FONT - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Has anyone used Tomcat 5.5.9 connecting to MS SQL Server using JNDI?
- From: Allistair Crossley [mailto:[EMAIL PROTECTED] Sent: 11 August 2005 10:38 To: Tomcat Users List Subject: RE: Has anyone used Tomcat 5.5.9 connecting to MS SQL Server using JNDI? Hi, Can you please send more information, such as error messages, stdout logging and the configuration for your pool. Cheers, Allistair. -Original Message- From: Wylie, Ian [mailto:[EMAIL PROTECTED] Sent: 11 August 2005 10:28 To: Tomcat Users List Subject: RE: Has anyone used Tomcat 5.5.9 connecting to MS SQL Server using JNDI? David, Thanks for the link. I have followed the instructions but unfortunately get similar errors to what I had previously I am afraid. In a situation like this I am sure I could get the company to pay for some support for this type of problem, but I am unsure who would be best to help with this. Without further help, I will have to sideline the upgrade to 5.5, until there is more info out there for the connecting using JNDI with a MS SQL Server example. In my opinion the people who develop Tomcat should provide an example of JNDI for ALL major databases. This is one of the things that makes the Tomcat offering lacking somewhat in maturity. It seems to me it is relatively easy to get the basic JSP / Servlet stuff up and running in no time, but it has always been a hassle to get JNDI to work in Tomcat. The Tomcat folks provide MySQL and an Oracle example but they need to provide examples for MS SQL Server, DB2 and Sybase. Thanks for your help though - as it may have worked... :-) Best Regards, Ian Ian Wylie Business Intelligence Architect Business Information Technology (BIT) Pfizer Global Pharmaceuticals (PGP) -Original Message- From: David Thielen [mailto:[EMAIL PROTECTED] Sent: 10 August 2005 14:56 To: Tomcat Users List Subject: RE: Has anyone used Tomcat 5.5.9 connecting to MS SQL Server using JNDI? http://thielen.typepad.com/programming/2005/07/hibernate_on_to.html David Thielen 303-499-2544 www.windwardreports.com -Original Message- From: Wylie, Ian [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 10, 2005 4:37 AM To: tomcat-user@jakarta.apache.org Subject: Has anyone used Tomcat 5.5.9 connecting to MS SQL Server using JNDI? Hi All, I have just installed Tomcat 5.5.9 on our Dev Server. I managed with a bit of work and a few searches on the web to get Tomcat 4.1.x working with MS SQL Server using JNDI and database pooled connections to work. This has been working well for some time now. However, there is quite a few advantages for upgrading the current system to Tomcat 5.5, not least of which, is improvements to the list and functionality of tools that aid with Java debugging! I cannot get Tomcat 5.5.9 working with JNDI and MS SQL Server at the moment. I have already read all the various official docs on JNDI how-to and searched the web but even after all that and changing various things that others have recommended, I cannot get the JNDI to work. Has anyone out there successfully using JNDI with Tomcat and MS SQL Server? If so please can you put another professional out of there misery! Many thanks, Best Regards, _ http://www.pfizer.co.uk/Ian Wylie - [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] Business Intelligence Architect Business Information Technology (BIT) Pfizer Global Pharmaceuticals (PGP) Direct: +44 (0)1737 330422 Address: Pfizer Ltd, Walton Oaks (IPC 2G), Dorking Road, Tadworth, Surrey, KT20 7NS. LEGAL NOTICE Unless expressly stated otherwise, this message is confidential and may be privileged. It is intended for the addressee(s) only. Access to this e-mail by anyone else is unauthorised. If you are not an addressee, any disclosure or copying of the contents of this e-mail or any action taken (or not taken) in reliance on it is unauthorised and may be unlawful. If you are not an addressee, please inform the sender immediately. Pfizer Limited is registered in England under No. 526209 with its registered office at Ramsgate Road, Sandwich, Kent CT13 9NJ _ - 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] FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE --- QAS Ltd. Registered in England: No 2582055 Registered in Australia: No 082 851 474
RE: Has anyone used Tomcat 5.5.9 connecting to MS SQL Server using JNDI?
Hi, A) First, can you clarify which method you have opted for now of; 1. TOMCAT_HOME/webapps/webappname/META-INF/context.xml or 2. TOMCAT_HOME/conf/Catalina/localhost/webappname.xml B) Ensure your database JAR(s) are in TOMCAT_HOME/common/lib (not in your webapp lib). C) Try something simpler ... DataSource dataSource = null; try { Context ctx = new InitialContext(); dataSource = (DataSource) ctx.lookup(java:comp/env/jdbc/UKportalPool); } catch (NamingException nE) { log.error(nE.getMessage()); } catch (NullPointerException npE) { log.error(npE.getMessage()); } Allistair. -Original Message- From: Wylie, Ian [mailto:[EMAIL PROTECTED] Sent: 11 August 2005 12:02 To: Tomcat Users List Subject: RE: Has anyone used Tomcat 5.5.9 connecting to MS SQL Server using JNDI? Alistair, Well I have learned something that I was doing wrong, but after removing the webappname.xml I get the same error. Any more ideas? Thanks, Ian -Original Message- From: Allistair Crossley [mailto:[EMAIL PROTECTED] Sent: 11 August 2005 11:53 To: Tomcat Users List Subject: RE: Has anyone used Tomcat 5.5.9 connecting to MS SQL Server using JNDI? Hi, You can only configure a web application in 1 place. You can't use *both* context.xml AND a webappname.xml. I think the TOMCAT_HOME\conf\Catalina\localhost method is tried first, and because this does not have any of your datasources in it you get your problems. Decide on either TOMCAT_HOME\conf\Catalina\localhost\webappname.xml or META-INF/context.xml and see if you get any further first. Cheers, Allistair -Original Message- From: Wylie, Ian [mailto:[EMAIL PROTECTED] Sent: 11 August 2005 11:47 To: Tomcat Users List Subject: RE: Has anyone used Tomcat 5.5.9 connecting to MS SQL Server using JNDI? Alistair, For configuration purposes I attach the Context.xml, web.xml and mininPCO-practise.xml - which is the web application file which resides in TOMCAT_HOME\conf\Catalina\localhost directory. The error message is basically Cannot create resource instance. (Full Error message attached below.) The Java code above works in 4.1.31, so I am not really worried about this, unless Tomcat 5.5.9 works differently. Here is the code snippet from the java class PortletHelper that is being executed which produces the error at the end of this email. Well I think that is all that anyone needs to check out my app. If anyone can offer some good advice on this, it would be much appreciated. Best Regards, Ian == = JAVA CODE SNIPPET START logger.debug(Before InitialContext.) ; InitialContext ctx = new InitialContext(); if (ctx == null) { log(ERROR initialising InitialContext.) ; logger.error(ERROR initialising InitialContext.) ; } log(Before Context.) ; Context envCtx = (Context) ctx.lookup(java:comp/env); if (envCtx != null) { log(Before initialising DataSource.) ; ConnectionPoolDataSource ds = (ConnectionPoolDataSource)envCtx.lookup(jdbc/UKportalPool); if(ds != null) { pCon = ds.getPooledConnection(); JAVA CODE SNIPPET END == ERROR MESSAGE START 10-Aug-2005 15:26:56 org.apache.catalina.core.ApplicationContext log INFO: OMTLreport: Before Context. 10-Aug-2005 15:26:56 org.apache.catalina.core.ApplicationContext log INFO: OMTLreport: Before initialising DataSource. 10-Aug-2005 15:26:56 org.apache.catalina.core.ApplicationContext log INFO: OMTLreport: ERROR - NamingException - Config error with JNDI and datasource.javax.naming.NamingException: Cannot create resource instance 10-Aug-2005 15:26:56 org.apache.catalina.core.StandardWrapperValve invoke SEVERE: Servlet.service() for servlet OMTLreport threw exception java.lang.NullPointerException at com.webconnex.portal.PortletHelper.initPortlet(PortletHelper.java:230) at com.webconnex.cognos.PORT.OMTLreport.processRequest(OMTLreport .java:243) at com.webconnex.portal.PortletHelper.doGet(PortletHelper.java:321) at javax.servlet.http.HttpServlet.service(HttpServlet.java:689) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilt er(Application FilterChain.java:252) at org.apache.catalina.core.ApplicationFilterChain.doFilter(Appli cationFilterCh ain.java:173
RE: Tomcat 5.5 upgrade + logging problems
Really, this has been discussed to death on this mailing list. The 5.5 logging page for a start gives you instructions for setting logging up. Also, I have a blog at www.adcworks.com/blog that touches on 5.5 configuration and logging. Allistair. -Original Message- From: Robert Abbate [mailto:[EMAIL PROTECTED] Sent: 11 August 2005 15:43 To: tomcat-user@jakarta.apache.org Subject: Tomcat 5.5 upgrade + logging problems Hi. I have searched through archives and online for such solutions for the depreciated Logger element. We have a virtual host setup and requires separate logs for each host. We have followed the instructions such as this: jakarta.apache.org/tomcat/tomcat-5.5-doc/logging.html we've put log4j.properties file in each host's WEB-INF/classes folder, and log4j1.2.8.jar into WEB-INF/lib in each host still, nothing seems to work. there must be something we are missing. CONFIGURATION: CATALINA_HOME=/var/tomcat5 TOMCAT_USER=apache JAVA_HOME=/usr/java CATALINA_OPTS=-Xmx1228M -Djava.awt.headless=true java= 1.5.0_03 server.xml CUT Host name=domain.com unpackWARs=true autoDeploy=true appBase=/home/rondelli/html Realm className=org.apache.catalina.realm.MemoryRealm pathname=/var/tomcat5/conf/tomcat-users/rondelli-t omcat-users.xml/ Context path= docBase=/home/rondelli/html debug=0/ Aliaswww.domain.com/Alias Context path=/tomcatmanager docBase=/var/tomcat5/server/webapps/manager debug=0 privileged=true/ Logger className=org.apache.catalina.logger.FileLogger prefix=domain.com_log. suffix=.txt directo ry=/home/rondelli timestamp=true/ /Host Host name=domain2.com unpackWARs=true autoDeploy=true appBase=/home/revisionten/html Realm className=org.apache.catalina.realm.MemoryRealm pathname=/var/tomcat5/conf/tomcat-users/revisionte n-tomcat-users.xml/ Context path= docBase=/home/revisionten/html debug=0/ Aliaswww.domain2.com/Alias Context path=/tomcatmanager docBase=/var/tomcat5/server/webapps/manager debug=0 privileged=true/ Logger className=org.apache.catalina.logger.FileLogger prefix=domain2.com_log. suffix=.txt dire ctory=/home/revisionten timestamp=true/ /Host CUT. /usr/java/bin/java -Djava.util.logging.manager=org.apache.juli.ClassLoaderLo gManager -Xmx1228M -Djava.awt.headless=true -Djava.endorsed.dirs=/var/tomcat 5/common/endorsed -classpath :/var/tomcat5/bin/bootstrap.jar:/var/tomcat5/bin/commons-loggi ng-api.jar:/us r/java/jre/lib/mysql-connector-java-3.0.15-ga-bin.jar:/var/tom cat5/common/li b/log4j-1.2.8.jar -Dcatalina.base=/var/tomcat5 -Dcatalina.home=/var/tomcat5 -Djava.io.tmpdir=/var/tomcat5/temp org.apache.catalina.startup.Bootstrap start Does anyone have a setup like this and can offer any clues? If you need any further config details, please ask. I hope I gave all necessary. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE --- QAS Ltd. Registered in England: No 2582055 Registered in Australia: No 082 851 474 --- /FONT - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Out of memory
Hi, You can modify the memory settings for the windows service also in the service.bat file itself. I've been known to uninstall the service, modify the bat file and then service install again. I don't like using the binary version so that should work for you. Secondly, OOMEs should be addressed by profiling (discussed lots on this list) not by throwing more memory at Tomcat (unless of course you have a valid need for all that RAM). Allistair -Original Message- From: Yun Yang [mailto:[EMAIL PROTECTED] Sent: 11 August 2005 19:31 To: Tomcat Users List Subject: Out of memory Hello, I am using Tomcat5.0.28. When I try to run my web application, I got this message: exception javax.servlet.ServletException: Servlet execution threw an exception root cause java.lang.OutOfMemoryError How can I solve this problem? I tried to uninstall tomcat5 as service using service.bat remove and tried to reinstall it as service in Windows XP. How can I add option like -xmx512M into service.bat? Or How can I increase the heap size? I added this statement into Catalina.bat set JAVA_OPTS=-Xmx512m. It works. But When I run tomcat5.0 as server it still does not work. Thanks, Yun Yang - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE --- QAS Ltd. Registered in England: No 2582055 Registered in Australia: No 082 851 474 --- /FONT - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Out of memory
Oh yes :) -Original Message- From: Wolfgang Hackl [mailto:[EMAIL PROTECTED] Sent: 12 August 2005 09:24 To: Tomcat Users List Subject: RE: Out of memory You can modify the memory settings for the windows service also in the service.bat file itself. I've been known to uninstall the service, modify the bat file and then service install again. Forget about a reinstall. Use regedit and go to HKEY_LOCAL_MACHINE\SOFTWARE\Apache software Foundation\Procrun 2.0\yourTomcatServiceName\Parameters\Java and edit the JvmMx and JvmMs settings as your deployment requires. Kind regards Wolfgang -- 5 GB Mailbox, 50 FreeSMS http://www.gmx.net/de/go/promail +++ GMX - die erste Adresse für Mail, Message, More +++ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE --- QAS Ltd. Registered in England: No 2582055 Registered in Australia: No 082 851 474 --- /FONT - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat W3C Access Log
Hi, Just use the Access Log Value with the pattern you need. You can see the built-in patterns or define your own one. Check out the docs http://jakarta.apache.org/tomcat/tomcat-5.5-doc/config/valve.html Cheers, Allistair. -Original Message- From: news [mailto:[EMAIL PROTECTED] Behalf Of Björn Andersen Sent: 12 August 2005 11:24 To: tomcat-user@jakarta.apache.org Subject: Tomcat W3C Access Log Hi, We are hosting webapplications on IIS with an Tomcat-Backend connected via JK2. We analyze the IIS-Logs to supply Webstats. Now, the ISAPI-calls to the JK2 can not be analyzed. We see that Tomcat has a Logger-Valve for a W3C format access log. How can we configrue our Tomcatfarm to produce W3C-conform per-application accesslogs? Preferably in server.xml, so we don't have to change the apps. If you gotta build it manually in the applcations, how is that done? thanks fou your help. Bjoern - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE --- QAS Ltd. Registered in England: No 2582055 Registered in Australia: No 082 851 474 --- /FONT - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat 5.5 upgrade + logging problems
Hi Robert, The fact is that followed precisely the instructions do work. I *almost* guarantee this because I walked through it just last week with a guy on a vanilla Tomcat 5.5.9 install and I deal with Tomcat and logging daily. The question is, what kind of logging do you want, because there are 2 types. The old FileLogger was internal logging mixed with webapp logging. Tomcat 5.5 aims to decouple itself from a custom logging implementation and uses the Commons Logging wrapper to allow developers to customise their logging output in a more flexible and powerful way. Therefore the developers did not do a *bad thing* as you describe, you are simply peeved off that you don't understand the change. That's natural, noone likes change, but change is inevitable if we are to do things better. Granted that FileLogger was probably easier, but it was not as powerful or flexible. And perhaps the logging page is not the most straightforward but it does work when followed. So now, if you want Tomcat core classes logging, i.e internal Tomcat logging, then you need to have a log4j.properties file inside tomcat/common/classes and *both* the log4j jar *and* commons logging jar in tomcat/common/lib. This information in my view is not all that useful unless you're trying to get to the nitty gritty of what's happening. More than likely you are more interested in per-webapp logging. If you want logging for a web application in particular, then you need a log4j.properties in the webapp's classes folder and log4j jar only in the lib. History on this list shows us that logging configuration issues like these are almost always caused by something the user has misunderstood or done in their customisation or web application. As for the multiple virtual hosts with webapps; log4j.logger.org.apache.catalina.core.ContainerBase.[Catalina].[localhost][/yourwebappname]=DEBUG, R You'll recognise localhost is a servername, so perhaps you could try using your virtual host name and let us know if that works. Cheers, Allistair. -Original Message- From: Robert Abbate [mailto:[EMAIL PROTECTED] Sent: 12 August 2005 01:37 To: Allistair Crossley Subject: RE: Tomcat 5.5 upgrade + logging problems I appreciate your response, but I can assure you there are many out there which are not able to get this going EVEN after following the scant instructions. I had consulted at least 5 other webhosting companies that I am in contact with all having the same issue. There is something wrong and not much help so far. Tomcat developers did a bad thing by removing support for Logger element. They didn't have to do that since it worked fine. Also, I see your site doesn't address a virtual /multiple host setup; I have not seen any help anywhere on this setup as we are requesting. -Original Message- From: Allistair Crossley [mailto:[EMAIL PROTECTED] Sent: Friday, August 12, 2005 3:07 AM To: Tomcat Users List Subject: RE: Tomcat 5.5 upgrade + logging problems Really, this has been discussed to death on this mailing list. The 5.5 logging page for a start gives you instructions for setting logging up. Also, I have a blog at www.adcworks.com/blog that touches on 5.5 configuration and logging. Allistair. -Original Message- From: Robert Abbate [mailto:[EMAIL PROTECTED] Sent: 11 August 2005 15:43 To: tomcat-user@jakarta.apache.org Subject: Tomcat 5.5 upgrade + logging problems Hi. I have searched through archives and online for such solutions for the depreciated Logger element. We have a virtual host setup and requires separate logs for each host. We have followed the instructions such as this: jakarta.apache.org/tomcat/tomcat-5.5-doc/logging.html we've put log4j.properties file in each host's WEB-INF/classes folder, and log4j1.2.8.jar into WEB-INF/lib in each host still, nothing seems to work. there must be something we are missing. CONFIGURATION: CATALINA_HOME=/var/tomcat5 TOMCAT_USER=apache JAVA_HOME=/usr/java CATALINA_OPTS=-Xmx1228M -Djava.awt.headless=true java= 1.5.0_03 server.xml CUT Host name=domain.com unpackWARs=true autoDeploy=true appBase=/home/rondelli/html Realm className=org.apache.catalina.realm.MemoryRealm pathname=/var/tomcat5/conf/tomcat-users/rondelli-t omcat-users.xml/ Context path= docBase=/home/rondelli/html debug=0/ Aliaswww.domain.com/Alias Context path=/tomcatmanager docBase=/var/tomcat5/server/webapps/manager debug=0 privileged=true/ Logger className=org.apache.catalina.logger.FileLogger prefix=domain.com_log. suffix=.txt directo ry=/home/rondelli timestamp=true/ /Host Host name=domain2.com unpackWARs=true autoDeploy=true appBase=/home/revisionten/html Realm className=org.apache.catalina.realm.MemoryRealm pathname=/var/tomcat5/conf/tomcat-users/revisionte n-tomcat-users.xml/ Context path= docBase=/home
RE: Tomcat 5.5 upgrade + logging problems
=== Tomcat 5.5.10 Virtual Host example setup with log4j logging per host === I hope this can be of some use to those who are confused about how to add logging to Virtual Hosts in Tomcat 5.5 Series since the disappearance of FileLogger. You will need to be able to configure DNS resolution for this example. In this example I setup 2 Virtual Hosts each with their own web applications. Each host gets its own log. I cause an exception in one of the Virtual Hosts to show that its logging is directed into its log. Virtual Host DNS Entries Create 2 DNS entries to the Tomcat target machine tomcata.qas.com tomcatb.qas.com Tomcat 5.5.10 - Download and unzip somewhere. Virtual Host Web Applications - Create directories for the vhost webapps catalina_home/webapps-a catalina_home/webapps-b Copy ROOT and jsp-examples directories from catalina_home/webapps into both webapps-a and webapps-b Setup the exception test Enter webapps-b/jsp-examples Create file test.jsp and add into it % throw new Exception(); % log4j.properties Create file log4j.properties in catalina_home/common/classes and copy the following into it; # Root log4j.rootCategory=error, R log4j.appender.R=org.apache.log4j.RollingFileAppender log4j.appender.R.File=c:/jakarta-tomcat-5.5.10/logs/tomcat-root.log log4j.appender.R.MaxFileSize=1500KB log4j.appender.R.MaxBackupIndex=1 log4j.appender.R.layout=org.apache.log4j.PatternLayout log4j.appender.R.layout.ConversionPattern=%d - %5p (%C:%L) - %m%n # VH A log4j.appender.A=org.apache.log4j.RollingFileAppender log4j.appender.A.File=c:/jakarta-tomcat-5.5.10/logs/tomcat-a.log log4j.appender.A.MaxFileSize=1500KB log4j.appender.A.MaxBackupIndex=1 log4j.appender.A.layout=org.apache.log4j.PatternLayout log4j.appender.A.layout.ConversionPattern=%d - %5p (%C:%L) - %m%n # VH B log4j.appender.B=org.apache.log4j.RollingFileAppender log4j.appender.B.File=c:/jakarta-tomcat-5.5.10/logs/tomcat-b.log log4j.appender.B.MaxFileSize=1500KB log4j.appender.B.MaxBackupIndex=1 log4j.appender.B.layout=org.apache.log4j.PatternLayout log4j.appender.B.layout.ConversionPattern=%d - %5p (%C:%L) - %m%n log4j.logger.org.apache.catalina.core.ContainerBase.[Catalina].[localhost]=DEBUG, R log4j.additivity.org.apache.catalina.core.ContainerBase.[Catalina].[localhost]=false log4j.logger.org.apache.catalina.core.ContainerBase.[Catalina].[tomcata.qas.com]=DEBUG, A log4j.additivity.org.apache.catalina.core.ContainerBase.[Catalina].[tomcata.qas.com]=false log4j.logger.org.apache.catalina.core.ContainerBase.[Catalina].[tomcatb.qas.com]=DEBUG, B log4j.additivity.org.apache.catalina.core.ContainerBase.[Catalina].[tomcatb.qas.com]=false server.xml -- After the localhost Host element, add the Virtual Hosts (here I also add per Host access logs) Host name=tomcata.qas.com appBase=webapps-a Valve className=org.apache.catalina.valves.FastCommonAccessLogValve directory=logs prefix=a_access_log. suffix=.txt pattern=common resolveHosts=false/ /Host Host name=tomcatb.qas.com appBase=webapps-b Valve className=org.apache.catalina.valves.FastCommonAccessLogValve directory=logs prefix=b_access_log. suffix=.txt pattern=common resolveHosts=false/ /Host logging jars Download and copy log4j1.2.9.jar into catalina_home/common/lib Download and copy commons-logging.jar into catalina_home/common/lib Finish and Test --- That's it. Start Tomcat and go into the logs directory. You should see all the new logs created with some default startup information. Now browse to http://tomcata.qas.com:8080/ (you should get the ROOT tomcat welcome page) http://tomcatb.qas.com:8080/test.jsp (you should get an exception, check the tomcat-b.log Summary --- Note that this is virtual host logging, it is not webapp logging. For webapp logging you need to configure log4j within the web application itself which is another example. -- end -- -Original Message- From: Allistair Crossley Sent: 12 August 2005 13:57 To: tomcat-user@jakarta.apache.org Cc: Robert Abbate Subject: RE: Tomcat 5.5 upgrade + logging problems Hi Robert, The fact is that followed precisely the instructions do work. I *almost* guarantee this because I walked through it just last week with a guy on a vanilla Tomcat 5.5.9 install and I deal with Tomcat and logging daily. The question is, what kind of logging do you want, because there are 2 types. The old FileLogger was internal logging mixed with webapp logging. Tomcat 5.5 aims to decouple itself from a custom logging implementation and uses the Commons Logging wrapper to allow developers
RE: Out of memory
You can also get OOME in development by causing restarts by copying class files or web.xml files into a running web application with reloadable=true and depending on how good you are at cleaning out your appliacation this leaks until such a point you get the OOME usually with PermGen error. -Original Message- From: Brian Cook [mailto:[EMAIL PROTECTED] Sent: 12 August 2005 15:48 To: Tomcat Users List Subject: Re: Out of memory You would probably be better served looking at what you can change in the app so it does not require so much RAM. It has been my experience that when I get an out of memory error it is because I was forgetting to close an object, or calling too many large objects globally, or reading in too much data into a result set. Of all my web apps only one requires the heap size to be raised to the 512MB limit. It loads multiple 1MB - 10MB overlays them on one another and then dynamically overlays a lot of font specific anti-aliasing text. Unless the application is doing similarly demanding you would probably be better severed by debugging the app to see what is using so much RAM. If you are making a development error like say forgetting to close an object something everyone on the list has done it is always better to learn of errors as early as possible so you do not carry it over to other apps. A lesson I have learned the hard way. Allistair Crossley wrote: Oh yes :) -Original Message- From: Wolfgang Hackl [mailto:[EMAIL PROTECTED] Sent: 12 August 2005 09:24 To: Tomcat Users List Subject: RE: Out of memory You can modify the memory settings for the windows service also in the service.bat file itself. I've been known to uninstall the service, modify the bat file and then service install again. Forget about a reinstall. Use regedit and go to HKEY_LOCAL_MACHINE\SOFTWARE\Apache software Foundation\Procrun 2.0\yourTomcatServiceName\Parameters\Java and edit the JvmMx and JvmMs settings as your deployment requires. Kind regards Wolfgang -- 5 GB Mailbox, 50 FreeSMS http://www.gmx.net/de/go/promail +++ GMX - die erste Adresse für Mail, Message, More +++ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE --- QAS Ltd. Registered in England: No 2582055 Registered in Australia: No 082 851 474 --- /FONT - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Brian Cook Digital Services Analyst Print Time Inc. [EMAIL PROTECTED] 913.345.8900 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Cannot compile jsp pages with log4j statements -- Tomcat 5.5.9
Can you post the JSP directives, and the scriplet that calls log4j? Also, you have been given a line number 39 .. can you work out which line this is in the work directory. Allistair. -Original Message- From: Gary Zhu [mailto:[EMAIL PROTECTED] Sent: 12 August 2005 16:17 To: Tomcat Users List Subject: Cannot compile jsp pages with log4j statements -- Tomcat 5.5.9 Hi all, I am having difficulties to figure out the solution for this issue. Jsp pages with log4j logging statements that worked perfect on Tomcat 4.1.30 could not compile on Tomcat 5.5.9. I commented out the log4j statements for these problematic pages, then, tomcat 5.5.9 could compile them. Except commenting out all the log4j statements for the jsp pages in order to run on Tomcat 5.5.9, does anyone have any other solutions? Below is the JasperException message when attempting to compile JSP pages with log4j statements: org.apache.jasper.JasperException: Unable to compile class for JSP An error occurred at line: 39 in the jsp file: /sysco/agent_report_all_in.jsp Generated servlet error: agent_report_all_in_jsp cannot be resolved or is not a type org.apache.jasper.compiler.DefaultErrorHandler.javacError(Defa ultErrorHa ndler.java:84) org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDis patcher.ja va:328) org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompil er.java:39 7) org.apache.jasper.compiler.Compiler.compile(Compiler.java:288) org.apache.jasper.compiler.Compiler.compile(Compiler.java:267) org.apache.jasper.compiler.Compiler.compile(Compiler.java:255) org.apache.jasper.JspCompilationContext.compile(JspCompilation Context.ja va:556) org.apache.jasper.servlet.JspServletWrapper.service(JspServlet Wrapper.ja va:293) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet .java:291) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) Thanks Gary FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE --- QAS Ltd. Registered in England: No 2582055 Registered in Australia: No 082 851 474 --- /FONT - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: WEB-INF/lib/myjar.jar doesn't contain file xyz...
Can you post the full exception stack? -Original Message- From: t.n.a. [mailto:[EMAIL PROTECTED] Sent: 12 August 2005 16:19 To: tomcat-user@jakarta.apache.org Subject: WEB-INF/lib/myjar.jar doesn't contain file xyz... Tomcat (5.5) seems reluctant to load a .jar file from the WEB-INF/lib directory. Specifically, it seems to load tapestly.jar (as the error is displayed in a tapestry exception page), but it doesn't seem to want anything to do with cayenne.jar. The reported error is that a file in cayenne.jar is missing, which is plain wrong: when you unzip the .jar, it's there. Also, I've got another application that also uses cayenne.jar - on the same tomcat server - and it just works. Am I missing something here? Tia, Tomislav - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE --- QAS Ltd. Registered in England: No 2582055 Registered in Australia: No 082 851 474 --- /FONT - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Problems with context
And what is the error you are getting? 404? 500? Exception? What? Allistair. -Original Message- From: Fermin Jimenez Najar [mailto:[EMAIL PROTECTED] Sent: 12 August 2005 08:54 To: Tomcat Users List Subject: Problems with context Hi. I just has beginning to use the Tomcat, for programming in JSP. I have the 5.0 version. I make a web app that uses, in some jsp's files, the command response.sendRedirect. When i execute the pages locally in my computer, works fine, but, i if try to test the pages from another computer, i get an error. This is the way i was executed the sendRedirect for test in another machine, and always get an error: response.sendRedirect(http://localhost:8080/activation/obliga torios.jsp) response.sendRedirect(http://192.168.1.137:8080/activation/ob ligatorios.jsp ) response.sendRedirect(http://mycomputer:8080/activation/oblig atorios.jsp) response.sendRedirect(/obligatorios.jsp) response.sendRedirect(activation/obligatorios.jsp) I think that could be some context problems because, for make the webapp structure, i copied one example webapp that comes with the tomcat, then i deleted and renamed those files and directories that i dont use (off course, the web-inf still exist) What can i do ? Is there is some file where i must configure the context of the webapp ? Thanks !! - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE --- QAS Ltd. Registered in England: No 2582055 Registered in Australia: No 082 851 474 --- /FONT - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Cannot compile jsp pages with log4j statements -- Tomcat 5.5.9
I think Jon maybe onto something ... to use agent_report_all_in_jsp.class your JSP would need to be called agent_report_all_in.jsp Is that the case? Allistair/ -Original Message- From: Jon Wingfield [mailto:[EMAIL PROTECTED] Sent: 12 August 2005 16:44 To: Tomcat Users List Subject: Re: Cannot compile jsp pages with log4j statements -- Tomcat 5.5.9 It doesn't like the agent_report_all_in_jsp classname. I'm guessing that's supposed to be the name of the servlet class generated from the jsp. Are you sure it's correct? If it is then you may have to use a String argument instead of a class when calling the Logger factory method. Gary Zhu wrote: Thanks Allistair. Below is the snippet of the code, I indicated line 39 as well. %@ page import=javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, java.io.File, java.io.FileOutputStream, java.io.IOException, java.io.BufferedReader, java.io.FileInputStream, java.util.StringTokenizer, java.util.ArrayList, java.io.InputStreamReader, java.io.InputStream, java.io.OutputStream, com.timeicr.sysco.web.bean.AgentBean, com.timeicr.util.web.session.*, org.apache.log4j.* % % response.setHeader(Cache-Control,no-cache); //HTTP 1.1 response.setHeader(Pragma,no-cache); //HTTP 1.0 response.setDateHeader(Expires, 0); //prevents caching at the proxy server % (Line 39)%! static private org.apache.log4j.Logger logger = org.apache.log4j.Logger.getLogger(agent_report_all_in_jsp.class); % Gary -Original Message- From: Allistair Crossley [mailto:[EMAIL PROTECTED] Sent: August 12, 2005 11:20 AM To: Tomcat Users List Subject: RE: Cannot compile jsp pages with log4j statements -- Tomcat 5.5.9 Can you post the JSP directives, and the scriplet that calls log4j? Also, you have been given a line number 39 .. can you work out which line this is in the work directory. Allistair. -Original Message- From: Gary Zhu [mailto:[EMAIL PROTECTED] Sent: 12 August 2005 16:17 To: Tomcat Users List Subject: Cannot compile jsp pages with log4j statements -- Tomcat 5.5.9 Hi all, I am having difficulties to figure out the solution for this issue. Jsp pages with log4j logging statements that worked perfect on Tomcat 4.1.30 could not compile on Tomcat 5.5.9. I commented out the log4j statements for these problematic pages, then, tomcat 5.5.9 could compile them. Except commenting out all the log4j statements for the jsp pages in order to run on Tomcat 5.5.9, does anyone have any other solutions? Below is the JasperException message when attempting to compile JSP pages with log4j statements: org.apache.jasper.JasperException: Unable to compile class for JSP An error occurred at line: 39 in the jsp file: /sysco/agent_report_all_in.jsp Generated servlet error: agent_report_all_in_jsp cannot be resolved or is not a type org.apache.jasper.compiler.DefaultErrorHandler.javacError(Defa ultErrorHa ndler.java:84) org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDis patcher.ja va:328) org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompil er.java:39 7) org.apache.jasper.compiler.Compiler.compile(Compiler.java:288) org.apache.jasper.compiler.Compiler.compile(Compiler.java:267) org.apache.jasper.compiler.Compiler.compile(Compiler.java:255) org.apache.jasper.JspCompilationContext.compile(JspCompilation Context.ja va:556) org.apache.jasper.servlet.JspServletWrapper.service(JspServlet Wrapper.ja va:293) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet .java:291) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) Thanks - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE --- QAS Ltd. Registered in England: No 2582055 Registered in Australia: No 082 851 474 --- /FONT - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Virtual Host Config Question
Hi, Not sure about this one. How are you routing requests to Tomcat? Are you using the JK connector with a mapping of /*.do? Do you allow image to be handled by Apache/IIS or is Tomcat doing it? You may need to ensure your static resource uris like images reference the context name, e.g src=/unique/images/pic.gif Allistair. -Original Message- From: Scott Purcell [mailto:[EMAIL PROTECTED] Sent: 12 August 2005 15:43 To: tomcat-user@jakarta.apache.org Subject: Virtual Host Config Question Hello, I have configured two Hosts in my server.xml for two different sites. The one I am having issues with is as follows: Host name=www.theuniquepear.com appBase=webapps/unique/ unpackWARs=true autoDeploy=true xmlValidation=false xmlNamespaceAware=false Context path= docBase=. / It actuall works well, but I am running struts application and with struts it includes the context which is unique. So behind the scenes, (in the URL) I am getting something like this: http://www.theuniquepear.com/welcome.do which is really doing this http://www.theuniquepear.com/unique/welcome.do And things of course are getting screwed up. Is there a way to get around that. I took off the /unique under appBase but then it showed the default Tomcat page. Anyone been here before? Thanks Scott - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE --- QAS Ltd. Registered in England: No 2582055 Registered in Australia: No 082 851 474 --- /FONT - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Cannot compile jsp pages with log4j statements -- Tomcat 5.5.9
Hi, It doesn't really matter if you did the app or not, it's irrelevant to this conversation and you asked a question. Anyway, yes an awful lot has changed between 4.1 and 5.5 including the Jasper compiler, see the change logs. However, I have tested your declaration on 5.5.9 and do not get this error therefore I think we can rule out the Jasper compiler. %! static private org.apache.log4j.Logger logger = org.apache.log4j.Logger.getLogger(_5_jsp.class); % Have you definately cross-checked the class filename in the tomcat_home/work/Catalina/localhost/_/org/apache/jsp location? Allistair. -Original Message- From: Gary Zhu [mailto:[EMAIL PROTECTED] Sent: 12 August 2005 17:08 To: Tomcat Users List Subject: RE: Cannot compile jsp pages with log4j statements -- Tomcat 5.5.9 First of all, I am not the one who did this app. Second, it is the case that the JSP file is called agent_report_all_in.jsp. The question is: Why it runs perfect on Tomcat 4.1.30, and has issues with Tomcat 5.5.9? The JasperCompiler on Tomcat5.5.9 has introduced some bugs that JasperCompiler on Tomcat 4.1.30 does not have? Thanks. Gary -Original Message- From: Allistair Crossley [mailto:[EMAIL PROTECTED] Sent: August 12, 2005 11:46 AM To: Tomcat Users List Subject: RE: Cannot compile jsp pages with log4j statements -- Tomcat 5.5.9 I think Jon maybe onto something ... to use agent_report_all_in_jsp.class your JSP would need to be called agent_report_all_in.jsp Is that the case? Allistair/ -Original Message- From: Jon Wingfield [mailto:[EMAIL PROTECTED] Sent: 12 August 2005 16:44 To: Tomcat Users List Subject: Re: Cannot compile jsp pages with log4j statements -- Tomcat 5.5.9 It doesn't like the agent_report_all_in_jsp classname. I'm guessing that's supposed to be the name of the servlet class generated from the jsp. Are you sure it's correct? If it is then you may have to use a String argument instead of a class when calling the Logger factory method. Gary Zhu wrote: Thanks Allistair. Below is the snippet of the code, I indicated line 39 as well. %@ page import=javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, java.io.File, java.io.FileOutputStream, java.io.IOException, java.io.BufferedReader, java.io.FileInputStream, java.util.StringTokenizer, java.util.ArrayList, java.io.InputStreamReader, java.io.InputStream, java.io.OutputStream, com.timeicr.sysco.web.bean.AgentBean, com.timeicr.util.web.session.*, org.apache.log4j.* % % response.setHeader(Cache-Control,no-cache); //HTTP 1.1 response.setHeader(Pragma,no-cache); //HTTP 1.0 response.setDateHeader(Expires, 0); //prevents caching at the proxy server % (Line 39)%! static private org.apache.log4j.Logger logger = org.apache.log4j.Logger.getLogger(agent_report_all_in_jsp.class); % Gary -Original Message- From: Allistair Crossley [mailto:[EMAIL PROTECTED] Sent: August 12, 2005 11:20 AM To: Tomcat Users List Subject: RE: Cannot compile jsp pages with log4j statements -- Tomcat 5.5.9 Can you post the JSP directives, and the scriplet that calls log4j? Also, you have been given a line number 39 .. can you work out which line this is in the work directory. Allistair. -Original Message- From: Gary Zhu [mailto:[EMAIL PROTECTED] Sent: 12 August 2005 16:17 To: Tomcat Users List Subject: Cannot compile jsp pages with log4j statements -- Tomcat 5.5.9 Hi all, I am having difficulties to figure out the solution for this issue. Jsp pages with log4j logging statements that worked perfect on Tomcat 4.1.30 could not compile on Tomcat 5.5.9. I commented out the log4j statements for these problematic pages, then, tomcat 5.5.9 could compile them. Except commenting out all the log4j statements for the jsp pages in order to run on Tomcat 5.5.9, does anyone have any other solutions? Below is the JasperException message when attempting to compile JSP pages with log4j statements: org.apache.jasper.JasperException: Unable to compile class for JSP An error occurred at line: 39 in the jsp file: /sysco/agent_report_all_in.jsp Generated servlet error: agent_report_all_in_jsp cannot be resolved or is not a type org.apache.jasper.compiler.DefaultErrorHandler.javacError(Defa ultErrorHa ndler.java:84) org.apache.jasper.compiler.ErrorDispatcher.javacError
RE: Listening on multiple ips
In the time it took you to write this email you could have tested this!! ;o) Looks reasonable so long as you want to connect direct to Tomcat on port 80 for each IP ... try it out and get back to us. Allistair. -Original Message- From: David Erickson [mailto:[EMAIL PROTECTED] Sent: 12 August 2005 17:20 To: tomcat-user@jakarta.apache.org Subject: Listening on multiple ips Hi I was just wondering what the best way to setup tomcat to listen to multiple ip addresses is? I have a box with 1 nic that has 3 ip addresses, the first address port 80 is in use by apache so I want it to listen on the 2nd and 3rd address. I also need to have different webapps be loaded for each of the addresses it is listening on. From looking at the conf file I was wondering if I can just create two connectors for each ip address ie: Connector address=X.X.X.61 port=80 maxThreads=150 minSpareThreads=25 maxSpareThreads=75 enableLookups=false redirectPort=443 acceptCount=100 debug=0 connectionTimeout=2 disableUploadTimeout=true / Connector address=X.X.X.62 port=80 maxThreads=150 minSpareThreads=25 maxSpareThreads=75 enableLookups=false redirectPort=443 acceptCount=100 debug=0 connectionTimeout=2 disableUploadTimeout=true / And then in the engine create two Host elements: Host name=X.X.X.61 debug=0 appBase=webapps-61 unpackWARs=true autoDeploy=true xmlValidation=false xmlNamespaceAware=false Host name=X.X.X.62 debug=0 appBase=webapps-62 unpackWARs=true autoDeploy=true xmlValidation=false xmlNamespaceAware=false Would this work? Thanks, David - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE --- QAS Ltd. Registered in England: No 2582055 Registered in Australia: No 082 851 474 --- /FONT - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: tomcat connect to IIs - Upload problem
Hi, What is the error that you receive when uploading 50kb? I know there was previously a bug with earlier versions of the now unsupported JK2 connector. If that's what you are using then you should upgrade to the latest JK 1.2.x connector. Allistair. -Original Message- From: Paulo Neves [mailto:[EMAIL PROTECTED] Sent: Mon 15/08/2005 18:30 To: tomcat-user@jakarta.apache.org Cc: Subject: tomcat connect to IIs - Upload problem Hi all, I have tomcat connected to IIs and working fine. But I can't upload files 50Kb, anyone knows what I need to change to permit upload files 50Kb ?? If I upload directly with tomcat works fine. Regards, Paulo -- -- Paulo Jorge Zagalo das Neves Linux User # 61096 -- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE --- QAS Ltd. Registered in England: No 2582055 Registered in Australia: No 082 851 474 --- /FONT - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Log4j writing to the same log file for different webapps
shouldn't that be log4j.logger.voteLogger=DEBUG, vote ?? else where will it get voteLogger from? -Original Message- From: Derek Merren [mailto:[EMAIL PROTECTED] Sent: 18 August 2005 15:42 To: tomcat-user@jakarta.apache.org Subject: Log4j writing to the same log file for different webapps Hi, I have a problem with Log4j. I have several webapps running on Tomcat. They all use Log4j. The problem is that they all log to the same file. The file they log to depends on which app is used first. It seems to be picking up the settings from the log4j.properties file of the app that is run first and using those settings for all the other apps. I have the Log4j.properties file for each application in the location -- tomcat/webapps/aplication1/WEB-INF/classes/ Here is an example of one of the log4j.properties files -- log4j.rootCategory=DEBUG, vote log4j.appender.vote=org.apache.log4j.ConsoleAppender log4j.appender.vote.layout=org.apache.log4j.PatternLayout log4j.appender.vote.layout.ConversionPattern=%d{dd MMM HH:mm:ss,SSS} %5p [%t] (%F:%L) - %m%n log4j.appender.vote=org.apache.log4j.RollingFileAppender log4j.appender.vote.File=/opt/tomcat/logs/vote.log log4j.appender.vote.MaxFileSize=100KB log4j.appender.vote.MaxBackupIndex=10 An example of the code in the app is -- //Create logger protected static Logger logger = Logger.getLogger(voteLogger); /** * Constructor for the DataAccessObject */ public DataAccessObject() throws SQLException, NamingException { logger.info(DataAccessObject() start constructor method); initialise(); } Any help would be very much appreciated. Best Regards, Derek - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE --- QAS Ltd. Registered in England: No 2582055 Registered in Australia: No 082 851 474 --- /FONT - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Advice for Hosting Many Individual Webapps?
we used to just schedule updates and let all our staff know there would be a small amount of downtime (for our intranet) but you can't do this on external production servers, so you need to go with either load balancing/clustering that allows you to close a node down *while also* letting sessions complete (e.g BigIP I think may do this). we have a semi-solution using mod_jk's load balancing/sticky sessions. Although closing a node does not wait until sessions are complete, mod_jk still detects the failed node and passes over to the next node gracefully. it's a 1/2 way house to a full solution that you can implement right away. for graceful close down (i.e sessions completing) you need something like BigIP or a commercial application server like BEA which does this for you. I really wish support for hot deployment got sorted out in Tomcat/J2EE servers in general. Although I am a J2EE die-hard I used C# .NET recently for a project and it beats the hell out of J2EE deployment, if we're not careful this will be a big win for .NET. -Original Message- From: Brian Cook [mailto:[EMAIL PROTECTED] Sent: 18 August 2005 15:55 To: Tomcat Users List Subject: Re: Advice for Hosting Many Individual Webapps? I think I missed something here. Are you not still bouncing Tomcat here? If so isnt the service still going down? What is the benifit of changign the ports around? I have a feeling I missed something in the expliation. George Sexton wrote: The technique I use is this: Run the HTTP connector on port 8080. Forward port 80 to port 8080. To re-start the system: edit the server.xml and run the HTTP connector on port 7080 Change the shutdown port to 8006 Start tomcat, and wait till it comes up. Re-run the firewall script to forward port 80 to port 7080. Stop the instance running on port 7080. The downside is that any active sessions get bounced and have to re-login. George Sexton MH Software, Inc. http://www.mhsoftware.com/ Voice: 303 438 9585 -Original Message- From: Seth Ladd [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 16, 2005 3:12 PM To: Tomcat Users List Subject: Advice for Hosting Many Individual Webapps? Hello, We are finding outselves hosting more and more individual webapps, all running on Tomcat 5.5.9 w/ JDK 1.5. Each of these webapps is developed and deployed on a separate schedule, and the number and frequency of app deployments is increasing. The frequency is so much that the uptime of all of our applications is affected as we continually take down Tomcat servers in production to deploy a new application (or new version of the application). Because hot deploy does not work (the old favorite OOM error w/ too many redeploys), we bounce the Tomcat server for every redeploy. To avoid taking down all of our applications when we need to redeploy a single app, we've begun to deploy each application to their own Tomcat instance. All of these instances are fronted by a single Apache server handling vhosts, logging, etc. We're just curious how common this setup really is. We know we are in an uncommon position, with so many webapps (approaching 20, and growing very fast). We don't want to put all our eggs in one basket, so to speak, so we've begun to split out individual tomcat instances. Anyone else have to handle numerous webapps, with frequent deploys, and have to keep uptime for all apps as high as possible? We hesitate to put all webapps in one tomcat, because to deploy one app means we have to take down all of our apps. This is becoming unacceptable. (not to mention that a memory leak in one app will bring down all the apps living in that tomcat instance) Any tips or tricks would be really appreciated. Or pointers to previous material (I've found some, but nothing that jumped out at me). Thanks very much in advance, Seth - 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] -- Brian Cook Digital Services Analyst Print Time Inc. [EMAIL PROTECTED] 913.345.8900 FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE --- QAS Ltd. Registered in England: No 2582055 Registered in Australia: No 082 851 474 --- /FONT - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
load balancing 2 tomcats on 1 machine question
Hi, I thought I had this sussed but it seems I haven't :( 2 tomcats, 1 machine, JK to balance with stick sessions. The following configuration works in that JK routes requests to both the tomcats and so on. The issue is that if I look in the access logs for each tomcat I can see that 1 session gets spread across both tomcats rather than staying on one. This question is ever so slightly related to a post earlier today by a poster who was seeing JK actually stay with the same tomcat, but still create a new session. My issue is that the requests do not stay with the same tomcat. Is anyone able to suggest why this is? Regards, Allistair. workers.tomcat_home=d:\jakarta-tomcat workers.java_home=c:\Program Files\Java\jdk1.5.0 ps=\ worker.list=loadbalancer worker.tomcat1.port=8009 worker.tomcat1.host=localhost worker.tomcat1.type=ajp13 worker.tomcat1.lbfactor=1 worker.tomcat1.cachesize=1 worker.tomcat2.port=8109 worker.tomcat2.host=localhost worker.tomcat2.type=ajp13 worker.tomcat2.lbfactor=1 worker.tomcat2.cachesize=1 worker.loadbalancer.type=lb worker.loadbalancer.sticky_session=true worker.loadbalancer.method=R worker.loadbalancer.balanced_workers=tomcat1,tomcat2 worker.inprocess.type=jni worker.inprocess.class_path=$(workers.tomcat_home)$(ps)lib$(ps)tomcat.jar worker.inprocess.cmd_line=start worker.inprocess.jvm_lib=$(workers.java_home)$(ps)jre$(ps)bin$(ps)classic$(ps)jvm.dll worker.inprocess.stdout=$(workers.tomcat_home)$(ps)logs$(ps)inprocess.stdout worker.inprocess.stderr=$(workers.tomcat_home)$(ps)logs$(ps)inprocess.stderr FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE --- QAS Ltd. Registered in England: No 2582055 Registered in Australia: No 082 851 474 --- /FONT
RE: load balancing 2 tomcats on 1 machine question
Hi Mladen, Damn, no, I didn't :) Thanks very much indeed, seems to have done the trick :) Cheers, Allistair. -Original Message- From: Mladen Turk [mailto:[EMAIL PROTECTED] Sent: 18 August 2005 17:17 To: Tomcat Users List Subject: Re: load balancing 2 tomcats on 1 machine question Allistair Crossley wrote: Hi, I thought I had this sussed but it seems I haven't :( 2 tomcats, 1 machine, JK to balance with stick sessions. The following configuration works in that JK routes requests to both the tomcats and so on. Did you set the jvmRoute=tomcat1 inside server.xml Engine tag for the first and jvmRoute=tomcat2 for the second instance. workers.tomcat_home=d:\jakarta-tomcat workers.java_home=c:\Program Files\Java\jdk1.5.0 ps=\ You don't need that worker.inprocess.type=jni worker.inprocess.class_path=$(workers.tomcat_home)$(ps)lib$(ps )tomcat.jar worker.inprocess.cmd_line=start worker.inprocess.jvm_lib=$(workers.java_home)$(ps)jre$(ps)bin$ (ps)classic$(ps)jvm.dll worker.inprocess.stdout=$(workers.tomcat_home)$(ps)logs$(ps)in process.stdout worker.inprocess.stderr=$(workers.tomcat_home)$(ps)logs$(ps)in process.stderr You don't need that too. Regards, Mladen. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE --- QAS Ltd. Registered in England: No 2582055 Registered in Australia: No 082 851 474 --- /FONT - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Java 1.4.2_08 and up breaks Jstl
Ensure that your class members all have getters, since person.language.localeName will call person.getLanguage().getLocaleName() Allistair. -Original Message- From: Martyn Hiemstra [mailto:[EMAIL PROTECTED] Sent: 22 August 2005 09:55 To: Tomcat Users List Subject: Re: Java 1.4.2_08 and up breaks Jstl Hi All First of all my jsp file looks like this Contents Jsp File: %@ page language=java % %@ page contentType=text/html; charset=UTF-8 % %@ taglib uri=http://java.sun.com/jstl/fmt; prefix=fmt % %@ taglib uri=http://java.sun.com/jstl/core; prefix=c % c:out value=${person.language.localeName} / The error occures on the line with the person.language.localeName. Person is a object in the session. The code prints the locale name the person has chosen. System Debian Sarge Tomcat: Tomcat 5.0.27 (I have also tried 5.0.28) Java I have Java j2sdk 1.4.2_05 installed under /opt/j2sdk1.4.2_05. I have created a sym link from /opt/java to /opt/j2sdk1.4.2_05. I have JAVA_HOME point to /opt/java. This runs perfectly. I then install j2sdk 1.4.2_08 under /opt and then have /opt/java point to /opt/j2sdk1.4.2_08. I stop tomcat. Wait and check to see that no occurance is running in the memory anymore. I then start up tomcat. When calling the same jsp file that worked with the previous version of Java I get this error in the catalina.out: 2005-08-11 11:37:06 StandardWrapperValve[jsp]: Servlet.service() for servlet jsp threw exception javax.servlet.jsp.JspException: An error occurred while evaluating custom action attribute value with value ${person.language.localeName}: Unable to find a value for language in object of class com.jatse.api.User using operator . (null) at org.apache.taglibs.standard.lang.jstl.Evaluator.evaluate(Evalu ator.java:146) at org.apache.taglibs.standard.lang.jstl.Evaluator.evaluate(Evalu ator.java:166) at org.apache.taglibs.standard.lang.support.ExpressionEvaluatorMa nager.evaluate(ExpressionEvaluatorManager.java:112) at org.apache.taglibs.standard.tag.el.fmt.SetLocaleTag.evaluateEx pressions(SetLocaleTag.java:141) at org.apache.taglibs.standard.tag.el.fmt.SetLocaleTag.doStartTag (SetLocaleTag.java:101) at org.apache.jsp.index_jsp._jspx_meth_fmt_setLocale_0(index_jsp. java:146) at org.apache.jsp.index_jsp._jspService(index_jsp.java:100) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at org.apache.jasper.servlet.JspServletWrapper.service(JspServlet Wrapper.java:324) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet .java:292) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilt er(ApplicationFilterChain.java:237) at org.apache.catalina.core.ApplicationFilterChain.doFilter(Appli cationFilterChain.java:157) at com.jatse.website.filters.PersonFilter.doFilter(PersonFilter.java:42) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilt er(ApplicationFilterChain.java:186) at org.apache.catalina.core.ApplicationFilterChain.doFilter(Appli cationFilterChain.java:157) at com.jatse.website.filters.SetCharacterEncodingFilter.doFilter( SetCharacterEncodingFilter.java:128) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilt er(ApplicationFilterChain.java:186) at org.apache.catalina.core.ApplicationFilterChain.doFilter(Appli cationFilterChain.java:157) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardW rapperValve.java:214) at org.apache.catalina.core.StandardValveContext.invokeNext(Stand ardValveContext.java:104) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipel ine.java:520) at org.apache.catalina.core.StandardContextValve.invokeInternal(S tandardContextValve.java:198) at org.apache.catalina.core.StandardContextValve.invoke(StandardC ontextValve.java:152) at org.apache.catalina.core.StandardValveContext.invokeNext(Stand ardValveContext.java:104) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipel ine.java:520) at org.apache.catalina.core.StandardHostValve.invoke(StandardHost Valve.java:137) at org.apache.catalina.core.StandardValveContext.invokeNext(Stand ardValveContext.java:104) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReport Valve.java:117) at org.apache.catalina.core.StandardValveContext.invokeNext(Stand ardValveContext.java:102) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipel ine.java:520) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEn gineValve.java:109) at
Deploying ROOT.war indicates missing application web.xml
Hi Everyone, Just been deploying ROOT.war into webapps and it's failing to explode. The logs indicate; INFO: Deploying web application archive ROOT.war 22-Aug-2005 09:46:44 org.apache.catalina.startup.ContextConfig applicationWebConfig INFO: Missing application web.xml, using defaults only ^^^ Yet, if I rename ROOT.war to ROOT.zip and open it in WinZip, the web.xml has been correctly packed by the Ant WAR task. Indeed if I unzip the WAR into webapps manually, the web application works fine and is packaged correctly. I use an Ant WAR task war destFile=${dist.dir}/${app.name}.war webxml=${webroot.dir}/WEB-INF/web.xml duplicate=preserve classes dir=${classes.dir} / lib dir=${webroot.dir}/WEB-INF/lib / webinf dir=${webroot.dir}/WEB-INF / metainf dir=${webroot.dir}/META-INF / fileset dir=${webroot.dir} include name=includes/** / include name=resources/** / include name=views/** / /fileset /war Any ideas why Tomcat is exhibiting this behaviour? Cheers, Allistair. FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE --- QAS Ltd. Registered in England: No 2582055 Registered in Australia: No 082 851 474 --- /FONT
RE: Java 1.4.2_08 and up breaks Jstl
If you do have com.jatse.api.User.getLanguage() then the problem is that language is null. Test with c:if test=${empty person.language} language is null /c:if Allistair. -Original Message- From: Allistair Crossley Sent: 22 August 2005 10:19 To: Tomcat Users List Subject: RE: Java 1.4.2_08 and up breaks Jstl Ensure that your class members all have getters, since person.language.localeName will call person.getLanguage().getLocaleName() Allistair. -Original Message- From: Martyn Hiemstra [mailto:[EMAIL PROTECTED] Sent: 22 August 2005 09:55 To: Tomcat Users List Subject: Re: Java 1.4.2_08 and up breaks Jstl Hi All First of all my jsp file looks like this Contents Jsp File: %@ page language=java % %@ page contentType=text/html; charset=UTF-8 % %@ taglib uri=http://java.sun.com/jstl/fmt; prefix=fmt % %@ taglib uri=http://java.sun.com/jstl/core; prefix=c % c:out value=${person.language.localeName} / The error occures on the line with the person.language.localeName. Person is a object in the session. The code prints the locale name the person has chosen. System Debian Sarge Tomcat: Tomcat 5.0.27 (I have also tried 5.0.28) Java I have Java j2sdk 1.4.2_05 installed under /opt/j2sdk1.4.2_05. I have created a sym link from /opt/java to /opt/j2sdk1.4.2_05. I have JAVA_HOME point to /opt/java. This runs perfectly. I then install j2sdk 1.4.2_08 under /opt and then have /opt/java point to /opt/j2sdk1.4.2_08. I stop tomcat. Wait and check to see that no occurance is running in the memory anymore. I then start up tomcat. When calling the same jsp file that worked with the previous version of Java I get this error in the catalina.out: 2005-08-11 11:37:06 StandardWrapperValve[jsp]: Servlet.service() for servlet jsp threw exception javax.servlet.jsp.JspException: An error occurred while evaluating custom action attribute value with value ${person.language.localeName}: Unable to find a value for language in object of class com.jatse.api.User using operator . (null) at org.apache.taglibs.standard.lang.jstl.Evaluator.evaluate(Evalu ator.java:146) at org.apache.taglibs.standard.lang.jstl.Evaluator.evaluate(Evalu ator.java:166) at org.apache.taglibs.standard.lang.support.ExpressionEvaluatorMa nager.evaluate(ExpressionEvaluatorManager.java:112) at org.apache.taglibs.standard.tag.el.fmt.SetLocaleTag.evaluateEx pressions(SetLocaleTag.java:141) at org.apache.taglibs.standard.tag.el.fmt.SetLocaleTag.doStartTag (SetLocaleTag.java:101) at org.apache.jsp.index_jsp._jspx_meth_fmt_setLocale_0(index_jsp. java:146) at org.apache.jsp.index_jsp._jspService(index_jsp.java:100) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at org.apache.jasper.servlet.JspServletWrapper.service(JspServlet Wrapper.java:324) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet .java:292) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilt er(ApplicationFilterChain.java:237) at org.apache.catalina.core.ApplicationFilterChain.doFilter(Appli cationFilterChain.java:157) at com.jatse.website.filters.PersonFilter.doFilter(PersonFilter.java:42) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilt er(ApplicationFilterChain.java:186) at org.apache.catalina.core.ApplicationFilterChain.doFilter(Appli cationFilterChain.java:157) at com.jatse.website.filters.SetCharacterEncodingFilter.doFilter( SetCharacterEncodingFilter.java:128) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilt er(ApplicationFilterChain.java:186) at org.apache.catalina.core.ApplicationFilterChain.doFilter(Appli cationFilterChain.java:157) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardW rapperValve.java:214) at org.apache.catalina.core.StandardValveContext.invokeNext(Stand ardValveContext.java:104) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipel ine.java:520) at org.apache.catalina.core.StandardContextValve.invokeInternal(S tandardContextValve.java:198) at org.apache.catalina.core.StandardContextValve.invoke(StandardC ontextValve.java:152) at org.apache.catalina.core.StandardValveContext.invokeNext(Stand ardValveContext.java:104) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipel ine.java:520) at org.apache.catalina.core.StandardHostValve.invoke(StandardHost Valve.java:137
RE: Deploying ROOT.war indicates missing application web.xml
Hi, Just to reconfirm, and also to take into account what you did in your test 0. Check server.xml for unpackWARs=true autoDeploy=true 1. I use Ant's war task to correctly war the web application package. 2. I clear Tomcat's webapps folder and restart for good measure. 3. I copy the war into webapps 4. Tomcat reports INFO: Deploying web application archive ROOT.war 22-Aug-2005 11:14:02 org.apache.catalina.startup.ContextConfig applicationWebConfig INFO: Missing application web.xml, using defaults only StandardEngine[Catalina].StandardHost[localhost].StandardContext[] 5. I rename ROOT.war to ROOT.zip and open in WinZip to check file structure, in particular web.xml and to ensure that ROOT is not part of packaged paths. 6. I unzip ROOT.zip to webapps\ROOT 7. I make a request to the web application which succeeds including filters defined in the web.xml 8. Stop Tomcat 9. With WinZip, rezip the tested working ROOT folder contents 10. Delete webapps\ROOT 11. Rename ROOT.zip to ROOT.war 12. Cut ROOT.war onto Desktop. 13. Start Tomcat 14. Cut ROOT.war into webapps 15. Get same error. INFO: Deploying web application archive ROOT.war 22-Aug-2005 11:14:02 org.apache.catalina.startup.ContextConfig applicationWebConfig INFO: Missing application web.xml, using defaults only StandardEngine[Catalina].StandardHost[localhost].StandardContext[] Could the fact that my ROOT.war is 18MB have anything to do with Tomcat's ability to examine for the web.xml??? (wild guess) Thanks, Allistair. -Original Message- From: Remy Maucherat [mailto:[EMAIL PROTECTED] Sent: 22 August 2005 10:56 To: Tomcat Users List Subject: Re: Deploying ROOT.war indicates missing application web.xml On 8/22/05, Allistair Crossley [EMAIL PROTECTED] wrote: Hi Everyone, Just been deploying ROOT.war into webapps and it's failing to explode. The logs indicate; INFO: Deploying web application archive ROOT.war 22-Aug-2005 09:46:44 org.apache.catalina.startup.ContextConfig applicationWebConfig INFO: Missing application web.xml, using defaults only ^^^ Yet, if I rename ROOT.war to ROOT.zip and open it in WinZip, the web.xml has been correctly packed by the Ant WAR task. Indeed if I unzip the WAR into webapps manually, the web application works fine and is packaged correctly. I use an Ant WAR task war destFile=${dist.dir}/${app.name}.war webxml=${webroot.dir}/WEB-INF/web.xml duplicate=preserve classes dir=${classes.dir} / lib dir=${webroot.dir}/WEB-INF/lib / webinf dir=${webroot.dir}/WEB-INF / metainf dir=${webroot.dir}/META-INF / fileset dir=${webroot.dir} include name=includes/** / include name=resources/** / include name=views/** / /fileset /war Any ideas why Tomcat is exhibiting this behaviour? I just tried it by zipping and removing the ROOT folder, replacing it with ROOT.war. It gets expanded and deployed correctly. -- x Rémy Maucherat Developer Consultant JBoss Group (Europe) SàRL x - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE --- QAS Ltd. Registered in England: No 2582055 Registered in Australia: No 082 851 474 --- /FONT - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Deploying ROOT.war indicates missing application web.xml
Hi, Yes, the default ROOT.war does appear to work in the way I have been trying to deploy my own ROOT.war, you're right there. Nevertheless I will hold that there are a lot of potential differences between the empty default ROOT and an 18MB struts/spring/hibernate etc... real-world web application so I am not convinced just yet that it's my web application packaging (especially with the valid tests I have shown by manual unpack). I will see if I can pursue the reason and come back to you. Kindest regards, Allistair. PS: thanks for the usual insult, i'd expect no less. -Original Message- From: Remy Maucherat [mailto:[EMAIL PROTECTED] Sent: 22 August 2005 11:32 To: Tomcat Users List Subject: Re: Deploying ROOT.war indicates missing application web.xml On 8/22/05, Allistair Crossley [EMAIL PROTECTED] wrote: Hi, Just to reconfirm, and also to take into account what you did in your test 0. Check server.xml for unpackWARs=true autoDeploy=true 1. I use Ant's war task to correctly war the web application package. I used 7zip. 2. I clear Tomcat's webapps folder and restart for good measure. I only deleted the ROOT folder. 3. I copy the war into webapps 4. Tomcat reports INFO: Deploying web application archive ROOT.war 22-Aug-2005 11:14:02 org.apache.catalina.startup.ContextConfig applicationWebConfig INFO: Missing application web.xml, using defaults only StandardEngine[Catalina].StandardHost[localhost].StandardContext[] 5. I rename ROOT.war to ROOT.zip and open in WinZip to check file structure, in particular web.xml and to ensure that ROOT is not part of packaged paths. 6. I unzip ROOT.zip to webapps\ROOT 7. I make a request to the web application which succeeds including filters defined in the web.xml 8. Stop Tomcat 9. With WinZip, rezip the tested working ROOT folder contents 10. Delete webapps\ROOT 11. Rename ROOT.zip to ROOT.war 12. Cut ROOT.war onto Desktop. 13. Start Tomcat 14. Cut ROOT.war into webapps 15. Get same error. INFO: Deploying web application archive ROOT.war 22-Aug-2005 11:14:02 org.apache.catalina.startup.ContextConfig applicationWebConfig INFO: Missing application web.xml, using defaults only StandardEngine[Catalina].StandardHost[localhost].StandardContext[] Could the fact that my ROOT.war is 18MB have anything to do with Tomcat's ability to examine for the web.xml??? (wild guess) I know you like funny theories, but how about trying with the default ROOT webapp then ? -- x Rémy Maucherat Developer Consultant JBoss Group (Europe) SàRL x - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE --- QAS Ltd. Registered in England: No 2582055 Registered in Australia: No 082 851 474 --- /FONT - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Deploying ROOT.war indicates missing application web.xml
Hi, OK, I've found the issue :( The Ant war task appears to have packed all files that were in the root of WEB-INF within a packed path of as web-inf (i.e lowercase) although not the classes which are packed within an uppercase WEB-INF. Looks like the funny theory is funny afterall. Cheers, Allistair. -Original Message- From: Allistair Crossley Sent: 22 August 2005 11:48 To: Tomcat Users List Subject: RE: Deploying ROOT.war indicates missing application web.xml Hi, Yes, the default ROOT.war does appear to work in the way I have been trying to deploy my own ROOT.war, you're right there. Nevertheless I will hold that there are a lot of potential differences between the empty default ROOT and an 18MB struts/spring/hibernate etc... real-world web application so I am not convinced just yet that it's my web application packaging (especially with the valid tests I have shown by manual unpack). I will see if I can pursue the reason and come back to you. Kindest regards, Allistair. PS: thanks for the usual insult, i'd expect no less. -Original Message- From: Remy Maucherat [mailto:[EMAIL PROTECTED] Sent: 22 August 2005 11:32 To: Tomcat Users List Subject: Re: Deploying ROOT.war indicates missing application web.xml On 8/22/05, Allistair Crossley [EMAIL PROTECTED] wrote: Hi, Just to reconfirm, and also to take into account what you did in your test 0. Check server.xml for unpackWARs=true autoDeploy=true 1. I use Ant's war task to correctly war the web application package. I used 7zip. 2. I clear Tomcat's webapps folder and restart for good measure. I only deleted the ROOT folder. 3. I copy the war into webapps 4. Tomcat reports INFO: Deploying web application archive ROOT.war 22-Aug-2005 11:14:02 org.apache.catalina.startup.ContextConfig applicationWebConfig INFO: Missing application web.xml, using defaults only StandardEngine[Catalina].StandardHost[localhost].StandardContext[] 5. I rename ROOT.war to ROOT.zip and open in WinZip to check file structure, in particular web.xml and to ensure that ROOT is not part of packaged paths. 6. I unzip ROOT.zip to webapps\ROOT 7. I make a request to the web application which succeeds including filters defined in the web.xml 8. Stop Tomcat 9. With WinZip, rezip the tested working ROOT folder contents 10. Delete webapps\ROOT 11. Rename ROOT.zip to ROOT.war 12. Cut ROOT.war onto Desktop. 13. Start Tomcat 14. Cut ROOT.war into webapps 15. Get same error. INFO: Deploying web application archive ROOT.war 22-Aug-2005 11:14:02 org.apache.catalina.startup.ContextConfig applicationWebConfig INFO: Missing application web.xml, using defaults only StandardEngine[Catalina].StandardHost[localhost].StandardContext[] Could the fact that my ROOT.war is 18MB have anything to do with Tomcat's ability to examine for the web.xml??? (wild guess) I know you like funny theories, but how about trying with the default ROOT webapp then ? -- x Rémy Maucherat Developer Consultant JBoss Group (Europe) SàRL x - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE --- QAS Ltd. Registered in England: No 2582055 Registered in Australia: No 082 851 474 --- /FONT - 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: Deploying ROOT.war indicates missing application web.xml
Hi, Nope, but that looks helpful, Many thanks, Allistair. -Original Message- From: Longson, Robert [mailto:[EMAIL PROTECTED] Sent: 22 August 2005 12:11 To: Tomcat Users List Subject: RE: Deploying ROOT.war indicates missing application web.xml Haveyou seen this article? http://ant.apache.org/faq.html#winzip-lies Best regards Robert -Original Message- From: Allistair Crossley [mailto:[EMAIL PROTECTED] Sent: 22 August 2005 11:59 To: Tomcat Users List Subject: RE: Deploying ROOT.war indicates missing application web.xml Hi, OK, I've found the issue :( The Ant war task appears to have packed all files that were in the root of WEB-INF within a packed path of as web-inf (i.e lowercase) although not the classes which are packed within an uppercase WEB-INF. Looks like the funny theory is funny afterall. Cheers, Allistair. -Original Message- From: Allistair Crossley Sent: 22 August 2005 11:48 To: Tomcat Users List Subject: RE: Deploying ROOT.war indicates missing application web.xml Hi, Yes, the default ROOT.war does appear to work in the way I have been trying to deploy my own ROOT.war, you're right there. Nevertheless I will hold that there are a lot of potential differences between the empty default ROOT and an 18MB struts/spring/hibernate etc... real-world web application so I am not convinced just yet that it's my web application packaging (especially with the valid tests I have shown by manual unpack). I will see if I can pursue the reason and come back to you. Kindest regards, Allistair. PS: thanks for the usual insult, i'd expect no less. -Original Message- From: Remy Maucherat [mailto:[EMAIL PROTECTED] Sent: 22 August 2005 11:32 To: Tomcat Users List Subject: Re: Deploying ROOT.war indicates missing application web.xml On 8/22/05, Allistair Crossley [EMAIL PROTECTED] wrote: Hi, Just to reconfirm, and also to take into account what you did in your test 0. Check server.xml for unpackWARs=true autoDeploy=true 1. I use Ant's war task to correctly war the web application package. I used 7zip. 2. I clear Tomcat's webapps folder and restart for good measure. I only deleted the ROOT folder. 3. I copy the war into webapps 4. Tomcat reports INFO: Deploying web application archive ROOT.war 22-Aug-2005 11:14:02 org.apache.catalina.startup.ContextConfig applicationWebConfig INFO: Missing application web.xml, using defaults only StandardEngine[Catalina].StandardHost[localhost].StandardContext[] 5. I rename ROOT.war to ROOT.zip and open in WinZip to check file structure, in particular web.xml and to ensure that ROOT is not part of packaged paths. 6. I unzip ROOT.zip to webapps\ROOT 7. I make a request to the web application which succeeds including filters defined in the web.xml 8. Stop Tomcat 9. With WinZip, rezip the tested working ROOT folder contents 10. Delete webapps\ROOT 11. Rename ROOT.zip to ROOT.war 12. Cut ROOT.war onto Desktop. 13. Start Tomcat 14. Cut ROOT.war into webapps 15. Get same error. INFO: Deploying web application archive ROOT.war 22-Aug-2005 11:14:02 org.apache.catalina.startup.ContextConfig applicationWebConfig INFO: Missing application web.xml, using defaults only StandardEngine[Catalina].StandardHost[localhost].StandardContext[] Could the fact that my ROOT.war is 18MB have anything to do with Tomcat's ability to examine for the web.xml??? (wild guess) I know you like funny theories, but how about trying with the default ROOT webapp then ? -- x Rémy Maucherat Developer Consultant JBoss Group (Europe) SàRL x - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE --- QAS Ltd. Registered in England: No 2582055 Registered in Australia: No 082 851 474 --- /FONT - 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] The information contained in this message is intended only for the recipient, and may be a confidential attorney-client communication or may otherwise be privileged and confidential
RE: tomcat 5.5.9 not recompiling JSPs
compiled pages are just classes, and so long as they are mapped correctly in the web.xml you'll be ok. -Original Message- From: Paul Singleton [mailto:[EMAIL PROTECTED] Sent: 22 August 2005 15:13 To: Tomcat Users List Cc: [EMAIL PROTECTED] Subject: Re: tomcat 5.5.9 not recompiling JSPs Mark Hagger wrote: ... Although to be honest I suspect that the best solution for production boxes is to pre-compile all jsps into the war file anyway. Is this possible? Don't different containers store the compiled pages in different places, with different names? Paul Singleton -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.338 / Virus Database: 267.10.13/78 - Release Date: 19/Aug/2005 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE --- QAS Ltd. Registered in England: No 2582055 Registered in Australia: No 082 851 474 --- /FONT - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Has anyone used Tomcat 5.5.9 connecting to MS SQL Server usin g JNDI?
()); } catch(IOException IOe) { logger.error(ERROR - IOException occurred: +IOe) ; logger.error(IOe.getMessage()) ; } catch(Exception e) { log(ERROR - Exception occurred: +e) ; logger.error(ERROR - Exception occurred: +e) ; logger.error(e.getMessage()) ; } == -Original Message- From: Allistair Crossley [mailto:[EMAIL PROTECTED] Sent: 11 August 2005 12:10 To: Tomcat Users List Subject: RE: Has anyone used Tomcat 5.5.9 connecting to MS SQL Server using JNDI? Hi, A) First, can you clarify which method you have opted for now of; 1. TOMCAT_HOME/webapps/webappname/META-INF/context.xml or 2. TOMCAT_HOME/conf/Catalina/localhost/webappname.xml B) Ensure your database JAR(s) are in TOMCAT_HOME/common/lib (not in your webapp lib). C) Try something simpler ... DataSource dataSource = null; try { Context ctx = new InitialContext(); dataSource = (DataSource) ctx.lookup(java:comp/env/jdbc/UKportalPool); } catch (NamingException nE) { log.error(nE.getMessage()); } catch (NullPointerException npE) { log.error(npE.getMessage()); } Allistair. -Original Message- From: Wylie, Ian [mailto:[EMAIL PROTECTED] Sent: 11 August 2005 12:02 To: Tomcat Users List Subject: RE: Has anyone used Tomcat 5.5.9 connecting to MS SQL Server using JNDI? Alistair, Well I have learned something that I was doing wrong, but after removing the webappname.xml I get the same error. Any more ideas? Thanks, Ian -Original Message- From: Allistair Crossley [mailto:[EMAIL PROTECTED] Sent: 11 August 2005 11:53 To: Tomcat Users List Subject: RE: Has anyone used Tomcat 5.5.9 connecting to MS SQL Server using JNDI? Hi, You can only configure a web application in 1 place. You can't use *both* context.xml AND a webappname.xml. I think the TOMCAT_HOME\conf\Catalina\localhost method is tried first, and because this does not have any of your datasources in it you get your problems. Decide on either TOMCAT_HOME\conf\Catalina\localhost\webappname.xml or META-INF/context.xml and see if you get any further first. Cheers, Allistair -Original Message- From: Wylie, Ian [mailto:[EMAIL PROTECTED] Sent: 11 August 2005 11:47 To: Tomcat Users List Subject: RE: Has anyone used Tomcat 5.5.9 connecting to MS SQL Server using JNDI? Alistair, For configuration purposes I attach the Context.xml, web.xml and mininPCO-practise.xml - which is the web application file which resides in TOMCAT_HOME\conf\Catalina\localhost directory. The error message is basically Cannot create resource instance. (Full Error message attached below.) The Java code above works in 4.1.31, so I am not really worried about this, unless Tomcat 5.5.9 works differently. Here is the code snippet from the java class PortletHelper that is being executed which produces the error at the end of this email. Well I think that is all that anyone needs to check out my app. If anyone can offer some good advice on this, it would be much appreciated. Best Regards, Ian == = JAVA CODE SNIPPET START logger.debug(Before InitialContext.) ; InitialContext ctx = new InitialContext(); if (ctx == null) { log(ERROR initialising InitialContext.) ; logger.error(ERROR initialising InitialContext.) ; } log(Before Context.) ; Context envCtx = (Context) ctx.lookup(java:comp/env); if (envCtx != null) { log(Before initialising DataSource.) ; ConnectionPoolDataSource ds = (ConnectionPoolDataSource)envCtx.lookup(jdbc/UKportalPool); if(ds != null) { pCon = ds.getPooledConnection(); JAVA CODE SNIPPET END == ERROR MESSAGE START 10-Aug-2005 15:26:56 org.apache.catalina.core.ApplicationContext log INFO: OMTLreport: Before Context. 10-Aug-2005 15:26:56
RE: logging tomcat 5.5
actually you don't *have* to use log4j, since 5.5.8/9 tomcat has shipped with a customised jdk logging configuration (juli) that sets up a localhost log for you out of the box -Original Message- From: Alain Gaeremynck [mailto:[EMAIL PROTECTED] Sent: 23 August 2005 16:09 To: Tomcat Users List Subject: logging tomcat 5.5 I read the doc and found out that in tomcat 5.5 we are suppose to use log 4 j to handle getServletContext.log. However i rather liked the old ways Is it stil supported? if i put this in my context Logger className=org.apache.catalina.logger.FileLogger prefix=servlet. suffix=.log timestamp=true / will it still work? -- Alain Gaeremynck CTO Le Groupe Interstructure (514) 374-1110 (514) 825-7810 cell weblog: http://www.sanssucre.ca (En informatique, comme en musique, n'importe quoi sauf du commercial) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE --- QAS Ltd. Registered in England: No 2582055 Registered in Australia: No 082 851 474 --- /FONT - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: jndi question
Hi, The documentation says; Context initCtx = new InitialContext(); Context envCtx = (Context) initCtx.lookup(java:comp/env); DataSource ds = (DataSource) envCtx.lookup(jdbc/EmployeeDB); However, we use; try { Context ctx = new InitialContext(); dataSource = (DataSource) ctx.lookup(java:comp/env/jdbc/yourdb); } catch (NamingException nE) { // log somewhere } catch (NullPointerException npE) { // log somewhere } Does that work for you? Allistair -Original Message- From: Sean Rowe [mailto:[EMAIL PROTECTED] Sent: 23 August 2005 16:29 To: Tomcat Users List Subject: Re: jndi question Brian, thank you for replying. I was afraid my topic was dead. If you could look at my first post, I listed all the files that you have suggested I take a look at. I have done everything you have suggested, but am still getting errors. The error I am getting now is javax.naming.NameNotFoundException: Name java:comp is not bound in this Context I can't find anything on the net or in any books I've looked at that explains this. As far as I can tell, java:comp should just be there. Any ideas? Thanks again. Sean Brian Cook wrote: Yes you can use JNDI with out using JSTL. But the only way to configure it is to define the JNDI resources in the web.xml and context.xml files.Technically you should be able to use the globally defined JNDI resources in server.xml, and I have seen configuration set ups doing it when googling. But could never get them to work. This highlights another area of seemingly unneeded complication in Java/Unix development. Using JNDI for data sources which was supposed to help you save time requires that you redundantly define the JNDI resource in at lest 2 if not 3 places. The admin tool which was also supposed to help save time defines the JNDI resources in server.xml which does not really seem to be all that helpful. I am sure there is likely a reason for this but I am ignorant of it. The admin tool is also supposed to let you define JNDI resources per context but it errors out when ever I have tried it. My experience with the Tomcat Admin and Manager tools is that they are worthless. Of the few steps they try to help with more often that not they just return errors when you need to use it. I removed them both and have gone back to doing set ups manually and there has not been much of a time difference doing it this way. Any way for JNDI to work you will have to add the definition for it in both web.xml and context.xml in the Tomcat Folder/conf/Catalina/localhost/ folder. This seems counter productive since it makes your app less portable having the data base configuration details inside the context and by extent the WAR file but it is what you have to do to get it to work right now. I feel your pain I know it is frustrating spending hours debugging just the DB connection but todate that is the reality of Java web app development. It is why I fear we will all be .Net developers some day. Example : http://jakarta.apache.org/tomcat/tomcat-5.5-doc/jndi-resources -howto.html CODE Context initCtx = new InitialContext(); Context envCtx = (Context) initCtx.lookup(java:comp/env); DataSource ds = (DataSource) envCtx.lookup(jdbc/EmployeeDB); Connection conn = ds.getConnection(); ... use this connection to access the database ... conn.close(); /CODE WEB.XML resource-ref description Resource reference to a factory for java.sql.Connection instances that may be used for talking to a particular database that is configured in the server.xml file. /description res-ref-name jdbc/EmployeeDB /res-ref-name res-type javax.sql.DataSource /res-type res-auth Container /res-auth /resource-ref /WEB.XML CONTEXT FILE Context Resource name=jdbc/EmployeeDB auth=Container type=javax.sql.DataSource username=dbusername password=dbpassword driverClassName=org.hsql.jdbcDriver url=jdbc:HypersonicSQL:database maxActive=8 maxIdle=4/ /Context /CONTEXT FILE Sean Rowe wrote: Dirk, I'm sorry I didn't see the difference on the page you sent me to. However, if there is a way I can do this without having to use jstl, I would really like to know. I was hoping to put the code in a class somewhere that my servlets could use. thanks, sean Dirk Weigenand wrote: Sean, --- Ursprüngliche Nachricht --- Von: Sean Rowe [EMAIL PROTECTED] An: Tomcat Users List tomcat-user@jakarta.apache.org Betreff: Re: jndi question Datum: Mon, 22 Aug 2005 09:24:10 -0500 Thanks for responding Dirk. I've practically memorized the documentation on the link you
RE: jndi question
If you could please send 1. server.xml 2. web.xml 3. context.xml or yourwebapp.xml 4. list of files in common/lib 5. list of files in yourwebapp/WEB-INF/lib I'd be happy to see if I can spot anything. -Original Message- From: Sean Rowe [mailto:[EMAIL PROTECTED] Sent: 23 August 2005 16:41 To: Tomcat Users List Subject: Re: jndi question no, that didn't help. thanks though. could this maybe be a class problem? am i using the wrong jar files? i can list the files i'm using if anyone thinks it might be the problem Allistair Crossley wrote: Hi, The documentation says; Context initCtx = new InitialContext(); Context envCtx = (Context) initCtx.lookup(java:comp/env); DataSource ds = (DataSource) envCtx.lookup(jdbc/EmployeeDB); However, we use; try { Context ctx = new InitialContext(); dataSource = (DataSource) ctx.lookup(java:comp/env/jdbc/yourdb); } catch (NamingException nE) { // log somewhere } catch (NullPointerException npE) { // log somewhere } Does that work for you? Allistair -Original Message- From: Sean Rowe [mailto:[EMAIL PROTECTED] Sent: 23 August 2005 16:29 To: Tomcat Users List Subject: Re: jndi question Brian, thank you for replying. I was afraid my topic was dead. If you could look at my first post, I listed all the files that you have suggested I take a look at. I have done everything you have suggested, but am still getting errors. The error I am getting now is javax.naming.NameNotFoundException: Name java:comp is not bound in this Context I can't find anything on the net or in any books I've looked at that explains this. As far as I can tell, java:comp should just be there. Any ideas? Thanks again. Sean Brian Cook wrote: Yes you can use JNDI with out using JSTL. But the only way to configure it is to define the JNDI resources in the web.xml and context.xml files.Technically you should be able to use the globally defined JNDI resources in server.xml, and I have seen configuration set ups doing it when googling. But could never get them to work. This highlights another area of seemingly unneeded complication in Java/Unix development. Using JNDI for data sources which was supposed to help you save time requires that you redundantly define the JNDI resource in at lest 2 if not 3 places. The admin tool which was also supposed to help save time defines the JNDI resources in server.xml which does not really seem to be all that helpful. I am sure there is likely a reason for this but I am ignorant of it. The admin tool is also supposed to let you define JNDI resources per context but it errors out when ever I have tried it. My experience with the Tomcat Admin and Manager tools is that they are worthless. Of the few steps they try to help with more often that not they just return errors when you need to use it. I removed them both and have gone back to doing set ups manually and there has not been much of a time difference doing it this way. Any way for JNDI to work you will have to add the definition for it in both web.xml and context.xml in the Tomcat Folder/conf/Catalina/localhost/ folder. This seems counter productive since it makes your app less portable having the data base configuration details inside the context and by extent the WAR file but it is what you have to do to get it to work right now. I feel your pain I know it is frustrating spending hours debugging just the DB connection but todate that is the reality of Java web app development. It is why I fear we will all be .Net developers some day. Example : http://jakarta.apache.org/tomcat/tomcat-5.5-doc/jndi-resources -howto.html CODE Context initCtx = new InitialContext(); Context envCtx = (Context) initCtx.lookup(java:comp/env); DataSource ds = (DataSource) envCtx.lookup(jdbc/EmployeeDB); Connection conn = ds.getConnection(); ... use this connection to access the database ... conn.close(); /CODE WEB.XML resource-ref description Resource reference to a factory for java.sql.Connection instances that may be used for talking to a particular database that is configured in the server.xml file. /description res-ref-name jdbc/EmployeeDB /res-ref-name res-type javax.sql.DataSource /res-type res-auth Container /res-auth /resource-ref /WEB.XML CONTEXT FILE Context Resource name=jdbc/EmployeeDB auth=Container type=javax.sql.DataSource username=dbusername password=dbpassword driverClassName=org.hsql.jdbcDriver
RE: jndi question
Hi Sean, It looks from a quick glance that your JNDI configuration is done globally, rather than in the Context configuration, and you do not link to it using a ResourceLink. Try adding ResourceLink name=myLinkToAppJndi global=jdbc/appname type=javax.sql.DataSource / Into the Context block, and remove the Resource block you have in there. The other thing to try would be to move the JNDI datasource Resource configuration block into the Context block. See how you get on, Allistair. -Original Message- From: Sean Rowe [mailto:[EMAIL PROTECTED] Sent: 23 August 2005 16:45 To: Tomcat Users List Subject: Re: jndi question thank you, i will Allistair Crossley wrote: If you could please send 1. server.xml 2. web.xml 3. context.xml or yourwebapp.xml 4. list of files in common/lib 5. list of files in yourwebapp/WEB-INF/lib I'd be happy to see if I can spot anything. -Original Message- From: Sean Rowe [mailto:[EMAIL PROTECTED] Sent: 23 August 2005 16:41 To: Tomcat Users List Subject: Re: jndi question no, that didn't help. thanks though. could this maybe be a class problem? am i using the wrong jar files? i can list the files i'm using if anyone thinks it might be the problem Allistair Crossley wrote: Hi, The documentation says; Context initCtx = new InitialContext(); Context envCtx = (Context) initCtx.lookup(java:comp/env); DataSource ds = (DataSource) envCtx.lookup(jdbc/EmployeeDB); However, we use; try { Context ctx = new InitialContext(); dataSource = (DataSource) ctx.lookup(java:comp/env/jdbc/yourdb); } catch (NamingException nE) { // log somewhere } catch (NullPointerException npE) { // log somewhere } Does that work for you? Allistair -Original Message- From: Sean Rowe [mailto:[EMAIL PROTECTED] Sent: 23 August 2005 16:29 To: Tomcat Users List Subject: Re: jndi question Brian, thank you for replying. I was afraid my topic was dead. If you could look at my first post, I listed all the files that you have suggested I take a look at. I have done everything you have suggested, but am still getting errors. The error I am getting now is javax.naming.NameNotFoundException: Name java:comp is not bound in this Context I can't find anything on the net or in any books I've looked at that explains this. As far as I can tell, java:comp should just be there. Any ideas? Thanks again. Sean Brian Cook wrote: Yes you can use JNDI with out using JSTL. But the only way to configure it is to define the JNDI resources in the web.xml and context.xml files.Technically you should be able to use the globally defined JNDI resources in server.xml, and I have seen configuration set ups doing it when googling. But could never get them to work. This highlights another area of seemingly unneeded complication in Java/Unix development. Using JNDI for data sources which was supposed to help you save time requires that you redundantly define the JNDI resource in at lest 2 if not 3 places. The admin tool which was also supposed to help save time defines the JNDI resources in server.xml which does not really seem to be all that helpful. I am sure there is likely a reason for this but I am ignorant of it. The admin tool is also supposed to let you define JNDI resources per context but it errors out when ever I have tried it. My experience with the Tomcat Admin and Manager tools is that they are worthless. Of the few steps they try to help with more often that not they just return errors when you need to use it. I removed them both and have gone back to doing set ups manually and there has not been much of a time difference doing it this way. Any way for JNDI to work you will have to add the definition for it in both web.xml and context.xml in the Tomcat Folder/conf/Catalina/localhost/ folder. This seems counter productive since it makes your app less portable having the data base configuration details inside the context and by extent the WAR file but it is what you have to do to get it to work right now. I feel your pain I know it is frustrating spending hours debugging just the DB connection but todate that is the reality of Java web app development. It is why I fear we will all be .Net developers
RE: jndi question
Hi, He isn't using that method of configuration, that's just 1 option of 3. He is nesting his Context definition within the server.xml Host element. Although this is now scorned, it's still valid. The 2 other methods are contextname.xml as you say, and also META-INF/context.xml within the webapp itself. Allistair. -Original Message- From: Brian Cook [mailto:[EMAIL PROTECTED] Sent: 23 August 2005 17:23 To: Tomcat Users List Subject: Re: jndi question Ok but do you have the resource defined in context.xml? If you go to Tomcat Dir/conf/Cataliana/localhost/ do you see a file with the name of the module ending with .xml? If so is the resource defined in that file? If not you need to add it. From the description it sounds like nothing in this set up has been done as was show on the example page. http://jakarta.apache.org/tomcat/tomcat-5.5-doc/jndi-resources -howto.html If you use the code block that is shown, define that resource in web.xml and context.xml it will work. But multiple postings latter it still sounds like the JNDI resource is not defined in context.xml and the code calling the JNDI resource differs greatly from the example provided. Sean Rowe wrote: The first post on this included the server.xml, and further down in the page is the relevant part of web.xml ( i just double checked that ). as for context.xml, i have listed it in my webapp.xml file, as well as server.xml as all other examples have suggested. i then tried it in the admin module, where it then put it in server.xml for me. i'm willing to try anything at this point, though, if you have any suggestions. as for my post not being jndi specific, i applogize if that's the case. i'm not really familiar with jndibut when I did a search for 'connection pooling', jndi seemed to be what everyone suggested i use. what i want to do, if it's not clear, is to create a connection pool to my MySql database. thanks, sean Brian Cook wrote: Actually the files I listed are NOT in the first post. It shows the server.xml and the code calling it but does not show web.xml or context.xml. The error you are getting just means that that the JNDI resource being called in the code is not defined in both web.xml and context.xml. In looking at the code snip it in the first post I am not following what you are trying to do. The post is for a JNDI question but in the code it looks like you are calling the DB URL directly. The whole point of JDNI being to get specific URL, and configuration info outside of the code base. I am not following what it is you are trying to do here. Sean Rowe wrote: Brian, thank you for replying. I was afraid my topic was dead. If you could look at my first post, I listed all the files that you have suggested I take a look at. I have done everything you have suggested, but am still getting errors. The error I am getting now is javax.naming.NameNotFoundException: Name java:comp is not bound in this Context I can't find anything on the net or in any books I've looked at that explains this. As far as I can tell, java:comp should just be there. Any ideas? Thanks again. Sean Brian Cook wrote: Yes you can use JNDI with out using JSTL. But the only way to configure it is to define the JNDI resources in the web.xml and context.xml files.Technically you should be able to use the globally defined JNDI resources in server.xml, and I have seen configuration set ups doing it when googling. But could never get them to work. This highlights another area of seemingly unneeded complication in Java/Unix development. Using JNDI for data sources which was supposed to help you save time requires that you redundantly define the JNDI resource in at lest 2 if not 3 places. The admin tool which was also supposed to help save time defines the JNDI resources in server.xml which does not really seem to be all that helpful. I am sure there is likely a reason for this but I am ignorant of it. The admin tool is also supposed to let you define JNDI resources per context but it errors out when ever I have tried it. My experience with the Tomcat Admin and Manager tools is that they are worthless. Of the few steps they try to help with more often that not they just return errors when you need to use it. I removed them both and have gone back to doing set ups manually and there has not been much of a time difference doing it this way. Any way for JNDI to work you will have to add the definition for it in both web.xml and context.xml in the Tomcat Folder/conf/Catalina/localhost/ folder. This seems counter productive since it makes your app less portable having the data base configuration details inside the context
RE: Has anyone used Tomcat 5.5.9 connecting to MS SQL Server using JNDI and Connection Pooling?
Hey Ian, Great that you got that working in the end. Did you find out what caused the issues? I'm not convinced you need to use the ConnectionPoolDataSource, since that's what DBCP is doing for you (I think - please someone correct me if I am wrong). You could try using javax.sql.ConnectionPoolDataSource in your res-type and in the JNDI configuration, but I am not sure if DBCP will allow you to do that. Have a go. I just use the DataSource implementation and we've had great success and performance with it. Cheers, Allistair. -Original Message- From: Wylie, Ian [mailto:[EMAIL PROTECTED] Sent: 24 August 2005 12:33 To: Tomcat Users List Subject: RE: Has anyone used Tomcat 5.5.9 connecting to MS SQL Server using JNDI and Connection Pooling? Hi Allistair, I just got the basic JNDI datasource working for MS SQL Server with Tomcat 5.5. I tried using the ConnectionPoolDataSource instead of the standard DataSource but I cannot get this working. Not sure whether I need to replace the res-typejavax.sql.DataSource/res-type with something else in the web.xml file. I changed the driverclass name from the standard datasource class of com.microsoft.jdbc.sqlserver.SQLServerDriver - used with standard datasource to the com.microsoft.jdbcx.sqlserver.SQLServerDataSource class used by MS connection pooling in the TOMCAT_HOME/conf/Catalina/localhost/webappname.xml file. Also added the factory for PooledConnections - factory=com.microsoft.jdbcx.sqlserver.SQLServerDataSourceFact ory to the TOMCAT_HOME/conf/Catalina/localhost/webappname.xml file. Any ideas to get the MS Connection Pooling working, or is there no need in Tomcat 5.5 - In aother words does Tomcat 5.5 automatically used Cnnection Pooling with a datasource?? Many thanks for your help with this. Best Regards, Ian -Original Message- From: Allistair Crossley [mailto:[EMAIL PROTECTED] Sent: 23 August 2005 16:05 To: Tomcat Users List; [EMAIL PROTECTED] Subject: RE: Has anyone used Tomcat 5.5.9 connecting to MS SQL Server usin g JNDI? Hi Wade, Can you perhaps resend the configuration files server.xml web.xml yourapp.xml listing of files in common/lib listing of files in yourapp/WEB-INF/lib Again? Cheers, Allistair. -Original Message- From: Wade Chandler [mailto:[EMAIL PROTECTED] Sent: 22 August 2005 17:58 To: Tomcat Users List Subject: RE: Has anyone used Tomcat 5.5.9 connecting to MS SQL Server usin g JNDI? --- Wylie, Ian [EMAIL PROTECTED] wrote: Allistair, My apologies for taking much longer than usual to get back to you but I had to finish some Java code that allowed us to upgrade our portal to PlumTree version 5. To clarify and answer your points below. 1) I have opted not to have a context.xml file in the META-INF directory but I am using the TOMCAT_HOME/conf/Catalina/localhost/webappname.xml file instead. 2) I have ensured that the 3 MS JAR files for the JDBC connection exist only in TOMCAT_HOME/common/lib and not in my webapp lib. 3) I have changed the java code to use a simple 'DataSource' instead of a 'ConnectionPoolDataSource' connection. See Java code snippet below :- Unfortunately I still get the error below :- ERROR - NamingException - Config error with JNDI and datasource.javax.naming.NamingException: Cannot create resource instance ERROR com.webconnex.cognos.PORT.OMTLreport : Cannot create resource instance I have attached my web.xml and TOMCAT_HOME/conf/Catalina/localhost/webappname.xml files for your perusal. I am of yet no further forward in solving my problem. Any further insight would be appreciated, as Tomcat 5 allows me to do quite a few things better, not least of which is debugging!! Java Code snippet :- = logger.debug(Before InitialContext.) ; InitialContext ctx = new InitialContext(); if (ctx == null) { log(ERROR initialising InitialContext.) ; logger.error(ERROR initialising InitialContext.) ; } log(Before Context.) ; ds = (DataSource) ctx.lookup(java:comp/env/jdbc/UKportalPool); log(Before initialising DataSource.) ; if(ds != null) { con = ds.getConnection(); if (con != null) { if ((pType != null) (!pType.equals())) { userDetails = new pfUsersBean(pType, posName, typeCD, firstLineProduct
RE: Has anyone used Tomcat 5.5.9 connecting to MS SQL Server using JNDI and Connection Pooling?
Hi again, By the way, you really ought to consider *not* using the MS drivers. jTDS at jtds.sourceforge.net is more performant. Cheers, Allistair -Original Message- From: Wylie, Ian [mailto:[EMAIL PROTECTED] Sent: 24 August 2005 12:33 To: Tomcat Users List Subject: RE: Has anyone used Tomcat 5.5.9 connecting to MS SQL Server using JNDI and Connection Pooling? Hi Allistair, I just got the basic JNDI datasource working for MS SQL Server with Tomcat 5.5. I tried using the ConnectionPoolDataSource instead of the standard DataSource but I cannot get this working. Not sure whether I need to replace the res-typejavax.sql.DataSource/res-type with something else in the web.xml file. I changed the driverclass name from the standard datasource class of com.microsoft.jdbc.sqlserver.SQLServerDriver - used with standard datasource to the com.microsoft.jdbcx.sqlserver.SQLServerDataSource class used by MS connection pooling in the TOMCAT_HOME/conf/Catalina/localhost/webappname.xml file. Also added the factory for PooledConnections - factory=com.microsoft.jdbcx.sqlserver.SQLServerDataSourceFact ory to the TOMCAT_HOME/conf/Catalina/localhost/webappname.xml file. Any ideas to get the MS Connection Pooling working, or is there no need in Tomcat 5.5 - In aother words does Tomcat 5.5 automatically used Cnnection Pooling with a datasource?? Many thanks for your help with this. Best Regards, Ian -Original Message- From: Allistair Crossley [mailto:[EMAIL PROTECTED] Sent: 23 August 2005 16:05 To: Tomcat Users List; [EMAIL PROTECTED] Subject: RE: Has anyone used Tomcat 5.5.9 connecting to MS SQL Server usin g JNDI? Hi Wade, Can you perhaps resend the configuration files server.xml web.xml yourapp.xml listing of files in common/lib listing of files in yourapp/WEB-INF/lib Again? Cheers, Allistair. -Original Message- From: Wade Chandler [mailto:[EMAIL PROTECTED] Sent: 22 August 2005 17:58 To: Tomcat Users List Subject: RE: Has anyone used Tomcat 5.5.9 connecting to MS SQL Server usin g JNDI? --- Wylie, Ian [EMAIL PROTECTED] wrote: Allistair, My apologies for taking much longer than usual to get back to you but I had to finish some Java code that allowed us to upgrade our portal to PlumTree version 5. To clarify and answer your points below. 1) I have opted not to have a context.xml file in the META-INF directory but I am using the TOMCAT_HOME/conf/Catalina/localhost/webappname.xml file instead. 2) I have ensured that the 3 MS JAR files for the JDBC connection exist only in TOMCAT_HOME/common/lib and not in my webapp lib. 3) I have changed the java code to use a simple 'DataSource' instead of a 'ConnectionPoolDataSource' connection. See Java code snippet below :- Unfortunately I still get the error below :- ERROR - NamingException - Config error with JNDI and datasource.javax.naming.NamingException: Cannot create resource instance ERROR com.webconnex.cognos.PORT.OMTLreport : Cannot create resource instance I have attached my web.xml and TOMCAT_HOME/conf/Catalina/localhost/webappname.xml files for your perusal. I am of yet no further forward in solving my problem. Any further insight would be appreciated, as Tomcat 5 allows me to do quite a few things better, not least of which is debugging!! Java Code snippet :- = logger.debug(Before InitialContext.) ; InitialContext ctx = new InitialContext(); if (ctx == null) { log(ERROR initialising InitialContext.) ; logger.error(ERROR initialising InitialContext.) ; } log(Before Context.) ; ds = (DataSource) ctx.lookup(java:comp/env/jdbc/UKportalPool); log(Before initialising DataSource.) ; if(ds != null) { con = ds.getConnection(); if (con != null) { if ((pType != null) (!pType.equals())) { userDetails = new pfUsersBean(pType, posName, typeCD, firstLineProduct); userSessionDetails = new pfUserSessionBean(); userDetails.getPrefix(con, userDetails); // See if User is in database //userDetails.getPrefix(pCon, userDetails); // See if User is in database ptpResponse.setSettingValue(SettingType.Portlet, SalesCubePrefix
RE: Tomcat 5.5.9 missing jars ?
I don't think that's shipped with Tomcat 5.5.9. What is the error you are getting? Are you running your own web applications yet or just testing the default ROOT webapp? Allistair. -Original Message- From: Srinath Narasimhan [mailto:[EMAIL PROTECTED] Sent: 24 August 2005 14:29 To: tomcat-user@jakarta.apache.org Subject: Tomcat 5.5.9 missing jars ? Hi I downloaded Tomcat 5.5.9 (zip file as well as exe) and it seems to be missing the naming-common.jar. The documentation says that the file exists. I have tried searching the mailing list, but could not find anything specific. Any information/pointers will be very helpful. Thanks Srinath. --- DISCLAIMER: This email and any attachments are confidential and may be legally privileged. It is intended solely for the named addressee. Access to this message by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, or distribution of the message, or any action or omission taken by you in reliance on it, is prohibited and may be unlawful. If you have received this email in error please contact the sender or NuView Systems, Inc. at 978-988-7884. Thank you. FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE --- QAS Ltd. Registered in England: No 2582055 Registered in Australia: No 082 851 474 --- /FONT - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat 5.5.9 missing jars ?
Hi, It looks like you are another developer who thinks the transition from 5.0.x to 5.5.x is just copying your webapp across. Unfortunalte you'll need to configure JNDI datasources in a different way in 5.5.x. Check out the manual pages to see how. Allistair. -Original Message- From: Srinath Narasimhan [mailto:[EMAIL PROTECTED] Sent: 24 August 2005 14:37 To: Tomcat Users List Subject: RE: Tomcat 5.5.9 missing jars ? Thanks Allistair for the information, I am running my own web application and it is already working in 5.0.28 When I try to run it under 5.5.9, the JNDI errors pop up. Unable to create resource instance or something like that. I see the naming-common.jar and naming-java.jar are missing under common/lib folder. Now if these jars are not shipped with Tomcat, how does the default java namespace in the JNDI work ? Srinath. -Original Message- From: Allistair Crossley [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 24, 2005 9:29 AM To: Tomcat Users List Subject: RE: Tomcat 5.5.9 missing jars ? I don't think that's shipped with Tomcat 5.5.9. What is the error you are getting? Are you running your own web applications yet or just testing the default ROOT webapp? Allistair. -Original Message- From: Srinath Narasimhan [mailto:[EMAIL PROTECTED] Sent: 24 August 2005 14:29 To: tomcat-user@jakarta.apache.org Subject: Tomcat 5.5.9 missing jars ? Hi I downloaded Tomcat 5.5.9 (zip file as well as exe) and it seems to be missing the naming-common.jar. The documentation says that the file exists. I have tried searching the mailing list, but could not find anything specific. Any information/pointers will be very helpful. Thanks Srinath. --- DISCLAIMER: This email and any attachments are confidential and may be legally privileged. It is intended solely for the named addressee. Access to this message by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, or distribution of the message, or any action or omission taken by you in reliance on it, is prohibited and may be unlawful. If you have received this email in error please contact the sender or NuView Systems, Inc. at 978-988-7884. Thank you. FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE --- QAS Ltd. Registered in England: No 2582055 Registered in Australia: No 082 851 474 --- /FONT - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --- DISCLAIMER: This email and any attachments are confidential and may be legally privileged. It is intended solely for the named addressee. Access to this message by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, or distribution of the message, or any action or omission taken by you in reliance on it, is prohibited and may be unlawful. If you have received this email in error please contact the sender or NuView Systems, Inc. at 978-988-7884. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: how to update tomcat?
Hi, Not sure if there's a migration guide, but roughly 1. Download Tomcat 5.0.x or 5.5.x 2. Read the configuration guide for those parts you've configured in 4.1 to see how to do it in 5.0.x/5.5.x 3. Move your webapp WAR to the new webapps, make configuration changes 4. Test. Your webapp *should* run alright itself, but it's normally the Tomcat configuration parts that stop smooth migration, so ensure you understand how you're configured in 4.1, e.g datasource, realms, hosts etc.. and make sure you do it the correct way in 5.0/5.5 Allistair. -Original Message- From: subi [mailto:[EMAIL PROTECTED] Sent: 24 August 2005 14:40 To: tomcat-user@jakarta.apache.org Subject: how to update tomcat? I am using Tomcat 4.1. How can i update to 5.x? -- ilu, subi FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE --- QAS Ltd. Registered in England: No 2582055 Registered in Australia: No 082 851 474 --- /FONT - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Deploying war in another directory
you can change the appBase attribute per Host but I am not aware of whether you can mix based on webapp name. Allistair. -Original Message- From: XYZ [mailto:[EMAIL PROTECTED] Sent: 24 August 2005 15:51 To: tomcat-user@jakarta.apache.org Subject: Deploying war in another directory Hello. I would like to know how it is possible to have catalina deploy a war outside of $CATALINA_HOME/webapps. What I'd like to do is have catalina find the war in another path, $APPS. How can I do this? Thanks. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE --- QAS Ltd. Registered in England: No 2582055 Registered in Australia: No 082 851 474 --- /FONT - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: newbie with a short question
Hi, I did this the other day with a bat file. First I cause an open/save prompt with response.addHeader(Content-Disposition, attachment; filename=somebat.bat); Then I use the response.getOutputStream() and stream the bat file down it. This requires of course that you get an inputstream to your bat file first. Copy it into your webapp somewhere and use the servlet context getRealPath(/bat/mybat.bat) and then i/o API to read it into an input stream before sending outbound again. I found that setting content type of application/msdos-x-batch failed, as did others, just send it without a content type as a open/save. You'd do this in a servlet. Allistair -Original Message- From: nick sturm [mailto:[EMAIL PROTECTED] Sent: 24 August 2005 17:21 To: Tomcat Users List Subject: newbie with a short question I am new to any web server, but hopefully this question is easilly answered: If I wanted to make a link to execute a .bat file locally on the server when a link is pressed, how would I do so? I am making a pan/tiltable webcam and hope to use the siple controls shown here: http://www.geocities.com/zoomkat/byte.htm my major confusion stems from there not being a cgi directory. (upon first inspection) Sorry for my ignorance, -n - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE --- QAS Ltd. Registered in England: No 2582055 Registered in Australia: No 082 851 474 --- /FONT - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: system.property in web.xml
Hi, This is not mandated by the Servlet specification. What you *could* do is write a servlet that is mapped in web.xml and set init parameters for that servlet. Also set the load-on-startup to 1. Then in the servlet init method you can extract the init parametes and call System.setProperty for each. Allistair. -Original Message- From: Davide Frigerio [mailto:[EMAIL PROTECTED] Sent: 25 August 2005 08:00 To: tomcat-user@jakarta.apache.org Subject: system.property in web.xml Hi, I would ask to you if is possible to set a java system.property for a web application by web.xml file application. Thanks. -- -- Davide Ing. Frigerio Wise-Lab S.r.l. c/o Polo Regionale di Como - Politecnico di Milano P.le Gerbetto, 6 - 22100 Como (Italy) Tel: +39 031 332 7362 - Fax: +39 031 332 7321 Email: davide.frigerio/at/wise-lab.it Web: http://www.wise-lab.it - http://www.wisemodel.com -- Leggi l'informativa in base all'art.13 del D.lgs. 30 giugno 2003, 196 sul trattamento dei dati personali da parte di Wise-Lab: http://www.wise-lab.it/info_privacy.htm * Scarica il nuovo web browser FireFox, l'alternativa SICURA ad Internet Explorer: Get Firefox! http://www.spreadfirefox.com/?q=affiliatesid=28607t=1 * - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE --- QAS Ltd. Registered in England: No 2582055 Registered in Australia: No 082 851 474 --- /FONT - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Client Deployer 5.5.11 NullPointerException
Hi, I've decided to try out the Deployer tool for the first time to see if it makes like a little easier for deployments to our test servers. I've used the 5.5.11 Alpha Deployer as I noted some threads indicating a problem with 5.5.9's version. I've come across the following when running it pretty much out of box. I setup a deployer.properties file. Am I missing some kind of classpath or could this be caused by a file in my web application? Regards, Allistair. compile: [copy] Copying 2235 files to C:\deployer-intratest\build\webapp [copy] Copied 521 empty directories to 2 empty directories under C:\d r-intratest\build\webapp [jasper2] java.lang.NullPointerException [jasper2] at org.apache.jasper.JspCompilationContext.createCompiler( pilationContext.java:220) [jasper2] at org.apache.jasper.JspC.processFile(JspC.java:913) [jasper2] at org.apache.jasper.JspC.execute(JspC.java:1061) [jasper2] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Met [jasper2] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMetho sorImpl.java:39) [jasper2] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Delegat hodAccessorImpl.java:25) [jasper2] at java.lang.reflect.Method.invoke(Method.java:585) [jasper2] at org.apache.tools.ant.TaskAdapter.execute(TaskAdapter.ja ) [jasper2] at org.apache.tools.ant.UnknownElement.execute(UnknownElem va:269) [jasper2] at org.apache.tools.ant.Task.perform(Task.java:364) [jasper2] at org.apache.tools.ant.Target.execute(Target.java:301) [jasper2] at org.apache.tools.ant.Target.performTasks(Target.java:32 [jasper2] at org.apache.tools.ant.Project.executeTarget(Project.java [jasper2] at org.apache.tools.ant.Project.executeTargets(Project.jav ) [jasper2] at org.apache.tools.ant.Main.runBuild(Main.java:632) [jasper2] at org.apache.tools.ant.Main.startAnt(Main.java:183) [jasper2] at org.apache.tools.ant.launch.Launcher.run(Launcher.java: [jasper2] at org.apache.tools.ant.launch.Launcher.main(Launcher.java BUILD FAILED C:\deployer-intratest\build.xml:45: org.apache.jasper.JasperException Total time: 1 minute 33 seconds FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE --- QAS Ltd. Registered in England: No 2582055 Registered in Australia: No 082 851 474 --- /FONT
RE: Client Deployer 5.5.11 NullPointerException
Hi, No I don't think that's it, both ant and javac work on my command line. I do use Ant for build, I'm just trying deployer for the first time. JAVA_HOME, ANT_HOME are also both defined. Ant is also the latest version 1.6.5 C:\deployerjavac Usage: javac options source files where possible options include: -g Generate all debugging info -g:noneGenerate no debugging info -g:{lines,vars,source} Generate only some debugging info -nowarnGenerate no warnings -verbose Output messages about what the compiler is doing -deprecation Output source locations where deprecated APIs are u sed -classpath path Specify where to find user class files -cp path Specify where to find user class files -sourcepath path Specify where to find input source files -bootclasspath path Override location of bootstrap class files -extdirs dirsOverride location of installed extensions -endorseddirs dirs Override location of endorsed standards path -d directory Specify where to place generated class files -encoding encoding Specify character encoding used by source files -source release Provide source compatibility with specified release -target release Generate class files for specific VM version -version Version information -help Print a synopsis of standard options -X Print a synopsis of nonstandard options -Jflag Pass flag directly to the runtime system -- snip -- C:\deployerant -Dserver=webtest compile Buildfile: build.xml clean: [delete] Deleting directory C:\deployer\build compile: [copy] Copying 500 files to C:\deployer\build\webapp\ROOT [copy] Copied 165 empty directories to 1 empty directory under C:\deployer\ build\webapp\ROOT [jasper2] java.lang.NullPointerException [jasper2] at org.apache.jasper.JspCompilationContext.createCompiler(JspCom pilationContext.java:220) [jasper2] at org.apache.jasper.JspC.processFile(JspC.java:913) [jasper2] at org.apache.jasper.JspC.execute(JspC.java:1061) [jasper2] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [jasper2] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcces sorImpl.java:39) [jasper2] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMet hodAccessorImpl.java:25) [jasper2] at java.lang.reflect.Method.invoke(Method.java:585) [jasper2] at org.apache.tools.ant.TaskAdapter.execute(TaskAdapter.java:123 ) [jasper2] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.ja va:275) [jasper2] at org.apache.tools.ant.Task.perform(Task.java:364) [jasper2] at org.apache.tools.ant.Target.execute(Target.java:341) [jasper2] at org.apache.tools.ant.Target.performTasks(Target.java:369) [jasper2] at org.apache.tools.ant.Project.executeSortedTargets(Project.jav a:1216) [jasper2] at org.apache.tools.ant.Project.executeTarget(Project.java:1185) [jasper2] at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(De faultExecutor.java:40) [jasper2] at org.apache.tools.ant.Project.executeTargets(Project.java:1068 ) [jasper2] at org.apache.tools.ant.Main.runBuild(Main.java:668) [jasper2] at org.apache.tools.ant.Main.startAnt(Main.java:187) [jasper2] at org.apache.tools.ant.launch.Launcher.run(Launcher.java:246) [jasper2] at org.apache.tools.ant.launch.Launcher.main(Launcher.java:67) BUILD FAILED C:\deployer\build.xml:45: org.apache.jasper.JasperException Total time: 7 seconds Many thanks, Allistair. -Original Message- From: Remy Maucherat [mailto:[EMAIL PROTECTED] Sent: 25 August 2005 12:40 To: Tomcat Users List Subject: Re: Client Deployer 5.5.11 NullPointerException On 8/25/05, Allistair Crossley [EMAIL PROTECTED] wrote: Hi, I've decided to try out the Deployer tool for the first time to see if it makes like a little easier for deployments to our test servers. I've used the 5.5.11 Alpha Deployer as I noted some threads indicating a problem with 5.5.9's version. I've come across the following when running it pretty much out of box. I setup a deployer.properties file. Am I missing some kind of classpath or could this be caused by a file in my web application? No Java compiler available. With the deployer package, you're supposed to be using Ant+javac (given that Ant wants JAVA_HOME and likes a JDK). If not, add the JDT JAR that is in common/lib. -- x Rémy Maucherat Developer Consultant JBoss Group (Europe) SàRL x - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] FONT SIZE=1
RE: Client Deployer 5.5.11 NullPointerException
Hi, I'd really love to I assure you, but I really don't a) have years and years of architecting Tomcat development to trace through how Jasper2 works and b) the time whilst I am sat here working for a corporation trying to get Tomcat working for the business For what it's worth (which is nothing I realise) I do realise that jspCompiler.init(this, jsw) is throwing the exception because the jspCompiler returned from the compiler = (Compiler) Class.forName(className).newInstance(); is null due to what must be a CNFE (looks like logging is needed there). I also see that this was why you asked me to copy the JDT compiler jar from common/lib into the deployer/lib. However, I did just that, and this still does not solve the resolution of the compiler class. Can I clarify that wnated me to copy common/lib/jasper-compiler-jdt.jar into deployer/lib? Finally, is it documented anywhere that deployer won't work out of the box? If not, I'd be happy to make a comment on the Deployer doc page. Regards, Allistair. */ public Compiler createCompiler() throws JasperException { if (jspCompiler != null ) { return jspCompiler; } jspCompiler = null; if (options.getCompiler() == null) { jspCompiler = createCompiler(org.apache.jasper.compiler.JDTCompiler); if (jspCompiler == null) { jspCompiler = createCompiler(org.apache.jasper.compiler.AntCompiler); } } else { jspCompiler = createCompiler(org.apache.jasper.compiler.AntCompiler); if (jspCompiler == null) { jspCompiler = createCompiler(org.apache.jasper.compiler.JDTCompiler); } } jspCompiler.init(this, jsw); return jspCompiler; } private static Compiler createCompiler(String className) { Compiler compiler = null; try { compiler = (Compiler) Class.forName(className).newInstance(); } catch (Throwable t) { // Log ? // FIXME: log } return compiler; } -Original Message- From: Remy Maucherat [mailto:[EMAIL PROTECTED] Sent: 25 August 2005 13:05 To: Tomcat Users List Subject: Re: Client Deployer 5.5.11 NullPointerException On 8/25/05, Allistair Crossley [EMAIL PROTECTED] wrote: Hi, No I don't think that's it, both ant and javac work on my command line. I do use Ant for build, I'm just trying deployer for the first time. JAVA_HOME, ANT_HOME are also both defined. Ant is also the latest version 1.6.5 Great. Then go look in the code and try to explain the exception by something other than No Java compiler available. -- x Rémy Maucherat Developer Consultant JBoss Group (Europe) SàRL x - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE --- QAS Ltd. Registered in England: No 2582055 Registered in Australia: No 082 851 474 --- /FONT - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: jndi question
Hi, The context.xml file is stored in META-INF during development but needs to be placed in Tomcat Folder/conf/Catalina/localhost/ folder for deployment with the file name of the context path. I don't think that's quite true. META-INF is a permanent valid location for context.xml, and does not affect deployment if /conf/Catalina/localhost/ does not have a file for the web application. We always keep context.xml only in META-INF. However, if 2 are present this may cause issues as you say, Allistair. -Original Message- From: Brian Cook [mailto:[EMAIL PROTECTED] Sent: 25 August 2005 14:39 To: Tomcat Users List Subject: Re: jndi question Sean, One thing that stands out in your message is that the conext.xml file was placed in the META-INF folder. Is it also in Tomcat Folder/conf/Catalina/localhost/ as the module name? i.e. If the context path name of your webapp is /seansApp the context.xml file should appear in this folder as seansApp.xml. The context.xml file is stored in META-INF during development but needs to be placed in Tomcat Folder/conf/Catalina/localhost/ folder for deployment with the file name of the context path. Sean Rowe wrote: I have tried again using the method described in the url brian gave. Here is the stack exception I'm receiving: *type* Exception report *message* *description* _The server encountered an internal error () that prevented it from fulfilling this request._ *exception* javax.servlet.ServletException: Name java:comp is not bound in this Context org.apache.jasper.runtime.PageContextImpl.doHandlePageExceptio n(PageContextImpl.java:848) org.apache.jasper.runtime.PageContextImpl.handlePageException( PageContextImpl.java:781) org.apache.jsp.test_jsp._jspService(org.apache.jsp.test_jsp:69) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) org.apache.jasper.servlet.JspServletWrapper.service(JspServlet Wrapper.java:322) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet .java:291) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) *root cause* javax.naming.NameNotFoundException: Name java:comp is not bound in this Context org.apache.naming.NamingContext.lookup(NamingContext.java:769) org.apache.naming.NamingContext.lookup(NamingContext.java:152) javax.naming.InitialContext.lookup(InitialContext.java:351) com.transcriptionportal.utils.DBManager.init(DBManager.java:25) org.apache.jsp.test_jsp._jspService(org.apache.jsp.test_jsp:53) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) org.apache.jasper.servlet.JspServletWrapper.service(JspServlet Wrapper.java:322) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet .java:291) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) I have enclosed my server.xml, web.xml, context.xml (that i placed in my web/META-INF folder), and the class I'm using to make the connection. Thanks again to everyone who has helped me so far. sean Allistair Crossley wrote: Hi, He isn't using that method of configuration, that's just 1 option of 3. He is nesting his Context definition within the server.xml Host element. Although this is now scorned, it's still valid. The 2 other methods are contextname.xml as you say, and also META-INF/context.xml within the webapp itself. Allistair. -Original Message- From: Brian Cook [mailto:[EMAIL PROTECTED] Sent: 23 August 2005 17:23 To: Tomcat Users List Subject: Re: jndi question Ok but do you have the resource defined in context.xml? If you go to Tomcat Dir/conf/Cataliana/localhost/ do you see a file with the name of the module ending with .xml? If so is the resource defined in that file? If not you need to add it. From the description it sounds like nothing in this set up has been done as was show on the example page. http://jakarta.apache.org/tomcat/tomcat-5.5-doc/jndi-resources -howto.html If you use the code block that is shown, define that resource in web.xml and context.xml it will work. But multiple postings latter it still sounds like the JNDI resource is not defined in context.xml and the code calling the JNDI resource differs greatly from the example provided. Sean Rowe wrote: The first post on this included the server.xml, and further down in the page is the relevant part of web.xml ( i just double checked
RE: Client Deployer 5.5.11 NullPointerException
Hi, Hm :( Are you able to clarify what you mean by a well configured Ant which is able to use a Java compiler. Perhaps this is where the problem lies? My Ant setup is such that I have ANT_HOME and JAVA_HOME env vars set. I have ANT_HOME/bin and JAVA_HOME/bin on the PATH. The ant and javac commands work on the command line. I can run the Tomcat build script and many other build scripts with ant to build software (including Tomcat). This for me looks like at least a configured Ant. Am I missing some link that you know of? In terms of installing the deployer, I literally did the following: 1. Downloaded 5.5.11-alpha Deployer 2. Unzipped to c:\jakarta-tomcat-5.5.11-deployer 3. Created deployer.properties, setting the 4 or 5 properties required for the web application 4. Moved to c:\jakarta-tomcat-5.5.11-deployer 5. Executed ant compile 6. File copy works etc... but then I get the exception with the jasper2 task. Then I got your suggestion 7. Copy jdt compiler jar frmo common/lib to c:\jakarta-tomcat-5.5.11-deployer\lib 8. Executed ant compile Same error occurs however. I don't _think_ I have done anything funny but you never know ;) Your help is appreciated, Allistair. -Original Message- From: Remy Maucherat [mailto:[EMAIL PROTECTED] Sent: 25 August 2005 14:55 To: Tomcat Users List Subject: Re: Client Deployer 5.5.11 NullPointerException On 8/25/05, Allistair Crossley [EMAIL PROTECTED] wrote: Hi, I'd really love to I assure you, but I really don't a) have years and years of architecting Tomcat development to trace through how Jasper2 works and b) the time whilst I am sat here working for a corporation trying to get Tomcat working for the business For what it's worth (which is nothing I realise) I do realise that jspCompiler.init(this, jsw) is throwing the exception because the jspCompiler returned from the compiler = (Compiler) Class.forName(className).newInstance(); is null due to what must be a CNFE (looks like logging is needed there). I also see that this was why you asked me to copy the JDT compiler jar from common/lib into the deployer/lib. However, I did just that, and this still does not solve the resolution of the compiler class. Can I clarify that wnated me to copy common/lib/jasper-compiler-jdt.jar into deployer/lib? Of course. No compiler is found, so you should add one. Finally, is it documented anywhere that deployer won't work out of the box? If not, I'd be happy to make a comment on the Deployer doc page. The deployer does work out of the box, assuming you have a well configured Ant which is able to use a Java compiler. So you did something funny :) -- x Rémy Maucherat Developer Consultant JBoss Group (Europe) SàRL x - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE --- QAS Ltd. Registered in England: No 2582055 Registered in Australia: No 082 851 474 --- /FONT - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Client Deployer 5.5.11 NullPointerException
Well that's really unexpected. The only other 2 differences are perhaps that I am on Windows, and that I did this with the 5.5.11-alpha download from the site. I can't think of anything else if you say that copying the JDT jar should work. It simply doesn't here and I have tested this with pure downloads with no interference or funny business. I've been able to move forward with deployer by commenting out the jasper2 task in the build.xml file at least which is something, although I see that undeploy fails to remove all libs in the WEB-INF/lib which goes on to cause a redeploy problems, but that's anothe thread to be had ;) It looks like I will just have to continue with commenting out jasper2 for now as I am simply out of ideas and I cannot reduce the problem any more, my Ant and Javac work well independently of deployer. Thanks for your help, perhaps something will come to me, Allistair. -Original Message- From: Remy Maucherat [mailto:[EMAIL PROTECTED] Sent: 25 August 2005 15:56 To: Tomcat Users List Subject: Re: Client Deployer 5.5.11 NullPointerException On 8/25/05, Remy Maucherat [EMAIL PROTECTED] wrote: To start with something, I use a known-to-be-working Ant 1.6.2 release. I just installed and tested with 1.6.5, and it works too. I just added some debug logging too for the classloading exceptions. -- x Rémy Maucherat Developer Consultant JBoss Group (Europe) SàRL x - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE --- QAS Ltd. Registered in England: No 2582055 Registered in Australia: No 082 851 474 --- /FONT - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Client Deployer 5.5.11 NullPointerException
Thanks, that's good to know, it must be something to do with my environment. Are you saying then that you did not have to copy any JDT jars into your deployer? How have you setup Ant? In any specific manner? Best, Allistair. -Original Message- From: Markus Schönhaber [mailto:[EMAIL PROTECTED] Sent: 25 August 2005 16:56 To: Tomcat Users List Subject: Re: Client Deployer 5.5.11 NullPointerException Am Donnerstag, 25. August 2005 17:03 schrieb Allistair Crossley: Well that's really unexpected. The only other 2 differences are perhaps that I am on Windows, and that I did this with the 5.5.11-alpha download from the site. I can't think of anything else if you say that copying the JDT jar should work. It simply doesn't here and I have tested this with pure downloads with no interference or funny business. I also tried it on Windows, also using the 5.5.11-alpha deployer downloaded from the jakarta site. It works OOTB. So, if Rémy thinks there's something funny with your setup, I guess he's propably right. Regards mks - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE --- QAS Ltd. Registered in England: No 2582055 Registered in Australia: No 082 851 474 --- /FONT - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Client Deployer 5.5.11 NullPointerException
Hi, Thanks. Yeah something must be up I guess. Although my environment vars all look perfectly ok to me. Here they are echoed. c:\echo %JAVA_HOME% c:\Program Files\Java\jdk1.5.0_03 c:\echo %ANT_HOME% c:\apache-ant-1.6.5 c:\echo %PATH% c:\WINNT\system32;C:\WINNT;C:\WINNT\System32\Wbem;c:\apache-ant-1.6.5\bin;C:\Pro gram Files\Microsoft SQL Server\80\Tools\BINN;C:\Program Files\GNU\WinCvs 1.3\CV SNT;C:\jvmstat-3_0\jvmstat\bin;C:\PROGRA~1 \QAS\QUICKA~2;C:\Program Files\Common Files\Autodesk Shared\;C:\Program Files\ba ckburner 2\;C:\Program Files\Java\jdk1.5.0_03\bin I need to go home now, I've not had a good day with deployer. It's 3/4 there, just need the last 1/4 :) Thanks, Allistair. -Original Message- From: Markus Schönhaber [mailto:[EMAIL PROTECTED] Sent: 25 August 2005 17:12 To: Tomcat Users List Subject: Re: Client Deployer 5.5.11 NullPointerException Am Donnerstag, 25. August 2005 17:57 schrieb Allistair Crossley: Thanks, that's good to know, it must be something to do with my environment. Are you saying then that you did not have to copy any JDT jars into your deployer? No, I didn't have to copy any jars since ant uses sun's javac from tools.jar in JAVA_HOME by default. If it doesn't for you, then there's something wrong. How have you setup Ant? In any specific manner? I extracted the zip, set ANT_HOME accordingly and added %ANT_HOME%\bin to PATH. Regards mks - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE --- QAS Ltd. Registered in England: No 2582055 Registered in Australia: No 082 851 474 --- /FONT - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Undeploy leaves residual files
Hi, I've noticed that undeploy of my web applications that the ROOT folder is left behind as follows; ROOT WEB-INF classes log4j.properties lib ehcache.jar struts.jar The web application has a ContextListener that calls LogManager shutdowns and Introspector.flushCaches and so fourth to attempt to release resources. Is this part of that kind of problem? Regards, Allistair. FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE --- QAS Ltd. Registered in England: No 2582055 Registered in Australia: No 082 851 474 --- /FONT
RE: upgrade to 5
Hi there, Of course you can, you just need to be aware of what elements of Tomcat you need to configure, e.g JNDI resources and so on and then lookup the way you do that in Tomcat 5. It's not a *far* cry from Tomcat 3/4, you still use server.xml for a bunch of stuff, but it's recommended that you configure your Context using a separate file. It's all online, just be aware of what configuration you need, look at the docs, and test. Make a backup of course. Allistair. -Original Message- From: David Ellis [mailto:[EMAIL PROTECTED] Sent: 26 August 2005 16:46 To: Tomcat Users List Subject: upgrade to 5 Hello, I'm extremely new to all this. I was wondering if it is possible to upgrade from tomcat version 3.2.3 to version 5? I've read that the upgrade from version 3 to 4 was difficult, so my guess is that I will have to go to version 4 before I can go to 5. Thanks Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE --- QAS Ltd. Registered in England: No 2582055 Registered in Australia: No 082 851 474 --- /FONT - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: upgrade to 5
Hey, Yep, there's always toothache to be had with these things :) Cheers, Allistair. -Original Message- From: David Ellis [mailto:[EMAIL PROTECTED] Sent: 26 August 2005 16:55 To: Tomcat Users List Subject: Re: upgrade to 5 Thanks, that's somewhat of a relief, although I'm sure I have plenty of work cut out for me :) Off I go - Original Message - From: Allistair Crossley [EMAIL PROTECTED] To: Tomcat Users List tomcat-user@jakarta.apache.org Sent: Friday, August 26, 2005 11:48 AM Subject: RE: upgrade to 5 Hi there, Of course you can, you just need to be aware of what elements of Tomcat you need to configure, e.g JNDI resources and so on and then lookup the way you do that in Tomcat 5. It's not a *far* cry from Tomcat 3/4, you still use server.xml for a bunch of stuff, but it's recommended that you configure your Context using a separate file. It's all online, just be aware of what configuration you need, look at the docs, and test. Make a backup of course. Allistair. -Original Message- From: David Ellis [mailto:[EMAIL PROTECTED] Sent: 26 August 2005 16:46 To: Tomcat Users List Subject: upgrade to 5 Hello, I'm extremely new to all this. I was wondering if it is possible to upgrade from tomcat version 3.2.3 to version 5? I've read that the upgrade from version 3 to 4 was difficult, so my guess is that I will have to go to version 4 before I can go to 5. Thanks Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE --- QAS Ltd. Registered in England: No 2582055 Registered in Australia: No 082 851 474 --- /FONT - 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: IIS6 - ASP.Net - JK - TC5 - tomcatAuthentication=false: user auth not getting passed?
Hi, You probably need to ensure that the IIS virtual directory for the jakarta dll has Directory Security set to Windows Integrated? Allistair. -Original Message- From: Tracy Spratt [mailto:[EMAIL PROTECTED] Sent: 07 September 2005 01:03 To: Tomcat Users List; [EMAIL PROTECTED] Subject: IIS6 - ASP.Net - JK - TC5 - tomcatAuthentication=false: user auth not getting passed? I want to pass authorization from my dot.Net app to the Tomcat app. Unsecured, everything is working fine: IIS runs the asp.net app, which in turn loads the Tomcat app (a Macromedia Flex app to be specific). But the asp.net app is secured, and the JK - isapi_redirect allows users to directly access the Tomcat app, which is not desired. To start with, I have configured basic security, protected the application with a security-constraint, and tested it with direct calls to the TC server / app, and all worked as expected. However when I set the tomcatAuthentication=false, my Tomcat app does not run, and judging by the RequestDumperValve output, IIS is not passing the user name to Tomcat, and it also reports status 403. My long term goal is to use the asp.net authentication in the Tomcat app, but in the short run I would just like to get anything working, like the Windows user for example. Any suggestions will be appreciated. I have included a listing of the RequestDumperValve output below. Tracy Spratt Catalina_log: REQUEST URI =/flex/ltApplications/Clients/Patterson/FirePump.mxml.swf authType= characterEncoding=null contentLength=0 contentType=null contextPath=/flex cookie=ASP.NET_SessionId=hqoaxr45jokfpzabz4giluft cookie=Authenticate=7808CB3E915F5EBD2AC05801D91542013C4B04B393 12E1B2335B 32395880A6C05638E108982CA4917853D032EC9EFD47EB20A56448A23EF366 5B48F57F49 BD387D254B570373404A header=connection=Keep-Alive header=accept=*/* header=accept-encoding=gzip, deflate header=cookie=ASP.NET_SessionId=hqoaxr45jokfpzabz4giluft; Authenticate=7808CB3E915F5EBD2AC05801D91542013C4B04B39312E1B23 35B3239588 0A6C05638E108982CA4917853D032EC9EFD47EB20A56448A23EF3665B48F57 F49BD387D2 54B570373404A header=host=www.lariatinc.com header=if-modified-since=Thu, 01 Sep 2005 21:43:30 GMT header=user-agent=Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322) header=x-flash-version=7,0,35,29 header=content-length=0 locale=en_US method=GET pathInfo=null protocol=HTTP/1.1 queryString=null remoteAddr=172.31.255.55 remoteHost=172.31.255.55 remoteUser= requestedSessionId=null scheme=http serverName=www.lariatinc.com serverPort=80 servletPath=/ltApplications/Clients/Patterson/FirePump.mxml.swf isSecure=false --- --- authType= contentLength=-1 contentType=null message=null remoteUser= status=403 === - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE --- QAS Ltd. Registered in England: No 2582055 Registered in Australia: No 082 851 474 --- /FONT - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]