Form Based Authentication - Registration
We have form based authentication working as follows : 1.) Customer requests access to a realm 2.) Redirect to login page 3.) Customer authenticates 4.) Customer redirected to realm as original request No we want to add registration and have the following happen 1.) Customer requests access to a realm 2.) Redirect to login page 3.) Customer doesn't have an account yet and accesses registration page 4.) Customer registers 5.) On successful registration the customer is redirected to the original request Now to get this working we need the following, both of which we are not sure are currently provided by the authentication framework. -Ability to access the original (SavedRequest) from a JSP / Servlet -Ability to auto/fake login from within the webapplication Is this currently possible ? Thanks Alex Alexander F. Hartner eMail : [EMAIL PROTECTED] Work : +27-11-646-6459 Fax : +27-11-646-5868 The programmers of old were mysterious and profound. We cannot fathom their thoughts, so all we do is describe their appearance. Aware, like a fox crossing the water. Alert, like a general on the battlefield. Kind, like a hostess greeting her guests. Simple, like uncarved blocks of wood. Opaque, like black pools in darkened caves. Who can tell the secrets of their hearts and minds? The answer exists only in the Tao. -- Geoffrey James, The Tao of Programming - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: SHUTDOWN OF TOMCAT 4.1 .29 and LOAD-ON-START-UP
Hi , Find below the message on the console when tomcat shutdown is done . My console hangs at this point Feb 14, 2004 3:56:34 PM org.apache.coyote.http11.Http11Protocol init INFO: Initializing Coyote HTTP/1.1 on port 8080 Starting service Tomcat-Standalone Apache Tomcat/4.1.29 Feb 14, 2004 3:56:36 PM org.apache.struts.util.PropertyMessageResources init INFO: Initializing, config='org.apache.struts.util.LocalStrings', returnNull=t e Feb 14, 2004 3:56:36 PM org.apache.struts.util.PropertyMessageResources init INFO: Initializing, config='org.apache.struts.action.ActionResources', returnN l=true Feb 14, 2004 3:56:37 PM org.apache.struts.util.PropertyMessageResources init INFO: Initializing, config='org.apache.webapp.admin.ApplicationResources', ret nNull=true Feb 14, 2004 3:56:42 PM org.apache.coyote.http11.Http11Protocol start INFO: Starting Coyote HTTP/1.1 on port 8080 Feb 14, 2004 3:56:42 PM org.apache.jk.common.ChannelSocket init INFO: JK2: ajp13 listening on /0.0.0.0:8009 Feb 14, 2004 3:56:42 PM org.apache.jk.server.JkMain start INFO: Jk running ID=0 time=0/234 config=E:\MCOne\MCOneServer\bin\..\conf\jk2. operties Stopping service Tomcat-Standalone Feb 14, 2004 3:57:02 PM org.apache.coyote.http11.Http11Protocol destroy INFO: Stoping http11 protocol on 8080 Catalina:type=ThreadPool,name=http8080 I am still not able to comprehend why this does not occur when i dont use load on start up . Thanks and Regards Mukund -Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED] Sent: Friday, February 13, 2004 7:36 PM To: Tomcat Users List Subject: RE: SHUTDOWN OF TOMCAT 4.1 .29 and LOAD-ON-START-UP Howdy, I have interrupted and destoryed the thread in the destroy method but the shutdown does not happen completely and the console hangs . I am not able to understand why I don't get this problem when I do not use load on start up for the servlet. It's strange indeed ;) Tomcat doesn't do anything different when you specify load-on-startup for a servlet except construct and initialize an instance of it. The lifecycle is exactly the same, no special processing. If you send the JVM a SIGQUIT after trying to shut it down, i.e. when it's hung, what active threads are showing? Yoav Shapira This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: JAAS and TOMCAT 5
On 02/13/2004 09:34 PM Shapira, Yoav wrote: JAVA_OPTS=- Djava.security.auth.login.config==$CATALINA_HOME/conf/jaas.conf You probably want JAVA_OPTS='-Djava.security.auth.login.config=$CATALINA_HOME/conf/jaas. conf' (one line, single equals signs, quotes containing the whole JAVA_OPTS value. I hardcode the whole path. And I set JAVA_OPTIONS to the same thing as well. Adam -- struts 1.1 + tomcat 5.0.16 + java 1.4.2 Linux 2.4.20 Debian - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Form Based Authentication - Registration
On 02/14/2004 10:31 AM Alexander F. Hartner wrote: No we want to add registration and have the following happen 1.) Customer requests access to a realm 2.) Redirect to login page 3.) Customer doesn't have an account yet and accesses registration page 4.) Customer registers 5.) On successful registration the customer is redirected to the original request Now to get this working we need the following, both of which we are not sure are currently provided by the authentication framework. -Ability to access the original (SavedRequest) from a JSP / Servlet -Ability to auto/fake login from within the webapplication You cannot access the original request if the url is protected by a security-constraint and the user has not logged in. Tomcat will always jump in first with the CMS login. To fake it and keep CMS, reduce your real realm to a security constraint on one URL and set up a filter to check for the user's status. If not logged in, saved the parts of the request you need in the session, and redirect the user to the protected page to trigger the container login. Then after the login succeeds and the user gets through to that protected URL, check the session for the info and redirect them to their original destination. You can put a link on the login page to the registration URL - I'm not sure about the redirection logic but it should be possible to redirect them after registration back to the login page to login, and then on to their original destination. HTH Adam -- struts 1.1 + tomcat 5.0.16 + java 1.4.2 Linux 2.4.20 Debian - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: jsp deployment
Tomcat manager shows EBook is running. And, when I request it through Apache, Tomcat does serve it up. When I request it through port 8080, Tomcat says it's not available: Workshttp://localhost/EBook Doesn't workhttp://localhost:8080/EBook Works---http://localhost/examples/jsp Works---http://localhost:8080/examples/jsp Jerry BAO RuiXian wrote: Jerry Ford wrote: Sorry, that's a cut-and-paste error that does not appear in the real server.xml. Only one /context end tag; the root context is closed before the EBook context begins: context... / The configuration seems okay then. BTW, can you run http://localhost:8080/manager/list to see what apps you have installed? If you can not find 'EBook', then you need to install it by running http://localhost:8080/manager/install?war=EBook Best Bao Jerry Thomas Tang wrote: Bill is correct. This portions seems off. Try separating them. I dont think you should be seeing /Context followed by and another /Context. !-- ROOT context -- Context path= docBase=ROOT debug=0/ !-- EBook context -- Context path=/EBook docBase=EBook debug=0 reloadable=true crossContext=true !-- EBook logger (localhost_EBook_log.txt) -- Logger className=org.apache.catalina.logger.FileLogger prefix=localhost_EBook_log. suffix=.txt timestamp=true / /Context /Context Bill Haake [EMAIL PROTECTED] 02/13/2004 12:03 PM Please respond to Tomcat Users List [EMAIL PROTECTED] To Tomcat Users List [EMAIL PROTECTED] cc Subject RE: jsp deployment You have the EBook context nested inside the default (ROOT). -Original Message- From: Jerry Ford [mailto:[EMAIL PROTECTED] Sent: Friday, February 13, 2004 11:50 AM To: Tomcat Users List Subject: Re: jsp deployment from server.xml (minus realm, user database resource and a couple of extraneous contexts): Server port=8005 shutdown=SHUTDOWN debug=0 !-- Service -- Service name=Tomcat-Standalone !-- Port 8080 Connector -- Connector className=org.apache.coyote.tomcat4.CoyoteConnector port=8080 minProcessors=5 maxProcessors=75 enableLookups=true redirectPort=8443 acceptCount=100 debug=0 connectionTimeout=2 useURIValidationHack=false disableUploadTimeout=true / !-- Apache Connector (mod_jk) -- Connector className=org.apache.coyote.tomcat4.CoyoteConnector port=8009 minProcessors=5 maxProcessors=75 enableLookups=true redirectPort=8443 acceptCount=10 debug=0 connectionTimeout=0 useURIValidationHack=false protocolHandlerClassName=org.apache.jk.server.JkCoyoteHandler/ !-- Engine -- Engine name=Standalone defaultHost=localhost debug=0 !-- Engine logger (catalina_log.txt) -- Logger className=org.apache.catalina.logger.FileLogger prefix=catalina_log. suffix=.txt timestamp=true/ !-- Host (localhost) -- Host name=localhost debug=0 appBase=webapps unpackWARs=true autoDeploy=true !-- Host logger (localhost_log.txt) -- Logger className=org.apache.catalina.logger.FileLogger directory=logs prefix=localhost_log. suffix=.txt timestamp=true/ !-- ROOT context -- Context path= docBase=ROOT debug=0/ !-- EBook context -- Context path=/EBook docBase=EBook debug=0 reloadable=true crossContext=true !-- EBook logger (localhost_EBook_log.txt) -- Logger className=org.apache.catalina.logger.FileLogger prefix=localhost_EBook_log. suffix=.txt timestamp=true / /Context /Context !-- examples context -- Context path=/examples docBase=examples debug=0 reloadable=true crossContext=true !-- examples logger (localhost_examples_log.txt) -- Logger className=org.apache.catalina.logger.FileLogger
Re: Tomcat 5 Autoconfig
Thanks, I'll check that out... John.. Bill Barker wrote: John B. Moore [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Ah, further checking on the Sun website indicates that it is: Apache Tomcat Version 5.0.18 So... why did it not work... I don't know. Maybe Sun packages Tomcat differently than Apache does. The class should be in server/lib/jkconfig.jar. Catalina.start: java.lang.ClassNotFoundException: org.apache.jk.config.ApacheConfig java.lang.ClassNotFoundException: org.apache.jk.config.ApacheConfig Bill Barker wrote: In 5.0.18 it was added back as org.apache.jk.config.ApacheConfig. John B. Moore [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Greetings.. Can't seem to find the documenation for Autoconfig for Tomcat 5 to Apache.. In Tomcat4 I used.. Listener className=org.apache.ajp.tomcat4.config.ApacheConfig append=true forwardAll=false modJk=/usr/libexec/httpd/mod_jk.so ..tried... Listener className=org.apache.ajp.tomcat5.config.ApacheConfig append=true forwardAll=false modJk=/usr/libexec/httpd/mod_jk.so no joy... throws a ClassDefNotFound.. searched the docs but can seem to find the right rock to look under.. Could someone give me a kick in the right direction... Thanks.. John.. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: jsp deployment
Jerry Ford wrote: Tomcat manager shows EBook is running. And, when I request it through Apache, Tomcat does serve it up. When I request it through port 8080, Tomcat says it's not available: I suggest for now you forget running via Apache totally, since if it is not working directly from Tomcat, it cannot be running via Apache. What you see Tomcat is serving via Apache, actually it is not, rather the Apache itself is serving it. You say Tomcat manager shows EBook is running, did you run localhost:8080//manager/list? Can you post the result of the url? To further debug, can you do the following: 1. Make a 'test' directory under your webapps directory, i.e. paralell to examples and EBook; 2. Make a Context block in the server.xml file for 'test' by copy/paste/modify the Context block for examples; 3. Install this 'test' app by running localhost:8080/manager/install?war=test Then run localhost:8080/test, what happens? Best Bao Workshttp://localhost/EBook Doesn't workhttp://localhost:8080/EBook Works---http://localhost/examples/jsp Works---http://localhost:8080/examples/jsp Jerry BAO RuiXian wrote: Jerry Ford wrote: Sorry, that's a cut-and-paste error that does not appear in the real server.xml. Only one /context end tag; the root context is closed before the EBook context begins: context... / The configuration seems okay then. BTW, can you run http://localhost:8080/manager/list to see what apps you have installed? If you can not find 'EBook', then you need to install it by running http://localhost:8080/manager/install?war=EBook Best Bao - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: jsp deployment
BAO RuiXian wrote: Jerry Ford wrote: Tomcat manager shows EBook is running. And, when I request it through Apache, Tomcat does serve it up. When I request it through port 8080, Tomcat says it's not available: I suggest for now you forget running via Apache totally, Agreed. since if it is not working directly from Tomcat, it cannot be running via Apache. What you see Tomcat is serving via Apache, actually it is not, rather the Apache itself is serving it. But Tomcat has to be serving up something; the servlets that are part of EBook do work and Apache can't serve them without Tomcat. You say Tomcat manager shows EBook is running, did you run localhost:8080//manager/list? Can you post the result of the url? Here is the output: OK - Listed applications for virtual host localhost /EBook:running:0:/usr/local/webserver/tomcat/webapps/EBook /manager:running:0:/usr/local/webserver/tomcat/server/webapps/manager /examples:running:0:examples /j_tools:running:0:/usr/local/webserver/webapps/j_tools /tomcat-docs:running:0:/usr/local/webserver/jakarta-tomcat-4.1.27/webapps/tomcat-docs /webdav:running:0:/usr/local/webserver/jakarta-tomcat-4.1.27/webapps/webdav /admin:running:0:/usr/local/webserver/tomcat/server/webapps/admin /:running:0:ROOT To further debug, can you do the following: 1. Make a 'test' directory under your webapps directory, i.e. paralell to examples and EBook; 2. Make a Context block in the server.xml file for 'test' by copy/paste/modify the Context block for examples; 3. Install this 'test' app by running localhost:8080/manager/install?war=test Then run localhost:8080/test, what happens? I get a Tomcat-generated directory listing for / Listing is, of course, empty, since there are no files in test. BTW, I really appreciate your help. Thanks. Best Bao Workshttp://localhost/EBook Doesn't workhttp://localhost:8080/EBook Works---http://localhost/examples/jsp Works---http://localhost:8080/examples/jsp Jerry BAO RuiXian wrote: Jerry Ford wrote: Sorry, that's a cut-and-paste error that does not appear in the real server.xml. Only one /context end tag; the root context is closed before the EBook context begins: context... / The configuration seems okay then. BTW, can you run http://localhost:8080/manager/list to see what apps you have installed? If you can not find 'EBook', then you need to install it by running http://localhost:8080/manager/install?war=EBook Best Bao - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: jsp deployment
Tomcat manager shows EBook is running. And, when I request it through Apache, Tomcat does serve it up. When I request it through port 8080, Tomcat says it's not available: I suggest for now you forget running via Apache totally, since if it is not working directly from Tomcat, it cannot be running via Apache. What you see Tomcat is serving via Apache, actually it is not, rather the Apache itself is serving it. You say Tomcat manager shows EBook is running, did you run localhost:8080//manager/list? Can you post the result of the url? Jerry, I think BAO is right about apache here. I have a stand alone setup and did a quick test of something. You have in your web.xml: servlet-mapping servlet-nameinvoker/servlet-name url-pattern/*/url-pattern /servlet-mapping When I set mine to this I get 404 resource not found. Curiously, even though it gave a 404 resource not found, the manager showed it running. But with this it works fine. servlet-mapping servlet-nameinvoker/servlet-name url-pattern/servlet/*/url-pattern /servlet-mapping I had this same problem myself. Sorry I didn't spot it sooner. Doug - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: jsp deployment
Yes, I agree, Apache is an unnecessary complication for the moment and I am focused now on getting things to work through port 8080. But Tomcat does serve up pages when I run the app through Apache---for one thing, the error messages are Tomcat-generated, not Apache, and for another, the servlets do work, which Apache cannot make happen without Tomcat. I don't fully understand the invoker servlet myself, but here's what I think I know: The invoker mapping only applies to servlets, not html or jsps, and the servlets are working (at least through Apache). If the invoker mapping specifies /servlets/* then servlets must be included in the URL. By taking it out of the invoker mapping, it does not need to be included in the URL. So, http://localhost/servlets/do_something is required if the mapping is as you say it should be, and http://localhost/do_something is the URL if the mapping is as I have it. Is that not correct? Jerry Parsons Technical Services wrote: Tomcat manager shows EBook is running. And, when I request it through Apache, Tomcat does serve it up. When I request it through port 8080, Tomcat says it's not available: I suggest for now you forget running via Apache totally, since if it is not working directly from Tomcat, it cannot be running via Apache. What you see Tomcat is serving via Apache, actually it is not, rather the Apache itself is serving it. You say Tomcat manager shows EBook is running, did you run localhost:8080//manager/list? Can you post the result of the url? Jerry, I think BAO is right about apache here. I have a stand alone setup and did a quick test of something. You have in your web.xml: servlet-mapping servlet-nameinvoker/servlet-name url-pattern/*/url-pattern /servlet-mapping When I set mine to this I get 404 resource not found. Curiously, even though it gave a 404 resource not found, the manager showed it running. But with this it works fine. servlet-mapping servlet-nameinvoker/servlet-name url-pattern/servlet/*/url-pattern /servlet-mapping I had this same problem myself. Sorry I didn't spot it sooner. Doug - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: jsp deployment
Sorry had a typo: resource not found should be: resource not available Thinking one thing typing another. Doug - Original Message - From: Parsons Technical Services [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Saturday, February 14, 2004 2:10 PM Subject: Re: jsp deployment Tomcat manager shows EBook is running. And, when I request it through Apache, Tomcat does serve it up. When I request it through port 8080, Tomcat says it's not available: I suggest for now you forget running via Apache totally, since if it is not working directly from Tomcat, it cannot be running via Apache. What you see Tomcat is serving via Apache, actually it is not, rather the Apache itself is serving it. You say Tomcat manager shows EBook is running, did you run localhost:8080//manager/list? Can you post the result of the url? Jerry, I think BAO is right about apache here. I have a stand alone setup and did a quick test of something. You have in your web.xml: servlet-mapping servlet-nameinvoker/servlet-name url-pattern/*/url-pattern /servlet-mapping When I set mine to this I get 404 resource not found. Curiously, even though it gave a 404 resource not found, the manager showed it running. But with this it works fine. servlet-mapping servlet-nameinvoker/servlet-name url-pattern/servlet/*/url-pattern /servlet-mapping I had this same problem myself. Sorry I didn't spot it sooner. Doug - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: jsp deployment
I don't fully understand the invoker servlet myself, but here's what I think I know: Nor do I. I am just going by what I have encountered and how I fixed it. The invoker mapping only applies to servlets, not html or jsps, and the servlets are working (at least through Apache). If the invoker mapping specifies /servlets/* then servlets must be included in the URL. By taking it out of the invoker mapping, it does not need to be included in the URL. So, http://localhost/servlets/do_something is required if the mapping is as you say it should be, and http://localhost/do_something is the URL if the mapping is as I have it. Is that not correct? As for the URL: For .jsp and html I do a http://localhost/golf/index.html and it works fine. Where golf is the context path. For servlets it may be true. I am not hitting any servlets directly. As for applying to .jsp or html: In my case the application will not serve up .jsp or html unless it is /servlet/*. Which may mean that I have some errors elsewhere. Doug - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomcat running as NT service can't locate JNI DLLs
I have a web app that utilizes various 3rd party/in-house JNI DLLs, but System.loadLibrary() fails to locate them only when Tomcat 4.1 is run as a service under Win2k. Two odd surrounding issues: (a) Tomcat is run from Drive D:, the DLLs are located drive D:\myDLLs and the system PATH has D:\myDLLs directory in it. (b) Running Tomcat in console mode _works_ with the DLLs in D:\myDLLs. (c) Running Tomcat as a service fails however...but if I simply move the DLLs to C:\myDLLs it works. So, on the surface it seems to be ignoring the drive prefix in the PATH. I've tried un-installing, then re-installing the Tomcat service using the '-path' option pointing to D:\myDLLs directory, but it still fails. I have a feeling I'm missing something fundamental, but I'm just not seeing it. Has anyone dealt with this before? Thanks in advance Mark - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: jsp deployment
Hi Jerry, You *are* right in saying that there is no additional configuration necessary for Tomcat to serve JSP files. The way I see it, there are several possibilities: 1. If you say that you can access your web application servlets, that means that your web application has been deployed correctly. This means that the 404 error is not related to that reason (if indeed your servlets can be accessed) 2. If you changed the filename and filename extension (i.e. changed it from open.jsp tp open.txt or open.html), and you still cannot even find the page, 2 possibilities come to my mind : - your URL is wrong : that is, if your web application is called EBook and the servlets are accessed using the URL http://localhost/EBook/servlet/someservlet, then your JSP file can only be accessed using the URL http://localhost/EBook/open.jsp. Ok, say you don't want to go through Apache, then you type http://localhost:8080/EBook/open.jsp. Notice that in both cases, you don't use the invoker (i.e. no servlet in the URL). Using the invoker is wrong for JSPs. - you mistyped the filename. This is not so uncommon as you might think. The problem is that, depending on your browser, the browser may cache the results. For example, if you are using Mozilla, if you get a 404 error once and re-type the URL again, you will always get a 404 error, until you clear your cache! Make sure you clear your cache before you try accessing the page again. 3. You must be very tired and frustrated. Try taking a long break, go for a run or something. Then come back to try again. You may even get the whole thing working automagically ! I have written a step by step on deploying web applications at http://cymulacrum.net/tomcat_toc.html because I thought this was the weakest part of the Tomcat documentation. Try working through my toy example there and see if it works. Regards, pascal chong Jerry Ford wrote: Yes, I agree, Apache is an unnecessary complication for the moment and I am focused now on getting things to work through port 8080. But Tomcat does serve up pages when I run the app through Apache---for one thing, the error messages are Tomcat-generated, not Apache, and for another, the servlets do work, which Apache cannot make happen without Tomcat. I don't fully understand the invoker servlet myself, but here's what I think I know: The invoker mapping only applies to servlets, not html or jsps, and the servlets are working (at least through Apache). If the invoker mapping specifies /servlets/* then servlets must be included in the URL. By taking it out of the invoker mapping, it does not need to be included in the URL. So, http://localhost/servlets/do_something is required if the mapping is as you say it should be, and http://localhost/do_something is the URL if the mapping is as I have it. Is that not correct? Jerry - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Help to configure jk2 on Win2003!
Hello all! I'm confused. Once I did my own configuration Apache2+Tomcat via jk2. Then I back to my old config with jk1.2. It works fine now by the way. I want to configure jk2 again and i cant. I forgot something. I've read the documentation, I have tryed a big amount of configurations and I cant configure it. I am NOT a professional so I need your help now. I am running Win 2003+Apache2.0.48+Tomcat5.0.18. Can you can help me to configure it? Because this thing is killnig me! I know I am wrong but I am really tired and confused to find where. Here is my configuration for two hosts - tell me what I must change/add/delete to make it work please: 1) server.xml: Connector port=8009 minProcessors=5 maxProcessors=75 acceptCount=10 debug=0 connectionTimeout=2 useURIValidationHack=false protocolHandlerClassName=org.apache.jk.server.JkCoyoteHandler / enableLookups=false redirectPort=8443 debug=0 protocol=AJP/1.3 / Logger className=org.apache.catalina.logger.FileLogger directory=logs prefix=catalina_log. suffix=.txt timestamp=true / Valve className=org.apache.catalina.valves.AccessLogValve directory=D:/apache_home/Tomcat5.0.18/logs prefix=localhost_access_log. suffix=.txt pattern=common resolveHosts=false / Host name=host.com debug=0 appBase=D:/apache_home/Apache2/htdocs unpackWARs=true autoDeploy=true xmlValidation=false xmlNamespaceAware=false Aliaslocalhost/Alias Alias127.0.0.1/Alias Context path= docBase= debug=1 / Valve className=org.apache.catalina.valves.AccessLogValve directory=D:/apache_home/Tomcat5.0.18/logs prefix=host_access_log. suffix=.txt pattern=common resolveHosts=false / /Host Host name=site.com debug=0 appBase=D:/apache_home/Apache2/htdocs/clients/site.com/public_html unpackWARs=true autoDeploy=true xmlValidation=false xmlNamespaceAware=false Context path= docBase= debug=1 / Valve className=org.apache.catalina.valves.AccessLogValve directory=D:/apache_home/Tomcat5.0.18/logs prefix=site_access_log. suffix=.txt pattern=common resolveHosts=false / /Host Realm className=org.apache.catalina.realm.UserDatabaseRealm debug=0 resourceName=UserDatabase / 2) jk2.properties: handler.list=apr,request,channelJni,channelSocket channelSocket.port=8009 # I dont know if I need jni because i dont use it apr.jniModeSo=D:/webexec/apache_home/Apache2/modules/mod_jk2.dll apr.jniModeSo=inprocess 3) workers2.properties: [logger.apache2] level=DEBUG [shm:] info=Scoreboard. file=D:/apache_home/apache2/logs/jk2.shm size=1048576 debug=0 disabled=0 [lb:lb] info=Default load balancer. debug=0 [ajp13:localhost:8009] channel=channel.socket:localhost:8009 [channel.socket:host.com:8009] info=Ajp13 forwarding over socket debug=0 tomcatId=tc1 lb_factor=1 group=lb [channel.socket:site.com:8009] info=A second tomcat instance. debug=0 tomcatId=tc1 lb_factor=1 group=lb disabled=0 [uri:host.com/*.jsp] worker=ajp13:host.com:8009 [uri:site.com/*.jsp] worker=ajp13:site.com:8009 3) httpd.conf: LoadModule jk2_module D:/apache_home/apache2/modules/mod_jk2.dll #For every Virtual Host: Location /*.jsp JkUriSet worker ajp13:host.com:8009 /Location Thank God that this list exists and thank you, thank you very-very much for any help! - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
how to increase tomcat performance
Hi All, I am running Tomcat 4 and Apache 1.3 and Struts Framework on Sun Sparc machine having O.S 5.8 version. Web application is developed to use Postgres Database also. I am facing lots of performance issues with Tomcat i.e sometimes when user connection increases tomcat process hangs and website stops opening and some times it goes very slow. The Problem gets sloved when i restart the tomcat service again. Somebody please help me .. Regards, Deepak
Re: jsp deployment
Well, that's odd I followed your advice, BAO RuiXian. I created a dirctory called test and deployed it, with successful results as noted in previous e-mail. Since it did deploy successfully, I wondered what would happen if I copied the contents of the EBook directory---all of it, including html, jps, servlets, and xml files---into the test directory and ran the EBook app from there. And it worked. Everything, including the jsp file that triggered my initial question to the forum. The EBook app works find from the test directory, as the test webapp. Then I went a step further and configured Apache to recognize the test app. And it worked, too. So, my EBook app works whether called directly from Tomcat or from Tomcat via Apache, if deployed in the test directory, but not in the EBook directory, even though the context in server.xml is identical in every respect except directory name. I don't get it. Now I need to get it to work under the name EBook, not test. This is really strange. Jerry Jerry Ford wrote: BAO RuiXian wrote: Jerry Ford wrote: Tomcat manager shows EBook is running. And, when I request it through Apache, Tomcat does serve it up. When I request it through port 8080, Tomcat says it's not available: I suggest for now you forget running via Apache totally, Agreed. since if it is not working directly from Tomcat, it cannot be running via Apache. What you see Tomcat is serving via Apache, actually it is not, rather the Apache itself is serving it. But Tomcat has to be serving up something; the servlets that are part of EBook do work and Apache can't serve them without Tomcat. You say Tomcat manager shows EBook is running, did you run localhost:8080//manager/list? Can you post the result of the url? Here is the output: OK - Listed applications for virtual host localhost /EBook:running:0:/usr/local/webserver/tomcat/webapps/EBook /manager:running:0:/usr/local/webserver/tomcat/server/webapps/manager /examples:running:0:examples /j_tools:running:0:/usr/local/webserver/webapps/j_tools /tomcat-docs:running:0:/usr/local/webserver/jakarta-tomcat-4.1.27/webapps/tomcat-docs /webdav:running:0:/usr/local/webserver/jakarta-tomcat-4.1.27/webapps/webdav /admin:running:0:/usr/local/webserver/tomcat/server/webapps/admin /:running:0:ROOT To further debug, can you do the following: 1. Make a 'test' directory under your webapps directory, i.e. paralell to examples and EBook; 2. Make a Context block in the server.xml file for 'test' by copy/paste/modify the Context block for examples; 3. Install this 'test' app by running localhost:8080/manager/install?war=test Then run localhost:8080/test, what happens? I get a Tomcat-generated directory listing for / Listing is, of course, empty, since there are no files in test. BTW, I really appreciate your help. Thanks. Best Bao Workshttp://localhost/EBook Doesn't workhttp://localhost:8080/EBook Works---http://localhost/examples/jsp Works---http://localhost:8080/examples/jsp Jerry BAO RuiXian wrote: Jerry Ford wrote: Sorry, that's a cut-and-paste error that does not appear in the real server.xml. Only one /context end tag; the root context is closed before the EBook context begins: context... / The configuration seems okay then. BTW, can you run http://localhost:8080/manager/list to see what apps you have installed? If you can not find 'EBook', then you need to install it by running http://localhost:8080/manager/install?war=EBook Best Bao - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: how to increase tomcat performance
first go over your configurations, make sure you have enabled enough threads for the connectors (read docs) then get a performance profiler and go to work :) tomcat is pretty optimized, so it could be something in your code Filip -Original Message- From: Deepak Hegde [mailto:[EMAIL PROTECTED] Sent: Saturday, February 14, 2004 8:03 PM To: [EMAIL PROTECTED] Subject: how to increase tomcat performance Hi All, I am running Tomcat 4 and Apache 1.3 and Struts Framework on Sun Sparc machine having O.S 5.8 version. Web application is developed to use Postgres Database also. I am facing lots of performance issues with Tomcat i.e sometimes when user connection increases tomcat process hangs and website stops opening and some times it goes very slow. The Problem gets sloved when i restart the tomcat service again. Somebody please help me .. Regards, Deepak --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.577 / Virus Database: 366 - Release Date: 2/3/2004 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.577 / Virus Database: 366 - Release Date: 2/3/2004 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: jsp deployment
Jerry, Try renaming EBook in the context and rename the directory to match. OR Remove the EBook app and then rename test to EBook. Wonder if there is a typo somewhere.. EBook..Ebook..EBooK..etc. It's a real bite what one letter can do. Doug - Original Message - From: Jerry Ford [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Saturday, February 14, 2004 11:09 PM Subject: Re: jsp deployment Well, that's odd I followed your advice, BAO RuiXian. I created a dirctory called test and deployed it, with successful results as noted in previous e-mail. Since it did deploy successfully, I wondered what would happen if I copied the contents of the EBook directory---all of it, including html, jps, servlets, and xml files---into the test directory and ran the EBook app from there. And it worked. Everything, including the jsp file that triggered my initial question to the forum. The EBook app works find from the test directory, as the test webapp. Then I went a step further and configured Apache to recognize the test app. And it worked, too. So, my EBook app works whether called directly from Tomcat or from Tomcat via Apache, if deployed in the test directory, but not in the EBook directory, even though the context in server.xml is identical in every respect except directory name. I don't get it. Now I need to get it to work under the name EBook, not test. This is really strange. Jerry Jerry Ford wrote: BAO RuiXian wrote: Jerry Ford wrote: Tomcat manager shows EBook is running. And, when I request it through Apache, Tomcat does serve it up. When I request it through port 8080, Tomcat says it's not available: I suggest for now you forget running via Apache totally, Agreed. since if it is not working directly from Tomcat, it cannot be running via Apache. What you see Tomcat is serving via Apache, actually it is not, rather the Apache itself is serving it. But Tomcat has to be serving up something; the servlets that are part of EBook do work and Apache can't serve them without Tomcat. You say Tomcat manager shows EBook is running, did you run localhost:8080//manager/list? Can you post the result of the url? Here is the output: OK - Listed applications for virtual host localhost /EBook:running:0:/usr/local/webserver/tomcat/webapps/EBook /manager:running:0:/usr/local/webserver/tomcat/server/webapps/manager /examples:running:0:examples /j_tools:running:0:/usr/local/webserver/webapps/j_tools /tomcat-docs:running:0:/usr/local/webserver/jakarta-tomcat-4.1.27/webapps/to mcat-docs /webdav:running:0:/usr/local/webserver/jakarta-tomcat-4.1.27/webapps/webdav /admin:running:0:/usr/local/webserver/tomcat/server/webapps/admin /:running:0:ROOT To further debug, can you do the following: 1. Make a 'test' directory under your webapps directory, i.e. paralell to examples and EBook; 2. Make a Context block in the server.xml file for 'test' by copy/paste/modify the Context block for examples; 3. Install this 'test' app by running localhost:8080/manager/install?war=test Then run localhost:8080/test, what happens? I get a Tomcat-generated directory listing for / Listing is, of course, empty, since there are no files in test. BTW, I really appreciate your help. Thanks. Best Bao Workshttp://localhost/EBook Doesn't workhttp://localhost:8080/EBook Works---http://localhost/examples/jsp Works---http://localhost:8080/examples/jsp Jerry BAO RuiXian wrote: Jerry Ford wrote: Sorry, that's a cut-and-paste error that does not appear in the real server.xml. Only one /context end tag; the root context is closed before the EBook context begins: context... / The configuration seems okay then. BTW, can you run http://localhost:8080/manager/list to see what apps you have installed? If you can not find 'EBook', then you need to install it by running http://localhost:8080/manager/install?war=EBook Best Bao - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: how to increase tomcat performance
Filip, Does this symptom sound similar to problems with memory leaks? Doug - Original Message - From: Filip Hanik (lists) [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED]; Deepak Hegde [EMAIL PROTECTED] Sent: Saturday, February 14, 2004 11:12 PM Subject: RE: how to increase tomcat performance first go over your configurations, make sure you have enabled enough threads for the connectors (read docs) then get a performance profiler and go to work :) tomcat is pretty optimized, so it could be something in your code Filip -Original Message- From: Deepak Hegde [mailto:[EMAIL PROTECTED] Sent: Saturday, February 14, 2004 8:03 PM To: [EMAIL PROTECTED] Subject: how to increase tomcat performance Hi All, I am running Tomcat 4 and Apache 1.3 and Struts Framework on Sun Sparc machine having O.S 5.8 version. Web application is developed to use Postgres Database also. I am facing lots of performance issues with Tomcat i.e sometimes when user connection increases tomcat process hangs and website stops opening and some times it goes very slow. The Problem gets sloved when i restart the tomcat service again. Somebody please help me .. Regards, Deepak --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.577 / Virus Database: 366 - Release Date: 2/3/2004 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.577 / Virus Database: 366 - Release Date: 2/3/2004 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: jsp deployment-- Clarification of Invoker
My understanding of invoker and my attempt to explain invoker and mapping. Please correct any error I have made. Jerry Ford wrote: I don't fully understand the invoker servlet myself, but here's what I think I know: The invoker mapping only applies to servlets, not html or jsps, and the servlets are working (at least through Apache). True. But if you have any links in the html or jsp page, it can prevent them from being displayed, at least this was true in my case. If the invoker mapping specifies /servlets/* then servlets must be included in the URL. By taking it out of the invoker mapping, it does not need to be included in the URL. So, http://localhost/servlets/do_something is required if the mapping is as you say it should be, and http://localhost/do_something is the URL if the mapping is as I have it. My current understanding is that without the invoker you have to use the full path including the package designation. Unless.. See below. With the invoker it will run ANY servlet in you app by entering the desired or undesired URL. IE it is a security issue. http://localhost/servlets/? when a value matching any of your servlets is entered it is run. As I stated earlier I wastn't hitting any servlets directly from the URL so I cannot attest to if this will work as you have it. All I know at this point is that my setup would not work this way /* but did with /servlet/*. But you are correct that you must have servlet in the URL in order for it to match the pattern with it my way. Now for the kicker. As stated above, the invoker is considered a security risk and should not be used. Instead you should define mapping for your servlets. Once this is done you can access only servlets that you want to be available from the outside and protect the ones you don't. And on top of that you can use any name you wish rather then the name of the servlet. From you web.xml you have: servlet servlet-name set_config /servlet-name servlet-class catseye.ebook.set_config /servlet-class /servlet This can be mapped by: servlet-mapping servlet-nameset_config/servlet-name url-pattern/sconfig/url-pattern servlet-mapping You can the call this servlet from within a html or jsp page with ./sconfig (don't miss leading period) or from the URL with http://localhost/EBook/sconfig . As pointed out in several articles if you change the name of the servlet the only change you have is in the mapping. All references will still point to sconfig that is mapped to the desired servlet. And yes I had code issues that cause me to require the invoker. Once I changed them to ./name the mapping then worked and I was able to remove the invoker completely. Sorry for the long post but thought I would pass along what I found out. Hope it helps. Doug Parsons www.parsonstechnical.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]