R: How to restart Tomca's service from a Web app?
Ok, thanks. I'll check it: but if anybody can give to me a code example or explain more deeply this or another solution let me know. Thanks a lot! Luca -Messaggio originale- Da: Nicholas Orr [mailto:[EMAIL PROTECTED]] Inviato: lunedì 16 dicembre 2002 23.54 A: 'Tomcat Users List' Oggetto: RE: How to restart Tomca's service from a Web app? I'm sure you could use some feature of asp to execute a batch file on your machine. I don't know the specifics but I have read about it during my ASP scripting. Ask at www.vbforums.com or www.devarticles.com or www.developerfusion.com Batch Script just needs two lines. net stop Tomcat Service Name net start Tomcat Service Name Nicholas Orr -Original Message- From: Luca Ventura [mailto:[EMAIL PROTECTED]] Sent: Monday, 16 December 2002 9:50 PM To: tomcat-user Subject: How to restart Tomca's service from a Web app? Hello everybody! I have installed IIS as Web Server and Tomcat 4.1.16 LE as plug-in of IIS to mangage Servlet/JSP pages (using isapi filter JK2 isapi_redirector.dll). I would like to know is there is some way to re-start Tomcat's service using some web application acessible from the Internet (it can be based on asp/jsp pages or servlets) to avoid to use the Services Panel of Windows 2000 Advanced Server. In fact it can happen I can not access remotely to the server machine where Tomcat is installed: so when I need I would like to be able to re-start Tomcat using some web application. Is it possible? Thanks everybody in advance! Luca ** The information contained in this e-mail is confidential and is intended only for the use of the addressee(s). If you receive this e-mail in error, any use, distribution or copying of this e-mail is not permitted. You are requested to forward unwanted e-mail and address any problems to the MIM Holdings Limited Support Centre. For general enquires: ++61 7 3833 8000 Support Centre e-mail: [EMAIL PROTECTED] Support Centre phone: Australia 1800500646 International ++61 7 38338042 ** -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Startup problems
Don't you have a web app with an invalid header in its web.xml ?? -Message d'origine- De : Aleksandr Shneyderman [mailto:[EMAIL PROTECTED]] Envoyé : lundi 16 décembre 2002 17:59 À : Tomcat User List Objet : Startup problems I get the following error on the startup: Starting service Tomcat-Standalone Apache Tomcat/4.1.16 Dec 16, 2002 11:52:56 AM org.apache.commons.digester.Digester fatalError SEVERE: Parse Fatal Error at line 5 column 7: White spaces are required between publicId and systemId. org.xml.sax.SAXParseException: White spaces are required between publicId and systemId. at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseExcep tion(ErrorHand lerWrapper.java:232) at org.apache.xerces.util.ErrorHandlerWrapper.fatalError(ErrorHan dlerWrapper.ja va:213) at org.apache.xerces.impl.XMLErrorReporter.reportError(XMLErrorRe porter.java:37 5) at org.apache.xerces.impl.XMLErrorReporter.reportError(XMLErrorRe porter.java:30 5) at org.apache.xerces.impl.XMLScanner.reportFatalError(XMLScanner. java:1269) at org.apache.xerces.impl.XMLScanner.scanExternalID(XMLScanner.java:953) at org.apache.xerces.impl.XMLDocumentScannerImpl.scanDoctypeDecl( XMLDocumentSca nnerImpl.java:486) at org.apache.xerces.impl.XMLDocumentScannerImpl$PrologDispatcher .dispatch(XMLD ocumentScannerImpl.java:714) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocu ment(XMLDocume ntFragmentScannerImpl.java:329) at org.apache.xerces.parsers.DTDConfiguration.parse(DTDConfigurat ion.java:525) at org.apache.xerces.parsers.DTDConfiguration.parse(DTDConfigurat ion.java:581) at org.apache.xerces.parsers.XMLParser.parse(XMLParser.java:152) at org.apache.xerces.parsers.AbstractSAXParser.parse(AbstractSAXP arser.java:117 5) at org.apache.commons.digester.Digester.parse(Digester.java:1495) at org.apache.catalina.startup.ContextConfig.applicationConfig(Co ntextConfig.ja va:282) at org.apache.catalina.startup.ContextConfig.start(ContextConfig. java:639) at org.apache.catalina.startup.ContextConfig.lifecycleEvent(Conte xtConfig.java: 243) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(L ifecycleSuppor t.java:166) at org.apache.catalina.core.StandardContext.start(StandardContext .java:3567) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188) at org.apache.catalina.core.StandardHost.start(StandardHost.java:738) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:347) at org.apache.catalina.core.StandardService.start(StandardService .java:497) at org.apache.catalina.core.StandardServer.start(StandardServer.j ava:2189) at org.apache.catalina.startup.Catalina.start(Catalina.java:512) at org.apache.catalina.startup.Catalina.execute(Catalina.java:400) at org.apache.catalina.startup.Catalina.process(Catalina.java:180) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccess orImpl.java:39 ) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMeth odAccessorImpl .java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203) Dec 16, 2002 11:52:57 AM org.apache.coyote.http11.Http11Protocol start Does anyone have an idea of what is happening? Thanks, Alex -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
CLIENT-CERT over secure and non-secure connectors
Hi all, I have an unusual set-up/configuration question. I wish to have a single instance of a web-app accessible over both http and https (with the https users authenticating with client certificates). The reason for this configuration is that the un-secure port may be handling traffic coming over (say) a VPN - which already has all of the security required. Whereas the secure port may be more open and available to the general public. However if I add auth-methodCLIENT-CERT/auth-method Along with the other necessary security setup stuff in my web-app web.xml file it uses the SSLAuthenticator valve when processing both the HTTP as well as the HTTPS requests. Meaning traffic coming over the standard HTTP gets stopped with errors like no certificate chain Can anyone see any way to have the one web-app require client-certification when the user comes over HTTPS but allow them access when they come over HTTP? Regards, Michael Yates Software Engineer Australia (Wollongong) RD [EMAIL PROTECTED] ESN 639-7547 Direct +61 2 42547547
unpackWARs=false?
Has anybody been able to deploy .war files with this set? unpackWARs=false If so can you post a mocked up part of your server.xml and directory structure please. Andoni. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Almost there...Updated Apach-Tomcat with mod_jk .. please he lp!
* Denise Mangano [EMAIL PROTECTED] [1236 09:36]: I do have appropriate permissions, as I have been able to stop it before. There is no error message being logged when I try to stop it. I ran ps -A which listed all processes. httpd (apache) was not one of them. I am assuming PID means Port ID(?), and neither 443 nor 80 was listed... Use this next time: netstat -an|grep LISTEN|grep 443 Nice simple way to show what's listening on a port, and pretty portable AFAIK. -- Rasputin :: Jack of All Trades - Master of Nuns -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Apache-Tomcat HOWTO
* Turner, John [EMAIL PROTECTED] [1201 14:01]: Not sure what JK2 needs to work, I don't use it. You should be able to build it from the same source package as JK. I was able to do so on my Red Hat test box, but it took quite a bit of hacking around. But you need a local install of Java; is that right? JK isn't really deprecated, the dev team is just pursuing JK2. In my opinion, JK is quite stable and JK2 is not ready for prime time, though that is my personal preference. Ok, thanks. I setup a Coyote/JK2 Connector on the tomcat side and used mod_jk to forward AJP13 requests to it. That seems to work pretty well, although am I right in thinking a JkMount command can only forward URIs 'as-is'? i.e if I set JkMount /neotokyo/* lb then the request is going to be sent as a request to /neotokyo/whatever.jsp - that is, as a request for whatever.jsp in the context neotokyo to the default Host element in my engine? I might have missed something, but don't see how else it could work. The workers aren't URL aware, they just shovel requests into sockets. Doesn't this mean that if you mapped *.jsp, you'd need either a ROOT context with directories mirroring Apaches tree, or a Context for each top-level directory on the Apache side? And is the Host part of the protocol, so you can dedicate virtual hosts to AJP clients? I got around this by having a Tomcat virtual host with the DNS name of the Apache webserver, and setting it as the Engines default host - since no HTTP requests should come into tomcat asking for that host, it solves the problem but is pretty clanky. If these seem to be odd questions, bear in mind I'm comparing this to a mod_proxy / Coyote Proxy Connector solution, which seems more flexible on first impression. I just wanted to be sure I know how this works, also does anyone know if jk2 addresses these issues? Thanks a lot. -- Rasputin :: Jack of All Trades - Master of Nuns -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Multiple realms in tomcat
* Ben Jessel [EMAIL PROTECTED] [1238 17:38]: Can you set up multiple JDBC realms in tomcat 4x or are you stuck with just the one? From: http://jakarta.apache.org/tomcat/tomcat-4.1-doc/config/realm.html You may nest a Realm inside any Catalina container (Engine, Host, or Context). In addition, Realms associated with an Engine or a Host are automatically inherited by lower-level containers, unless explicitly overridden. I haven't tried it, but it sounds like it'll work. Also, say that you had no control over configuring server.xml ( say, you had web-app space with an ISP ) is there any way you could configure a web-application wide realm without having to play around with other configuration files? As far as I know, Realms exist on the server level, so if you're asking about configuring one from web.xml, forget it. If you've got autoDeploy enabled for your webapps folder, though, you can probably add a 'context.xml' file in there which contains a Realm - that would mean you could avoid editing server.xml... See: http://jakarta.apache.org/tomcat/tomcat-4.1-doc/config/host.html#Automatic%20Application%20Deployment -- Rasputin :: Jack of All Trades - Master of Nuns -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Help needed in Tomcat4.0.3
How do I find out the number of active sessions running in Tomcat. I'm using tomcat 4.0.3. TIA Santosh __ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
lost request
Hi, I'm using apache(1.3.26)-tomcat(4.1.12) (warp connector) for my application. When I test my application with IE everything works fine until I press the browser back button. once I press the back button I loose my request and I could not fetch any form elements in my destination jsp. Did anyone have the same problem? Please help. Thanks Deepa This email has been scanned for all viruses by the MessageLabs SkyScan service. For more information on a proactive anti-virus service working around the clock, around the globe, visit http://www.messagelabs.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Tomcat 4.1.12 - installation _ Problems with the examples
Hi List! After installing Tomcat 4.1.12 under Linux (Suse 8.1) just out of the box (RPM, full-version) we have the problem, that the example-pages dont work. Does anybody know help? Failure as follows: HTTP Status 500 - type Exception report message description The server encountered an internal error () that prevented it from fulfilling this request. exception org.apache.jasper.JasperException: Unable to compile class for JSP at org.apache.jasper.JspCompilationContext.compile(Unknown Source) at org.apache.jasper.servlet.JspServletWrapper.service(Unknown Source) at org.apache.jasper.servlet.JspServlet.serviceJspFile(Unknown Source) at org.apache.jasper.servlet.JspServlet.service(Unknown Source) at javax.servlet.http.HttpServlet.service(HttpServlet.java) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Unknown Source) at org.apache.catalina.core.ApplicationFilterChain.doFilter(Unknown Source) at org.apache.catalina.core.StandardWrapperValve.invoke(Unknown Source) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok eNext(Unknown Source) at org.apache.catalina.core.StandardPipeline.invoke(Unknown Source) at org.apache.catalina.core.ContainerBase.invoke(Unknown Source) at org.apache.catalina.core.StandardContextValve.invoke(Unknown Source) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok eNext(Unknown Source) at org.apache.catalina.core.StandardPipeline.invoke(Unknown Source) at org.apache.catalina.core.ContainerBase.invoke(Unknown Source) at org.apache.catalina.core.StandardContext.invoke(Unknown Source) at org.apache.catalina.core.StandardHostValve.invoke(Unknown Source) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok eNext(Unknown Source) at org.apache.catalina.valves.ErrorDispatcherValve.invoke(Unknown Source) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok eNext(Unknown Source) at org.apache.catalina.valves.ErrorReportValve.invoke(Unknown Source) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok eNext(Unknown Source) at org.apache.catalina.core.StandardPipeline.invoke(Unknown Source) at org.apache.catalina.core.ContainerBase.invoke(Unknown Source) at org.apache.catalina.core.StandardEngineValve.invoke(Unknown Source) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok eNext(Unknown Source) at org.apache.catalina.core.StandardPipeline.invoke(Unknown Source) at org.apache.catalina.core.ContainerBase.invoke(Unknown Source) at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:431) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConne ction(Http11Protocol.java:386) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:537) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav a:533) at java.lang.Thread.run(Thread.java:536) root cause java.io.FileNotFoundException: /var/tomcat4/work/Standalone/localhost/_/index_jsp.java (No such file or directory) at java.io.FileOutputStream.open(Native Method) at java.io.FileOutputStream.(FileOutputStream.java:176) at java.io.FileOutputStream.(FileOutputStream.java:70) at org.apache.jasper.compiler.Compiler.generateJava(Unknown Source) at org.apache.jasper.compiler.Compiler.compile(Unknown Source) at org.apache.jasper.JspCompilationContext.compile(Unknown Source) at org.apache.jasper.servlet.JspServletWrapper.service(Unknown Source) at org.apache.jasper.servlet.JspServlet.serviceJspFile(Unknown Source) at org.apache.jasper.servlet.JspServlet.service(Unknown Source) at javax.servlet.http.HttpServlet.service(HttpServlet.java) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Unknown Source) at org.apache.catalina.core.ApplicationFilterChain.doFilter(Unknown Source) at org.apache.catalina.core.StandardWrapperValve.invoke(Unknown Source) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok eNext(Unknown Source) at org.apache.catalina.core.StandardPipeline.invoke(Unknown Source) at org.apache.catalina.core.ContainerBase.invoke(Unknown Source) at org.apache.catalina.core.StandardContextValve.invoke(Unknown Source) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok eNext(Unknown Source) at org.apache.catalina.core.StandardPipeline.invoke(Unknown Source) at org.apache.catalina.core.ContainerBase.invoke(Unknown Source)
Re: Workaround for login page direct reference
I'm going to have to sort this myself in the near future, but I don't quite see how the fact that you can forward to the protected resource is going to help? Isn't Tomcat going to automatically redirect (not forward - the distinction is important since redirecting will result in the login page's URL showing up in the browser's address bar) to the login page you've configured? Actually... since redirecting causes the browser to initiate a new request (for your WEB-INF/login page in this case), won't you get a 404-type error? Someone posted in a similar thread the other day that they intended to check a couple of things in the login page: 1. request.getRequestedSessionId() is *NULL* and 2. There is *NO* cookie named JSESSIONID I think the theory was that these would both be true on the first occasion the login page was accessed, but that if the user was already authenticated then the conditions wouldn't hold so the page should redirect to the index page. It's not nice to be relying on a cookie name (what if they change it between versions, or if cookies are turned off (though I'm not sure the authentication works then anyway!)?) but I'm inclined to move in that direction when it's my turn Mike. - Original Message - From: Ben Jessel [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED]; Brett M. Bergquist [EMAIL PROTECTED] Sent: Tuesday, December 17, 2002 10:55 AM Subject: Re: Workaround for login page direct reference I'll give that a go. Thanks Ben - Original Message - From: Brett M. Bergquist [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED]; Ben Jessel [EMAIL PROTECTED] Sent: Monday, December 16, 2002 8:54 PM Subject: Re: Workaround for login page direct reference Ben, I'm not sure but I believe that I've seen mention that you can forward to a page that is not accessible to the outside. That is, put the Login.jsp page within WEB-INF of your web app and it will not be available to the outside world but you can forward to it from inside the web app. I don't know if this will work because I have not tried it but it might. Brett ... -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Tomcat 4.1.12 - installation _ Problems with the examples
Seems that jasper failed to generate the java file for the index.jsp. Make shure that the user that is running tomcat has the right to create files in /var/tomcat4/work/Standalone/localhost/_ Have a look in the log files if you can see aditional messages. -Original Message- From: Bührle, Martin, FCI1 [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 17, 2002 12:23 PM To: '[EMAIL PROTECTED]' Subject: Tomcat 4.1.12 - installation _ Problems with the examples java.io.FileNotFoundException: /var/tomcat4/work/Standalone/localhost/_/index_jsp.java (No such file or directory) -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
AW: Tomcat setup troubles
Many thanks, Lee! Do I stick it into user variables or system variables or both? * -Ursprüngliche Nachricht- * Von: Lee Chin Khiong [mailto:[EMAIL PROTECTED]] * Gesendet: Dienstag, 17. Dezember 2002 04:17 * An: 'Tomcat Users List' * Betreff: RE: Tomcat setup troubles * * * You should set JAVA_HOME as C:\j2sdk1.4.1_01 * * -Original Message- * From: Ines Robbers [mailto:[EMAIL PROTECTED]] * Sent: 17 December 2002 09:23 * To: 'Tomcat Users List' * Subject: Tomcat setup troubles * * * Hello again, * * Sorry to bother you with these simple things but could * someone tell me whether this is correct: * * I tried to set up the environment variable like this: * * CATALINA_HOMEC:\Programme\Apache Group\Tomcat 4.1 * * I put it into both the user variables and system variables. * Is this correct? * * Also I set a JAVA_HOME variable like this: * * JAVA_HOME C:\j2sdk1.4.1_01\bin * * The problem is that when I type in the Prompt field I get the error * message: JAVA_HOME variable is not defined. * Also a window popps up saying: -djava.endorse= could not be found... * * Tomcat is installed under C:\Programme\Apache Group\Tomcat 4.1 * The JavaEngine under C:\j2sdk1.4.1_01 * * I'd appreciate any hint how I could get Tomcat to work!! * * Many thanks * * Ines * * * * * * -- * To unsubscribe, e-mail: * mailto:tomcat-user-* [EMAIL PROTECTED] * For * additional commands, * e-mail: mailto:[EMAIL PROTECTED] * -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: connecting Apache2.x and tomcat 4.1.x, mod_jk
I don't use Windows for any server-related tasks, so I can't really help you. All I can say is that it does work on Windows, many people use Windows for development on this list. One thing I can suggest is that WINDOWS\SYSTEM is the exact wrong place to put the DLL. The DLL belongs in APACHE_HOME/modules (2.x) or APACHE_HOME/libexec (1.3.x). Also, wherever possible, do not use pathnames with spaces. John -Original Message- From: cvrajasekhar murthy [mailto:[EMAIL PROTECTED]] Sent: Monday, December 16, 2002 11:53 PM To: Tomcat Users List Subject: RE: connecting Apache2.x and tomcat 4.1.x, mod_jk Hi John, the path on the c: drive is commented as I used it before n later I gave the path on the E:\Apache\apache2\modules in which I have the .dll file. since I have copied and pasted those 2 lines form the http.conf file n in the mail it got seperated n the c:\ was on the next ;line. But it was on the E: drive only n which it is showing correctly. -- #LoadModule jk_module c:\WINDOWS\SYSTEM\mod_jk-2.0.43.dll LoadModule jk_module modules/mod_jk-2.0.43.dll -- But all I wanted to know is why is it not able to know or get the dll file from the specified path I mentioned, if it can detect the path to prompt an error, why can't it load the .dll file from the same path? I have installed the Microsoft Installer befor ei installed the Apache server 2. Any mistake on that? else I couldn't load the apache 2 on my win 98 m/c. device attached to the system is not functioning This is really killin my spirits ,PLZ find me a way to get rid of this. Thank you and hoping for a best solution !! -bye --- Turner, John [EMAIL PROTECTED] wrote: You've got something messed up. Your httpd.conf is calling for the DLL file on your C drive, yet the error message is citing the E drive. Are you sure you don't have multiple Apache servers running somehow? Did you use an installer that may have put some hardcoded paths into your registry? The device attached to the system is not functioning message means you told me to get something off of a drive that does not exist, in this case, the E drive. John -Original Message- From: cvrajasekhar murthy [mailto:[EMAIL PROTECTED]] Sent: Saturday, December 14, 2002 6:39 AM To: [EMAIL PROTECTED] Subject: connecting Apache2.x and tomcat 4.1.x, mod_jk Hello, I'm facing with a problem in connecting Apache 2.0.39 Tomcat 4.1.x and JBOSS3 MY Configuration:- Apache 2.0.39 mod_jk-2.0.43.dll Tomcat 4.1.x Jboss3 windows 98 JDK1.4 I have done the httpd.conf file settings in the apache as shown below _ #LoadModule jk_module c:\WINDOWS\SYSTEM\mod_jk-2.0.43.dll LoadModule jk_module modules/mod_jk-2.0.43.dll __ PROBLEM : after I run the apache server I get this error: _ Syntax error on line 175 of E:/Apache/Apache2/conf/httpd.conf: Cannot load E:/Apache/Apache2/modules/mod_jk-2.0.43.dll into server: A device attached to the system is not functioning. --- The TOmcatserver is up n running with all the necessary changes made for the jk_MODULE.it is running on port 8080 I have mod_jk.dll and where can i get the mod_jk2.dll? I HUMBLY REQUEST ANY ONE OUT THERE TO PLEASE RESPOND TO MY PROBLEM AND KINDLY REQUEST YOU TO GIVE ME A SOLUTION.PLEASE DO GIVE ME IF YOU HAVE ANY URLS ON THIS SUBJECT. Thank You, -bye __ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] __ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.419 / Virus Database: 235 - Release Date: 11/13/2002 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.419 / Virus Database: 235 - Release Date: 11/13/2002 -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Tomcat setup troubles
System. John -Original Message- From: Ines Robbers [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 17, 2002 6:30 AM To: 'Tomcat Users List' Subject: AW: Tomcat setup troubles Many thanks, Lee! Do I stick it into user variables or system variables or both? * -Ursprüngliche Nachricht- * Von: Lee Chin Khiong [mailto:[EMAIL PROTECTED]] * Gesendet: Dienstag, 17. Dezember 2002 04:17 * An: 'Tomcat Users List' * Betreff: RE: Tomcat setup troubles * * * You should set JAVA_HOME as C:\j2sdk1.4.1_01 * * -Original Message- * From: Ines Robbers [mailto:[EMAIL PROTECTED]] * Sent: 17 December 2002 09:23 * To: 'Tomcat Users List' * Subject: Tomcat setup troubles * * * Hello again, * * Sorry to bother you with these simple things but could * someone tell me whether this is correct: * * I tried to set up the environment variable like this: * * CATALINA_HOMEC:\Programme\Apache Group\Tomcat 4.1 * * I put it into both the user variables and system variables. * Is this correct? * * Also I set a JAVA_HOME variable like this: * * JAVA_HOME C:\j2sdk1.4.1_01\bin * * The problem is that when I type in the Prompt field I get the error * message: JAVA_HOME variable is not defined. * Also a window popps up saying: -djava.endorse= could not be found... * * Tomcat is installed under C:\Programme\Apache Group\Tomcat 4.1 * The JavaEngine under C:\j2sdk1.4.1_01 * * I'd appreciate any hint how I could get Tomcat to work!! * * Many thanks * * Ines * * * * * * -- * To unsubscribe, e-mail: * mailto:tomcat-user-* [EMAIL PROTECTED] * For * additional commands, * e-mail: mailto:[EMAIL PROTECTED] * -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.419 / Virus Database: 235 - Release Date: 11/13/2002 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.419 / Virus Database: 235 - Release Date: 11/13/2002 -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Help needed in Tomcat4.0.3
Use the Tomcat manager (how to is there on the site) with the list command. It will print out all the contexts with the number sessions for each of them. Praveen Wicliff - Original Message - From: Santosh Kulkarni [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, December 17, 2002 4:37 PM Subject: Help needed in Tomcat4.0.3 How do I find out the number of active sessions running in Tomcat. I'm using tomcat 4.0.3. TIA Santosh __ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Connection Pooling - additions to server.xml crashes 4.1.12
Can anybody shed any light on this. If I add this to my server XML file :- - Context path=/shilton docBase=shilton debug=5 reloadable=true crossContext=true Resource name=jdbc/shiltonDB auth=Container type=javax.sql.DataSource / - ResourceParams name=jdbc/shiltonDB - parameter namefactory/name valueorg.apache.commons.dbcp.BasicDataSourceFactory/value /parameter - parameter namemaxActive/name value100/value /parameter - parameter namemaxIdle/name value5/value /parameter - parameter namemaxWait/name value100/value /parameter - parameter nameusername/name valueINTERNET/value /parameter - parameter namepassword/name valueINTERNET/value /parameter - parameter namedriverClassName/name valuecom.ibm.as400.access.AS400JDBCDriver/value /parameter - parameter nameurl/name valuejdbc:as400://NORBERT/value /parameter /ResourceParams /Context When I try to publish via a war file Tomcat will not start. If I delete the war file and publish the folder manually Tomcat starts - have I done something wrong. Some notes - I have my test server installed on a WIN2K box and it works ok - I am using IBM's WSAD 4.0.3 so I presume the files are not published via a war. My production box is Linux RH7.2. Thanks for any input. Kevin -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: DB2 JDBC
Hi, Sherif D Mohamad wrote: Thanks for your help, I have done what you said, but I am running tomcat4 on Linux, Me too... I do not have tomcat_install_dir/bin/setclasspath.sh ?!?! in tomcat_install_dir/bin I have : bootstrap.jar commons-daemon.jar tomcat-jni.jar Did you installed it using RPM's ? What version are you using ? so I added JAVA_OPTS=-Djava.library.path=/db2_user_dir/sqllib/java12/ to tomcat_install_dir/conf/tomcat4.conf I don't have this file either. tomcat4.conf ? Mine is server.xml... I am not sure if that it right or wrong, will test and see, if you find I need something else pls advise. I don't know, your tomcat don't look like the one I use. F. Thank you. Sherif - Original Message - From: Fabio Mengue [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Monday, December 16, 2002 4:08 AM Subject: Re: DB2 JDBC Hello, DB2 JDBC library files are usually in db2_user_dir/sqllib/java12 The file name is db2java.zip. You can copy it to tomcat_install_dir/common/lib Change its name to db2java.jar or something with .jar extension, so Tomcat will be aware of it. I had to do other things to DB2 work. I added the line JAVA_OPTS=-Djava.library.path=/db2_user_dir/sqllib/java12/ To tomcat_install_dir/bin/setclasspath.sh, and copied db2profile to tomcat_install_dir/bin, changing its name to setenv.sh After that, DB2 worked :) Good luck, Fabio. Sherif D Mohamad wrote: I need to make JSP files on tomcat to connect to a DB2 database. I installed the DB2 client for Linux, but I have problems, how can I configure it to work with JSP files ? where is the JDBC ? -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- Fabio Mengue - Centro de Computacao - Unicamp [EMAIL PROTECTED] [EMAIL PROTECTED] Quem se mata de trabalhar merece mesmo morrer. - Millor -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- Fabio Mengue - Centro de Computacao - Unicamp [EMAIL PROTECTED] [EMAIL PROTECTED] [The Test of Negation] Don't include a sentence in documentation if its negation is obviously false. Bob Martin -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Invalidate Session Problem
I read your text many times but couldn't get to a conclusion. So, isn't there a way to force a logout and let the user authenticate again? At least with BASIC. On Mon, 16 Dec 2002 13:27:48 -0500 Michael Nicholson [EMAIL PROTECTED] wrote: From what I understand, the authorization header using BASIC authentication has a terrible way of hanging around in most (if not all) browsers. When you access the protected resource, and the browser receives the 'authentication needed' header, the browser returns whatever it has stored in its memory (i.e., your last login). I haven't heard of any sure-fire ways of stopping that, other than to restart the browser. This isn't, however, quite the same thing as invalidating a session. Invalidating a session simply means that the container (tomcat) is going to have to create a new session whenever you use request.getSession() (unless you use request.getSession(false) which will probably throw an exception) or browse to a jsp that hasn't been told not to use sessions. And the new session will have nothing in it that was put in it before the session.invalidate() call. I've never really looked at form based authentication; does it possibly store some sort of user credential in the session, which is therefore removed when the session is invalidated (effectively removed, anyhow, as I suppose it's still sitting in that invalidated session until garbage collection...), forcing another login? But basic authentication, at least as I understand it, doesn't store it that way. It gets stored in a header, and in the browser. Mike - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, December 16, 2002 12:58 PM Subject: Invalidate Session Problem Hello, I want to thanks the help for the other problem and ask another thing. It is about invalidating a session. While I was using the FORM to log into the apps I was able to invalidate my session, but now I am using the BASIC and it is not working. I read in some places that it may be a bug, is it and how can I invalidate the session with other way? Thanks. Ricardo Costa. Don't E-Mail, ZipMail! http://www.zipmail.com/ -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] Don't E-Mail, ZipMail! http://www.zipmail.com/ -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Multiple organisations in one realm with unique logins per organisations?
Hi there, I'm developing an application which will support multiple organisations within one realm and one MySQL database. When users log into the application, I would like to make them enter their organisation name, their login and their password. Combining the login and the organisation name identifies the user unique in the realm/database. Is this possible with the standard authentication in Tomcat? Or are there other ways to do this? Thanks, Marc P.S. I hope I explained this problem correctly. Otherwise, just ask for more information. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Multiple organisations in one realm with unique logins per organisations?
Sounds like you're going to need to create a custom realm in order do do that extra select on the organisation. Though, if you're going to have unique usernames throughout the system ( regardless of organisation ), then you could work around this by having the organisations mapped to the user in the user_role table. eg, user password userA passA userB passB userC passC user role userA OrganisationA userB OrganisationA userC OrganisationC Then you could restrict access to the different organisational areas of the sites based on roles. Not the nicest solution, I think creating a custom realm would be much more up your street. It's in the documentation. Thanks Ben - Original Message - From: Marc van de Geijn [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Tuesday, December 17, 2002 12:12 PM Subject: Multiple organisations in one realm with unique logins per organisations? Hi there, I'm developing an application which will support multiple organisations within one realm and one MySQL database. When users log into the application, I would like to make them enter their organisation name, their login and their password. Combining the login and the organisation name identifies the user unique in the realm/database. Is this possible with the standard authentication in Tomcat? Or are there other ways to do this? Thanks, Marc P.S. I hope I explained this problem correctly. Otherwise, just ask for more information. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
bug in Tomcat 4 or .... what?
Hi, I have a servlet that opens a DataInputStrem on the request (see below) public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException{ try{ // Open the I/O streams DataInputStream in = new DataInputStream(request.getInputStream() ); After this pice of code I cant' access any more to the request parameters. Infact this code: request.getParameter(anyParameter) retrieves ALWAYS null. The strange thing is that this servlet was Ok for tomcat 3, but can't work any more with Tomcat4. Anyone can explain why opening a DataInputStream alters the HttpServletRequest? Thanks -- Ivan Venuti -- -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
[ANNOUNCE] JK 1.2.2 released
JK 1.2.2 maintenance release is available at : http://jakarta.apache.org/builds/jakarta-tomcat-connectors/jk/release/v1.2.2/ Changes with JK 1.2.2: * tomcat_trend.pl updated script to support changed logging of aborted requests * jk set correctly the content-type in Apache 2.0, making it ready to works with mod_deflate and AddOutputFilterByType * jk will check result of get_endpoint and handle a failure. This call can fail if the allocation for the endpoint fails because of low memory conditions causing a dereference of NULL when we try and access the endpoint Sources, Linux (flat/rpms) and iSeries binaries are already available, Windows, Solaris, MacOS X binaries will be released soon. Regards. iSeries Note: Previous JK binaries for iSeries (AS/400) were built without TERASPACE support nor multi-threading support code and should be considered incorrect. Production sites should upgrade to this version. Binaries Providers: We're looking for binaries contributors for AIX and FreeBSD (Apache 1.3 (w/wo SSL) and Apache 2.0.42 or higher). -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: unpackWARs=false?
Hi, If you set this property, that's (almost) all you have to do. You don't need to add anything else to a standard server.xml, all you do is drop the .war file into Tomcat's /webapps folder. Check the logs generated by Tomcat if you can't get any further... - Chris - Original Message - From: Andoni [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Tuesday, December 17, 2002 11:14 AM Subject: unpackWARs=false? Has anybody been able to deploy .war files with this set? unpackWARs=false If so can you post a mocked up part of your server.xml and directory structure please. Andoni. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Workaround for login page direct reference
Thanks Mike, I guess, another workaround is that you could just invalidate their session if they go to the login page Now, I still don't see how all this is going help that direct reference to login pageas it seems that I get this error if I go to login.jsp and then enter in my details. - Say the user goes to /login.jsp directly - If we've protecteed that page Tomcat goes, no - that's a protected resource, and forwards to /login.jsp Otherwise, tomcat just goes to the login page. - You enter the user details, and then tomcat tries to forward to the page you came from ( i.e login.jsp ), but detects this is invalid ( presumably by comparing against login-page in the web.xml, and displays an error - direct reference to login page What I'd really, really, like, is some way of having an intermediate page where I can check the requestURI to find out what page tomcat is going to redirect me *after* login, so tomcat would give me login.jsp?page_to_forward_to=blah.jsp... but alas, I don't think I can... - Original Message - From: Mike W-M [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Tuesday, December 17, 2002 11:28 AM Subject: Re: Workaround for login page direct reference I'm going to have to sort this myself in the near future, but I don't quite see how the fact that you can forward to the protected resource is going to help? Isn't Tomcat going to automatically redirect (not forward - the distinction is important since redirecting will result in the login page's URL showing up in the browser's address bar) to the login page you've configured? Actually... since redirecting causes the browser to initiate a new request (for your WEB-INF/login page in this case), won't you get a 404-type error? Someone posted in a similar thread the other day that they intended to check a couple of things in the login page: 1. request.getRequestedSessionId() is *NULL* and 2. There is *NO* cookie named JSESSIONID I think the theory was that these would both be true on the first occasion the login page was accessed, but that if the user was already authenticated then the conditions wouldn't hold so the page should redirect to the index page. It's not nice to be relying on a cookie name (what if they change it between versions, or if cookies are turned off (though I'm not sure the authentication works then anyway!)?) but I'm inclined to move in that direction when it's my turn Mike. - Original Message - From: Ben Jessel [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED]; Brett M. Bergquist [EMAIL PROTECTED] Sent: Tuesday, December 17, 2002 10:55 AM Subject: Re: Workaround for login page direct reference I'll give that a go. Thanks Ben - Original Message - From: Brett M. Bergquist [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED]; Ben Jessel [EMAIL PROTECTED] Sent: Monday, December 16, 2002 8:54 PM Subject: Re: Workaround for login page direct reference Ben, I'm not sure but I believe that I've seen mention that you can forward to a page that is not accessible to the outside. That is, put the Login.jsp page within WEB-INF of your web app and it will not be available to the outside world but you can forward to it from inside the web app. I don't know if this will work because I have not tried it but it might. Brett .. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Workaround for login page direct reference
Some more ideas... In my application I never have a direct link to the login.jsp. Try to link either to any file that will be accessed after login (e.g. content.jsp) or link only to the secure directory that you mapped and let the welcome-file redirect link to index.jsp or whatever. Doesn't solve the back button issue (check tomcat bug list), doesn't prohibit users to bookmark the login.jsp, but improves usability at least a bit by avoiding some opportunities to get errors. For your intermediate page thing I would suggest looking into using filters. Unfortunately nothing can prohibit the anyone from using the browser back button and try to relog again because in that back button case the login.jsp isn't even loaded again; so you can't even check for that error by any means. Michael -Original Message- From: Ben Jessel [mailto:[EMAIL PROTECTED]] Sent: Dienstag, 17. Dezember 2002 13:43 To: Tomcat Users List Subject: Re: Workaround for login page direct reference Thanks Mike, I guess, another workaround is that you could just invalidate their session if they go to the login page Now, I still don't see how all this is going help that direct reference to login pageas it seems that I get this error if I go to login.jsp and then enter in my details. - Say the user goes to /login.jsp directly - If we've protecteed that page Tomcat goes, no - that's a protected resource, and forwards to /login.jsp Otherwise, tomcat just goes to the login page. - You enter the user details, and then tomcat tries to forward to the page you came from ( i.e login.jsp ), but detects this is invalid ( presumably by comparing against login-page in the web.xml, and displays an error - direct reference to login page What I'd really, really, like, is some way of having an intermediate page where I can check the requestURI to find out what page tomcat is going to redirect me *after* login, so tomcat would give me login.jsp?page_to_forward_to=blah.jsp... but alas, I don't think I can... - Original Message - From: Mike W-M [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Tuesday, December 17, 2002 11:28 AM Subject: Re: Workaround for login page direct reference I'm going to have to sort this myself in the near future, but I don't quite see how the fact that you can forward to the protected resource is going to help? Isn't Tomcat going to automatically redirect (not forward - the distinction is important since redirecting will result in the login page's URL showing up in the browser's address bar) to the login page you've configured? Actually... since redirecting causes the browser to initiate a new request (for your WEB-INF/login page in this case), won't you get a 404-type error? Someone posted in a similar thread the other day that they intended to check a couple of things in the login page: 1. request.getRequestedSessionId() is *NULL* and 2. There is *NO* cookie named JSESSIONID I think the theory was that these would both be true on the first occasion the login page was accessed, but that if the user was already authenticated then the conditions wouldn't hold so the page should redirect to the index page. It's not nice to be relying on a cookie name (what if they change it between versions, or if cookies are turned off (though I'm not sure the authentication works then anyway!)?) but I'm inclined to move in that direction when it's my turn Mike. - Original Message - From: Ben Jessel [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED]; Brett M. Bergquist [EMAIL PROTECTED] Sent: Tuesday, December 17, 2002 10:55 AM Subject: Re: Workaround for login page direct reference I'll give that a go. Thanks Ben - Original Message - From: Brett M. Bergquist [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED]; Ben Jessel [EMAIL PROTECTED] Sent: Monday, December 16, 2002 8:54 PM Subject: Re: Workaround for login page direct reference Ben, I'm not sure but I believe that I've seen mention that you can forward to a page that is not accessible to the outside. That is, put the Login.jsp page within WEB-INF of your web app and it will not be available to the outside world but you can forward to it from inside the web app. I don't know if this will work because I have not tried it but it might. Brett .. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:tomcat-user- [EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
About URL containing jsessionid on Tomcat3.2.4
Hi. I was using tomcat3.2.3 and apache-1.3.27+SSL and mod_jk.so URL containing jsessionid (ex:aaa.jsp;jsessionid=XXX) no problem this enviroment. but Tomcat3.2.3 was upgraded to tomcat3.2.4 URL containing jsessionid 404 error httpsd.conf and mod_jk.conf is both same configraiton mod_jk.conf is mos_jk.conf-auto httpsd.conf is only include mod_jk.conf-auto Why is this? Please let me know. Shigeru Matsumoto **I am sorry that it is poor at English. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Virtual Domains with Tomcat 4.1.12 Standalone
webapps/host0/index.html . On Mon, 16 Dec 2002 18:46:28 -0500, Turner, John wrote: I'm sorry, what's wrong isn't exactly clear from your post. What should http://host0.com show besides the default welcome page? John -Original Message- From: J. Norment [mailto:[EMAIL PROTECTED]] Sent: Monday, December 16, 2002 4:27 PM To: Tomcat Users List Subject: Virtual Domains with Tomcat 4.1.12 Standalone I haven't seen this question answered yet: I'm trying to set up virtual domains with Tomcat 4.1.12. ( Not running Apache ) I have modified my server.xml file as follows. webapps/host0 contains a basic index.html . What might I be doing wrong? (http://host0.com shows the default index.jsp. ) Is there a way to see the information that Tomcat receives when http://host0.com is requested? ( thanks ) !-- Define the default virtual host -- Host name=localhost debug=0 appBase=webapps unpackWARs=true autoDeploy=true !-- This part is added: -- Host name=host0.com debug=0 appBase=webapps/host0 unpackWARs=true Logger className=org.apache.catalina.logger.FileLogger directory=logs prefix=host0. suffix=.log timestamp=true/ Context path= docBase=webapps/host0 debug=0 reloadable=true/ Context path=/test docBase=webapps/host0 debug=0 reloadable=true/ /Host !-- End, added part. -- !-- Normally, users must authenticate themselves to each web app individually. Uncomment the following entry if you would like a user to be authenticated the first time they encounter a resource protected by a security constraint, and then have that user identity maintained across *all* web applications contained in this virtual host. -- -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.419 / Virus Database: 235 - Release Date: 11/13/2002 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.419 / Virus Database: 235 - Release Date: 11/13/2002 -- To unsubscribe, e-mail: mailto:tomcat-user- [EMAIL PROTECTED] For additional commands, e-mail: mailto:tomcat-user- [EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Questions about tomcat as ps -ef
Hello, I am running tomcat jakarta-tomcat-4.0.4 and apache apache-1.3.27-2 My question is about all the tomcat processes/threads. It seems they never seem to go a way. I had to increase my maxProcessors=150 , because I was running out of connections between apache and tomcat. It seems that when I do a ps -ef | grep java | wc -l , that after a restart then number starts at my minProcessors count. But during the day the count continues to increase. My question is that the count never decreases. IS this normal? Thanks Randy -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Virtual Domains with Tomcat 4.1.12 Standalone
You want index.html to show instead of index.jsp? My tongue-in-cheek response is rename index.html to index.jsp. Another response would be check the welcome file element in web.xml for your webapp. John -Original Message- From: J. Norment [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 17, 2002 8:21 AM To: Tomcat Users List Subject: RE: Virtual Domains with Tomcat 4.1.12 Standalone webapps/host0/index.html . On Mon, 16 Dec 2002 18:46:28 -0500, Turner, John wrote: I'm sorry, what's wrong isn't exactly clear from your post. What should http://host0.com show besides the default welcome page? John -Original Message- From: J. Norment [mailto:[EMAIL PROTECTED]] Sent: Monday, December 16, 2002 4:27 PM To: Tomcat Users List Subject: Virtual Domains with Tomcat 4.1.12 Standalone I haven't seen this question answered yet: I'm trying to set up virtual domains with Tomcat 4.1.12. ( Not running Apache ) I have modified my server.xml file as follows. webapps/host0 contains a basic index.html . What might I be doing wrong? (http://host0.com shows the default index.jsp. ) Is there a way to see the information that Tomcat receives when http://host0.com is requested? ( thanks ) !-- Define the default virtual host -- Host name=localhost debug=0 appBase=webapps unpackWARs=true autoDeploy=true !-- This part is added: -- Host name=host0.com debug=0 appBase=webapps/host0 unpackWARs=true Logger className=org.apache.catalina.logger.FileLogger directory=logs prefix=host0. suffix=.log timestamp=true/ Context path= docBase=webapps/host0 debug=0 reloadable=true/ Context path=/test docBase=webapps/host0 debug=0 reloadable=true/ /Host !-- End, added part. -- !-- Normally, users must authenticate themselves to each web app individually. Uncomment the following entry if you would like a user to be authenticated the first time they encounter a resource protected by a security constraint, and then have that user identity maintained across *all* web applications contained in this virtual host. -- -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.419 / Virus Database: 235 - Release Date: 11/13/2002 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.419 / Virus Database: 235 - Release Date: 11/13/2002 -- To unsubscribe, e-mail: mailto:tomcat-user- [EMAIL PROTECTED] For additional commands, e-mail: mailto:tomcat-user- [EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Link pressed often - requests filtered?
I've got a problem when programming JSPs with Tomcat 4.0: There is a link on my JSP-generated page, like the following: http://localhost:8080/debug/ivr/IvrMain.jsp?Sel=2:0/1010 When the user clicks on the link, the page is refreshed: The same page is displayed, with some small changes. This refresh takes only a few milliseconds. My problem is: If the user hit's the link very often - e.g. twice a second - only some of the requests come through. It seems to me that the tomcat waits 1-2 seconds, before it accepts another request with exactly the same URL (from the same IP). I made some output for debugging purposes on to of the JSP-Page, which looks like following: %@ page errorPage=/errorpage.jsp% %@ page import=com.[...] com.[...]% % System.out.println (Page has been opened); /* debugging only */ if ( LoginChecker.redirectIfNotLoggedIn( session, response, ../firstSite.html ) ) return; % html head [...] The output was made only when the page was refreshed, too. So, the JSP was not even called, if the links is pressed to often. Of course, I spend some time searching on the web for this problem (maybe just a matter of configuration), but link or post are no great words to search for. Thanks for your help fABIAN -- __ /\_\__ Fabian Nilius [EMAIL PROTECTED] \/_/_/\ Nullum magnum ingenium sine mixtura dementiae fuit \_\/ -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Tomcat Administration Tool
Hi all, The Tomcat Admin Tool uses a UserDatabaseRealm for authentication and for editing as part of the configuration options. This uses the conf/tomcat-users.xml file for the source of information I was interested in knowing if anybody has configured Tomcat _and_ the Admin tool to use an alternate Realm, like JDBCRealm or a close cousin that the Admin Tool can manage ? I'd be interested in hearing from anybody who has gone down this path Cheers, -- jon -- Jon Eaves [EMAIL PROTECTED] http://www.eaves.org/jon/ -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Warp or Coyotte ? I'm so bad in my choice....
Thank you Guys for yur answers. I will try the mod_jk fashion, then. BTW We're using mod_webapp for some market trial on different SOLARIS 8 Servers, and encountered no pbs at all. Too bad developpers don't go further ! Jean-Luc B :O) Jean-Luc BEAUDET wrote: Hi all ! Using Apache 1.3.26 + Tomcat 4.0.2 Final Rel on SOLARIS. I decided to test My Apache with Tomcat 4.1.12. Actually i use mod_webapp for the WARP Connector. As i wanted to have some tests with Load Balancing and sessions tracking, i'm trying Tomcat 4.1.12. I had a look at the JTC doc: mod_jk2 Current developpements. Enabled by default in 4.1; works in 4.0. mod_jk2 supports in-process JVM and load balancing. See Coyote JK 2 http://petrus.fr.kodak.com:8080/tomcat-docs/config/jk2.html mod_webapp Not for Win32; no in-process nor load balancing; works in 4.x. Use APR http://apr.apache.org/ . Supported Apache-2.0 and Apache-1.3). See Webapp http://petrus.fr.kodak.com:8080/tomcat-docs/config/webapp.html So, the question. What is actually the best and strongest solution for what i'd like to do ? Any comments, links, welcome . TIA. Regards JLB :O) -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Virtual Domains with Tomcat 4.1.12 Standalone
Hmm. I think the answer to your question is no -- I am trying to get a very basic version of virtual domains working. I noted in the past that renaming index.jsp to index.notjsp and putting an index.html file in the /ROOT directory resulted in tomcat loading index.html. So... I'm trying to load index.html in a directory where no index.jsp exists. ( Should have the same result: [webapps/host0/]index.html should be loaded, assuming that Tomcat process the virtual host as I want it to. ) BTW: If I want a .jsp to be loaded instead of an .htm or .html (default behavior?) if both exist in the directory, Do I need that step with the web.xml file? On Tue, 17 Dec 2002 08:28:11 -0500, Turner, John wrote: You want index.html to show instead of index.jsp? My tongue-in-cheek response is rename index.html to index.jsp. Another response would be check the welcome file element in web.xml for your webapp. John -Original Message- From: J. Norment [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 17, 2002 8:21 AM To: Tomcat Users List Subject: RE: Virtual Domains with Tomcat 4.1.12 Standalone webapps/host0/index.html . On Mon, 16 Dec 2002 18:46:28 -0500, Turner, John wrote: I'm sorry, what's wrong isn't exactly clear from your post. What should http://host0.com show besides the default welcome page? John -Original Message- From: J. Norment [mailto:[EMAIL PROTECTED]] Sent: Monday, December 16, 2002 4:27 PM To: Tomcat Users List Subject: Virtual Domains with Tomcat 4.1.12 Standalone I haven't seen this question answered yet: I'm trying to set up virtual domains with Tomcat 4.1.12. ( Not running Apache ) I have modified my server.xml file as follows. webapps/host0 contains a basic index.html . What might I be doing wrong? (http://host0.com shows the default index.jsp. ) Is there a way to see the information that Tomcat receives when http://host0.com is requested? ( thanks ) !-- Define the default virtual host -- Host name=localhost debug=0 appBase=webapps unpackWARs=true autoDeploy=true !-- This part is added: -- Host name=host0.com debug=0 appBase=webapps/host0 unpackWARs=true Logger className=org.apache.catalina.logger.FileLogger directory=logs prefix=host0. suffix=.log timestamp=true/ Context path= docBase=webapps/host0 debug=0 reloadable=true/ Context path=/test docBase=webapps/host0 debug=0 reloadable=true/ /Host !-- End, added part. -- !-- Normally, users must authenticate themselves to each web app individually. Uncomment the following entry if you would like a user to be authenticated the first time they encounter a resource protected by a security constraint, and then have that user identity maintained across *all* web applications contained in this virtual host. -- -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.419 / Virus Database: 235 - Release Date: 11/13/2002 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.419 / Virus Database: 235 - Release Date: 11/13/2002 -- To unsubscribe, e-mail: mailto:tomcat-user- [EMAIL PROTECTED] For additional commands, e-mail: mailto:tomcat-user- [EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:tomcat-user- [EMAIL PROTECTED] For additional commands, e-mail: mailto:tomcat-user- [EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Simultaneous request from same IP
this goes along with the suggestion I made of using RequestDumperValve to dump the request to ensure that you are receiving 2 different requests. Charlie -Original Message- From: Mike W-M [mailto:[EMAIL PROTECTED]] Sent: Monday, December 16, 2002 8:08 PM To: Tomcat Users List Subject: Re: Simultaneous request from same IP Chris, I've played around with a servlet almost identical to your original (not full!) test-case (below). (Did you actually get the problem to appear on this one or is it just a theoretical cut-down of the larger example you posted later?) I've made - not exactly concurrent, but definitely sub-second-apart - requests from two instances of Internet Explorer. (Nifty finger/mouse coordination.) I cannot reproduce your confused results. [I've even added a thread.sleep(1) into the servlet to ensure that the requests are running (or at least in existence) concurrently. ] I still can't think of anything you're doing in the servlet that would produce the results you describe. I (still) think that the problem is most likely with your simultaneous requests themselves. How are you making these requests - via code? Can you reproduce the problem with nifty-I.E. fingerwork? Mike. - Original Message - From: Chris Bick [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Monday, December 16, 2002 3:13 PM Subject: RE: Simultaneous request from same IP Thanks for responding. I don't think it is an instance variable problem. Here is the code to reproduce the problem: public class AServlet extends HttpServlet { public void doGet(HttpServletRequest request, HttpServletResponse reponse) throws ServletException, IOException { printWriter pw = reponse.getWriter(); reponse.setContentType(text/html); synchronized(System.out) { System.out.println(Query String: + request.getQueryString()); System.our.println(Header : +request.getHeader(Test-Header); } out.println(Done); } Two different request hit this servlet about 1 sec apart everything is fine. It's only when they enter the servlet at the same time. I will submit a bug report if know one sees a problem with the above code. -cb -Original Message- From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]] Sent: Sunday, December 15, 2002 10:22 PM To: Tomcat Users List Subject: Re: Simultaneous request from same IP On Sun, 15 Dec 2002, Chris Bick wrote: Date: Sun, 15 Dec 2002 22:05:45 -0500 From: Chris Bick [EMAIL PROTECTED] Reply-To: Tomcat Users List [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: Simultaneous request from same IP Hello, Has anyone seen two requests from the same IP hitting a servlet at approximately the time result in the same query string and headers? I can reproduce this every time. Make two requests from one machine that hits my servlet at approximately the same time. Both HttpServletRequest objects contain query string and header information of the first request in. If the IPs are different everything works properly. This seems *much* more likely to be a thread-safety problem in your user code than a bug in Tomcat. For example, using instance variables in your servlet to store per-request state information is pretty much guaranteed to have difficulties. The only way to know for sure would be for you to post a bug report (http://nagoya.apache.org/bugzilla/) with a reproducible test case, so that Tomcat developers can see what you are seeing. Thanks, -cb Craig -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Connection Pooling - additions to server.xml crashes 4.1.12
If you name a context in server.xml, your .war file will *not* be expanded automatically. What you will need to do is stop Tomcat, manually expand the .war file to a directory named shilton and then restart. alternatively, you can avoid editing the server.xml and put this in a context configuration file. See the admin.xml and manager.xml files in webapps for examples. Basically, you just copy your entire Context ... entry to a separate .xml file. I'd name it the same thing as your webapp to make it clear what that file if for, but I don't think that is a requirement. Either way, you need to manually expand your .war file *before* tomcat is restarted. Alternatively, you can start Tomcat (making sure to have removed the Context ... entry from server.xml), create your context configuration file and name it context.xml. Put that in META-INF of your .war file, and then use the Tomcat manager app's deploy command to deploy your .war file. Modify your context to have a docbase with the name of the .war file (I believe). The easiest way to do this is to use the catalina ant manager tasks. Jake At 11:46 AM 12/17/2002 +, you wrote: Can anybody shed any light on this. If I add this to my server XML file :- - Context path=/shilton docBase=shilton debug=5 reloadable=true crossContext=true Resource name=jdbc/shiltonDB auth=Container type=javax.sql.DataSource / - ResourceParams name=jdbc/shiltonDB - parameter namefactory/name valueorg.apache.commons.dbcp.BasicDataSourceFactory/value /parameter - parameter namemaxActive/name value100/value /parameter - parameter namemaxIdle/name value5/value /parameter - parameter namemaxWait/name value100/value /parameter - parameter nameusername/name valueINTERNET/value /parameter - parameter namepassword/name valueINTERNET/value /parameter - parameter namedriverClassName/name valuecom.ibm.as400.access.AS400JDBCDriver/value /parameter - parameter nameurl/name valuejdbc:as400://NORBERT/value /parameter /ResourceParams /Context When I try to publish via a war file Tomcat will not start. If I delete the war file and publish the folder manually Tomcat starts - have I done something wrong. Some notes - I have my test server installed on a WIN2K box and it works ok - I am using IBM's WSAD 4.0.3 so I presume the files are not published via a war. My production box is Linux RH7.2. Thanks for any input. Kevin -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Virtual Domains with Tomcat 4.1.12 Standalone
Sorry, maybe someone else can answer your question. I'm just not understanding the problem. I have a RH 7.3 test box setup, with two virtual hosts (one is localhost, the other is some.server.com), and the welcome files display correctly. If it isn't working for you, I would suggest that the issue is with your virtual hosting configuration, not your welcome file/index.html configuration. John -Original Message- From: J. Norment [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 17, 2002 9:03 AM To: Tomcat Users List Subject: RE: Virtual Domains with Tomcat 4.1.12 Standalone Hmm. I think the answer to your question is no -- I am trying to get a very basic version of virtual domains working. I noted in the past that renaming index.jsp to index.notjsp and putting an index.html file in the /ROOT directory resulted in tomcat loading index.html. So... I'm trying to load index.html in a directory where no index.jsp exists. ( Should have the same result: [webapps/host0/]index.html should be loaded, assuming that Tomcat process the virtual host as I want it to. ) BTW: If I want a .jsp to be loaded instead of an .htm or .html (default behavior?) if both exist in the directory, Do I need that step with the web.xml file? -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: RemoteAddrValve and ajp13 connections
this valve is for the actual requests for your pages and restricting those to certain ip's. This has nothing to do with the connector. I don't use connectors, so I can't help with your real answer. Charlie -Original Message- From: Joseph Shraibman [mailto:[EMAIL PROTECTED]] Sent: Monday, December 16, 2002 9:01 PM To: [EMAIL PROTECTED] Subject: RemoteAddrValve and ajp13 connections I put these lines in my server.xml for a tomcat that only talks to apache. I keep getting 403 errors when these are in. How can I configure tomcat to only allow connections (ajp13) from certain ip addresses? Valve className=org.apache.catalina.valves.RemoteAddrValve allow=127.*/ Valve className=org.apache.catalina.valves.RemoteAddrValve allow=real ip of the server/ -- Joseph Shraibman [EMAIL PROTECTED] Increase signal to noise ratio. http://xis.xtenit.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Workaround for login page direct reference
Thanks mech, that's very interesting, however, i simply just can't believe that there are Tomcat instances out there in a live production environment with configured realms that suffer from this problem. Surely there must be something - Original Message - From: mech [EMAIL PROTECTED] To: 'Tomcat Users List' [EMAIL PROTECTED]; 'Ben Jessel' [EMAIL PROTECTED] Sent: Tuesday, December 17, 2002 12:57 PM Subject: RE: Workaround for login page direct reference Some more ideas... In my application I never have a direct link to the login.jsp. Try to link either to any file that will be accessed after login (e.g. content.jsp) or link only to the secure directory that you mapped and let the welcome-file redirect link to index.jsp or whatever. Doesn't solve the back button issue (check tomcat bug list), doesn't prohibit users to bookmark the login.jsp, but improves usability at least a bit by avoiding some opportunities to get errors. For your intermediate page thing I would suggest looking into using filters. Unfortunately nothing can prohibit the anyone from using the browser back button and try to relog again because in that back button case the login.jsp isn't even loaded again; so you can't even check for that error by any means. Michael -Original Message- From: Ben Jessel [mailto:[EMAIL PROTECTED]] Sent: Dienstag, 17. Dezember 2002 13:43 To: Tomcat Users List Subject: Re: Workaround for login page direct reference Thanks Mike, I guess, another workaround is that you could just invalidate their session if they go to the login page Now, I still don't see how all this is going help that direct reference to login pageas it seems that I get this error if I go to login.jsp and then enter in my details. - Say the user goes to /login.jsp directly - If we've protecteed that page Tomcat goes, no - that's a protected resource, and forwards to /login.jsp Otherwise, tomcat just goes to the login page. - You enter the user details, and then tomcat tries to forward to the page you came from ( i.e login.jsp ), but detects this is invalid ( presumably by comparing against login-page in the web.xml, and displays an error - direct reference to login page What I'd really, really, like, is some way of having an intermediate page where I can check the requestURI to find out what page tomcat is going to redirect me *after* login, so tomcat would give me login.jsp?page_to_forward_to=blah.jsp... but alas, I don't think I can... - Original Message - From: Mike W-M [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Tuesday, December 17, 2002 11:28 AM Subject: Re: Workaround for login page direct reference I'm going to have to sort this myself in the near future, but I don't quite see how the fact that you can forward to the protected resource is going to help? Isn't Tomcat going to automatically redirect (not forward - the distinction is important since redirecting will result in the login page's URL showing up in the browser's address bar) to the login page you've configured? Actually... since redirecting causes the browser to initiate a new request (for your WEB-INF/login page in this case), won't you get a 404-type error? Someone posted in a similar thread the other day that they intended to check a couple of things in the login page: 1. request.getRequestedSessionId() is *NULL* and 2. There is *NO* cookie named JSESSIONID I think the theory was that these would both be true on the first occasion the login page was accessed, but that if the user was already authenticated then the conditions wouldn't hold so the page should redirect to the index page. It's not nice to be relying on a cookie name (what if they change it between versions, or if cookies are turned off (though I'm not sure the authentication works then anyway!)?) but I'm inclined to move in that direction when it's my turn Mike. - Original Message - From: Ben Jessel [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED]; Brett M. Bergquist [EMAIL PROTECTED] Sent: Tuesday, December 17, 2002 10:55 AM Subject: Re: Workaround for login page direct reference I'll give that a go. Thanks Ben - Original Message - From: Brett M. Bergquist [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED]; Ben Jessel [EMAIL PROTECTED] Sent: Monday, December 16, 2002 8:54 PM Subject: Re: Workaround for login page direct reference Ben, I'm not sure but I believe that I've seen mention that you can forward to a page that is not accessible to the outside. That is, put the Login.jsp page within WEB-INF of your web app and it will not be available to the outside world but you can forward to it from
RE: app roll out.
you could just define your context path= in server.xml. this should give you what you want. Charlie -Original Message- From: Alexander Wallace [mailto:[EMAIL PROTECTED]] Sent: Monday, December 16, 2002 7:40 PM To: Tomcat Users List Subject: Re: app roll out. Adding a line like the one you suggest doesn't seem to work... People at apache's irc said it should be something like: Redirect / http://www.domain.com/context But that only seems to create infinite redirects since it redirects to the same domain name. The docs say that redirect takes a URI and then a URL. Could you check your config files and paste one line here? Just to make sure the syntax is correct? Thanks! On Monday 16 December 2002 15:42, Ben Ricker wrote: Redirect temp www.domain.com www.domain.com/path-to-context Hth, Ben Ricker -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Virtual Domains with Tomcat 4.1.12 Standalone
That sounds almost exactly like what I'm trying to do. Does your test box setup also have Apache installed? If not, what did you do to get some.server.com showing up? On Tue, 17 Dec 2002 09:14:08 -0500, Turner, John wrote: Sorry, maybe someone else can answer your question. I'm just not understanding the problem. I have a RH 7.3 test box setup, with two virtual hosts (one is localhost, the other is some.server.com), and the welcome files display correctly. If it isn't working for you, I would suggest that the issue is with your virtual hosting configuration, not your welcome file/index.html configuration. John -Original Message- From: J. Norment [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 17, 2002 9:03 AM To: Tomcat Users List Subject: RE: Virtual Domains with Tomcat 4.1.12 Standalone Hmm. I think the answer to your question is no -- I am trying to get a very basic version of virtual domains working. I noted in the past that renaming index.jsp to index.notjsp and putting an index.html file in the /ROOT directory resulted in tomcat loading index.html. So... I'm trying to load index.html in a directory where no index.jsp exists. ( Should have the same result: [webapps/host0/]index.html should be loaded, assuming that Tomcat process the virtual host as I want it to. ) BTW: If I want a .jsp to be loaded instead of an .htm or .html (default behavior?) if both exist in the directory, Do I need that step with the web.xml file? -- To unsubscribe, e-mail: mailto:tomcat-user- [EMAIL PROTECTED] For additional commands, e-mail: mailto:tomcat-user- [EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: bug in Tomcat 4 or .... what?
From the Servlet Spec (2.3)'s section on the getParameter() method: If the parameter data was sent in the request body, such as occurs with an HTTP POST request, then reading the body directly via getInputStream() or getReader() can interefere with the execution of this method. I believe there's other stuff in there too about not expecting everything to work as normal if you go low-level messing around with the request. Mike. - Original Message - From: Ivan Venuti [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Tuesday, December 17, 2002 12:31 PM Subject: bug in Tomcat 4 or what? Hi, I have a servlet that opens a DataInputStrem on the request (see below) public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException{ try{ // Open the I/O streams DataInputStream in = new DataInputStream(request.getInputStream() ); After this pice of code I cant' access any more to the request parameters. Infact this code: request.getParameter(anyParameter) retrieves ALWAYS null. The strange thing is that this servlet was Ok for tomcat 3, but can't work any more with Tomcat4. Anyone can explain why opening a DataInputStream alters the HttpServletRequest? Thanks -- Ivan Venuti -- -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Virtual Domains with Tomcat 4.1.12 Standalone
It has Apache installed, but I just verified this behavior using http://some.server.com:8080 which bypasses Apache. If you need a virtual host setup in Tomcat, modify server.xml and add a Host element with a name parameter set to the FQDN that will be in the URL. Alternatively, if you want some.server.com to be treated as localhost, add an Alias tag to the localhost Host element in server.xml. Apache VirtualHost = Tomcat Host (roughly speaking) Host name=some.server.com ...some stuff here like Contexts, etc /Host The server.xml that comes with Tomcat has what you need already in it. The default server.xml file has a single virtual host (localhost) with a three Contexts (admin, manager, examples). Copy what you need from that. The Host element for localhost has a lot of stuff in it, probably stuff you don't need. Just delete most of it, and you should be fine. Alternatively, find the localhost Host element in server.xml and change the name parameter from localhost to your.server.com, restart Tomcat, and test it out and see if the behavior is what you want, then just copy that. John -Original Message- From: J. Norment [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 17, 2002 9:20 AM To: Tomcat Users List Subject: RE: Virtual Domains with Tomcat 4.1.12 Standalone That sounds almost exactly like what I'm trying to do. Does your test box setup also have Apache installed? If not, what did you do to get some.server.com showing up? On Tue, 17 Dec 2002 09:14:08 -0500, Turner, John wrote: Sorry, maybe someone else can answer your question. I'm just not understanding the problem. I have a RH 7.3 test box setup, with two virtual hosts (one is localhost, the other is some.server.com), and the welcome files display correctly. If it isn't working for you, I would suggest that the issue is with your virtual hosting configuration, not your welcome file/index.html configuration. John -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Connection Pooling - additions to server.xml crashes 4.1.12
Hi all, especially Jake Thanks for that - I had worked that out the hard way - but the alternative you give will be my way ahead (assuming it works in my env). Thanks for that Jake. Cheers Kevin -Original Message- From: Jacob Kjome [mailto:[EMAIL PROTECTED]] Sent: 17 December 2002 14:08 To: Tomcat Users List Subject: Re: Connection Pooling - additions to server.xml crashes 4.1.12 If you name a context in server.xml, your .war file will *not* be expanded automatically. What you will need to do is stop Tomcat, manually expand the .war file to a directory named shilton and then restart. alternatively, you can avoid editing the server.xml and put this in a context configuration file. See the admin.xml and manager.xml files in webapps for examples. Basically, you just copy your entire Context ... entry to a separate .xml file. I'd name it the same thing as your webapp to make it clear what that file if for, but I don't think that is a requirement. Either way, you need to manually expand your .war file *before* tomcat is restarted. Alternatively, you can start Tomcat (making sure to have removed the Context ... entry from server.xml), create your context configuration file and name it context.xml. Put that in META-INF of your .war file, and then use the Tomcat manager app's deploy command to deploy your .war file. Modify your context to have a docbase with the name of the .war file (I believe). The easiest way to do this is to use the catalina ant manager tasks. Jake At 11:46 AM 12/17/2002 +, you wrote: Can anybody shed any light on this. If I add this to my server XML file :- - Context path=/shilton docBase=shilton debug=5 reloadable=true crossContext=true Resource name=jdbc/shiltonDB auth=Container type=javax.sql.DataSource / - ResourceParams name=jdbc/shiltonDB - parameter namefactory/name valueorg.apache.commons.dbcp.BasicDataSourceFactory/value /parameter - parameter namemaxActive/name value100/value /parameter - parameter namemaxIdle/name value5/value /parameter - parameter namemaxWait/name value100/value /parameter - parameter nameusername/name valueINTERNET/value /parameter - parameter namepassword/name valueINTERNET/value /parameter - parameter namedriverClassName/name valuecom.ibm.as400.access.AS400JDBCDriver/value /parameter - parameter nameurl/name valuejdbc:as400://NORBERT/value /parameter /ResourceParams /Context When I try to publish via a war file Tomcat will not start. If I delete the war file and publish the folder manually Tomcat starts - have I done something wrong. Some notes - I have my test server installed on a WIN2K box and it works ok - I am using IBM's WSAD 4.0.3 so I presume the files are not published via a war. My production box is Linux RH7.2. Thanks for any input. Kevin -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Simultaneous request from same IP
A sensible investigation, granted, but there's a flaw in your argument! The current hypothesis is that two different requests are getting confused and giving the same values. So if the RequestDumperValve shows the same values for both requests then how will you know whether they originated as identical requests or whether they're different requests that have been confused Mike :-) - Original Message - From: Cox, Charlie [EMAIL PROTECTED] To: 'Tomcat Users List' [EMAIL PROTECTED] Sent: Tuesday, December 17, 2002 2:01 PM Subject: RE: Simultaneous request from same IP this goes along with the suggestion I made of using RequestDumperValve to dump the request to ensure that you are receiving 2 different requests. Charlie -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: bug in Tomcat 4 or .... what?
Agreed. In my experience, the request object should be considered static and simply read using the methods included in the class for that purpose. John -Original Message- From: Mike W-M [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 17, 2002 9:22 AM To: Tomcat Users List Subject: Re: bug in Tomcat 4 or what? From the Servlet Spec (2.3)'s section on the getParameter() method: If the parameter data was sent in the request body, such as occurs with an HTTP POST request, then reading the body directly via getInputStream() or getReader() can interefere with the execution of this method. I believe there's other stuff in there too about not expecting everything to work as normal if you go low-level messing around with the request. Mike. - Original Message - From: Ivan Venuti [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Tuesday, December 17, 2002 12:31 PM Subject: bug in Tomcat 4 or what? Hi, I have a servlet that opens a DataInputStrem on the request (see below) public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException{ try{ // Open the I/O streams DataInputStream in = new DataInputStream(request.getInputStream() ); After this pice of code I cant' access any more to the request parameters. Infact this code: request.getParameter(anyParameter) retrieves ALWAYS null. The strange thing is that this servlet was Ok for tomcat 3, but can't work any more with Tomcat4. Anyone can explain why opening a DataInputStream alters the HttpServletRequest? Thanks -- Ivan Venuti -- -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Simultaneous request from same IP
well, its not the whole solution, but it could eliminate buggy servlet/filter code and/or buggy client code(since it is a custom client, not a browser). this is a way to cut the problem in half and determine which side the problem occurs on - sending/receiving the request or processing the request. if rdv shows 2 unique requests, then the problem is in the servlet OR tomcat's processing/invocation of that servlet. if rdv shows 2 similar requests, it could be a problem with the client OR tomcat's code to receive and assign to a thread for the engine. Side note: any filters in this process? filters must also be written to be thread safe. I don't recall seeing a web.xml. Charlie -Original Message- From: Mike W-M [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 17, 2002 9:28 AM To: Tomcat Users List Subject: Re: Simultaneous request from same IP A sensible investigation, granted, but there's a flaw in your argument! The current hypothesis is that two different requests are getting confused and giving the same values. So if the RequestDumperValve shows the same values for both requests then how will you know whether they originated as identical requests or whether they're different requests that have been confused Mike :-) - Original Message - From: Cox, Charlie [EMAIL PROTECTED] To: 'Tomcat Users List' [EMAIL PROTECTED] Sent: Tuesday, December 17, 2002 2:01 PM Subject: RE: Simultaneous request from same IP this goes along with the suggestion I made of using RequestDumperValve to dump the request to ensure that you are receiving 2 different requests. Charlie -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
tomcat 4.1.12 configuration
Hello. I want to configure in my machine several virtual hosts and i am reading the docs but i don't know if my configuretion is rigth or not. Can anybody says me? my configuration for one virtual host is: Host name=www.domain1.com debug=0 appBase=/usr/local/httpd/htdocs/domain1 unpackWARs=true autoDeploy=true Logger className=org.apache.catalina.logger.FileLogger directory=logs prefix=www.domain1.com_log sufix=.txt timestamp=true/ Context path= docBase= reloadable=true/ /Host i have several doubts: is correct the app path tu put in the Host appBase and not in the Context line? if my configuration is not correct please can you help me to put it in correct mode? thanks -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Tomcat Administration Tool
Hi, I've written a doc about that but it's in french... there a doc in english on tomcat website http://jakarta.apache.org/tomcat/tomcat-4.0-doc/realm-howto.html anyway, here is mine (maybe google will translate it for you) : Mise en place JDBC Realm pour Tomcat (stockage des utilisateurs et de leurs roles dans un base de données) -- Versions installées : * Jakarta Tomcat 4.0.6 * MySQL 3.23.51 * JDBC Driver mm.mysql-2.0.14-bin.jar Liens utiles : * http://jakarta.apache.org/tomcat/tomcat-4.0-doc/realm-howto.html Creation de la base de données Sous mysql, creer la base principale : mysql create database tomcat_users; mysql GRANT select ON tomcat_users.* TO tomcatuser@localhost IDENTIFIED BY 'xxx'; Créer les tables : # création des tables utiles pour Tomcat JDBC Realm # répéter la création de ces 2 tables pour chaque webapps de tomcat ## webapp create table _users ( user_name varchar(8) not null primary key, user_pass varchar(40) not null # 40 pour les mots de passe md5 ); create table _user_roles ( user_name varchar(8) not null, role_name varchar(20) not null, primary key (user_name, role_name) ); Créer les utilisateurs Faire des scripts de creation d'utilisateurs : # creation utilisateur insert into _users values ('username', 'md5pass') # ajout de role pour un utilisateur insert into _user_roles values ('username', 'rolename'); Pour générer un mot de passe md5 à partir d'un mot de passe en clair, executer : $ java -classpath $CATALINA_HOME/server/lib/catalina.jar org.apache.catalina.realm.RealmBase -a MD5 motdepasseenclair Mise en place des drivers Copier le driver (mm.mysql-2.0.14-bin.jar) dans le repertoire $CATALINA_HOME/common/lib ou $CATALINA_HOME/server/lib Configuration Tomcat Editer le fichier server.xml Commenter la ligne suivante : Realm className=org.apache.catalina.realm.MemoryRealm / Ajouter les lignes suivantes dans la partie Engine name=Standalone defaultHost=localhost debug=0 : Realm className=org.apache.catalina.realm.JDBCRealm debug=99 driverName=org.gjt.mm.mysql.Driver connectionURL=jdbc:mysql://localhost/tomcat_users connectionName=tomcatuser connectionPassword=xx digest=MD5 userTable=manager_users userNameCol=user_name userCredCol=user_pass userRoleTable=manager_user_roles roleNameCol=role_name / Et pour chaque webapps necessitant la définition de roles, suivre l'exemple suivant : !-- MyWebapp Context -- Context path=/MyWebapp docBase=MyWebapp debug=0 privileged=true Realm className=org.apache.catalina.realm.JDBCRealm debug=99 driverName=org.gjt.mm.mysql.Driver connectionURL=jdbc:mysql://localhost/tomcat_users connectionName=tomcatuser connectionPassword=x digest=MD5 userTable=mywebapp_users userNameCol=user_name userCredCol=user_pass userRoleTable=mywebapp_user_roles roleNameCol=role_name / /Context Relancer Tomcat en root : # /etc/init.d/jakarta-tomcat restart It works fine for me :) hope it helps Luc At 00:35 18/12/2002 +1100, you wrote: Hi all, The Tomcat Admin Tool uses a UserDatabaseRealm for authentication and for editing as part of the configuration options. This uses the conf/tomcat-users.xml file for the source of information I was interested in knowing if anybody has configured Tomcat _and_ the Admin tool to use an alternate Realm, like JDBCRealm or a close cousin that the Admin Tool can manage ? I'd be interested in hearing from anybody who has gone down this path Cheers, -- jon -- Jon Eaves [EMAIL PROTECTED] http://www.eaves.org/jon/ -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Workaround for login page direct reference
Agreed. Don't forget that the beauty of open-source is that we can look at what Tomcat's doing... It throws the invalid reference error from the FormAuthenticator class, if no original request details have been saved as an internal note within the session. It doesn't immediately look like it's easy to get access to that information. As a last resort, it looks easy to alter that behaviour (assuming one can manage to recompile Tomcat). If no-one comes up with a better resolution to the problem (which, like you say, must be one that's cropped up many times before) then it would seem smart to try and get the developers to code in something a little more configurable. [I don't recall the spec says this behaviour is required, but...] i.e. it defaults to the current action unless you've specified a defaultPostLoginPage property of something or other. Still, the code had Craig's name on the top of it. Hopefully he'll come to our rescue Mike. - Original Message - From: Ben Jessel [EMAIL PROTECTED] To: 'Tomcat Users List' [EMAIL PROTECTED] Sent: Tuesday, December 17, 2002 2:16 PM Subject: Re: Workaround for login page direct reference Thanks mech, that's very interesting, however, i simply just can't believe that there are Tomcat instances out there in a live production environment with configured realms that suffer from this problem. Surely there must be something - Original Message - From: mech [EMAIL PROTECTED] To: 'Tomcat Users List' [EMAIL PROTECTED]; 'Ben Jessel' [EMAIL PROTECTED] Sent: Tuesday, December 17, 2002 12:57 PM Subject: RE: Workaround for login page direct reference Some more ideas... In my application I never have a direct link to the login.jsp. Try to link either to any file that will be accessed after login (e.g. content.jsp) or link only to the secure directory that you mapped and let the welcome-file redirect link to index.jsp or whatever. Doesn't solve the back button issue (check tomcat bug list), doesn't prohibit users to bookmark the login.jsp, but improves usability at least a bit by avoiding some opportunities to get errors. For your intermediate page thing I would suggest looking into using filters. Unfortunately nothing can prohibit the anyone from using the browser back button and try to relog again because in that back button case the login.jsp isn't even loaded again; so you can't even check for that error by any means. Michael -Original Message- From: Ben Jessel [mailto:[EMAIL PROTECTED]] Sent: Dienstag, 17. Dezember 2002 13:43 To: Tomcat Users List Subject: Re: Workaround for login page direct reference Thanks Mike, I guess, another workaround is that you could just invalidate their session if they go to the login page Now, I still don't see how all this is going help that direct reference to login pageas it seems that I get this error if I go to login.jsp and then enter in my details. - Say the user goes to /login.jsp directly - If we've protecteed that page Tomcat goes, no - that's a protected resource, and forwards to /login.jsp Otherwise, tomcat just goes to the login page. - You enter the user details, and then tomcat tries to forward to the page you came from ( i.e login.jsp ), but detects this is invalid ( presumably by comparing against login-page in the web.xml, and displays an error - direct reference to login page What I'd really, really, like, is some way of having an intermediate page where I can check the requestURI to find out what page tomcat is going to redirect me *after* login, so tomcat would give me login.jsp?page_to_forward_to=blah.jsp... but alas, I don't think I can... - Original Message - From: Mike W-M [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Tuesday, December 17, 2002 11:28 AM Subject: Re: Workaround for login page direct reference I'm going to have to sort this myself in the near future, but I don't quite see how the fact that you can forward to the protected resource is going to help? Isn't Tomcat going to automatically redirect (not forward - the distinction is important since redirecting will result in the login page's URL showing up in the browser's address bar) to the login page you've configured? Actually... since redirecting causes the browser to initiate a new request (for your WEB-INF/login page in this case), won't you get a 404-type error? Someone posted in a similar thread the other day that they intended to check a couple of things in the login page: 1. request.getRequestedSessionId() is *NULL* and 2. There is *NO* cookie named JSESSIONID I think the theory was that these would both be true on the first occasion the login page was accessed, but that if the user was already authenticated then the conditions wouldn't hold so the page should redirect to the
RE: Virtual Domains with Tomcat 4.1.12 Standalone
check out conf/web.xml and its welcome-file-list. there you can set the order of welcome pages to load.(index,jsp first, then index.html, etc) Charlie -Original Message- From: J. Norment [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 17, 2002 9:03 AM To: Tomcat Users List Subject: RE: Virtual Domains with Tomcat 4.1.12 Standalone Hmm. I think the answer to your question is no -- I am trying to get a very basic version of virtual domains working. I noted in the past that renaming index.jsp to index.notjsp and putting an index.html file in the /ROOT directory resulted in tomcat loading index.html. So... I'm trying to load index.html in a directory where no index.jsp exists. ( Should have the same result: [webapps/host0/]index.html should be loaded, assuming that Tomcat process the virtual host as I want it to. ) BTW: If I want a .jsp to be loaded instead of an .htm or .html (default behavior?) if both exist in the directory, Do I need that step with the web.xml file? On Tue, 17 Dec 2002 08:28:11 -0500, Turner, John wrote: You want index.html to show instead of index.jsp? My tongue-in-cheek response is rename index.html to index.jsp. Another response would be check the welcome file element in web.xml for your webapp. John -Original Message- From: J. Norment [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 17, 2002 8:21 AM To: Tomcat Users List Subject: RE: Virtual Domains with Tomcat 4.1.12 Standalone webapps/host0/index.html . On Mon, 16 Dec 2002 18:46:28 -0500, Turner, John wrote: I'm sorry, what's wrong isn't exactly clear from your post. What should http://host0.com show besides the default welcome page? John -Original Message- From: J. Norment [mailto:[EMAIL PROTECTED]] Sent: Monday, December 16, 2002 4:27 PM To: Tomcat Users List Subject: Virtual Domains with Tomcat 4.1.12 Standalone I haven't seen this question answered yet: I'm trying to set up virtual domains with Tomcat 4.1.12. ( Not running Apache ) I have modified my server.xml file as follows. webapps/host0 contains a basic index.html . What might I be doing wrong? (http://host0.com shows the default index.jsp. ) Is there a way to see the information that Tomcat receives when http://host0.com is requested? ( thanks ) !-- Define the default virtual host -- Host name=localhost debug=0 appBase=webapps unpackWARs=true autoDeploy=true !-- This part is added: -- Host name=host0.com debug=0 appBase=webapps/host0 unpackWARs=true Logger className=org.apache.catalina.logger.FileLogger directory=logs prefix=host0. suffix=.log timestamp=true/ Context path= docBase=webapps/host0 debug=0 reloadable=true/ Context path=/test docBase=webapps/host0 debug=0 reloadable=true/ /Host !-- End, added part. -- !-- Normally, users must authenticate themselves to each web app individually. Uncomment the following entry if you would like a user to be authenticated the first time they encounter a resource protected by a security constraint, and then have that user identity maintained across *all* web applications contained in this virtual host. -- -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.419 / Virus Database: 235 - Release Date: 11/13/2002 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.419 / Virus Database: 235 - Release Date: 11/13/2002 -- To unsubscribe, e-mail: mailto:tomcat-user- [EMAIL PROTECTED] For additional commands, e-mail: mailto:tomcat-user- [EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:tomcat-user- [EMAIL PROTECTED] For additional commands, e-mail: mailto:tomcat-user- [EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: app roll out.
Here is the line that workd for me in Apache 1.3.27 Are you using Apache 2.x? Redirect temp /index.html http://main.wellinx.com/servlets/Logon?STATE=0USER=doctor The '/' by itself may not work. When I set it up, I had to include the 'index.html'. But I do not remember because I set it up so long ago. Ben Ricker On Mon, 2002-12-16 at 18:40, Alexander Wallace wrote: Adding a line like the one you suggest doesn't seem to work... People at apache's irc said it should be something like: Redirect / http://www.domain.com/context But that only seems to create infinite redirects since it redirects to the same domain name. The docs say that redirect takes a URI and then a URL. Could you check your config files and paste one line here? Just to make sure the syntax is correct? Thanks! On Monday 16 December 2002 15:42, Ben Ricker wrote: Redirect temp www.domain.com www.domain.com/path-to-context Hth, Ben Ricker -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- Ben Ricker [EMAIL PROTECTED] Wellinx.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: app roll out.
On Mon, 2002-12-16 at 18:51, Alexander Wallace wrote: The line: RedirectMatch ^/$ http://mysite/theContext did the trick. Now I have to find out how to make apache call index.jsp automatically if no page is requested. If i use http://localhost:8080/myapp tomcat calls index.jsp automatically, but when going through apache (http://localhost/myapp) apache doesn't load the index.jsp. How can i make it load index.jsp automatically? You need to add the index.jsp to the possible DirectoryIndex directive. For example: # # DirectoryIndex: Name of the file or files to use as a pre-written HTML # directory index. Separate multiple entries with spaces. # IfModule mod_dir.c DirectoryIndex index.html index.jsp /IfModule If you call a URL without a file spec, Apache will try all the files in the DirectoryIndex directive utnil it his one. Ben Ricker Thanks again! On Monday 16 December 2002 15:42, Ben Ricker wrote: This would be done by Apache (though it could possibly be done by Tomcat; I use Apache). You can do it one of two ways: 1) Use mod_rewrite to rewrite /index.html to /path-to-context-name. Not sure on the mechanics of this. Try the Apache list for pointers, or any number of tutotials on mod_rewrite. 2) Use the 'Redirect' directive in Apache. This is what I use and has worked for 2 years. Basically, you stick a line in your httpd.conf which goes: Redirect temp www.domain.com www.domain.com/path-to-context -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- Ben Ricker [EMAIL PROTECTED] Wellinx.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Virtual Domains with Tomcat 4.1.12 Standalone
This is the change that I had made to the server.xml file: !-- Define the default virtual host -- Host name=localhost debug=0 appBase=webapps unpackWARs=true autoDeploy=true !-- This part is added: -- Host name=host0.com debug=0 appBase=webapps/host0 unpackWARs=true Logger className=org.apache.catalina.logger.FileLogger directory=logs prefix=host0. suffix=.log timestamp=true/ Context path= docBase=webapps/host0 debug=0 reloadable=true/ Context path=/test docBase=webapps/host0 debug=0 reloadable=true/ /Host !-- End, added part. -- Is this is the change that you are referring to in adding the host tag? If that is not working, how would I track down what is broken? (ie, are there log files saying exactly what Tomcat is getting from the request?) As for adding an alias for localhost, wouldn't that mean that only one host was used? Ultimately, I'd like host0.com and host1.com to be different hosts for Tomcat. Applying Occam's Razor, I'm pretty sure that something is screwed on my end, but not sure how to track it down, at this point... On Tue, 17 Dec 2002 09:27:14 -0500, Turner, John wrote: It has Apache installed, but I just verified this behavior using http://some.server.com:8080 which bypasses Apache. If you need a virtual host setup in Tomcat, modify server.xml and add a Host element with a name parameter set to the FQDN that will be in the URL. Alternatively, if you want some.server.com to be treated as localhost, add an Alias tag to the localhost Host element in server.xml. Apache VirtualHost = Tomcat Host (roughly speaking) Host name=some.server.com ...some stuff here like Contexts, etc /Host The server.xml that comes with Tomcat has what you need already in it. The default server.xml file has a single virtual host (localhost) with a three Contexts (admin, manager, examples). Copy what you need from that. The Host element for localhost has a lot of stuff in it, probably stuff you don't need. Just delete most of it, and you should be fine. Alternatively, find the localhost Host element in server.xml and change the name parameter from localhost to your.server.com, restart Tomcat, and test it out and see if the behavior is what you want, then just copy that. John -Original Message- From: J. Norment [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 17, 2002 9:20 AM To: Tomcat Users List Subject: RE: Virtual Domains with Tomcat 4.1.12 Standalone That sounds almost exactly like what I'm trying to do. Does your test box setup also have Apache installed? If not, what did you do to get some.server.com showing up? On Tue, 17 Dec 2002 09:14:08 -0500, Turner, John wrote: Sorry, maybe someone else can answer your question. I'm just not understanding the problem. I have a RH 7.3 test box setup, with two virtual hosts (one is localhost, the other is some.server.com), and the welcome files display correctly. If it isn't working for you, I would suggest that the issue is with your virtual hosting configuration, not your welcome file/index.html configuration. John -- To unsubscribe, e-mail: mailto:tomcat-user- [EMAIL PROTECTED] For additional commands, e-mail: mailto:tomcat-user- [EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Virtual Domains with Tomcat 4.1.12 Standalone
I *don't* want to change that order. On Tue, 17 Dec 2002 09:55:06 -0500, Cox, Charlie wrote: check out conf/web.xml and its welcome-file-list. there you can set the order of welcome pages to load.(index,jsp first, then index.html, etc) Charlie -Original Message- From: J. Norment [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 17, 2002 9:03 AM To: Tomcat Users List Subject: RE: Virtual Domains with Tomcat 4.1.12 Standalone Hmm. I think the answer to your question is no -- I am trying to get a very basic version of virtual domains working. I noted in the past that renaming index.jsp to index.notjsp and putting an index.html file in the /ROOT directory resulted in tomcat loading index.html. So... I'm trying to load index.html in a directory where no index.jsp exists. ( Should have the same result: [webapps/host0/]index.html should be loaded, assuming that Tomcat process the virtual host as I want it to. ) BTW: If I want a .jsp to be loaded instead of an .htm or .html (default behavior?) if both exist in the directory, Do I need that step with the web.xml file? On Tue, 17 Dec 2002 08:28:11 -0500, Turner, John wrote: You want index.html to show instead of index.jsp? My tongue-in- cheek response is rename index.html to index.jsp. Another response would be check the welcome file element in web.xml for your webapp. John -Original Message- From: J. Norment [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 17, 2002 8:21 AM To: Tomcat Users List Subject: RE: Virtual Domains with Tomcat 4.1.12 Standalone webapps/host0/index.html . On Mon, 16 Dec 2002 18:46:28 -0500, Turner, John wrote: I'm sorry, what's wrong isn't exactly clear from your post. What should http://host0.com show besides the default welcome page? John -Original Message- From: J. Norment [mailto:[EMAIL PROTECTED]] Sent: Monday, December 16, 2002 4:27 PM To: Tomcat Users List Subject: Virtual Domains with Tomcat 4.1.12 Standalone I haven't seen this question answered yet: I'm trying to set up virtual domains with Tomcat 4.1.12. ( Not running Apache ) I have modified my server.xml file as follows. webapps/host0 contains a basic index.html . What might I be doing wrong? (http://host0.com shows the default index.jsp. ) Is there a way to see the information that Tomcat receives when http://host0.com is requested? ( thanks ) !-- Define the default virtual host -- Host name=localhost debug=0 appBase=webapps unpackWARs=true autoDeploy=true !-- This part is added: -- Host name=host0.com debug=0 appBase=webapps/host0 unpackWARs=true Logger className=org.apache.catalina.logger.FileLogger directory=logs prefix=host0. suffix=.log timestamp=true/ Context path= docBase=webapps/host0 debug=0 reloadable=true/ Context path=/test docBase=webapps/host0 debug=0 reloadable=true/ /Host !-- End, added part. -- !-- Normally, users must authenticate themselves to each web app individually. Uncomment the following entry if you would like a user to be authenticated the first time they encounter a resource protected by a security constraint, and then have that user identity maintained across *all* web applications contained in this virtual host. -- -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.419 / Virus Database: 235 - Release Date: 11/13/2002 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.419 / Virus Database: 235 - Release Date: 11/13/2002 -- To unsubscribe, e-mail: mailto:tomcat-user- [EMAIL PROTECTED] For additional commands, e-mail: mailto:tomcat-user- [EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:tomcat-user- [EMAIL PROTECTED] For additional commands, e-mail: mailto:tomcat-user- [EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:tomcat-user- [EMAIL PROTECTED] For additional commands, e-mail: mailto:tomcat-user- [EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Virtual Domains with Tomcat 4.1.12 Standalone
You have two Host name defined and only one closing tag for the host. Did you change Engine name=Standalone defaultHost=localhost debug=99 to reflect host0.com in the defaultHost Hari -Original Message- From: J. Norment [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 17, 2002 10:15 AM To: Tomcat Users List Subject: RE: Virtual Domains with Tomcat 4.1.12 Standalone This is the change that I had made to the server.xml file: !-- Define the default virtual host -- Host name=localhost debug=0 appBase=webapps unpackWARs=true autoDeploy=true !-- This part is added: -- Host name=host0.com debug=0 appBase=webapps/host0 unpackWARs=true Logger className=org.apache.catalina.logger.FileLogger directory=logs prefix=host0. suffix=.log timestamp=true/ Context path= docBase=webapps/host0 debug=0 reloadable=true/ Context path=/test docBase=webapps/host0 debug=0 reloadable=true/ /Host !-- End, added part. -- Is this is the change that you are referring to in adding the host tag? If that is not working, how would I track down what is broken? (ie, are there log files saying exactly what Tomcat is getting from the request?) As for adding an alias for localhost, wouldn't that mean that only one host was used? Ultimately, I'd like host0.com and host1.com to be different hosts for Tomcat. Applying Occam's Razor, I'm pretty sure that something is screwed on my end, but not sure how to track it down, at this point... On Tue, 17 Dec 2002 09:27:14 -0500, Turner, John wrote: It has Apache installed, but I just verified this behavior using http://some.server.com:8080 which bypasses Apache. If you need a virtual host setup in Tomcat, modify server.xml and add a Host element with a name parameter set to the FQDN that will be in the URL. Alternatively, if you want some.server.com to be treated as localhost, add an Alias tag to the localhost Host element in server.xml. Apache VirtualHost = Tomcat Host (roughly speaking) Host name=some.server.com ...some stuff here like Contexts, etc /Host The server.xml that comes with Tomcat has what you need already in it. The default server.xml file has a single virtual host (localhost) with a three Contexts (admin, manager, examples). Copy what you need from that. The Host element for localhost has a lot of stuff in it, probably stuff you don't need. Just delete most of it, and you should be fine. Alternatively, find the localhost Host element in server.xml and change the name parameter from localhost to your.server.com, restart Tomcat, and test it out and see if the behavior is what you want, then just copy that. John -Original Message- From: J. Norment [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 17, 2002 9:20 AM To: Tomcat Users List Subject: RE: Virtual Domains with Tomcat 4.1.12 Standalone That sounds almost exactly like what I'm trying to do. Does your test box setup also have Apache installed? If not, what did you do to get some.server.com showing up? On Tue, 17 Dec 2002 09:14:08 -0500, Turner, John wrote: Sorry, maybe someone else can answer your question. I'm just not understanding the problem. I have a RH 7.3 test box setup, with two virtual hosts (one is localhost, the other is some.server.com), and the welcome files display correctly. If it isn't working for you, I would suggest that the issue is with your virtual hosting configuration, not your welcome file/index.html configuration. John -- To unsubscribe, e-mail: mailto:tomcat-user- [EMAIL PROTECTED] For additional commands, e-mail: mailto:tomcat-user- [EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Invalidate Session Problem
No, there isn't a way to force it. It's stated as a know problem in whichever RFC it is that defines the HTTP Basic Authentication mechanism. Other Mike. - Original Message - From: [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Tuesday, December 17, 2002 12:11 PM Subject: Re: Invalidate Session Problem I read your text many times but couldn't get to a conclusion. So, isn't there a way to force a logout and let the user authenticate again? At least with BASIC. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: JSP to Servlet to JSP pathing issue. Relative PathingPlease help.
The redirecting doesn't seem to work. That tells the browser client to initiate a new request and all the information that I placed in the request object is gone, which undermines the purpose of the form. The forums have a lot on my problem, just no answers that have worked for me. Has anyone else ran into the issue of using a form in a JSP to submit data to a Servlet, have that servlet return data to the very same JSP? Thanks in advance. [EMAIL PROTECTED] 12/16/02 12:53PM Thanks for the advice, I didn't know you could redirect. The javadoc on the RequestDispatcher only lists the forward and include methods. I'll try that. The initial call to the servlet is actually being made by the client browser via a form response. [EMAIL PROTECTED] 12/16/02 12:00PM If you want the path in the browser's address bar to change, I think you have to use a redirect rather than a forward. (I've read that even then it's not guaranteed to work (since it's browser-dependent), but it's working fine for me. There's the disadvantage of an additional network round-trip that's not ideal, but I don't know of any other way.) [Actually, I guess you're already redirecting from the original jsp request to the servlet. If you changed that to forward then that'd probably solve you're problem without the additional round-trip] Mike. - Original Message - From: Jason Johnston [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Monday, December 16, 2002 5:46 PM Subject: JSP to Servlet to JSP pathing issue. Relative Pathing Please help. I have a JSP that has a form that I want processed by a servlet. The servlet then places the results in the page context and redirects back to the JSP. Everything works fine on the first go, but the second time through the path in the client's browser is no longer valid. Initially, the path is: http://localhost:8080/testgroup/lookup.jsp This then sends the form data to the /testgroup/servlet/dolookup?parameters The servlet executes and uses the request dispatcher to load the original JSP. RequestDispatcher rd=getServletContext().getRequestDispatcher(//lookup.jsp); rd.forward(request,response); The original JSP comes up fine and has the results, but the path in the browser URL is still the servlet address. Since the form sends to a relative path, the second time you try to run, it doesn't work. http://localhost:8080/testgroup/servlet/test.dolookup?epaid=J2466search=id; firstname=lastname= This seems to be a very simple relative pathing problem, but I've tried various solutions with no luck. I'm sure someone else has run into this and found a solution. If anyone has any insight, please help. Thanks. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Help: Simple example to use tomcat 4.1.12 / Apache 1.3 and mo d_jk ??
Hi, John Is there any HOWTO for win2k? Similar to that for RH? For my setup and configure of Apache, Tomcat and JK2 on win2k, it seems that Apache and Tomcat can work well seperately. But it cannot work to open jsp file with Apache to acivate Tomcat to deal with. And I got the message on the Tomcat window: APR not loaded, disabling jni component:java.io.ioexception: no jkjni in java.library.path. Can you help me? Thanks lots, Minger --- Turner, John [EMAIL PROTECTED] wrote: I don't think you can get any simpler than this: http://www.johnturner.com/howto The version numbers are irrelevant...the procedures are the same. Newer versions of Tomcat use one connector class to handle multiple protocols. That class is called CoyoteConnector and it talks JK, JK2, and HTTP (and I think HTTPS as well). Older versions of Tomcat used a class called Ajp13Connector to talk JK. If you are using JK, you can use either CoyoteConnector (enabled by default) or Ajp13Connector. If you are using JK2, you have to use CoyoteConnector. In your files, you are using JK commands (JkMount) with a JK2 module, that won't work. Check my HOWTO, if you have problems, post back to the list. Also, flagging messages as urgent or high importance isn't very polite, and will probably cause more people to ignore your post than to read it and answer itwe're all very, very busy, and your important issue isn't any more important than those of anyone else. John -Original Message- From: Rob Cartier [mailto:[EMAIL PROTECTED]] Sent: Monday, December 16, 2002 5:11 PM To: [EMAIL PROTECTED] Subject: Help: Simple example to use tomcat 4.1.12 / Apache 1.3 and mod_jk ?? Importance: High I having looking for a very simple howto on how to get on RH 7.2 Tomcat 4.1.12 Apache 1.3 Mod_jk or mod_jk2 working together possibly using the /examples that are included with tomcat as a test bed. I am confused on how to configure tomcat. I see Coyote/AJP13 and ajp13 in the server.xml file but I am unsure which one to use. There is also a discussion of jk2.properties file but that one is all commented out and there seems to be no clear example of what needs to be done in the server.xml and jk2.properties if anything that needs to be adjusted. On the Apache side I have tried both mod_jk and mod_jk2 but the examples in the how to are either for mod_jk.so or mod_jk2.so cant tell . It is very fustrating. Does anyone have a very simple docs I can follow == Here are some of my files I added this to my httpd.conf in the beginning LoadModule jk2_module modules/mod_jk2.so ADDModule mod_jk2.c -- at the bottom I added so that it would at least start LoadModule jk2_module libexec/mod_jk2.so AddModule mod_jk2.c IfModule mod_jk2.c Jk2WorkersFile /etc/httpd/conf/workers.properties JkLogFile /var/log/httpd/mod_jk2.log JkLogLevel info JkLogStampFormat (%a %b %d %H:%M:%S %Y) JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories JkRequestLogFormat %w %V %T JkMount /examples/servlet/* worker1 JkMount /examples/*.jsp worker1 /IfModule my worker2.properties file # Define 1 real worker using ajp13worker.list=worker1 # Set properties for worker1 (ajp13)worker.worker1.type=ajp13 worker.list=worker1 worker.worker1.host=localhost worker.worker1.port=8009 worker.worker1.lbfactor=50 worker.worker1.cachesize=10 worker.worker1.cache_timeout=600 worker.worker1.socket_keepalive=1 worker.worker1.socket_timeout=300 What I wind up is protocol errors in my catalina.out file Ajp13Connector active threads=6 java.lang.ThreadGroup[name=Ajp13Connector[8009],maxpri=10] Thread[Ajp13Connector[8009],5,Ajp13Connector[8009]] Thread[Ajp13Processor[8009][0],5,Ajp13Connector[8009]] Thread[Ajp13Processor[8009][1],5,Ajp13Connector[8009]] Thread[Ajp13Processor[8009][2],5,Ajp13Connector[8009]] Thread[Ajp13Processor[8009][3],5,Ajp13Connector[8009]] Thread[Ajp13Processor[8009][4],5,Ajp13Connector[8009]] === BAD packet 256 In: : [B@958bf9 4/843 01 00 03 47 00 00 00 00 00 00 00 00 00 00 00 00 | ...G 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.419 / Virus Database: 235 - Release Date: 11/13/2002 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.419 / Virus Database: 235 - Release Date: 11/13/2002 -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail:
RE: Virtual Domains with Tomcat 4.1.12 Standalone
Hari: Thanks for the response. ( For that matter, thanks for everyone's response so far... ) I want the behavior to be: http://localhost - loads up the default welcome page, root/index.jsp http://host0.com - loads up host0's index page http://host1.com - loads up host1's index page Is changing the default host part of the solution? On Tue, 17 Dec 2002 10:22:20 -0500, Hari Venkatesan wrote: You have two Host name defined and only one closing tag for the host. Did you change Engine name=Standalone defaultHost=localhost debug=99 to reflect host0.com in the defaultHost Hari -Original Message- From: J. Norment [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 17, 2002 10:15 AM To: Tomcat Users List Subject: RE: Virtual Domains with Tomcat 4.1.12 Standalone This is the change that I had made to the server.xml file: !-- Define the default virtual host -- Host name=localhost debug=0 appBase=webapps unpackWARs=true autoDeploy=true !-- This part is added: -- Host name=host0.com debug=0 appBase=webapps/host0 unpackWARs=true Logger className=org.apache.catalina.logger.FileLogger directory=logs prefix=host0. suffix=.log timestamp=true/ Context path= docBase=webapps/host0 debug=0 reloadable=true/ Context path=/test docBase=webapps/host0 debug=0 reloadable=true/ /Host !-- End, added part. -- Is this is the change that you are referring to in adding the host tag? If that is not working, how would I track down what is broken? (ie, are there log files saying exactly what Tomcat is getting from the request?) As for adding an alias for localhost, wouldn't that mean that only one host was used? Ultimately, I'd like host0.com and host1.com to be different hosts for Tomcat. Applying Occam's Razor, I'm pretty sure that something is screwed on my end, but not sure how to track it down, at this point... On Tue, 17 Dec 2002 09:27:14 -0500, Turner, John wrote: It has Apache installed, but I just verified this behavior using http://some.server.com:8080 which bypasses Apache. If you need a virtual host setup in Tomcat, modify server.xml and add a Host element with a name parameter set to the FQDN that will be in the URL. Alternatively, if you want some.server.com to be treated as localhost, add an Alias tag to the localhost Host element in server.xml. Apache VirtualHost = Tomcat Host (roughly speaking) Host name=some.server.com ...some stuff here like Contexts, etc /Host The server.xml that comes with Tomcat has what you need already in it. The default server.xml file has a single virtual host (localhost) with a three Contexts (admin, manager, examples). Copy what you need from that. The Host element for localhost has a lot of stuff in it, probably stuff you don't need. Just delete most of it, and you should be fine. Alternatively, find the localhost Host element in server.xml and change the name parameter from localhost to your.server.com, restart Tomcat, and test it out and see if the behavior is what you want, then just copy that. John -Original Message- From: J. Norment [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 17, 2002 9:20 AM To: Tomcat Users List Subject: RE: Virtual Domains with Tomcat 4.1.12 Standalone That sounds almost exactly like what I'm trying to do. Does your test box setup also have Apache installed? If not, what did you do to get some.server.com showing up? On Tue, 17 Dec 2002 09:14:08 -0500, Turner, John wrote: Sorry, maybe someone else can answer your question. I'm just not understanding the problem. I have a RH 7.3 test box setup, with two virtual hosts (one is localhost, the other is some.server.com), and the welcome files display correctly. If it isn't working for you, I would suggest that the issue is with your virtual hosting configuration, not your welcome file/index.html configuration. John -- To unsubscribe, e-mail: mailto:tomcat-user- [EMAIL PROTECTED] For additional commands, e-mail: mailto:tomcat-user- [EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:tomcat-user- [EMAIL PROTECTED] For additional commands, e-mail: mailto:tomcat-user- [EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:tomcat-user- [EMAIL PROTECTED] For additional commands, e-mail: mailto:tomcat-user- [EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: app roll out.
My guess is that the solution with apache works becouse even if apache switces to https, it still talks to tomcat via plain http, and since the objects are in tomcat's session, and tomcat doesn't need to switch to https, it will not create a new session. On Monday 16 December 2002 20:41, Joseph Shraibman wrote: But that doesn't explain why apache would be any better at that than tomcat. James Higginbotham wrote: That's probably the case if you were using cookies to track sessions. The cookie spec mentions that the port is also part of the scope of a cookie, so when you went from www.foo.com:80 to www.foo.com:443 you changed the scope of the original cookie and thus created a new session on the server side. The fix is to either change the cookie's domain to be foo.com rather than www.foo.com, which will make it match to all servers in that domain on all ports. At least, this seems to be what I remember the issue being several years ago for a similar deployment I did. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: JSP to Servlet to JSP pathing issue. Relative PathingPlease help.
True (and I missed that that was the whole point of your exercise) but redirecting is the (only) way to get the browser's URL to change. If you think about it, you're basically saying that you want two different URLs (one to the servlet and one to the jsp), when displayed in the browser, to mean the same thing - which just isn't going to work. Two possible solutions: a) The ugly but quicker one: code the absolute URL in the jsp's form's action attribute. b) The elegant one: Don't link to the jsp page at all. Always link to the servlet, then make the servlet check for the existence of parameters. If your parameters exist then it was a form submission, so do what ever you do now and then forward() to the jsp. (This leaves the URL the same in the browser and doesn't lose the request-info.) If parameters don't exist, then just forward() to the jsp page (without doing any processing). It'll presumably behave like it does now when you request it directly. However, the browser's URL will still have the servlet's URL - and you can code all the paths relative to that. Mike. - Original Message - From: Jason Johnston [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, December 17, 2002 3:25 PM Subject: Re: JSP to Servlet to JSP pathing issue. Relative PathingPlease help. The redirecting doesn't seem to work. That tells the browser client to initiate a new request and all the information that I placed in the request object is gone, which undermines the purpose of the form. The forums have a lot on my problem, just no answers that have worked for me. Has anyone else ran into the issue of using a form in a JSP to submit data to a Servlet, have that servlet return data to the very same JSP? Thanks in advance. [EMAIL PROTECTED] 12/16/02 12:53PM Thanks for the advice, I didn't know you could redirect. The javadoc on the RequestDispatcher only lists the forward and include methods. I'll try that. The initial call to the servlet is actually being made by the client browser via a form response. [EMAIL PROTECTED] 12/16/02 12:00PM If you want the path in the browser's address bar to change, I think you have to use a redirect rather than a forward. (I've read that even then it's not guaranteed to work (since it's browser-dependent), but it's working fine for me. There's the disadvantage of an additional network round-trip that's not ideal, but I don't know of any other way.) [Actually, I guess you're already redirecting from the original jsp request to the servlet. If you changed that to forward then that'd probably solve you're problem without the additional round-trip] Mike. - Original Message - From: Jason Johnston [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Monday, December 16, 2002 5:46 PM Subject: JSP to Servlet to JSP pathing issue. Relative Pathing Please help. I have a JSP that has a form that I want processed by a servlet. The servlet then places the results in the page context and redirects back to the JSP. Everything works fine on the first go, but the second time through the path in the client's browser is no longer valid. Initially, the path is: http://localhost:8080/testgroup/lookup.jsp This then sends the form data to the /testgroup/servlet/dolookup?parameters The servlet executes and uses the request dispatcher to load the original JSP. RequestDispatcher rd=getServletContext().getRequestDispatcher(//lookup.jsp); rd.forward(request,response); The original JSP comes up fine and has the results, but the path in the browser URL is still the servlet address. Since the form sends to a relative path, the second time you try to run, it doesn't work. http://localhost:8080/testgroup/servlet/test.dolookup?epaid=J2466search=id; firstname=lastname= This seems to be a very simple relative pathing problem, but I've tried various solutions with no luck. I'm sure someone else has run into this and found a solution. If anyone has any insight, please help. Thanks. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: how do i make apache auto load index.jsp
Thankyou, good to know, i'll see which aproach is easyer for me. On Monday 16 December 2002 21:30, Turner, John wrote: This has come up many times before. There is no easy solution. Apparently, Apache doesn't do the DirectoryIndex until after it checks to see if the URL should be passed to Tomcat. Since the actual URL has no *.jsp on it at that time, it doesn't go to Tomcat. There have been various alternatives suggested on the list in the past: 1) setup a index.html file to do a META refresh of 0 to URL/index.jsp 2) use mod_rewrite to intercept URLs that don't have a file on them, rewriting them to /index.jsp 3) send all requests to Tomcat, and use the web.xml welcome file list to have index.jsp come up first (this would make Apache pretty useless) There are probably other workarounds. John -Original Message- From: Alexander Wallace [mailto:[EMAIL PROTECTED]] Sent: Monday, December 16, 2002 8:11 PM To: [EMAIL PROTECTED] Subject: how do i make apache auto load index.jsp When using apache + tomcat, and calling my web app context, with no page being requested, i get 404 error If i call tomcat directly (using port 8080) tomcat loads index.jsp fine. How can i make apache also load the index.jsp ? I thought that by adding the index.jsp to the httpd.conf DirectoryIndex directive it would do it, but it doesn't... Thanks in advance. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.419 / Virus Database: 235 - Release Date: 11/13/2002 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.419 / Virus Database: 235 - Release Date: 11/13/2002 -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
mod_jk2 and shm explanations
I'm experiencing Tomcat-4.1.17/mod_jk2/Apache-2.0.43/Windows- 2000. After some difficulties, the whole configuration seems to be OK but I haven't understood all what I've done ...! Particulary, in workers2.properties, [shm] component is still obscur to me and documentation il very poor on this subject. So, does anyone can explain me : - what is exactly the fonction of this module - what kind of data is written in shm file? - which file size should I configure (actually 100 but don't know why ...)? Thanks in advance for any response. Accédez au courrier électronique de La Poste : www.laposte.net ; 3615 LAPOSTENET (0,13 /mn) ; tél : 08 92 68 13 50 (0,34/mn) -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Virtual Domains with Tomcat 4.1.12 Standalone
I really don't know if changing the defaulthost name is the solution. R u able to serve the pages with the configuration you have now without changing the defaulthost name or are you getting a DNS error. IF you want to serve pages the way you want it, then each of the host entries you have in server.xml should have context defined with its own Web.xml file. Hari -Original Message- From: J. Norment [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 17, 2002 10:36 AM To: Tomcat Users List Subject: RE: Virtual Domains with Tomcat 4.1.12 Standalone Hari: Thanks for the response. ( For that matter, thanks for everyone's response so far... ) I want the behavior to be: http://localhost - loads up the default welcome page, root/index.jsp http://host0.com - loads up host0's index page http://host1.com - loads up host1's index page Is changing the default host part of the solution? On Tue, 17 Dec 2002 10:22:20 -0500, Hari Venkatesan wrote: You have two Host name defined and only one closing tag for the host. Did you change Engine name=Standalone defaultHost=localhost debug=99 to reflect host0.com in the defaultHost Hari -Original Message- From: J. Norment [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 17, 2002 10:15 AM To: Tomcat Users List Subject: RE: Virtual Domains with Tomcat 4.1.12 Standalone This is the change that I had made to the server.xml file: !-- Define the default virtual host -- Host name=localhost debug=0 appBase=webapps unpackWARs=true autoDeploy=true !-- This part is added: -- Host name=host0.com debug=0 appBase=webapps/host0 unpackWARs=true Logger className=org.apache.catalina.logger.FileLogger directory=logs prefix=host0. suffix=.log timestamp=true/ Context path= docBase=webapps/host0 debug=0 reloadable=true/ Context path=/test docBase=webapps/host0 debug=0 reloadable=true/ /Host !-- End, added part. -- Is this is the change that you are referring to in adding the host tag? If that is not working, how would I track down what is broken? (ie, are there log files saying exactly what Tomcat is getting from the request?) As for adding an alias for localhost, wouldn't that mean that only one host was used? Ultimately, I'd like host0.com and host1.com to be different hosts for Tomcat. Applying Occam's Razor, I'm pretty sure that something is screwed on my end, but not sure how to track it down, at this point... On Tue, 17 Dec 2002 09:27:14 -0500, Turner, John wrote: It has Apache installed, but I just verified this behavior using http://some.server.com:8080 which bypasses Apache. If you need a virtual host setup in Tomcat, modify server.xml and add a Host element with a name parameter set to the FQDN that will be in the URL. Alternatively, if you want some.server.com to be treated as localhost, add an Alias tag to the localhost Host element in server.xml. Apache VirtualHost = Tomcat Host (roughly speaking) Host name=some.server.com ...some stuff here like Contexts, etc /Host The server.xml that comes with Tomcat has what you need already in it. The default server.xml file has a single virtual host (localhost) with a three Contexts (admin, manager, examples). Copy what you need from that. The Host element for localhost has a lot of stuff in it, probably stuff you don't need. Just delete most of it, and you should be fine. Alternatively, find the localhost Host element in server.xml and change the name parameter from localhost to your.server.com, restart Tomcat, and test it out and see if the behavior is what you want, then just copy that. John -Original Message- From: J. Norment [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 17, 2002 9:20 AM To: Tomcat Users List Subject: RE: Virtual Domains with Tomcat 4.1.12 Standalone That sounds almost exactly like what I'm trying to do. Does your test box setup also have Apache installed? If not, what did you do to get some.server.com showing up? On Tue, 17 Dec 2002 09:14:08 -0500, Turner, John wrote: Sorry, maybe someone else can answer your question. I'm just not understanding the problem. I have a RH 7.3 test box setup, with two virtual hosts (one is localhost, the other is some.server.com), and the welcome files display correctly. If it isn't working for you, I would suggest that the issue is with your virtual hosting configuration, not your welcome file/index.html configuration. John -- To unsubscribe, e-mail: mailto:tomcat-user- [EMAIL PROTECTED] For additional commands, e-mail: mailto:tomcat-user- [EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:tomcat-user- [EMAIL PROTECTED] For additional commands, e-mail: mailto:tomcat-user- [EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:tomcat-user- [EMAIL PROTECTED] For additional commands, e-mail: mailto:tomcat-user- [EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For
RE: Virtual Domains with Tomcat 4.1.12 Standalone
No, you want defaultHost to be localhost, or some other name. defaultHost has nothing to do with virtual hosts. One Engine can have multiple Hosts, each Host can have multiple Contexts. John -Original Message- From: Hari Venkatesan [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 17, 2002 10:22 AM To: Tomcat Users List Subject: RE: Virtual Domains with Tomcat 4.1.12 Standalone You have two Host name defined and only one closing tag for the host. Did you change Engine name=Standalone defaultHost=localhost debug=99 to reflect host0.com in the defaultHost Hari -Original Message- From: J. Norment [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 17, 2002 10:15 AM To: Tomcat Users List Subject: RE: Virtual Domains with Tomcat 4.1.12 Standalone This is the change that I had made to the server.xml file: !-- Define the default virtual host -- Host name=localhost debug=0 appBase=webapps unpackWARs=true autoDeploy=true !-- This part is added: -- Host name=host0.com debug=0 appBase=webapps/host0 unpackWARs=true Logger className=org.apache.catalina.logger.FileLogger directory=logs prefix=host0. suffix=.log timestamp=true/ Context path= docBase=webapps/host0 debug=0 reloadable=true/ Context path=/test docBase=webapps/host0 debug=0 reloadable=true/ /Host !-- End, added part. -- Is this is the change that you are referring to in adding the host tag? If that is not working, how would I track down what is broken? (ie, are there log files saying exactly what Tomcat is getting from the request?) As for adding an alias for localhost, wouldn't that mean that only one host was used? Ultimately, I'd like host0.com and host1.com to be different hosts for Tomcat. Applying Occam's Razor, I'm pretty sure that something is screwed on my end, but not sure how to track it down, at this point... On Tue, 17 Dec 2002 09:27:14 -0500, Turner, John wrote: It has Apache installed, but I just verified this behavior using http://some.server.com:8080 which bypasses Apache. If you need a virtual host setup in Tomcat, modify server.xml and add a Host element with a name parameter set to the FQDN that will be in the URL. Alternatively, if you want some.server.com to be treated as localhost, add an Alias tag to the localhost Host element in server.xml. Apache VirtualHost = Tomcat Host (roughly speaking) Host name=some.server.com ...some stuff here like Contexts, etc /Host The server.xml that comes with Tomcat has what you need already in it. The default server.xml file has a single virtual host (localhost) with a three Contexts (admin, manager, examples). Copy what you need from that. The Host element for localhost has a lot of stuff in it, probably stuff you don't need. Just delete most of it, and you should be fine. Alternatively, find the localhost Host element in server.xml and change the name parameter from localhost to your.server.com, restart Tomcat, and test it out and see if the behavior is what you want, then just copy that. John -Original Message- From: J. Norment [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 17, 2002 9:20 AM To: Tomcat Users List Subject: RE: Virtual Domains with Tomcat 4.1.12 Standalone That sounds almost exactly like what I'm trying to do. Does your test box setup also have Apache installed? If not, what did you do to get some.server.com showing up? On Tue, 17 Dec 2002 09:14:08 -0500, Turner, John wrote: Sorry, maybe someone else can answer your question. I'm just not understanding the problem. I have a RH 7.3 test box setup, with two virtual hosts (one is localhost, the other is some.server.com), and the welcome files display correctly. If it isn't working for you, I would suggest that the issue is with your virtual hosting configuration, not your welcome file/index.html configuration. John -- To unsubscribe, e-mail: mailto:tomcat-user- [EMAIL PROTECTED] For additional commands, e-mail: mailto:tomcat-user- [EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: JSP to Servlet to JSP pathing issue. RelativePathingPlease help.
Thanks Mike, that's probably the solution I'm going to go with. I agree that I don't want absolute URL's. Though I feel like there should be a way to do what I'm wanting to do, I'm just not finding it. I had seen another suggestion on the forums about mapping the servlet to the same path as the JSP, which sounded like it might work. However, I'm running into problems with that too. I haven't done much mapping so this is a good exercise for me, but I will probably just end with the solution you have suggested. I have the following in my web.xml file servlet servlet-namedolookup/servlet-name servlet-classtest.dolookup/servlet-class /servlet servlet-mapping servlet-namedolookup/servlet-name url-pattern/teststuff/dolookup*/url-pattern /servlet-mapping In my mind, this should make both the lookup.jsp and the dolookup servlet available from the same path, specifically http://localhost:8080/teststuff/ If that works, then I can use a simple relative path from the form to the servlet and the client path won't be changed. However, I'm not finding this in practice. A call to http://localhost:8080/teststuff/dolookup?etc is returning a not found error. I'm currently looking up all I can on the forums and tutorials on mapping, but every time I think I've figured it out it doesn't work. But this is the fun part, I guess. Thanks for all you help. [EMAIL PROTECTED] 12/17/02 09:43AM True (and I missed that that was the whole point of your exercise) but redirecting is the (only) way to get the browser's URL to change. If you think about it, you're basically saying that you want two different URLs (one to the servlet and one to the jsp), when displayed in the browser, to mean the same thing - which just isn't going to work. Two possible solutions: a) The ugly but quicker one: code the absolute URL in the jsp's form's action attribute. b) The elegant one: Don't link to the jsp page at all. Always link to the servlet, then make the servlet check for the existence of parameters. If your parameters exist then it was a form submission, so do what ever you do now and then forward() to the jsp. (This leaves the URL the same in the browser and doesn't lose the request-info.) If parameters don't exist, then just forward() to the jsp page (without doing any processing). It'll presumably behave like it does now when you request it directly. However, the browser's URL will still have the servlet's URL - and you can code all the paths relative to that. Mike. - Original Message - From: Jason Johnston [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, December 17, 2002 3:25 PM Subject: Re: JSP to Servlet to JSP pathing issue. Relative PathingPlease help. The redirecting doesn't seem to work. That tells the browser client to initiate a new request and all the information that I placed in the request object is gone, which undermines the purpose of the form. The forums have a lot on my problem, just no answers that have worked for me. Has anyone else ran into the issue of using a form in a JSP to submit data to a Servlet, have that servlet return data to the very same JSP? Thanks in advance. [EMAIL PROTECTED] 12/16/02 12:53PM Thanks for the advice, I didn't know you could redirect. The javadoc on the RequestDispatcher only lists the forward and include methods. I'll try that. The initial call to the servlet is actually being made by the client browser via a form response. [EMAIL PROTECTED] 12/16/02 12:00PM If you want the path in the browser's address bar to change, I think you have to use a redirect rather than a forward. (I've read that even then it's not guaranteed to work (since it's browser-dependent), but it's working fine for me. There's the disadvantage of an additional network round-trip that's not ideal, but I don't know of any other way.) [Actually, I guess you're already redirecting from the original jsp request to the servlet. If you changed that to forward then that'd probably solve you're problem without the additional round-trip] Mike. - Original Message - From: Jason Johnston [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Monday, December 16, 2002 5:46 PM Subject: JSP to Servlet to JSP pathing issue. Relative Pathing Please help. I have a JSP that has a form that I want processed by a servlet. The servlet then places the results in the page context and redirects back to the JSP. Everything works fine on the first go, but the second time through the path in the client's browser is no longer valid. Initially, the path is: http://localhost:8080/testgroup/lookup.jsp This then sends the form data to the /testgroup/servlet/dolookup?parameters The servlet executes and uses the request dispatcher to load the original JSP. RequestDispatcher rd=getServletContext().getRequestDispatcher(//lookup.jsp); rd.forward(request,response); The original
RE: Virtual Domains with Tomcat 4.1.12 Standalone
No, it is not. Leave defaultHost alone. Setup a Host element for host0.com and host1.com. If this is not working, either post your entire server.xml or post log file snippets with error messages. XML files are sensitive to properly closed tags and elements...including just a small snippet of your server.xml file doesn't let anyone verify that you've positioned and closed the new tags correctly because we can't see any of the other tags. My apologies, but this is starting to get fairly tedious. Adding a new Host element is a trivial exercise, all you have to do is make sure you position it correctly and close it correctly. There's really nothing else to do. If you have to, copy server.xml to server-work.xml, delete all of the comments and other extra information, and work with the resulting smaller file until you get the new elements closed and positioned correctly. Server.xml is no different than and HTML file...position and close everything properly, and it works. John -Original Message- From: J. Norment [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 17, 2002 10:36 AM To: Tomcat Users List Subject: RE: Virtual Domains with Tomcat 4.1.12 Standalone Hari: Thanks for the response. ( For that matter, thanks for everyone's response so far... ) I want the behavior to be: http://localhost - loads up the default welcome page, root/index.jsp http://host0.com - loads up host0's index page http://host1.com - loads up host1's index page Is changing the default host part of the solution? On Tue, 17 Dec 2002 10:22:20 -0500, Hari Venkatesan wrote: You have two Host name defined and only one closing tag for the host. Did you change Engine name=Standalone defaultHost=localhost debug=99 to reflect host0.com in the defaultHost Hari -Original Message- From: J. Norment [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 17, 2002 10:15 AM To: Tomcat Users List Subject: RE: Virtual Domains with Tomcat 4.1.12 Standalone This is the change that I had made to the server.xml file: !-- Define the default virtual host -- Host name=localhost debug=0 appBase=webapps unpackWARs=true autoDeploy=true !-- This part is added: -- Host name=host0.com debug=0 appBase=webapps/host0 unpackWARs=true Logger className=org.apache.catalina.logger.FileLogger directory=logs prefix=host0. suffix=.log timestamp=true/ Context path= docBase=webapps/host0 debug=0 reloadable=true/ Context path=/test docBase=webapps/host0 debug=0 reloadable=true/ /Host !-- End, added part. -- Is this is the change that you are referring to in adding the host tag? If that is not working, how would I track down what is broken? (ie, are there log files saying exactly what Tomcat is getting from the request?) As for adding an alias for localhost, wouldn't that mean that only one host was used? Ultimately, I'd like host0.com and host1.com to be different hosts for Tomcat. Applying Occam's Razor, I'm pretty sure that something is screwed on my end, but not sure how to track it down, at this point... On Tue, 17 Dec 2002 09:27:14 -0500, Turner, John wrote: It has Apache installed, but I just verified this behavior using http://some.server.com:8080 which bypasses Apache. If you need a virtual host setup in Tomcat, modify server.xml and add a Host element with a name parameter set to the FQDN that will be in the URL. Alternatively, if you want some.server.com to be treated as localhost, add an Alias tag to the localhost Host element in server.xml. Apache VirtualHost = Tomcat Host (roughly speaking) Host name=some.server.com ...some stuff here like Contexts, etc /Host The server.xml that comes with Tomcat has what you need already in it. The default server.xml file has a single virtual host (localhost) with a three Contexts (admin, manager, examples). Copy what you need from that. The Host element for localhost has a lot of stuff in it, probably stuff you don't need. Just delete most of it, and you should be fine. Alternatively, find the localhost Host element in server.xml and change the name parameter from localhost to your.server.com, restart Tomcat, and test it out and see if the behavior is what you want, then just copy that. John -Original Message- From: J. Norment [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 17, 2002 9:20 AM To: Tomcat Users List Subject: RE: Virtual Domains with Tomcat 4.1.12 Standalone That sounds almost exactly like what I'm trying to do. Does your test box setup also have Apache installed? If not, what did you do to get some.server.com showing up? On Tue, 17 Dec 2002 09:14:08 -0500, Turner, John wrote: Sorry, maybe someone else can answer your question. I'm just not understanding the problem. I have a RH 7.3 test box setup, with two virtual hosts (one is localhost, the other is some.server.com), and the welcome files display correctly.
RE: Virtual Domains with Tomcat 4.1.12 Standalone
Changing defaultHost is not the solution. John -Original Message- From: Hari Venkatesan [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 17, 2002 10:51 AM To: Tomcat Users List Subject: RE: Virtual Domains with Tomcat 4.1.12 Standalone I really don't know if changing the defaulthost name is the solution. R u able to serve the pages with the configuration you have now without changing the defaulthost name or are you getting a DNS error. IF you want to serve pages the way you want it, then each of the host entries you have in server.xml should have context defined with its own Web.xml file. Hari -Original Message- From: J. Norment [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 17, 2002 10:36 AM To: Tomcat Users List Subject: RE: Virtual Domains with Tomcat 4.1.12 Standalone Hari: Thanks for the response. ( For that matter, thanks for everyone's response so far... ) I want the behavior to be: http://localhost - loads up the default welcome page, root/index.jsp http://host0.com - loads up host0's index page http://host1.com - loads up host1's index page Is changing the default host part of the solution? On Tue, 17 Dec 2002 10:22:20 -0500, Hari Venkatesan wrote: You have two Host name defined and only one closing tag for the host. Did you change Engine name=Standalone defaultHost=localhost debug=99 to reflect host0.com in the defaultHost Hari -Original Message- From: J. Norment [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 17, 2002 10:15 AM To: Tomcat Users List Subject: RE: Virtual Domains with Tomcat 4.1.12 Standalone This is the change that I had made to the server.xml file: !-- Define the default virtual host -- Host name=localhost debug=0 appBase=webapps unpackWARs=true autoDeploy=true !-- This part is added: -- Host name=host0.com debug=0 appBase=webapps/host0 unpackWARs=true Logger className=org.apache.catalina.logger.FileLogger directory=logs prefix=host0. suffix=.log timestamp=true/ Context path= docBase=webapps/host0 debug=0 reloadable=true/ Context path=/test docBase=webapps/host0 debug=0 reloadable=true/ /Host !-- End, added part. -- Is this is the change that you are referring to in adding the host tag? If that is not working, how would I track down what is broken? (ie, are there log files saying exactly what Tomcat is getting from the request?) As for adding an alias for localhost, wouldn't that mean that only one host was used? Ultimately, I'd like host0.com and host1.com to be different hosts for Tomcat. Applying Occam's Razor, I'm pretty sure that something is screwed on my end, but not sure how to track it down, at this point... On Tue, 17 Dec 2002 09:27:14 -0500, Turner, John wrote: It has Apache installed, but I just verified this behavior using http://some.server.com:8080 which bypasses Apache. If you need a virtual host setup in Tomcat, modify server.xml and add a Host element with a name parameter set to the FQDN that will be in the URL. Alternatively, if you want some.server.com to be treated as localhost, add an Alias tag to the localhost Host element in server.xml. Apache VirtualHost = Tomcat Host (roughly speaking) Host name=some.server.com ...some stuff here like Contexts, etc /Host The server.xml that comes with Tomcat has what you need already in it. The default server.xml file has a single virtual host (localhost) with a three Contexts (admin, manager, examples). Copy what you need from that. The Host element for localhost has a lot of stuff in it, probably stuff you don't need. Just delete most of it, and you should be fine. Alternatively, find the localhost Host element in server.xml and change the name parameter from localhost to your.server.com, restart Tomcat, and test it out and see if the behavior is what you want, then just copy that. John -Original Message- From: J. Norment [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 17, 2002 9:20 AM To: Tomcat Users List Subject: RE: Virtual Domains with Tomcat 4.1.12 Standalone That sounds almost exactly like what I'm trying to do. Does your test box setup also have Apache installed? If not, what did you do to get some.server.com showing up? On Tue, 17 Dec 2002 09:14:08 -0500, Turner, John wrote: Sorry, maybe someone else can answer your question. I'm just not understanding the problem. I have a RH 7.3 test box setup, with two virtual hosts (one is localhost, the other is some.server.com), and the welcome files display correctly. If it isn't working for you, I would suggest that the issue is with your virtual hosting configuration, not your welcome file/index.html configuration. John -- To unsubscribe, e-mail: mailto:tomcat-user- [EMAIL PROTECTED] For additional commands, e-mail: mailto:tomcat-user- [EMAIL PROTECTED] -- To unsubscribe, e-mail:
RE: Help: Simple example to use tomcat 4.1.12 / Apache 1.3 and mo d_jk ??
I don't use Windows for server-related tasks. That said, the installation of Apache + mod_jk + Tomcat on Windows is identical, the only difference being pathnames and path separators. If you want a HOWTO for Apache + JK2 + Tomcat, I would use the one posted previously by Robert Sowders: ftp://pokey.wr.usgs.gov/pub/rsowders/Apache2_Jk2_TC4.1.x_JSDK1.4.x.zip John -Original Message- From: Ming Zhao [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 17, 2002 10:30 AM To: Tomcat Users List Subject: RE: Help: Simple example to use tomcat 4.1.12 / Apache 1.3 and mo d_jk ?? Hi, John Is there any HOWTO for win2k? Similar to that for RH? For my setup and configure of Apache, Tomcat and JK2 on win2k, it seems that Apache and Tomcat can work well seperately. But it cannot work to open jsp file with Apache to acivate Tomcat to deal with. And I got the message on the Tomcat window: APR not loaded, disabling jni component:java.io.ioexception: no jkjni in java.library.path. Can you help me? Thanks lots, Minger --- Turner, John [EMAIL PROTECTED] wrote: I don't think you can get any simpler than this: http://www.johnturner.com/howto The version numbers are irrelevant...the procedures are the same. Newer versions of Tomcat use one connector class to handle multiple protocols. That class is called CoyoteConnector and it talks JK, JK2, and HTTP (and I think HTTPS as well). Older versions of Tomcat used a class called Ajp13Connector to talk JK. If you are using JK, you can use either CoyoteConnector (enabled by default) or Ajp13Connector. If you are using JK2, you have to use CoyoteConnector. In your files, you are using JK commands (JkMount) with a JK2 module, that won't work. Check my HOWTO, if you have problems, post back to the list. Also, flagging messages as urgent or high importance isn't very polite, and will probably cause more people to ignore your post than to read it and answer itwe're all very, very busy, and your important issue isn't any more important than those of anyone else. John -Original Message- From: Rob Cartier [mailto:[EMAIL PROTECTED]] Sent: Monday, December 16, 2002 5:11 PM To: [EMAIL PROTECTED] Subject: Help: Simple example to use tomcat 4.1.12 / Apache 1.3 and mod_jk ?? Importance: High I having looking for a very simple howto on how to get on RH 7.2 Tomcat 4.1.12 Apache 1.3 Mod_jk or mod_jk2 working together possibly using the /examples that are included with tomcat as a test bed. I am confused on how to configure tomcat. I see Coyote/AJP13 and ajp13 in the server.xml file but I am unsure which one to use. There is also a discussion of jk2.properties file but that one is all commented out and there seems to be no clear example of what needs to be done in the server.xml and jk2.properties if anything that needs to be adjusted. On the Apache side I have tried both mod_jk and mod_jk2 but the examples in the how to are either for mod_jk.so or mod_jk2.so cant tell . It is very fustrating. Does anyone have a very simple docs I can follow == Here are some of my files I added this to my httpd.conf in the beginning LoadModule jk2_module modules/mod_jk2.so ADDModule mod_jk2.c -- at the bottom I added so that it would at least start LoadModule jk2_module libexec/mod_jk2.so AddModule mod_jk2.c IfModule mod_jk2.c Jk2WorkersFile /etc/httpd/conf/workers.properties JkLogFile /var/log/httpd/mod_jk2.log JkLogLevel info JkLogStampFormat (%a %b %d %H:%M:%S %Y) JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories JkRequestLogFormat %w %V %T JkMount /examples/servlet/* worker1 JkMount /examples/*.jsp worker1 /IfModule my worker2.properties file # Define 1 real worker using ajp13worker.list=worker1 # Set properties for worker1 (ajp13)worker.worker1.type=ajp13 worker.list=worker1 worker.worker1.host=localhost worker.worker1.port=8009 worker.worker1.lbfactor=50 worker.worker1.cachesize=10 worker.worker1.cache_timeout=600 worker.worker1.socket_keepalive=1 worker.worker1.socket_timeout=300 What I wind up is protocol errors in my catalina.out file Ajp13Connector active threads=6 java.lang.ThreadGroup[name=Ajp13Connector[8009],maxpri=10] Thread[Ajp13Connector[8009],5,Ajp13Connector[8009]] Thread[Ajp13Processor[8009][0],5,Ajp13Connector[8009]] Thread[Ajp13Processor[8009][1],5,Ajp13Connector[8009]] Thread[Ajp13Processor[8009][2],5,Ajp13Connector[8009]] Thread[Ajp13Processor[8009][3],5,Ajp13Connector[8009]] Thread[Ajp13Processor[8009][4],5,Ajp13Connector[8009]] === BAD
RE: Virtual Domains with Tomcat 4.1.12 Standalone
If I leave the defaultHost to localhost and have a host name=something.com, when I type in the url http://something.com/{webapp}/index.jsp, I get a server not found or DNS error. Do I need to define something.com anywhere else in win2000 Hari -Original Message- From: Turner, John [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 17, 2002 11:04 AM To: 'Tomcat Users List' Subject: RE: Virtual Domains with Tomcat 4.1.12 Standalone Changing defaultHost is not the solution. John -Original Message- From: Hari Venkatesan [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 17, 2002 10:51 AM To: Tomcat Users List Subject: RE: Virtual Domains with Tomcat 4.1.12 Standalone I really don't know if changing the defaulthost name is the solution. R u able to serve the pages with the configuration you have now without changing the defaulthost name or are you getting a DNS error. IF you want to serve pages the way you want it, then each of the host entries you have in server.xml should have context defined with its own Web.xml file. Hari -Original Message- From: J. Norment [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 17, 2002 10:36 AM To: Tomcat Users List Subject: RE: Virtual Domains with Tomcat 4.1.12 Standalone Hari: Thanks for the response. ( For that matter, thanks for everyone's response so far... ) I want the behavior to be: http://localhost - loads up the default welcome page, root/index.jsp http://host0.com - loads up host0's index page http://host1.com - loads up host1's index page Is changing the default host part of the solution? On Tue, 17 Dec 2002 10:22:20 -0500, Hari Venkatesan wrote: You have two Host name defined and only one closing tag for the host. Did you change Engine name=Standalone defaultHost=localhost debug=99 to reflect host0.com in the defaultHost Hari -Original Message- From: J. Norment [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 17, 2002 10:15 AM To: Tomcat Users List Subject: RE: Virtual Domains with Tomcat 4.1.12 Standalone This is the change that I had made to the server.xml file: !-- Define the default virtual host -- Host name=localhost debug=0 appBase=webapps unpackWARs=true autoDeploy=true !-- This part is added: -- Host name=host0.com debug=0 appBase=webapps/host0 unpackWARs=true Logger className=org.apache.catalina.logger.FileLogger directory=logs prefix=host0. suffix=.log timestamp=true/ Context path= docBase=webapps/host0 debug=0 reloadable=true/ Context path=/test docBase=webapps/host0 debug=0 reloadable=true/ /Host !-- End, added part. -- Is this is the change that you are referring to in adding the host tag? If that is not working, how would I track down what is broken? (ie, are there log files saying exactly what Tomcat is getting from the request?) As for adding an alias for localhost, wouldn't that mean that only one host was used? Ultimately, I'd like host0.com and host1.com to be different hosts for Tomcat. Applying Occam's Razor, I'm pretty sure that something is screwed on my end, but not sure how to track it down, at this point... On Tue, 17 Dec 2002 09:27:14 -0500, Turner, John wrote: It has Apache installed, but I just verified this behavior using http://some.server.com:8080 which bypasses Apache. If you need a virtual host setup in Tomcat, modify server.xml and add a Host element with a name parameter set to the FQDN that will be in the URL. Alternatively, if you want some.server.com to be treated as localhost, add an Alias tag to the localhost Host element in server.xml. Apache VirtualHost = Tomcat Host (roughly speaking) Host name=some.server.com ...some stuff here like Contexts, etc /Host The server.xml that comes with Tomcat has what you need already in it. The default server.xml file has a single virtual host (localhost) with a three Contexts (admin, manager, examples). Copy what you need from that. The Host element for localhost has a lot of stuff in it, probably stuff you don't need. Just delete most of it, and you should be fine. Alternatively, find the localhost Host element in server.xml and change the name parameter from localhost to your.server.com, restart Tomcat, and test it out and see if the behavior is what you want, then just copy that. John -Original Message- From: J. Norment [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 17, 2002 9:20 AM To: Tomcat Users List Subject: RE: Virtual Domains with Tomcat 4.1.12 Standalone That sounds almost exactly like what I'm trying to do. Does your test box setup also have Apache installed? If not, what did you do to get some.server.com showing up? On Tue, 17 Dec 2002 09:14:08 -0500, Turner, John wrote: Sorry, maybe someone else can answer your question. I'm just not understanding the problem. I have a RH 7.3 test box setup, with two virtual hosts
Admin webapp bug with datasource?
I'am facing with a problem in admin application. I added manually a datasource in server.xml with a custom factory (some extensions to DBCP). Then I went to admin application, and when I asked for this datasource with custom factory, admin application responded with a error (driverClassName missing, which is right, because my custom factory configure elsewhere the driver ...) I think it would be good if admin application accept custom factory in datasource (and obviously in this cas doesn't enable more configuration in this datasource other than factory class name). Is is a bug? Accédez au courrier électronique de La Poste : www.laposte.net ; 3615 LAPOSTENET (0,13 /mn) ; tél : 08 92 68 13 50 (0,34/mn) -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Virtual Domains with Tomcat 4.1.12 Standalone
Got it, John. Thanks for your time. ( not being sarcastic... forgot to thank you earlier. ) ( For the record, I only posted the small snippet because that was all that I changed from out of the box ) I'll try to verify the XML tags now. ( I've thought about this before, but I'll look at it again. ) I thought that maybe I had something screwy going on with part of the request being blocked, but I honestly don't know that part intimately enough to look at it and verify that everything is coming through ok. On Tue, 17 Dec 2002 11:03:06 -0500, Turner, John wrote: No, it is not. Leave defaultHost alone. Setup a Host element for host0.com and host1.com. If this is not working, either post your entire server.xml or post log file snippets with error messages. XML files are sensitive to properly closed tags and elements...including just a small snippet of your server.xml file doesn't let anyone verify that you've positioned and closed the new tags correctly because we can't see any of the other tags. My apologies, but this is starting to get fairly tedious. Adding a new Host element is a trivial exercise, all you have to do is make sure you position it correctly and close it correctly. There's really nothing else to do. If you have to, copy server.xml to server-work.xml, delete all of the comments and other extra information, and work with the resulting smaller file until you get the new elements closed and positioned correctly. Server.xml is no different than and HTML file...position and close everything properly, and it works. John -Original Message- From: J. Norment [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 17, 2002 10:36 AM To: Tomcat Users List Subject: RE: Virtual Domains with Tomcat 4.1.12 Standalone Hari: Thanks for the response. ( For that matter, thanks for everyone's response so far... ) I want the behavior to be: http://localhost - loads up the default welcome page, root/index.jsp http://host0.com - loads up host0's index page http://host1.com - loads up host1's index page Is changing the default host part of the solution? On Tue, 17 Dec 2002 10:22:20 -0500, Hari Venkatesan wrote: You have two Host name defined and only one closing tag for the host. Did you change Engine name=Standalone defaultHost=localhost debug=99 to reflect host0.com in the defaultHost Hari -Original Message- From: J. Norment [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 17, 2002 10:15 AM To: Tomcat Users List Subject: RE: Virtual Domains with Tomcat 4.1.12 Standalone This is the change that I had made to the server.xml file: !-- Define the default virtual host -- Host name=localhost debug=0 appBase=webapps unpackWARs=true autoDeploy=true !-- This part is added: -- Host name=host0.com debug=0 appBase=webapps/host0 unpackWARs=true Logger className=org.apache.catalina.logger.FileLogger directory=logs prefix=host0. suffix=.log timestamp=true/ Context path= docBase=webapps/host0 debug=0 reloadable=true/ Context path=/test docBase=webapps/host0 debug=0 reloadable=true/ /Host !-- End, added part. -- Is this is the change that you are referring to in adding the host tag? If that is not working, how would I track down what is broken? (ie, are there log files saying exactly what Tomcat is getting from the request?) As for adding an alias for localhost, wouldn't that mean that only one host was used? Ultimately, I'd like host0.com and host1.com to be different hosts for Tomcat. Applying Occam's Razor, I'm pretty sure that something is screwed on my end, but not sure how to track it down, at this point... On Tue, 17 Dec 2002 09:27:14 -0500, Turner, John wrote: It has Apache installed, but I just verified this behavior using http://some.server.com:8080 which bypasses Apache. If you need a virtual host setup in Tomcat, modify server.xml and add a Host element with a name parameter set to the FQDN that will be in the URL. Alternatively, if you want some.server.com to be treated as localhost, add an Alias tag to the localhost Host element in server.xml. Apache VirtualHost = Tomcat Host (roughly speaking) Host name=some.server.com ...some stuff here like Contexts, etc /Host The server.xml that comes with Tomcat has what you need already in it. The default server.xml file has a single virtual host (localhost) with a three Contexts (admin, manager, examples). Copy what you need from that. The Host element for localhost has a lot of stuff in it, probably stuff you don't need. Just delete most of it, and you should be fine. Alternatively, find the localhost Host element in server.xml and change the name parameter from localhost to your.server.com, restart Tomcat, and test it out and see if the behavior is what you want, then just copy that. John -Original Message- From: J. Norment [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 17, 2002 9:20 AM To: Tomcat Users List Subject: RE: Virtual Domains with Tomcat 4.1.12 Standalone That sounds almost exactly
RE: Virtual Domains with Tomcat 4.1.12 Standalone
Hari: My guess is that something.com would need to have a DNS record in a nameserver ( that resolves to the box that you have Tomcat on. ) On Tue, 17 Dec 2002 11:09:30 -0500, Hari Venkatesan wrote: If I leave the defaultHost to localhost and have a host name=something.com, when I type in the url http://something.com/{webapp}/index.jsp, I get a server not found or DNS error. Do I need to define something.com anywhere else in win2000 Hari -Original Message- From: Turner, John [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 17, 2002 11:04 AM To: 'Tomcat Users List' Subject: RE: Virtual Domains with Tomcat 4.1.12 Standalone Changing defaultHost is not the solution. John -Original Message- From: Hari Venkatesan [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 17, 2002 10:51 AM To: Tomcat Users List Subject: RE: Virtual Domains with Tomcat 4.1.12 Standalone I really don't know if changing the defaulthost name is the solution. R u able to serve the pages with the configuration you have now without changing the defaulthost name or are you getting a DNS error. IF you want to serve pages the way you want it, then each of the host entries you have in server.xml should have context defined with its own Web.xml file. Hari -Original Message- From: J. Norment [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 17, 2002 10:36 AM To: Tomcat Users List Subject: RE: Virtual Domains with Tomcat 4.1.12 Standalone Hari: Thanks for the response. ( For that matter, thanks for everyone's response so far... ) I want the behavior to be: http://localhost - loads up the default welcome page, root/index.jsp http://host0.com - loads up host0's index page http://host1.com - loads up host1's index page Is changing the default host part of the solution? On Tue, 17 Dec 2002 10:22:20 -0500, Hari Venkatesan wrote: You have two Host name defined and only one closing tag for the host. Did you change Engine name=Standalone defaultHost=localhost debug=99 to reflect host0.com in the defaultHost Hari -Original Message- From: J. Norment [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 17, 2002 10:15 AM To: Tomcat Users List Subject: RE: Virtual Domains with Tomcat 4.1.12 Standalone This is the change that I had made to the server.xml file: !-- Define the default virtual host -- Host name=localhost debug=0 appBase=webapps unpackWARs=true autoDeploy=true !-- This part is added: -- Host name=host0.com debug=0 appBase=webapps/host0 unpackWARs=true Logger className=org.apache.catalina.logger.FileLogger directory=logs prefix=host0. suffix=.log timestamp=true/ Context path= docBase=webapps/host0 debug=0 reloadable=true/ Context path=/test docBase=webapps/host0 debug=0 reloadable=true/ /Host !-- End, added part. -- Is this is the change that you are referring to in adding the host tag? If that is not working, how would I track down what is broken? (ie, are there log files saying exactly what Tomcat is getting from the request?) As for adding an alias for localhost, wouldn't that mean that only one host was used? Ultimately, I'd like host0.com and host1.com to be different hosts for Tomcat. Applying Occam's Razor, I'm pretty sure that something is screwed on my end, but not sure how to track it down, at this point... On Tue, 17 Dec 2002 09:27:14 -0500, Turner, John wrote: It has Apache installed, but I just verified this behavior using http://some.server.com:8080 which bypasses Apache. If you need a virtual host setup in Tomcat, modify server.xml and add a Host element with a name parameter set to the FQDN that will be in the URL. Alternatively, if you want some.server.com to be treated as localhost, add an Alias tag to the localhost Host element in server.xml. Apache VirtualHost = Tomcat Host (roughly speaking) Host name=some.server.com ...some stuff here like Contexts, etc /Host The server.xml that comes with Tomcat has what you need already in it. The default server.xml file has a single virtual host (localhost) with a three Contexts (admin, manager, examples). Copy what you need from that. The Host element for localhost has a lot of stuff in it, probably stuff you don't need. Just delete most of it, and you should be fine. Alternatively, find the localhost Host element in server.xml and change the name parameter from localhost to your.server.com, restart Tomcat, and test it out and see if the behavior is what you want, then just copy that. John -Original Message- From: J. Norment [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 17, 2002 9:20 AM To: Tomcat Users List Subject: RE: Virtual Domains with Tomcat 4.1.12 Standalone That sounds almost exactly like what I'm trying to do. Does your test box setup also have Apache installed? If not, what did you do to get some.server.com showing up? On Tue, 17 Dec 2002 09:14:08 -0500, Turner, John wrote: Sorry, maybe someone else can answer your question. I'm just not understanding the problem. I have a
RE: Virtual Domains with Tomcat 4.1.12 Standalone
Let's put it this way. If you had to change defaultHost for virtual hosts to work, then you could never have more than one virtual host, since there is only one defaultHost. That's obviously wrong. Tomcat has the ability to serve many virtual hosts, not just one. I have several virtual hosts running on a Sun 420R at the moment, and there's only one defaultHost (and it's set to localhost). If you are getting server not found then something.com doesn't resolve to an IP address. Can you ping something.com? If not, there's your answer. If something.com resolved to the IP address where Tomcat was running, and there was no virtual host defined, then Tomcat would revert to serving the default context from the default host. That's what defaultHost does. John -Original Message- From: Hari Venkatesan [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 17, 2002 11:10 AM To: Tomcat Users List Subject: RE: Virtual Domains with Tomcat 4.1.12 Standalone If I leave the defaultHost to localhost and have a host name=something.com, when I type in the url http://something.com/{webapp}/index.jsp, I get a server not found or DNS error. Do I need to define something.com anywhere else in win2000 Hari -Original Message- From: Turner, John [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 17, 2002 11:04 AM To: 'Tomcat Users List' Subject: RE: Virtual Domains with Tomcat 4.1.12 Standalone Changing defaultHost is not the solution. John -Original Message- From: Hari Venkatesan [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 17, 2002 10:51 AM To: Tomcat Users List Subject: RE: Virtual Domains with Tomcat 4.1.12 Standalone I really don't know if changing the defaulthost name is the solution. R u able to serve the pages with the configuration you have now without changing the defaulthost name or are you getting a DNS error. IF you want to serve pages the way you want it, then each of the host entries you have in server.xml should have context defined with its own Web.xml file. Hari -Original Message- From: J. Norment [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 17, 2002 10:36 AM To: Tomcat Users List Subject: RE: Virtual Domains with Tomcat 4.1.12 Standalone Hari: Thanks for the response. ( For that matter, thanks for everyone's response so far... ) I want the behavior to be: http://localhost - loads up the default welcome page, root/index.jsp http://host0.com - loads up host0's index page http://host1.com - loads up host1's index page Is changing the default host part of the solution? On Tue, 17 Dec 2002 10:22:20 -0500, Hari Venkatesan wrote: You have two Host name defined and only one closing tag for the host. Did you change Engine name=Standalone defaultHost=localhost debug=99 to reflect host0.com in the defaultHost Hari -Original Message- From: J. Norment [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 17, 2002 10:15 AM To: Tomcat Users List Subject: RE: Virtual Domains with Tomcat 4.1.12 Standalone This is the change that I had made to the server.xml file: !-- Define the default virtual host -- Host name=localhost debug=0 appBase=webapps unpackWARs=true autoDeploy=true !-- This part is added: -- Host name=host0.com debug=0 appBase=webapps/host0 unpackWARs=true Logger className=org.apache.catalina.logger.FileLogger directory=logs prefix=host0. suffix=.log timestamp=true/ Context path= docBase=webapps/host0 debug=0 reloadable=true/ Context path=/test docBase=webapps/host0 debug=0 reloadable=true/ /Host !-- End, added part. -- Is this is the change that you are referring to in adding the host tag? If that is not working, how would I track down what is broken? (ie, are there log files saying exactly what Tomcat is getting from the request?) As for adding an alias for localhost, wouldn't that mean that only one host was used? Ultimately, I'd like host0.com and host1.com to be different hosts for Tomcat. Applying Occam's Razor, I'm pretty sure that something is screwed on my end, but not sure how to track it down, at this point... On Tue, 17 Dec 2002 09:27:14 -0500, Turner, John wrote: It has Apache installed, but I just verified this behavior using http://some.server.com:8080 which bypasses Apache. If you need a virtual host setup in Tomcat, modify server.xml and add a Host element with a name parameter set to the FQDN that will be in the URL. Alternatively, if you want some.server.com to be treated as localhost, add an Alias tag to the localhost Host element in server.xml. Apache VirtualHost = Tomcat Host (roughly speaking) Host name=some.server.com ...some stuff here like Contexts, etc /Host The server.xml that comes with Tomcat has what you need already in it.
RE: Virtual Domains with Tomcat 4.1.12 Standalone
Exactly. John -Original Message- From: J. Norment [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 17, 2002 11:16 AM To: Tomcat Users List Subject: RE: Virtual Domains with Tomcat 4.1.12 Standalone Hari: My guess is that something.com would need to have a DNS record in a nameserver ( that resolves to the box that you have Tomcat on. ) On Tue, 17 Dec 2002 11:09:30 -0500, Hari Venkatesan wrote: If I leave the defaultHost to localhost and have a host name=something.com, when I type in the url http://something.com/{webapp}/index.jsp, I get a server not found or DNS error. Do I need to define something.com anywhere else in win2000 Hari -Original Message- From: Turner, John [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 17, 2002 11:04 AM To: 'Tomcat Users List' Subject: RE: Virtual Domains with Tomcat 4.1.12 Standalone Changing defaultHost is not the solution. John -Original Message- From: Hari Venkatesan [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 17, 2002 10:51 AM To: Tomcat Users List Subject: RE: Virtual Domains with Tomcat 4.1.12 Standalone I really don't know if changing the defaulthost name is the solution. R u able to serve the pages with the configuration you have now without changing the defaulthost name or are you getting a DNS error. IF you want to serve pages the way you want it, then each of the host entries you have in server.xml should have context defined with its own Web.xml file. Hari -Original Message- From: J. Norment [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 17, 2002 10:36 AM To: Tomcat Users List Subject: RE: Virtual Domains with Tomcat 4.1.12 Standalone Hari: Thanks for the response. ( For that matter, thanks for everyone's response so far... ) I want the behavior to be: http://localhost - loads up the default welcome page, root/index.jsp http://host0.com - loads up host0's index page http://host1.com - loads up host1's index page Is changing the default host part of the solution? On Tue, 17 Dec 2002 10:22:20 -0500, Hari Venkatesan wrote: You have two Host name defined and only one closing tag for the host. Did you change Engine name=Standalone defaultHost=localhost debug=99 to reflect host0.com in the defaultHost Hari -Original Message- From: J. Norment [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 17, 2002 10:15 AM To: Tomcat Users List Subject: RE: Virtual Domains with Tomcat 4.1.12 Standalone This is the change that I had made to the server.xml file: !-- Define the default virtual host -- Host name=localhost debug=0 appBase=webapps unpackWARs=true autoDeploy=true !-- This part is added: -- Host name=host0.com debug=0 appBase=webapps/host0 unpackWARs=true Logger className=org.apache.catalina.logger.FileLogger directory=logs prefix=host0. suffix=.log timestamp=true/ Context path= docBase=webapps/host0 debug=0 reloadable=true/ Context path=/test docBase=webapps/host0 debug=0 reloadable=true/ /Host !-- End, added part. -- Is this is the change that you are referring to in adding the host tag? If that is not working, how would I track down what is broken? (ie, are there log files saying exactly what Tomcat is getting from the request?) As for adding an alias for localhost, wouldn't that mean that only one host was used? Ultimately, I'd like host0.com and host1.com to be different hosts for Tomcat. Applying Occam's Razor, I'm pretty sure that something is screwed on my end, but not sure how to track it down, at this point... On Tue, 17 Dec 2002 09:27:14 -0500, Turner, John wrote: It has Apache installed, but I just verified this behavior using http://some.server.com:8080 which bypasses Apache. If you need a virtual host setup in Tomcat, modify server.xml and add a Host element with a name parameter set to the FQDN that will be in the URL. Alternatively, if you want some.server.com to be treated as localhost, add an Alias tag to the localhost Host element in server.xml. Apache VirtualHost = Tomcat Host (roughly speaking) Host name=some.server.com ...some stuff here like Contexts, etc /Host The server.xml that comes with Tomcat has what you need already in it. The default server.xml file has a single virtual host (localhost) with a three Contexts (admin, manager, examples). Copy what you need from that. The Host element for localhost has a lot of stuff in it, probably stuff you don't need. Just delete most of it, and you should be fine. Alternatively, find the localhost Host element in server.xml and change the name parameter from localhost to your.server.com, restart Tomcat, and test it out and see if the behavior is what you want, then just copy that. John -Original Message- From: J. Norment [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 17, 2002 9:20 AM To: Tomcat Users List
RE: Virtual Domains with Tomcat 4.1.12 Standalone
If you post your server.xml, someone will look at it. I can't promise I will, as time is everything, but someone will. If you could remove the comments from it and post an uncommented version, that would make it smaller and easier to scan. John -Original Message- From: J. Norment [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 17, 2002 11:12 AM To: Tomcat Users List Subject: RE: Virtual Domains with Tomcat 4.1.12 Standalone Got it, John. Thanks for your time. ( not being sarcastic... forgot to thank you earlier. ) ( For the record, I only posted the small snippet because that was all that I changed from out of the box ) I'll try to verify the XML tags now. ( I've thought about this before, but I'll look at it again. ) I thought that maybe I had something screwy going on with part of the request being blocked, but I honestly don't know that part intimately enough to look at it and verify that everything is coming through ok. On Tue, 17 Dec 2002 11:03:06 -0500, Turner, John wrote: No, it is not. Leave defaultHost alone. Setup a Host element for host0.com and host1.com. If this is not working, either post your entire server.xml or post log file snippets with error messages. XML files are sensitive to properly closed tags and elements...including just a small snippet of your server.xml file doesn't let anyone verify that you've positioned and closed the new tags correctly because we can't see any of the other tags. My apologies, but this is starting to get fairly tedious. Adding a new Host element is a trivial exercise, all you have to do is make sure you position it correctly and close it correctly. There's really nothing else to do. If you have to, copy server.xml to server-work.xml, delete all of the comments and other extra information, and work with the resulting smaller file until you get the new elements closed and positioned correctly. Server.xml is no different than and HTML file...position and close everything properly, and it works. John -Original Message- From: J. Norment [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 17, 2002 10:36 AM To: Tomcat Users List Subject: RE: Virtual Domains with Tomcat 4.1.12 Standalone Hari: Thanks for the response. ( For that matter, thanks for everyone's response so far... ) I want the behavior to be: http://localhost - loads up the default welcome page, root/index.jsp http://host0.com - loads up host0's index page http://host1.com - loads up host1's index page Is changing the default host part of the solution? On Tue, 17 Dec 2002 10:22:20 -0500, Hari Venkatesan wrote: You have two Host name defined and only one closing tag for the host. Did you change Engine name=Standalone defaultHost=localhost debug=99 to reflect host0.com in the defaultHost Hari -Original Message- From: J. Norment [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 17, 2002 10:15 AM To: Tomcat Users List Subject: RE: Virtual Domains with Tomcat 4.1.12 Standalone This is the change that I had made to the server.xml file: !-- Define the default virtual host -- Host name=localhost debug=0 appBase=webapps unpackWARs=true autoDeploy=true !-- This part is added: -- Host name=host0.com debug=0 appBase=webapps/host0 unpackWARs=true Logger className=org.apache.catalina.logger.FileLogger directory=logs prefix=host0. suffix=.log timestamp=true/ Context path= docBase=webapps/host0 debug=0 reloadable=true/ Context path=/test docBase=webapps/host0 debug=0 reloadable=true/ /Host !-- End, added part. -- Is this is the change that you are referring to in adding the host tag? If that is not working, how would I track down what is broken? (ie, are there log files saying exactly what Tomcat is getting from the request?) As for adding an alias for localhost, wouldn't that mean that only one host was used? Ultimately, I'd like host0.com and host1.com to be different hosts for Tomcat. Applying Occam's Razor, I'm pretty sure that something is screwed on my end, but not sure how to track it down, at this point... On Tue, 17 Dec 2002 09:27:14 -0500, Turner, John wrote: It has Apache installed, but I just verified this behavior using http://some.server.com:8080 which bypasses Apache. If you need a virtual host setup in Tomcat, modify server.xml and add a Host element with a name parameter set to the FQDN that will be in the URL. Alternatively, if you want some.server.com to be treated as localhost, add an Alias tag to the localhost Host element in server.xml. Apache VirtualHost = Tomcat Host (roughly speaking) Host name=some.server.com ...some stuff here like Contexts, etc /Host The server.xml that comes with Tomcat has what you need already in it. The default server.xml file has a single virtual host (localhost) with a three Contexts (admin, manager, examples). Copy what
Re: JSP to Servlet to JSP pathing issue. RelativePathingPlease help.
I was in the same sort of situation a couple of months back. (I've seen a few other posts about how relative paths are difficult and I'm happy with my solution so I've not investigated further.) I've been reminded by your web.xml that one of the things that stopped me from doing what I wanted was the wildcard-asterisk. I don't believe it works as a portion of a name (and I don't think you need it if you've only got it there to match the parameters, which might be part of your problem) - only immediately after a / to match everything, I seem to recall. Never mind! [Must get on with the work] Mike - Original Message - From: Jason Johnston [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, December 17, 2002 4:01 PM Subject: Re: JSP to Servlet to JSP pathing issue. RelativePathingPlease help. Thanks Mike, that's probably the solution I'm going to go with. I agree that I don't want absolute URL's. Though I feel like there should be a way to do what I'm wanting to do, I'm just not finding it. I had seen another suggestion on the forums about mapping the servlet to the same path as the JSP, which sounded like it might work. However, I'm running into problems with that too. I haven't done much mapping so this is a good exercise for me, but I will probably just end with the solution you have suggested. I have the following in my web.xml file servlet servlet-namedolookup/servlet-name servlet-classtest.dolookup/servlet-class /servlet servlet-mapping servlet-namedolookup/servlet-name url-pattern/teststuff/dolookup*/url-pattern /servlet-mapping In my mind, this should make both the lookup.jsp and the dolookup servlet available from the same path, specifically http://localhost:8080/teststuff/ If that works, then I can use a simple relative path from the form to the servlet and the client path won't be changed. However, I'm not finding this in practice. A call to http://localhost:8080/teststuff/dolookup?etc is returning a not found error. I'm currently looking up all I can on the forums and tutorials on mapping, but every time I think I've figured it out - it doesn't work. But this is the fun part, I guess. Thanks for all you help. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
using ip address instead of localhost
Hi, I just setup tomcat and I'm having problems getting to the index.jsp page if I use the ip address of the machine instead of localhost. I am behind a firewall at work, but I would think that you should be able to access it within the firewall. I've also tried this at home with my DSL and everything works fine. Anything obvious I missing? Thanks fo the help in advance. Li -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
preventing all caching
I'm trying to figure out how to prevent caching of any content on a client machine. Our servlets properly use the no-cache directive, but other content is still being cached. Specifically, those pages we generate use Javascript to load a set of images from the server. The HTTP headers in the response to those GETs don't contain the no-cache directive. I would have thought that adding nocache as a directive to the default settings in web.xml would take care of this, but it seems to have no effect. Is there any way to force a nocache directive into all content returned by the server? Many thanks for any help. Hans
Running tomcat as user other than root
I'm sure this has been asked before, but I can't find the answer How can I start/stop tomcat as a user other than root? I have a webmaster that I'd like to give the ability to restart tomcat, but I don't want to give her root access to the server (RH7.3 on an intel platform). Thanks, Philip Juels IT Manager Harvard-Partners Center for Genetics and Genomics 65 Landsdowne St Cambridge, MA 02139 [EMAIL PROTECTED] 617.768.8292 -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Virtual Domains with Tomcat 4.1.12 Standalone
Thanks for the reply john. I got it. But there is one small problem yet to resolve. When I use http://something.com/{Webapp}/index.jsp, it comes back with a Basic Server Authentication window. I don't have any authentication setup in web.xml file. I am using IIS and tomcat and have defined virtualhost in server.xml file. If I access the server directly by it name, it is showing me the index page but if try with the virtualhost, I get authentication for the server. Any ideas? Hari -Original Message- From: Turner, John [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 17, 2002 11:19 AM To: 'Tomcat Users List' Subject: RE: Virtual Domains with Tomcat 4.1.12 Standalone Let's put it this way. If you had to change defaultHost for virtual hosts to work, then you could never have more than one virtual host, since there is only one defaultHost. That's obviously wrong. Tomcat has the ability to serve many virtual hosts, not just one. I have several virtual hosts running on a Sun 420R at the moment, and there's only one defaultHost (and it's set to localhost). If you are getting server not found then something.com doesn't resolve to an IP address. Can you ping something.com? If not, there's your answer. If something.com resolved to the IP address where Tomcat was running, and there was no virtual host defined, then Tomcat would revert to serving the default context from the default host. That's what defaultHost does. John -Original Message- From: Hari Venkatesan [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 17, 2002 11:10 AM To: Tomcat Users List Subject: RE: Virtual Domains with Tomcat 4.1.12 Standalone If I leave the defaultHost to localhost and have a host name=something.com, when I type in the url http://something.com/{webapp}/index.jsp, I get a server not found or DNS error. Do I need to define something.com anywhere else in win2000 Hari -Original Message- From: Turner, John [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 17, 2002 11:04 AM To: 'Tomcat Users List' Subject: RE: Virtual Domains with Tomcat 4.1.12 Standalone Changing defaultHost is not the solution. John -Original Message- From: Hari Venkatesan [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 17, 2002 10:51 AM To: Tomcat Users List Subject: RE: Virtual Domains with Tomcat 4.1.12 Standalone I really don't know if changing the defaulthost name is the solution. R u able to serve the pages with the configuration you have now without changing the defaulthost name or are you getting a DNS error. IF you want to serve pages the way you want it, then each of the host entries you have in server.xml should have context defined with its own Web.xml file. Hari -Original Message- From: J. Norment [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 17, 2002 10:36 AM To: Tomcat Users List Subject: RE: Virtual Domains with Tomcat 4.1.12 Standalone Hari: Thanks for the response. ( For that matter, thanks for everyone's response so far... ) I want the behavior to be: http://localhost - loads up the default welcome page, root/index.jsp http://host0.com - loads up host0's index page http://host1.com - loads up host1's index page Is changing the default host part of the solution? On Tue, 17 Dec 2002 10:22:20 -0500, Hari Venkatesan wrote: You have two Host name defined and only one closing tag for the host. Did you change Engine name=Standalone defaultHost=localhost debug=99 to reflect host0.com in the defaultHost Hari -Original Message- From: J. Norment [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 17, 2002 10:15 AM To: Tomcat Users List Subject: RE: Virtual Domains with Tomcat 4.1.12 Standalone This is the change that I had made to the server.xml file: !-- Define the default virtual host -- Host name=localhost debug=0 appBase=webapps unpackWARs=true autoDeploy=true !-- This part is added: -- Host name=host0.com debug=0 appBase=webapps/host0 unpackWARs=true Logger className=org.apache.catalina.logger.FileLogger directory=logs prefix=host0. suffix=.log timestamp=true/ Context path= docBase=webapps/host0 debug=0 reloadable=true/ Context path=/test docBase=webapps/host0 debug=0 reloadable=true/ /Host !-- End, added part. -- Is this is the change that you are referring to in adding the host tag? If that is not working, how would I track down what is broken? (ie, are there log files saying exactly what Tomcat is getting from the request?) As for adding an alias for localhost, wouldn't that mean that only one host was used? Ultimately, I'd like host0.com and host1.com to be different hosts for Tomcat. Applying Occam's Razor, I'm pretty sure that something is screwed on my end, but not sure how to track it down, at this point... On Tue,
RE: Running tomcat as user other than root
localhost $: su - tomcatuser localhost $: CATALINA_HOME/bin/startup.sh localhost $: exit She'll need the password to the tomcat user account. John -Original Message- From: Philip Juels [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 17, 2002 11:05 AM To: [EMAIL PROTECTED] Subject: Running tomcat as user other than root I'm sure this has been asked before, but I can't find the answer How can I start/stop tomcat as a user other than root? I have a webmaster that I'd like to give the ability to restart tomcat, but I don't want to give her root access to the server (RH7.3 on an intel platform). Thanks, Philip Juels IT Manager Harvard-Partners Center for Genetics and Genomics 65 Landsdowne St Cambridge, MA 02139 [EMAIL PROTECTED] 617.768.8292 -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Virtual Domains with Tomcat 4.1.12 Standalone
It's been a long time since I setup a Windows web server, but if I had to guess: IIS has authentication set for that resource. The anonymous web user (IUSR_SOMEMACHINENAME) account has no access to the directories where the content exists. John -Original Message- From: Hari Venkatesan [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 17, 2002 11:32 AM To: Tomcat Users List Subject: RE: Virtual Domains with Tomcat 4.1.12 Standalone Thanks for the reply john. I got it. But there is one small problem yet to resolve. When I use http://something.com/{Webapp}/index.jsp, it comes back with a Basic Server Authentication window. I don't have any authentication setup in web.xml file. I am using IIS and tomcat and have defined virtualhost in server.xml file. If I access the server directly by it name, it is showing me the index page but if try with the virtualhost, I get authentication for the server. Any ideas? Hari -Original Message- From: Turner, John [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 17, 2002 11:19 AM To: 'Tomcat Users List' Subject: RE: Virtual Domains with Tomcat 4.1.12 Standalone Let's put it this way. If you had to change defaultHost for virtual hosts to work, then you could never have more than one virtual host, since there is only one defaultHost. That's obviously wrong. Tomcat has the ability to serve many virtual hosts, not just one. I have several virtual hosts running on a Sun 420R at the moment, and there's only one defaultHost (and it's set to localhost). If you are getting server not found then something.com doesn't resolve to an IP address. Can you ping something.com? If not, there's your answer. If something.com resolved to the IP address where Tomcat was running, and there was no virtual host defined, then Tomcat would revert to serving the default context from the default host. That's what defaultHost does. John -Original Message- From: Hari Venkatesan [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 17, 2002 11:10 AM To: Tomcat Users List Subject: RE: Virtual Domains with Tomcat 4.1.12 Standalone If I leave the defaultHost to localhost and have a host name=something.com, when I type in the url http://something.com/{webapp}/index.jsp, I get a server not found or DNS error. Do I need to define something.com anywhere else in win2000 Hari -Original Message- From: Turner, John [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 17, 2002 11:04 AM To: 'Tomcat Users List' Subject: RE: Virtual Domains with Tomcat 4.1.12 Standalone Changing defaultHost is not the solution. John -Original Message- From: Hari Venkatesan [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 17, 2002 10:51 AM To: Tomcat Users List Subject: RE: Virtual Domains with Tomcat 4.1.12 Standalone I really don't know if changing the defaulthost name is the solution. R u able to serve the pages with the configuration you have now without changing the defaulthost name or are you getting a DNS error. IF you want to serve pages the way you want it, then each of the host entries you have in server.xml should have context defined with its own Web.xml file. Hari -Original Message- From: J. Norment [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 17, 2002 10:36 AM To: Tomcat Users List Subject: RE: Virtual Domains with Tomcat 4.1.12 Standalone Hari: Thanks for the response. ( For that matter, thanks for everyone's response so far... ) I want the behavior to be: http://localhost - loads up the default welcome page, root/index.jsp http://host0.com - loads up host0's index page http://host1.com - loads up host1's index page Is changing the default host part of the solution? On Tue, 17 Dec 2002 10:22:20 -0500, Hari Venkatesan wrote: You have two Host name defined and only one closing tag for the host. Did you change Engine name=Standalone defaultHost=localhost debug=99 to reflect host0.com in the defaultHost Hari -Original Message- From: J. Norment [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 17, 2002 10:15 AM To: Tomcat Users List Subject: RE: Virtual Domains with Tomcat 4.1.12 Standalone This is the change that I had made to the server.xml file: !-- Define the default virtual host -- Host name=localhost debug=0 appBase=webapps unpackWARs=true autoDeploy=true !-- This part is added: -- Host name=host0.com debug=0 appBase=webapps/host0 unpackWARs=true Logger className=org.apache.catalina.logger.FileLogger directory=logs prefix=host0. suffix=.log timestamp=true/ Context path= docBase=webapps/host0 debug=0 reloadable=true/ Context path=/test docBase=webapps/host0 debug=0
RE: Running tomcat as user other than root
Oops...that should be $CATALINA_HOME/bin/startup.sh. John -Original Message- From: Turner, John [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 17, 2002 11:34 AM To: 'Tomcat Users List' Subject: RE: Running tomcat as user other than root localhost $: su - tomcatuser localhost $: CATALINA_HOME/bin/startup.sh localhost $: exit She'll need the password to the tomcat user account. John -Original Message- From: Philip Juels [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 17, 2002 11:05 AM To: [EMAIL PROTECTED] Subject: Running tomcat as user other than root I'm sure this has been asked before, but I can't find the answer How can I start/stop tomcat as a user other than root? I have a webmaster that I'd like to give the ability to restart tomcat, but I don't want to give her root access to the server (RH7.3 on an intel platform). Thanks, Philip Juels IT Manager Harvard-Partners Center for Genetics and Genomics 65 Landsdowne St Cambridge, MA 02139 [EMAIL PROTECTED] 617.768.8292 -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Running tomcat as user other than root
If she starts it, she can stop it and restart it. Unless you have modified TC to use ports below 1000, which only worsk for root. On Tuesday 17 December 2002 10:04, Philip Juels wrote: I'm sure this has been asked before, but I can't find the answer How can I start/stop tomcat as a user other than root? I have a webmaster that I'd like to give the ability to restart tomcat, but I don't want to give her root access to the server (RH7.3 on an intel platform). Thanks, Philip Juels IT Manager Harvard-Partners Center for Genetics and Genomics 65 Landsdowne St Cambridge, MA 02139 [EMAIL PROTECTED] 617.768.8292 -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: using ip address instead of localhost
If you are trying to access the IP from within your firewall, try using an internal network IP address, instead of an external IP. It is often the case that trying to make a request for your external IP from an Internal machine wont work... (the theory being that you should not need to do this because you should have an internal IP address for the machine you are trying to use).. Hope that helps. Mehdi Nejad - Senior Developer [EMAIL PROTECTED] ~~ Kao Li-LIKAO1 LIKAO1@motorola.To: 'Tomcat Users List' [EMAIL PROTECTED] com cc: Subject: using ip address instead of localhost 17/12/2002 16:28 Please respond to Tomcat Users List Hi, I just setup tomcat and I'm having problems getting to the index.jsp page if I use the ip address of the machine instead of localhost. I am behind a firewall at work, but I would think that you should be able to access it within the firewall. I've also tried this at home with my DSL and everything works fine. Anything obvious I missing? Thanks fo the help in advance. Li -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
JDBC security?
To all, I had a servlet communicating via JDBC to an Interbase database on Tomcat 3.? and Apache 1.3.27, I can't remember tomcat version version. Now that I have Apache 2.04 and Tomcat 4.1.17 up and running the same servlet will not connect, the log file indicated it won't/can't load the database driver. Has there been some security updates to Tomcat that prohibit loading a databse driver unless specified ? Here's the localhost_log.2002-12-17.txt file error message, Error Loading interbase.interclient.Driver ...and here's the servlet code.. import interbase.interclient.Driver; import java.io.*; import java.util.*; import java.sql.*; import java.text.*; import java.lang.*; import java.net.*; import javax.servlet.*; import javax.servlet.http.*; public class DBServlet extends HttpServlet { protected String dbURL = jdbc:interbase://127.0.0.1//opt/tomcat/webapps/bd/database/main.gdb; I tried this also // protected String dbURL = jdbc:interbase://localhost//opt/tomcat/webapps/bd/database/main.gdb; public void init(ServletConfig config) throws ServletException { super.init(config); try { Properties prop = new Properties(); prop.put (user, SYSDBA); prop.put (password, masterkey); THIS is the line that bombs! Class.forName(interbase.interclient.Driver); Thanks, -Peter __ The NEW Netscape 7.0 browser is now available. Upgrade now! http://channels.netscape.com/ns/browsers/download.jsp Get your own FREE, personal Netscape Mail account today at http://webmail.netscape.com/ -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Apache can't load mod_jk
I used the instructions at: http://www.johnturner.com/howto/apache1-tomcat404-howto.html http://www.johnturner.com/howto/apache1-tomcat404-howto.html to configure Apache 1.3.26 and Tomcat 4.1.12. I used the bindist for both on AIX 4.3.3. I get when I run the apachectl configtest /appl/optisys/apache/bin apachectl configtest Syntax error on line 4 of /appl/optisys/jakarta-tomcat-4.1.12/conf/auto/mod_jk.c onf: Cannot load /appl/optisys/apache/libexec/mod_jk.so into server: No such file or Directory The file is there, with read and execute. What else can I check? Dale K. Hamilton -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
test message
test on tomcat Kevin Aubuchon Contractor One SBC Center 314-331-9848 -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Apache-Tomcat HOWTO
-Original Message- From: Rasputin [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 17, 2002 5:41 AM To: Tomcat Users List Subject: Re: Apache-Tomcat HOWTO * Turner, John [EMAIL PROTECTED] [1201 14:01]: Not sure what JK2 needs to work, I don't use it. You should be able to build it from the same source package as JK. I was able to do so on my Red Hat test box, but it took quite a bit of hacking around. But you need a local install of Java; is that right? Not sure. I've used --with-java=${JAVA_HOME} when building the connectors, and have also built them without it. Ok, thanks. I setup a Coyote/JK2 Connector on the tomcat side and used mod_jk to forward AJP13 requests to it. That seems to work pretty well, although am I right in thinking a JkMount command can only forward URIs 'as-is'? i.e if I set JkMount /neotokyo/* lb then the request is going to be sent as a request to /neotokyo/whatever.jsp - that is, as a request for whatever.jsp in the context neotokyo to the default Host element in my engine? I might have missed something, but don't see how else it could work. The workers aren't URL aware, they just shovel requests into sockets. Not the defaultHost, but whatever Apache VirtualHost has the JkMount. If no VirtualHost, than the value of Apache's global ServerName. Tomcat will try and match that value with a corresponding Host element and go from there. Doesn't this mean that if you mapped *.jsp, you'd need either a ROOT context with directories mirroring Apaches tree, or a Context for each top-level directory on the Apache side? I don't think so. At least, that's not how I have it setup. I would just map an Apache DocumentRoot to the same place as the Context and call it good. Then Apache can find http://some.server.com/images/some-static.gif and Tomcat can find http://some.server.com/jsp/my.jsp. Obviously, you'd want to setup Apache restrictions (deny, allow, etc) for WEB-INF/*, etc. And is the Host part of the protocol, so you can dedicate virtual hosts to AJP clients? I got around this by having a Tomcat virtual host with the DNS name of the Apache webserver, and setting it as the Engines default host - since no HTTP requests should come into tomcat asking for that host, it solves the problem but is pretty clanky. As far as I know, there's no need to set defaultHost at all...if you needed to do this, you could never have more than one virtual host, which is not the case. On one of my servers, I have defaultHost set to localhost and several Host elements, each with a different value for the name parameter. Those different name values match the ServerName value in the Apache VirtualHost containers. -- Rasputin :: Jack of All Trades - Master of Nuns John -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: using ip address instead of localhost
Actually, I am using an internal network IP address. I am actually trying to access the page on the same machine as the server. The localhost works fine and hostname of the machine also works, but not the ip address. Do you think DNS has anything to do with it? Li -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 17, 2002 10:44 AM To: Tomcat Users List Subject: Re: using ip address instead of localhost If you are trying to access the IP from within your firewall, try using an internal network IP address, instead of an external IP. It is often the case that trying to make a request for your external IP from an Internal machine wont work... (the theory being that you should not need to do this because you should have an internal IP address for the machine you are trying to use).. Hope that helps. Mehdi Nejad - Senior Developer [EMAIL PROTECTED] ~~ Kao Li-LIKAO1 LIKAO1@motorola.To: 'Tomcat Users List' [EMAIL PROTECTED] com cc: Subject: using ip address instead of localhost 17/12/2002 16:28 Please respond to Tomcat Users List Hi, I just setup tomcat and I'm having problems getting to the index.jsp page if I use the ip address of the machine instead of localhost. I am behind a firewall at work, but I would think that you should be able to access it within the firewall. I've also tried this at home with my DSL and everything works fine. Anything obvious I missing? Thanks fo the help in advance. Li -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: JDBC security?
Hi Peter, We need more details on the log in order to help. I will take a wild guess here that the servlet can't find the driver and which may due to the driver lib is located in the wrong place. Hope this helps. Regards, Michael -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 17, 2002 8:55 AM To: [EMAIL PROTECTED] Subject: JDBC security? To all, I had a servlet communicating via JDBC to an Interbase database on Tomcat 3.? and Apache 1.3.27, I can't remember tomcat version version. Now that I have Apache 2.04 and Tomcat 4.1.17 up and running the same servlet will not connect, the log file indicated it won't/can't load the database driver. Has there been some security updates to Tomcat that prohibit loading a databse driver unless specified ? Here's the localhost_log.2002-12-17.txt file error message, Error Loading interbase.interclient.Driver ...and here's the servlet code.. import interbase.interclient.Driver; import java.io.*; import java.util.*; import java.sql.*; import java.text.*; import java.lang.*; import java.net.*; import javax.servlet.*; import javax.servlet.http.*; public class DBServlet extends HttpServlet { protected String dbURL = jdbc:interbase://127.0.0.1//opt/tomcat/webapps/bd/database/main.gdb; I tried this also // protected String dbURL = jdbc:interbase://localhost//opt/tomcat/webapps/bd/database/main.gdb; public void init(ServletConfig config) throws ServletException { super.init(config); try { Properties prop = new Properties(); prop.put (user, SYSDBA); prop.put (password, masterkey); THIS is the line that bombs! Class.forName(interbase.interclient.Driver); Thanks, -Peter __ The NEW Netscape 7.0 browser is now available. Upgrade now! http://channels.netscape.com/ns/browsers/download.jsp Get your own FREE, personal Netscape Mail account today at http://webmail.netscape.com/ -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Cannot compile Tomcat 4.1.12 from source
Hi, I am having trouble compiling Tomcat 4.1.12 from source, I am using Suns jsdk 1.4.1. build-main: [echo] - Java-utils - [echo] -- puretls.present = ${puretls.present} [echo] -- jsse.present = true [echo] -- commons-logging = true [echo] -- jmx = ${jmx.present} /usr/local/src/tomcat/mx4j-1.1/lib/mx4j-jmx.jar build-catalina: [javac] Compiling 122 source files to /usr/local/src/tomcat/jakarta-tomcat-4.1.12-src/catalina/build/server/classes [javac] This version of java does not support the classic compiler; upgrading to modern [javac] /usr/local/src/tomcat/jakarta-tomcat-4.1.12-src/catalina/src/share/org/apache/catalina/session/StandardSessionFacade.java:97: org.apache.catalina.session.StandardSessionFacade should be declared abstract; it does not define logout() in org.apache.catalina.session.StandardSessionFacade [javac] public class StandardSessionFacade [javac]^ [javac] /usr/local/src/tomcat/jakarta-tomcat-4.1.12-src/catalina/src/share/org/apache/catalina/session/StandardSession.java:121: org.apache.catalina.session.StandardSession should be declared abstract; it does not define logout() in org.apache.catalina.session.StandardSession [javac] class StandardSession [javac] ^ [javac] /usr/local/src/tomcat/jakarta-tomcat-4.1.12-src/catalina/src/share/org/apache/catalina/connector/HttpResponseBase.java:111: org.apache.catalina.connector.HttpResponseBase should be declared abstract; it does not define setCharacterEncoding(java.lang.String) in org.apache.catalina.connector.ResponseBase [javac] public class HttpResponseBase [javac]^ [javac] /usr/local/src/tomcat/jakarta-tomcat-4.1.12-src/catalina/src/share/org/apache/catalina/connector/ResponseFacade.java:86: org.apache.catalina.connector.ResponseFacade should be declared abstract; it does not define setCharacterEncoding(java.lang.String) in org.apache.catalina.connector.ResponseFacade [javac] public class ResponseFacade implements ServletResponse { [javac]^ [javac] Note: Some input files use or override a deprecated API. [javac] Note: Recompile with -deprecation for details. [javac] 4 errors Everything has been smooth sailing. Any ideas? Thanks, Paul -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Cannot compile Tomcat 4.1.12 from source
[javac] public class ResponseFacade implements ServletResponse { [javac]^ [javac] Note: Some input files use or override a deprecated API. [javac] Note: Recompile with -deprecation for details. [javac] 4 errors What happens when you do that? John -Original Message- From: Paul Downs [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 17, 2002 12:16 PM To: 'Tomcat Users List' Subject: Cannot compile Tomcat 4.1.12 from source Hi, I am having trouble compiling Tomcat 4.1.12 from source, I am using Suns jsdk 1.4.1. build-main: [echo] - Java-utils - [echo] -- puretls.present = ${puretls.present} [echo] -- jsse.present = true [echo] -- commons-logging = true [echo] -- jmx = ${jmx.present} /usr/local/src/tomcat/mx4j-1.1/lib/mx4j-jmx.jar build-catalina: [javac] Compiling 122 source files to /usr/local/src/tomcat/jakarta-tomcat-4.1.12-src/catalina/build /server/classes [javac] This version of java does not support the classic compiler; upgrading to modern [javac] /usr/local/src/tomcat/jakarta-tomcat-4.1.12-src/catalina/src/s hare/org/apache/catalina/session/StandardSessionFacade.java:97: org.apache.catalina.session.StandardSessionFacade should be declared abstract; it does not define logout() in org.apache.catalina.session.StandardSessionFacade [javac] public class StandardSessionFacade [javac]^ [javac] /usr/local/src/tomcat/jakarta-tomcat-4.1.12-src/catalina/src/s hare/org/apache/catalina/session/StandardSession.java:121: org.apache.catalina.session.StandardSession should be declared abstract; it does not define logout() in org.apache.catalina.session.StandardSession [javac] class StandardSession [javac] ^ [javac] /usr/local/src/tomcat/jakarta-tomcat-4.1.12-src/catalina/src/s hare/org/apache/catalina/connector/HttpResponseBase.java:111: org.apache.catalina.connector.HttpResponseBase should be declared abstract; it does not define setCharacterEncoding(java.lang.String) in org.apache.catalina.connector.ResponseBase [javac] public class HttpResponseBase [javac]^ [javac] /usr/local/src/tomcat/jakarta-tomcat-4.1.12-src/catalina/src/s hare/org/apache/catalina/connector/ResponseFacade.java:86: org.apache.catalina.connector.ResponseFacade should be declared abstract; it does not define setCharacterEncoding(java.lang.String) in org.apache.catalina.connector.ResponseFacade [javac] public class ResponseFacade implements ServletResponse { [javac]^ [javac] Note: Some input files use or override a deprecated API. [javac] Note: Recompile with -deprecation for details. [javac] 4 errors Everything has been smooth sailing. Any ideas? Thanks, Paul -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: can't get w2k tomcat service running again
Becky, We use the Java Wrapper Service at: http://wrapper.sourceforge.net/doc/english/index.html In addition to working cross platform (Windows NT and Unix), you can test the service from the command line before and after installing it. They supply sample configurations for Tomcat. Gary http://www.cafesoft.com * * * * The Cafesoft Access Management System, Cams, is security* * software that provides single sign-on authentication and* * centralized access control for Apache, Tomcat, and custom * * resources. * * * * -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Worker balancing on the same node
Does it make sense to define load balancing of two Tomcat workers on the same computer working together with an IIS port? My goal would be to avoid hangs and gain perfromance. Thanks --- Este mensaje y los documentos, que en su caso, lleve anexos, pueden contener informacion confidencial y atañe exclusivamente a las personas a las que va dirigido. Cualquier opinion en el contenida, es exclusiva de su autor y no representa necesariamente la opinion de AZERTIA. Si usted no es el destinatario de este mensaje, considerese advertido de que lo ha recibido por error y que cualquier uso, difusion o copia estan prohibidos legalmente. Si ha recibido este mensaje por error, le rogamos que nos lo comunique por la misma via o al telefono 93 207 55 11 y proceda a destruirlo inmediatamente. This email is confidential and intended solely for the use of the individual to whom it is addressed. Any views or opinions presented are solely those of the author and do not necessarily represent those of AZERTIA. If you are not the intended recipient, be advised that you have received this email in error and that any use, dissemination, forwarding, printing, or copying of this email is strictly prohibited. If you have received this email in error please notify it to AZERTIA by telephone on number +34 93 207 55 11. --- -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Cannot compile Tomcat 4.1.12 from source
* Turner, John ([EMAIL PROTECTED]) wrote : [javac] public class ResponseFacade implements ServletResponse { [javac]^ [javac] Note: Some input files use or override a deprecated API. [javac] Note: Recompile with -deprecation for details. [javac] 4 errors What happens when you do that? Hi, Erm lots of errors: [javac] Compiling 122 source files to /usr/local/src/tomcat/jakarta-tomcat-4.1.12-src/catalina/build/server/classes [javac] This version of java does not support the classic compiler; upgrading to modern [javac] /usr/local/src/tomcat/jakarta-tomcat-4.1.12-src/catalina/src/share/org/apache/catalina/session/StandardSessionFacade.java:85: warning: javax.servlet.http.HttpSessionContext in javax.servlet.http has been deprecated [javac] import javax.servlet.http.HttpSessionContext; [javac] ^ [javac] /usr/local/src/tomcat/jakarta-tomcat-4.1.12-src/catalina/src/share/org/apache/catalina/session/StandardSession.java:88: warning: javax.servlet.http.HttpSessionContext in javax.servlet.http has been deprecated [javac] import javax.servlet.http.HttpSessionContext; and [javac] /usr/local/src/tomcat/jakarta-tomcat-4.1.12-src/catalina/src/share/org/apache/catalina/session/StandardSessionFacade.java:185: warning: getValueNames() in javax.servlet.http.HttpSession has been deprecated [javac] public String[] getValueNames() { [javac] ^ [javac] /usr/local/src/tomcat/jakarta-tomcat-4.1.12-src/catalina/src/share/org/apache/catalina/session/StandardSessionFacade.java:175: warning: getValue(java.lang.String) in javax.servlet.http.HttpSession has been deprecated [javac] public Object getValue(String name) { and [javac] /usr/local/src/tomcat/jakarta-tomcat-4.1.12-src/catalina/src/share/org/apache/catalina/startup/CopyParentClassLoaderRule.java:96: warning: Rule(org.apache.commons.digester.Digester) in org.apache.commons.digester.Rule has been deprecated [javac] super(digester); [javac] ^ [javac] /usr/local/src/tomcat/jakarta-tomcat-4.1.12-src/catalina/src/share/org/apache/catalina/startup/CopyParentClassLoaderRule.java:113: warning: getDebug() in org.apache.commons.digester.Digester has been deprecated [javac] if (digester.getDebug() = 1) and [javac] /usr/local/src/tomcat/jakarta-tomcat-4.1.12-src/catalina/src/share/org/apache/catalina/servlets/CGIServlet.java:763: warning: encode(java.lang.String) in java.net.URLEncoder has been deprecated [javac] param, URLEncoder.encode(req.getParameter(param))); [javac] ^ [javac] /usr/local/src/tomcat/jakarta-tomcat-4.1.12-src/catalina/src/share/org/apache/catalina/servlets/CGIServlet.java:1562: warning: encode(java.lang.String) in java.net.URLEncoder has been deprecated [javac] v = java.net.URLEncoder.encode(v); [javac]^ [javac] 4 errors [javac] 82 warnings BUILD FAILED file:/usr/local/src/tomcat/jakarta-tomcat-4.1.12-src/catalina/build.xml:802: Compile failed; see the compiler error output for details. Total time: 15 seconds Too many to really post. The four errors seem to be: [javac] /usr/local/src/tomcat/jakarta-tomcat-4.1.12-src/catalina/src/share/org/apache/catalina/session/StandardSessionFacade.java:97: org.apache.catalina.session.StandardSessionFacade should be declared abstract; it does not define logout() in org.apache.catalina.session.StandardSessionFacade [javac] public class StandardSessionFacade [javac] /usr/local/src/tomcat/jakarta-tomcat-4.1.12-src/catalina/src/share/org/apache/catalina/session/StandardSession.java:121: org.apache.catalina.session.StandardSession should be declared abstract; it does not define logout() in org.apache.catalina.session.StandardSession [javac] class StandardSession [javac] /usr/local/src/tomcat/jakarta-tomcat-4.1.12-src/catalina/src/share/org/apache/catalina/connector/HttpResponseBase.java:111: org.apache.catalina.connector.HttpResponseBase should be declared abstract; it does not define setCharacterEncoding(java.lang.String) in org.apache.catalina.connector.ResponseBase [javac] public class HttpResponseBase [javac] /usr/local/src/tomcat/jakarta-tomcat-4.1.12-src/catalina/src/share/org/apache/catalina/connector/ResponseFacade.java:86: org.apache.catalina.connector.ResponseFacade should be declared abstract; it does not define setCharacterEncoding(java.lang.String) in org.apache.catalina.connector.ResponseFacade [javac] public class ResponseFacade implements ServletResponse { Excuse the large cut and paste, thanks for the quick reply. Paul -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
SSL, IIS, and Tomcat 4.1.12
I have spent the last several hours hacking around in the archives and have seen the same question asked several times, but no clear answer given. I have also spent about ten hours with various configuration tweaks. I am trying to get Tomcat to act as an application server behind IIS. With http connections, this has been working without difficulty. I want to modify it to work with SSL. I can get Tomcat to server SSL w/o difficulty, I can get IIS to serve SSL without a problem. However, when I try to use https://myserver/mywebapp, the browser hangs indefinitely. Sometimes it returns after several minutes with a page with all links of the form http://myserver:443/*. Viewing the logfiles, it appears that when an https:// request is initiated, the web app is running without problems and the redirector is running without problems. So why is the browser hanging, and what can I do to fix the configuration? Mike McLawhorn _ The new MSN 8: advanced junk mail protection and 2 months FREE* http://join.msn.com/?page=features/junkmail -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: using ip address instead of localhost
I've not come across that then, I take it http://12.0.0.1 works fine ? I would sugest that dns isn't to blame, your not trying to resolve a name, its running on localhost. you probably already did this, but type ipconfig on the command line and make sure that you have the correct ip, the request from your browser shouldn't leave your server at all.. good luck. mehdi Kao Li-LIKAO1 LIKAO1@motorola.To: 'Tomcat Users List' [EMAIL PROTECTED] com cc: Subject: RE: using ip address instead of localhost 17/12/2002 17:09 Please respond to Tomcat Users List Actually, I am using an internal network IP address. I am actually trying to access the page on the same machine as the server. The localhost works fine and hostname of the machine also works, but not the ip address. Do you think DNS has anything to do with it? Li -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 17, 2002 10:44 AM To: Tomcat Users List Subject: Re: using ip address instead of localhost If you are trying to access the IP from within your firewall, try using an internal network IP address, instead of an external IP. It is often the case that trying to make a request for your external IP from an Internal machine wont work... (the theory being that you should not need to do this because you should have an internal IP address for the machine you are trying to use).. Hope that helps. Mehdi Nejad - Senior Developer [EMAIL PROTECTED] ~~ Kao Li-LIKAO1 LIKAO1@motorola.To: 'Tomcat Users List' [EMAIL PROTECTED] com cc: Subject: using ip address instead of localhost 17/12/2002 16:28 Please respond to Tomcat Users List Hi, I just setup tomcat and I'm having problems getting to the index.jsp page if I use the ip address of the machine instead of localhost. I am behind a firewall at work, but I would think that you should be able to access it within the firewall. I've also tried this at home with my DSL and everything works fine. Anything obvious I missing? Thanks fo the help in advance. Li -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]