Session timeout during method execution
Hi, I have a little complicated issue with HttpSession timeout process. It goes like this. Lets says, my Web Application session timeout period is 5 minutes. I made a Http request to server and corresponding Servlet requires more than 5 minutes lets say 10 minutes to complete the business logic. As we can see in the above case, Session is invalidated before end of business logic execution in Servlet. I've tried following code to work around the problem but seems to be no luck Before executing the business logic in a method int timeoutBackup = session.getMaxInactiveInterval(); (5 minutes) session.setMaxInactiveInterval(-1); Business Logic (10 minutes) session.setMaxInactiveInterval( timeoutBackup ); ( 5 minutes ) return; If i make the next request on same session, I get session invalid exception.. I'm wondering what am i doing wrong here.. Hope you guys can throw some light on what I'm doing wrong Best Regards, -- View this message in context: http://www.nabble.com/Session-timeout-during-method-execution-tf3121073.html#a8647136 Sent from the Tomcat - User mailing list archive at Nabble.com.
difference between FORM and BASIC authentication method
what is BASIC authentication method ? i mean how is it different from FORM authentication ? does it mean i dont have to write a login.html or login.jsp page ? -- --- Regards Deepan Chakravarthy N http://www.codeshepherd.com/ http://sudoku-solver.net/ I am a programmer by day, I dig grave for other programmers by night. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat randomly hangs
On 1/26/07, Brian Cross <[EMAIL PROTECTED]> wrote: Thanks for the suggestion Stefan. Yes I have run JConsole and will look at it some more. When the hang happens JConsole stops responding as well. Brian, have you actually tested the memory of the machine? Leon Stefan Baramov wrote: > Since you all are using Java 5 why do you try to enable JMX. JConsole > could give you a good insight on threads. It could even provide thread > dump or possibly detect deadlock. > > - Stefan > > - > To start a new topic, e-mail: users@tomcat.apache.org > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
authentication using active directory
Hi, I am trying to authenticate using Active directory for one my application in tomcat. ( I have only one application deployed in tomcat). I had configured server.xml and web.xml to use /gridsphere/login.html to get details from user and authenticate using AD. When i hit the url "localhost:8080", i get 404 error, saying "The requested resource (/gridsphere/login.html) is not available. " --- server.xml ldap://172.168.1.1:389"; connectionName="[EMAIL PROTECTED]" connectionPassword="" referrals="follow" userRoleName="member" roleSearch="(member={0})" roleSubtree="false" userSubtree="true" /> -- web.xml YourWebApp accessible by authenticated users of the tomcat role /* GET POST PUT DELETE These roles are allowed access tomcat FORM YourWebApp Protected Area /gridsphere/index.html /gridsphere/autherr.html Only 'tomcat' role is allowed to access this web application tomcat - -- --- Regards Deepan Chakravarthy N http://www.codeshepherd.com/ http://sudoku-solver.net/ I am a programmer by day, I dig grave for other programmers by night. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Storing webapp startup parameters
> From: David Kerber [mailto:[EMAIL PROTECTED] > Subject: Re: Storing webapp startup parameters > > I thought the webapp had to be bounced for this to take > effect, but I'd love to be proven wrong about that! You're right, it does appear that even a new InitialContext object does not pick up changes made on the fly by the admin app, so the webapp would have to be restarted. Also, the admin Commit Changes button doesn't rewrite the target app's web.xml (at least in 5.5.20), so any environment or resource values have to be in the context.xml for the webapp to do this at all. It looks like Chris' suggestion of using a real JNDI browser will be required. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: invalid LOC header (bad signature) when running in servlet only
> From: Claude Warren Jr [mailto:[EMAIL PROTECTED] > Subject: invalid LOC header (bad signature) when running in > servlet only > > message = invalid LOC header (bad signature) This is an indication of a corrupted .zip file. ZIP files can be read either sequentially or via the table of contents at the end of the file; the LOC header is only used when access is via the TOC. The java.util.zip classes use the TOC, while many other mechanisms use sequential access and do not encounter the invalid LOC header. One way this corruption can be introduced is by doing an FTP of the file in ASCII mode using a Windows FTP client; this has the annoying habit of converting LF characters into CR/LF sequences (or vice versa), which is not something you want to do with a ZIP file. You should be able to get rid of the error by rebuilding the file. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
invalid LOC header (bad signature) when running in servlet only
I have an web application that takes OpenOffice 1.1 files and converts them to web pages. I have a single sxw file that causes an exception but only when run in the servlet. When running in the servlet I get: java.lang.InternalError: jzentry == 0, jzfile = 138986592, total = 6, name = /content/xenei.net/coffeehouse/docs/calendar/Feb2007.sxw, i = 3, message = invalid LOC header (bad signature) java.util.zip.ZipFile$3.nextElement(ZipFile.java:429) java.util.zip.ZipFile$3.nextElement(ZipFile.java:415) java.util.jar.JarFile$1.nextElement(JarFile.java:217) java.util.jar.JarFile$1.nextElement(JarFile.java:216) org.xenei.cm.servlets.jarTest.list(jarTest.java:74) org.xenei.cm.servlets.jarTest.doGet(jarTest.java:84) javax.servlet.http.HttpServlet.service(HttpServlet.java:689) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) I have isolated the code in a small servlet: public class jarTest extends HttpServlet { public jarTest() { } private void digest(HttpServletRequest req, HttpServletResponse resp) throws IOException, NoSuchAlgorithmException { String urlString = req.getParameter("digest"); PrintWriter writer = resp.getWriter(); writer.println( "=> "+urlString ); URL myURL = new URL( "file:"+urlString ); MessageDigest md = MessageDigest.getInstance("MD5"); try { DigestInputStream dis = new DigestInputStream( myURL.openStream(), md ); byte[] buffer = new byte[1024]; BufferedInputStream bis = new BufferedInputStream( dis ); while (bis.read(buffer, 0, 1024 ) > -1) { // do nothing } byte[] digest = dis.getMessageDigest().digest(); writer.println( myURL.toString()+" digest is: "+Hex.encode( digest ) ); } catch (Exception e) { writer.println( "ERROR" ); e.printStackTrace( writer ); } } private void list(HttpServletRequest req, HttpServletResponse resp) throws IOException { String urlString = req.getParameter("url"); PrintWriter writer = resp.getWriter(); writer.println( "=> "+urlString ); URL myURL = new URL( "jar:file:"+urlString+"!/" ); writer.println( "Opening URL: "+myURL ); JarFile jarFile; // open the jarfile. JarURLConnection conn = (JarURLConnection) myURL.openConnection(); jarFile = conn.getJarFile(); Enumeration entries = jarFile.entries(); JarEntry entry; while (entries.hasMoreElements() ) { entry = (JarEntry)entries.nextElement(); // <--- Error occurs here writer.println( "processing: "+entry.getName() ); } writer.println( "<=" ); } protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { if (req.getParameter("url") != null) { list( req, resp ); } if (req.getParameter("digest") != null) { try { digest( req, resp ); } catch (NoSuchAlgorithmException e) { // TODO Auto-generated catch block throw new ServletException( e.getMessage(), e ); } } } } This servlet will either list the the contents of the jar (sxw) file with the url= argument or provide the MD5 digest for the contents of the file if called with the digest= argument. I have placed the same code in a stand alone app and it will read the file without problem. The MD5 digest of the bytes is the same both in the servlet and in the stand alone. This fails only in the servlet and, thus far, only with the one file. All other tools that can read zip files that I have access to are able to read the file, furthermore OpenOffice 1.1 can read it as well. I have not tried to rewrite it as I want to make sure that I understand why the servlet fails in this case so that I can attempt to account for it in future cases. Any help with this would be appreciated. I will gladly provide the servlet, stand alone, and sxw file for anyone that is interested in looking at this problem. Many Thanks, Claude Warren - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to locate a configuration file on disk at runtime
Caldarale, Charles R wrote: From: David Kerber [mailto:[EMAIL PROTECTED] Subject: Re: How to locate a configuration file on disk at runtime 2. Put the config file somewhere in the tree of my webapp, such at docbase or in conf. But again, I can't figure out how to pick that location in a form I can use to read the file in with a FileReader object. I'd still like to figure this one out, though. Any particular reason it must be a FileReader? If it can be any flavor of InputStream, then ServletContext.getResourceAsStream(String path) should work. The path can be something like "WEB-INF/myConfig.properties" or wherever else you'd like. IIRC, it can be any form of InputStream, so I'll give that a try. Thanks! Dave - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: How to locate a configuration file on disk at runtime
> From: David Kerber [mailto:[EMAIL PROTECTED] > Subject: Re: How to locate a configuration file on disk at runtime > > > 2. Put the config file somewhere in the tree of my webapp, such at > > docbase or in conf. But again, I can't figure out how to pick that > > location in a form I can use to read the file in with a FileReader > > object. > I'd still like to figure this one out, though. Any particular reason it must be a FileReader? If it can be any flavor of InputStream, then ServletContext.getResourceAsStream(String path) should work. The path can be something like "WEB-INF/myConfig.properties" or wherever else you'd like. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to locate a configuration file on disk at runtime
David Kerber wrote: This is a followup to my question about startup parameters. After digging around a bit, it looks like my best bet is to use the Properties class to read my settings from a disk file at startup. The properties api appears to be easy to use, and works very similarly to the Preferences class. My question is how to locate the file without hard-coding its location. I have looked at several possibilities, and can't work out the details on any of them even after a bunch of googling. :-( 1. Pass the location of the file as a JVM -D argument at app startup. But I can't figure how how to pick that value up inside my app. Figured this one out, once I finally hit on the right search terms. It's System.getProperty( "my.property.name", "DefaultValue"), where the JVM argument is -Dmy.property.name=MyPropertyValue. 2. Put the config file somewhere in the tree of my webapp, such at docbase or in conf. But again, I can't figure out how to pick that location in a form I can use to read the file in with a FileReader object. I'd still like to figure this one out, though. 3. ??? Any suggestions greatly appreciated! Dave - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat randomly hangs
Thanks for the suggestion Stefan. Yes I have run JConsole and will look at it some more. When the hang happens JConsole stops responding as well. Stefan Baramov wrote: Since you all are using Java 5 why do you try to enable JMX. JConsole could give you a good insight on threads. It could even provide thread dump or possibly detect deadlock. - Stefan - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
How to locate a configuration file on disk at runtime
This is a followup to my question about startup parameters. After digging around a bit, it looks like my best bet is to use the Properties class to read my settings from a disk file at startup. The properties api appears to be easy to use, and works very similarly to the Preferences class. My question is how to locate the file without hard-coding its location. I have looked at several possibilities, and can't work out the details on any of them even after a bunch of googling. :-( 1. Pass the location of the file as a JVM -D argument at app startup. But I can't figure how how to pick that value up inside my app. 2. Put the config file somewhere in the tree of my webapp, such at docbase or in conf. But again, I can't figure out how to pick that location in a form I can use to read the file in with a FileReader object. 3. ??? Any suggestions greatly appreciated! Dave - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Storing webapp startup parameters
Christopher Schultz wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 David, David Kerber wrote: Christopher Schultz wrote: Aah, okay. That's the same thing as in web.xml, I think. I think I need to look at that; I'd like to eliminate the entry in server.xml if possible... Take a look at in the web.xml: i think you can just put it there and not put anything in server.xml, which would be better, I think. Doesn't seem to work - my app isn't finding the variable name at all. I think it's because at the point I need the value, the servlet section of my app hasn't initialized yet; just some stuff that I start as soon as the context loads at TC startup. This is for looking for files on disk, which I check every minute whether or not anybody has hit my app through the browser. ... (Or is that no 'tribble' at all ??). Ooh. -1 for bad Star Trek humor ;) Too bad I can't type with a Scottish accent! Dave - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Storing webapp startup parameters
Caldarale, Charles R wrote: From: Christopher Schultz [mailto:[EMAIL PROTECTED] Subject: Re: Storing webapp startup parameters A JNDI browser might simplify this for you if you can either deploy it into your existing application, or if you can somehow connect to it from the outside. Doesn't Tomcat's admin app have this capability, including handling entries specified in server.xml? The default server.xml contains this sample: By using admin -> Resources -> Environment Entries -> simpleValue, you can change the 30 to any desired integer on the fly. The result should be immediately visible to any code looking it up. Using the Commit button preserves the value across Tomcat restarts by rewriting server.xml. I thought the webapp had to be bounced for this to take effect, but I'd love to be proven wrong about that! I'll play with it a bit. Dave. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: confirm subscribe to users@tomcat.apache.org
ICT Department wrote: > Hi there, we have a problem running JSPWiki under Tomcat, when using > Internet Explorer. It's fine in Firefox and doesn't display any exceptions > as shown below! > > This has happened since installing the JCIFS code into web.xml for user > authentication. > The JSPWiki developers can't help me, they said it sounds more like an > interplay issue between Tomcat and IE. Try using ieHttpHeaders for IE and Live Http Headers for Firefox to compare what the browsers are sending to Tomcat. I wouldn't use Tomcat's RequestDumperValve since the parameter encoding issue may cloud the problem you are looking for. Mark - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Latest tomcatie/IIS marriage trouble on CPU usage
Hi, I tried to follow the installation steps. I can see 'http://localhost/jsp-examples/'. But, for some reasons tomcat5.exe hit cpu nearly 50-100% and stay there. This happens on two installations. If I go to 'http://localhost:8080/jsp-examples/', CPU hit is fine(< 3%). My Windows server is 2003/IIS 6.0. What's going on??? Any help appreciated. -Mike ps. here's one of the config file: # workers.properties.minimal - # # This file provides minimal jk configuration properties needed to # connect to Tomcat. # # The workers that jk should create and work with # worker.list=wlb,jkstatus # # Defining a worker named ajp13w and of type ajp13 # Note that the name and the type do not have to match. # worker.ajp13w.type=ajp13 worker.ajp13w.host=localhost worker.ajp13w.port=8009 # # Defining a load balancer # worker.wlb.type=lb worker.wlb.balance_workers=ajp13w # # Define status worker # worker.jkstatus.type=status - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: HTTP PUT - HOW TO CONFIG?
> From: Zhan, Jimmy [mailto:[EMAIL PROTECTED] > Subject: RE: HTTP PUT - HOW TO CONFIG? > > Our goal is simple, just use the request URI as the file > name and put them under /webapps/incoming/. How about a valve to examine the headers and forward all PUT requests to a specific webapp, modifying the URI as needed? You can then use either your own servlet or something like Jakarta Commons FileUpload to handle the request. > How to post my question on Tomcat Mailing list? This IS the Tomcat mailing list. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: HTTP PUT - HOW TO CONFIG?
Robert, Thanks for your advice! We don't have apache server available now. We have a tomcat server can be use now. There is not too much PUT requests at all. But we need handle those requests using https. https is working fine now at tomcat, as I know setup https in apache is much harder than in tomcat. Our goal is simple, just use the request URI as the file name and put them under /webapps/incoming/. I don't think there are a lot people using PUT method. In general you can't send a PUT request thru browser. So it's hard to test also. Writing a java code is not the problem, the problem is how can you let tomcat know all PUT request go to my handler, coded by java, perl or other language. It should have some point to let tomcat know it. In PUT method, the URI is named by client, It could be any name. So you can't set by names, just as html, jsp and so on. How to post my question on Tomcat Mailing list? Thanks Jimmy -Original Message- From: Robert Harper [mailto:[EMAIL PROTECTED] Sent: Thursday, January 25, 2007 5:20 PM To: 'Tomcat Users List' Subject: RE: HTTP PUT - HOW TO CONFIG? I don't know if it can or can not. I never tried because I wanted to write Java code to handle by web requests rather than learn PL script. If you don't want to write Java script, then why not just use Apache since you seem to know how to configure it just fine. Tomcat can do some simple web server functions as long as you don't turn off some features. Tomcat is more like a playground with a manager that will set what servlet gets to play were and when and who gets what request. The Tomcat Mailing list is primarily for questions and answers on configuration, running, and coding for Java servlets in the Tomcat servlet container. Some people are bright, much more so than me, and are willing to answer questions that don't really have much to do with the Tomcat servlet container. -Original Message- From: Zhan, Jimmy [mailto:[EMAIL PROTECTED] Sent: Thursday, January 25, 2007 4:03 PM To: Tomcat Users List Subject: RE: HTTP PUT - HOW TO CONFIG? Hi Robert and chris, Do you mean tomcat can NOT transfer PUT request to my handler Just apache does thru config? I'm new here. What's the TC mailing list? Thanks Jimmy -Original Message- From: Christopher Schultz [mailto:[EMAIL PROTECTED] Sent: Thursday, January 25, 2007 3:40 PM To: Tomcat Users List Subject: Re: HTTP PUT - HOW TO CONFIG? -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Robert, Robert Harper wrote: > From another post, I am very confused why he is trying to use Tomcat. He > seems to want to redirect everything to PL script so why not just use a web > server to redirect. It doesn't seem to be a good use for a Java servlet/JSP > container. Maybe the TC mailing list has a good reputation. ;) - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.6 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFFuSO+9CaO5/Lv0PARAunWAJsGHJVorP+XejRBagReMfzQAVjtzACgibv4 kBu4zBdEUk69HWFJAj2nvFY= =6dRZ -END PGP SIGNATURE- - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: HTTP PUT - HOW TO CONFIG?
I don't know if it can or can not. I never tried because I wanted to write Java code to handle by web requests rather than learn PL script. If you don't want to write Java script, then why not just use Apache since you seem to know how to configure it just fine. Tomcat can do some simple web server functions as long as you don't turn off some features. Tomcat is more like a playground with a manager that will set what servlet gets to play were and when and who gets what request. The Tomcat Mailing list is primarily for questions and answers on configuration, running, and coding for Java servlets in the Tomcat servlet container. Some people are bright, much more so than me, and are willing to answer questions that don't really have much to do with the Tomcat servlet container. -Original Message- From: Zhan, Jimmy [mailto:[EMAIL PROTECTED] Sent: Thursday, January 25, 2007 4:03 PM To: Tomcat Users List Subject: RE: HTTP PUT - HOW TO CONFIG? Hi Robert and chris, Do you mean tomcat can NOT transfer PUT request to my handler Just apache does thru config? I'm new here. What's the TC mailing list? Thanks Jimmy -Original Message- From: Christopher Schultz [mailto:[EMAIL PROTECTED] Sent: Thursday, January 25, 2007 3:40 PM To: Tomcat Users List Subject: Re: HTTP PUT - HOW TO CONFIG? -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Robert, Robert Harper wrote: > From another post, I am very confused why he is trying to use Tomcat. He > seems to want to redirect everything to PL script so why not just use a web > server to redirect. It doesn't seem to be a good use for a Java servlet/JSP > container. Maybe the TC mailing list has a good reputation. ;) - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.6 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFFuSO+9CaO5/Lv0PARAunWAJsGHJVorP+XejRBagReMfzQAVjtzACgibv4 kBu4zBdEUk69HWFJAj2nvFY= =6dRZ -END PGP SIGNATURE- - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: HTTP PUT - HOW TO CONFIG?
I don't know if Tomcat would be able to do this without some code. It is not intended to replace Apache, IIS, or some other web server. It is intended to be a Java Servlet/JSP container. You might try creating a servlet that does something like this public void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { String buf = req.getRequestURL().replace( "my_context_path", "/cgi-bin/put.pl"); resp.sendRedirect( buf ); } So let's say you have a URL like http://www.myserver.com/realitycheck, then replace to req.getRequestURL().replace( "/realitycheck", "/cgi-bin/put.pl" ) Then use that in the redirect. Someone else might/will have a better idea but it seems to me you are trying to kill a fly with a water cannon where a fly swatter would be more efficient. -Original Message- From: Zhan, Jimmy [mailto:[EMAIL PROTECTED] Sent: Thursday, January 25, 2007 3:53 PM To: Tomcat Users List Subject: RE: HTTP PUT - HOW TO CONFIG? Hi, Thanks for your responses! I don't know tomcat how handle HTTP PUT requests. But I want tomcat transfers all PUT requests to my handler /cgi-bin/put.pl as apache does. How to config in tomcat to do this? Thanks Jimmy Zhan - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat randomly hangs
Since you all are using Java 5 why do you try to enable JMX. JConsole could give you a good insight on threads. It could even provide thread dump or possibly detect deadlock. - Stefan - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: HTTP PUT - HOW TO CONFIG?
Hi Robert and chris, Do you mean tomcat can NOT transfer PUT request to my handler Just apache does thru config? I'm new here. What's the TC mailing list? Thanks Jimmy -Original Message- From: Christopher Schultz [mailto:[EMAIL PROTECTED] Sent: Thursday, January 25, 2007 3:40 PM To: Tomcat Users List Subject: Re: HTTP PUT - HOW TO CONFIG? -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Robert, Robert Harper wrote: > From another post, I am very confused why he is trying to use Tomcat. He > seems to want to redirect everything to PL script so why not just use a web > server to redirect. It doesn't seem to be a good use for a Java servlet/JSP > container. Maybe the TC mailing list has a good reputation. ;) - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.6 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFFuSO+9CaO5/Lv0PARAunWAJsGHJVorP+XejRBagReMfzQAVjtzACgibv4 kBu4zBdEUk69HWFJAj2nvFY= =6dRZ -END PGP SIGNATURE- - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: HTTP PUT - HOW TO CONFIG?
Hi, Thanks for your responses! I don't know tomcat how handle HTTP PUT requests. But I want tomcat transfers all PUT requests to my handler /cgi-bin/put.pl as apache does. How to config in tomcat to do this? Thanks Jimmy Zhan -Original Message- From: Christopher Schultz [mailto:[EMAIL PROTECTED] Sent: Thursday, January 25, 2007 3:11 PM To: Tomcat Users List Subject: Re: HTTP PUT - HOW TO CONFIG? -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Robert, Robert Harper wrote: > If I understand your question correctly and you are using servlets to handle > web requests, just override the HTTPServlet.doPost() method. Uhh doPut(), maybe? - -chris - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Memory Mgmt Tomcat
Thanks, Lemme try these out. Regards, On 1/26/07, Indu Devanath <[EMAIL PROTECTED]> wrote: You might find useful information at the below links. http://tomcat.apache.org/faq/memory.html#why http://search400.techtarget.com/tip/1,289483,sid3_gci1000892,00.html Indu -Original Message- From: Gaurav Kushwaha [mailto:[EMAIL PROTECTED] Sent: Thursday, January 25, 2007 5:10 PM To: Tomcat Users List Subject: Memory Mgmt Tomcat I am running Tomcat 5.0.28 on Linux. It works fine for few days but starts throwing OutOfMemoryException after that. Any clues ?? Thanks, Gaurav Singh Kushwaha http://www.chakpak.com Ph: +91-9880101496 Bangalore, India. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Gaurav Singh Kushwaha http://www.chakpak.com Ph: +91-9880101496 Bangalore, India.
Re: Memory Mgmt Tomcat
Try this link: http://www.catb.org/~esr/faqs/smart-questions.html regards Leon On 1/25/07, Gaurav Kushwaha <[EMAIL PROTECTED]> wrote: I am running Tomcat 5.0.28 on Linux. It works fine for few days but starts throwing OutOfMemoryException after that. Any clues ?? Thanks, Gaurav Singh Kushwaha http://www.chakpak.com Ph: +91-9880101496 Bangalore, India. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Memory Mgmt Tomcat
> From: Gaurav Kushwaha [mailto:[EMAIL PROTECTED] > Subject: Memory Mgmt Tomcat > > I am running Tomcat 5.0.28 on Linux. It works fine for few > days but starts throwing OutOfMemoryException after that. > Any clues ?? Don't suppose you've read the FAQ: http://tomcat.apache.org/faq/memory.html Might want to look at this as well: http://tomcat.apache.org/faq/tomcatuser.html - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Memory Mgmt Tomcat
You might find useful information at the below links. http://tomcat.apache.org/faq/memory.html#why http://search400.techtarget.com/tip/1,289483,sid3_gci1000892,00.html Indu -Original Message- From: Gaurav Kushwaha [mailto:[EMAIL PROTECTED] Sent: Thursday, January 25, 2007 5:10 PM To: Tomcat Users List Subject: Memory Mgmt Tomcat I am running Tomcat 5.0.28 on Linux. It works fine for few days but starts throwing OutOfMemoryException after that. Any clues ?? Thanks, Gaurav Singh Kushwaha http://www.chakpak.com Ph: +91-9880101496 Bangalore, India. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: multiple requests from the same client (only 2 threads are activated!)
> From: Debora Desideri [mailto:[EMAIL PROTECTED] > Subject: multiple requests from the same client (only 2 > threads are activated!) > > - if I send more than two requests from the same client, > the third request is not executed until one of the other two > has been executed. Assuming your Ajax environment is running inside a browser, you've likely hit a self-imposed browser restriction. The HTTP RFC recommends that clients open a maximum of two concurrent connections to a given server; although some HTTP clients don't adhere to that, IE and Firefox do. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Memory Mgmt Tomcat
I am running Tomcat 5.0.28 on Linux. It works fine for few days but starts throwing OutOfMemoryException after that. Any clues ?? Thanks, Gaurav Singh Kushwaha http://www.chakpak.com Ph: +91-9880101496 Bangalore, India.
Trouble adding custom ELResolver into resolver chain
I am trying to use a custom ELResolver that will work with the existing default resolvers. Initially, I tried just adding it within the face-config.xml as follows: demo.resolver.DCELResolver It worked to add my resolver, but it got rid of all the other resolvers in the chain. Next, I tried to add it through the JspApplicationContext. I did this by adding the following code to a servlet context listener (the contextInitialized method). try { // This is a hack due to a bug in Tomcat 6.0 Class.forName("org.apache.jasper.compiler.JspRuntimeContext"); } catch (ClassNotFoundException cnfe) { throw new RuntimeException("Failed to load Jsp Runtime Context"); } ServletContext servletContext = servletContextEvent.getServletContext(); JspFactory jspFactory = JspFactory.getDefaultFactory(); JspApplicationContext jspApplicationContext = jspFactory.getJspApplicationContext(servletContext); jspApplicationContext.addELResolver(new DCELResolver()); This code runs just fine, however my resolver is ignored. I placed System.out.println calls within all the methods to check if they were ever called and they weren't. Instead, property resolutions just failed without ever consulting my resolver. What might I be missing? The only warning that occurs at startup is the following: WARNING: JSF1033: Resource injection is DISABLED. I am using Apache Tomcat version 6.0.7, jstl 1.2, web.xml is using web-app-2_5.xsd. Thanks in advance for any hints or suggestions. Jason -- View this message in context: http://www.nabble.com/Trouble-adding-custom-ELResolver-into-resolver-chain-tf3119293.html#a8642016 Sent from the Tomcat - User mailing list archive at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: SSL Configuration works but half the way
> From: Jose Rafael Romero Miret [mailto:[EMAIL PROTECTED] > Subject: SSL Configuration works but half the way > > I configured tomcat as standalone server and now i want to > configure ssl. 1) You told us the JDK, but what _exact_ version of Tomcat are you using? 2) Do you have APR installed? If so, the SSL config is very different. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: HTTP PUT - HOW TO CONFIG?
"Maybe the TC mailing list has a good reputation. ;)" Very good point. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: HTTP PUT - HOW TO CONFIG?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Robert, Robert Harper wrote: > From another post, I am very confused why he is trying to use Tomcat. He > seems to want to redirect everything to PL script so why not just use a web > server to redirect. It doesn't seem to be a good use for a Java servlet/JSP > container. Maybe the TC mailing list has a good reputation. ;) - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.6 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFFuSO+9CaO5/Lv0PARAunWAJsGHJVorP+XejRBagReMfzQAVjtzACgibv4 kBu4zBdEUk69HWFJAj2nvFY= =6dRZ -END PGP SIGNATURE- - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Storing webapp startup parameters
> From: Christopher Schultz [mailto:[EMAIL PROTECTED] > Subject: Re: Storing webapp startup parameters > > A JNDI browser might simplify this for you if you can either deploy it > into your existing application, or if you can somehow connect > to it from the outside. Doesn't Tomcat's admin app have this capability, including handling entries specified in server.xml? The default server.xml contains this sample: By using admin -> Resources -> Environment Entries -> simpleValue, you can change the 30 to any desired integer on the fly. The result should be immediately visible to any code looking it up. Using the Commit button preserves the value across Tomcat restarts by rewriting server.xml. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: HTTP PUT - HOW TO CONFIG?
Bad day for me, you are very correct. It should be the doPut() method. >From another post, I am very confused why he is trying to use Tomcat. He seems to want to redirect everything to PL script so why not just use a web server to redirect. It doesn't seem to be a good use for a Java servlet/JSP container. Robert S. Harper Senior Engineer Information Access Technology, Inc. 1100 East 6600 South, Suite 300 Salt Lake City Utah USA 84121-7411 (801)265-8800 Ext. 255 FAX (801)265-8880 This e-mail is intended only for the addressee and may contain confidential and/or privileged information. Any review, retransmission, or action taken upon this information by persons other than the intended recipient is prohibited by law. If you received this communication in error, please contact us immediately at 801-265-8800. Although this e-mail and any attachments are believed to be free of any virus or other defect, it is the responsibility of the recipient to ensure that anything received or opened is virus free. No responsibility is accepted by IAT for any loss or damage in the event that such a virus or defect exists. -Original Message- From: Christopher Schultz [mailto:[EMAIL PROTECTED] Sent: Thursday, January 25, 2007 2:11 PM To: Tomcat Users List Subject: Re: HTTP PUT - HOW TO CONFIG? -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Robert, Robert Harper wrote: > If I understand your question correctly and you are using servlets to handle > web requests, just override the HTTPServlet.doPost() method. Uhh doPut(), maybe? - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.6 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFFuRzt9CaO5/Lv0PARAqJ+AJ41G/xY7b1Un+5x1sTrMVMUlfzsrACgjmzI a7FG9mjPG7YJK3gogGUxivY= =kHW1 -END PGP SIGNATURE- - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Solaris jk-1.2.20
... done. Erich's builds have been uploaded. It might take up to 4 hours to sync them on www.apache.org and a couple of more hours for mirroring worldwide. Rainer Jung schrieb: > I received solaris binaries from Erich Siffert a week ago and will > upload them until Monday. If the 1.2.19 ones work for you, gthe 1.2.20 > ones will most likely too, because he already built the 1.2.19 ones. > Thanks go to Erich. > > Regards, > > Rainer > > Brett D. Ellis schrieb: >> Hey all, >> New list subscriber. I'm trying to get the latest jk for Solaris, and >> trying to avoid compiling from source. All the binary trees for 1.2.20 >> and solaris are empty. Just sending this to make sure this is a known >> issue, not just something that is accidental. If this is known, any >> idea when 1.2.20 will be available in binary format for Solaris? >> Thanks, >>Brett - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: HTTP PUT - HOW TO CONFIG?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Robert, Robert Harper wrote: > If I understand your question correctly and you are using servlets to handle > web requests, just override the HTTPServlet.doPost() method. Uhh doPut(), maybe? - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.6 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFFuRzt9CaO5/Lv0PARAqJ+AJ41G/xY7b1Un+5x1sTrMVMUlfzsrACgjmzI a7FG9mjPG7YJK3gogGUxivY= =kHW1 -END PGP SIGNATURE- - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat randomly hangs
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Leon, Leon Rosenberg wrote: > maybe you should perform a full thread dump in normal state, and check > whether this very long running requests result in hanging threads? > Then you are probably out of threads at some point and no more > connections can be created. > You have no "SEVERE All Threads busy" in your catalina.out by chance? If all the request processor threads are blocked or hung, the VM still ought to be able to do a thread dump. On the other hand, running out of threads (that is, actually not being able to create a new thread) should result in a VM error being thrown (and logged). I think this issue might turn out to be something rather non-obvious. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.6 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFFuRyB9CaO5/Lv0PARApwfAKCIKKh9e+SedYrkZq4NIBZv3CcIfACgwLoL lRuHMZEF8inOblrLdb4E4Vc= =+NvZ -END PGP SIGNATURE- - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Classloader or Security Issue?
Hi, Suneet Shah wrote: Hello, I am trying to call an EJB from tomcat 5.5.20. The EJB is is located on Websphere 6.1. I am able to get the JNDI context, but when I lookup the bean, I get the exception below. I confirmed that its not a classpath issue as the ibmorb.jar, which contains the UtilDelegateImpl class, is in the common/lib directory in tomcat. This problem is only happening on Solaris. Both tomcat and WAS 6.1 are on Solaris. When I run this on Windows, it works just fine. Any thoughts on what this could be and how I can get around this? Thanks in advance. SEVERE: An exception or error occurred in the container during the request processing java.lang.NoClassDefFoundError: com/ibm/CORBA/iiop/UtilDelegateImpl which JDK are you using on Solaris? SUN JDK (version) IBM JDK (from the WebSphere AppClient, version?) Regards Boris - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: 64-bit tomcat5.exe not working properly (TC 5.5.20)
A reply for archives... The amd64 files in the SVN repository at the URL below are named incorrectly!!! - tomcat5.exe.amd64 should be called tomcat5w.exe.amd64 - tomcat5w.exe.amd64 should be called tomcat5.exe.amd64 After I renamed the files the service works perfectly! I hope others won't be wasting as much time on this as I have... Martin > Hi everyone > > I'm trying to setup Tomcat as a service on 64-bit Windows with 64-bit > Java, but are having trouble installing the service. The Tomcat runs > properly when started using startup.bat. > > I have installed JDK 1.5.0_10 for 64-bit Windows and Tomcat 5.5.20 from > the zip file on tomcat.apache.org. The server is using Intel Xeon CPUs and > Windows Server 2003 X64. > > I have replaced bin/tomcat5.exe and tomcat5w.exe with the .amd64 files > from > http://svn.apache.org/viewvc/tomcat/connectors/tags/tc5.5.x/TOMCAT_5_5_20/procrun/bin/ > as mentioned several times before on this list. > > When I run "service.bat install" a window shows up with the following > text: > Unknown command line option '//IS//Tomcat5 --StartClass > org.apache.catalina.startup.Bootstrap --StopClass > org.apache.catalina.startup.Bootstrap --StartParams start --StopParams > stop' > > If I press "OK" then the windows shows up two more times - with the other > arguments from service.bat. > > I have checked the options against the ones documented on the procrun > homepage, but they all appear to be correct. > > Has anyone else experienced this and what did you do about it? > > Regards, > Martin Skøtt > > > - > To start a new topic, e-mail: users@tomcat.apache.org > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat randomly hangs
maybe you should perform a full thread dump in normal state, and check whether this very long running requests result in hanging threads? Then you are probably out of threads at some point and no more connections can be created. You have no "SEVERE All Threads busy" in your catalina.out by chance? leon On 1/25/07, Brian Cross <[EMAIL PROTECTED]> wrote: Christopher, thanks for the reply. Yes I have checked all the logs and there are no warnings or errors when the hang occurs. You are right that since the VM appears to hang, fronting with apache may not help but it would rule out the Coyote connector at least. One other thing I did notice is that in the tomcat manager server status page there are some connections that seem to be hung, for example: Stage TimeB Sent B Recv *S* 28604 ms24 KB 0 KB *S* 1273330 ms 16 KB 0 KB *S* 829528 ms 16 KB 0 KB *S* 1293854 ms 16 KB 0 KB *S* 1331406 ms 16 KB 0 KB *S* 329442 ms 16 KB 0 KB I picked out the ones with the highest value for Time out of the 185 active threads. Most threads are in the K or R state. I have the connectionTimeout on the connector set to 20 seconds so I don't understand what these threads are doing. Maybe this is a clue? Thanks! --Brian. Christopher Schultz wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > Brian, > > Brian Cross wrote: > >> I would really appreciate any advice, I really don't know where to go >> from here to try and figure it out. If I can't figure it out soon my >> plan is to use apache2 as the webserver and connect to tomcat via JK. >> > > You didn't explicitly say that you did, so I have to ask: you looked in > all your log files, right? > > If your VM really is crashing/hanging/whatever, then adding Apache httpd > out front is unlikely to change anything. > > - -chris > -BEGIN PGP SIGNATURE- > Version: GnuPG v1.4.6 (MingW32) > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org > > iD8DBQFFuQOy9CaO5/Lv0PARAgvTAKCPlHuIIHdZh09xubolGgShG0wASQCfY9/8 > VAp2J+4kxL9tOw951u7xtmk= > =C/L8 > -END PGP SIGNATURE- > > - > To start a new topic, e-mail: users@tomcat.apache.org > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: HTTP PUT - HOW TO CONFIG?
Hi, Yes. I wand tomcat transfers all HTTP PUT requests to our handler /cgi-bin/put.pl. Thanks Jimmy ZHAN Cash America -Original Message- From: Robert Harper [mailto:[EMAIL PROTECTED] Sent: Thursday, January 25, 2007 1:43 PM To: 'Tomcat Users List' Subject: RE: HTTP PUT - HOW TO CONFIG? If I understand your question correctly and you are using servlets to handle web requests, just override the HTTPServlet.doPost() method. Put your code to handle the put in there. Robert S. Harper Senior Engineer Information Access Technology, Inc. 1100 East 6600 South, Suite 300 Salt Lake City Utah USA 84121-7411 (801)265-8800 Ext. 255 FAX (801)265-8880 This e-mail is intended only for the addressee and may contain confidential and/or privileged information. Any review, retransmission, or action taken upon this information by persons other than the intended recipient is prohibited by law. If you received this communication in error, please contact us immediately at 801-265-8800. Although this e-mail and any attachments are believed to be free of any virus or other defect, it is the responsibility of the recipient to ensure that anything received or opened is virus free. No responsibility is accepted by IAT for any loss or damage in the event that such a virus or defect exists. -Original Message- From: Zhan, Jimmy [mailto:[EMAIL PROTECTED] Sent: Thursday, January 25, 2007 12:38 PM To: users@tomcat.apache.org Subject: HTTP PUT - HOW TO CONFIG? Hi, Is there any directive to handle HTTP PUT, like in the apache for tomcat (5.5)? In Apache I can using a directive such as: # A CGI PUT handler Script PUT /cgi-bin/put.cgi Questions: 1. If I have a put.pl ready to use, how to config in tomcat to let put.pl handle all request of HTTP/HTTPS PUT? (HTTPS is ready to be used). 2. I want to put all upload files under directory of $CATALINA_HOME/wepalls/incoming/, how to config? 3. Is there any sample put.pl perl program can be learned? Thanks Jimmy Zhan Cash America - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat randomly hangs [SECOND INQUIRY]
you shouldn't hijack threads, please start a new one. However, one quick shot: 2.4 kernel usually doesn't have nptl support, which means that you can maximum have something like 500 threads in tomcat (depending on how many other threads exist in your app). Another question, is it a et64 xeon? if so, why don't u use a 64bit os? (4Gb memory on a 32 bit linux doesn't really work well). regards Leon On 1/25/07, Derek Wormdahl <[EMAIL PROTECTED]> wrote: We are experiencing similar behavior with Tomcat 5.5.17 running standalone: Dual 3.0GHz Xeon 4GB memory RHEL AS 3 Linux 2.4.21-47.0.1.ELsmp #1 SMP Fri Oct 13 17:56:20 EDT 2006 i686 i686 i386 GNU/Linux BEA jrockit-R26.0.0-jdk1.5.0_04 This has become a big problem for us as well so I would also very much appreciate any advice. Thanks, -Derek Brian Cross wrote: > Hello and thanks in advance for any advice. > > We have Tomcat 5.5.20 running standalone on the following system: > > Dual AMD Opteron > 4 gig of memory > Debian Linux 2.6.8 amd64 smp kernel > latest sun java 1.5, 1.6, ibm 1.5 (happens on all 3 VM's) > Tomcat 5.5.20 (originally happened on 5.5.16, upgrade didn't help) > > Randomly it will hang and stop accepting connections on port 80, > sometimes even late at night when there is not much traffic. > > When the hang occurs: > > * Can't access any web app on tomcat including the tomcat manager > * Telnet to port 80 hangs(Coyote running on port 80) > * load goes up, but only slightly (from < 1 to maybe 3 or 4) > * sometimes after a couple of minutes it starts responding again, > sometimes it doesn't. > * when I run shutdown.sh the java process continues to run and I have > to kill -9 to stop it > * I try to do a kill -3 or kill -QUIT on the java process to get a > thread dump, but it does not work > > I have tried many different jvm settings and tomcat connector > settings, here is what I have currently: > >maxThreads="1000" minSpareThreads="50" maxSpareThreads="100" > enableLookups="false" redirectPort="8443" acceptCount="100" > connectionTimeout="2" strategy="ms" > disableUploadTimeout="false" /> > > CATALINA_OPTS="-server -XX:MaxPermSize=256m -ms512m -mx1280m -Xss96k > -Djava.awt.headless=true" > > I would really appreciate any advice, I really don't know where to go > from here to try and figure it out. If I can't figure it out soon my > plan is to use apache2 as the webserver and connect to tomcat via JK. > > Thanks so much for your expert advice! > > --Brian. > > - > To start a new topic, e-mail: users@tomcat.apache.org > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problems with mod_jk apache
I assume you are using version 1.2.20. Increase you JkLogLevel to debug and check in the mod_jk log file, if mod_jk succeeds in matching your request url to your configured JkMounts. Víctor Fragoso schrieb: > Hi there, I've been trying to configure my apache2 and tomcat5.5 in > order to > work together. It works, when I point to http://mysite/index.jsp it works, > then I need > to use VirtualHost. I edited the vhosts file, and server.xml, and I got > this: > > > Forbidden > > You don't have permission to access / on this server. > > Additionally, a 403 Forbidden error was encountered while trying to use an > ErrorDocument to handle the request. > -- > Apache Server at stonedgorilla.net Port 80 > > > #StonedGorilla.net VirtualHost > > > ServerAdmin [EMAIL PROTECTED] > DocumentRoot /var/lib/tomcat-5.5/webapps/stonedgorilla.net > ServerName stonedgorilla.net > ServerAlias www.stonedgorilla.net > ErrorLog /var/log/apache2/stonedgorilla.net-error_log > CustomLog /var/log/apache2/stonedgorilla.net-access_log common > > Alias / "/var/lib/tomcat-5.5/webapps/stonedgorilla.net/ROOT" > > >Options Indexes +FollowSymLinks >AllowOverride None >Order allow,deny >Allow from all > > > jkMount /*.jsp ajp13 > jkMount /servlet/* ajp13 > > >AllowOverride None >deny from all > > > > > And my application in tomcat is working fine, I know that cuz' I pointed to > :8080 port and ask for it, and it worked. I set this in my server.xml > > appBase="/var/lib/tomcat-5.5/webapps/stonedgorilla.net/" >autoDeploy="true"> >www.stonedgorilla.net > directoryName="public_html" > userClass="org.apache.catalina.startup.PasswdUserDatabase > "/> > > > I hope to hear from u soon, Thanks! - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Solaris jk-1.2.20
I received solaris binaries from Erich Siffert a week ago and will upload them until Monday. If the 1.2.19 ones work for you, gthe 1.2.20 ones will most likely too, because he already built the 1.2.19 ones. Thanks go to Erich. Regards, Rainer Brett D. Ellis schrieb: > Hey all, > New list subscriber. I'm trying to get the latest jk for Solaris, and > trying to avoid compiling from source. All the binary trees for 1.2.20 > and solaris are empty. Just sending this to make sure this is a known > issue, not just something that is accidental. If this is known, any > idea when 1.2.20 will be available in binary format for Solaris? > Thanks, >Brett > > > - > To start a new topic, e-mail: users@tomcat.apache.org > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat randomly hangs
Christopher, thanks for the reply. Yes I have checked all the logs and there are no warnings or errors when the hang occurs. You are right that since the VM appears to hang, fronting with apache may not help but it would rule out the Coyote connector at least. One other thing I did notice is that in the tomcat manager server status page there are some connections that seem to be hung, for example: Stage TimeB Sent B Recv *S* 28604 ms24 KB 0 KB *S* 1273330 ms 16 KB 0 KB *S* 829528 ms 16 KB 0 KB *S* 1293854 ms 16 KB 0 KB *S* 1331406 ms 16 KB 0 KB *S* 329442 ms 16 KB 0 KB I picked out the ones with the highest value for Time out of the 185 active threads. Most threads are in the K or R state. I have the connectionTimeout on the connector set to 20 seconds so I don't understand what these threads are doing. Maybe this is a clue? Thanks! --Brian. Christopher Schultz wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Brian, Brian Cross wrote: I would really appreciate any advice, I really don't know where to go from here to try and figure it out. If I can't figure it out soon my plan is to use apache2 as the webserver and connect to tomcat via JK. You didn't explicitly say that you did, so I have to ask: you looked in all your log files, right? If your VM really is crashing/hanging/whatever, then adding Apache httpd out front is unlikely to change anything. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.6 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFFuQOy9CaO5/Lv0PARAgvTAKCPlHuIIHdZh09xubolGgShG0wASQCfY9/8 VAp2J+4kxL9tOw951u7xtmk= =C/L8 -END PGP SIGNATURE- - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: HTTP PUT - HOW TO CONFIG?
If I understand your question correctly and you are using servlets to handle web requests, just override the HTTPServlet.doPost() method. Put your code to handle the put in there. Robert S. Harper Senior Engineer Information Access Technology, Inc. 1100 East 6600 South, Suite 300 Salt Lake City Utah USA 84121-7411 (801)265-8800 Ext. 255 FAX (801)265-8880 This e-mail is intended only for the addressee and may contain confidential and/or privileged information. Any review, retransmission, or action taken upon this information by persons other than the intended recipient is prohibited by law. If you received this communication in error, please contact us immediately at 801-265-8800. Although this e-mail and any attachments are believed to be free of any virus or other defect, it is the responsibility of the recipient to ensure that anything received or opened is virus free. No responsibility is accepted by IAT for any loss or damage in the event that such a virus or defect exists. -Original Message- From: Zhan, Jimmy [mailto:[EMAIL PROTECTED] Sent: Thursday, January 25, 2007 12:38 PM To: users@tomcat.apache.org Subject: HTTP PUT - HOW TO CONFIG? Hi, Is there any directive to handle HTTP PUT, like in the apache for tomcat (5.5)? In Apache I can using a directive such as: # A CGI PUT handler Script PUT /cgi-bin/put.cgi Questions: 1. If I have a put.pl ready to use, how to config in tomcat to let put.pl handle all request of HTTP/HTTPS PUT? (HTTPS is ready to be used). 2. I want to put all upload files under directory of $CATALINA_HOME/wepalls/incoming/, how to config? 3. Is there any sample put.pl perl program can be learned? Thanks Jimmy Zhan Cash America - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat randomly hangs
We are experiencing similar behavior with Tomcat 5.5.17 running standalone: Dual 3.0GHz Xeon 4GB memory RHEL AS 3 Linux 2.4.21-47.0.1.ELsmp #1 SMP Fri Oct 13 17:56:20 EDT 2006 i686 i686 i386 GNU/Linux BEA jrockit-R26.0.0-jdk1.5.0_04 This has become a big problem for us as well so I would also very much appreciate any advice. Thanks, -Derek Brian Cross wrote: Hello and thanks in advance for any advice. We have Tomcat 5.5.20 running standalone on the following system: Dual AMD Opteron 4 gig of memory Debian Linux 2.6.8 amd64 smp kernel latest sun java 1.5, 1.6, ibm 1.5 (happens on all 3 VM's) Tomcat 5.5.20 (originally happened on 5.5.16, upgrade didn't help) Randomly it will hang and stop accepting connections on port 80, sometimes even late at night when there is not much traffic. When the hang occurs: * Can't access any web app on tomcat including the tomcat manager * Telnet to port 80 hangs(Coyote running on port 80) * load goes up, but only slightly (from < 1 to maybe 3 or 4) * sometimes after a couple of minutes it starts responding again, sometimes it doesn't. * when I run shutdown.sh the java process continues to run and I have to kill -9 to stop it * I try to do a kill -3 or kill -QUIT on the java process to get a thread dump, but it does not work I have tried many different jvm settings and tomcat connector settings, here is what I have currently: connectionTimeout="2" strategy="ms" disableUploadTimeout="false" /> CATALINA_OPTS="-server -XX:MaxPermSize=256m -ms512m -mx1280m -Xss96k -Djava.awt.headless=true" I would really appreciate any advice, I really don't know where to go from here to try and figure it out. If I can't figure it out soon my plan is to use apache2 as the webserver and connect to tomcat via JK. Thanks so much for your expert advice! --Brian. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
HTTP PUT - HOW TO CONFIG?
Hi, Is there any directive to handle HTTP PUT, like in the apache for tomcat (5.5)? In Apache I can using a directive such as: # A CGI PUT handler Script PUT /cgi-bin/put.cgi Questions: 1. If I have a put.pl ready to use, how to config in tomcat to let put.pl handle all request of HTTP/HTTPS PUT? (HTTPS is ready to be used). 2. I want to put all upload files under directory of $CATALINA_HOME/wepalls/incoming/, how to config? 3. Is there any sample put.pl perl program can be learned? Thanks Jimmy Zhan Cash America
Re: Tomcat randomly hangs
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Brian, Brian Cross wrote: > I would really appreciate any advice, I really don't know where to go > from here to try and figure it out. If I can't figure it out soon my > plan is to use apache2 as the webserver and connect to tomcat via JK. You didn't explicitly say that you did, so I have to ask: you looked in all your log files, right? If your VM really is crashing/hanging/whatever, then adding Apache httpd out front is unlikely to change anything. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.6 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFFuQOy9CaO5/Lv0PARAgvTAKCPlHuIIHdZh09xubolGgShG0wASQCfY9/8 VAp2J+4kxL9tOw951u7xtmk= =C/L8 -END PGP SIGNATURE- - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Storing webapp startup parameters
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 David, David Kerber wrote: > Christopher Schultz wrote: >> Aah, okay. That's the same thing as in web.xml, I think. >> >> > I think I need to look at that; I'd like to eliminate the entry in > server.xml if possible... Take a look at in the web.xml: i think you can just put it there and not put anything in server.xml, which would be better, I think. >> A JNDI browser might simplify this for you if you can either deploy it >> into your existing application, or if you can somehow connect to it from >> the outside. Otherwise, you can write some quickie preference editor >> yourself. > > Very cool; Thanks, Chris! I didn't know I could do that. Well, like I said... I haven't done it myself. There was a question on this list this week about mutability of the JNDI values through Tomcat. It's possible that Tomcat provides a read-only view of the directory, so you might be hosed in that case. Perhaps there is a way around that. > I guess that's what happens when I just copy some code from a web > page, without really understanding where it's coming from.. I have > already done some preference editors that use the java Preferences > class, so modifying them to use this should be no trouble at all. In fact, you might be able to write a class that looks like a Preferences object and really delegates all calls to JNDI. > (Or is that no 'tribble' at all ??). Ooh. -1 for bad Star Trek humor ;) - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.6 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFFuQMb9CaO5/Lv0PARApH0AJ0Ygr9fPcGnl3gpaz5da9k9NClodgCgwe9x m8gQJDQUnExIPQataRIopWY= =ll0S -END PGP SIGNATURE- - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: IE Issues with JSPWiki & JCIFS!!
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Chris, ICT Department wrote: > Hi there, we have a problem running JSPWiki under Tomcat, when using > Internet Explorer. It's fine in Firefox and doesn't display any exceptions > as shown below! [snip] > java.io.UnsupportedEncodingException: Cp850 Hmm. Is that a character set you were expecting? Is it one that is available in your JVM? I am unfamiliar with that one. "Code Page 850?". Sounds like some Microsoft Windows game. Yep, it is: http://en.wikipedia.org/wiki/Code_page_850 It looks like it might be equivalent to WINDOWS-1252 or UTF-8 (except for higher characters, which will be hosed anyway). Note that CP850 doesn't have the € (euro) symbol. :( I wonder if the character set needs to be expressed as "CP850" instead of "Cp850". - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.6 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFFuQJE9CaO5/Lv0PARAmURAJ442ZcBKmA5rWDC/znoB9TGwroDKgCgpret koo/v8qp0FK6UmZiat7fAs0= =VufJ -END PGP SIGNATURE- - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
multiple requests from the same client (only 2 threads are activated!)
Hi, I have a web application and I'm using ajax to send requests to the server (I'm using Tomcat 5.5.17). The problem is the following: - if I send more than two requests from the same client, the third request is not executed until one of the other two has been executed. It seems that, for the same client, only two requests at the same time are processed. (If I send a further request from another client, it is processed) Using Ajax, with asynchronous request, that is very inconvenient, indeed if two requests need a bit of time to be processed, the next requests are serialized (they have to wait the end of one of the two requests in processing) Can someone tell me how can I solve this problem? Thanks, Debora
SSL Configuration works but half the way
I configured tomcat as standalone server and now i want to configure ssl. I did that as the book I have said and also like the documentation in the website tells me. after the configuration i get this: http://localhost:443/ gives me tomcat website. https://localhost:443/ gives me connected status in the browser with no result... it waits until some timeout jumps. My configuration: i'm using java sdk 1.6.0 keytool.exe -genkey -alias tomcat -keyalg RSA -keystore c:/keystore.key -keypass 123456 -storepass 123456 -keysize 2048 clientAuth="want" sslProtocol="TLS" keystoreFile="c:/keystore.key" keystorePass="123456"/> I know i added a lot of small options that perhaps are not needed, but in the simpler way is not working anyway. Hope someone can help me on this, so far i've been trying to get it work for the past 2 days and it's fustrating. Thanks Jose Romero Miret [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Storing webapp startup parameters
Christopher Schultz wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Dave, David Kerber wrote: No, I'm using , with this in server.xml: This in web.xml: fileImportInterval java.lang.string Aah, okay. That's the same thing as in web.xml, I think. I think I need to look at that; I'd like to eliminate the entry in server.xml if possible... public static String getEnvironmentVariable( ... ) InitialContext initCtx = new InitialContext(); Context envCtx = (Context) initCtx.lookup("java:comp/env" ); envCtx.lookup( envVarName ); That looks good. Is that what the above method does? Or is there another way? Remember, my ultimate goal here is to be able to change these settings without bouncing my webapp. Right. Since you are getting those values from JNDI, you can simply replace them in JNDI. Instead of using envCtx.lookup(varName), use envCtx.bind(varName, newValue) to change it. Instance preference change. A JNDI browser might simplify this for you if you can either deploy it into your existing application, or if you can somehow connect to it from the outside. Otherwise, you can write some quickie preference editor yourself. Very cool; Thanks, Chris! I didn't know I could do that. I guess that's what happens when I just copy some code from a web page, without really understanding where it's coming from.. I have already done some preference editors that use the java Preferences class, so modifying them to use this should be no trouble at all. (Or is that no 'tribble' at all ??). Dave - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomcat randomly hangs
Hello and thanks in advance for any advice. We have Tomcat 5.5.20 running standalone on the following system: Dual AMD Opteron 4 gig of memory Debian Linux 2.6.8 amd64 smp kernel latest sun java 1.5, 1.6, ibm 1.5 (happens on all 3 VM's) Tomcat 5.5.20 (originally happened on 5.5.16, upgrade didn't help) Randomly it will hang and stop accepting connections on port 80, sometimes even late at night when there is not much traffic. When the hang occurs: * Can't access any web app on tomcat including the tomcat manager * Telnet to port 80 hangs(Coyote running on port 80) * load goes up, but only slightly (from < 1 to maybe 3 or 4) * sometimes after a couple of minutes it starts responding again, sometimes it doesn't. * when I run shutdown.sh the java process continues to run and I have to kill -9 to stop it * I try to do a kill -3 or kill -QUIT on the java process to get a thread dump, but it does not work I have tried many different jvm settings and tomcat connector settings, here is what I have currently: connectionTimeout="2" strategy="ms" disableUploadTimeout="false" /> CATALINA_OPTS="-server -XX:MaxPermSize=256m -ms512m -mx1280m -Xss96k -Djava.awt.headless=true" I would really appreciate any advice, I really don't know where to go from here to try and figure it out. If I can't figure it out soon my plan is to use apache2 as the webserver and connect to tomcat via JK. Thanks so much for your expert advice! --Brian. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Storing webapp startup parameters
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Dave, David Kerber wrote: > No, I'm using , with this in server.xml: > > value="60"/> > > This in web.xml: > >fileImportInterval >java.lang.string > Aah, okay. That's the same thing as in web.xml, I think. > public static String getEnvironmentVariable( ... ) > InitialContext initCtx = new InitialContext(); > Context envCtx = (Context) initCtx.lookup("java:comp/env" ); > envCtx.lookup( envVarName ); That looks good. > Is that what the above method does? Or is there another way? Remember, > my ultimate goal here is to be able to change these settings without > bouncing my webapp. Right. Since you are getting those values from JNDI, you can simply replace them in JNDI. Instead of using envCtx.lookup(varName), use envCtx.bind(varName, newValue) to change it. Instance preference change. A JNDI browser might simplify this for you if you can either deploy it into your existing application, or if you can somehow connect to it from the outside. Otherwise, you can write some quickie preference editor yourself. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.6 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFFuPPC9CaO5/Lv0PARAqc4AKCwXw6l6DUdFnp16dqDX3i21yM0PwCfaaid j6doWZ3B+KZcG0/uIgLTyKM= =fLpv -END PGP SIGNATURE- - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: JSP include issue when pre-compiling using Ant/Tomcat
1) If you keep reading, it also says: "JSP fragments that are not complete pages should always use the .jspf suffix and should always be placed in /WEB-INF/jspf" 2) Try requesting test2.jsp (the jsp which was the fragment earlier in this thread) from the browser - it won't compile 3) The documentation is straightforward - look for *.jsp and compile it. If a page is not meant to be compiled - then don't give it the jsp suffix. When writing in C, people don't compile *.h - they compile *.c. People don't write headers with file extensions of .c -Tim Martin Lambert wrote: Hi Tim, Thanks for you reply, it fixed the problem! A few points though for the Tomcat people: 1) http://java.sun.com/developer/technicalArticles/javaserverpages/code_convention/ states that: 'JSP fragments can use either .jsp or .jspf as a suffix' i.e. it should work for .jsp includes 2) .jsp includes work in the container so why not (apparently) for the Ant task they supply 3) As this is so useful, i.e. you can find out whether your applications JSPs work without the servlet container, the documentation of the Ant task should be better 4) I see the same problem with the Tomcat 4.1 libraries, so it appears to be a long standing problem. Don't get me wrong, I think this is a great extension to Ant that just needs some small wrinkles ironing out to become excellent. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: IE Issues with JSPWiki & JCIFS!!
That doesn't have to do with Tomcat, either. Sounds to me more than a character-set-problem, meaning you pasted something into your web.xml which is not supported by the code-page-setting in the xml-header of the web.xml. Would be helpful if you could post ypur web.xml Cheers Greg -- what's puzzlin' you, is the nature of my game gpgp-fp: 79A84FA526807026795E4209D3B3FE028B3170B2 gpgp-key available @ http://pgpkeys.pca.dfn.de:11371 - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: how to detect whether Tomcat has finished starting completely on Windows?
I kind of have that deal here, but that's why we have to rely on the admin. -Original Message- From: Vlad [mailto:[EMAIL PROTECTED] Sent: Thursday, January 25, 2007 1:43 AM To: Tomcat Users List Subject: RE: how to detect whether Tomcat has finished starting completely on Windows? Hello, We have very specific needs and can't run it as a service (user who runs it may not have enough permissions to start/stop service).. -- Vlad . * "Propes, Barry L [GCG-NAOT]" <[EMAIL PROTECTED]> [Wed, 24 Jan 2007 15:01:14 -0500]: > by the way...why not run it as a service? We do on our Win2K server > here! We also daily stop it at 5:50 am, and restart it at 5:55 am, just > to kill off any bad threads if there are any. It's rare that there are > anyway. > > -Original Message- > From: Vlad [mailto:[EMAIL PROTECTED] > Sent: Wednesday, January 24, 2007 1:42 PM > To: users@tomcat.apache.org > Subject: how to detect whether Tomcat has finished starting completely > on Windows? > > > Hello, > > We are planning to use latest Tomcat from 5.x branch on Windows. It's > started using 'bin/catalina.run bat' (please don't offer to run it as a > service!). Our application requires Tomcat to be often started (and > stopped) and we wish to enable certain button in the GUI once it's > started completely. > > We have a problem - we can't find a way to reliably determine whether > it has finished started or not. > In the middle of startup, it even responds to http requests - but > returns http error code 400 with error message like >No Host matches server name 127.0.0.1 > > What is the recommended way to determine whether Tomcat has finished > starting up? > > Thank you very much for your answers in advance! > > -- > Vlad . > > -- > Рамблер-Объявления - прямой доступ к базе газеты Из Рук в Руки! > http://irr.rambler.ru/ > > - > To start a new topic, e-mail: users@tomcat.apache.org > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > - > To start a new topic, e-mail: users@tomcat.apache.org > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: find where webapp installed via java code
I have a similar question. I would like to know the path to the tomcat home directory so that I can store a file there, which won't be deleted when reploying. I want to use this as an alternative to storing some values in a database. Thanks, Max - Original Message - From: "David Delbecq" <[EMAIL PROTECTED]> To: "Tomcat Users List" Sent: Thursday, January 25, 2007 2:30 PM Subject: Re: find where webapp installed via java code > Please qualify 'system path in which the executing webapp is running'. > do you mean the if your war has been exploded to /tomcat/webapps/myapp/ > Then you need to get this path? It can be tricky, because, even if it > were possible by some magic including asking class loader where classes > binaries are located, it could end up being /tomcat/webapps/myapp.war in > case of non exploded war. And why do you want to access this folder? You > can already access read-only all it's content using the classloader's > ressource. And requiring write access is a non sense because this > content will be completely discarded at next deployement. > En l'instant précis du 01/25/07 14:11, asaf.lahav s'exprimait en ces > termes: > > Hi all, > > > > I have a servlet in which I need to find the file system path in which the > > executing webapp is running. > > > > 10x, > > > > Asaf > > > > > > > > > - > To start a new topic, e-mail: users@tomcat.apache.org > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
IE Issues with JSPWiki & JCIFS!!
Hi there, we have a problem running JSPWiki under Tomcat, when using Internet Explorer. It's fine in Firefox and doesn't display any exceptions as shown below! This has happened since installing the JCIFS code into web.xml for user authentication. The JSPWiki developers can't help me, they said it sounds more like an interplay issue between Tomcat and IE. java.io.UnsupportedEncodingException: Cp850 sun.io.Converters.getConverterClass(Unknown Source) sun.io.Converters.newConverter(Unknown Source) sun.io.ByteToCharConverter.getConverter(Unknown Source) java.lang.StringCoding.decode(Unknown Source) java.lang.String.(Unknown Source) java.lang.String.(Unknown Source) jcifs.ntlmssp.Type1Message.parse(Type1Message.java:236) jcifs.ntlmssp.Type1Message.(Type1Message.java:86) jcifs.http.NtlmSsp.authenticate(NtlmSsp.java:88) jcifs.http.NtlmHttpFilter.negotiate(NtlmHttpFilter.java:160) jcifs.http.NtlmHttpFilter.doFilter(NtlmHttpFilter.java:114) com.ecyrd.jspwiki.ui.WikiServletFilter.doFilter(WikiServletFilter.java:99) com.ecyrd.jspwiki.ui.WikiJSPFilter.doFilter(WikiJSPFilter.java:71) Hope to hear from you soon..and well done on such a marvellous product! Please can you CC any response to [EMAIL PROTECTED] also!! Thanks! Regards Chris Tamburro ICT Department St. Edward's School Cheltenham, UK - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: find where webapp installed via java code
Have a look at "One-jar", it may provide a viable alternative: http://www-128.ibm.com/developerworks/java/library/j-onejar/ http://one-jar.sourceforge.net/ The deployment is relatively simple, if you follow the suggested methodology. p PATTUS, Jean-Philippe wrote: Probably it's not the best way but it can work : Take for example a property file that you know is in your webapp ClassLoader classLoader = Thread.currentThread().getContextClassLoader(); InputStream is = classLoader.getResourceAsStream("com/.../yourfile.properties"); Create a file from this inputstream and from yis file try the method getPath() or getAbsolutePath() -Message d'origine- De : asaf.lahav [mailto:[EMAIL PROTECTED] Envoyé : jeudi 25 janvier 2007 16:04 À : 'Tomcat Users List' Objet : RE: find where webapp installed via java code Hi David and thanks for responding, 1. I am using an exploded WAR 2. I want my webapp to contain an additional jars folder (in addition to the LIB folder) and I would like to know where the webapp is deployed so I'll know how to calculate the location of the second jars folder. Let me know if there is any better way to accomplish this. Thanks in advance, Asaf -Original Message- From: David Delbecq [mailto:[EMAIL PROTECTED] Sent: Thursday, January 25, 2007 3:30 PM To: Tomcat Users List Subject: Re: find where webapp installed via java code Please qualify 'system path in which the executing webapp is running'. do you mean the if your war has been exploded to /tomcat/webapps/myapp/ Then you need to get this path? It can be tricky, because, even if it were possible by some magic including asking class loader where classes binaries are located, it could end up being /tomcat/webapps/myapp.war in case of non exploded war. And why do you want to access this folder? You can already access read-only all it's content using the classloader's ressource. And requiring write access is a non sense because this content will be completely discarded at next deployement. En l'instant précis du 01/25/07 14:11, asaf.lahav s'exprimait en ces termes: Hi all, I have a servlet in which I need to find the file system path in which the executing webapp is running. 10x, Asaf - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] ** Ce message et ses pièces jointes sont confidentiels et établis a l'intention exclusive de ses destinataires. Tout message électronique est susceptible d'altération. SOGITEC décline toute responsabilité au titre de ce message s'il a été altéré, déformé ou falsifié. Si vous n'êtes pas destinataire de ce message, merci de le détruire immédiatement. ** - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: confirm subscribe to users@tomcat.apache.org
Hi there, we have a problem running JSPWiki under Tomcat, when using Internet Explorer. It's fine in Firefox and doesn't display any exceptions as shown below! This has happened since installing the JCIFS code into web.xml for user authentication. The JSPWiki developers can't help me, they said it sounds more like an interplay issue between Tomcat and IE. java.io.UnsupportedEncodingException: Cp850 sun.io.Converters.getConverterClass(Unknown Source) sun.io.Converters.newConverter(Unknown Source) sun.io.ByteToCharConverter.getConverter(Unknown Source) java.lang.StringCoding.decode(Unknown Source) java.lang.String.(Unknown Source) java.lang.String.(Unknown Source) jcifs.ntlmssp.Type1Message.parse(Type1Message.java:236) jcifs.ntlmssp.Type1Message.(Type1Message.java:86) jcifs.http.NtlmSsp.authenticate(NtlmSsp.java:88) jcifs.http.NtlmHttpFilter.negotiate(NtlmHttpFilter.java:160) jcifs.http.NtlmHttpFilter.doFilter(NtlmHttpFilter.java:114) com.ecyrd.jspwiki.ui.WikiServletFilter.doFilter(WikiServletFilter.java:99) com.ecyrd.jspwiki.ui.WikiJSPFilter.doFilter(WikiJSPFilter.java:71) Hope to hear from you soon..and well done on such a marvellous product! Regards Chris Tamburro ICT Department St. Edward's School Cheltenham, UK - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: find where webapp installed via java code
URL u = Thread.currentThread().getContextClassLoader().getRessource("/path/to/a/fake/property/file"); u.toString(); contains the full path to the .jar containing your propertyFile, followed by !/path/to/a/fake/property/file eg: /tomcat/webapps/myApp/WEB-INF/lib/myPropertyJar.jar!/path/to/a/fake/property/file but shouldn't it be easier, for you, to ask user to configure this path in a configuration file??? It's not like this path is subject to change frequently over time. En l'instant précis du 01/25/07 16:28, PATTUS, Jean-Philippe s'exprimait en ces termes: > Probably it's not the best way but it can work : > > Take for example a property file that you know is in your webapp > > ClassLoader classLoader = Thread.currentThread().getContextClassLoader(); > InputStream is = > classLoader.getResourceAsStream("com/.../yourfile.properties"); > Create a file from this inputstream and from yis file try the method > getPath() or getAbsolutePath() > > > > -Message d'origine- > De : asaf.lahav [mailto:[EMAIL PROTECTED] > Envoyé : jeudi 25 janvier 2007 16:04 > À : 'Tomcat Users List' > Objet : RE: find where webapp installed via java code > > > Hi David and thanks for responding, > > 1. I am using an exploded WAR > 2. I want my webapp to contain an additional jars folder (in addition to the > LIB folder) and I would like to know where the webapp is deployed so I'll > know how to calculate the location of the second jars folder. > > Let me know if there is any better way to accomplish this. > > Thanks in advance, > Asaf > > > > > -Original Message- > From: David Delbecq [mailto:[EMAIL PROTECTED] > Sent: Thursday, January 25, 2007 3:30 PM > To: Tomcat Users List > Subject: Re: find where webapp installed via java code > > Please qualify 'system path in which the executing webapp is running'. > do you mean the if your war has been exploded to /tomcat/webapps/myapp/ > Then you need to get this path? It can be tricky, because, even if it > were possible by some magic including asking class loader where classes > binaries are located, it could end up being /tomcat/webapps/myapp.war in > case of non exploded war. And why do you want to access this folder? You > can already access read-only all it's content using the classloader's > ressource. And requiring write access is a non sense because this > content will be completely discarded at next deployement. > En l'instant précis du 01/25/07 14:11, asaf.lahav s'exprimait en ces > termes: > >> Hi all, >> >> I have a servlet in which I need to find the file system path in which the >> executing webapp is running. >> >> 10x, >> >> Asaf >> >> >> >> > > > - > To start a new topic, e-mail: users@tomcat.apache.org > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > - > To start a new topic, e-mail: users@tomcat.apache.org > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > ** > Ce message et ses pièces jointes sont confidentiels et établis a l'intention > exclusive de ses destinataires. > Tout message électronique est susceptible d'altération. SOGITEC décline toute > responsabilité au titre de ce message s'il a été altéré, déformé ou falsifié. > Si vous n'êtes pas destinataire de ce message, merci de le détruire > immédiatement. > ** > > > - > To start a new topic, e-mail: users@tomcat.apache.org > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: find where webapp installed via java code
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Asaf, asaf.lahav wrote: > Hi David and thanks for responding, > > 1. I am using an exploded WAR > 2. I want my webapp to contain an additional jars folder (in addition to the > LIB folder) and I would like to know where the webapp is deployed so I'll > know how to calculate the location of the second jars folder. > > Let me know if there is any better way to accomplish this. What's wrong with using ServletContext.getResource? That will give you a URL to a resource relative to the "context root", which will be either a directory or the WAR file containing the (non-exploded) webapp. - From there, you can get an input stream and do anything you want. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.6 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFFuNAe9CaO5/Lv0PARApG7AKCUfOLvwh5+plLTX24WDPWYEstoEACfU8sI qfFpVpvQBNnZAarmS92brLY= =urut -END PGP SIGNATURE- - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Storing webapp startup parameters
Christopher Schultz wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Dave, David Kerber wrote: Christopher Schultz wrote: You could store your preferences in a JNDI context. If you use in your web.xml instead of using or something else, then they will be automatically loaded into the directory on startup, so you get your default values. Yes, that's how I'm doing it, but changing the values in the requires bouncing tomcat for my webapp to see the changes, unless there's something I'm missing there. You are using ? Right: don't do that. Instead, use No, I'm using , with this in server.xml: value="60"/> This in web.xml: fileImportInterval java.lang.string and retrieving it with this method: public static String getEnvironmentVariable( String envVarName, String varDefault) { String parm; try { InitialContext initCtx = new InitialContext(); if (initCtx == null) throw new Exception( "No Context for database setting" ); Context envCtx = (Context) initCtx.lookup( "java:comp/env" ); parm = (String) envCtx.lookup( envVarName ); } catch(Exception e) { parm = varDefault; } return parm; } and use JNDI to get your preferences. Don't cache them anywhere... always get them from JNDI. Is that what the above method does? Or is there another way? Remember, my ultimate goal here is to be able to change these settings without bouncing my webapp. Dave - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Storing webapp startup parameters
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Dave, David Kerber wrote: > Christopher Schultz wrote: >> You could store your preferences in a JNDI context. >> >> If you use in your web.xml instead of using >> or something else, then they will be automatically loaded into the >> directory on startup, so you get your default values. > > Yes, that's how I'm doing it, but changing the values in the > requires bouncing tomcat for my webapp to see the changes, unless > there's something I'm missing there. You are using ? Right: don't do that. Instead, use and use JNDI to get your preferences. Don't cache them anywhere... always get them from JNDI. Using a JNDI browser (or something quick you write yourself), you can change the values in the JNDI context which should affect the operation of your webapp. No restart required, as long as you don't cache those preferences anywhere. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.6 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFFuM0o9CaO5/Lv0PARAscqAJ4k9nHG4gpecbFhqjOjphYEe72TagCeKD9B nht4SGPeJSF+8BJQx5LOPd8= =LDLe -END PGP SIGNATURE- - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: find where webapp installed via java code
Probably it's not the best way but it can work : Take for example a property file that you know is in your webapp ClassLoader classLoader = Thread.currentThread().getContextClassLoader(); InputStream is = classLoader.getResourceAsStream("com/.../yourfile.properties"); Create a file from this inputstream and from yis file try the method getPath() or getAbsolutePath() -Message d'origine- De : asaf.lahav [mailto:[EMAIL PROTECTED] Envoyé : jeudi 25 janvier 2007 16:04 À : 'Tomcat Users List' Objet : RE: find where webapp installed via java code Hi David and thanks for responding, 1. I am using an exploded WAR 2. I want my webapp to contain an additional jars folder (in addition to the LIB folder) and I would like to know where the webapp is deployed so I'll know how to calculate the location of the second jars folder. Let me know if there is any better way to accomplish this. Thanks in advance, Asaf -Original Message- From: David Delbecq [mailto:[EMAIL PROTECTED] Sent: Thursday, January 25, 2007 3:30 PM To: Tomcat Users List Subject: Re: find where webapp installed via java code Please qualify 'system path in which the executing webapp is running'. do you mean the if your war has been exploded to /tomcat/webapps/myapp/ Then you need to get this path? It can be tricky, because, even if it were possible by some magic including asking class loader where classes binaries are located, it could end up being /tomcat/webapps/myapp.war in case of non exploded war. And why do you want to access this folder? You can already access read-only all it's content using the classloader's ressource. And requiring write access is a non sense because this content will be completely discarded at next deployement. En l'instant précis du 01/25/07 14:11, asaf.lahav s'exprimait en ces termes: > Hi all, > > I have a servlet in which I need to find the file system path in which the > executing webapp is running. > > 10x, > > Asaf > > > - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] ** Ce message et ses pièces jointes sont confidentiels et établis a l'intention exclusive de ses destinataires. Tout message électronique est susceptible d'altération. SOGITEC décline toute responsabilité au titre de ce message s'il a été altéré, déformé ou falsifié. Si vous n'êtes pas destinataire de ce message, merci de le détruire immédiatement. ** - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: find where webapp installed via java code
Hi David and thanks for responding, 1. I am using an exploded WAR 2. I want my webapp to contain an additional jars folder (in addition to the LIB folder) and I would like to know where the webapp is deployed so I'll know how to calculate the location of the second jars folder. Let me know if there is any better way to accomplish this. Thanks in advance, Asaf -Original Message- From: David Delbecq [mailto:[EMAIL PROTECTED] Sent: Thursday, January 25, 2007 3:30 PM To: Tomcat Users List Subject: Re: find where webapp installed via java code Please qualify 'system path in which the executing webapp is running'. do you mean the if your war has been exploded to /tomcat/webapps/myapp/ Then you need to get this path? It can be tricky, because, even if it were possible by some magic including asking class loader where classes binaries are located, it could end up being /tomcat/webapps/myapp.war in case of non exploded war. And why do you want to access this folder? You can already access read-only all it's content using the classloader's ressource. And requiring write access is a non sense because this content will be completely discarded at next deployement. En l'instant précis du 01/25/07 14:11, asaf.lahav s'exprimait en ces termes: > Hi all, > > I have a servlet in which I need to find the file system path in which the > executing webapp is running. > > 10x, > > Asaf > > > - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Storing webapp startup parameters
Christopher Schultz wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 David, David Kerber wrote: Is there a built-in method of having different settings for each instance of tomcat, but which won't require bouncing tomcat to put the changes into effect? I know I could roll my own with a disk file (like a windows .ini file), but would rather not have to do that if I can avoid it. You could store your preferences in a JNDI context. If you use in your web.xml instead of using or something else, then they will be automatically loaded into the directory on startup, so you get your default values. Yes, that's how I'm doing it, but changing the values in the requires bouncing tomcat for my webapp to see the changes, unless there's something I'm missing there. You should be able to use an off-the-shelf JNDI browser to navigate your preferences and perhaps even change them. You can always write your own code to change them, of course. (There's a parallel thread on the list right now about the immutability of JNDI information, so you might want to pay attention to what's going on, there). I've never touched JNDI, so I'll have to look into that. I've never done this myself but it sounds feasible. Another option would be to just use a properties file on the disk and monitor it for changes, similar to how TC's reloadable contexts monitor files. It's kinda messy, but it'll work. Yeah, that's what I was referring to when I mentioned rolling my own, which I'd rather not do unless I get stuck Thanks! Dave - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat 4.1.29 Question
It's not a tomcat issue, so no. The time comes from the JVM and the OS. So check the Java JVM for fix versions and patches for your OS. BTW, this has been covered many, many times in recent months. I'm sure you'll find lots of links with Google. --David GARNER Jim J wrote: >Congress passed a law that changes the start and end dates of daylight >savings time, and that change goes into affect this year. Starting this >year, daylight savings will start on the second Sunday in March and end >on the first Sunday of November. Does anyone know if Tomcat 4.1.29 will >have any trouble with this change? > > > >[EMAIL PROTECTED] > > > > > - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Storing webapp startup parameters
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 David, David Kerber wrote: > Is there a built-in method of having different settings for each > instance of tomcat, but which won't require bouncing tomcat to put the > changes into effect? I know I could roll my own with a disk file (like > a windows .ini file), but would rather not have to do that if I can > avoid it. You could store your preferences in a JNDI context. If you use in your web.xml instead of using or something else, then they will be automatically loaded into the directory on startup, so you get your default values. You should be able to use an off-the-shelf JNDI browser to navigate your preferences and perhaps even change them. You can always write your own code to change them, of course. (There's a parallel thread on the list right now about the immutability of JNDI information, so you might want to pay attention to what's going on, there). I've never done this myself but it sounds feasible. Another option would be to just use a properties file on the disk and monitor it for changes, similar to how TC's reloadable contexts monitor files. It's kinda messy, but it'll work. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.6 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFFuL0d9CaO5/Lv0PARAiuyAJ4ya3m0r9AEbxNZ0BQhA8TZkrGVMACgjkuR NzLMzOE3ElBYP2tt4ChHTOI= =ji7Y -END PGP SIGNATURE- - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Storing webapp startup parameters
I know of two built-in methods of storing preferences for a webapp, but need one with characteristics which combine both of them. Using the java Preferences class allows changes to be made while the app is running, but AFAICS they will apply to all instances of tomcat running on a given machine, since they are based on the class retreiving their values. Putting parameters in the web.xml or server.xml allows different settings for each instance of tomcat running on a given machine, but requires bouncing the server to put changes into effect. Is there a built-in method of having different settings for each instance of tomcat, but which won't require bouncing tomcat to put the changes into effect? I know I could roll my own with a disk file (like a windows .ini file), but would rather not have to do that if I can avoid it. Thanks! Dave - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: sample error install on Tomcat 4.1.34 with JDK 1.4.2
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Philippe, Philippe Couas wrote: > I want install ajax4jsf samples on my Tomcat server 4.1.34 and I have > following error messages: [snip] > log4j:WARN No appenders could be found for logger > log4j:WARN Please initialize the log4j system properly. This just means that you tried to use log4j before it was configured. If you eventually configure it, then you'll get log4j output in the file (or wherever) that you configured. You might want to check where you configure log4j to see if you can do it earlier in the webapp's lifecycle. > Catalina.start: LifecycleException: Erreur de démarrage du contexte > suite aux erreurs précédentes This is a generic error that shouldn't be caused by the log4j message above. Log4j will silently (other than the message above) ignore any missing configuration and your application will simply not log anything (unless you configure log4j later on at some point). There must have been some other error. Look in catalina.out or the log file for your application to see if there are any stack traces like this one, which I think was taken completely out of context: > (org.apache.myfaces.webapp.StartupServletContextListener). (It was between log4j WARN messages, which seems strange) - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.6 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFFuLTz9CaO5/Lv0PARAokrAJ9bI0K7Md1Mf7rUwsjKwBtuXr+4TgCgmz5v qq6UfggfGqY8Jonn502R7QQ= =6baF -END PGP SIGNATURE- - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: mod_jk replacement?
I just tried it with the mod_proxy and mod_proxy_http modules which are indeed available for Apache 2.0.59, and it works fine connecting to backend Tomcat web service using the http protocol and port 8080. I only needed one line in Apache's configuration: ProxyPass /ohpr/ http://localhost:8080/ohpr/ (where ohpr is the web service context). Much easier to configure! I'll run some stresstests with this setup tomorrow, as I did with the mod_jk in recent days, to see how mod_proxy will cope with higher web traffic load. J.Neuhoff David Rodríguez Fernández wrote: > > You can use the mod_proxy, with the 8080 port and http protocol. This is > implemented in apache 2.0.x (and 1.3.x). The sintax is similar as i > mencioned in the previous message. > > -Mensaje original- > De: Hassan Schroeder [mailto:[EMAIL PROTECTED] > Enviado el: lunes, 22 de enero de 2007 16:55 > Para: Tomcat Users List > Asunto: Re: mod_jk replacement? > > On 1/22/07, David Rodríguez Fernández <[EMAIL PROTECTED]> > wrote: >> Recently i'm using mod_proxy_ajp, as mod_jk replacement with apache. > > The OP asked about Apache httpd 2.0.x, for which mod_proxy_ajp is not > available (introduced in 2.2.x). > > And yes, I've used it successfully in production on Linux boxes, but I > have > no experience with it on Windows. > > -- > Hassan Schroeder [EMAIL PROTECTED] > > > > > -- > > La Información incluida en el presente correo electrónico es SECRETO > PROFESIONAL Y CONFIDENCIAL, siendo para el uso exclusivo del > destinatario arriba mencionado. Si usted lee este mensaje y no es el > destinatario señalado, el empleado o el agente responsable de entregar > el mensaje al destinatario, o ha recibido esta comunicación por error, > le informamos que esta totalmente prohibida cualquier divulgación, > distribución o reproducción de esta comunicación, y le rogamos que nos > lo notifique inmediatamente y nos devuelva el mensaje original a la > dirección arriba mencionada. > > Gracias. > > The information contained in this e-mail is LEGALLY PRIVILEDGED AND > CONFIDENTIAL and is intended only for the use of the addressee named > above. If the reader of this message is not the intended recipient or > the employee or agent responsible for delivering the message to the > intended recipient, or you have received this communication in error, > please be aware that any dissemination, distribution or duplication of > this communication is strictly prohibited, and please notify us > immediately and return the original message to us at the address above. > > Thank you. > > > > - > To start a new topic, e-mail: users@tomcat.apache.org > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > -- View this message in context: http://www.nabble.com/mod_jk-replacement--tf3050993.html#a8615582 Sent from the Tomcat - User mailing list archive at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: find where webapp installed via java code
Please qualify 'system path in which the executing webapp is running'. do you mean the if your war has been exploded to /tomcat/webapps/myapp/ Then you need to get this path? It can be tricky, because, even if it were possible by some magic including asking class loader where classes binaries are located, it could end up being /tomcat/webapps/myapp.war in case of non exploded war. And why do you want to access this folder? You can already access read-only all it's content using the classloader's ressource. And requiring write access is a non sense because this content will be completely discarded at next deployement. En l'instant précis du 01/25/07 14:11, asaf.lahav s'exprimait en ces termes: > Hi all, > > I have a servlet in which I need to find the file system path in which the > executing webapp is running. > > 10x, > > Asaf > > > - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
sample error install on Tomcat 4.1.34 with JDK 1.4.2
Hi ; I want install ajax4jsf samples on my Tomcat server 4.1.34 and I have following error messages ? Do you have an idea ? Regards Philippe Démarrage du service Tomcat-Standalone Apache Tomcat/4.1.34 log4j:WARN No appenders could be found for logger (org.apache.myfaces.webapp.StartupServletContextListener). log4j:WARN Please initialize the log4j system properly. Catalina.start: LifecycleException: Erreur de démarrage du contexte suite aux erreurs précédentes LifecycleException: Erreur de démarrage du contexte suite aux erreurs précédentes at org.apache.catalina.core.StandardContext.start(StandardContext.java:3 700) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1147) at org.apache.catalina.core.StandardHost.start(StandardHost.java:696) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1147) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:310 ) at org.apache.catalina.core.StandardService.start(StandardService.java:4 49) at org.apache.catalina.core.StandardServer.start(StandardServer.java:221
find where webapp installed via java code
Hi all, I have a servlet in which I need to find the file system path in which the executing webapp is running. 10x, Asaf
RE: JSP include issue when pre-compiling using Ant/Tomcat
Hi Tim, Thanks for you reply, it fixed the problem! A few points though for the Tomcat people: 1) http://java.sun.com/developer/technicalArticles/javaserverpages/code_convention/ states that: 'JSP fragments can use either .jsp or .jspf as a suffix' i.e. it should work for .jsp includes 2) .jsp includes work in the container so why not (apparently) for the Ant task they supply 3) As this is so useful, i.e. you can find out whether your applications JSPs work without the servlet container, the documentation of the Ant task should be better 4) I see the same problem with the Tomcat 4.1 libraries, so it appears to be a long standing problem. Don't get me wrong, I think this is a great extension to Ant that just needs some small wrinkles ironing out to become excellent. Thanks again, Martin. -Original Message- From: Tim Funk [mailto:[EMAIL PROTECTED] Sent: 25 January 2007 12:05 To: Tomcat Users List Subject: Re: JSP include issue when pre-compiling using Ant/Tomcat Jsp files which are compile time includes should not end in .jsp - but something else. (Preferably .jspf) renaming test2.jsp to test2.jspf will fix your precompilation issue. Using jspf has the added advantage of also letting you know immediately the files being used as compile time includes. If the jsp is also not hidden in WEB-INF but on the document root - its also easier to protect those files in case a malicious user could figure out such a fragment exists and call it directly potentially bypassing validations or other logic. -Tim Martin Lambert wrote: > Hi, > > I'm having problems doing JSP pre-compilation using Tomcat's JSP > pre-compilation libraries and Ant. The problem is demonstrated by the > following: > > test.jsp: > > <% String myVar = "Hello"; %> > > <%@ include file="test2.jsp" %> > > Some more text > > test2.jsp > > Goodbye > > <%= myVar + "World" %> > > > test.jsp loads correctly when accessed from Tomcat, however, when I use Ant > with the build.xml above and Tomcat's JSP compiler libraries I get: > > D:\dev\myproject\build\web-test\org\apache\jsp\test2_jsp.java:43: cannot find > symbol > symbol : variable myVar > location: class org.apache.jsp.test2_jsp > out.print( myVar + "World" ); > ^ > 1 error > > I have tested this using both Tomcat 5.5.15 and Tomcat 5.5.20. > > When JspC completes there are 2 Java source files, test2_jsp.java which ties > up with test2.jsp's content (making reference to myVar but not declaring it) > and test_jsp.java which contains the combined content of test.jsp and > test2.jsp. I've flagged that JspC should compile the generated source files > with the compile="true" attribute, I discovered this through looking at the > Javadocs. > > My gut feel is that JspC should remove any Java source files that represent > JSPs that cannot be run standalone, e.g. test2.jsp, as its final step before > completing thus leaving only Java source files that can be compiled. > - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: UserDatabaseRealm Problems
Hi, thanks for the response. On Thu, 25 Jan 2007 10:27:20 + Pid <[EMAIL PROTECTED]> wrote: > Enable a RequestDumperValve so you can see what WorldPay is doing > when it hits your URL. > > http://tomcat.apache.org/tomcat-5.0-doc/config/valve.html#Request%20Dumper > %20Valve Wow thats a lot of output! I think this is the significant part - 2007-01-25 13:15:03 RequestDumperValve[Catalina]: --- 2007-01-25 13:15:03 RequestDumperValve[Catalina]: authType=BASIC 2007-01-25 13:15:03 RequestDumperValve[Catalina]: contentLength=-1 2007-01-25 13:15:03 RequestDumperValve[Catalina]: contentType=text/html;charset=ISO-8859-1 2007-01-25 13:15:03 RequestDumperValve[Catalina]: header=Pragma=No-cache 2007-01-25 13:15:03 RequestDumperValve[Catalina]: header=Cache-Control=no-cache 2007-01-25 13:15:03 RequestDumperValve[Catalina]: header=Expires=Thu, 01 Jan 1970 02:00:00 SAST 2007-01-25 13:15:03 RequestDumperValve[Catalina]:message=null 2007-01-25 13:15:03 RequestDumperValve[Catalina]: remoteUser=user 2007-01-25 13:15:03 RequestDumperValve[Catalina]: status=200 2007-01-25 13:15:03 RequestDumperValve[Catalina]: === SELECT * FROM Tokens WHERE token_owner_id = 124 2007-01-25 13:15:07 RequestDumperValve[Catalina]: remoteHost=wcc2.worldpay.com 2007-01-25 13:15:07 RequestDumperValve[Catalina]: remoteUser=null 2007-01-25 13:15:07 RequestDumperValve[Catalina]: requestedSessionId=null 2007-01-25 13:15:07 RequestDumperValve[Catalina]: scheme=http 2007-01-25 13:15:07 RequestDumperValve[Catalina]: serverName=server.com 2007-01-25 13:15:07 RequestDumperValve[Catalina]: serverPort=80 2007-01-25 13:15:07 RequestDumperValve[Catalina]: servletPath=/servlet.jsp 2007-01-25 13:15:07 RequestDumperValve[Catalina]: isSecure=false 2007-01-25 13:15:07 RequestDumperValve[Catalina]: --- I setup worldpay with the following callback url: http://user:[EMAIL PROTECTED]/servlet.jsp This satisfies the apache password. I'm not sure how to now get it past tomcats security. > > > Has the system worked with this configuration before, or is this a > new component? The system worked before. I've now moved it to a new server and the errors have started. > > > What have you got configured in the UserDatabaseRealm file? > Have you made sure the Roles are defined in the web.xml file? http://java.sun.com/j2ee/dtds/web-app_2_2.dtd";> Restricted site /* GET POST web_user BASIC Regards Wayne - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: JSP include issue when pre-compiling using Ant/Tomcat
Jsp files which are compile time includes should not end in .jsp - but something else. (Preferably .jspf) renaming test2.jsp to test2.jspf will fix your precompilation issue. Using jspf has the added advantage of also letting you know immediately the files being used as compile time includes. If the jsp is also not hidden in WEB-INF but on the document root - its also easier to protect those files in case a malicious user could figure out such a fragment exists and call it directly potentially bypassing validations or other logic. -Tim Martin Lambert wrote: Hi, I'm having problems doing JSP pre-compilation using Tomcat's JSP pre-compilation libraries and Ant. The problem is demonstrated by the following: test.jsp: <% String myVar = "Hello"; %> <%@ include file="test2.jsp" %> Some more text test2.jsp Goodbye <%= myVar + "World" %> test.jsp loads correctly when accessed from Tomcat, however, when I use Ant with the build.xml above and Tomcat's JSP compiler libraries I get: D:\dev\myproject\build\web-test\org\apache\jsp\test2_jsp.java:43: cannot find symbol symbol : variable myVar location: class org.apache.jsp.test2_jsp out.print( myVar + "World" ); ^ 1 error I have tested this using both Tomcat 5.5.15 and Tomcat 5.5.20. When JspC completes there are 2 Java source files, test2_jsp.java which ties up with test2.jsp's content (making reference to myVar but not declaring it) and test_jsp.java which contains the combined content of test.jsp and test2.jsp. I've flagged that JspC should compile the generated source files with the compile="true" attribute, I discovered this through looking at the Javadocs. My gut feel is that JspC should remove any Java source files that represent JSPs that cannot be run standalone, e.g. test2.jsp, as its final step before completing thus leaving only Java source files that can be compiled. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
JSP include issue when pre-compiling using Ant/Tomcat
Hi, I'm having problems doing JSP pre-compilation using Tomcat's JSP pre-compilation libraries and Ant. The problem is demonstrated by the following: test.jsp: <% String myVar = "Hello"; %> <%@ include file="test2.jsp" %> Some more text test2.jsp Goodbye <%= myVar + "World" %> Testing build.xml test.jsp loads correctly when accessed from Tomcat, however, when I use Ant with the build.xml above and Tomcat's JSP compiler libraries I get: D:\dev\myproject\build\web-test\org\apache\jsp\test2_jsp.java:43: cannot find symbol symbol : variable myVar location: class org.apache.jsp.test2_jsp out.print( myVar + "World" ); ^ 1 error I have tested this using both Tomcat 5.5.15 and Tomcat 5.5.20. When JspC completes there are 2 Java source files, test2_jsp.java which ties up with test2.jsp's content (making reference to myVar but not declaring it) and test_jsp.java which contains the combined content of test.jsp and test2.jsp. I've flagged that JspC should compile the generated source files with the compile="true" attribute, I discovered this through looking at the Javadocs. My gut feel is that JspC should remove any Java source files that represent JSPs that cannot be run standalone, e.g. test2.jsp, as its final step before completing thus leaving only Java source files that can be compiled. The main point of reference for doing JSP pre-compilation seems to be http://tomcat.apache.org/tomcat-5.5-doc/jasper-howto.html but it is very sparse on this subject i.e. here's a sample build.xml, it doesn't even indicate there is a compile option. Tomcat should document what attributes the JSPc task supports, just like any other Ant task. Thanks, Martin. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: UserDatabaseRealm Problems
Wesley Hof wrote: There is no UserDatabaseRealm config file. server/conf/tomcat-users.xml UserDatabaseRealm reads from that file to determine who can log in, with which privileges. Authentication is activating, but I don't see any references to a restricted area in your web.xml. what is the path that you've got for the WorldPay callback? (don't post the server address) (I'm not familiar with WebWork, so I don't know if that's handling the authentication.) Enable a RequestDumperValve so you can see what WorldPay is doing when it hits your URL. http://tomcat.apache.org/tomcat-5.0-doc/config/valve.html#Request%20Dumper %20Valve Has the system worked with this configuration before, or is this a new component? What have you got configured in the UserDatabaseRealm file? Have you made sure the Roles are defined in the web.xml file? p Wayne Gemmell wrote: Sorry for the shameless bump. Was this question badly phrased, too easy, incomplete, etc? I've been battling for days on this, asked local lugs and the irc channel with no response. This is a system that I've inherited and I've never worked with Tomcat or any other J2EE stuff before and I am getting very dispondent about the whole thing. Any constructive advice will be appreciated. Regards Wayne On Wed, 24 Jan 2007 16:12:01 +0200 Wayne Gemmell <[EMAIL PROTECTED]> wrote: Hi all I'm running tomcat 5.0.30-9 with java 1.5.0_06-b05 on ubuntu Dapper. I am trying to receive a callback from worldpay in my application but this seems to break the session causing an authentication failure when worldpay initiates the callback. Here is the dump of the error : 2007/01/24 01:56:57 org.apache.coyote.tomcat5.CoyoteAdapter service SEVERE: An exception or error occurred in the container during the request processing java.lang.NullPointerException at org.apache.catalina.realm.UserDatabaseRealm.authenticate(UserDatabaseRealm.java:156) at org.apache.catalina.authenticator.BasicAuthenticator.authenticate(BasicAuthenticator.java:129) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:504) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:535) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.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.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:300) at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:374) at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:743) at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:675) at org.apache.jk.common.SocketConnection.runIt(ChannelSocket.java:866) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684) at java.lang.Thread.run(Thread.java:595) Any ideas what I'm doing wrong or what I can do to fix it? Regards Wayne Gemmell - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: UserDatabaseRealm Problems
P, :) This is a new compoment. I have this in my web.xml http://java.sun.com/xml/ns/j2ee"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd";> org.nanocontainer.integrationkit.ContainerComposer com.kiala.kweb.dspextranet.util.setup.PicoComposer sitemesh.configfile /WEB-INF/classes/sitemesh.xml net.incongru.beantag.Options /WEB-INF/classes/beandisplaytag.properties JspSupportServlet com.opensymphony.webwork.views.JspSupportServlet 1 org.nanocontainer.nanowar.ServletContainerListener NanoWar org.nanocontainer.nanowar.ServletRequestContainerFilter NanoWar-WebWork2 org.nanocontainer.nanowar.webwork2.PicoObjectFactoryFilter pico-delegate-login org.nanocontainer.nanowar.ServletContainerProxyFilter delegate-class net.incongru.berkano.security.seraph.filter.BerkanoLoginFilter init-type never pico-delegate-security org.nanocontainer.nanowar.ServletContainerProxyFilter delegate-class net.incongru.berkano.security.seraph.filter.BerkanoSecurityFilter context webwork-cleanup com.opensymphony.webwork.dispatcher.ActionContextCleanUp sitemesh com.opensymphony.module.sitemesh.filter.PageFilter webwork com.opensymphony.webwork.dispatcher.FilterDispatcher NanoWar *.action NanoWar-WebWork2 *.action pico-delegate-login *.action pico-delegate-security *.action webwork-cleanup *.action sitemesh *.action webwork *.action velocity com.opensymphony.webwork.views.velocity.WebWorkVelocityServlet 1 logout com.atlassian.seraph.logout.LogoutServlet init-type logout /logout default.action db connection for berkano jdbc/dspExtranetDS javax.sql.DataSource Container There is no UserDatabaseRealm config file. W. Enable a RequestDumperValve so you can see what WorldPay is doing when it hits your URL. http://tomcat.apache.org/tomcat-5.0-doc/config/valve.html#Request%20Dumper %20Valve Has the system worked with this configuration before, or is this a new component? What have you got configured in the UserDatabaseRealm file? Have you made sure the Roles are defined in the web.xml file? p Wayne Gemmell wrote: Sorry for the shameless bump. Was this question badly phrased, too easy, incomplete, etc? I've been battling for days on this, asked local lugs and the irc channel with no response. This is a system that I've inherited and I've never worked with Tomcat or any other J2EE stuff before and I am getting very dispondent about the whole thing. Any constructive advice will be appreciated. Regards Wayne On Wed, 24 Jan 2007 16:12:01 +0200 Wayne Gemmell <[EMAIL PROTECTED]> wrote: Hi all I'm running tomcat 5.0.30-9 with java 1.5.0_06-b05 on ubuntu Dapper. I am trying to receive a callback from worldpay in my application but this seems to break the session causing an authentication failure when worldpay initiates the callback. Here is the dump of the error : 2007/01/24 01:56:57 org.apache.coyote.tomcat5.CoyoteAdapter service SEVERE: An exception or error occurred in the container during the request processing java.lang.NullPointerException at org.apache.catalina.realm.UserDatabaseRealm.authenticate(UserDatabaseRealm.java:156) at org.apache.catalina.authenticator.BasicAuthenticator.authenticate(BasicAuthenticator.java:129) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:504) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at org.apache.catalina.valves.AccessLogValve.inv
Re: UserDatabaseRealm Problems
Enable a RequestDumperValve so you can see what WorldPay is doing when it hits your URL. http://tomcat.apache.org/tomcat-5.0-doc/config/valve.html#Request%20Dumper %20Valve Has the system worked with this configuration before, or is this a new component? What have you got configured in the UserDatabaseRealm file? Have you made sure the Roles are defined in the web.xml file? p Wayne Gemmell wrote: Sorry for the shameless bump. Was this question badly phrased, too easy, incomplete, etc? I've been battling for days on this, asked local lugs and the irc channel with no response. This is a system that I've inherited and I've never worked with Tomcat or any other J2EE stuff before and I am getting very dispondent about the whole thing. Any constructive advice will be appreciated. Regards Wayne On Wed, 24 Jan 2007 16:12:01 +0200 Wayne Gemmell <[EMAIL PROTECTED]> wrote: Hi all I'm running tomcat 5.0.30-9 with java 1.5.0_06-b05 on ubuntu Dapper. I am trying to receive a callback from worldpay in my application but this seems to break the session causing an authentication failure when worldpay initiates the callback. Here is the dump of the error : 2007/01/24 01:56:57 org.apache.coyote.tomcat5.CoyoteAdapter service SEVERE: An exception or error occurred in the container during the request processing java.lang.NullPointerException at org.apache.catalina.realm.UserDatabaseRealm.authenticate(UserDatabaseRealm.java:156) at org.apache.catalina.authenticator.BasicAuthenticator.authenticate(BasicAuthenticator.java:129) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:504) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:535) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.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.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:300) at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:374) at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:743) at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:675) at org.apache.jk.common.SocketConnection.runIt(ChannelSocket.java:866) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684) at java.lang.Thread.run(Thread.java:595) Any ideas what I'm doing wrong or what I can do to fix it? Regards Wayne Gemmell - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
request.getContextPath issue.
Hi list, Version: Jakarta-5.5.7 I deployed a new warfile in a new virtualhost in my server.xml : unpackWARs="true" autoDeploy="true" xmlValidation="false" xmlNamespaceAware="false"> docBase="/usr/local/kiala/dspextranet/dspextranet.war" override="true"> auth="Container" url="jdbc:mysql://kpserverdb:3306/dspextranet?autoReconnect=true&characterEncoding=UTF-8&useUnicode=true&jdbcCompliantTruncation=false" driverClassName="com.mysql.jdbc.Driver" username="" password="" maxWait="5000" maxActive="4" maxIdle="2"/> Now in the src we do: <% pageContext.setAttribute("ctx", request.getContextPath()); %> but for some reason I always get http://home/home.action, and $ctx contains just a "/", but the path in the context is set to "". Can someone explain me how to fix this ? Thanks. Wesley. -- (o_ Wesley Hof | System Engineer //\ Kiala NV | Louizalaan 149/28 (Brussels/BE) V_/_ Tel +32 2 541 1839 - http://www.kiala.com *DISCLAIMER* This e-mail (including any attachments) may contain information which is privileged or confidential or constitute non-public information.It is to be conveyed only to the intended recipient(s).If you received this e-mail in error, please notify the sender immediately by e-mail or telephone and delete the e-mail from your system without reading, copying or disclosing its contents to any other person. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: UserDatabaseRealm Problems
Sorry for the shameless bump. Was this question badly phrased, too easy, incomplete, etc? I've been battling for days on this, asked local lugs and the irc channel with no response. This is a system that I've inherited and I've never worked with Tomcat or any other J2EE stuff before and I am getting very dispondent about the whole thing. Any constructive advice will be appreciated. Regards Wayne On Wed, 24 Jan 2007 16:12:01 +0200 Wayne Gemmell <[EMAIL PROTECTED]> wrote: > Hi all > > I'm running tomcat 5.0.30-9 with java 1.5.0_06-b05 on ubuntu > Dapper. > > I am trying to receive a callback from worldpay in my application but > this seems to break the session causing an authentication failure when > worldpay initiates the callback. > > Here is the dump of the error : > 2007/01/24 01:56:57 org.apache.coyote.tomcat5.CoyoteAdapter service > SEVERE: An exception or error occurred in the container during the > request processing java.lang.NullPointerException > at > org.apache.catalina.realm.UserDatabaseRealm.authenticate(UserDatabaseRealm.java:156) > at > org.apache.catalina.authenticator.BasicAuthenticator.authenticate(BasicAuthenticator.java:129) > at > org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:504) > at > org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102) > at > org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) > at > org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137) > at > org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) > at > org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118) > at > org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102) > at > org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) > at > org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) > at > org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) > at > org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:535) > at > org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102) > at > org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.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.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:300) > at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:374) > at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:743) > at > org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:675) > at > org.apache.jk.common.SocketConnection.runIt(ChannelSocket.java:866) > at > org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684) > at java.lang.Thread.run(Thread.java:595) > > Any ideas what I'm doing wrong or what I can do to fix it? > > Regards > Wayne Gemmell > > - > To start a new topic, e-mail: users@tomcat.apache.org > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Configuring a common authentication realm
Hi Peter, On 1/25/07, Peter Stavrinides <[EMAIL PROTECTED]> wrote: Greg thanks for this, sounds like it has potential, and It wont be a problem with separate machines, but one problem I foresee though is the new IE7 browser which disables cookies on the client by default, have you tested it? It does work for any browser, however, the browser *must* support cookies - url-rewriting won't help here since the cookie is stored in the MySQL-database which then is read by Apache httpd. We solved it in this way that we tell our clients that their browser *must* accept cookies. Personally, I don't believe that too many ppl are surfing around without allowing their browsers to accept cookies... What's puzzling me a bit is, that I've tested it with IE7, and I couldn't see that IE7 was blocking cookies by default - at least not the one I've tested (XP SP2, IE7) Cheers! Greg -- what's puzzlin' you, is the nature of my game gpgp-fp: 79A84FA526807026795E4209D3B3FE028B3170B2 gpgp-key available @ http://pgpkeys.pca.dfn.de:11371 - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat 5.5 and x64 Windows
Martin/Mladen, I ended up installing .Net Framework 2.0 x64 as this was the prescribed method for resolving large numbers of Error 32 and 59 messages within the Windows system log. Mladen is probably right that the msvcrt80 runtime is the crux of the fix for this but for now I'm just happy that it works! Martin - I only have .Net 2.0 x64 installed on my system. Darren. -Original Message- From: Mladen Turk [mailto:[EMAIL PROTECTED] Sent: 25 January 2007 07:03 To: Tomcat Users List Subject: Re: Tomcat 5.5 and x64 Windows Martin Skøtt wrote: > Hi Darren, > > Good to hear that you solved - I hope you will spend a couple of minutes > on providing some extra information. > You don't actually need the .NET to be installed, but rather the msvcrt80 runtime. Download Microsoft Visual C++ 2005 Redistributable Package (x64) http://www.microsoft.com/downloads/details.aspx?familyid=90548130-4468-4BBC-9673-D6ACABD5D13B&displaylang=en It should be enough. Regards, Mladen. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Connaught honoured AIM 'Decade of Excellence' Award Connaught awarded Partnering Contractor of the Year 2005 Connaught wins AIM 'Company of the Year' award 2004 West of England Business of the Year Award Winner 2003 Why not visit our website http://www.connaught.plc.uk Disclaimer: The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete this message. Connaught plc, Head Office 01392 444546 - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
write to Tomcat JNDI
Hi, I need to bind objects using JNDI in my servlet running on apache tomcat . Since I'm new to the JNDI topic, I did a lot of reading the last few days and got mixed up a little. The tomcat documentation says that the initialContext is read-only, but then I found the hint to a solution in the mailing list archives (http://mail-archives.apache.org/mod_mbox/tomcat-users/200409.mbox/[EMAIL PROTECTED]) I call the initialContext Constructor passing an environment to it and omit the "java" prefix when creating the subcontext - and it works: Hashtable env = new Hashtable(); env.put(Context.INITIAL_CONTEXT_FACTORY,"org.apache.naming.java.javaURLContextFactory"); env.put(Context.URL_PKG_PREFIXES,"org.apache.naming"); Context initContext = new InitialContext(env); Context myContext = initContext.createSubcontext("wtl"); Context jdbcContext = myContext.createSubcontext("jdbc"); String test = new String("Hallo!"); jdbcContext.bind("test", test); out.println("Object successfully bound!"); String message = (String) jdbcContext.lookup("test"); out.println("Message: " + message); But why does this work? From what I've read I thought the prefix was necessary to associate the url with the context factory. I thought of this prefix as something specifying the protocol like http in web urls, but then this shouldn't work - and why can I write to the context anyway using this method? Does this work with other containers as well or just with tomcat? Thanks, Max - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Configuring a common authentication realm
Greg thanks for this, sounds like it has potential, and It wont be a problem with separate machines, but one problem I foresee though is the new IE7 browser which disables cookies on the client by default, have you tested it? Christopher, I am currently using the Authorization header but the server tries to authenticate before it serves the page so it still prompts for the username and password, I haven't looked at the REMOTE_USER field though, I would be curious to look at some documentation on it. Peter Gregor Schneider wrote: Peter, I think this can be done with mod_auth_cookie_myql. You will, however, have to write your own little SSO-Servlet / JSP which updates the MySQL-DB with the JSSOSessionID-Cookie provided by Tomcat. Apache will then read the Cookie from the database, check, if this cookie is present on the client-side (browser) and grant access to the protected area within Apache. Works absolutely smooth for us (however: Apache / Tomcat reside on the same machine, although we have 2 machines behind a hardware-loadbalancer). Check out http://www.freshports.org/www/mod_auth_cookie_mysql2 I've posted this on the apache-userlist already, you also might want to check out http://comments.gmane.org/gmane.comp.apache.user/65363 In the above solution authorization is handled by Tomcat (Form based Authorization). Hope I got your problem right & HTH Greg -- Peter Stavrinides Albourne Partners (Cyprus) Ltd Tel: +357 22 750652 If you are not an intended recipient of this e-mail, please notify the sender, delete it and do not read, act upon, print, disclose, copy, retain or redistribute it. Please visit http://www.albourne.com/email.html for important additional terms relating to this e-mail. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: how to detect whether Tomcat has finished starting completely on Windows?
Did you try adding an |org.apache.catalina.LifecycleListener to the engine entry? I see there is an event | org.apache.catalina.Lifecycle.AFTER_START_EVENT that gets called after the start of component. En l'instant précis du 01/25/07 08:50, Vlad s'exprimait en ces termes: > * Andre Prasetya <[EMAIL PROTECTED]> [Thu, 25 Jan 2007 10:55:51 > +0700]: >> There are many ways >> 1. Parse the localhost log cek for startup completed or something like >> that > > Thank you for this idea, it seens this is a way to go! > >> 2. telnet to your server at tomcat port > > As I said earlier, there is a period when it listens on port, but > returns http error message about "no host found". > >> 3. try requesting something from your tomcat > > This requires some knoweledge about site structure (and the url to > peak).. It's not an option for us. > > But checking the logs seems to be a best option, thanks again! > > > -- > Vlad . > >> >> On 1/25/07, Vlad <[EMAIL PROTECTED]> wrote: >> > >> > Hello, >> > >> > We are planning to use latest Tomcat from 5.x branch on Windows. > It's >> > started using 'bin/catalina.run bat' (please don't offer to run it > as >> a >> > service!). Our application requires Tomcat to be often started (and >> > stopped) and we wish to enable certain button in the GUI once it's >> > started completely. >> > >> > We have a problem - we can't find a way to reliably determine > whether >> > it has finished started or not. >> > In the middle of startup, it even responds to http requests - but >> > returns http error code 400 with error message like >> >No Host matches server name 127.0.0.1 >> > >> > What is the recommended way to determine whether Tomcat has finished >> > starting up? >> > >> > Thank you very much for your answers in advance! >> > > > - > To start a new topic, e-mail: users@tomcat.apache.org > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]