tomcat start
hi, I am new to tomcat but not new to servlets and jserv. but i cannot get my project to live with tomcat. CONFIGURATION = Apache == htpd.conf - I added the following line Include G:/Programme/ApacheGroup/apache322/conf/mod_jk.conf mod_jk -- I use the auto-conf generated file rename to mod_jk.conf I only changed the AJP from 12 to 13 within the profiler servlet jkmount JkMount /*.jsp ajp12 JkMount /servlet/* ajp12 # # Auto configuration for the /profiler context starts. # # # The following line makes apache aware of the location of the /profiler context # Alias /profiler G:/Programme/ApacheGroup/tomcat322/webapps/labor Directory G:/Programme/ApacheGroup/tomcat322/webapps/labor Options Indexes FollowSymLinks /Directory # # The following line mounts all JSP files and the /servlet/ uri to tomcat # JkMount /profiler/servlet/* ajp13 JkMount /profiler/*.jsp ajp12 # # The following line prohibits users from directly accessing WEB-INF # Location /profiler/WEB-INF/ AllowOverride None deny from all /Location # # Use Directory too. On Windows, Location doesn't work unless case matches # Directory G:/Programme/ApacheGroup/tomcat322/webapps/profiler/WEB-INF/ AllowOverride None deny from all /Directory # # The following line prohibits users from directly accessing META-INF # Location /profiler/META-INF/ AllowOverride None deny from all /Location # # Use Directory too. On Windows, Location doesn't work unless case matches # Directory G:/Programme/ApacheGroup/tomcat322/webapps/profiler/META-INF/ AllowOverride None deny from all /Directory -- Tomcat == Server.xml -- I added the following connector Connector className=org.apache.tomcat.service.PoolTcpConnector Parameter name=handler value=org.apache.tomcat.service.connector.Ajp13ConnectionHandler/ Parameter name=port value=8009/ /Connector I added the following context Context path=/profiler docBase=webapps/profiler crossContext=false debug=0 reloadable=true /Context Web.xml --- I changed nothing MY SERVLET APPLICATION == I generated the following directories in /tomcat322/webapps /profiler subdirectories and files index.html hellol.html /META-INF /WEB-INF /classes /web.xml by the way both static pages work fine when i type http://localhost/profiler/ http://localhost/profiler/hello.html my own web.xml -- ?xml version=1.0 encoding=ISO-8859-1? !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.2//EN http://java.sun.com/j2ee/dtds/web-app_2_2.dtd; web-app servlet servlet-name profiler /servlet-name servlet-class com/labor/profiler/iface/servlets/Pr_BE_Servlet.class /servlet-class init-param param-nameparam1/param-name param-valuevalue1/param-value /init-param /servlet !-- load-on-startup/load-on-startup -- /servlet servlet-mapping servlet-name profiler /servlet-name url-pattern /profiler/* /url-pattern /servlet-mapping security-constraint web-resource-collection web-resource-namea/web-resource-name url-pattern/foo1/*/url-pattern url-pattern/bar1/*/url-pattern http-methodGET/http-method http-methodPOST/http-method /web-resource-collection web-resource-collection web-resource-namea/web-resource-name url-pattern/foo2/*/url-pattern url-pattern/bar2/*/url-pattern /web-resource-collection auth-constraint role-namemanager/role-name role-namerole1/role-name /auth-constraint user-data-constraint transport-guaranteeCONFIDENTIAL/transport-guarantee /user-data-constraint /security-constraint /web-app yes thats it ;) can anyone tell me where to change something to get the thing run? or simply an error message that tells me anything ;)) thanks in advance Mario
Re: Access protected
Nicolas Preget wrote: Hi I would like to protect (using password for instance) the access to parts on my Tomcat installation. Do you know how I can make it ? Have a look for 'Realm' in the archive. Realms give access to user repositories for authentication and access control information. Access is protected through web.xml Antony
Re: List traffic et al
I'm not sure that I agree with the idea that I have to wade through all these messages for the good of the list. As I said, I have no experience with Tomcat on Windows, so I'm not interested in Windows specific issues nor can I help to solve them. Splitting along platform lines should retain a relatively good mix of newbies and experienced developers in each list, so I don't see the problem you are pointing out. In any event, even if the list is split on basic vs. advanced topics, advanced users who wanted to help the community could subscribe to all lists. I don't think it's necessarily bad to want to subscribe only to the lists you feel you can learn from. I've been lurking and posting for about 9 months now and it seems that the same basic group of people answer a majority of the questions. I used to answer a lot more than I do now, but I'll admit that I get pretty frustrated answering the same questions over and over when I know the answers can be easily found in the archive. Is it selfish or bad of me to skip over questions I used to answer, or should more responsibility be placed on the person asking the question? (rhetorical, because there's no way to control whether or not people actually search the archives before posting...) A digest version is already available for this list. --jeff From: Dmitri Colebatch [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] Date: Fri, 6 Jul 2001 16:03:14 +1000 To: [EMAIL PROTECTED], Jeff Kilbride [EMAIL PROTECTED] Subject: Re: List traffic et al I think the big problem with splitting the list is that everyone is going to be interested in their own little niche. I for instance learn nothing by answering many questions that I answer, but I do learn things from reading other answers. If the list was split, I would (potentially) have the option to only see the messages that I would learn from. This disadvantages other people on the list. And this is going to occur at all levels. Even relative newbies should be capable of answering some questions that they have just dealt with the day before. If we want to reduce traffic surely a digest is the option. The JBoss list has a _lot_ more traffic than this one, and I am able to receive that in digest mode quite happily. anyway, my 2c cheesr dim On Fri, 6 Jul 2001 15:45, Jeff Kilbride wrote: Even if the list is not split into these specific sub-topics, I would certainly like to see it split along Windows/Unix lines. I use Unix exclusively and I skip over 99% of the Windows questions, because I don't have any experience with Tomcat on that platform. I'm sure Windows users feel the same way about Unix related questions. Thanks, --jeff From: Hemant Singh [EMAIL PROTECTED] Organization: Supportscape Inc. Reply-To: [EMAIL PROTECTED] Date: Wed, 4 Jul 2001 13:39:13 +0530 To: [EMAIL PROTECTED] Subject: Re: List traffic et al HI: Heartly agree with yur idea and before this also i keep on getting agree with same kind of ideas but i just dont know who is the moderator of this group and how this can be acheived. Regards Hemant - Original Message - From: Milt Epstein [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, July 03, 2001 10:41 PM Subject: Re: List traffic et al On Tue, 3 Jul 2001, Sam Newman wrote: Given the huge amount of traffic this list generates, I can rarely get involved with the discussions that take place. It occurs to me that there sems to be three major discussion themes on the list as a whole: 1.) General servlet/jsp development issues and how tomcat affects them 2.) General tomcat configuration issues 3.) Webserver integration issues I guess as documentation improves (e.g. tomcat book, work by people like Mike Slinn) points 23 will become less of an issue. I'm just wondering if there is any millage in perhaps splitting the list into 2 or 3 lists? Personally, I've got no issues with getting tomcat up and running and so don't care too much about that end of things, however the servlet/jsp development issues is more interesting to me. I don't have too strong an opinion on it, its just that I worry I'm missing some interesting topics because I don't have the time to work though all the posts This idea has come up before, and I think it's one of the best for dealing with the high volume on this list (I guess it's one of the two or three highest volume apache lists). I even volunteered to take the lead in doing this. So I sent a note to the list owner explaining the idea. Unfortunately, I never heard anything back. Without the list owner's cooperation/participation (or someone who can modify the apache/jakarta mailing lists), it won't be possible to do this. So, we could do some work on this (i.e. figuring out what separate lists to have), but unless we know that it's going to come to something, it doesn't make sense to do too much work on it. Milt Epstein Research Programmer
Trouble trying to port from JServ
Hi all, I hope someone can help me with a problem. I'm sorry if this is a stupid newbie question but I've been working on this for days with no success. I have been through all the documentation too. I am trying to port my web application from JServ to Tomcat/mod_jk and am having trouble configuring Tomcat to use the same URL for servlets that I used with JServ. Unfortunately changing the URL of my servlets is not an option because hundreds of external sites already link to these URLs. The URL I am currently using for all servlets is http://www.mydomain.com/int/MyServlet. Unfortunately under Tomcat my servlets only work at the URL http://www.mydomain.com/int/servlet/MyServlet. I think I've configured it correctly but it still won't work. I just see the following from stdout: 2001-07-06 01:49:23 - Ctx( /int ): 404 R( /int + /MyServlet + null) null Below are my conf files. I've tried several variations on them with no success. I have the following settings in server.xml: Context path=/int docBase=/opt/dev/website/int crossContext=false debug=0 reloadable=true /Context /opt/dev/website/int is the directory that contains all my servlet classes. It also contains WEB-INF/classes which is actually a symbolic link back to /opt/dev/website/int. I am not using JSP. web.xml contains the following: servlet-mapping servlet-name invoker /servlet-name url-pattern /* /url-pattern /servlet-mapping servlet-mapping servlet-name invoker /servlet-name url-pattern /servlet/* /url-pattern /servlet-mapping ... I thought this should cause all files in /int to be handled by the invoker. Finally mod_jk.conf contains the following: Alias /int /opt/dev/website/int Directory /opt/dev/website/int Options Indexes FollowSymLinks /Directory JkMount /int/* ajp12 Location /int/WEB-INF/ AllowOverride None deny from all /Location Location /int/META-INF/ AllowOverride None deny from all /Location Under this configuration the URL http://www.mydomain.com/int/MyServlet always returns 404 - Page not found. But http://www.mydomain.com/int/servlet/MyServlet returns the correct servlet response. Sorry dump all these configuration files on you but I wanted to provide as much info as possible. Can someone kindly explain how I can continue to use the same url (http://www.mydomain.com/int/MyServlet) with Tomcat? What am I doing wrong? I am using Tomcat 3.2.2 and Apache 1.3.20. Any and all replies are much appreciated. Thank you, Barry [EMAIL PROTECTED]
RE: Tomcat Logging.
Hi, I am not sure about this but I think that one of the following should work: - if you just comment out the lines related to logging in conf/server.xml - or if you take out the path attribute from the logging elements in conf/server.xml then logging will be disabled. Tim Hughes -Original Message- From: John Clark Naldoza y Lopez [mailto:[EMAIL PROTECTED]] Sent: 6. juli 2001 08:56 To: [EMAIL PROTECTED] Subject: Tomcat Logging. Hi, Can someone please direct me to some info on how to turn off logging in tomcat? v3.2.2 Thanks in advance. Cheers, John Clark -- /) John Clark Naldoza y Lopez (\ / )Software Design Engineer II ( \ _( (__ Web-Application Development_) )_ (((\ \ /_Cable Modem Network Management System _\ / /))) ( \_/ / NEC Telecom Software Phils., Inc. \ \_/ ) \ / \ / \_/ phone: (+63 32) 233-9142 loc. 3112\_/ / / cellphone: (+63 919) 399-4742 \ \ / / email: [EMAIL PROTECTED]\ \ This message contains information that may be privileged or confidential and is the property of the Cap Gemini Ernst Young Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message.
Re: strange way to start tomcat
The first time a jsp script is requested, it has to be compiled. This procedure takes some time. But I agree with you: Waiting some minutes is very long. What processor, memory etc do you have and is the machine loaded (use top to display the load). Perhaps you should try to use another JVM? That the sequence (start, stop, start, start) works could have following reasons: * The first time you start, everything seems to be ok. * Then you stop. * The next startup tells you, that the port is already used, so tomcat was not stopped properly. Did you do a ps -edaf to view your processes after the shutdown? Perhaps there are hanging java processes/threads? * The next time you start is the same as before: the port is used already I think that something triggers the compilation of your jsp while you perform that procedure and tomcat is not shut down at all. When you try to access your jsp afterwards, it is already compiled and so it is served faster. I would try another, more up-to-date JVM. Bye, Peter. -- Mag. Peter Hrastnik tele.ring Telekom Service GmbH A-1030 Wien, Hainburgerstr. 33 Tel.: +43/1/931012/3277, Mobil: +43/650/6503277 Krishna Muthyala wrote: Alex Looks like the port on which tomcat is using is being already used by something else , hence the bind exception kris --- Alex Madon [EMAIL PROTECTED] wrote: Hello I downloaded tomcat 3.2.2 binaries distribution and installed it in my /opt (SuSE linux 7.0) dir. The sequence from the doc: TOMCAT_HOME=/opt/jakarta-tomcat-3.2.2 ; export TOMCAT_HOME; JAVA_HOME=/usr/lib/jdk1.1.8/; export JAVA_HOME; bin/startup.sh didn't work: the server serves pages only very very slow (have to wait to minutes to get a page) when I connect to port 8080. The only way I found to make it work is to issue the forllowing sequence of startup.sh and shutdown.sh: bin/startup.sh bin/shutdown.sh bin/startup.sh bin/startup.sh Follwos the output of issuing the commands. Does somebody has an idea to make it work on the first bin/startup.sh? Thanks Alex --- torino:/opt/jakarta-tomcat-3.2.2 # bin/tomcat.sh start Using classpath: /opt/jakarta-tomcat-3.2.2/lib/ant.jar:/opt/jakarta-tomcat-3.2.2/lib/jasper.jar:/opt/jakarta-tomcat-3.2.2/lib/jaxp.jar:/opt/jakarta-tomcat-3.2.2/lib/parser.jar:/opt/jakarta-tomcat-3.2.2/lib/servlet.jar:/opt/jakarta-tomcat-3.2.2/lib/test:/opt/jakarta-tomcat-3.2.2/lib/webserver.jar torino:/opt/jakarta-tomcat-3.2.2 # Starting tomcat. Check logs/tomcat.log for error messages 2001-07-05 09:49:40 - ContextManager: Adding context Ctx( /examples ) 2001-07-05 09:49:40 - ContextManager: Adding context Ctx( /admin ) 2001-07-05 09:49:40 - ContextManager: Adding context Ctx( ) 2001-07-05 09:49:40 - ContextManager: Adding context Ctx( /test ) 2001-07-05 09:49:46 - PoolTcpConnector: Starting HttpConnectionHandler on 8080 torino:/opt/jakarta-tomcat-3.2.2 # torino:/opt/jakarta-tomcat-3.2.2 # bin/tomcat.sh stop Using classpath: /opt/jakarta-tomcat-3.2.2/lib/ant.jar:/opt/jakarta-tomcat-3.2.2/lib/jasper.jar:/opt/jakarta-tomcat-3.2.2/lib/jaxp.jar:/opt/jakarta-tomcat-3.2.2/lib/parser.jar:/opt/jakarta-tomcat-3.2.2/lib/servlet.jar:/opt/jakarta-tomcat-3.2.2/lib/test:/opt/jakarta-tomcat-3.2.2/lib/webserver.jar Stop tomcat 2001-07-05 09:49:46 - PoolTcpConnector: Starting Ajp12ConnectionHandler on 8007 torino:/opt/jakarta-tomcat-3.2.2 # bin/tomcat.sh start Using classpath: /opt/jakarta-tomcat-3.2.2/lib/ant.jar:/opt/jakarta-tomcat-3.2.2/lib/jasper.jar:/opt/jakarta-tomcat-3.2.2/lib/jaxp.jar:/opt/jakarta-tomcat-3.2.2/lib/parser.jar:/opt/jakarta-tomcat-3.2.2/lib/servlet.jar:/opt/jakarta-tomcat-3.2.2/lib/test:/opt/jakarta-tomcat-3.2.2/lib/webserver.jar torino:/opt/jakarta-tomcat-3.2.2 # Starting tomcat. Check logs/tomcat.log for error messages 2001-07-05 09:49:55 - ContextManager: Adding context Ctx( /examples ) 2001-07-05 09:49:55 - ContextManager: Adding context Ctx( /admin ) 2001-07-05 09:49:55 - ContextManager: Adding context Ctx( ) 2001-07-05 09:49:55 - ContextManager: Adding context Ctx( /test ) FATAL:java.net.BindException: Address already in use java.net.BindException: Address already in use at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:363) at java.net.ServerSocket.init(ServerSocket.java:138) at java.net.ServerSocket.init(ServerSocket.java:102) at org.apache.tomcat.net.DefaultServerSocketFactory.createSocket(DefaultServerSocketFactory.java:97) at org.apache.tomcat.service.PoolTcpEndpoint.startEndpoint(PoolTcpEndpoint.java:239) at org.apache.tomcat.service.PoolTcpConnector.start(PoolTcpConnector.java:188) at org.apache.tomcat.core.ContextManager.start(ContextManager.java:527) at org.apache.tomcat.startup.Tomcat.execute(Tomcat.java:202)
AW: User login logging (JDBC authentication)
Hi, yeah this is more or less OK. For my application i have a servlet acting as a controller (like a portal) - all functions are accessed thru the controller, which dispatches the request to the correct JSP (in your case), for my part i'm using Velocity and templates. This controller servlet initializes - initialize the user session - the logging system - messages - Database pools - The events the application can handle For every request to a protected resource (JSP), the controller checks if the user is identified. If not, the request is dispatched to the login event. After a successfull login, the login event redirects to the protected resources (which was saved from the controller before redirecting to the login JSP. I'm using a login object in the session context which knows about - the username - the language - preferences - . Hope this helps Reto -Ursprüngliche Nachricht- Von: Rajehswar V. Rao [mailto:[EMAIL PROTECTED]] Gesendet: Freitag, 6. Juli 2001 07:20 An: '[EMAIL PROTECTED]' Betreff: RE: User login logging (JDBC authentication) Hi Reto, Could you please explain it more clearly And from your words i got one idea... please tell me whether it is right way or not... when ever a user access any JSP or Servlet other that LoginServlet(which is controller servlet).. I will check the session for some username if it is null then i redirect the request Login.jsp... Before this i will create a session in LogonServlet and set the username in the session whenever user is authenticated... is this OK -raj- -Original Message- From: Reto Badertscher [mailto:[EMAIL PROTECTED]] Sent: Thursday, July 05, 2001 7:53 PM To: [EMAIL PROTECTED] Subject: AW: User login logging (JDBC authentication) Hello, If you have a controller servlet it can check for authenticated user and if a user is not logged in you can redirect to your login screen, and after a successfull login, redirect back to the protected target. For security reason (accessing a JSP directly without going thru the controller servlet), every protected resource can check if a user is logged in. Reto -Ursprüngliche Nachricht- Von: Rajehswar V. Rao [mailto:[EMAIL PROTECTED]] Gesendet: Donnerstag, 5. Juli 2001 15:33 An: '[EMAIL PROTECTED]' Betreff: RE: User login logging (JDBC authentication) Hi randy, I would appreciate your patience... I am coming from first... This is my prblem I have 10 JSPs under myCon/jsp folder in Tomcat.. One of them is Login.jsp...which does authentication of user... i check the username and password against data which lies in SQLServer 7.0... Once the user is authenticated only...I want to give access to remaining JSPs.. But he/she should not access any JSP unless authenticated by Login.jsp... This is my problem... what is your best possible solution Is it anyway related to Java or Tomcat security? If yes, how can i achieve it? Or is there any other way around to achieve it... Thanks for listening... -raj- -Original Message- From: Randy Layman [mailto:[EMAIL PROTECTED]] Sent: Thursday, July 05, 2001 6:18 PM To: [EMAIL PROTECTED] Subject: RE: User login logging (JDBC authentication) From IIS you can only set the access to Tomcat as a whole, not individually. Tomcat controls access to the individual resources (IIS doesn't know what they are). You can view (and modify) the username and password in the session, I think the session field names are j_security_username and j_security_password, but don't remember right now - you can get a session object back for a secured user and then iterate over the fields. Randy -Original Message- From: Rajehswar V. Rao [mailto:[EMAIL PROTECTED]] Sent: Thursday, July 05, 2001 9:11 AM To: '[EMAIL PROTECTED]' Subject: RE: User login logging (JDBC authentication) Hi Randy and all, if that is the case where can i set username and password And one more thing, i am using tomcat with IIS ...can i restrict resources(JSPs and Servlets) on tomcat from IIS... Any help would be appreciated -raj- -Original Message- From: Randy Layman [mailto:[EMAIL PROTECTED]] Sent: Thursday, July 05, 2001 5:32 PM To: [EMAIL PROTECTED] Subject: RE: User login logging (JDBC authentication) What is happening is that Tomcat is using the user's credentials (username/password) in the Session to authenticate. If they are not there or invalid, then the user is prompted to log in again. Randy -Original Message- From: Mark Muffett [mailto:[EMAIL PROTECTED]] Sent: Thursday, July 05, 2001 8:33 AM To: [EMAIL PROTECTED] Subject: Re: User login logging (JDBC authentication) Raj and all I've managed to make the changes (very easy), but of course it doesn't work exactly as I wanted it (isn't life always like that...) I've got a database which is filling up fast since a new log gets written to it every time a user accesses a new page
Re: List traffic et al
Jeff, On Fri, 6 Jul 2001 16:38, Jeff Kilbride wrote: Splitting along platform lines should retain a relatively good mix of newbies and experienced developers in each list, so I don't see the problem you are pointing out. correct. I suppose my reply was not so much to your email, more the discussion in general. thats a very valid point you make. A digest version is already available for this list. sorry - I didn't know. I should RTFM! (o: cheers dim --jeff From: Dmitri Colebatch [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] Date: Fri, 6 Jul 2001 16:03:14 +1000 To: [EMAIL PROTECTED], Jeff Kilbride [EMAIL PROTECTED] Subject: Re: List traffic et al I think the big problem with splitting the list is that everyone is going to be interested in their own little niche. I for instance learn nothing by answering many questions that I answer, but I do learn things from reading other answers. If the list was split, I would (potentially) have the option to only see the messages that I would learn from. This disadvantages other people on the list. And this is going to occur at all levels. Even relative newbies should be capable of answering some questions that they have just dealt with the day before. If we want to reduce traffic surely a digest is the option. The JBoss list has a _lot_ more traffic than this one, and I am able to receive that in digest mode quite happily. anyway, my 2c cheesr dim On Fri, 6 Jul 2001 15:45, Jeff Kilbride wrote: Even if the list is not split into these specific sub-topics, I would certainly like to see it split along Windows/Unix lines. I use Unix exclusively and I skip over 99% of the Windows questions, because I don't have any experience with Tomcat on that platform. I'm sure Windows users feel the same way about Unix related questions. Thanks, --jeff From: Hemant Singh [EMAIL PROTECTED] Organization: Supportscape Inc. Reply-To: [EMAIL PROTECTED] Date: Wed, 4 Jul 2001 13:39:13 +0530 To: [EMAIL PROTECTED] Subject: Re: List traffic et al HI: Heartly agree with yur idea and before this also i keep on getting agree with same kind of ideas but i just dont know who is the moderator of this group and how this can be acheived. Regards Hemant - Original Message - From: Milt Epstein [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, July 03, 2001 10:41 PM Subject: Re: List traffic et al On Tue, 3 Jul 2001, Sam Newman wrote: Given the huge amount of traffic this list generates, I can rarely get involved with the discussions that take place. It occurs to me that there sems to be three major discussion themes on the list as a whole: 1.) General servlet/jsp development issues and how tomcat affects them 2.) General tomcat configuration issues 3.) Webserver integration issues I guess as documentation improves (e.g. tomcat book, work by people like Mike Slinn) points 23 will become less of an issue. I'm just wondering if there is any millage in perhaps splitting the list into 2 or 3 lists? Personally, I've got no issues with getting tomcat up and running and so don't care too much about that end of things, however the servlet/jsp development issues is more interesting to me. I don't have too strong an opinion on it, its just that I worry I'm missing some interesting topics because I don't have the time to work though all the posts This idea has come up before, and I think it's one of the best for dealing with the high volume on this list (I guess it's one of the two or three highest volume apache lists). I even volunteered to take the lead in doing this. So I sent a note to the list owner explaining the idea. Unfortunately, I never heard anything back. Without the list owner's cooperation/participation (or someone who can modify the apache/jakarta mailing lists), it won't be possible to do this. So, we could do some work on this (i.e. figuring out what separate lists to have), but unless we know that it's going to come to something, it doesn't make sense to do too much work on it. Milt Epstein Research Programmer Software/Systems Development Group Computing and Communications Services Office (CCSO) University of Illinois at Urbana-Champaign (UIUC) [EMAIL PROTECTED]
Invoke New Window From Applet
Hi There I know the question i'm going to ask, the best place is Java Forum, and I have tried there. but i didn't find quick response compartively here...I m asking you all this question... Actually from Browser Applet I want to open new Window which should look like New Application: What exactly I want you can see it by visiting followin site... I want the same way, they are invoking their application from applet.. please visit following site and let me know How can I invoke such window or application from applet http://www.truesan.com/products/resources/sandesigner/sandesigner.htm /sunil _ Get LifeTime Free email Visit --- http://www.nagpurcity.net
Problem changing default web.xml : conf/web.xml is not processed
Hi there, I have a problem changing the web.xml in the conf dir (conf/web.xml). I wanted to configure some central stuff there and wondered why it isn't working. Then I placed a wrong tag with no closing tag into the web.xml. The sax-parser must throw an exception with this file. But nothing happened. I tested the same wrong tag in an webapps web.xml file. There I got the exception. My conclusion is now, that the default web.xml is not proccessed! I wonder why, because the server.xml file is in the same directory. If server.xml is found by tomcat, why not the default web.xml. I can post a log-trace if you are intereseted, but I don't see any informative help in it. Be method opening the default web.xml does not log anything. Any comments, how I can make tomcat reading and processing the default web.xml are welcome. Kind regards Guido --- This message is intended for the adressee or its representative only. Any form of unauthorized use, publication, reproduction, copying or disclosure of the content of this e-mail is not permitted. If you are not the intended recipient of this e-mail message and its contents, please notify the sender immediately and delete this message and all its attachments subsequently.
Re: strange way to start tomcat
Hi Kris, thanks for the answer. I have narrowed down the problem. The default server.xml file sets tomcats to run on port 8080 as stand alone server. If i comment out the lines corresponding in the server.xml file, and run tomcat as an apache module, evererything starts smoothly, just with a bin/startup.sh command. So my problem is only on start up of tomcat as a standalone server. I still don't understand why i need this tricky sequence of startups and shutdowns, but that doesn't matter too much to me, as I is recommended to run it as an apche module ;) Alex Alex Looks like the port on which tomcat is using is being already used by something else , hence the bind exception kris
Apache Web and Tomcat on different machines
Hi, We have a little performance problem because and want to run the web server (Apache) on one computer and the tomcat on another. If somebody has done something like that, please help. My questions are: 1) Is it worthy at all? 2) Are there different way to do this? Mit freundlichen Grüßen Christian Schildt Diplom-Betriebswirt (FH) Softwaredeveloper Phone: 089/89013023 Mailto: [EMAIL PROTECTED] ELAXY AG Gutenbergstr. 5 D-82178 Puchheim bei München Phone: +089/8901300 Fax: +089/89013089 www.elaxy.com
redirect problems?
Hello Tomcat/Jakarta/Apache I am experiencing some weird problems with my web server setup. My system configuration is: Windows 2000 server IIS 5.0 Jakarta Tomcat 3.2.2 MS SQL 2000 Avenir aveConnect JDBC-driver 2.4M (developer verison) I have built an insert post page in MM Dreaweaver Ultradev 4.0 with a standard html form (texfields and a submitm button) and a jdbc connection. After the submit button is activated and the form data is inserted (which works great) I have added an jsp redirect command, and it is here the weirdness starts. The redirect function ( response.sendRedirect(response.encodeRedirectURL(MM_editRedirectUrl)); ) doesn't seem to work if the page contains a lot of html code. With only the form tags bodyform.../form/body the redirect-command works just fine. But when nestling the form tag with tables and other formatting html code the redirect seems to break down. After pressing the submit button, the URL changes as it should and the new page is displayed, only BELOW parts of the old (form) page. How much of the old page that is included after the redirect-command is dependent on the amount of html code ob the form page. Does this make any sense at all? I have spent 3 days trying back and forth with tomacat conf-files and IIS settings and so on. Best regards, PJ Utsi - Gothenburg Sweden
RE: Invoke New Window From Applet
Hi, from there Applet they don't invoke a new application, they only invoke a new Dialog-window inside their application (you see it by the words in the statusbar Java Applet Window). When you look at the html code, you see they have done it with the swing components. That means you only need to instantiate a new JDialog inside your Applet and invoke dialog.setVisible(true); Thats it! Rene -Ursprüngliche Nachricht- Von: Sunil Chandurkar [mailto:[EMAIL PROTECTED]] Gesendet am: Freitag, 6. Juli 2001 09:31 An: [EMAIL PROTECTED] Betreff: Invoke New Window From Applet Hi There I know the question i'm going to ask, the best place is Java Forum, and I have tried there. but i didn't find quick response compartively here...I m asking you all this question... Actually from Browser Applet I want to open new Window which should look like New Application: What exactly I want you can see it by visiting followin site... I want the same way, they are invoking their application from applet.. please visit following site and let me know How can I invoke such window or application from applet http://www.truesan.com/products/resources/sandesigner/sandesigner.htm /sunil _ Get LifeTime Free email Visit --- http://www.nagpurcity.net
RE: NT services applet
start settings control panel administrative tools services - James Radvan Websphere Analyst/Architect London, UK [EMAIL PROTECTED] +44 7990 624899 -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: 05 July 2001 17:17 To: [EMAIL PROTECTED] Subject: NT services applet How to find the NT services apple? Click here to visit the Argos home page http://www.argos.co.uk The information contained in this message or any of its attachments may be privileged and confidential, and is intended exclusively for the addressee. The views expressed may not be official policy, but the personal views of the originator. If you are not the addressee, any disclosure, reproduction, distribution, dissemination or use of this communication is not authorised. If you have received this message in error, please advise the sender by using the reply facility in your e-mail software. All messages sent and received by Argos Ltd are monitored for virus, high risk file extensions, and inappropriate content. As a result users should be aware that mail may be accessed.
problems with redirect after inserting post with form
Hello Tomcat users. I am experiencing some weird problems with my web server setup when trying to redirect after a plain form for posting data. My system configuration is: Windows 2000 server IIS 5.0 Jakarta Tomcat 3.2.2 MS SQL 2000 Avenir aveConnect JDBC-driver 2.4M (developer verison) I have built an insert post page in MM Dreaweaver Ultradev 4.0 with a standard html form (texfields and a submitm button) and a jdbc connection. After the submit button is activated and the form data is inserted (which works great) I have added an jsp redirect command, and it is here the weirdness starts. The redirect function ( response.sendRedirect(response.encodeRedirectURL(MM_editRedirectUrl)); ) doesn't seem to work if the page contains a lot of html code. With only the form tags bodyform.../form/body the redirect-command works just fine. But when nestling the form tag with tables and other formatting html code the redirect seems to break down. After pressing the submit button, the URL changes as it should and the new page is displayed, only BELOW parts of the old (form) page. How much of the old page that is included after the redirect-command is dependent on the amount of html code on the form page. Does this make any sense at all? I have spent 3 days trying back and forth with tomcat conf-files and IIS settings and so on, without any success. I have added all the context tags and so on in the conf files. Running small jsp pages works just fine. Best regards, PJ Utsi - Gothenburg Sweden
Re: strange way to start tomcat
Hello Peter, I have noticed the difference in speed you talk about when I use the mod_jk.so apache module (not stand alone mode): the first time I load the page is a bit slower than the next times. But when I use tomcat as a stand alone server, it is very very slow (order of minute...) I don't think that's my hardware (P3 933MHz) or JDK 1.1.8 on suse 7.0. Yes you are right i the standalone config, after a shutdown.sh a 'ps' command shows that the tomcat service is still running. Alex The first time a jsp script is requested, it has to be compiled. This procedure takes some time. But I agree with you: Waiting some minutes is very long. What processor, memory etc do you have and is the machine loaded (use top to display the load). Perhaps you should try to use another JVM? That the sequence (start, stop, start, start) works could have following reasons: * The first time you start, everything seems to be ok. * Then you stop. * The next startup tells you, that the port is already used, so tomcat was not stopped properly. Did you do a ps -edaf to view your processes after the shutdown? Perhaps there are hanging java processes/threads? * The next time you start is the same as before: the port is used already I think that something triggers the compilation of your jsp while you perform that procedure and tomcat is not shut down at all. When you try to access your jsp afterwards, it is already compiled and so it is served faster. I would try another, more up-to-date JVM. Bye, Peter.
creating a instance of a servlet: takes too long!!
Greetings, why is that my servlet when the first time is invoked, it takes about 30 seconds or more to start when the servlets that came in tomcat are instantaneous? After the servlet container instantiated and initialized my servlet, all the following requests are very fast. Is there any advice for what we should do and don't do in init() method? I just initialize some properties and a connection pool Well is it possible that my servlet container at any time my may shutdown my servlet to release memory, and another time it will be requested to start again and take another time too long to start, correct? How can I benchmark the time of instantiation of my servlet and the time of my init method? System configuration: -Tomcat 3.2.1 -JDK 1.3 -Linux RedHat 6.2 [kernel 2.2.18] -PII400Mhz 256Mbytes thanks. -- psalazar/
tomcat exception
Title: tomcat exception Hi When given a jsp request, tomcat throws an exception saying... What could be the probable reasons?(FYI.class files placed in webpps/root/WEB-INF/classes folder) Pls. Help.. Thanx in adv Lax EXCEPTION TROWN: javax.servlet.ServletException at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:459) at BOM._0002fBOM_0002fjwm_0005fFeature_0002ejspjwm_0005fFeature_jsp_0._jspService(_0002fBOM_0002fjwm_0005fFeature_0002ejspjwm_0005fFeature_jsp_0.java:425) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:177) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:318) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:391) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404) at org.apache.tomcat.core.Handler.service(Handler.java:286) at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372) at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:797) at org.apache.tomcat.core.ContextManager.service(ContextManager.java:743) at org.apache.tomcat.service.connector.Ajp12ConnectionHandler.processConnection(Ajp12ConnectionHandler.java:166) at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416) at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498) at java.lang.Thread.run(Thread.java:484) Root cause: java.lang.NullPointerException at BOM._0002fBOM_0002fjwm_0005fFeature_0002ejspjwm_0005fFeature_jsp_0._jspService(_0002fBOM_0002fjwm_0005fFeature_0002ejspjwm_0005fFeature_jsp_0.java:112) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:177) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:318) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:391) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404) at org.apache.tomcat.core.Handler.service(Handler.java:286) at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372) at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:797) at org.apache.tomcat.core.ContextManager.service(ContextManager.java:743) at org.apache.tomcat.service.connector.Ajp12ConnectionHandler.processConnection(Ajp12ConnectionHandler.java:166) at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416) at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498) at java.lang.Thread.run(Thread.java:484)
Re: tomcat exception
At 11:17 AM 06/07/01, you wrote: Hi When given a jsp request, tomcat throws an exception saying... What could be the probable reasons?(FYI.class files placed in webpps/root/WEB-INF/classes folder) Pls. Help.. From the stack trace the NullPointerException is being thrown in the JSP itself - I'd check there, not in any other class. (You can ignore the ServletException wrapping...) Jim Thanx in adv Lax EXCEPTION TROWN: javax.servlet.ServletException at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:459) at BOM._0002fBOM_0002fjwm_0005fFeature_0002ejspjwm_0005fFeature_jsp_0._jspService(_0002fBOM_0002fjwm_0005fFeature_0002ejspjwm_0005fFeature_jsp_0.java:425) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:177) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:318) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:391) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404) at org.apache.tomcat.core.Handler.service(Handler.java:286) at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372) at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:797) at org.apache.tomcat.core.ContextManager.service(ContextManager.java:743) at org.apache.tomcat.service.connector.Ajp12ConnectionHandler.processConnection(Ajp12ConnectionHandler.java:166) at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416) at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498) at java.lang.Thread.run(Thread.java:484) Root cause: java.lang.NullPointerException at BOM._0002fBOM_0002fjwm_0005fFeature_0002ejspjwm_0005fFeature_jsp_0._jspService(_0002fBOM_0002fjwm_0005fFeature_0002ejspjwm_0005fFeature_jsp_0.java:112) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:177) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:318) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:391) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404) at org.apache.tomcat.core.Handler.service(Handler.java:286) at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372) at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:797) at org.apache.tomcat.core.ContextManager.service(ContextManager.java:743) at org.apache.tomcat.service.connector.Ajp12ConnectionHandler.processConnection(Ajp12ConnectionHandler.java:166) at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416) at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498) at java.lang.Thread.run(Thread.java:484) -- * Jim Cheesman * Trabajo: [EMAIL PROTECTED] - (34)(91) 724 9200 x 2360 Always be on the lookout for conspicuousness.
RE: tomcat exception
hi, I try to help, may be this can solve your problem 1) Delete all the *.java file inside the jar file 2) put the class in \webapps\ROOT\WEB-INF\lib 3) check your classpath setting, it must be point to your jar file, (e.g : \webapps\ROOT\WEB-INF\lib\myjar.jar) [albertoscarina] -Original Message- From: Lakshminarayanan Ramakrishnan [mailto:[EMAIL PROTECTED]] Sent: Friday, July 06, 2001 5:18 PM To: [EMAIL PROTECTED] Subject: tomcat exception Hi When given a jsp request, tomcat throws an exception saying... What could be the probable reasons?(FYI.class files placed in webpps/root/WEB-INF/classes folder) Pls. Help.. Thanx in adv Lax EXCEPTION TROWN: javax.servlet.ServletException at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImp l.java:459) at BOM._0002fBOM_0002fjwm_0005fFeature_0002ejspjwm_0005fFeature_jsp_0._jspServi ce(_0002fBOM_0002fjwm_0005fFeature_0002ejspjwm_0005fFeature_jsp_0.java:425) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.ja va:177) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:318) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:391) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404) at org.apache.tomcat.core.Handler.service(Handler.java:286) at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372) at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:79 7) at org.apache.tomcat.core.ContextManager.service(ContextManager.java:743) at org.apache.tomcat.service.connector.Ajp12ConnectionHandler.processConnection (Ajp12ConnectionHandler.java:166) at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416) at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498) at java.lang.Thread.run(Thread.java:484) Root cause: java.lang.NullPointerException at BOM._0002fBOM_0002fjwm_0005fFeature_0002ejspjwm_0005fFeature_jsp_0._jspServi ce(_0002fBOM_0002fjwm_0005fFeature_0002ejspjwm_0005fFeature_jsp_0.java:112) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.ja va:177) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:318) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:391) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404) at org.apache.tomcat.core.Handler.service(Handler.java:286) at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372) at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:79 7) at org.apache.tomcat.core.ContextManager.service(ContextManager.java:743) at org.apache.tomcat.service.connector.Ajp12ConnectionHandler.processConnection (Ajp12ConnectionHandler.java:166) at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416) at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498) at java.lang.Thread.run(Thread.java:484) winmail.dat
Re: List traffic et al
Hi, I've been on the list about eight months and I'm not sure I agree that splitting it will alleviate the volume problem. I'm rather afraid that I would end up subscribed to 2 or 3 high volume lists rather than one. I imagine that we would see a lot of multiple posts across the lists. Previous suggestions for how the list could be split seem to me to fall into three categories 1) By platform 2) By competence (i.e. newbie list, advanced user list) 3) By category of problem Splitting the list on basis of platform strikes me as little perverse for a java based technology. However I recognise there are substantive issues because different platform = different web server. And I guess it would mean no more 'out of environment space' and 'how do i run tomcat as a service' posts but I already manage to filter most of these out anyway. My main concern would be that I'd be effectively cutting off a valuable section of the tomcat community. Whose to say the person capable and willing to solve my problem isn't running NT? And conversly why should i only post solutions to people who happen to be running the same OS as me? Problem with dividing on competence is that it is not clear how attractive a newbie list would be. Would people subscribe to a list made up of people who by definition are unlikely to know the answer to your question? Also aren't we trying to foster a strong community of tomcat/servlet developers. We would hardly be doing that by cutting newbies off from the 'experts'. After all what is going to happen? Newbies will post to their list, wait , not get an answer and repost to the advanced users list. Not a very encouraging introduction to tomcat. Dividing by category of problem seems to me the suggestion with the most merit. However here again I'm not convinced. I just think it would be incredibly difficult to get the right categories. Problems by their nature tend to cut across such neat boundaries. And half the time you don't know what category your problem fits into; that's why you have a problem. Suppose I'm trying to set up SSL. Potentially this is going to fall into all three of the categories that Sam has suggested. So again I think we are going to get multiple redundant posts and I think we completly cloud the issue of where to look for help. So what is to be done. It seems to me that good documentation projects (such as the tomcat book at sourceforge) offer the best hope for cutting the volume on this list. I know there is a big problem people posting problems which have been dealt with many, many times (sometimes in the same day!). I just don't know what you do about it other than regular reminders to check the archives before posting. And it is fairly clear that doesn't work. Last point: This list has saved my bacon a couple of times in the last eight months. As irritating as the high volume can be I think it is still very valuable in its current form. andrew On Fri, 06 Jul 2001, you wrote: I'm not sure that I agree with the idea that I have to wade through all these messages for the good of the list. As I said, I have no experience with Tomcat on Windows, so I'm not interested in Windows specific issues nor can I help to solve them. Splitting along platform lines should retain a relatively good mix of newbies and experienced developers in each list, so I don't see the problem you are pointing out. In any event, even if the list is split on basic vs. advanced topics, advanced users who wanted to help the community could subscribe to all lists. I don't think it's necessarily bad to want to subscribe only to the lists you feel you can learn from. I've been lurking and posting for about 9 months now and it seems that the same basic group of people answer a majority of the questions. I used to answer a lot more than I do now, but I'll admit that I get pretty frustrated answering the same questions over and over when I know the answers can be easily found in the archive. Is it selfish or bad of me to skip over questions I used to answer, or should more responsibility be placed on the person asking the question? (rhetorical, because there's no way to control whether or not people actually search the archives before posting...) A digest version is already available for this list. --jeff From: Dmitri Colebatch [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] Date: Fri, 6 Jul 2001 16:03:14 +1000 To: [EMAIL PROTECTED], Jeff Kilbride [EMAIL PROTECTED] Subject: Re: List traffic et al I think the big problem with splitting the list is that everyone is going to be interested in their own little niche. I for instance learn nothing by answering many questions that I answer, but I do learn things from reading other answers. If the list was split, I would (potentially) have the option to only see the messages that I would learn from. This disadvantages other people on the list. And this is going to occur at all levels.
AW: creating a instance of a servlet: takes too long!!
The time it takes to start a servlet depend on following factors: - if it is run for the first time or has been changed since it was run last it will be regenerated and recompiled. Depending on size and conplexity this can take some time. - if it is the second call after a compilation it will directly serve your response. - AFAIK if it has been finalized by the servlet container it will be reloaded and your init method will be called again To measure the time in your init() method just log some timestamps like: long mStart = System.currentTimeMillis(); log(mStart + : + getClass().getName() + : + hashCode() + : started); some code/ long mEnd = System.currentTimeMillis(); log(mEnd + : + getClass().getName() + : + hashCode() +: finished after + (mEnd - mStart) + ms); -Ursprüngliche Nachricht- Von: pedro salazar [mailto:[EMAIL PROTECTED]] Gesendet: Freitag, 6. Juli 2001 11:02 An: [EMAIL PROTECTED] Betreff: creating a instance of a servlet: takes too long!! Greetings, why is that my servlet when the first time is invoked, it takes about 30 seconds or more to start when the servlets that came in tomcat are instantaneous? After the servlet container instantiated and initialized my servlet, all the following requests are very fast. Is there any advice for what we should do and don't do in init() method? I just initialize some properties and a connection pool Well is it possible that my servlet container at any time my may shutdown my servlet to release memory, and another time it will be requested to start again and take another time too long to start, correct? How can I benchmark the time of instantiation of my servlet and the time of my init method? System configuration: -Tomcat 3.2.1 -JDK 1.3 -Linux RedHat 6.2 [kernel 2.2.18] -PII400Mhz 256Mbytes thanks. -- psalazar/
RE: mod_jk
is path, file permissions correct ? is it finding the files ? -Original Message- From: Anagha Mudigonda [mailto:[EMAIL PROTECTED]] Sent: Friday, July 06, 2001 11:42 AM To: [EMAIL PROTECTED] Subject: mod_jk hi, while compiling the source for mod_jk i find a lot of .h files cant be opened ... like jk_global.h etc. am i doing something wrong ?? help ! how do i go about it ? regards anagha -- Where the mind is without fear and the head is held high; Where knowledge is free; Where the world has not been broken up into fragments by narrow domestic walls; Where words come out from the depths of truth; ... Where the mind is led by thee into ever-widening thought and action; Into that heaven of freedom,my Father,let my country awake.
RE: List traffic et al
I TOTALLY agree with this, deviding will not be helpful. Rather let all of us try to reduce volume(both in size and number), it does not require much effort. Lets just try to follow the following. - Please go through the archives and docs before posting a question. The members should also refrain from answering questions which are there in the docs, please refer the docs would be the best reply. - Do not post messages in non text format such as HTML, Doc or RTF. - Do not post attachments to the list (such as vCards, ms-tnef etc.) - Use a meaningful subject. A single word like ``Help!'' doesn't help in understanding the nature of the problem, and may be skipped by a person who may actually have been able to help you. It also will be helpful in ignoring the issues in whcih an individual is not interested. - Change the subject if you're changing the content of a thread drastically. - Remove extras when quoting. If the quoted message contained a standard list trailer or a long signature, do remove it in your response. - Give enough information to help your reader to help you if you're posting about a problem. Statements like, ``My Apache doesn't work'' are useless since they give no description of the problem, no idea about the methods you tried to identify the problem, and no information (logs, etc) which could help in diagnosing the problem. Give enough information (how did you set it up, what did you do to test it, what was the exact output, what did the logs contain, what versions of software/hardware were you using, etc) to enable remote diagnostics. - Research your facts before you post solutions to the list. If you're not sure of the solution to a problem, either do not post, or first make sure of all the steps and then post. If you cannot make sure, state very clearly in the message that you're not sure and that the user is trying your solution at his/her own risk. No solution is preferable to a wrong solution, which may cause immense damage. For more info please read. http://lists.linux-india.org/lists/linux-india-help/guidelines.txt Shuklix -Original Message- From: Andrew Robson [mailto:[EMAIL PROTECTED]] Sent: Friday, July 06, 2001 2:42 PM To: [EMAIL PROTECTED] Subject: Re: List traffic et al Hi, I've been on the list about eight months and I'm not sure I agree that splitting it will alleviate the volume problem. I'm rather afraid that I would end up subscribed to 2 or 3 high volume lists rather than one. I imagine that we would see a lot of multiple posts across the lists. Previous suggestions for how the list could be split seem to me to fall into three categories 1) By platform 2) By competence (i.e. newbie list, advanced user list) 3) By category of problem Splitting the list on basis of platform strikes me as little perverse for a java based technology. However I recognise there are substantive issues because different platform = different web server. And I guess it would mean no more 'out of environment space' and 'how do i run tomcat as a service' posts but I already manage to filter most of these out anyway. My main concern would be that I'd be effectively cutting off a valuable section of the tomcat community. Whose to say the person capable and willing to solve my problem isn't running NT? And conversly why should i only post solutions to people who happen to be running the same OS as me? Problem with dividing on competence is that it is not clear how attractive a newbie list would be. Would people subscribe to a list made up of people who by definition are unlikely to know the answer to your question? Also aren't we trying to foster a strong community of tomcat/servlet developers. We would hardly be doing that by cutting newbies off from the 'experts'. After all what is going to happen? Newbies will post to their list, wait , not get an answer and repost to the advanced users list. Not a very encouraging introduction to tomcat. Dividing by category of problem seems to me the suggestion with the most merit. However here again I'm not convinced. I just think it would be incredibly difficult to get the right categories. Problems by their nature tend to cut across such neat boundaries. And half the time you don't know what category your problem fits into; that's why you have a problem. Suppose I'm trying to set up SSL. Potentially this is going to fall into all three of the categories that Sam has suggested. So again I think we are going to get multiple redundant posts and I think we completly cloud the issue of where to look for help. So what is to be done. It seems to me that good documentation projects (such as the tomcat book at sourceforge) offer the best hope for cutting the volume on this list. I know there is a big problem people posting problems which have been dealt with many, many times (sometimes in the same day!). I just don't know what you do about it other than regular reminders to check the archives before posting. And it is fairly
AW: List traffic et al
i agree 100%. i think a _good_ thing would be to include these guidelines in the confirmation message one receives after subscribing to the list. this is the way how it's done eg. on sun-managers, they post the guidelines once a month. it's the most disciplined list i know. -nico Rather let all of us try to reduce volume(both in size and number), it does not require much effort. Lets just try to follow the following. [snip]
RE: log files
Built in to Tomcat, no and no. It is possible to rotate logs by using some scripting and stopping/starting the server. I don't believe there is any way to limit the log file size without modifying the Tomcat source. Randy -Original Message- From: John Michael Luy [mailto:[EMAIL PROTECTED]] Sent: Thursday, July 05, 2001 8:21 PM To: [EMAIL PROTECTED] Subject: log files is there a way to rotate logs for tomcat-3.2.2. can you limit the size of the logfile within tomcat?
RE: Tomcat as an NT Service, in win 2000
The most common reasons for this is spaces in the paths of TOMCAT_HOME and JAVA_HOME. Other possibilities are classpath errors (not finding a critical class) and bind errors (something else running on the port Tomcat wants). Randy -Original Message- From: Govind Agarwal [mailto:[EMAIL PROTECTED]] Sent: Friday, July 06, 2001 12:18 AM To: [EMAIL PROTECTED] Subject: RE: Tomcat as an NT Service, in win 2000 This happens when the Wrapper.properties file is not configured properly. Check for all the path mentioned in your properties file and then try to run it again. otherwise try to run the Tomcat.bat file in the bin folder or run the command mentioned at the end of wrapper.properties file. executing this might give u some user friendly error message if any. -Original Message- From: Henry Kozachkov [mailto:[EMAIL PROTECTED]] Sent: Friday, July 06, 2001 6:36 AM To: [EMAIL PROTECTED] Subject: Tomcat as an NT Service, in win 2000 Will the instructions for NT service work in win 2000. I don't know if this is a bug or not, but under win 2k, I get C:\net start tomcat The Tomcat service is starting. The Tomcat service could not be started. The service did not report an error. More help is available by typing NET HELPMSG 3534. after following the instructions at http://jakarta.apache.org/tomcat/tomcat-3.2-doc/NT-Service-howto.html to the letter. This isn't a request for help, I just want to know if it is a known bug. Henry
RE: stand alone tomcat webserver question
-Original Message- From: Yomyung Leem [mailto:[EMAIL PROTECTED]] Sent: Thursday, July 05, 2001 9:18 PM To: [EMAIL PROTECTED] Subject: stand alone tomcat webserver question Hi folks. I am quite new to this web server stuff, and I found tomcat today. What I want to know that I could not find on the web page were the following: 1. Can it handle cgi perl scripts? *.asp files? If could be made to handle cgi perl, but you would have to write it yourself - you would create a servlet that executes the perl file. The catch is that you would have to set up the shell environment according to the CGI spec (sending POST to stdin and GET paremeters to environement variables, I believe). ASP is not builtin, but there is nothing that says you can't write something to convert ASP to JSP. Sun and Oracle have announced a product about it, but I don't know any more than that. 2. ApJServDefaultPort 8007, does ApJServ have to be started even in stand alone mode? (I read that it is always required, and 8080 http port is optional. I do have a .jsp file, so I guess it is essential to have ApJServ running) AJP12 is the default manner to shutdown Tomcat. It runs on port 8007 and is only really necessary if you want to cleanly shutdown Tomcat. If you are comfortable using Unix's kill or NT's Task Manager to end processes, you don't really need it. 3. I am running this on UNIX box (Solaris 2.7), and does environment variables get passed to JVM when I start the tomcat server with startup.sh command? No. Java doesn't provide any mechanism to read environment variables from within a program and the startup scripts don't support this. One thing you could do is to iterate through the list of environment variables and create -Dxxx=yyy statements as part of the TOMCAT_OPTS. You would probably need to be careful, though, since this could very easily get very long and contain things you might not want Tomcat to know about. I know some of the questions sound pretty stupid, but I'd like to hear some answers from you. Thanks in advance. Yung
RE: Reverse DNS lookup
The InetAddress...getHostName() call will use the DNS databases. For most computers, however, this won't return anything useful. Randy -Original Message- From: David Wall [mailto:[EMAIL PROTECTED]] Sent: Friday, July 06, 2001 12:02 AM To: [EMAIL PROTECTED] Subject: Re: Reverse DNS lookup InetAddress.getByName(ip address).getHostName() will do what you want, if the info is available. Where would the info have to be available? Is there anything comparable to a dig -x command under Unix? For most IP addresses, there will not be anything configured on my computer, but I know that ARPA reverse lookups are possible. The method you show above still returns the IP address on my system, yet a dig -x will show the host name resolved. David
Re: List traffic et al
At 11:11 AM 06/07/01, you wrote: Hi, I've been on the list about eight months and I'm not sure I agree that splitting it will alleviate the volume problem. I'm rather afraid that I would end up subscribed to 2 or 3 high volume lists rather than one. I imagine that we would see a lot of multiple posts across the lists. Previous suggestions for how the list could be split seem to me to fall into three categories 1) By platform 2) By competence (i.e. newbie list, advanced user list) 3) By category of problem snip / I fully agree - the only way I could see to divide this list that makes any sense would be installation/post-installation - though, again, where would tomcat as service type posts go? It is a very high volume list, but with a threaded mail reader that can be dealt with - most (gui-based) readers allow one to order by subject, and hence delete by subject... The information I've learnt here has been invaluable, and certainly I find replying to the odd newbie post makes up for the guilty feeling I get for not contributing more actively to the project ;) Jim -- * Jim Cheesman * Trabajo: [EMAIL PROTECTED] - (34)(91) 724 9200 x 2360 Always be on the lookout for conspicuousness.
RE: creating a instance of a servlet: takes too long!!
why is that my servlet when the first time is invoked, it takes about 30 seconds or more to start when the servlets that came in tomcat are instantaneous? After the servlet container instantiated and initialized my servlet, all the following requests are very fast. Is there any advice for what we should do and don't do in init() method? Well, one option for a solution is set your servlet to load on startup and have all your initialization done at startup so that these elements are already initialized before the first request even comes. How can I benchmark the time of instantiation of my servlet and the time of my init method? I would just put in some logging code and find out where exactly the time is being taken up in your servlet(if indeed this is where it is actually munching clock cycles). --- Michael Wentzel Software Developer Software As We Think - http://www.aswethink.com
RE: creating a instance of a servlet: takes too long!!
Really it depends upon what you are doing in your init method. I have several servlets that load almost instantly, but don't do anything in their constructor or init methods. The only thing that you should do in your init method is to call super.init at the beginning. If you want to move the time it takes to initialize, you could use the web.xml's load-on-startup tag (see the spec for more details) to load the servlet at Tomcat startup. You servlet should stay in memory until its shutdown - Tomcat keeps a reference to the servlet, thus preventing it from being garbage collected. The only reason, I believe, that a servlet is unloaded during the middle of Tomcat execution is a newer version is detected on disk. Randy -Original Message- From: pedro salazar [mailto:[EMAIL PROTECTED]] Sent: Friday, July 06, 2001 5:02 AM To: [EMAIL PROTECTED] Subject: creating a instance of a servlet: takes too long!! Greetings, why is that my servlet when the first time is invoked, it takes about 30 seconds or more to start when the servlets that came in tomcat are instantaneous? After the servlet container instantiated and initialized my servlet, all the following requests are very fast. Is there any advice for what we should do and don't do in init() method? I just initialize some properties and a connection pool Well is it possible that my servlet container at any time my may shutdown my servlet to release memory, and another time it will be requested to start again and take another time too long to start, correct? How can I benchmark the time of instantiation of my servlet and the time of my init method? System configuration: -Tomcat 3.2.1 -JDK 1.3 -Linux RedHat 6.2 [kernel 2.2.18] -PII400Mhz 256Mbytes thanks. -- psalazar/
RE: JDBC Realm Questions Tomcat 3.2.2
Now, when somebody wants to access myServlet resource, he/she must have the role of an Administrator or Operator. I think this should be checked into the database. The problem is that, when I've tried to access myServlet for the first time, the following message was generated in the tomcat console: 2001-07-05 04:11:49 - ContextManager: JDBCRealm: JDBCRealm.authenticate: SELECT PASSWORD FROM MYUSERTABLE WHERE NAME = ? 2001-07-05 04:11:50 - ContextManager: JDBCRealm: Authentication unsuccessful for user null In the same time, the login window has appeard on Netscape browser, but after I'd entered a valid user name and password (from myUserTable) the message was the same: 2001-07-05 04:14:19 - ContextManager: JDBCRealm: Authentication unsuccessful for user null It seems for me that the user name is null every time, no matter if I enter a valid (user, passwd) or not. Is that a Tomcat bug, or I've missed something? Check your database schema and make sure it is correct. If it is all I can suggest is add some debugging code to JDBCRealm, recompile and throw it in TOMCAT_HOME/classes/, then restart and see what the actual value of username is when authenticate(String, String) is called. --- Michael Wentzel Software Developer Software As We Think - http://www.aswethink.com
tomcat-documentroot
Title: tomcat-documentroot Hi This is a peculier situation where in, i need to place my files(jsp) outside tomcat's default root (in a different machine). Everything works fine when the files(jsp) are in tomcat default root, that is, the servlet classes get loaded automatically as i specify, and the required output is obtained. But, when files(jsp's) are placed outside the default root, the methods of default load classes are not accesible. What can be done for this? Thanx Lax
Re[2]: Reverse DNS lookup
Friday, July 06, 2001, 7:02:45 AM, [EMAIL PROTECTED] wrote: RL The InetAddress...getHostName() call will use the DNS databases. RL For most computers, however, this won't return anything useful. That is not true. Most of US IPs have PTR records. That includes your own IP, that you had when sending your msg. By far, most servers have rDNS, most dynamic IPs do, most static IPs for cable/DSL do, and even most routers do. Asia (particularly Taiwan, China and Korea) is probably the worst, as far as being able to to rDNS. But even they might be a little over 50%, especially Japan. RL Randy -Original Message- From: David Wall [mailto:[EMAIL PROTECTED]] Sent: Friday, July 06, 2001 12:02 AM To: [EMAIL PROTECTED] Subject: Re: Reverse DNS lookup InetAddress.getByName(ip address).getHostName() will do what you want, if the info is available. Where would the info have to be available? Is there anything comparable to a dig -x command under Unix? For most IP addresses, there will not be anything configured on my computer, but I know that ARPA reverse lookups are possible. The method you show above still returns the IP address on my system, yet a dig -x will show the host name resolved. David
Re: creating a instance of a servlet: takes too long!!
Friday, July 06, 2001, 5:01:37 AM, [EMAIL PROTECTED] wrote: ps Greetings, ps why is that my servlet when the first time is invoked, it takes about 30 ps seconds or more to start when the servlets that came in tomcat are ps instantaneous? After the servlet container instantiated and initialized my ps servlet, all the following requests are very fast. Is there any advice for ps what we should do and don't do in init() method? I just initialize some ps properties and a connection pool ps Well is it possible that my servlet container at any time my may shutdown my ps servlet to release memory, and another time it will be requested to start ps again and take another time too long to start, correct? ps How can I benchmark the time of instantiation of my servlet and the time of ps my init method? ps System configuration: ps -Tomcat 3.2.1 ps -JDK 1.3 ps -Linux RedHat 6.2 [kernel 2.2.18] ps -PII400Mhz 256Mbytes ps thanks. ps -- ps psalazar/
Re: creating a instance of a servlet: takes too long!!
If your servlet has changed and needs to be recompiled, then using jikes instead of javac will save a lot of time. Friday, July 06, 2001, 5:01:37 AM, [EMAIL PROTECTED] wrote: ps Greetings, ps why is that my servlet when the first time is invoked, it takes about 30 ps seconds or more to start when the servlets that came in tomcat are ps instantaneous? After the servlet container instantiated and initialized my ps servlet, all the following requests are very fast. Is there any advice for ps what we should do and don't do in init() method? I just initialize some ps properties and a connection pool ps Well is it possible that my servlet container at any time my may shutdown my ps servlet to release memory, and another time it will be requested to start ps again and take another time too long to start, correct? ps How can I benchmark the time of instantiation of my servlet and the time of ps my init method? ps System configuration: ps -Tomcat 3.2.1 ps -JDK 1.3 ps -Linux RedHat 6.2 [kernel 2.2.18] ps -PII400Mhz 256Mbytes ps thanks. ps -- ps psalazar/
RE: creating a instance of a servlet: takes too long!!
The connection pool could cause your problem. If it initiates many database connections, it is normal even if your db server was on the same machine than your app server, for it to take a few seconds per connection. Fred -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Friday, July 06, 2001 9:18 AM To: [EMAIL PROTECTED] Subject: Re: creating a instance of a servlet: takes too long!! If your servlet has changed and needs to be recompiled, then using jikes instead of javac will save a lot of time. Friday, July 06, 2001, 5:01:37 AM, [EMAIL PROTECTED] wrote: ps Greetings, ps why is that my servlet when the first time is invoked, it takes about 30 ps seconds or more to start when the servlets that came in tomcat are ps instantaneous? After the servlet container instantiated and initialized my ps servlet, all the following requests are very fast. Is there any advice for ps what we should do and don't do in init() method? I just initialize some ps properties and a connection pool ps Well is it possible that my servlet container at any time my may shutdown my ps servlet to release memory, and another time it will be requested to start ps again and take another time too long to start, correct? ps How can I benchmark the time of instantiation of my servlet and the time of ps my init method? ps System configuration: ps -Tomcat 3.2.1 ps -JDK 1.3 ps -Linux RedHat 6.2 [kernel 2.2.18] ps -PII400Mhz 256Mbytes ps thanks. ps -- ps psalazar/
Re: creating a instance of a servlet: takes too long!!
pedro salazar wrote: Greetings, why is that my servlet when the first time is invoked, it takes about 30 seconds or more to start when the servlets that came in tomcat are instantaneous? After the servlet container instantiated and initialized my servlet, all the following requests are very fast. Is there any advice for what we should do and don't do in init() method? I just initialize some properties and a connection pool Well is it possible that my servlet container at any time my may shutdown my servlet to release memory, and another time it will be requested to start again and take another time too long to start, correct? How can I benchmark the time of instantiation of my servlet and the time of my init method? System configuration: -Tomcat 3.2.1 -JDK 1.3 -Linux RedHat 6.2 [kernel 2.2.18] -PII400Mhz 256Mbytes thanks. -- psalazar/ Hi :-) one of the ways is like the following: in WEB-INF/web.xml, add the following into the servlet-declaration of MyServlet: ... load-on-startup1/load-on-startup ... now MyServlet will be loaded/initialized when TC startup. Bo June 06, 2001
Get Me Out Of This
Title: Get Me Out Of This I have unsubscribed 3 times and still getting indicidual mails from [EMAIL PROTECTED] This is starting to be a nightmare. Get me out of it please. It is killing my mailbox. N.
Re: Multiple Hosting on IIS
One thing I have noticed is that you may not be able to isolate contexts to individual web sites on IIS when running multiple web sites on one IIS server with the web sites all configured to use tomcat. ie. www.myhypotheticaldomain.com/contextname/servletname and www.myotherhypotheticaldomain.com/contextname/servletname : will both execute, but this may not be what I want. Now how can I isolate context 'contextname' so it may only be accessible from www.myhypotheticaldomain.com and not other sites running on the same IIS server with tomcats configured. Allan. --- Minglong Wu [EMAIL PROTECTED] wrote: Hi, Randy, That did the trick. Thanks. -m - Original Message - From: Randy Layman [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, July 02, 2001 10:10 AM Subject: RE: Multiple Hosting on IIS You must restart IIS the process, which means either a machine reboot, or stopping all of IIS's processes in the Control Panel (FTP, World Wide Web Publishing, IIS Admin, etc) and verifying that the inetinfo.exe process stops. If that's not it, look in your isapi and tomcat log files, they should be able to shed some light on where the disconnect is happening. Randy -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Monday, July 02, 2001 1:22 PM To: [EMAIL PROTECTED] Subject: Re: Multiple Hosting on IIS Hi, Randy, I add the following line into uriworkermap.properties: # Mount the admin context to the ajp12 worker /admin/*=ajp12 But I still have to specify http://localhost:8080/admin/index.html to make it work? any idea about other file I need to change? Thanks. Minglong - Original Message - From: Randy Layman [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, July 02, 2001 9:19 AM Subject: RE: Multiple Hosting on IIS Because the default uriworkermap.properties file doesn't include mappings for the other URLs. Randy -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Monday, July 02, 2001 12:42 PM To: [EMAIL PROTECTED] Subject: Re: Multiple Hosting on IIS Have you noticed that after plug in tomcat server into IIS http://localhost/examples/jsp/index.html work but http://localhost/admin/index.html and http://localhost/test/index.html not work? Why is that? Thanks. - Original Message - From: nilesh To: [EMAIL PROTECTED] Sent: Sunday, July 01, 2001 3:04 AM Subject: Multiple Hosting on IIS Dear Sir, We are one of leading ISP companies, I am trying to install Jakarta-Tomcat 3.2.1 on of our Windows 2000 Advance Server with IIS. I followed jakarta-tomcat3.2.1\doc\tomcat-iis-howto.html , everything is working perfectly except for multiple hosting. It works only with default web but not with other web sites that I have created using IIS Manager that I have been registered with NIC. Please help, How can I configure Tomcat to work with multiple hosting ? With Regards, Nilesh Shrestha Manager, WorldLink Technologies Internet Building Dharmapath P.0. Box: 8207 Kathmandu, Nepal. Tel: +977 1 231 129 Fax: +977 1 526 318 Email: [EMAIL PROTECTED] [EMAIL PROTECTED] __ Do You Yahoo!? Get personalized email addresses from Yahoo! Mail http://personal.mail.yahoo.com/
Re: creating a instance of a servlet: takes too long!!
There's another reason for this and it has to do with the java.security.SecureRandom class. From what I can tell, tomcat uses this class to generate a seed value for the session ID. The first request for a SecureRandom value (eg. new SecureRandom().nextLong()) can take many, many seconds to complete. After the first usage however, it returns immediately. I'm not sure what goes on when SecureRandom initializes but that seems to be where the slow down occurs. As a work around, you could create a low priority thread that instantiates a SecureRandom calls nextLong() then exits, and have this thread get launched by the init() method of a servlet that gets preloaded. This solution worked for me. Regards, Pete. Thus spake pedro salazar [EMAIL PROTECTED] on Fri, 6 Jul 2001 10:01:37 +0100: PS Greetings, PS PS why is that my servlet when the first time is invoked, it takes about 30 PS seconds or more to start when the servlets that came in tomcat are PS instantaneous? After the servlet container instantiated and initialized my PS servlet, all the following requests are very fast. Is there any advice for PS what we should do and don't do in init() method? I just initialize some PS properties and a connection pool PS Well is it possible that my servlet container at any time my may shutdown my PS servlet to release memory, and another time it will be requested to start PS again and take another time too long to start, correct? PS PS How can I benchmark the time of instantiation of my servlet and the time of PS my init method? PS PS System configuration: PS -Tomcat 3.2.1 PS -JDK 1.3 PS -Linux RedHat 6.2 [kernel 2.2.18] PS -PII400Mhz 256Mbytes PS PS thanks. PS -- PS psalazar/ PS PS
Re: creating a instance of a servlet: takes too long!!
Bo Xu wrote: pedro salazar wrote: Greetings, why is that my servlet when the first time is invoked, it takes about 30 seconds or more to start when the servlets that came in tomcat are instantaneous? After the servlet container instantiated and initialized my servlet, all the following requests are very fast. Is there any advice for what we should do and don't do in init() method? I just initialize some properties and a connection pool Well is it possible that my servlet container at any time my may shutdown my servlet to release memory, and another time it will be requested to start again and take another time too long to start, correct? How can I benchmark the time of instantiation of my servlet and the time of my init method? System configuration: -Tomcat 3.2.1 -JDK 1.3 -Linux RedHat 6.2 [kernel 2.2.18] -PII400Mhz 256Mbytes thanks. -- psalazar/ Hi :-) one of the ways is like the following: in WEB-INF/web.xml, add the following into the servlet-declaration of MyServlet: ... load-on-startup1/load-on-startup ... now MyServlet will be loaded/initialized when TC startup. Bo June 06, 2001 Hi :-) I forgot the following: with TC4.0-b5, when load-on-startup1/load-on-startup, I remember: - MyServlet is loaded, i.e.: One Class object of MyServlet is made - One instance of MyServlet is made, this instance is for that sevlet-declaration which you set load-on-startup1/load-on-startup for - init(...) method of this instance is invoked, then, for example, your DBconnectionPool is initialized But: you must use That servlet-name/servlet-mapping to invoke MyServlet, otherwise, another instance of MyServlet will be made, and its init(...) will Still be invoked, i.e.: the first time will Still be slow. and it is possible that container will invoke int(...)/destroy() more than one time. Bo July 06, 2001
RE: creating a instance of a servlet: takes too long!!
Note that a good deal of this time might be spent in HttpServletRequest.getSession(): the 3.2.1 implementation is much slower than the 3.2.2 version. You might want to time your calls and, if that's where the slow-down is, upgrade to 3.2.2. -- Bill K. -Original Message- From: pedro salazar [mailto:[EMAIL PROTECTED]] Sent: Friday, July 06, 2001 2:02 AM To: [EMAIL PROTECTED] Subject: creating a instance of a servlet: takes too long!! Greetings, why is that my servlet when the first time is invoked, it takes about 30 seconds or more to start when the servlets that came in tomcat are instantaneous? After the servlet container instantiated and initialized my servlet, all the following requests are very fast. Is there any advice for what we should do and don't do in init() method? I just initialize some properties and a connection pool Well is it possible that my servlet container at any time my may shutdown my servlet to release memory, and another time it will be requested to start again and take another time too long to start, correct? How can I benchmark the time of instantiation of my servlet and the time of my init method? System configuration: -Tomcat 3.2.1 -JDK 1.3 -Linux RedHat 6.2 [kernel 2.2.18] -PII400Mhz 256Mbytes thanks. -- psalazar/
Re: Trouble trying to port from JServ
Hi Barry, If you want all your servlets served through the my.domain.com/int, On the server.xml change RequestInterceptor className=org.apache.tomcat.request.InvokerInterceptor debug=0 prefix=/servlet/ / RequestInterceptor className=org.apache.tomcat.request.InvokerInterceptor debug=0 prefix=/int/ / then I guess on your web.xml has to have servlet servlet-name LogIn /servlet-name servlet-class ca.on.cad.utilities.MyServlet /servlet-class /servlet that should do the trick. downside of this is all your contex are prefix with /int/. I guess this way http://your.domain./int/MyServlet should work. anil Barry wrote: Hi all, I hope someone can help me with a problem. I'm sorry if this is a stupid newbie question but I've been working on this for days with no success. I have been through all the documentation too. I am trying to port my web application from JServ to Tomcat/mod_jk and am having trouble configuring Tomcat to use the same URL for servlets that I used with JServ. Unfortunately changing the URL of my servlets is not an option because hundreds of external sites already link to these URLs. The URL I am currently using for all servlets is http://www.mydomain.com/int/MyServlet. Unfortunately under Tomcat my servlets only work at the URL http://www.mydomain.com/int/servlet/MyServlet. I think I've configured it correctly but it still won't work. I just see the following from stdout: 2001-07-06 01:49:23 - Ctx( /int ): 404 R( /int + /MyServlet + null) null Below are my conf files. I've tried several variations on them with no success. I have the following settings in server.xml: Context path=/int docBase=/opt/dev/website/int crossContext=false debug=0 reloadable=true /Context /opt/dev/website/int is the directory that contains all my servlet classes. It also contains WEB-INF/classes which is actually a symbolic link back to /opt/dev/website/int. I am not using JSP. web.xml contains the following: servlet-mapping servlet-name invoker /servlet-name url-pattern /* /url-pattern /servlet-mapping servlet-mapping servlet-name invoker /servlet-name url-pattern /servlet/* /url-pattern /servlet-mapping ... I thought this should cause all files in /int to be handled by the invoker. Finally mod_jk.conf contains the following: Alias /int /opt/dev/website/int Directory /opt/dev/website/int Options Indexes FollowSymLinks /Directory JkMount /int/* ajp12 Location /int/WEB-INF/ AllowOverride None deny from all /Location Location /int/META-INF/ AllowOverride None deny from all /Location Under this configuration the URL http://www.mydomain.com/int/MyServlet always returns 404 - Page not found. But http://www.mydomain.com/int/servlet/MyServlet returns the correct servlet response. Sorry dump all these configuration files on you but I wanted to provide as much info as possible. Can someone kindly explain how I can continue to use the same url (http://www.mydomain.com/int/MyServlet) with Tomcat? What am I doing wrong? I am using Tomcat 3.2.2 and Apache 1.3.20. Any and all replies are much appreciated. Thank you, Barry [EMAIL PROTECTED]
RE: Multiple Hosting on IIS
Title: RE: Multiple Hosting on IIS you could map the contextname to something else to return an error for that context(in server.xml): Host name=www.myhypotheticaldomain.com Context path=/contextname docBase=webapps/contextname/ Context path=/othercontextname docBase=webapps/errorcontext/ /Host Host name=www.myotherhypotheticaldomain.com Context path=/contextname docBase=webapps/errorcontext/ Context path=/othercontextname docBase=webapps/othercontext/ /Host where errorcontext could just conain a servlet(or jsp) that generates a 404 for each request that it gets, therefore giving the impression that it doesn't exist. While its not ideal(more maintenance for each site or context added), it is an option. I have not tried this, but I believe that the Context entries override the directories under webapps that are added automatically. Another thing is to move the docbase to not reside under webapps, and therefore it will *not* be mapped automatically, so only your Context entries will be available for each virtual host. Charlie -Original Message- From: Allan Kamau [mailto:[EMAIL PROTECTED]] Sent: Friday, July 06, 2001 9:28 AM To: [EMAIL PROTECTED] Subject: Re: Multiple Hosting on IIS One thing I have noticed is that you may not be able to isolate contexts to individual web sites on IIS when running multiple web sites on one IIS server with the web sites all configured to use tomcat. ie. www.myhypotheticaldomain.com/contextname/servletname and www.myotherhypotheticaldomain.com/contextname/servletname : will both execute, but this may not be what I want. Now how can I isolate context 'contextname' so it may only be accessible from www.myhypotheticaldomain.com and not other sites running on the same IIS server with tomcats configured. Allan. --- Minglong Wu [EMAIL PROTECTED] wrote: Hi, Randy, That did the trick. Thanks. -m - Original Message - From: Randy Layman [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, July 02, 2001 10:10 AM Subject: RE: Multiple Hosting on IIS You must restart IIS the process, which means either a machine reboot, or stopping all of IIS's processes in the Control Panel (FTP, World Wide Web Publishing, IIS Admin, etc) and verifying that the inetinfo.exe process stops. If that's not it, look in your isapi and tomcat log files, they should be able to shed some light on where the disconnect is happening. Randy -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Monday, July 02, 2001 1:22 PM To: [EMAIL PROTECTED] Subject: Re: Multiple Hosting on IIS Hi, Randy, I add the following line into uriworkermap.properties: # Mount the admin context to the ajp12 worker /admin/*=ajp12 But I still have to specify http://localhost:8080/admin/index.html to make it work? any idea about other file I need to change? Thanks. Minglong - Original Message - From: Randy Layman [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, July 02, 2001 9:19 AM Subject: RE: Multiple Hosting on IIS Because the default uriworkermap.properties file doesn't include mappings for the other URLs. Randy -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Monday, July 02, 2001 12:42 PM To: [EMAIL PROTECTED] Subject: Re: Multiple Hosting on IIS Have you noticed that after plug in tomcat server into IIS http://localhost/examples/jsp/index.html work but http://localhost/admin/index.html and http://localhost/test/index.html not work? Why is that? Thanks. - Original Message - From: nilesh To: [EMAIL PROTECTED] Sent: Sunday, July 01, 2001 3:04 AM Subject: Multiple Hosting on IIS Dear Sir, We are one of leading ISP companies, I am trying to install Jakarta-Tomcat 3.2.1 on of our Windows 2000 Advance Server with IIS. I followed jakarta-tomcat3.2.1\doc\tomcat-iis-howto.html , everything is working perfectly except for multiple hosting. It works only with default web but not with other web sites that I have created using IIS Manager that I have been registered with NIC. Please help, How can I configure Tomcat to work with multiple hosting ? With Regards, Nilesh Shrestha Manager, WorldLink Technologies Internet Building Dharmapath P.0. Box: 8207 Kathmandu, Nepal. Tel: +977 1 231 129 Fax: +977 1 526 318 Email: [EMAIL PROTECTED] [EMAIL PROTECTED] __ Do You Yahoo!? Get personalized email addresses from Yahoo! Mail http://personal.mail.yahoo.com/
Re[2]: creating a instance of a servlet: takes too long!!
Friday, July 06, 2001, 10:16:05 AM, [EMAIL PROTECTED] wrote: PD There's another reason for this and it has to do with the java.security.SecureRandom class. From what I can tell, tomcat uses this class to generate a seed value for the PD session ID. The first request for a SecureRandom value (eg. new SecureRandom().nextLong()) can take many, many seconds to complete. After the PD first usage however, it returns immediately. I'm not sure what goes on when PD SecureRandom initializes but that seems to be where the slow down occurs. Yes, good point. I've just been looking at that, too. It reminds me of the time required to create a secure socket factory when using JSSE. After that time is initially spent, any other new sockets are created quickly. For development, I change to using randomClass=java.util.Random ..and have noticed that the attribute randomFile=/dev/urandom is irrelevant on win '98 (I assume this file contains a seed for the random generation?) Also, there seems to be a lot elsewise going on under the hood. When accessing a jsp, Tomcat seems to me (at this point) to be compiling servlets in the webapp. Can anybody elaborate on that? PD As a work around, you could create a low priority thread that instantiates a PD SecureRandom calls nextLong() then exits, and have this thread get launched by PD the init() method of a servlet that gets preloaded. This solution worked for me. PD Regards, PD Pete. PD Thus spake pedro salazar [EMAIL PROTECTED] on Fri, 6 Jul 2001 10:01:37 +0100: PS Greetings, PS PS why is that my servlet when the first time is invoked, it takes about 30 PS seconds or more to start when the servlets that came in tomcat are PS instantaneous? After the servlet container instantiated and initialized my PS servlet, all the following requests are very fast. Is there any advice for PS what we should do and don't do in init() method? I just initialize some PS properties and a connection pool PS Well is it possible that my servlet container at any time my may shutdown my PS servlet to release memory, and another time it will be requested to start PS again and take another time too long to start, correct? PS PS How can I benchmark the time of instantiation of my servlet and the time of PS my init method? PS PS System configuration: PS -Tomcat 3.2.1 PS -JDK 1.3 PS -Linux RedHat 6.2 [kernel 2.2.18] PS -PII400Mhz 256Mbytes PS PS thanks. PS -- PS psalazar/ PS PS
Re: can't find tomcat.jar ? [solved]
For the archives: this problem only occurs when using Jikes. By setting JIKES_PATH to include ...\lib\tomcat.jar the problem is solved. Friday, July 06, 2001, 12:05:30 AM, [EMAIL PROTECTED] wrote: wmc A fresh install of 3.3-m4 (with jdk1.4 on '98), and when I try to access a wmc jsp I get an error on finding C:\tomcat\lib\tomcat.jar. And wmc C:\tomcat\lib\tomcat.jar does exist. Thanks for any help. wmc org.apache.jasper.JasperException: Unable to compile wmc Found 2 system errors: wmc *** Error: Could not find package named: wmc C:\tomcat\lib\tomcat.jar(java/util), wmc C:\tomcat\work\DEFAULT\security/java/util, wmc C:\tomcat\lib\common\jasper34_runtime.jar(java/util), wmc C:\tomcat\lib\common\jasper-runtime.jar(java/util), wmc C:\tomcat\lib\common\core_util.jar(java/util), wmc C:\tomcat\lib\common\connector_util.jar(java/util), wmc C:\tomcat\lib\common\servlet.jar(java/util) or wmc C:\tomcat\lib\common\tomcat_core.jar(java/util) wmc *** Error: Could not find package named: wmc C:\tomcat\lib\tomcat.jar(java/lang), wmc C:\tomcat\work\DEFAULT\security/java/lang, wmc C:\tomcat\lib\common\jasper34_runtime.jar(java/lang), wmc C:\tomcat\lib\common\jasper-runtime.jar(java/lang), wmc C:\tomcat\lib\common\core_util.jar(java/lang), wmc C:\tomcat\lib\common\connector_util.jar(java/lang), wmc C:\tomcat\lib\common\servlet.jar(java/lang) or wmc C:\tomcat\lib\common\tomcat_core.jar(java/lang)
Re: Spanish characters
Hi! I have the same behave when the server (in with tomcat runs) is not configured properly with the spanish locale. I.E. if using Solaris, the shell running tomcat has to be configured whith a locale like 'es_ES.ISO8859-15'. Some other times I had problems with unsupported characters in Oracle but they were related to incorrect characterset in Oracle itself. For Tomcat every problem have gone setting the correct environment. If you have doubts about witch locale Tomcat is using, write a simple JSP to print it it out (Locale.getDefault()). HTH (if not, let me know). Regards Bob. Hi!!! I use Tomcat 3.2.2 and many aplications get data from a database. The problem is that the text in database is in spanish, so, this data has some characters in spanish too (ñ,á, ...). In the JSP page populate with data from that database, spanish chars are replace whit ?. Does any body know how to fix the problem or use correct charset code? Mario García Burgos --
Jakarta NT service
Hi, I recently installed tomcat3.2 on a windows NT machine. But the NT service always got stopped everytime I logged in and then logged out. Could anyone help? Regards Michael
Re: Jakarta NT service
See http://jakarta.apache.org/tomcat/tomcat-3.3-doc/NT-Service-howto.html. Having said that JavaService, from http://www.alexandriasc.com/software/JavaService/index.html, is really easy to use. Cheers, Matt. - Original Message - From: Wu, Michael [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, July 06, 2001 8:48 AM Subject: Jakarta NT service Hi, I recently installed tomcat3.2 on a windows NT machine. But the NT service always got stopped everytime I logged in and then logged out. Could anyone help? Regards Michael
Re: Re[2]: Reverse DNS lookup
RL The InetAddress...getHostName() call will use the DNS databases. RL For most computers, however, this won't return anything useful. That is not true. Most of US IPs have PTR records. That includes your own IP, that you had when sending your msg. By far, most servers have rDNS, most dynamic IPs do, most static IPs for cable/DSL do, and even most routers do. The IP address I was testing is 216.122.43.90 and I am able to do a reverse lookup using dig from the webserver. It just seems to me that the InetAddress class is perhaps not using whatever it needs to do to use DNS. Does anybody know what the implementation of InetAddress is actually doing under the hood? David
Help: no luck using JavaService to make Tomcat A Service
Hi; Several people recomended JavaService to make Tomcat a service. I tried it, it was easy, and it didn't work :). I'm on windows 2000, I'm using I'm using Tomcat 3.2.1 I'm using the JDK 1.3.1 My TOMCAT_HOME = C:\Tomcat My JAVA_HOME = C:\JDK I unzipped all of the JavaService binfiles into C:\Tomcat\bin I then ran the following at a command prompt in C:\Tomcat\bin installTomcat32.bat C:\JDK C:\Tomcat C:\JDK\jre\bin\hotspot After uninstalling I tried it with substituting "hotspot", for "classic", and then "server" A windows 2000 message box tells me each time that the service did not start and did not return an error message. Help? Steve Russell Web Developer III ValueOptions - Lifescape 703-205-6589 [EMAIL PROTECTED] ** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the sender by email, delete and destroy this message and its attachments. **
Re: List traffic et al
On Fri, 6 Jul 2001, Dmitri Colebatch wrote: I think the big problem with splitting the list is that everyone is going to be interested in their own little niche. I for instance learn nothing by answering many questions that I answer, but I do learn things from reading other answers. If the list was split, I would (potentially) have the option to only see the messages that I would learn from. This disadvantages other people on the list. And this is going to occur at all levels. Even relative newbies should be capable of answering some questions that they have just dealt with the day before. I can see what you're saying, but I see a couple of problems with this. First, it's like forcing people to do something that they would/could/should have the option of doing themselves anyway. You're making it sound like people should have to read everything so that they wouldn't miss anything where they might be able to help. Well, of course, if there was a split, people who wanted to do this could still do this. And you shouldn't force people to do this. More practically, I don't think it's the most effective way to achieve your goal (more participation from people who have the answers). With a single high volume list, I believe people will tend to skim/skip more things, and perhaps even drop off the list totally. With a lower volume list, they might very well participate in the way you're suggesting -- albeit only on a subset of posts. But greater participation on a subset of posts may work out better than less participation on all the posts. For example, I see myself skipping a ton of posts because I just don't have the time; if the volume were smaller, and the scope more relevant to my interests/expertise, I would definitely participate more. (Granted that coming up with a split that will facilitate this is not trivial. But it may be worth it.) Basically, you want to make it easy and worthwhile for the more experienced people to participate, and I think a split -- a good split -- will do this. If we want to reduce traffic surely a digest is the option. The JBoss list has a _lot_ more traffic than this one, and I am able to receive that in digest mode quite happily. As has been pointed out, there is already a digest option. And this must be a personal thing, because I would absolutely detest getting such a high volume list as a digest and couldn't imagine reading it that way. On Fri, 6 Jul 2001 15:45, Jeff Kilbride wrote: Even if the list is not split into these specific sub-topics, I would certainly like to see it split along Windows/Unix lines. I use Unix exclusively and I skip over 99% of the Windows questions, because I don't have any experience with Tomcat on that platform. I'm sure Windows users feel the same way about Unix related questions. [ ... ] Milt Epstein Research Programmer Software/Systems Development Group Computing and Communications Services Office (CCSO) University of Illinois at Urbana-Champaign (UIUC) [EMAIL PROTECTED]
RES: filtering IP's on Tomact
-BEGIN PGP SIGNED MESSAGE- I think its impossible, since tomcat isnt a firewall.or even a webserver. José Euclides Júnior __ E-mail: [EMAIL PROTECTED] [EMAIL PROTECTED] http://euclides.8m.com - -Mensagem original- De: Alberto Torna Jr. [SMTP:[EMAIL PROTECTED]] Enviada em: Quinta-feira, 5 de Julho de 2001 15:37 Para: [EMAIL PROTECTED] Assunto:Re: filtering IP's on Tomact What do you mean by filtering? From: Paulo Roque Reply-To: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: filtering IP's on Tomact Date: Thu, 05 Jul 2001 16:35:35 - Hi, Could anyone enlight me about if it is possible to filter a set of IP addresses on Tomcat 3.2.1 ? Thanks! Paulo Costa Portugal _ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com. _ Get your FREE download of MSN Explorer at http://explorer.msn.com -BEGIN PGP SIGNATURE- Version: PGP 6.5.1 iQCVAwUBO0YaD90YhuJ3BUxtAQFqCAP/aapSJC08QsF3kzsoPPIwx8jDiY8lYgiS TT7iacUAeWS3Nl1T+YCp4qHXG/p1QM6QCDFr/YzpImi4ZgwwqiD/YpEzcQZmO+o/ sOdFvsXcvOzVzCdRMr15qCweObQw5RtYwXWAbuRnsSA8+nGSUfdn/g/y3yiUUrd7 fmjcu/HbVRE= =65+i -END PGP SIGNATURE-
Re[4]: Reverse DNS lookup
Friday, July 06, 2001, 12:15:19 PM, [EMAIL PROTECTED] wrote: RL The InetAddress...getHostName() call will use the DNS DW databases. RL For most computers, however, this won't return anything useful. That is not true. Most of US IPs have PTR records. That includes your own IP, that you had when sending your msg. By far, most servers have DW rDNS, most dynamic IPs do, most static IPs for cable/DSL do, and even most DW routers do. DW The IP address I was testing is 216.122.43.90 and I am able to do a reverse DW lookup using dig from the webserver. It just seems to me that the DW InetAddress class is perhaps not using whatever it needs to do to use DNS. DW Does anybody know what the implementation of InetAddress is actually doing DW under the hood? Well, the InetAddress methods do work correctly, Dave. Here is a quick demo: import java.net.*; public class IPGet { public static void main(String[] args) { try { System.out.println(InetAddress.getByName(args[0]).getHostName()); } catch (Exception e) { System.out.println(e); } } } and the console: C:\testjikes -nowarn IPGet.java C:\testjava IPGet 216.122.43.90 r90-43-dsl.sea.lightrealm.net Now, for the kicker... On one run I got the same return as you did: the IP number instead of hostname - this happens when the lookup fails. Therefore, I would guess right now that here might be some problem in the nameservers at lightrealm. So, a partial dig shows: Dig [EMAIL PROTECTED] ... Authoritative Answer Recursive queries supported by this server Query for 90.43.122.216.in-addr.arpa type=255 class=1 90.43.122.216.in-addr.arpa PTR (Pointer) r90-43-dsl.sea.lightrealm.net 43.122.216.in-addr.arpa NS (Nameserver) ns1.lightrealm.net and next: 07/06/01 12:50:19 ping ns1.lightrealm.net Ping failed, no such host That looks like a slam dunk. Lightrealm's problem, when they periodically can't resolve within their domain. Not a Java problem. HTH. DW David
Re: RES: filtering IP's on Tomact
Friday, July 06, 2001, 1:08:12 PM, [EMAIL PROTECTED] wrote: JEdSJDO -BEGIN PGP SIGNED MESSAGE- JEdSJDO I think its impossible, since tomcat isnt a firewall.or even a webserver. It seems the most you can do is accept or deny from within the servlet, with getRemoteAddr(). JEdSJDO José Euclides Júnior JEdSJDO __ JEdSJDO E-mail: [EMAIL PROTECTED] JEdSJDO [EMAIL PROTECTED] JEdSJDO http://euclides.8m.com JEdSJDO - -Mensagem original- JEdSJDO De: Alberto Torna Jr. [SMTP:[EMAIL PROTECTED]] JEdSJDO Enviada em: Quinta-feira, 5 de Julho de 2001 15:37 JEdSJDO Para: [EMAIL PROTECTED] JEdSJDO Assunto:Re: filtering IP's on Tomact JEdSJDO What do you mean by filtering? From: Paulo Roque Reply-To: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: filtering IP's on Tomact Date: Thu, 05 Jul 2001 16:35:35 - Hi, Could anyone enlight me about if it is possible to filter a set of IP addresses on Tomcat 3.2.1 ? Thanks! Paulo Costa Portugal
Tomcat As A Service: Still Problems
I'm on windows 2000, I'm using I'm using Tomcat 3.2.1 I'm using the JDK 1.3.1 My TOMCAT_HOME = C:\Tomcat My JAVA_HOME = C:\JDK I checked all of my paths...no spaces in any of them :) I tried JavaService at: http://www.alexandriasc.com/software/JavaService/index.html It didn't work. Windows 2000 said it did not start and did not report ane rror. The event viewer said it had trouble locating the jvm. I uninstalled. I then tried the instructions at: http://jakarta.apache.org/tomcat/tomcat-3.3-doc/NT-Service-howto.html Same error message.but no log messages. Any ideas? Steve Steve Russell Web Developer III ValueOptions - Lifescape 703-205-6589 [EMAIL PROTECTED] ** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the sender by email, delete and destroy this message and its attachments. **
Re: Jakarta NT service
You can use jdk 1.3.1 to overcome this problem. I am running TC as a service on NT4 no problem. Note you have to add -Xrs on the command line (in the wrapper.properties file) to overcome the stop on logout problem. See http://jakarta.apache.org/tomcat/tomcat-3.3-doc/NT-Service-howto.html. Having said that JavaService, from http://www.alexandriasc.com/software/JavaService/index.html, is really easy to use. Cheers, Matt. - Original Message - From: Wu, Michael [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, July 06, 2001 8:48 AM Subject: Jakarta NT service Hi, I recently installed tomcat3.2 on a windows NT machine. But the NT service always got stopped everytime I logged in and then logged out. Could anyone help? Regards Michael
RES: RES: filtering IP's on Tomact
-BEGIN PGP SIGNED MESSAGE- Ok, but you have to write your own code. José Euclides Júnior __ E-mail: [EMAIL PROTECTED] [EMAIL PROTECTED] http://euclides.8m.com - -Mensagem original- De: [EMAIL PROTECTED] [SMTP:[EMAIL PROTECTED]] Enviada em: Sexta-feira, 6 de Julho de 2001 14:32 Para: [EMAIL PROTECTED] Assunto:Re: RES: filtering IP's on Tomact Friday, July 06, 2001, 1:08:12 PM, [EMAIL PROTECTED] wrote: JEdSJDO -BEGIN PGP SIGNED MESSAGE- JEdSJDO I think its impossible, since tomcat isnt a firewall.or even a webserver. It seems the most you can do is accept or deny from within the servlet, with getRemoteAddr(). JEdSJDO José Euclides Júnior JEdSJDO __ JEdSJDO E-mail: [EMAIL PROTECTED] JEdSJDO [EMAIL PROTECTED] JEdSJDO http://euclides.8m.com JEdSJDO - -Mensagem original- JEdSJDO De: Alberto Torna Jr. [SMTP:[EMAIL PROTECTED]] JEdSJDO Enviada em: Quinta-feira, 5 de Julho de 2001 15:37 JEdSJDO Para: [EMAIL PROTECTED] JEdSJDO Assunto:Re: filtering IP's on Tomact JEdSJDO What do you mean by filtering? From: Paulo Roque Reply-To: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: filtering IP's on Tomact Date: Thu, 05 Jul 2001 16:35:35 - Hi, Could anyone enlight me about if it is possible to filter a set of IP addresses on Tomcat 3.2.1 ? Thanks! Paulo Costa Portugal -BEGIN PGP SIGNATURE- Version: PGP 6.5.1 iQCVAwUBO0Yqtt0YhuJ3BUxtAQFlCAP+Ka/ekl4pwafsr0N5X1tcEnnCIjIG/IfP ZQU+8GBsgKw+0h+mI8n8hc5X2CwjKyBuz1FzR2al0Kxe54kkE0v/At3Yqj78brvO 90fTgSdLuC5fvhZRpSVywDWbM+9vani6eVkG/JZ9C7fj1rsN/geOuQ5O/uwhaLxC nDveHBd5LXo= =avfu -END PGP SIGNATURE-
Re: Making Tomcat 3.2 A Service On Win 2000 ( using jdk 1.3.0_02 )
Are you sure there are no problems with jdk1.3.1? The main problem I found with 1.3.0 was that it shut down when you logged off. I found the same problem in 1.3.1. The fix is to add -Xsa to the execution line that starts Java in Tomcat. As for making Tomcat a service, I found the jk_nt_service.exe (zipped up) in the jakarta downloads. I thought that was the standard way of making it into a service. Is this what is causing the shutdown problem? ShouldI be using a different method? Randy Layman wrote: 1. No quotes and no spaces in filenames allowed. Use one backslash (\) in your paths. The examples that come in the conf directory are correctly formatted, but probably for the wrong directories. 2. Sun fixed the problem for JDK 1.3.1. All 1.3.0 versions have problems. Also, all versions of the 1.2.1, 1.2.2, 1.1.8, and 1.1.7 line that I have worked with have been fine, although rumor has it that some versions of 1.2.0 had the same problem. Also, rumor has it that beta 1.4 works fine as a service (but has other issues). Randy -Original Message- From: Russell, Steve [mailto:[EMAIL PROTECTED]] Sent: Thursday, July 05, 2001 2:48 PM To: '[EMAIL PROTECTED]' Subject: Making Tomcat 3.2 A Service On Win 2000 ( using jdk 1.3.0_02 ) Hi; I found some instructions at jakarta.apache.org for making tomcat a service: http://jakarta.apache.org/tomcat/tomcat-3.3-doc/NT-Service-howto.html It didn't answer some questions I would like to know before I begin. 1. The instructions mention setting TOMCAT_HOME in wrapper.properties. Lets say this is c:\tomcat.do I put it inq uotes? Do I use the \ as a path seperator or a /? 2. The instructions mention that there is a bug in jdk1.3 that if you follow thei nstructions to make tomcat a service and you stop the service no clean up will happen. Is there anything bad about that? What will not happen? Does this bug also exist in jdk1.3.0_02 ? Thanks in advance Steve Russell Web Developer III ValueOptions - Lifescape 703-205-6589 [EMAIL PROTECTED] ** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the sender by email, delete and destroy this message and its attachments. **
Re: jk_nt_service is not shutting down
I'm getting the same error (2186). It started when I added the -Xsa parameters to the Java startup, which seems to be necessary to keep the service from shutting down on logout. The problem seems to be that the service takes, as you noted, about 20 seconds too long to shut down. I'm ignoring it for now but would also like a solution. Jochen Wiedmann wrote: Hi, I am using TC 3.2.2 on several machines, all configured to be running as an NT service with jk_nt_service. This works fine, with the exception of a single machine: If I try to stop the service there, I receive an error message 2168 from the service manager. Moreover, I can see that TomCat is running for about 15-20 seconds more, which can easily be verified by deleting the log files. (They cannot be deleted until TomCat is actually stopped.) Any ideas what might be the reason? Thanks, Jochen
Re: Problem with stopping Tomcat
I thought 3.2.2 could use AJP13 instead? Am I wrong on that? Randy Layman wrote: Tomcat uses AJP12 to shutdown. -Original Message- From: Richard Richter [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 03, 2001 1:15 PM To: [EMAIL PROTECTED] Subject: Problem with stopping Tomcat Hi all... When I tried to minimize my configuration I reach a state when tomcat.sh stop ends with this message. Only Classpath information was before it. Stop tomcat java.net.ConnectException: Connection refused at java.net.PlainSocketImpl.doConnect(Compiled Code) at java.net.PlainSocketImpl.connectToAddress(Compiled Code) at java.net.PlainSocketImpl.connect(Compiled Code) at java.net.Socket.init(Compiled Code) at java.net.Socket.init(Compiled Code) at org.apache.tomcat.task.StopTomcat.execute(Compiled Code) at org.apache.tomcat.startup.Tomcat.stopTomcat(Compiled Code) at org.apache.tomcat.startup.Tomcat.execute(Compiled Code) at org.apache.tomcat.startup.Tomcat.main(Compiled Code) I've got only one worker defined in server.xml on port 8444. What can I miss in my config-files? I really don't know when this started to occure, so I can't say which file is siner. But httpd.conf is not. I tried older version and it doesn't help me. I changed tomcat-configs without backin them up... so. :-))) What connection is tried when tomcat goes down? Thanks Virgo Richard Richter ([EMAIL PROTECTED]) Application Programmer, Business Global Systems a. s.
RE: Help on application scope
Dear all, I used a java.util.HashMap for session invalidation in my JSPs. It is declared as such in 2 jsps: jsp:useBean id=monitor class=java.util.HashMap scope=application / (GalleryViewBottom.jsp and Logout.jsp) Now the funny thing is when I issue a monitor.put(request.getRemoteAddr(), session); (GalleryViewBottom.jsp) And then try to access it from Logout.jsp the monitor has no such key value. Isn't application scope mean its accessable from ANY jsp page? I got the ideas for this code from Professional JSP (WROX, pg133 checklogin.jsp). Another way to do this, and better in my opinion, would be to write a GenericServlet which has a static HashMap member which gets initialized in init() method and has a static get and put method. Configure the servlet as a load-on-startup servlet and you're ready to go. Just import the class and do ClassWhatever.get|put(...); This will remove lines of code from the servlet generated from your jsp(autogenerated by the useBean tag). You could also include remove() and clear() methods. --- Michael Wentzel Software Developer Software As We Think - http://www.aswethink.com
RE: Making Tomcat 3.2 A Service On Win 2000 ( using jdk 1.3.0_02 )
-Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Friday, July 06, 2001 2:50 PM To: [EMAIL PROTECTED] Subject: Re: Making Tomcat 3.2 A Service On Win 2000 ( using jdk 1.3.0_02 ) Are you sure there are no problems with jdk1.3.1? The main problem I found with 1.3.0 was that it shut down when you logged off. I found the same problem in 1.3.1. The fix is to add -Xsa to the execution line that starts Java in Tomcat. Works for me without any command line fixes. I thought that the -X option was added for some of the betas of 1.3.1. Is it possible that you have an older version of 1.3.1? As for making Tomcat a service, I found the jk_nt_service.exe (zipped up) in the jakarta downloads. I thought that was the standard way of making it into a service. Is this what is causing the shutdown problem? ShouldI be using a different method? You are correct. The JavaService program does basically the same thing as jk_nt_service, but it traps the OS signals and doesn't relay them on to the JVM. Randy
RE: Problem changing default web.xml : conf/web.xml is not processed
You didn't mention which version of Tomcat you were running. The thing is, in some version, conf/web.xml became a SAMPLE, not a DEFAULT. You should not count on conf/web.xml to be used because that doesn't follow the J2EE standard. You MUST make a copy of the web.xml and put it into each webapp context's WEB-INF directory. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Friday, July 06, 2001 12:34 AM To: [EMAIL PROTECTED] Subject: Problem changing default web.xml : conf/web.xml is not processed Hi there, I have a problem changing the web.xml in the conf dir (conf/web.xml). I wanted to configure some central stuff there and wondered why it isn't working. Then I placed a wrong tag with no closing tag into the web.xml. The sax-parser must throw an exception with this file. But nothing happened. I tested the same wrong tag in an webapps web.xml file. There I got the exception. My conclusion is now, that the default web.xml is not proccessed! I wonder why, because the server.xml file is in the same directory. If server.xml is found by tomcat, why not the default web.xml. I can post a log-trace if you are intereseted, but I don't see any informative help in it. Be method opening the default web.xml does not log anything. Any comments, how I can make tomcat reading and processing the default web.xml are welcome. Kind regards Guido --- This message is intended for the adressee or its representative only. Any form of unauthorized use, publication, reproduction, copying or disclosure of the content of this e-mail is not permitted. If you are not the intended recipient of this e-mail message and its contents, please notify the sender immediately and delete this message and all its attachments subsequently.
RE: Problem with stopping Tomcat
-Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Friday, July 06, 2001 3:10 PM To: [EMAIL PROTECTED] Subject: Re: Problem with stopping Tomcat I thought 3.2.2 could use AJP13 instead? Am I wrong on that? My understanding is Tomcat 3.1-3 could only use AJP12 to shutdown, maybe you should post to the tomcat-dev list and let us know what you find out. Randy
RE: JDBC Realm Questions Tomcat 3.2.2
Tomcat's JDBC Realm won't work with an empty database password. I posted about this a week ago and asked if it was a bug and noone responded. If you proved the JDBCRealm a valid username with a blank (empty string) password, Tomcat will ignore BOTH Username and password. Here's my previous post: -Original Message- From: Jann VanOver Sent: Tuesday, June 26, 2001 12:27 PM To: [EMAIL PROTECTED] Subject: JDBCRealm doesn't allow a blank password -- is this a bug? I'm using Tomcat 3.2.2 I was just beginning to try out JDBCRealm and was continuing to get an error. The Tomcat.log said: 2001-06-26 11:27:05 - ContextManager: JDBCRealm: SQLException: java.sql.SQLException: Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection. Severity 14, State 1, Procedure 'null null', Line 0 Unable to connect, please check your server's version and availability. I WAS including the proper credentials in my web.xml, so I delved into the Tomcat source code to find what was going wrong. (this was my FIRST Tomcat delving experience!) In JDBCRealm, method checkConnection() I found this: if ((connectionName == null || connectionName.equals()) || (connectionPassword == null || connectionPassword.equals())) { dbConnection = DriverManager.getConnection(connectionURL); } else { dbConnection = DriverManager.getConnection(connectionURL, connectionName, connectionPassword); } I'm practicing on an internal dev server that is poorly protected and has no password for the username I was using, so my server.xml had: connectionName=aDevUser connectionPassword= Obviously, this is what is causing the problem, given the code snippet above. I created a new username with a real password, entered those in my server.xml, and the problem went away. Now I know it's not a good practice to have a password that is an empty string, but is it an error? Should this be logged as a Tomcat bug? I'm still fairly new to Tomcat and tried searching for this in Bugzilla and didn't find anything and wasn't sure where to go from there. Would someone with more experience with the process like to enter this? -Original Message- From: Michael Wentzel [mailto:[EMAIL PROTECTED]] Sent: Friday, July 06, 2001 4:28 AM To: '[EMAIL PROTECTED]' Subject: RE: JDBC Realm Questions Tomcat 3.2.2 Now, when somebody wants to access myServlet resource, he/she must have the role of an Administrator or Operator. I think this should be checked into the database. The problem is that, when I've tried to access myServlet for the first time, the following message was generated in the tomcat console: 2001-07-05 04:11:49 - ContextManager: JDBCRealm: JDBCRealm.authenticate: SELECT PASSWORD FROM MYUSERTABLE WHERE NAME = ? 2001-07-05 04:11:50 - ContextManager: JDBCRealm: Authentication unsuccessful for user null In the same time, the login window has appeard on Netscape browser, but after I'd entered a valid user name and password (from myUserTable) the message was the same: 2001-07-05 04:14:19 - ContextManager: JDBCRealm: Authentication unsuccessful for user null It seems for me that the user name is null every time, no matter if I enter a valid (user, passwd) or not. Is that a Tomcat bug, or I've missed something? Check your database schema and make sure it is correct. If it is all I can suggest is add some debugging code to JDBCRealm, recompile and throw it in TOMCAT_HOME/classes/, then restart and see what the actual value of username is when authenticate(String, String) is called. --- Michael Wentzel Software Developer Software As We Think - http://www.aswethink.com
Re: apache not able to access jsp files
I've found that setting a host to the tomcat webapps directory sort of works except that you don't get the ROOT folder. I can get to the examples via http://hostname.dom/examples/ however. I just don't get the Tomcat start page. Moreover, going ot http://hostname.dom/ROOT/ brings up the start page but the examples won't run because it's looking for them in webapps/ROOT/examples/. I'm still trying to get this to work myself! Alberto Torna Jr. wrote: I ran into something similar. I set the default page for Apache to the Tomcat JSP page. From: Ramkumar Manoharan Reply-To: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: apache not able to access jsp files Date: Fri, 29 Jun 2001 17:03:27 -0700 Hi, OS-red hat 7.0, apache 1.3, tomcat 3.2 I currently have Apache on port 80, Tomcat port 8080 with mod_jk adapter. The servlets and jsp examples work off of localhost:8080, but they do not work off localhost:80. I have the Tomcat User Guide, the Tomcat-Apache HOWTO, and the Working with Mod-JK Manual for reference. I am using the auto generated mod_jk.auto and basically just want Apache to serve the static content and Tomcat the dynamic jsp and servlets. Unless, I'm missing something the static html pages and the .jsp pages should be off of port 80 and then the jk adapter should transfer the .jsp request to Tomcat via port 8007 using the apj12 protocol. But i get the following message: Forbidden You don't have permission to access /examples/jsp/index.html on this server. I have 755 access to the examples folder and also to the super folder webapps.Any reason why this problem? Thanks Ram _ Get your FREE download of MSN Explorer at http://explorer.msn.com Get your FREE download of MSN Explorer at http://explorer.msn.com
turbine's database connectin pool service
Is there any documentation on how to use turbine's database connection pooling service? I'm running tomcat3.2.2 and interested in using tubrin's db pooling service only. Thanks!
Re: Apache - Tomcat - Servlet Mapping
It would probably help if the mod_jk howto contained an example showing how to run the examples through Apache. For example, I have Tomcat 3.2.2 running nicely and get the examples to run using http://servername:8080/ to launch the examples. When I connect Apache to Tomcat, using http://servername/ doesn't recognize that the / context should go to ROOT. And going into http://servername/ROOT/ gets you into trouble when it tries to go to the examples context. Eitan Ben Noach wrote: I had the same servlet-mapping problems and the right ApJServMount command is: ApJServMount /context_path/myServlet /context_path/myServlet ( You must omit the 'servlet' string from the mount command ! ) In that way Apache knows to redirect /myServlet URL to Tomcat. You can make it more straight foreword and redirect every thing under context_path to Tomcat by: ApJServMount /context_path /context_path But then also static files ( like HTMLs and GIFs ) will be directed as well to Tomcat ( which usually you don't want ) You are right, and I don't have the answer for this, that in order to redirect only servlets from Apache to Tomcat we need to write specifically the servlets url-pattern in a special ApJServMount command, which actually duplicates the information in the web.xml file. Very bad!!. Does any body have the answer for it? I have some thoughts that the using Jk_mod maybe more flexible, but didn't yet check it. Eitan Ben-Noach -Original Message- From: Colin Hawkett [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 04, 2001 9:19 AM To: [EMAIL PROTECTED] Subject: Apache - Tomcat - Servlet Mapping Hi all, This question seems to be popping up pretty regularly, but I couldn't extract a solution to my problem - namely: getting apache to recognise servlet-mappings. I am running tomcat 3.2.2 and apache 1.3.11 on win98. I have a web application packaged up as a war file and deployed to the webapps directory. The web.xml file contains (among other things) servlet servlet-nametheServlet/servlet-name servlet-classcom.myco.test.TheServlet/servlet-class /servlet servlet-mapping servlet-nametheServlet/servlet-name url-pattern/myServlet/url-pattern /servlet-mapping Now, I've confirmed that the mapping is correct by accessing it using the URL http://myserver:8080/context_path/myServlet- This is fine, no problems As I understand it, this is connecting to the tomcat web server (on port 8080), which is aware of the servlet mapping because it has read the web.xml file for application. And this is how I would expect it to work. Cool. However, I don't want Tomcat to be my web server. I want apache to be my webserver. So I try to access the application using the URL http://myserver/context_path/myServlet- This fails! everything about the web-app works with apache except the servlet mapping, so I assume Apache is unaware of it. The closest thing to a solution I have found is that I need to add a line to 'tomcat-apache.conf' that looks something like - ApJServMount/context_path/myServlet /context_path/servlet/theServlet which seems like a really annoying thing to have to do. The whole point of web-apps is that you define everything you need to in web.xml, so that you don't have to change configuration files on the deployment system. If this is necessary, then what is the point of the servlet-mapping? Surely tomcat should generate the necessary ApJServMount lines in tomcat-apache.conf when it starts up and reads web.xml? So, the big question is - * Is it possible to get apache to recognise servlet mappings defined in a web-app's web.xml without explicitly making a modification to an apache config file? If so, how? * If not can someone give a concrete example of a servlet mapping, and the corresponding ApJServMount line that will get apache to recognise that mapping? I hope this all makes sense - appreciation in advance, Colin
JDBC Realm error on startup
I have the following configuration WinNT4 workstation Apache 1.3.20 tomcat 3.2.2 jdk 1.3.1 I am getting the following error on startup of Tomcat: Using CLASSPATH: C:\Tomcat\classes;C:\Tomcat\lib\ant.jar;C:\Tomcat\lib\dt.jar; C:\Tomcat\lib\htmlconverter.jar;C:\Tomcat\lib\i18n.jar; C:\Tomcat\lib\jasper.jar;C:\Tomcat\lib\jaws.jar;C:\Tomcat\lib\jaxp.jar; C:\Tomcat\lib\parser.jar;C:\Tomcat\lib\rt.jar;C:\Tomcat\lib\servlet.jar; C:\Tomcat\lib\sunrsasign.jar;C:\Tomcat\lib\tools.jar; C:\Tomcat\lib\webserver.jar;C:\Tomcat\lib\jasper.jar; C:\Tomcat\lib\ant.jar;C:\Tomcat\lib\jaxp.jar; C:\Tomcat\lib\parser.jar; C:\Tomcat\lib\servlet.jar; C:\Tomcat\lib\webserver.jar; C:\jdk1.3.1\lib\tools.jar;c:\Tomcat\webapps\example; C:\jdk1.3.1\lib\tools.jar 2001-07-06 02:49:01 - ContextManager: Adding context Ctx( /examples ) 2001-07-06 02:49:01 - ContextManager: Adding context Ctx( /admin ) Starting tomcat. Check logs/tomcat.log for error messages 2001-07-06 02:49:01 - ContextManager: JDBCRealm: Starting JDBCRealm, trying to acquire JDBC Driver class and DB Connection java.util.MissingResourceException: Can't find resource for bundle java.util.PropertyResourceBundle, key jdbcRealm.checkConnectionSQLException at java.util.ResourceBundle.getObject(ResourceBundle.java:382) at java.util.ResourceBundle.getString(ResourceBundle.java:354) at org.apache.tomcat.util.StringManager.getString(StringManager.java:136) at org.apache.tomcat.request.JDBCRealm.checkConnection(JDBCRealm.java:528) at org.apache.tomcat.request.JDBCRealm.contextInit(JDBCRealm.java:407) at org.apache.tomcat.core.ContextManager.initContext(ContextManager.java:491) at org.apache.tomcat.core.ContextManager.init(ContextManager.java:453) at org.apache.tomcat.startup.Tomcat.execute(Tomcat.java:195) at org.apache.tomcat.startup.Tomcat.main(Tomcat.java:235) 2001-07-06 02:49:01 - ContextManager: JDBCRealm: cannot find message associated with key : jdbcRealm.checkConnectionSQLException 2001-07-06 02:49:01 - ContextManager: JDBCRealm: SQLException: java.sql.SQLException: [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified THOUGHTS: The same error occurs for the admin context. My database that I would like to connect to is Microsoft Access. Should I use the JDBC-ODBC bridge driver. From what I have read, this might not be a good idea. The intended purpose of this application is to create an electronic docket delivery system and the Access DB has been created already. Nonetheless, I have not set up a Context for this app because I have not been able to get tomcat to run without exception. Is the solution to this problem getting the right JDBC .jar file and putting it in the classpath? Thanks, dave
bootstrap.jar ?
Hi; I'm trying to install tomcat as a service. I have been using JavaService. It is complaining that it can't find my startup class which is supposed to be Tomcat_Home/bin/boostrap.jar ( org.apache.Bootstrap ). I don't have this class. I tried downloading tomcat again..no dice. Where can I get it? Steve Steve Russell Web Developer III ValueOptions - Lifescape 703-205-6589 [EMAIL PROTECTED] -Original Message- From: Randy Layman [mailto:[EMAIL PROTECTED]] Sent: Friday, July 06, 2001 2:44 PM To: [EMAIL PROTECTED] Subject: RE: Making Tomcat 3.2 A Service On Win 2000 ( using jdk 1.3.0_02 ) -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Friday, July 06, 2001 2:50 PM To: [EMAIL PROTECTED] Subject: Re: Making Tomcat 3.2 A Service On Win 2000 ( using jdk 1.3.0_02 ) Are you sure there are no problems with jdk1.3.1? The main problem I found with 1.3.0 was that it shut down when you logged off. I found the same problem in 1.3.1. The fix is to add -Xsa to the execution line that starts Java in Tomcat. Works for me without any command line fixes. I thought that the -X option was added for some of the betas of 1.3.1. Is it possible that you have an older version of 1.3.1? As for making Tomcat a service, I found the jk_nt_service.exe (zipped up) in the jakarta downloads. I thought that was the standard way of making it into a service. Is this what is causing the shutdown problem? ShouldI be using a different method? You are correct. The JavaService program does basically the same thing as jk_nt_service, but it traps the OS signals and doesn't relay them on to the JVM. Randy ** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the sender by email, delete and destroy this message and its attachments. **
RE: Invoke New Window From Applet
You're right dude, this is COMPLETELY the wrong place for this. -Original Message- From: Sunil Chandurkar [mailto:[EMAIL PROTECTED]] Sent: Friday, July 06, 2001 12:31 AM To: [EMAIL PROTECTED] Subject: Invoke New Window From Applet Hi There I know the question i'm going to ask, the best place is Java Forum, and I have tried there. but i didn't find quick response compartively here...I m asking you all this question... Actually from Browser Applet I want to open new Window which should look like New Application: What exactly I want you can see it by visiting followin site... I want the same way, they are invoking their application from applet.. please visit following site and let me know How can I invoke such window or application from applet http://www.truesan.com/products/resources/sandesigner/sandesigner.htm /sunil _ Get LifeTime Free email Visit --- http://www.nagpurcity.net
Re:RE: Invoke New Window From Applet
This is done using the Java Web Start technology. http://www.javasoft.com/products/javawebstart/index.html If you have more questions you should discuss them further on the java web start forum since this list is for tomcat user issues. http://forum.java.sun.com/forum.jsp?forum=38 Jonathan Reply Separator Subject:RE: Invoke New Window From Applet Author: [EMAIL PROTECTED] Date: 7/6/2001 12:35 PM You're right dude, this is COMPLETELY the wrong place for this. -Original Message- From: Sunil Chandurkar [mailto:[EMAIL PROTECTED]] Sent: Friday, July 06, 2001 12:31 AM To: [EMAIL PROTECTED] Subject: Invoke New Window From Applet Hi There I know the question i'm going to ask, the best place is Java Forum, and I have tried there. but i didn't find quick response compartively here...I m asking you all this question... Actually from Browser Applet I want to open new Window which should look like New Application: What exactly I want you can see it by visiting followin site... I want the same way, they are invoking their application from applet.. please visit following site and let me know How can I invoke such window or application from applet http://www.truesan.com/products/resources/sandesigner/sandesigner.htm /sunil _ Get LifeTime Free email Visit --- http://www.nagpurcity.net
RE: imp - Tomcat with SSL
I guess it does not support digest based (SSL) client authenticationthough. cheers, Mandar -Original Message-From: Rams [mailto:[EMAIL PROTECTED]]Sent: Thursday, July 05, 2001 11:24 PMTo: [EMAIL PROTECTED]Subject: RE: imp - Tomcat with SSL Tomcat does support SSL.. Ver 3.2.1 or above. Rams +91-040-3000401 x 2162 (O) +91-040-6313447 (R) -Original Message-From: Parag S [mailto:[EMAIL PROTECTED]]Sent: Friday, July 06, 2001 11:33 AMTo: [EMAIL PROTECTED]Subject: imp - Tomcat with SSL Does Tomcat supports SSL If yes then which version supports it. Please let me know immediatly Thanking you in advance. parag
Re:java error in database access
my problem concerning JdbcOdbcDriver was not solved.a friend(Randy it was u!) suggested that this driver is not thread safe/has problems with multithreading.(that's hebrew to me,coz i am a first time server programmer) incidentally i got the following server window msgs when using jdbcodbcdriver.can any 1 tell me what it means!!(my index page has 3 frames having first.html,second.html third.html.the login textboxes are in third.html which lead to login.jsp on submit.my app is named project) [ 2001-07-06 12:50:26 - Ctx( /project ): IOException in: R( /project + /jsp/first. html + null) Connection reset by peer: socket write error 2001-07-06 12:50:26 - Ctx( /project ): 404 R( /project + /jsp/login.js + null) n ull 2001-07-06 12:50:26 - Ctx( /project ): IOException in: R( /project + /jsp/third. html + null) Connection reset by peer: socket write error ] however i also tried with a type 4 driver:i-net Seropto(tm) optional package driver(ver1.0 for Oracle 8.0 server).classname--com.inet.ora.OraDriver.it is said to support the following: Oracle Server, Java and JDBC Versions -- Java Versions: 1.2.x or higher JDBC Version: 2.0 Oracle Server Version: 8.0.4.0 i have Oracle8.0.4 personal edition,jdk1.2.2.i have included the jar files for both the driver and jdbc2.0 optional package in c:\tomcat\lib\. i modified th login.jsp used for jdbc-odbc driver as follows: [ %@ page session=true import=java.sql.*,java.io.* % % String s1=request.getParameter(user);//username String s2=request.getParameter(pwd);//password String upwd=null; FileOutputStream fos=null; PrintStream prs=null; try{ fos=new FileOutputStream(error.txt); prs=new PrintStream(fos); //DriverManager.setLogStream( System.out ); if(s1.length()==8 s2.length()==6) { out.println(loading driver); Class.forName(com.inet.ora.OraDriver).newInstance(); out.println( driver loaded); DriverManager.registerDriver(new com.inet.ora.OraDriver()); out.println(driver registered); Connection con=DriverManager.getConnection(jdbc:inetora,scott,tiger); out.println(got connection); Statement ps=con.createStatement(); // ps.setString(1,s1); ResultSet rs=ps.executeQuery(SELECT password FROM login WHERE username'+s1+'); if(rs!=null) { while(rs.next()) { upwd=rs.getString(password); } } con.close(); if(upwd!=null) { if(s2.equals(upwd)) { out.println(Welcome Back to this site +s1); } else { out.println(Incorrect password); } } else { out.println(Incorrect username ); } } else { out.println(Invalid no. of characters in username/password); } } catch(Exception ex){ ex.printStackTrace(prs); out.println(ex.getMessage()); out.println(ex);} % ] i got the following output in the browser: loading driver driver loaded driver registered Connection refused: no further information com.inet.ora.SQLException: Connection refused: no further information what the hell?? please offer a solution. thanx. ddr Buy Feng Shui Package for Rs. 151/- only, at http://shopping.rediff.com/shopping/fengshui_mailer.htm
RE: JDBC Realm error on startup
I am getting the following error on startup of Tomcat: 2001-07-06 02:49:01 - ContextManager: JDBCRealm: Starting JDBCRealm, trying to acquire JDBC Driver class and DB Connection You need your libraries in TOMCAT_HOME/lib to be able to make the connection. Although JDBCRealm has been mentioned to work like magic in that it does all the work for you, you still have to have some library for communicating with the appropriate DB. java.util.MissingResourceException: Can't find resource for bundle java.util.PropertyResourceBundle, key jdbcRealm.checkConnectionSQLException These are from the LocalString.properties files. If you open webserver.jar you will find several properties files. The one in org.apache.tomcat.request is the one this property should be in(the package which contains JDBCRealm). My copy does not have a key for jdbcRealm.checkConnectionSQLException. --- Michael Wentzel Software Developer Software As We Think - http://www.aswethink.com
RE: JDBC Realm Questions Tomcat 3.2.2
Tomcat's JDBC Realm won't work with an empty database password. I posted about this a week ago and asked if it was a bug and noone responded. If you proved the JDBCRealm a valid username with a blank (empty string) password, Tomcat will ignore BOTH Username and password. Guess I must have glazed over your previous post. I would view this less as a bug and more as a feature. You should never really allow users to have an empty password. It kind of defeats the point of having security. If you are trying to have a demo/anon user then just do similar to how this is handled in a ftp server... username=anonymous [EMAIL PROTECTED] JMHO. --- Michael Wentzel Software Developer Software As We Think - http://www.aswethink.com
RE: java error in database access
-Original Message- From: Dwaipayan [mailto:[EMAIL PROTECTED]] Sent: Friday, July 06, 2001 4:01 PM To: [EMAIL PROTECTED] Subject: Re:java error in database access my problem concerning JdbcOdbcDriver was not solved.a friend(Randy it was u!) suggested that this driver is not thread safe/has problems with multithreading.(that's hebrew to me,coz i am a first time server programmer) It means that if you attempt concurrent connections (that's multiple connections at the same time) to the database, you will crash. incidentally i got the following server window msgs when using jdbcodbcdriver.can any 1 tell me what it means!!(my index page has 3 frames having first.html,second.html third.html.the login textboxes are in third.html which lead to login.jsp on submit.my app is named project) [ 2001-07-06 12:50:26 - Ctx( /project ): IOException in: R( /project + /jsp/first. html + null) Connection reset by peer: socket write error 2001-07-06 12:50:26 - Ctx( /project ): 404 R( /project + /jsp/login.js + null) n ull 2001-07-06 12:50:26 - Ctx( /project ): IOException in: R( /project + /jsp/third. html + null) Connection reset by peer: socket write error ] These are harmless and unrelated. Check out http://www.aswethink.com/employees/randy/tomcat/IOException.html to find out more about them. however i also tried with a type 4 driver:i-net Seropto(tm) optional package driver(ver1.0 for Oracle 8.0 server).classname--com.inet.ora.OraDriver.it is said to support the following: Oracle Server, Java and JDBC Versions -- Java Versions: 1.2.x or higher JDBC Version: 2.0 Oracle Server Version: 8.0.4.0 i have Oracle8.0.4 personal edition,jdk1.2.2.i have included the jar files for both the driver and jdbc2.0 optional package in c:\tomcat\lib\. i modified th login.jsp used for jdbc-odbc driver as follows: [ %@ page session=true import=java.sql.*,java.io.* % % String s1=request.getParameter(user);//username String s2=request.getParameter(pwd);//password String upwd=null; FileOutputStream fos=null; PrintStream prs=null; try{ fos=new FileOutputStream(error.txt); prs=new PrintStream(fos); //DriverManager.setLogStream( System.out ); if(s1.length()==8 s2.length()==6) { out.println(loading driver); Class.forName(com.inet.ora.OraDriver).newInstance(); out.println( driver loaded); DriverManager.registerDriver(new com.inet.ora.OraDriver()); out.println(driver registered); Connection con=DriverManager.getConnection(jdbc:inetora,scott,tiger); out.println(got connection); Statement ps=con.createStatement(); // ps.setString(1,s1); ResultSet rs=ps.executeQuery(SELECT password FROM login WHERE username'+s1+'); if(rs!=null) { while(rs.next()) { upwd=rs.getString(password); } } con.close(); if(upwd!=null) { if(s2.equals(upwd)) { out.println(Welcome Back to this site +s1); } else { out.println(Incorrect password); } } else { out.println(Incorrect username ); } } else { out.println(Invalid no. of characters in username/password); } } catch(Exception ex){ ex.printStackTrace(prs); out.println(ex.getMessage()); out.println(ex);} % ] i got the following output in the browser: loading driver driver loaded driver registered Connection refused: no further information com.inet.ora.SQLException: Connection refused: no further information what the hell?? It would seem like one of three things is happening: 1. You database is set up to not accept connections from your computer (probably not possible in Personal Edition) 2. You probably need to specify more information for your database driver to be able to connect to Oracle (after all, its software, its up to us to add the magic). Check your driver documentation for more information 3. You database is refusing connections for licensing issues. I don't know anything about Personal Edition, but it seems possible that you
Re:java error in database access
thanx randy i am checking out ur solutions. ddr Buy Feng Shui Package for Rs. 151/- only, at http://shopping.rediff.com/shopping/fengshui_mailer.htm
Re[2]: Problem with stopping Tomcat
Friday, July 06, 2001, 2:47:01 PM, [EMAIL PROTECTED] wrote: -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Friday, July 06, 2001 3:10 PM To: [EMAIL PROTECTED] Subject: Re: Problem with stopping Tomcat I thought 3.2.2 could use AJP13 instead? Am I wrong on that? RL My understanding is Tomcat 3.1-3 could only use AJP12 to shutdown, RL maybe you should post to the tomcat-dev list and let us know what you find RL out. The doc agrees with you: http://jakarta.apache.org/tomcat/tomcat-3.2-doc/mod_jk-howto.html The servlet.xml file already has a block similar to this for Ajp12 connections on port 8007 (as delivered by mod_jserv). Even if you think you're only using Ajp13, you probably don't want to delete this connector - it's required to shut down Tomcat.
ajp13 error
What does this error message mean and what can cause it? [jk_ajp13_worker.c (325)]: Error ajp13_process_callback - write failed I'm getting quite a few on my sites and our sites are also exhibiting weird/slow behavior so I'm trying to put the two together... Thanks, Fran
Re: AW: List traffic et al
In a perfect world, yes, I totally agree. However, in the real world, who's going to enforce the guidelines? (we already have guidelines that few people pay attention to...) Reposting the guidelines and links to the FAQ and archive on a regular basis would probably help, and I agree that it should be done. Personally, I don't care about the volume on the list. I have a broadband connection and it only takes me a couple of seconds to download all the daily messages. However, I think Tomcat is a broad enough subject to warrant more than just one generic list. I think a couple of focused lists would help people with non-generic questions. And, as Milt Epstein points out in a later post, involvement may actually increase on smaller, focused lists. I don't think the volume on the tomcat-user list will decrease much at all, even if it is split. However, splitting will allow people with focused interests beyond getting Tomcat up and running to participate without being deluged with messages they may not be interested in. More choices are usually better than less. --jeff From: Nico Wieland [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] Date: Fri, 6 Jul 2001 13:17:13 +0200 To: [EMAIL PROTECTED] Subject: AW: List traffic et al i agree 100%. i think a _good_ thing would be to include these guidelines in the confirmation message one receives after subscribing to the list. this is the way how it's done eg. on sun-managers, they post the guidelines once a month. it's the most disciplined list i know. -nico Rather let all of us try to reduce volume(both in size and number), it does not require much effort. Lets just try to follow the following. [snip]
Re: Re[4]: Reverse DNS lookup
Thanks for all the help. It wasn't my code or my ISP, but a security manager problem... Turns out the problem was a security permission I needed to define: permission java.net.SocketPermission *, resolve; What's unusual is that no exception was thrown to make that clear. It just failed silently. David
question about classpaths in tomcat run
Hello, I specified wrapper.classpath in tomcat.properties file fora certain run and it could not findmy classes. Then I stopped tomcat and set classpath to the same destination directory and started tomcat in the same window. This time my program worked. Any clarifications about these differences -- setting classpath in properties file as opposed to setting it directly before starting tomcat ? Thanks. [EMAIL PROTECTED]
Servlet Error
Hello All: Below is the error code I am recieciving when I run a simple Servlet on my laptop, everything works fine on my test machine so i know the code works. The example servlets run fine, are there any configuration settings that I may have over looked. The version of Tomcat/Apache that I am using is customized version part of a software package. From the error code below maybe someone can lead me in the right direction. Thanks Stuart Error: 500 Location: /iw/samples/hello.html Internal Servlet Error: java.lang.NullPointerException at java.lang.ClassLoader.resolveClass0(Native Method) at java.lang.ClassLoader.resolveClass(ClassLoader.java:588) at org.apache.tomcat.loader.AdaptiveClassLoader.loadClass(AdaptiveClassLoader.java:430) at org.apache.tomcat.loader.AdaptiveServletLoader.loadClass(AdaptiveServletLoader.java:174) at org.apache.tomcat.core.ServletWrapper.loadServlet(ServletWrapper.java:265) at org.apache.tomcat.core.ServletWrapper.init(ServletWrapper.java:289) at org.apache.tomcat.core.Handler.service(Handler.java:254) at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372) at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:797) at org.apache.tomcat.core.ContextManager.service(ContextManager.java:743) at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:210) at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416) at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498) at java.lang.Thread.run(Thread.java:484)
AW: Get Me Out Of This
Just send an email to this address: [EMAIL PROTECTED] If you subscribes the digest list, send an email to: [EMAIL PROTECTED] Leila
RE: Servlet Error
I think you'll have to look at your servlet code and see where it could be creating a null pointer exception. -Original Message- From: Stuart Shay [mailto:[EMAIL PROTECTED]] Sent: Friday, July 06, 2001 3:35 PM To: [EMAIL PROTECTED] Subject: Servlet Error Hello All: Below is the error code I am recieciving when I run a simple Servlet on my laptop, everything works fine on my test machine so i know the code works. The example servlets run fine, are there any configuration settings that I may have over looked. The version of Tomcat/Apache that I am using is customized version part of a software package. From the error code below maybe someone can lead me in the right direction. Thanks Stuart Error: 500 Location: /iw/samples/hello.html Internal Servlet Error: java.lang.NullPointerException at java.lang.ClassLoader.resolveClass0(Native Method) at java.lang.ClassLoader.resolveClass(ClassLoader.java:588) at org.apache.tomcat.loader.AdaptiveClassLoader.loadClass(AdaptiveClassLoader.j ava:430) at org.apache.tomcat.loader.AdaptiveServletLoader.loadClass(AdaptiveServletLoad er.java:174) at org.apache.tomcat.core.ServletWrapper.loadServlet(ServletWrapper.java:265) at org.apache.tomcat.core.ServletWrapper.init(ServletWrapper.java:289) at org.apache.tomcat.core.Handler.service(Handler.java:254) at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372) at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:79 7) at org.apache.tomcat.core.ContextManager.service(ContextManager.java:743) at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpC onnectionHandler.java:210) at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416) at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498) at java.lang.Thread.run(Thread.java:484)
How to configure a custom page for JSP 404 errors?
Hello, This question probably has come up before, I just can't find it in the archives I am using Tomcat 3.2.2 standalone (not with Apache). How can I configure a particular page (servlet, static html, or jsp) to be the default page that comes up if the requested jsp is not found, instead of the 404 error. In other words, if a user requests: http://myTomcatSite.com/somePage.jsp I want to have somePage.jsp come up if it exists. But if somePage.jsp does not exist, I *don't* want the default 404 error to be displayed. Instead I want some custom page (a servlet actually) to be processed. I don't really care if this is achieved with a client-side redirect or a server-side include/forward. I have tried using the DefaultServlet, which doesn't seem to work. I have also set up my own servlet against url-pattern /* /url-pattern. This works for servlets only, not JSPs. It seems the basic problem is that any URI that matches *.jsp. gets processed by the JspServlet. So it is not determined if the .jsp file actually exists or not until the JspServlet is triggered. Can this custom error page functionality be configured somehow in Tomcat? Thanks for any help, Pierce Courtney [EMAIL PROTECTED]
mod_jk error
Anyone had any experience with this one? [Fri Jul 06 14:53:19 2001] [jk_ajp12_worker.c (522)]: ajpv12_handle_response, no value supplied I have an application that's working fine in most cases, but I get Apache errors in the browser with this in my mod_jk log when something goes wrong. Apache 1.3.19, Tomcat 3.3m3 Thanks, Jason Koeninger JJ Computer Consulting http://www.jjcc.com
Problem running servlets on Apache/Tomcat
Hi This query has been posted on this list quite a no. of times and even after going through the archives I'm still stuck up with this problem! To start with the configuration... I'm working Windows 2000 professional with Tomcat 3.2.2 and Apache 1.3.20. The backend is Oracle 8.1.6. I have an application called 'portfolio' for which I created a folder in C:\TOMCAT_HOME\webapps called portfolio with a hierarchy of other directories required, like C:\TOMCAT_HOME\webapps\portfolio\WEB-INF where I copied the web.xml and C:\TOMCAT_HOME\webapps\portfolio\WEB-INF\classes where I put all the servlet classes. I have put all the other files like htmls, images etc. in the C:\TOMCAT_HOME\webapps\portfolio directory! and not to forget the C:\TOMCAT_HOME\webapps\portfolio\lib dir. for all the jar files and Orcale driver... I have made changes to my servlet.xml file also to let tomcat recognize my application! Putting in the 'context-path' stuff and have edited the web.xml file to map the servlets Now I can execute my servlets but cannot run them... coz when I try exceuting them I get an error 'ClassDefNotFound: ConnectionPool/ConnectionPool' Now CoonnectionPool is actually a package(as the name impies) that i created to make a connection to the database. Its also in the classes dir. When I execute the servlets I dont get any errors as to unable to find ConnectionPool, so I presume that they are in the Path. Now I'm really stuck up and am unable to find the real problem! May be someone out there whos done something similar can help me solve this Thanks a lot in advance Priyanka __ Do You Yahoo!? Get personalized email addresses from Yahoo! Mail http://personal.mail.yahoo.com/
RE: Apache - Tomcat - Servlet Mapping
You could try adding the following in the TOMCAT_HOME/conf/server.xml: Context path=/ docBase=webapps/examples ../Context This will map your examples webapp to the '/'. This will allow you to access http://servername/servlet/HelloWorld. -keng wong -Original Message- From: Gary Dale [mailto:[EMAIL PROTECTED]] Sent: Friday, July 06, 2001 12:27 PM To: [EMAIL PROTECTED] Subject: Re: Apache - Tomcat - Servlet Mapping It would probably help if the mod_jk howto contained an example showing how to run the examples through Apache. For example, I have Tomcat 3.2.2 running nicely and get the examples to run using http://servername:8080/ to launch the examples. When I connect Apache to Tomcat, using http://servername/ doesn't recognize that the / context should go to ROOT. And going into http://servername/ROOT/ gets you into trouble when it tries to go to the examples context.
Re: How to configure a custom page for JSP 404 errors?
Hi Pierce, From what I've been able to gather, you should be able to set the error page using the error-page directive within the deployment descriptor for a web app (web.xml). error-page error-code404/error-code location/error.jsp/location /error-page Looking through the bug database, there was an open issue regarding the use of static html pages within the location tag. I'm uncertain at this time what release it's actually fixed in, but if you try it and get a stacktrace, then I guess you know :) The bug report can be found here: http://nagoya.apache.org/bugzilla/show_bug.cgi?id=291 I did find this information in the archives. Try looking at the results of the following search: http://mikal.org/interests/java/tomcat/archive/search?search=error+page+custom+404 I'm sure those who are more experiences could expand/correct on this information. Hope this helps. -rl Courtney, Pierce wrote: Hello, This question probably has come up before, I just can't find it in the archives I am using Tomcat 3.2.2 standalone (not with Apache). How can I configure a particular page (servlet, static html, or jsp) to be the default page that comes up if the requested jsp is not found, instead of the 404 error. In other words, if a user requests: http://myTomcatSite.com/somePage.jsp I want to have somePage.jsp come up if it exists. But if somePage.jsp does not exist, I *don't* want the default 404 error to be displayed. Instead I want some custom page (a servlet actually) to be processed. I don't really care if this is achieved with a client-side redirect or a server-side include/forward. I have tried using the DefaultServlet, which doesn't seem to work. I have also set up my own servlet against url-pattern /* /url-pattern. This works for servlets only, not JSPs. It seems the basic problem is that any URI that matches *.jsp. gets processed by the JspServlet. So it is not determined if the .jsp file actually exists or not until the JspServlet is triggered. Can this custom error page functionality be configured somehow in Tomcat? Thanks for any help, Pierce Courtney [EMAIL PROTECTED]
Pre-compilation of JSP
Hi We had been provided with JSPC for pre-compilation of JSP in tomcat.. But problem is I am unable to generate web.xml file with new JSP file mapping like if I give this command jspc -webxml pweb.xml -uriroot c:\myapp *.jsp the above should actualy convert all JSP files in directory myapp to *.java files by giving appropriate mapping in pweb.xml file But genrate pweb.xml file is not generated with new JSP mappings Even though if I specify mapping explicitly ,when client hits JSP page it is again converting jsp to java file in work directory. It would be greatful if u can let me know the steps to do this . Regs --Pula -Original Message- From: Ryan Lubke [mailto:[EMAIL PROTECTED]] Sent: Friday, July 06, 2001 12:29 PM To: [EMAIL PROTECTED] Subject: Re: How to configure a custom page for JSP 404 errors? Hi Pierce, From what I've been able to gather, you should be able to set the error page using the error-page directive within the deployment descriptor for a web app (web.xml). error-page error-code404/error-code location/error.jsp/location /error-page Looking through the bug database, there was an open issue regarding the use of static html pages within the location tag. I'm uncertain at this time what release it's actually fixed in, but if you try it and get a stacktrace, then I guess you know :) The bug report can be found here: http://nagoya.apache.org/bugzilla/show_bug.cgi?id=291 I did find this information in the archives. Try looking at the results of the following search: http://mikal.org/interests/java/tomcat/archive/search?search=error+page+ custom+404 I'm sure those who are more experiences could expand/correct on this information. Hope this helps. -rl Courtney, Pierce wrote: Hello, This question probably has come up before, I just can't find it in the archives I am using Tomcat 3.2.2 standalone (not with Apache). How can I configure a particular page (servlet, static html, or jsp) to be the default page that comes up if the requested jsp is not found, instead of the 404 error. In other words, if a user requests: http://myTomcatSite.com/somePage.jsp I want to have somePage.jsp come up if it exists. But if somePage.jsp does not exist, I *don't* want the default 404 error to be displayed. Instead I want some custom page (a servlet actually) to be processed. I don't really care if this is achieved with a client-side redirect or a server-side include/forward. I have tried using the DefaultServlet, which doesn't seem to work. I have also set up my own servlet against url-pattern /* /url-pattern. This works for servlets only, not JSPs. It seems the basic problem is that any URI that matches *.jsp. gets processed by the JspServlet. So it is not determined if the .jsp file actually exists or not until the JspServlet is triggered. Can this custom error page functionality be configured somehow in Tomcat? Thanks for any help, Pierce Courtney [EMAIL PROTECTED]
Pre-compilation of JSP
Hi We had been provided with JSPC for pre-compilation of JSP in tomcat.. But problem is I am unable to generate web.xml file with new JSP file mapping like if I give this command jspc -webxml pweb.xml -uriroot c:\myapp *.jsp the above should actualy convert all JSP files in directory myapp to *.java files by giving appropriate mapping in pweb.xml file But genrate pweb.xml file is not generated with new JSP mappings Even though if I specify mapping explicitly ,when client hits JSP page it is again converting jsp to java file in work directory. It would be greatful if u can let me know the steps to do this . Regs --Pula -Original Message- From: Ryan Lubke [mailto:[EMAIL PROTECTED]] Sent: Friday, July 06, 2001 12:29 PM To: [EMAIL PROTECTED] Subject: Re: How to configure a custom page for JSP 404 errors? Hi Pierce, From what I've been able to gather, you should be able to set the error page using the error-page directive within the deployment descriptor for a web app (web.xml). error-page error-code404/error-code location/error.jsp/location /error-page Looking through the bug database, there was an open issue regarding the use of static html pages within the location tag. I'm uncertain at this time what release it's actually fixed in, but if you try it and get a stacktrace, then I guess you know :) The bug report can be found here: http://nagoya.apache.org/bugzilla/show_bug.cgi?id=291 I did find this information in the archives. Try looking at the results of the following search: http://mikal.org/interests/java/tomcat/archive/search?search=error+page+ custom+404 I'm sure those who are more experiences could expand/correct on this information. Hope this helps. -rl Courtney, Pierce wrote: Hello, This question probably has come up before, I just can't find it in the archives I am using Tomcat 3.2.2 standalone (not with Apache). How can I configure a particular page (servlet, static html, or jsp) to be the default page that comes up if the requested jsp is not found, instead of the 404 error. In other words, if a user requests: http://myTomcatSite.com/somePage.jsp I want to have somePage.jsp come up if it exists. But if somePage.jsp does not exist, I *don't* want the default 404 error to be displayed. Instead I want some custom page (a servlet actually) to be processed. I don't really care if this is achieved with a client-side redirect or a server-side include/forward. I have tried using the DefaultServlet, which doesn't seem to work. I have also set up my own servlet against url-pattern /* /url-pattern. This works for servlets only, not JSPs. It seems the basic problem is that any URI that matches *.jsp. gets processed by the JspServlet. So it is not determined if the .jsp file actually exists or not until the JspServlet is triggered. Can this custom error page functionality be configured somehow in Tomcat? Thanks for any help, Pierce Courtney [EMAIL PROTECTED]
webapp classloader ProtectionDomain (running secured tomcat)
Hi all, It seems that webapp classloader puts all classes loaded from a webapp directory into the same ProtectionDomain regardless of the location where the class was loaded from (like classes dir or a jar file). It means that any security grant entry granting permssions to a webapp codesource effectively grants the same set of permissions to each and every class in web application. This is probably fine in most cases but leaves no possibility to fine tune security within web-application. My particular problem is that I'm trying to use JAAS to enable access control with custom JAAS policy implementation. CodeSOurce partitioning that Sun suggests requires that the code sensitive to user-based operations shoud be put into separate ProtectionDomain for JAAS mechanisms to work. The only way to do this with Tomcat is to put classes someplace out of webapp directory, so they don't inherit any permissions assigned to webapp ProtectionDomain. I think that webapp class loader should put classes loaded from class directory and every jar file into diffrent protection domains, like class loaders that load classes from the system classpath in Java. Well, if all that makes any sense to you may be there's something I'm missing here? Just wanted to get other people's opinions... --Vlad. *** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message. ***
RE: Get Me Out Of This
-Original Message- From: Algarve, Leila [mailto:[EMAIL PROTECTED]] Sent: Friday, July 06, 2001 9:05 AM To: '[EMAIL PROTECTED]' Subject: AW: Get Me Out Of This Just send an email to this address: [EMAIL PROTECTED] If you subscribes the digest list, send an email to: [EMAIL PROTECTED] Leila
Re:Jakarta NT service
This is a bug in jdk1.3 or newer that happens when you use the tomcat NT service. Use JavaService.exe instead to install Tomcat as a service. It is easy to configure, and was designed to address this problem. I'm using it with jdk1.3.1 on NT successfully. http://www.alexandriasc.com/software/JavaService/index.html Jonathan Reply Separator Subject:Jakarta NT service Author: [EMAIL PROTECTED] Date: 7/6/2001 11:48 AM Hi, I recently installed tomcat3.2 on a windows NT machine. But the NT service always got stopped everytime I logged in and then logged out. Could anyone help? Regards Michael