OSX Server and Tomcat/Apache integration
I am hoping that someone out there will be able to help. I have spent about 20+ hours on this and am getting nowhere fast. I have OSX Server (v 10.3, Panther) installed and am trying to get Tomcat and Apache to connect. I have read the documentation but with little luck. I have it all working on the plain client version of Panther without a problem BUT with the Server version of Panther the configuration is very different and it's not just a matter of copying across the config files or using the same concepts. Thank you. I v a n ... -- Ivan Markovic SculptLight http://www.sculptlight.com Mobile: (+353) 87 2939256 Office: (+353) 1 2982205 Fax: (+353) 1 2966848 2 Airfield Drive, Churchtown, Dublin 14, Ireland. VAT: IE 9072482G - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: AW: Session not sticking after timeout
Ralph, That was top of my list of suspicions. I used the HTTP Sniffer and saw the new Session ID go out to the Browser and then saw it come back after I clicked a Proceed button. But it is appearing that the ID is not getting picked-up. When I execute: req.getRequestedSessionId() I get null. And when I execute: session = req.getSession(false); I receive a null Session object! Ugggh. I v a n ... One guess: Did you have a look at the session id that is transmitted after the user logged in ? Is it a new one or is it the an older one ? Have a look at request.getRequestedSessionId()and session.getId() in the login page and the following page. One thing I expierienced is, that the IE has his own opinion about the caching of pages. This could couse this kind of trouble as the cached page might contain a session id that is no longer valid. -Ursprüngliche Nachricht- Von: Ivan E. Markovic [mailto:[EMAIL PROTECTED]] Gesendet: Dienstag, 5. Februar 2002 03:59 An: [EMAIL PROTECTED] Betreff: Session not sticking after timeout Wichtigkeit: Hoch snip/ (7) Once the user is logged on whatever they do next causes the system to return a null Session object, as though it had timed out again! But it hasn't. snip/ -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- Ivan Markovic SculptLight http://www.sculptlight.com (+353) 87 2939256 (+353) 1 2982205 114 Lower Churchtown Rd, Dublin 14, Ireland. -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Session not sticking after timeout BUG?
Ralph, Some more detail for you. Now I have the headers printed out after I attempt to extract the Session ID info from the Request object. As you can see the Session ID is present, BUT the values I get when requesting Session info from the Request object are either null or false (when they are normally the Session ID and true, for the Cookie boolean). This works on 3.1 but does not work in 3.2.1. I can see the Session ID, it's there but for some reason Tomcat fails to extract it properly! getRequestedSessionId null isRequestedSessionIdFromCookie false isRequestedSessionIdFromUrl false Header: cookie JSESSIONID=01an3f46n1 Header: connection Keep-Alive Header: ua-cpu PPC Header: referer http://192.168.1.4/servlets/VS/servlet/VPDFProductListServlet; Header: accept */* Header: pragma no-cache Header: content-length 92 Header: accept-language en Header: user-agent Mozilla/4.0 (compatible; MSIE 5.12; Mac_PowerPC) Header: ua-os MacOS Header: extension Security/Remote-Passphrase Header: content-type application/x-www-form-urlencoded Header: host 192.168.1.4 I v a n ... -- Ivan Markovic SculptLight http://www.sculptlight.com (+353) 87 2939256 (+353) 1 2982205 114 Lower Churchtown Rd, Dublin 14, Ireland. -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: AW: Session not sticking after timeout BUG?
Ralph, I just double-checked and we are using Tomcat v3.3 (the CVS version, which I am told includes all the bug-fixes). I added your code to my debug and this is what I got. As you can see it picks up the cookies but still getRequestedSessionId() is returning 'null'. But the Session ID is there! Help! getRequestedSessionId null isRequestedSessionIdFromCookie false isRequestedSessionIdFromUrl false JSESSIONID l76m6x5o31 Header: cookie JSESSIONID=l76m6x5o31 Header: accept */* Header: accept-language en Header: connection Keep-Alive Header: content-length 75 Header: content-type application/x-www-form-urlencoded Header: extension Security/Remote-Passphrase Header: host www3.vlm-online.com Header: pragma no-cache Header: referer http://www3.vlm-online.com/servlets/VS/servlet/LogonHandlerServlet; Header: ua-cpu PPC Header: ua-os MacOS Header: user-agent Mozilla/4.0 (compatible; MSIE 5.12; Mac_PowerPC) I v a n ... AFAIK getRequestedSessionId() should alway return somthing if there is a session id present (cookie or url encoded) no matter wether the session id is valid or not. Can you read the JSESSIONID cookie ? Cookie[] mCookies = request.getCookies(); if ((mCookies == null) || (mCookies.length == 0)) { PrintOut(No cookies); } else { for (int i = 0; i mCookies.length; i++) { PrintOut(mCookies[i].getName()); PrintOut(mCookies[i].getValue()); } } (PrintOut is just placeholder for your favorite way of dumping such information.) May be you should try a newer version of tomcat (3.3.*/4.*) ? (Even if it doesn't solve your problem, it might help to get help from one of the developers if the problem persists) -Ursprüngliche Nachricht- Von: Ivan E. Markovic [mailto:[EMAIL PROTECTED]] Gesendet: Dienstag, 5. Februar 2002 13:42 An: Tomcat Users List Betreff: Session not sticking after timeout BUG? Wichtigkeit: Hoch snip/ getRequestedSessionId null isRequestedSessionIdFromCookie false isRequestedSessionIdFromUrl false Header: cookie JSESSIONID=01an3f46n1 Header: connection Keep-Alive Header: ua-cpu PPC Header: referer http://192.168.1.4/servlets/VS/servlet/VPDFProductListServlet; Header: accept */* -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- Ivan Markovic SculptLight http://www.sculptlight.com (+353) 87 2939256 (+353) 1 2982205 114 Lower Churchtown Rd, Dublin 14, Ireland. -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Session not sticking after timeout
This is a problem I have been working on for the whole day with no luck! Help! (1) I store Session info in Cookies (I'm using Tomcat 3.2.1). (2) I set a short MaxInactiveInterval value (2 mins). (3) I logon to my system, which creates a new session and stores the odd item in the session. (4) I sit and let 2 mins pass and then attempt to interact with the system. (5) As expected I get a null Session returned as it has timed out. (6) I request a new Session and request the user logs on again. No problem. (7) Once the user is logged on whatever they do next causes the system to return a null Session object, as though it had timed out again! But it hasn't. I have been snooping the HTTP headers and the Session ID is correctly passed to Tomcat, but for some reason is not picked up inside the Servlet and so the Session is returned as null. But this behaviour is not consistent, it doesn't always fail! But it seems to most of the time. I have checked and tried everything and watched every byte sent back and forth. I suspect it might be an IE issue as it only appears to happen on IE. But it happens on OS 9, OS X and Win 2000 in a number of different versions. The system works, it's just when you time out that you have problems and it keeps on bouncing you out. I hope someone can help. Thank you for your time. I v a n ... -- Ivan Markovic SculptLight http://www.sculptlight.com (+353) 87 2939256 (+353) 1 2982205 114 Lower Churchtown Rd, Dublin 14, Ireland. -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
ClassFormatError help!
I checked the archives and there was nothing that was suggested that I haven't already tried, so I thought I would send an e-mail. I have just upgraded to jdk 1.3.1 and to Tomcat 3.3 and Ajpv13 and I can't get my packages to load correctly. All my code is in .jar files in the correct locations. Tomcat finds the .jar files and executes my BootUpServlet which calls some code in a package (com/vlm/vs/) and that is when the error is generated. 2001-11-27 14:33:27 - Ctx(/servlets/VS) : Loading 1 BootServlet (1) Start BootServlet 2001-11-27 14:33:28 - LoadOnStartupInterceptor: cannot load servlet name: BootServlet - java.lang.ClassFormatError: com/vlm/vs/UserManager (Illegal Variable name return) at java.lang.ClassLoader.defineClass0(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:486) I re-compiled all of my code using the latest JDK that I have on OS-X (1.3) and it still fails. I moved all the .jar files around and still no luck. This ran without any problems under the old configuration. It's managing to load and run my BootServlet but won't load anything in the .jar that contains my package. I have checked and double-checked and the.jar is not corrupt. I have uploaded it numerous times, still no luck. Does anyone have any ideas please? I v a n ... -- Ivan Markovic SculptLight http://www.sculptlight.com (+353) 87 2939256 (+353) 1 2982205 114 Lower Churchtown Rd, Dublin 14, Ireland. -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Tracking Threads inside Tomcat
I hope that someone will be able to help. I have tomcat 3.2 running on a Sun Solaris platform and on my Mac OS-X. But after 5 to 10 hours Tomcat reaches some kind of deadlock on the Sun. Now I know that this is NOT a Tomcat issue, it is my code. But due to the length of time it takes to get to this stage it is very hard to debug. But I believe that it is a problem related to Threads not completing; for some reason. is there any way that I can trace the Threads, check their Stack Trace or something? I only have access remotely via a terminal window. Thank you. I v a n ... Ivan Markovic SculptLight http://www.sculptlight.com (+353) 87 2939256 (+353) 1 2982205 114 Lower Churchtown Rd, Dublin 14, Ireland. --
Changing error pages
A quickie. Can I change the error page that appears when Tomcat is down? Or is this hard-coded into Apache? Somehow, someway I want to be able to provide people with notice of what's going on when I am taking the system down. Thank you. I v a n ... Ivan Markovic SculptLight http://www.sculptlight.com (+353) 87 2939256 (+353) 1 2982205 114 Lower Churchtown Rd, Dublin 14, Ireland. -- Ivan Markovic SculptLight http://www.sculptlight.com (+353) 87 2939256 (+353) 1 2982205 114 Lower Churchtown Rd, Dublin 14, Ireland.
Duplicate calls to Servlets (have checked archive)
This issue was raised before and I read the replies and managed to stop duplicate calls to a Servlet called on boot-up; but when an error is generated I see two error reports! And it seems that the first call to the code has a valid context but the second call does not! Interestingly enough the output from that second call does not come back to the browser! Please any ideas? I do not have duplicate contexts, I have my classes in a separate dir (/servletapps/) and not in webapps. Below I have included both the output on startup and on shutdown. The context that contains the code is in the /VS/ dir. I have checked the archives and found no help there... STARTUP output: [localhost:/Users/ivan] root# 2001-05-01 06:31:37 - ContextManager: Adding context Ctx( /examples ) 2001-05-01 06:31:37 - Ctx( /servlets/VS ): Set debug to 9 2001-05-01 06:31:37 - ContextManager: Adding context Ctx( /servlets/VS ) 2001-05-01 06:31:37 - ContextManager: Adding context Ctx( /admin ) Starting tomcat. Check logs/tomcat.log for error messages 2001-05-01 06:31:37 - ContextManager: Adding context Ctx( /.DS_Store ) 2001-05-01 06:31:37 - ContextManager: Adding context Ctx( ) 2001-05-01 06:31:37 - ContextManager: Adding context Ctx( /test ) 2001-05-01 06:31:37 - Ctx( /servlets/VS ): XmlReader - init /servlets/VS servletapps/VS 2001-05-01 06:31:37 - Ctx( /servlets/VS ): Reading /export/home/tomcat/jakarta-tomcat/servletapps/VS/WEB-INF/web.xml 2001-05-01 06:31:37 - Ctx( /servlets/VS ): Loading -2147483646 jsp 2001-05-01 06:31:37 - Ctx( /servlets/VS ): Loading 1 BootServlet (1) Start BootServlet (1) Finish BootServlet OSX Mac true 2001-05-01 06:31:38 - PoolTcpConnector: Starting HttpConnectionHandler on 8080 2001-05-01 06:31:38 - PoolTcpConnector: Starting Ajp12ConnectionHandler on 8007 SHUTDOWN output Stop tomcat 2001-05-01 06:29:22 - ContextManager: Removing context Ctx( /examples ) 2001-05-01 06:29:22 - ContextManager: Removing context Ctx( /servlets/VS ) 2001-05-01 06:29:22 - Ctx( /servlets/VS ): Removing sessions from Ctx( /servlets/VS ) 2001-05-01 06:29:22 - ContextManager: Removing context Ctx( /admin ) 2001-05-01 06:29:22 - ContextManager: Removing context Ctx( /.DS_Store ) 2001-05-01 06:29:22 - ContextManager: Removing context Ctx( ) 2001-05-01 06:29:22 - ContextManager: Removing context Ctx( /test ) Thank you. I v a n ...
Path args to Apache/Tomact (getPathInfo)
I have a question concerning the req.getPathInfo() functionality. I have a servlet that I wish to call passing in a 'path' as an argument which I will later use as an argument. See below (where LogonServlet is the Servlet and VLM is the argument) www.vlm.com/servlets/VS/servlet/LogonServlet/VLM This is much cleaner than: www.vlm.com/servlets/VS/servlet/LogonServlet?CID=VLM BUT the first URL does not work unless arguments are specified at the end of the URL, for example: www.vlm.com/servlets/VS/servlet/LogonServlet/VLM?A=B Without '?A=B' No call seems to be made to LogonServlet! Is there anyway that I configure the system to accept the first URL, passing in the 'VLM' as the path? If this is possible I have a follow-on question. I would also like to create an alias to reduce the length of the URL. How would one go about reducing: www.vlm.com/servlets/VS/servlet/LogonServlet/VLM To say: www.vlm.com/LogonServlet/VLM Thank you for your time. I v a n ... -- Ivan Markovic SculptLight http://www.sculptlight.com (+353) 87 2939256 (+353) 1 2982205 114 Lower Churchtown Rd, Dublin 14, Ireland. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
RE: How do I redirect console messages to a log file?
Erick , I asked this question a while ago but received no satisfactory reply; so here is what what I managed to work out myself. I use Unix and this is works perfectly. I often open up a session and tail -f the tomcat.err log. I also have a Servlet written that allows me to remotely view 'n' lines of any of the logs inside a web browser. So if I am off site I can dump the contents of the error logs on demand (without the need of an SSH client) from any machine. Basic stuff but really useful. This may wrap onto a couple of lines in your email, but it is one line. The log file that I end up watching is tomcat.err that has the most interesting info. Not that I have any errors in my code that need trapping! Good luck, let me know if this works for you Erick. /export/home/tomcat/jakarta-tomcat/bin/startup.sh /export/home/tomcat/jakarta-tomcat/logs/tomcat.out 2 /export/home/tomcat/jakarta-tomcat/logs/tomcat.err I v a n ... From a posting I've unearthed from jGuru.com, it stated that redirecting the messages is as simple as using the command: startup.sh output.log in Unix. As I have mentioned, I am running in a Win NT environment. I have tried the DOS of equivalent of piping the output by: \bin\startup tomcat.log but the trace() lines are still being sent to the console instead of the log file. What else is there that I could do? -Original Message- From: Samson, Lyndon [IT] [mailto:[EMAIL PROTECTED]] Sent: 24 January 2001 16:47 To: [EMAIL PROTECTED] Subject: RE: How do I redirect console messages to a log file? If you are using *nix you could look up the system command tee, but if apache is using stderr it wont work. Its pretty easy to write a little C program ( someone prob. already has ) to do this. PS I knew a guy who used to work @ reef, Ross Dyson ring a bell? -Original Message- From: Erick Ramirez [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 24, 2001 3:28 PM To: [EMAIL PROTECTED] Subject: How do I redirect console messages to a log file? I am running Tomcat 3.2.1 on top of Apache 1.3 in a NT Environment. I have tried modifying the Logger element in server.xml so that it reads: Logger name="tc_log" path="logs/tomcat.log" verbosityLevel = "DEBUG" / but it seems to only report "Context" messages, as well as exceptions. I have tried modifying wrapper.properties so that it reads: wrapper.stdout=$(wrapper.tomcat_home)\logs\stdout.log wrapper.stderr=$(wrapper.tomcat_home)\logs\stderr.log and once again, it only reports some of the messages to these files and most of the trace lines are still being reported to the console. I am using a trace() which by default, sends messages to System.out and I would like these lines to be piped into a log file. Can anyone help? Regards, ERICK RAMIREZ ControlServlet Team [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] REEF SA/NV Tour Gallieni II 36, ave du Gen de Gaulle 93006 Bagnolet FRANCE Tel +33 1 5582 9449 www.reef.com http://www.reef.com/ Business is Dynamic. Take Control. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] -- Ivan Markovic SculptLight http://www.sculptlight.com (+353) 87 2939256 (+353) 1 2982205 114 Lower Churchtown Rd, Dublin 14, Ireland. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
RE: Session timeout
Thank you very much. I v a n ... Default is 30 minutes and you can configure it per context : context path="/test" defaultSessionTimeOut="1" / will make it 1 minute in the test context. Wellington Silva UN/FAO -Original Message- From: Ivan E. Markovic [mailto:[EMAIL PROTECTED]] Sent: 20 November 2000 15:58 To: [EMAIL PROTECTED] Subject:Session timeout Quick question. How long are sessions inside Apache/Tomcat valid for? In all the Servlet documentation I have it is stated that session duration is server specific. So I checked the Tomcat and Apache docs and could find no indicator as to what that duration was. Anyone able to enlighten me? Thank you. I v a n ... Ivan Markovic SculptLight http://www.sculptlight.com (+353) 87 2939256 (+353) 1 2982205 114 Lower Churchtown Rd, Dublin 14, Ireland. Ivan Markovic SculptLight http://www.sculptlight.com (+353) 87 2939256 (+353) 1 2982205 114 Lower Churchtown Rd, Dublin 14, Ireland.
log help! Where is System.err going?
This is probably a silly question but I have done my best to solve this myself but have had no luck... Using JServ I knew where my System.err and System.out println output went and I could tail the logs. But with Tomcat I seem to be fumbling around in the dark! If I reboot Tomcat inside a shell I see the output appear in the shell; when I close the shell I no longer have access to the output. I have checked all the logs; servlet.log, jasper.log and of course tomcat.log; the latter contains some information but, it seems, not all the data that was appearing in my shell. I found a 'log' file, or what appeared to be a log file called tomcat.out but for some reason no log data is being sent there, although it appears that it used to! So I am stuck. I have looked and looked and looked; and an none the wiser. Can anyone please set me straight? Thank you. I v a n ... Ivan Markovic SculptLight http://www.sculptlight.com (+353) 87 2939256 (+353) 1 2982205 114 Lower Churchtown Rd, Dublin 14, Ireland.