Interceptors in Tomcat 3.x
Hai , I need some details on the Interceptors in Tomcat 3.x servers. Whether the Interceptors in 3.x is same as Valves in 4.x . Is it possible to configure our own interceptors to find the processing time for a request.I tried writing a Interceptor class by implementing the RequestInterceptor interface and made an entry for the RequestProcessor in the server.xml file.But it doesn't works. Regards, Arun kumar - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomcat 5 port 80 non-root
hi i read that in Tomcat 5 it's possible running the catalina on port 80 as a non-root user. like in apache httpd where you can set the user an group in the httpd.conf. regards nicolas - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomcat Manager- field called; Error Count: #
When using the 'manager' web app to monitor Tomcat ( url; http://... /manager/status/all ) the page titled 'Complete Server Status' has a field on it called 'Error count:' followed by a number. This field exists under all the section headings. Intuitively, I would assume that the number under the individual sections totaled up would equal the number under the HTTP-SSL and HTTP-NonSSL sections but they don't. What is Error Count? What does a non-zero number represent? Is there some documentation that explains the page? I tried looking at the documentation ( http://jakarta.apache.org/tomcat/tomcat-5.0-doc/manager-howto.html http://jakarta.apache.org/tomcat/tomcat-5.0-doc/manager-howto.html) but could find nothing that talks about Error Count.
Re: Sudden IllegalStateException
Hello Merrill If you're still working on this tomorrow and you want to share your code I'd be willing to walk it through. Howard Watson Database Administrator Easter Seals-Goodwill Northern Rocky Mountain 4400 Central Avenue Great Falls, Montana 59405 (406) 771-3759 [EMAIL PROTECTED] [EMAIL PROTECTED] 12/31/03 14:59 PM I have been developing a JSP/servlet application using Tomcat 5.0.16. Over the past months, I felt that I had learned enough (partially with the help of this mailing list) about JSP, servlets, and Tomcat that I could debug most of the obsticales that popped up. Until this morning. I started addnig a new servlet several levels down. Suddenly, I started getting the following error: java.lang.IllegalStateException org.apache.coyote.tomcat5.CoyoteResponseFacade.sendRedirect(CoyoteResponseFacade.java:379) Timesheet.LoginServlet.doPost(LoginServlet.java:67) javax.servlet.http.HttpServlet.service(HttpServlet.java:763) javax.servlet.http.HttpServlet.service(HttpServlet.java:856) When I launch the application, the Tomcat HTML welcome page redirects via a refresh to my login.jsp page via https. That login page displays properly. When I fill in the login name and password and click on submit, I immediately get the above exception. The line number it references is the following: response.sendRedirect(Util.MAIN_MENU_PAGE_URL); where Util.MAIN_MENU_PAGE_URL is /timesheet/mainMenu.jsp, a valid page URL. This sendRedirect() is the last thing the login servlet does after validating the login and collecting information about the logged in user from the database. This has all been working for months. The one time I got an illegal state exception before was when I accidently did something like session.getAttribute() when the session was invalid. However, the login servlet starts with HttpSession session = request.getSession(true); which is the ONLY time it's called with a true argument. I have also verified that immediately before the call to sendRedirect(), both the session and response variables have reasonable values. Can any one suggest what I may have changed to suddenly get an illegal state exception? Merrill Cornish - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: manager
Hei if you change the documentbase for / context in manager (or manually if you are familiar) to wathever the page is you want to display and remove all other context entries, the only page accesible will be your page. Happy newyear Antony - Original Message - From: Jonathan Locke [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, December 30, 2003 1:26 AM Subject: manager maybe this is already covered on the tomcat website or in some FAQ, but i can't seem to find the answer i'm looking for... i want to turn off all the tomcat administration tools (manager, admin, etc) and the html documentation that's available through the root context... reason being that the machine is never updated or maintained via these tools and so (even though they have a password) the management apps are just a potential security issue. how exactly should i go about this? thanks, jon _ Scanned on 30 Dec 2003 00:26:36 Scanning by http://erado.com _ Scanned on 30 Dec 2003 00:26:37 Scanning by http://erado.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Interceptors in Tomcat 3.x
Interceptors do the same kind of work in TC 3.x as Valves do in TC 4.x, but they are structurally very different. Also, I haven't worked with TC 3.2.x in a very long time (since TC 3.3.x no longer has the RequestInterceptor interface). One suggestion is to extend BaseInterceptor instead of implementing RequestInterceptor. This way you don't have to worry about how to implement the methods you don't care about. Otherwise, buy 'doesn't work' do you mean that Tomcat doesn't load your Interceptor, or that some method doesn't seem to be getting called? arunkumar [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hai , I need some details on the Interceptors in Tomcat 3.x servers. Whether the Interceptors in 3.x is same as Valves in 4.x . Is it possible to configure our own interceptors to find the processing time for a request.I tried writing a Interceptor class by implementing the RequestInterceptor interface and made an entry for the RequestProcessor in the server.xml file.But it doesn't works. Regards, Arun kumar - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat 5 port 80 non-root
You need to use jsvc to do this. The source ships in the $CATALINA_HOME/bin/jsvc.tar.gz file. You need to unpack it and build it for your system. The documentation is at: http://jakarta.apache.org/commons/daemon/jsvc.html. Nicolas [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] hi i read that in Tomcat 5 it's possible running the catalina on port 80 as a non-root user. like in apache httpd where you can set the user an group in the httpd.conf. regards nicolas - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Win 2003 + Tomcat Server servlet placement
Is there any one out there I could correspond with concerning this problem.. Every thing I've tried does not work.. It can't be that hard. I've missed something some where. Well I'm still at it.. Its clear I still have a lot to learn on the tomcat xml and workers files... I've turned IIS off as I can get all of the examples to work doing http://localhost:8080/servlets-examples/index.html. So I'll just run the app on http://localhost:8080/app/dir/html files JAVA_HOME envir var set to c:\program files\java\j2re1.4.2_03 CATALINA_HOME envir var set to c:\tomcat_5016 Wouldn't of thought there would be a problem with the app in the ROOT directory but I get the tomcat error message HTTP Status 404 - /servlet/com.datatel.server.servlets.webadvisor.WebAdvisor The requested resource (/servlet/com.datatel.server.servlets.webadvisor.WebAdvisor) is not available. during installation of the app it asks where to put the servlets and jar files. I put the servlet.jar files in C:\tomcat_5016\webapps\ROOT\WEB-INF\lib and the jre jar files in c:\program files\java\j2re1.4.2_03\jre\lib\ext Is this correct? or do they go into one of the lib directories hanging off off of c:\j2sdk directories.. if not could some one explain how I can get tomcat to find the servlets. Thanks Stew - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
OT: servlet 2.4: write a file to a war
I am storing images to db as a blob. I want to cache the images to files so I do not hit the db everytime. Question: How do I write to a file... when I am deploying a war file? Where am I allowed to write and delete w/ a Servlet 2.4 (again... a war file). tia, .V - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Win 2003 + Tomcat Server servlet placement
well maybee im not shure but on my server i have to share the file so it can bee acess by the web some file must have depend on the app read and write acess and other only read sharing [EMAIL PROTECTED] crazy-wilys webmaster From: [EMAIL PROTECTED] Reply-To: Tomcat Users List [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Subject: Re: Win 2003 + Tomcat Server servlet placement Date: Thu, 1 Jan 2004 16:00:55 -0700 (Mountain Standard Time) Is there any one out there I could correspond with concerning this problem.. Every thing I've tried does not work.. It can't be that hard. I've missed something some where. Well I'm still at it.. Its clear I still have a lot to learn on the tomcat xml and workers files... I've turned IIS off as I can get all of the examples to work doing http://localhost:8080/servlets-examples/index.html. So I'll just run the app on http://localhost:8080/app/dir/html files JAVA_HOME envir var set to c:\program files\java\j2re1.4.2_03 CATALINA_HOME envir var set to c:\tomcat_5016 Wouldn't of thought there would be a problem with the app in the ROOT directory but I get the tomcat error message HTTP Status 404 - /servlet/com.datatel.server.servlets.webadvisor.WebAdvisor The requested resource (/servlet/com.datatel.server.servlets.webadvisor.WebAdvisor) is not available. during installation of the app it asks where to put the servlets and jar files. I put the servlet.jar files in C:\tomcat_5016\webapps\ROOT\WEB-INF\lib and the jre jar files in c:\program files\java\j2re1.4.2_03\jre\lib\ext Is this correct? or do they go into one of the lib directories hanging off off of c:\j2sdk directories.. if not could some one explain how I can get tomcat to find the servlets. Thanks Stew - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ MSN Messenger : discutez en direct avec vos amis ! http://messenger.fr.msn.ca/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Win 2003 + Tomcat Server servlet placement
Do this. Forget the installer. I never use it anyway. Just grab the zipped or gzipped archive, extract it to a directory of your choice (I suggest using a path without spaces to be safe), set JAVA_HOME to the directory where you have the JDK installed (not the JRE, the full JDK). Now, you should set up your own webapp under your own context, not dump servlets into the existing ROOT context. But if you want to do that, fine. Then you'll have to uncomment the invoker servlet in CATALINA_HOME/conf/web.xml. After that, start Tomcat and you should be able to access your servlet. Jake At 04:00 PM 1/1/2004 -0700, you wrote: Is there any one out there I could correspond with concerning this problem.. Every thing I've tried does not work.. It can't be that hard. I've missed something some where. Well I'm still at it.. Its clear I still have a lot to learn on the tomcat xml and workers files... I've turned IIS off as I can get all of the examples to work doing http://localhost:8080/servlets-examples/index.html. So I'll just run the app on http://localhost:8080/app/dir/html files JAVA_HOME envir var set to c:\program files\java\j2re1.4.2_03 CATALINA_HOME envir var set to c:\tomcat_5016 Wouldn't of thought there would be a problem with the app in the ROOT directory but I get the tomcat error message HTTP Status 404 - /servlet/com.datatel.server.servlets.webadvisor.WebAdvisor The requested resource (/servlet/com.datatel.server.servlets.webadvisor.WebAdvisor) is not available. during installation of the app it asks where to put the servlets and jar files. I put the servlet.jar files in C:\tomcat_5016\webapps\ROOT\WEB-INF\lib and the jre jar files in c:\program files\java\j2re1.4.2_03\jre\lib\ext Is this correct? or do they go into one of the lib directories hanging off off of c:\j2sdk directories.. if not could some one explain how I can get tomcat to find the servlets. Thanks Stew - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: OT: servlet 2.4: write a file to a war
The only place you can count on existing for writing is the tempdir defined by the servlet container. File temp = (File)context.getAttribute(javax.servlet.context.tempdir); Otherwise, you can set up a deployment parameter for your deployer to configure that specifies a directory for writing. This can be either a JNDI environment variable or a context parameter. You can set up defaults in the web.xml and the deployer can override these with proprietary server configuration. Jake At 06:34 PM 1/1/2004 -0500, you wrote: I am storing images to db as a blob. I want to cache the images to files so I do not hit the db everytime. Question: How do I write to a file... when I am deploying a war file? Where am I allowed to write and delete w/ a Servlet 2.4 (again... a war file). tia, .V - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
tomcat 5 port 80 non-root
i following the instructions with jsvc included with tomcat, but when i run the Tomcat.sh script i get the following in my $CATALINA_HOME\logs\catalina.out Can't load server.xml Can't load server.xml Jan 2, 2004 12:14:04 AM org.apache.catalina.startup.Catalina start INFO: Server startup in 0 ms any ideas? thanks, james - You need to use jsvc to do this. The source ships in the $CATALINA_HOME/bin/jsvc.tar.gz file. You need to unpack it and build it for your system. The documentation is at: http://jakarta.apache.org/commons/daemon/jsvc.html. Nicolas nl@(protected) wrote in message news:3FF41454.9040005@(protected) hi i read that in Tomcat 5 it 's possible running the catalina on port 80 as a non-root user. like in apache httpd where you can set the user an group in the httpd.conf. regards nicolas __ Do you Yahoo!? Find out what made the Top Yahoo! Searches of 2003 http://search.yahoo.com/top2003 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]