Re: package not found for docBase outside tomcat/webapp
The problem seems to g away in Tomcat 4.1.12. Sorry for the post. - Original Message - From: Affan Qureshi [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Thursday, October 31, 2002 12:12 PM Subject: Re: package not found for docBase outside tomcat/webapp I think this has been reported at Bugzilla with id:12387 And it says that it is fixed. Should I download latest Tomcat version? Can someone tell me how to fix this? - Original Message - From: Affan Qureshi [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, October 31, 2002 11:46 AM Subject: package not found for docBase outside tomcat/webapp I am using Tomcat 4.1 on Win2k. If I place my web application outside ${Tomcat_Home}\webapps the package for my classes (placed in WEB-INF\classes) is not recognized. Even the jar file's package in the lib dir of my web application is not recognized. If I copy the same dir into the webapps directory the problem is solved. Has anyone else also experienced this problem? Thanks. -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org
RE: need help connecting Tomcat 4.1.12, Apache 2.0.43 using jk2 ( mod_jk2-2.0.43.dll)
When you install the mod_jk2 module to the module directory of Apache don't forget to rename the module to mod_jk2.dll or change the LoadModule line in httpd.conf to match the name of the module to do copy there. The developers started version naming the dll files to avoid confusion. My docs haven't caught up yet. rls P.S. The class path lines in the workers2.properties examples that are in my docs, didn't work with TC 4.1.14 for some reason. I reverted them to the old format and everything is fine. If you get an old copy of my docs early than 30 Oct@23:30 PST then just get them again. rls Turner, John [EMAIL PROTECTED] 10/30/2002 06:03 AM Please respond to Tomcat Users List To: 'Tomcat Users List' [EMAIL PROTECTED] cc: Subject:RE: need help connecting Tomcat 4.1.12, Apache 2.0.43 using jk2 ( mod_jk2-2.0.43.dll) This should be all you need, courtesy of Robert Sowders: ftp://pokey.wr.usgs.gov/pub/rsowders/Apache2_Jk2_TC4.1.x_JSDK1.4.x.zip John -Original Message- From: dave m [mailto:learning_tomcat;hotmail.com] Sent: Wednesday, October 30, 2002 9:00 AM To: [EMAIL PROTECTED] Subject: need help connecting Tomcat 4.1.12, Apache 2.0.43 using jk2 (mod_jk2-2.0.43.dll) I've tried to find info under this mailing list's archives and I've looked under the jk2 HOW-TOs and under Tomcat's documentation, but I'm still in the dark about this. I am 'EXTREMELY' new (ultra-newbie?) to Apache and to Tomcat. I can find no step-by-step tutorial on how to set the two products up under Windows 2000 (specifically the newer versions like Apache 2.0.43 and Tomcat 4.1.12). Would someone be willing to help me? (I'll be happy to write up my 'process' for the next person who asks this once I am successful). To give you a hint of where I'm at in the installation, I've installed both Apache and Tomcat on my Windows 2000 machine (I changed the working directory from C:\Program files\Apache Group to just C:\Apache as someone had mentioned space names give Tomcat problems. I have also downloaded the appropriate .dll file (mod_jk2-2.0.43) which matches my version of Apache. Where do I go from here?. Thanks Learning_Tomcat _ Surf the Web without missing calls! Get MSN Broadband. http://resourcecenter.msn.com/access/plans/freeactivation.asp -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org
RE: Compatibility between Windows and Linux tomcat ( mod_jk ajp13 )
Can anybody please help The situation: I a running Apache 1.3.20-16 (rpm version number) with tomcat-mod 3.2.1-1 (rpm version number) on a Red Hat 7.1. Also running Jakarta Tomcat 3.3.1 with the mod_jk.dll on a win2k (bad,I know). I am trying to make a connection from the Apache to the Tomcat through mod_jk with the ajp13 protocol. Problem: When I connect to the Apache on Redhat 7.1 with say http://192.168.1.1/test it is supposed to call this page from the Tomcat on the win2k machine but it just keeps on loading into infinity and never shows nothing. The config of Tomcat and Apache is not that important. I'll explain why. I have set up a second Apache on a seperate win2k box with the same config settings as the Red Hat one but when i connect to the win2k box with say http://192.168.1.2/test it connect just fine. Anybody have any clue why this might be happening between Linux -- w2k and not with w2k -- w2k? Any help please. (desperate). I have spent about 48hours in total on it. I have Google'd read manuals but still nothing. Bertus Keyser -Original Message- From: Bertus Keyser [mailto:bertus.keyser;impress.co.za] Sent: 29 October 2002 06:18 To: [EMAIL PROTECTED] Subject: Compatibility between Windows and Linux tomcat Hallo I would like to know if there are any compatibility issues between running Linux Apache with mod_jk and running Tomcat on Windows with the ajp13 protocol. Bertus Keyser IMPRESS SOFTWARE (SA) Peter Place Park Bryanston, Johannesburg Phone +27 11 706-0339 Fax +27 11 706-8753 Mobile +27 83 459-5624 -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org
RE: Search engines and MVC--to clarify
It depends on the search engine that you use. The search engine has two parts: - indexer There are two general solutions for the indexer - web crawler This kind of indexer is completely independent of the internal architecture. It's just following the links in the pages. If it's a good indexer like htdig, it is not ignoring the query string. Otherwise you have to build your site in a way that it doesn't use query strings. (But that that has nothing to do with MVC, that's true for any dynamic site) - internal This kind of indexer is typically built in your own code and is used primarily to build searches for specific contents in the site. (E.G.: Product search) This kind of indexing has to fit your architecture. - query engine There are for typical solutions for this - standalone In this case the search engine contains a component that presents the result to the user. - integrated In this case you get an API that you can use in your own code to present the result to the user. - integrated+standalone Here you use the standalone solution to get the results internally and use your own code to present the result to the user. - internal This is the counterpart for the internal indexer. Ralph Einfeldt Uptime Internet Solution Center GmbH Hamburg, Germany Hosting, Content Management, Java Consulting http://www.uptime-isc.de -Original Message- From: Michele Emmi [mailto:micheleemmi;hotmail.com] Sent: Thursday, October 31, 2002 12:13 AM To: [EMAIL PROTECTED] Subject: Re: Search engines and MVC--to clarify To clarify...I have 2 websites built on the mvc architecture, I would like to have them indexed...does anyone have any experience in this... -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org
Using JNDI URLs for embedded XML DTDs, to avoid hard-coding
Hello all, Any ideas as to how I can make an XML DTD/Schema available via a JNDI URL within Tomcat? I have a web application to deploy. For simplicity, and to simplify upgrades without worrying about new/modified/deleted files between versions, I deploy it as a WAR file. The application can import external XML documents, which must conform to a specific DTD. The DTD URL cannot be a file: URL, because it'll be deployed in several places, on various platforms. It cannot be a http: URL pointing to a reference server, as the application won't always be able to connect to the Internet (and because it's relatively slow); furthermore, it cannot be a URL referring back to the server where the webapp is deployed, because some references to XML files are required during the contextInitialized event (for configuration)... webapp content, i.e.: servlets, etc., aren't available until the event listener has finished running. One idea I had was to declare the URL for the DTD as a JNDI URL for a ServletContext ResourcePath; with Tomcat, this is implemented as a JNDI URL, but I'm not sure if this is something that I can count on in all servlet engines (the JNDI URL might differ, and the URL is not required to JNDI at all if I understand well the Servlet API specs.). However, the above idea did make me wonder if I could use JNDI explicitly within server config/deployment descriptor to expose DTDs. I had thought of adding a reference to the DTD using a resource path URL into the JNDI context at startup, before attempting to open any XML documents with a corresponding JNDI URL, but I'm not sure about the feasibility of this. Or am I better to implement my own simple JNDI service provider, in *addition* to any service providers (such as Tomcat's...), to resolve certain names, and retrieve corresponding documents? It seems a bit daunting, as I'm still a bit inexperienced with JNDI... In any case, even if I could add a reference to the DTD using a JNDI URL, I'm not sure what would happend when the XML parser attempts to open the input stream on a connection to such a URL. All I can see are references to some very basic types, such as java.lang.String and object factories, for configuring JNDI resources: I'm not sure if I could specify an InputStream, a URL, or whatever here... :-( Hopefully someone will find this an interesting subject to pick up on! Thanks, Chris B. -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org
JSP blank lines !?
Hi all, When JSP pages are sent to the web client, they include several blank lines at the begining of the file. They are generated during the compilation ofthe JSP, why? What can I do to delete this lines? Phil
RE: JDBC / ThreadLocal pattern.
I don't like this approach for connections in a web server. If the connection is available for more than one request depends on the way the container handles threads. If each request is a new Thread you will win nothing. Instead you will loose performace as each request would create a new connection to the database. Even if the threads are recycled (If the servlet engine supports a ThreadPool and is configured to use it), you don't have control about which request gets which thread, so I don't see how you will use this to lazy load resultsets. In this case you also have no control when the threads are killed. (It's up to the servlet engine) If you don't need database access in every request (which is quite typical if you use tomcat standlone) the situation even gets worse. In the long term every thread in the pool will have a connection (Each time a request with database access that is assigned to a thread that has no connection a connection has to be created for that thread.) Many drivers have problems with connections that are not explicitly closed so you would have to make shure that close() is called whenever a thread is killed. It's also not a good idea to rely on the garbage collector to close connections as you don't have control when the gc is run. It's very likely that you keep much more connections open than you actually need, you might even run out of connections if you hit the database limit. With a connection pool you have a much better control about the amount of open connections. Ralph Einfeldt Uptime Internet Solution Center GmbH Hamburg, Germany Hosting, Content Management, Java Consulting http://www.uptime-isc.de -Original Message- From: Reynir Hübner [mailto:reynir;hugsmidjan.is] Sent: Wednesday, October 30, 2002 8:06 PM To: Tomcat Users List Subject: JDBC / ThreadLocal pattern. In (very) short: the idea here is to have one jdbc-connection for each thread, instead of a pool with connections. 1. I will never have to worrie about not returning connections anymore, as they will always be garbage collected as soon as the thread is dead. 2. The connection will be available for more than one request so I can lazy load resultsets. 3. This might make transaction-service implementation easyer 4. many other great things -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org
RE: keeping user logged in using j_security_check
That feature is caused by the livetime of the session cookie. That cookie is just valid for the current browser session. If you close the browser the cookies is deleted. If you disable cookies you can reenter a session, if you use an url that contains a valid session id. -Original Message- From: Guru Mandavia [mailto:gmandavia;smartbrief.com] Sent: Wednesday, October 30, 2002 11:03 PM To: [EMAIL PROTECTED] Subject: keeping user logged in using j_security_check Every time a user closes the browser window, he is forced to re-login even though he logged in just a couple of minutes ago. Is there a way to configure j_security_check to use an existing session after the browser window is closed? -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org
Re: need help connecting Tomcat 4.1.12, Apache 2.0.43 using jk2 ( mod_jk2-2.0.43.dll)
Sorry for the confusion guys, The classpath statements of the [vm] section provided in the example worker2.properties that I included in the How To I wrote do not work. I was copying from CVS sources I maintain before I tested. I've since tried to install TC 4.1.14 with them and I got these errors too. I corrected the docs to use the old method of setting the classpaths and it works again. You should delete both classpath lines in the worker2.properties file and replace with the following: OPT=-Djava.class.path=c:/Tomcat/bin/tomcat-jni.jar;c:/Tomcat/server/lib/commons-logging.jar The document has been updated now. rls M. Hockings [EMAIL PROTECTED] 10/30/2002 07:00 PM Please respond to Tomcat Users List To: Tomcat Users List [EMAIL PROTECTED] cc: Subject:Re: need help connecting Tomcat 4.1.12, Apache 2.0.43 using jk2 ( mod_jk2-2.0.43.dll) Hello, I too am trying to get this configuration working to give me a test environment that duplicates a remote server. I have followed the instructions pointed to by John Turner very closely and only modified the line in workers2.properties that points to the jvm.dll. When I start Apache I see the following in logs\error.log. If you have any hints or suggestions about what I have set up incorrectly please let me know. Both Apache and Tomcat seem to work fine individually. Thanks, Mike [Wed Oct 30 21:48:39 2002] [notice] config.setAttribute() Error setting vm: classpath C:\ApacheGroup\Tomcat4.1/bin/tomcat-jni.jar [Wed Oct 30 21:48:39 2002] [notice] config.setAttribute() Error setting vm: classpath C:\ApacheGroup\Tomcat4.1/server/lib/commons-logging.jar [Wed Oct 30 21:48:39 2002] [notice] Parent: Created child process 728 [Wed Oct 30 21:48:39 2002] [notice] config.setAttribute() Error setting vm: classpath C:\ApacheGroup\Tomcat4.1/bin/tomcat-jni.jar [Wed Oct 30 21:48:39 2002] [notice] config.setAttribute() Error setting vm: classpath C:\ApacheGroup\Tomcat4.1/server/lib/commons-logging.jar [Wed Oct 30 21:48:39 2002] [notice] Child 728: Child process is running [Wed Oct 30 21:48:39 2002] [notice] vm.init(): Jni lib: C:\Progra~1\j2sdk1.4.0_01\jre\bin\client\jvm.dll [Wed Oct 30 21:48:39 2002] [notice] vm.openJvm2() Option: -Dtomcat.home=C:\ApacheGroup\Tomcat4.1 [Wed Oct 30 21:48:39 2002] [notice] vm.openJvm2() Option: -Dcatalina.home=C:\ApacheGroup\Tomcat4.1 [Wed Oct 30 21:48:39 2002] [notice] vm.openJvm2() Option: -Xmx128M [Wed Oct 30 21:48:39 2002] [notice] vm.open2() done [Wed Oct 30 21:48:40 2002] [notice] jni.validate() class= org/apache/jk/apr/TomcatStarter [Wed Oct 30 21:48:40 2002] [error] Can't find class org/apache/jk/apr/TomcatStarter java.lang.NoClassDefFoundError: org/apache/jk/apr/TomcatStarter [Wed Oct 30 21:48:40 2002] [notice] vm.detach() ok [Wed Oct 30 21:48:40 2002] [error] workerEnv.initWorkers() init failed for worker.jni:onStartup [Wed Oct 30 21:48:40 2002] [notice] jni.validate() class= org/apache/jk/apr/TomcatStarter [Wed Oct 30 21:48:40 2002] [error] Can't find class org/apache/jk/apr/TomcatStarter java.lang.NoClassDefFoundError: org/apache/jk/apr/TomcatStarter [Wed Oct 30 21:48:40 2002] [notice] vm.detach() ok [Wed Oct 30 21:48:40 2002] [error] workerEnv.initWorkers() init failed for worker.jni:onShutdown [Wed Oct 30 21:48:40 2002] [notice] workerEnv.init() ok C:/ApacheGroup/Apache2/conf/workers2.properties [Wed Oct 30 21:48:40 2002] [notice] mod_jk child init 1 -1 [Wed Oct 30 21:48:40 2002] [notice] Child 728: Acquired the start mutex. [Wed Oct 30 21:48:40 2002] [notice] Child 728: Starting 250 worker threads. Turner, John wrote: This should be all you need, courtesy of Robert Sowders: ftp://pokey.wr.usgs.gov/pub/rsowders/Apache2_Jk2_TC4.1.x_JSDK1.4.x.zip John -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org
Re: need help connecting Tomcat 4.1.12, Apache 2.0.43 using jk2 ( mod_jk2-2.0.43.dll)
Don't know why but the classpath lines in the new workers2.properties file has changed. I tried the old method and it works again. Don't know why it pitched a fit. Perhaps it needs to be quoted or something. To fix it just replace both class path lines in the [VM] section of workers2.properties with the following. OPT=-Djava.class.path=c:/Tomcat/bin/tomcat-jni.jar;c:/Tomcat/server/lib/commons-logging.jar Sorry for the confusion. rls M. Hockings [EMAIL PROTECTED] 10/30/2002 07:59 PM Please respond to Tomcat Users List To: Tomcat Users List [EMAIL PROTECTED] cc: Subject:Re: need help connecting Tomcat 4.1.12, Apache 2.0.43 using jk2 ( mod_jk2-2.0.43.dll) Hi Newbie, In the workers2.properties it is ${TOMCAT_HOME}/bin/tomcat-jni.jar. I've tried hard-coding it with forward slashes but the result was the same. There is probably something very simple that I'm overlooking. Thanks, Mike Tomcat Newbie wrote: How about the slashes in your path? C:\ApacheGroup\Tomcat4.1/bin/tomcat-jni.jar ^^^ - Original Message - From: M. Hockings [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Wednesday, October 30, 2002 10:00 PM Subject: Re: need help connecting Tomcat 4.1.12, Apache 2.0.43 using jk2 ( mod_jk2-2.0.43.dll) Hello, I too am trying to get this configuration working to give me a test environment that duplicates a remote server. I have followed the instructions pointed to by John Turner very closely and only modified the line in workers2.properties that points to the jvm.dll. When I start Apache I see the following in logs\error.log. If you have any hints or suggestions about what I have set up incorrectly please let me know. Both Apache and Tomcat seem to work fine individually. Thanks, Mike -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org -- Note new email address - [EMAIL PROTECTED] - Mike's Page : http://www.hockings.net/~mike Rifle Shooting in Ontario : http://www.hockings.net/rso/ Scarborough Rifle Club: http://www.hockings.net/rso/src/ Canadian Shooting Sports : http://www.CdnShootingSports.org Ontario Rifle Association : http://www.OntarioRifleAssociation.org -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org
RE: JSP blank lines !?
That lines are created by your jsp. Every linfeed outside of the jsp tags is reproduced in the output of the page. If you have the following: %! // some code % jsp:useBean ... / jsp:useBean ... / % // some code % There is one linefeed between each tag, if you want to avoid that, you have to use something like that: %! // some code %jsp:useBean ... /jsp:useBean ... /% // some code % -Original Message- From: Philippe Burger [mailto:pburger;zapata.fr] Sent: Thursday, October 31, 2002 9:50 AM To: [EMAIL PROTECTED] Subject: JSP blank lines !? When JSP pages are sent to the web client, they include several blank lines at the begining of the file. They are generated during the compilation ofthe JSP, why? What can I do to delete this lines? -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org
BASIC authentication in Tomcat+IIS (one useful information)
Hello! I have another useful information about the problem described below that I have posted some day ago wihout receiving no solution for it :((( If I use Tomcat 4.x as Web Server (standalone mode), instead of IIS, the BASIC Authentication works well also on Server 1! This means there must be some strange setting in IIS or in Windows 2000 Advanced Server that forces the Tomcat's ISAPI filter (that is to say when Tomcat is used only as Servlet Container) not to ask for login and password to the user but to get their values directly from the system. I hope someone can help me. Best regards, Luca -Messaggio originale- Da: Luca Ventura [mailto:ventluca;tiscali.it] Inviato: martedì 29 ottobre 2002 12.12 A: tomcat-user Oggetto: BASIC authentication in Tomcat+IIS Hello everybody! I have the following GREAT problem with basic authentication in Tomcat I have two servers configured as follows: Server 1: Operating system: Windows 2000 Advanced Server Web Server: IIS 5.0 Servlet Container: Tomcat 4.x Server 2: Windows XP Professional Web Server: IIS 5.0 Servlet Container: Tomcat 4.x Server 2 is not connected to the Internet but it is used to test web applications before passing them in the production environment deployed in Server 1. In fact Server 1 is connected to the Internet and contains all the final versions of Web Applications. So I connect to Server 1 using a real domain name (for example: www.mydomain.com) while I connect to Server 2 using localhost. In both Servers I use Tomcat 4.x as Servlet Container and Micrososft IIS 5 as Web Server. I installed the ISAPI filter to redirect to Tomcat all the requests to Servlet/JSP pages or to web sites based on such java-technologies. I have tried to protect some Servlet/jsp-pages using basic authentication of Tomcat. So I configured the following tomcat files in such way: server.xml: ... !-- Define an AJP 1.3 Connector on port 8009 -- Connector className=org.apache.ajp.tomcat4.Ajp13Connector port=8009 minProcessors=5 maxProcessors=75 acceptCount=10 debug=0/ Realm className=org.apache.catalina.realm.MemoryRealm / ... tomcat-users.xml: tomcat-users user name=admin password=tomcat roles=adminrole / /tomcat-users web.xml: security-constraint display-nameAutenticazione Tomcat/display-name web-resource-collection web-resource-nameProtected Area/web-resource-name !-- Define the context-relative URL(s) to be protected -- url-pattern/MyServlet/url-pattern /web-resource-collection auth-constraint !-- Anyone with one of the listed roles may access this area -- role-nameadminrole/role-name /auth-constraint /security-constraint !-- Default login configuration uses form-based authentication -- login-config auth-methodBASIC/auth-method realm-nameAutenticazione Tomcat/realm-name /login-config Server.xml and tomcat-users.xml are present in /conf folder of Tomcat, while web.xml in the WEB-INF folder of the web application that contains the resource (in this case the servlet MyServlet) that I want to protect. All works fine in Server 2 (localhost): in fact when I connect to the protected resource (servlet MyServlet)Tomcat asks me in a window the login and the password to access to the resource. The problem appears after moving my application in Server 2 (production environment) because when I try to connect to the protected servlet I receive from Tomcat the following error page: Apache Tomcat/4.0.4-b3 - HTTPS Status 403 - Access to the requested resource has been denied type: Status report message: Access to the requested resource has been denied description: Access to the specified resource (Access to the requested resource has been denied) has been forbidden. The strange thing is that Tomcat, before showing the error page, doesn't ask to me for the login and the password to access the resource (as in the first case). It seems that IIS passes automatically an internal login and password to Tomcat to access to the protected resource: given that they are not correct I receive an error message from Tomcat. Anyway I am not sure of this but I suspect that the problem is in Windows 2000 Advanced Server because when I try to access to Server 2, where there is Windows XP installed , all works fine. I have heard that this problem could occur in Windows 2000 only when realm authentication is not set in IIS, but i am not sure and in any case I have no idea how to set realm authentication in IIS. I hope someone can help me to solve this problem. Thanks a lot in advance! Luca -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org
AW: JSP blank lines !?
There is one linefeed between each tag, if you want to avoid that, you have to use something like that: %! // some code %jsp:useBean ... /jsp:useBean ... /% // some code % Ralph is right , with one exception: the last % in your doc will produce a \n . If anyone knows how to hide it , pls let me know. M.Schwarz -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org
Re: Using JAXB in a Servlet (class loader prob?)
Thanks for that. If it is a Tomcat bug that has been addressed, I'll put the issue on the back burner for a while. Can you remember if you noticed the xerces issue I mentioned? Extance, Paul wrote: Upgrade to tomcat 4.0.4 - 4.0.6, then you can put the jaxb-rt.jar into the WEB-INF/lib directory. I think 4.0.3 has some class loader issues with packages that start with java and javax in the WEB- INF/lib folders This solved the problem for us. PaulE -Original Message- From: Nick Lombard (VSP) [mailto:nick.lombard;vcontractor.co.za] Sent: Wednesday, October 30, 2002 5:05 AM To: Tomcat Users List Subject: RE: Using JAXB in a Servlet (class loader prob?) Hi Steve My half a cent comment. Can anone shed more light on this? Specifically I would be interested in any ways to avoid using the /common/lib directory. We are successfully using shared jar files accross applications by placing them in the $TOMCAT_HOME/shared/lib directory. This will help to not use the common/lib directory. Hope it helps. Nick. -Original Message- From: Steve Slatcher [mailto:steve_slatcher;scientia.com] Sent: Wednesday, October 30, 2002 2:54 PM To: Tomcat Users List Subject: Using JAXB in a Servlet (class loader prob?) Hi all I have some code that uses JAXB that works fine in a standalone app with the jars I expect it to need. When I put the same code in a webapp I got a couple of problems initialising the Sevlet (see log file below). I managed to get rid of one problem (javax.xml.bind.JAXBContext) by putting a copy of jaxb-api.jar in /common/lib (before it was only in app/WEB-INF/lib). The second problem was solved by copying a xerces.jar into my app/WEB-INF/lib directory (as far as I can tell my standalone app did not need org.w3c.dom.ls.DocumentLS at all). Can anone shed more light on this? Specifically I would be interested in any ways to avoid using the /common/lib directory. I'm using Tomcat 4.0.3, JAXB 1.0 beta (currently the latest version), and the magic Xerces that came to the rescue was 1.4.4. Despite the name of my webapp I am NOT intent on spamming! Cheers Steve Slatcher 2002-10-30 11:33:14 WebappLoader[/spam]: Deploying class repositories to work directory C:\jakarta-tomcat-4.0.3\work\localhost\spam 2002-10-30 11:33:14 WebappLoader[/spam]: Deploy JAR /WEB-INF/lib/activation.jar to C:\jakarta-tomcat-4.0.3\bin\..\webapps\spam\WEB-INF\lib\activation.jar 2002-10-30 11:33:14 WebappLoader[/spam]: Deploy JAR /WEB- INF/lib/dom.jar to C:\jakarta-tomcat-4.0.3\bin\..\webapps\spam\WEB- INF\lib\dom.jar 2002-10-30 11:33:15 WebappLoader[/spam]: Deploy JAR /WEB-INF/lib/jax-qname.jar to C:\jakarta-tomcat-4.0.3\bin\..\webapps\spam\WEB-INF\lib\jax-qname.jar 2002-10-30 11:33:15 WebappLoader[/spam]: Deploy JAR /WEB-INF/lib/jaxb-api.jar to C:\jakarta-tomcat-4.0.3\bin\..\webapps\spam\WEB-INF\lib\jaxb-api.jar 2002-10-30 11:33:15 WebappLoader[/spam]: Deploy JAR /WEB-INF/lib/jaxb-libs.jar to C:\jakarta-tomcat-4.0.3\bin\..\webapps\spam\WEB-INF\lib\jaxb-libs.jar 2002-10-30 11:33:15 WebappLoader[/spam]: Deploy JAR /WEB-INF/lib/jaxb-ri.jar to C:\jakarta-tomcat-4.0.3\bin\..\webapps\spam\WEB-INF\lib\jaxb-ri.jar 2002-10-30 11:33:15 WebappLoader[/spam]: Deploy JAR /WEB-INF/lib/jaxb-xjc.jar to C:\jakarta-tomcat-4.0.3\bin\..\webapps\spam\WEB-INF\lib\jaxb-xjc.jar 2002-10-30 11:33:15 WebappLoader[/spam]: Deploy JAR /WEB-INF/lib/jaxp-api.jar to C:\jakarta-tomcat-4.0.3\bin\..\webapps\spam\WEB-INF\lib\jaxp-api.jar 2002-10-30 11:33:15 WebappLoader[/spam]: Deploy JAR /WEB-INF/lib/log4j-1.2.6.jar to C:\jakarta-tomcat-4.0.3\bin\..\webapps\spam\WEB-INF\lib\log4j- 1.2.6.jar 2002-10-30 11:33:15 WebappLoader[/spam]: Deploy JAR /WEB- INF/lib/mail.jar to C:\jakarta-tomcat-4.0.3\bin\..\webapps\spam\WEB- INF\lib\mail.jar 2002-10-30 11:33:15 WebappLoader[/spam]: Deploy JAR /WEB-INF/lib/sax.jar to C:\jakarta-tomcat- 4.0.3\bin\..\webapps\spam\WEB-INF\lib\sax.jar 2002-10-30 11:33:15 WebappLoader[/spam]: Deploy JAR /WEB-INF/lib/xercesImpl.jar to C:\jakarta-tomcat-4.0.3\bin\..\webapps\spam\WEB-INF\lib\xercesImpl.jar 2002-10-30 11:33:15 WebappLoader[/spam]: Reloading checks are enabled for this Context 2002-10-30 11:33:15 StandardManager[/spam]: Seeding random number generator class java.security.SecureRandom 2002-10-30 11:33:15 StandardManager[/spam]: Seeding of random number generator has been completed 2002-10-30 11:33:15 ContextConfig[/spam]: Added certificates - request attribute Valve 2002-10-30 11:33:15 StandardWrapper[/spam:Mailer]: Marking servlet Mailer as unavailable 2002-10-30 11:33:15 StandardContext[/spam]: Servlet /spam threw load() exception javax.servlet.ServletException: Error instantiating servlet class com.scientia.spam.MailerServlet at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:8 93) at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:808) at
RE: JSP blank lines !?
That depends on the editor that you use. If you have one that doesn't force a line feed in the last line, that works if you don't make a line feed on your own. -Original Message- From: Power-Netz (Schwarz) [mailto:schwarz;power-netz.de] Sent: Thursday, October 31, 2002 11:14 AM To: Tomcat Users List Subject: AW: JSP blank lines !? the last % in your doc will produce a \n . If anyone knows how to hide it , pls let me know. M.Schwarz -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org
J2EE certificate?
Can anybody tell me wheather Tomcat 4 or 5 will be officially J2EE certified? I know there is a process with Sun underway, but I don't know the results so far. Thanks for your help. Christian Coy Merck KGaA -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org
Client authentification with Tomcat 4.0.5
Hello! Can anybody describe how can I configure Tomcat work with SSL Client authentification? I read the How-To page, I followed the steps, SSL works fine only when clientAuth=false. This is how I configured SSL: !-- Define an SSL HTTP/1.1 Connector on port 8443 -- Connector className=org.apache.catalina.connector.http.HttpConnector port=8443 minProcessors=5 maxProcessors=75 enableLookups=true acceptCount=10 debug=0 scheme=https secure=true Factory className=org.apache.catalina.net.SSLServerSocketFactory clientAuth=true keystoreFile=c:\tomcat 4.0\conf\server.keystore keystorePass=changeit protocol=TLS/ /Connector I habe j2sdk1.4.1 installed on my Computer. I used keytool to generate my Certificates for Server and Client, I imported the Client certificate in the server keystore, I imported the Server certificate in the Client Keystore, I installed the Client certificate in Internet Explorer 6.0, I installed the Server certificate in Internet Explorer 6.0 in the Trusted Root Certification Authorities. When i try to connect to https://localhost:8443 a popup Window shows up, asking me to choose the certificate for the authentification, but the list is empty. What did i miss? I have tried everything in the past 4 days on Windows Advanced Server, Windows Professional, Window XP, even during the night and nobody posted abot this problem. Is SSL Client Authentification with Tomcat 4.0.5 really working? Is it a browser problem? Thanks a lot, Constantin. -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org
Hi all
I am doing a performance tests on tomcat, and i am wondering if someone knows of a website that have some standard info on how and what.. tomcat can serve.. for example if I shoot.. 2500 requests with 1 client.. what would be the average req pr /sec .. Well I know this depends on .. both network speed, hardware and all that things.. but .. I need.. some figures.. to compare to mine :) best regards Siggi -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org
Recall: Hi all
Sigurður Bjarnason would like to recall the message, Hi all. -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org
Tomcat Stress tests !
I am doing a performance tests on tomcat, and i am wondering if someone knows of a website that have some standard info on how and what.. tomcat can serve.. for example if I shoot.. 2500 requests with 1 client.. what would be the average req pr /sec .. Well I know this depends on .. both network speed, hardware and all that things.. but .. I need.. some figures.. to compare to mine :) best regards Siggi -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org
BASIC authentication in Tomcat+IIS (second useful information)
Hello! I have another useful information about this problem... The version of Tomcat I have is 4.0.4b3: is it possible that this beta release contains some bug that doesn't let Tomcat to support correctly BASIC authentication (when it is used as Servlet Container and not in standalone mode)?? Anyway in this case I don't understand why in the test environment the basic authentication of Tomcat works well in fact the problem is present only in production environment using Server 1! If someone has some idea or suggestion to solve this problem I pray him to let me know (I am spending many work-days to solve it without success)! Thanks. Luca -Messaggio originale- Da: Luca Ventura [mailto:ventluca;tiscali.it] Inviato: giovedì 31 ottobre 2002 10.43 A: tomcat-user Oggetto: BASIC authentication in Tomcat+IIS (one useful information) Hello! I have another useful information about the problem described below that I have posted some day ago wihout receiving no solution for it :((( If I use Tomcat 4.x as Web Server (standalone mode), instead of IIS, the BASIC Authentication works well also on Server 1! This means there must be some strange setting in IIS or in Windows 2000 Advanced Server that forces the Tomcat's ISAPI filter (that is to say when Tomcat is used only as Servlet Container) not to ask for login and password to the user but to get their values directly from the system. I hope someone can help me. Best regards, Luca -Messaggio originale- Da: Luca Ventura [mailto:ventluca;tiscali.it] Inviato: martedì 29 ottobre 2002 12.12 A: tomcat-user Oggetto: BASIC authentication in Tomcat+IIS Hello everybody! I have the following GREAT problem with basic authentication in Tomcat I have two servers configured as follows: Server 1: Operating system: Windows 2000 Advanced Server Web Server: IIS 5.0 Servlet Container: Tomcat 4.x Server 2: Windows XP Professional Web Server: IIS 5.0 Servlet Container: Tomcat 4.x Server 2 is not connected to the Internet but it is used to test web applications before passing them in the production environment deployed in Server 1. In fact Server 1 is connected to the Internet and contains all the final versions of Web Applications. So I connect to Server 1 using a real domain name (for example: www.mydomain.com) while I connect to Server 2 using localhost. In both Servers I use Tomcat 4.x as Servlet Container and Micrososft IIS 5 as Web Server. I installed the ISAPI filter to redirect to Tomcat all the requests to Servlet/JSP pages or to web sites based on such java-technologies. I have tried to protect some Servlet/jsp-pages using basic authentication of Tomcat. So I configured the following tomcat files in such way: server.xml: ... !-- Define an AJP 1.3 Connector on port 8009 -- Connector className=org.apache.ajp.tomcat4.Ajp13Connector port=8009 minProcessors=5 maxProcessors=75 acceptCount=10 debug=0/ Realm className=org.apache.catalina.realm.MemoryRealm / ... tomcat-users.xml: tomcat-users user name=admin password=tomcat roles=adminrole / /tomcat-users web.xml: security-constraint display-nameAutenticazione Tomcat/display-name web-resource-collection web-resource-nameProtected Area/web-resource-name !-- Define the context-relative URL(s) to be protected -- url-pattern/MyServlet/url-pattern /web-resource-collection auth-constraint !-- Anyone with one of the listed roles may access this area -- role-nameadminrole/role-name /auth-constraint /security-constraint !-- Default login configuration uses form-based authentication -- login-config auth-methodBASIC/auth-method realm-nameAutenticazione Tomcat/realm-name /login-config Server.xml and tomcat-users.xml are present in /conf folder of Tomcat, while web.xml in the WEB-INF folder of the web application that contains the resource (in this case the servlet MyServlet) that I want to protect. All works fine in Server 2 (localhost): in fact when I connect to the protected resource (servlet MyServlet)Tomcat asks me in a window the login and the password to access to the resource. The problem appears after moving my application in Server 2 (production environment) because when I try to connect to the protected servlet I receive from Tomcat the following error page: Apache Tomcat/4.0.4-b3 - HTTPS Status 403 - Access to the requested resource has been denied type: Status report message: Access to the requested resource has been denied description: Access to the specified resource (Access to the requested resource has been denied) has been forbidden. The strange thing is that Tomcat, before showing the error page, doesn't ask to me for the login and the password to access the resource (as in the first case). It seems that IIS passes automatically an internal login and password to Tomcat to
BASIC authentication in Tomcat+IIS (second useful information)
Hello! I have another useful information about this problem... The version of Tomcat I have is 4.0.4b3: is it possible that this beta release contains some bug that doesn't let Tomcat to support correctly BASIC authentication (when it is used as Servlet Container and not in standalone mode)?? Anyway in this case I don't understand why in the test environment the basic authentication of Tomcat works well in fact the problem is present only in production environment using Server 1! If someone has some idea or suggestion to solve this problem I pray him to let me know (I am spending many work-days to solve it without success)! Thanks. Luca -Messaggio originale- Da: Luca Ventura [mailto:ventluca;tiscali.it] Inviato: giovedì 31 ottobre 2002 11.12 A: tomcat-dev Oggetto: BASIC authentication in Tomcat+IIS (one useful information) Hello! I have another useful information about the problem described below that I have posted some day ago wihout receiving no solution for it :((( If I use Tomcat 4.x as Web Server (standalone mode), instead of IIS, the BASIC Authentication works well also on Server 1! This means there must be some strange setting in IIS or in Windows 2000 Advanced Server that forces the Tomcat's ISAPI filter (that is to say when Tomcat is used only as Servlet Container) not to ask for login and password to the user but to get their values directly from the system. I hope someone can help me. Best regards, Luca -Messaggio originale- Da: Luca Ventura [mailto:ventluca;tiscali.it] Inviato: martedì 29 ottobre 2002 12.12 A: tomcat-dev Oggetto: BASIC authentication in Tomcat+IIS Hello everybody! I have the following GREAT problem with basic authentication in Tomcat I have two servers configured as follows: Server 1: Operating system: Windows 2000 Advanced Server Web Server: IIS 5.0 Servlet Container: Tomcat 4.x Server 2: Windows XP Professional Web Server: IIS 5.0 Servlet Container: Tomcat 4.x Server 2 is not connected to the Internet but it is used to test web applications before passing them in the production environment deployed in Server 1. In fact Server 1 is connected to the Internet and contains all the final versions of Web Applications. So I connect to Server 1 using a real domain name (for example: www.mydomain.com) while I connect to Server 2 using localhost. In both Servers I use Tomcat 4.x as Servlet Container and Micrososft IIS 5 as Web Server. I installed the ISAPI filter to redirect to Tomcat all the requests to Servlet/JSP pages or to web sites based on such java-technologies. I have tried to protect some Servlet/jsp-pages using basic authentication of Tomcat. So I configured the following tomcat files in such way: server.xml: ... !-- Define an AJP 1.3 Connector on port 8009 -- Connector className=org.apache.ajp.tomcat4.Ajp13Connector port=8009 minProcessors=5 maxProcessors=75 acceptCount=10 debug=0/ Realm className=org.apache.catalina.realm.MemoryRealm / ... tomcat-users.xml: tomcat-users user name=admin password=tomcat roles=adminrole / /tomcat-users web.xml: security-constraint display-nameAutenticazione Tomcat/display-name web-resource-collection web-resource-nameProtected Area/web-resource-name !-- Define the context-relative URL(s) to be protected -- url-pattern/MyServlet/url-pattern /web-resource-collection auth-constraint !-- Anyone with one of the listed roles may access this area -- role-nameadminrole/role-name /auth-constraint /security-constraint !-- Default login configuration uses form-based authentication -- login-config auth-methodBASIC/auth-method realm-nameAutenticazione Tomcat/realm-name /login-config Server.xml and tomcat-users.xml are present in /conf folder of Tomcat, while web.xml in the WEB-INF folder of the web application that contains the resource (in this case the servlet MyServlet) that I want to protect. All works fine in Server 2 (localhost): in fact when I connect to the protected resource (servlet MyServlet)Tomcat asks me in a window the login and the password to access to the resource. The problem appears after moving my application in Server 2 (production environment) because when I try to connect to the protected servlet I receive from Tomcat the following error page: Apache Tomcat/4.0.4-b3 - HTTPS Status 403 - Access to the requested resource has been denied type: Status report message: Access to the requested resource has been denied description: Access to the specified resource (Access to the requested resource has been denied) has been forbidden. The strange thing is that Tomcat, before showing the error page, doesn't ask to me for the login and the password to access the resource (as in the first case). It seems that IIS passes automatically an internal login and password to Tomcat to
RE: Search engines and MVC--to clarify
I will need to do page search in a website i'm developing right now Can I use htdig for this? I basically need a simple search engine, no many bells and whistles, but there must be an option to exclude some paths/file types from the indexing... On Thu, 2002-10-31 at 06:25, Ralph Einfeldt wrote: It depends on the search engine that you use. The search engine has two parts: - indexer There are two general solutions for the indexer - web crawler This kind of indexer is completely independent of the internal architecture. It's just following the links in the pages. If it's a good indexer like htdig, it is not ignoring the query string. Otherwise you have to build your site in a way that it doesn't use query strings. (But that that has nothing to do with MVC, that's true for any dynamic site) - internal This kind of indexer is typically built in your own code and is used primarily to build searches for specific contents in the site. (E.G.: Product search) This kind of indexing has to fit your architecture. - query engine There are for typical solutions for this - standalone In this case the search engine contains a component that presents the result to the user. - integrated In this case you get an API that you can use in your own code to present the result to the user. - integrated+standalone Here you use the standalone solution to get the results internally and use your own code to present the result to the user. - internal This is the counterpart for the internal indexer. Ralph Einfeldt Uptime Internet Solution Center GmbH Hamburg, Germany Hosting, Content Management, Java Consulting http://www.uptime-isc.de -Original Message- From: Michele Emmi [mailto:micheleemmi;hotmail.com] Sent: Thursday, October 31, 2002 12:13 AM To: [EMAIL PROTECTED] Subject: Re: Search engines and MVC--to clarify To clarify...I have 2 websites built on the mvc architecture, I would like to have them indexed...does anyone have any experience in this... -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org -- Felipe Schnack Analista de Sistemas [EMAIL PROTECTED] Cel.: (51)91287530 Linux Counter #281893 Faculdade Ritter dos Reis www.ritterdosreis.br [EMAIL PROTECTED] Fone/Fax.: (51)32303328 -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org
RE: Search engines and MVC--to clarify
It can be done with htdig although the integration is a bit awesome. I know the following java interfaces for htdig: - com.opencms.modules.search.htdig_11.zip That is a solution that uses the standalone query engine of htdig and wraps the result it in a own class. You can take that class as an example to create your own servlet. http://www.opencms.org/opencms/opencms/service/modules.html - htservlet-0.1.tgz This is an quite outdated interface that directly accesses the internal database of htdig. http://htdig.sourceforge.net/files/contrib/wrappers - javawrapper.tar.gz This is a very basic variant of the same technic as in the openCMS version. http://htdig.sourceforge.net/files/contrib/wrappers Ralph Einfeldt Uptime Internet Solution Center GmbH Hamburg, Germany Hosting, Content Management, Java Consulting http://www.uptime-isc.de -Original Message- From: Felipe Schnack [mailto:felipes;ritterdosreis.br] Sent: Thursday, October 31, 2002 11:30 AM To: Tomcat Users List Subject: RE: Search engines and MVC--to clarify I will need to do page search in a website i'm developing right now Can I use htdig for this? I basically need a simple search engine, no many bells and whistles, but there must be an option to exclude some paths/file types from the indexing... -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org
RE: Search engines and MVC--to clarify
Here is a simple explaination of what happens when you call one of the sites: apon entry a directory is called to set up the pages in frames, this directory contains the index page but has no content. The index page contains code that calls files in other directories to add menu items, those files call content pages. So, it take 3 directories in my webapps to make the site. I have authority to change only the content and individual menu items, not to change the code. I would very much like to make the sites searchable. And, I have no doubt that the individual pages can be crawled, my concern is how everything will be put back together. So, I was thinking that adding a robot directive could help solve my problem but, where do I put it? I am not supposed to change things in the directory containing the original index page. I was thinking that I could make a mock index page that would contain meta tags and a simple redirect to call the entire homepage and disallow indexing of the code directory. Michele I am new to this, please excuse my simplicity, I am not a programmer, just a webmaster muddling through. And the other guy was right, it is model-view-controller...I had searched Sun, they really don't explain how a spider would handle this kind of site. -Original Message- From: Michele Emmi [mailto:micheleemmi;hotmail.com] Sent: Thursday, October 31, 2002 12:13 AM To: [EMAIL PROTECTED] Subject: Re: Search engines and MVC--to clarify To clarify...I have 2 websites built on the mvc architecture, I would like to have them indexed...does anyone have any experience in this... -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org -- Felipe Schnack Analista de Sistemas [EMAIL PROTECTED] Cel.: (51)91287530 Linux Counter #281893 Faculdade Ritter dos Reis www.ritterdosreis.br [EMAIL PROTECTED] Fone/Fax.: (51)32303328 -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org _ Surf the Web without missing calls! Get MSN Broadband. http://resourcecenter.msn.com/access/plans/freeactivation.asp -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org
RE: NEWBIE: Intercepting the jsp request before its written as a java file
the problem would be knowing where to insert those lines. You sometimes need to do things before writing to the output stream(response encoding,etc), so it can't just go at the top of the file in all cases. This is why the include is available. You could use a filter to use RequestDispatcher.include() for all jsps and append(or prepend) the output from the include and the jsp in your filter. This of course assumes that you aren't using the included code within the jsp(custom authentication,logging to db,etc). Charlie -Original Message- From: Jan-Michael Ong [mailto:jmong;adobe.com] Sent: Wednesday, October 30, 2002 6:45 PM To: Tomcat Users List; Tomcat Users List Subject: Re: NEWBIE: Intercepting the jsp request before its written as a java file Thank you for the quick response. Actually that's the problem. I don't want to have to remember to always insert an include into the jsp file. I'd like to modify Tomcat's behavior such that ANY jsp file (preferably in a context) will get these lines added. Good point though and I'll keep these in mind. Any other suggestions? Thanx Jan-Michael At 03:41 PM 10/30/2002 -0800, [EMAIL PROTECTED] wrote: If I understand your question correctly, why don't you just use one of the include directives to insert that into your file where you want it? Either: %@ include file=relativeURL % -- OR -- jsp:include page={relativeURL | %= expression %} flush=true| false jsp:param name=parameterName value={parameterValue | %= expression %} /+ /jsp:include Thanks. --- Jan-Michael Ong [EMAIL PROTECTED] wrote: Greetings Tomcat-Users Group, I tried to search on this topic on Google for a few days but was unable to come up with any useful leads. I was hoping if any of you would have any idea about the following: For each jsp page, I do the following tag:custom_tag do some work /tag:custom_tag other work What I would prefer to do is have any jsp page be rewritten right before it gets turned into a .java program so that it includes these lines. I've looked at RequestInterceptors and ContextInterceptors and checked out the Java 3.2.4 source code ... and while I came up with some possible leads its been really hard to figure out if its the best way to do it or if there are better ways to accomplish what I'd like to do. I would appreciate any help that you can provide in advance. Thanks very much. Sincerely, Jan-Michael Ong -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org __ Do you Yahoo!? HotJobs - Search new jobs daily now http://hotjobs.yahoo.com/ -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org
Problems with HTML Manager?
Anyone got the HTML interface to the Manager app to work? I cannot work out what to put where! The Manager-HOWTO does not specifically mention this - I have been happily using the 'command line' interface for a while, but am not sure about what to put where on the web page - --- Install Path: /myApp ?? Config URL: ??? WAR URL: war=file:ROOT/myApp ??? --- I can use http://localhost:8080/manager/install?path=/myAppwar=file:ROOT/myApp and it works fine. I feel like I have tried every combination with no success...any advice would be much appreciated! Thanks Chris Parsons IT Project Leader (Strategic Services) Torbay Council Town Hall, Castle Circus Torquay, Devon TQ1 3DS Phone : 01803 207 438 Fax : 01803 201 175 Chris Parsons IT Project Leader (Strategic Services) Torbay Council Town Hall, Castle Circus Torquay, Devon TQ1 3DS Phone : 01803 207 438 Fax : 01803 201 175 -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org
RE: Search engines and MVC--to clarify
you can use lucene to index whatever you want. You have to create your own 'crawler'(I think some have been contributed). It is very flexible in that your indexed data does NOT have to be(but can be) web pages. http://jakarta.apache.org/lucene Charlie -Original Message- From: Felipe Schnack [mailto:felipes;ritterdosreis.br] Sent: Thursday, October 31, 2002 5:30 AM To: Tomcat Users List Subject: RE: Search engines and MVC--to clarify I will need to do page search in a website i'm developing right now Can I use htdig for this? I basically need a simple search engine, no many bells and whistles, but there must be an option to exclude some paths/file types from the indexing... On Thu, 2002-10-31 at 06:25, Ralph Einfeldt wrote: It depends on the search engine that you use. The search engine has two parts: - indexer There are two general solutions for the indexer - web crawler This kind of indexer is completely independent of the internal architecture. It's just following the links in the pages. If it's a good indexer like htdig, it is not ignoring the query string. Otherwise you have to build your site in a way that it doesn't use query strings. (But that that has nothing to do with MVC, that's true for any dynamic site) - internal This kind of indexer is typically built in your own code and is used primarily to build searches for specific contents in the site. (E.G.: Product search) This kind of indexing has to fit your architecture. - query engine There are for typical solutions for this - standalone In this case the search engine contains a component that presents the result to the user. - integrated In this case you get an API that you can use in your own code to present the result to the user. - integrated+standalone Here you use the standalone solution to get the results internally and use your own code to present the result to the user. - internal This is the counterpart for the internal indexer. Ralph Einfeldt Uptime Internet Solution Center GmbH Hamburg, Germany Hosting, Content Management, Java Consulting http://www.uptime-isc.de -Original Message- From: Michele Emmi [mailto:micheleemmi;hotmail.com] Sent: Thursday, October 31, 2002 12:13 AM To: [EMAIL PROTECTED] Subject: Re: Search engines and MVC--to clarify To clarify...I have 2 websites built on the mvc architecture, I would like to have them indexed...does anyone have any experience in this... -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org -- Felipe Schnack Analista de Sistemas [EMAIL PROTECTED] Cel.: (51)91287530 Linux Counter #281893 Faculdade Ritter dos Reis www.ritterdosreis.br [EMAIL PROTECTED] Fone/Fax.: (51)32303328 -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org
RE: Do you tell me how..........................?
the default servelt invoker is disabled by default in /conf/web.xml for security reasons. you can enable this or create your own mapping for your servlet in /WEB-INF/web.xml Charlie -Original Message- From: Correo [mailto:hefperez;ar.inter.net] Sent: Wednesday, October 30, 2002 8:15 AM To: Tomcat Users List Subject: Do you tell me how..? I have st.Servlet1 class on Tomcat 4.1/weapps/Myapp/WEB-INF/classes/st and Servlet1.shtml on Tomcat 4.1/weapps/Myapp I have not problen when call Servlet1.shtml whit http://localhost:8080/Myapp/Servlet1.shtml http://localhost:8080/Myapp/Servlet1.shtml but when I click on button to call Servlet1.class (the servlet) Tomcat return 404 error.. What is a problem ??? I send Myapp/WEB-INF Web.xml and Myapp/Servlet1.shtml to you see if I have any wrong. Thank for your help ! Andres.
RE: Tomcat Xerces Issue.
Java Servlet Specification 2.3 http://java.sun.com/products/servlet/download.html Charlie -Original Message- From: Steve Slatcher [mailto:steve_slatcher;scientia.com] Sent: Wednesday, October 30, 2002 9:26 AM To: Tomcat Users List Subject: Re: Tomcat Xerces Issue. Hi Charlie, Which bit of which spec are you referring to? It sounds strange to me that a webapp is not allowed to use any version of any parser it wants to. Steve Slatcher Cox, Charlie wrote: this was done to enforce the spec. It was added in later and the doc was probably overlooked. you can open a bug on bugzilla to get this updated correctly. http://nagoya.apache.org/bugzilla/ Charlie -Original Message- From: Saurabh Arora [mailto:SArora;novell.com] Sent: Wednesday, October 30, 2002 6:29 AM To: [EMAIL PROTECTED] Subject: Re: Tomcat Xerces Issue. Just to add to previous posting , i was looking at source code for v4.1.12 release Build [EMAIL PROTECTED] 10/30/02 04:54PM I have been looking at the webClassLoader Code. I realised that the Classloader doesnot allow the Xerces lib to be loaded from the WEB-INB/lib . It prevents the same be filtering the org.apache.xerces package. It means the documentation that , Application can use specific version of Xerces.jar in the ClassLoader HOWTO is wrong. Why are we forcing users to use only the common\lib \ xerces implementations. Saurabh arora -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org
Re: Log rotation in Tomcat 4.1.12
* Stefan Wimmer [EMAIL PROTECTED] wrote on 30/Oct/2002 - 03:22:30 : Hello to everyone, I was parsing this mailing list, google and the tomcat documentation and did not find the answer to my question: Can I change the default log rotation from daily to monthly? As far as I can see there was such a functionality in TC 3.3 called 'LogSetter' - I could not find that back in TC 4.* ... Can I use Lifecycle Listeners by any chance to influence the log rotation? If anyone can give me an answer I'd *really* appreciate that ;-) Hi people, does getting no responses mean that there is no answer or that it is too simple to fix that ;-) For my part I was busy yesterday to look in FileLogger.java what I can do and this is the crude result: // If the date has changed, switch log files /* not in use - [EMAIL PROTECTED] 301002 if (!date.equals(tsDate)) { synchronized (this) { if (!date.equals(tsDate)) { close(); date = tsDate; open(); } } } */ if (writer == null) { open(); } I removed the daily switch functionality and from now on there will be just *one* logfile for every Logger I define ;-) I admit it is very crude but it works. If there is any time left I'll investigate how to expand the functionality on a daily, weekly or monthly basis configurable via server.xml But saying that I have to admit again that my Java knowledge is very bad - good chance too expand that as well ;-) Greetz Stefan -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org
Re: Tomcat on Thru64 Unix (OSF1)
No, this is not the problem. I made no changes on defaulf server.xml. Garrett Smith wrote: Hi, I haven't used the examples, but I'm going to make a guess: Did you try using /examples/servlet/servletName? notice servlet/ instead of servlets/ Garrett --- Denys Sene dos Santos [EMAIL PROTECTED] wrote: Hi, I'm having some troubles while running Tomcat 4.1.12-LE under Digital Unix (OSF1). The server are running ok, but the /examples dir with the servlets are returning the error : HTTP Status 404 - /examples/servlets/ type Status report message /examples/servlets/ description The requested resource (/examples/servlets/) is not available. I'm working with the default config files. Under linux, I have no problems. Thank you. -- _ \_ \ Denys Sene dos Santos - [EMAIL PROTECTED] o/\_ http://www1.cptec.inpe.br/~sene/ - ICQ #31845401 \__,\ Meteorological Products Group - Phone: +55 12 560-8458 . | Center for Weather Forecasts and Climate Studies - CPTEC ` .-| National Institute for Space Research - MCT/INPE . \ A happy Linux User #71117 . \ .-| -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org
RE: Tomcat on Thru64 Unix (OSF1)
the default servlet invoker is disabled by default in conf/web.xml. Either enable it or create your own servlet mapping in WEB-INF/web.xml -Original Message- From: Denys Sene dos Santos [mailto:sene;cptec.inpe.br] Sent: Thursday, October 31, 2002 6:52 AM To: Tomcat Users List Subject: Re: Tomcat on Thru64 Unix (OSF1) No, this is not the problem. I made no changes on defaulf server.xml. Garrett Smith wrote: Hi, I haven't used the examples, but I'm going to make a guess: Did you try using /examples/servlet/servletName? notice servlet/ instead of servlets/ Garrett --- Denys Sene dos Santos [EMAIL PROTECTED] wrote: Hi, I'm having some troubles while running Tomcat 4.1.12-LE under Digital Unix (OSF1). The server are running ok, but the /examples dir with the servlets are returning the error : HTTP Status 404 - /examples/servlets/ type Status report message /examples/servlets/ description The requested resource (/examples/servlets/) is not available. I'm working with the default config files. Under linux, I have no problems. Thank you. -- _ \_ \ Denys Sene dos Santos - [EMAIL PROTECTED] o/\_ http://www1.cptec.inpe.br/~sene/ - ICQ #31845401 \__,\ Meteorological Products Group - Phone: +55 12 560-8458 . | Center for Weather Forecasts and Climate Studies - CPTEC ` .-| National Institute for Space Research - MCT/INPE . \ A happy Linux User #71117 . \ .-| -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org
packages
Hi all, If I put a servlet called Hello.class into a package called com.myco.test and have a suitable dir structure under WEB-INF\classes to reflect this, do I still need to give the full URL of the class in the web.xml file e.g., servlet-nameHello/servlet-name servlet-classcom.myco.test.Hello/servlet-class servlet-mapping servlet-nameHello/servlet-name url-patterncom.myco.test.Hello/url-pattern /servlet-mapping Also when referencing this servlet from an html form do I need to give the full URL? I've tried every combination I can think of. Regards Andy Wickson
Apache integrating
Hey! I'm new at JSP. Instead of accessing JSP content at port 8080, I would like to integrate it with Apache without having to specify the port. How do I configure that? Thijs Thiessens The Netherlands -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org
RE: packages
-Original Message- From: Andy Wickson [mailto:andy;awtech.co.uk] Sent: Thursday, October 31, 2002 7:57 AM To: Tomcat Users List Subject: packages Hi all, If I put a servlet called Hello.class into a package called com.myco.test and have a suitable dir structure under WEB-INF\classes to reflect this, do I still need to give the full URL of the class in the web.xml file e.g., yes servlet-nameHello/servlet-name servlet-classcom.myco.test.Hello/servlet-class servlet-mapping servlet-nameHello/servlet-name url-patterncom.myco.test.Hello/url-pattern /servlet-mapping Also when referencing this servlet from an html form do I need to give the full URL? url-pattern is what you type into the browser to get to your servlet. You do not want the package name here. Try a mapping of '/Hello' and you can access it with http://myhost/Hello Charlie I've tried every combination I can think of. Regards Andy Wickson -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org
RE: how do I index a framed site? Was: Search engines and MVC--to clarify
First of all: your problem hasn't anything to do with MVC (That's for Model-View-Controller and is an architecture for the generation of the content, if this happens in frames or not is independend of MVC). So better change that topic for further posts. The best way is to define a inventory map that you put in the noframes section. This map has just basic anchors that link to your content. This way you would no only make your own searchengine happy but also external search engines and browsers that don't support frames. -Original Message- From: Michele Emmi [mailto:micheleemmi;hotmail.com] Sent: Thursday, October 31, 2002 1:26 PM To: [EMAIL PROTECTED] Subject: RE: Search engines and MVC--to clarify Here is a simple explaination of what happens when you call one of the sites: apon entry a directory is called to set up the pages in frames, this directory contains the index page but has no content. The index page contains code that calls files in other directories to add menu items, those files call content pages. So, it take 3 directories in my webapps to make the site. I have authority to change only the content and individual menu items, not to change the code. I would very much like to make the sites searchable. And, I have no doubt that the individual pages can be crawled, my concern is how everything will be put back together. So, I was thinking that adding a robot directive could help solve my problem but, where do I put it? I am not supposed to change things in the directory containing the original index page. I was thinking that I could make a mock index page that would contain meta tags and a simple redirect to call the entire homepage and disallow indexing of the code directory. -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org
Re: packages
Andy Wickson wrote: Hi all, If I put a servlet called Hello.class into a package called com.myco.test and have a suitable dir structure under WEB-INF\classes to reflect this, do I still need to give the full URL of the class in the web.xml file e.g., servlet-nameHello/servlet-name servlet-classcom.myco.test.Hello/servlet-class servlet-mapping servlet-nameHello/servlet-name url-patterncom.myco.test.Hello/url-pattern /servlet-mapping Also when referencing this servlet from an html form do I need to give the full URL? The URL pattern is wrong - it should be and URL :-) servlet servlet-nameHello/servlet-name servlet-classcom.myco.test.Hello/servlet-class /servlet servlet-mapping servlet-nameHello/servlet-name url-pattern/whatever/helloServlet/url-pattern /servlet-mapping Then the access URL (from browser) is http://FQDN of your server/path to the webapp deployment/whatever/helloServlet For example: http://www.myserver.domain.com/mywebapps/whatever/hellServlet Nix. -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org
RE: Alias vs VirtualHost - which is better for me ?
depends on your goal. If both hostnames are doing the same things in all cases you should use Alias to prevent multiple copies of everything from running. If you have different contexts, logfiles, etc for each then you should use multiple host elements. Charlie -Original Message- From: [EMAIL PROTECTED] [mailto:achana;saysit.com] Sent: Friday, March 12, 2004 9:33 PM To: [EMAIL PROTECTED] Subject: Alias vs VirtualHost - which is better for me ? Hi all. Both options work for me. Which is the better solution in terms of performance ? -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org
RE: VirtualHosts and tomcat
sessions are unique to the virtual hosts. You will have to maintain the session information yourself through a common database, or use different contexts instead of virtual hosts. If you don't want to use tomcat's built-in authentication, you can use a filter to enforce login before accessing your protected resources Charlie -Original Message- From: MURAT BALKAS [mailto:murat.balkas;o2.net.tr] Sent: Wednesday, October 30, 2002 9:59 AM To: [EMAIL PROTECTED] Subject: VirtualHosts and tomcat Hi, I'm still trying to make tomcat support virtual hosting. I gave up fighting with connectors and trying to do it with tomcat's Host Container. Some info : --- My Engine's defaultHost is : localhost The docBase of the Host with the name localhost is : mobileservices Server port=8005 shutdown=SHUTDOWN debug=0 Service name=Tomcat-Standalone Connector className=org.apache.catalina.connector.http.HttpConnector port=443 minProcessors=5 maxProcessors=75 enableLookups=true acceptCount=10 debug=0 scheme=https secure=true Engine name=Standalone defaultHost=localhost debug=0 Host name=localhost debug=0 appBase=webapps unpackWARs=true Context path= docBase=mobileservices debug=0 reloadable=true crossContext=true/ Now the question is : With the configuration above everything is working. I want to add another host which one should have a docBase as mobileservices/o2.net. But, if I add the following lines after the above working Host, I couldn't log in. I think that the session data is not transfered between Hosts' or contexts. Am I right? If yes, how can I solve this. Host name=second.rt.net.tr debug=0 appBase=webapps unpackWARs =true Valve className=org.apache.catalina.valves.AccessLogValve directory=logs prefix=o2sms_access_log. suffix=.txt pattern=combined/ Logger className=org.apache.catalina.logger.FileLogger directory=logs prefix=o2sms_log. suffix=.txt timestamp=true/ Context path= docBase=mobileservices/o2.net debug=0 reloadable=true crossContext=true privileged=true / !-- If I do not add the following lines I get /o2.net noýt found -- Context path=/o2.net docBase=mobileservices/o2.net debug=0 reloadable=true crossContext=true/ /Host The login process is as follows : If the username, password and company ID is OK, the user is redirected to a HOME related to the company, e.g. mobileservices/o2.net. So, if I go to https://first.rt.net.tr and give the right values for username/password/company ID I'm redirected to mobileservices/o2.net and everything is OK. But, if I go to https://second.rt.net.tr with docBase as mobileservices/o2.net and although I give the right values for username/password/company ID, I get wrong username or password. And, in my log files, I see session values are null for all of username/password and company ID. The session values get lost somewhere. I don't know where... This is the problem. :) Murat BALKAS P.S. : I'm not the developer of the application running on tomcat. -- Bu e-posta sadece yukarida isimleri belirtilen kisiler arasinda ozel haberlesme amacini tasimaktadir. Size yanlislikla ulasmissa lutfen mesaji geri gonderiniz ve sisteminizden siliniz. Rt.Net Internet Hizmetleri Pazarlama ve Ticaret A.S. bu mesajin icerigi ile ilgili olarak hic bir hukuksal sorumlulugu kabul etmez. This e-mail communication is intended for the private use of the persons named above. If you received this message in error, please immediately notify the sender and delete it from your system. Rt.Net Internet Hizmetleri Pazarlama ve Ticaret A.S. does not accept legal responsibility for the contents of this message. -- -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org
RE: Setup of Develoment Environment
Please, please, please read the documentation. It is all in there. Application Development Guide: http://jakarta.apache.org/tomcat/tomcat-4.1-doc/appdev/index.html ClassLoader HOWTO: http://jakarta.apache.org/tomcat/tomcat-4.1-doc/class-loader-howto.html John -Original Message- From: Raghava Rao [mailto:call_raghava;hotmail.com] Sent: Wednesday, October 30, 2002 4:37 PM To: [EMAIL PROTECTED] Subject: Setup of Develoment Environment Hello, I'm new to Servlet programming and need help in starting to develop servlets. I have downloaded jakarta-tomcat-4.0.6. Once installed, it's installed as C:\Program Files\Apache Tomcat 4.0 Now, I have a development environment of my own, where I write and compile my Java files.. Like, C:\servlet\examples\HelloWorld.java After providing the servlet.jar file in my CLASSPATH, and compiling HelloWorld.java, I got HelloWorld.class. Now, where do I move this class file to view it as http://localhost/servlet/HelloWorld?? I copied the classfile to C:\Program Files\Apache Tomcat 4.0\webapps\ROOT\WEB-INF\classes, where classes dir was created by me and class files copied there. Now, starting the Tomcat Webserver, I try opening this in Internet Explorer as http://localhost/servlet/HelloWorld, I get the webpage error as: Apache Tomcat/4.0.6 - HTTP Status 404 - /servlet/HelloWorld -- -- type Status report message /servlet/HelloWorld description The requested resource (/servlet/HelloWorld) is not available. What am I missing? I've thoroughly followed http://www.moreservlets.com/Using-Tomcat-4.html, need help at the earliest. Thank you. Raghava _ Unlimited Internet access for only $21.95/month. Try MSN! http://resourcecenter.msn.com/access/plans/2monthsfree.asp -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org
RE: Tomcat SSL w/ Apache
If you are using Tomcat + Apache, the activity between Tomcat and Apache on the connector is not secure. It is not encrypted. SSL Request - Apache - Decrypted by Apache - Sent to Connector - Sent to Tomcat on Connector port - reply back to Apache - Response encrypted by Apache - SSL Response to Client As far as Tomcat is concerned, the request isn't secure...all Tomcat sees is a typical request on a connector port. Perhaps there is some code in isSecure() that can differentiate, but I would be surprised if there was. John -Original Message- From: Randy Secrist [mailto:tomcat;secristfamily.com] Sent: Wednesday, October 30, 2002 5:24 PM To: Tomcat Users List Subject: Re: Tomcat SSL w/ Apache I played around with the config for a few hours today - didn't get any results. Having read that about name based hosting before, I switched to IP based vhosting... - after poping in a few network cards... What happens now is the same as before... 1) I switch to HTTPS - and I get the standard warning about self signed certificates... 2) I accept it... 3) Tomcat get's and compiles the request...showing isSecure is false...when it should be true 4) And apache feeds me the page via https, and the browser, and the browser reports secure transmission. 5) I check Apache's logs... (No errors in SSL via apache side..) Tomcat's logs were garbled until I cleaned up my virtual host files - but now they appear to be fine... - no errors. Somewhere in there, Tomcat is getting the request - because it compiles the JSP directives, and returns false when calling %=request.isSecure()% However as noted above - this happens when using https! If I do the same thing on my linux box - it works just fine - (albeit I didn't compile apache myself on that thing... - but that shouldn't matter - because SSL does work - just NOT with Tomcat...) Here is the relevant part of my httpd.conf... - note - NameVirtualHost * is commented out prior to this... - does _default_:443 - mean it is still trying to use a default named Vhost, or a default IP? IfModule mod_ssl.c VirtualHost _default_:443 DocumentRoot c:/web/Tomcat-4-1/webapps/ROOT ErrorLog logs/ssl-error_log TransferLog logs/ssl-access_log SSLEngine on SSLCipherSuite ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL SSLCertificateFile conf/ssl/myDomain.cert SSLCertificateKeyFile conf/ssl/myDomain.key SetEnvIf User-Agent .*MSIE.* nokeepalive ssl-unclean-shutdown CustomLog logs/ssl_request_log \ %t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \%r\ %b RewriteEngine On RewriteOptions inherit /VirtualHost /IfModule - Original Message - From: Robert L Sowders [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Wednesday, October 30, 2002 12:51 AM Subject: Re: Tomcat SSL w/ Apache The configuration you describe for virtual hosts is correct except that for SSL to work correctly in Apache you have to use IP based virtual hosting. Name based virtual hosting will give you errors. See http://www.modssl.org/docs/2.8/ssl_faq.html#ToC47 rls Randy Secrist [EMAIL PROTECTED] 10/29/2002 07:58 PM Please respond to Tomcat Users List To: Tomcat Users List [EMAIL PROTECTED] cc: Subject:Tomcat SSL w/ Apache I have an interesting problem that I don't know much about. I am integrating Apache with Tomcat using mod_jk - and I have it mostly working. The only real problem I have left - is getting SSL - which appears to be working with Apache - to work with Tomcat. I have both HTTP connector's disabled in Tomcat. The only connector I have up is Coyote's AJP on 8009. (Via tomcat 4.1.12). When I switch to https and accept my self generated certificate, the browser returns the compiled jsp page, without any non secure warnings... - but if I call %=request.isSecure()% - it returns FALSE - even though I am using HTTPS. I'm not sure why this could be happening. In Apache - I have 2 virtual hosts mapped to the same domain name - on different ports - because I couldn't get it to work right with just one. mydomain.com:80 and mydomain.com:443 (with all my SSL directives...) Could anyone offer advise? Randy -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org
RE: how do I index a framed site?
Normally I would have altered the index page to be search engine freindly, however, the index page is not a page that I have authority to change. The index page (and every file in that directory) is exactly the same for both sites, which are very different in content. It is a very frustrating situation because all of the normal things I would do to the index page doesn't apply. It is a very perplexing situation. Michele From: Ralph Einfeldt [EMAIL PROTECTED] Reply-To: Tomcat Users List [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Subject: RE: how do I index a framed site? Was: Search engines and MVC--to clarify Date: Thu, 31 Oct 2002 14:10:52 +0100 First of all: your problem hasn't anything to do with MVC (That's for Model-View-Controller and is an architecture for the generation of the content, if this happens in frames or not is independend of MVC). So better change that topic for further posts. The best way is to define a inventory map that you put in the noframes section. This map has just basic anchors that link to your content. This way you would no only make your own searchengine happy but also external search engines and browsers that don't support frames. -Original Message- From: Michele Emmi [mailto:micheleemmi;hotmail.com] Sent: Thursday, October 31, 2002 1:26 PM To: [EMAIL PROTECTED] Subject: RE: Search engines and MVC--to clarify Here is a simple explaination of what happens when you call one of the sites: apon entry a directory is called to set up the pages in frames, this directory contains the index page but has no content. The index page contains code that calls files in other directories to add menu items, those files call content pages. So, it take 3 directories in my webapps to make the site. I have authority to change only the content and individual menu items, not to change the code. I would very much like to make the sites searchable. And, I have no doubt that the individual pages can be crawled, my concern is how everything will be put back together. So, I was thinking that adding a robot directive could help solve my problem but, where do I put it? I am not supposed to change things in the directory containing the original index page. I was thinking that I could make a mock index page that would contain meta tags and a simple redirect to call the entire homepage and disallow indexing of the code directory. -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org _ Choose an Internet access plan right for you -- try MSN! http://resourcecenter.msn.com/access/plans/default.asp -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org
RE: Apache integrating
Don't use Apache unless you understand why you need to, and if there is a need to. Many people have great difficulty using Apache + Tomcat. Tomcat works fine for general use in stand-alone mode. Change the server port in server.xml from 8080 to 80 and restart Tomcat. If you decide you want to go with Apache + Tomcat, search the archives and check the docs online for info on the JK/JK2 connectors...the topic comes up several times a day. John -Original Message- From: Thijs Thiessens [mailto:T.Thiessens;farsidegravity.nl] Sent: Friday, November 01, 2002 9:01 AM To: Tomcat Users List Subject: Apache integrating Hey! I'm new at JSP. Instead of accessing JSP content at port 8080, I would like to integrate it with Apache without having to specify the port. How do I configure that? Thijs Thiessens The Netherlands -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org
RE: Compatibility between Windows and Linux tomcat ( mod_jk ajp13 )
The best way for someone to help you is for you to post relevant snippets of your config files, and any pertinent information from log files. Just saying it doesn't work doesn't help us help you. Off the top of my head, I would guess that the Red Hat server can't resolve a domain name for the Win2K/Tomcat server, but without getting more specific information from you, there's really no way to tell. John -Original Message- From: Bertus Keyser [mailto:bertus.keyser;impress.co.za] Sent: Thursday, October 31, 2002 3:21 AM To: Tomcat Users List Subject: RE: Compatibility between Windows and Linux tomcat ( mod_jk ajp13 ) Can anybody please help The situation: I a running Apache 1.3.20-16 (rpm version number) with tomcat-mod 3.2.1-1 (rpm version number) on a Red Hat 7.1. Also running Jakarta Tomcat 3.3.1 with the mod_jk.dll on a win2k (bad,I know). I am trying to make a connection from the Apache to the Tomcat through mod_jk with the ajp13 protocol. Problem: When I connect to the Apache on Redhat 7.1 with say http://192.168.1.1/test it is supposed to call this page from the Tomcat on the win2k machine but it just keeps on loading into infinity and never shows nothing. The config of Tomcat and Apache is not that important. I'll explain why. I have set up a second Apache on a seperate win2k box with the same config settings as the Red Hat one but when i connect to the win2k box with say http://192.168.1.2/test it connect just fine. Anybody have any clue why this might be happening between Linux -- w2k and not with w2k -- w2k? Any help please. (desperate). I have spent about 48hours in total on it. I have Google'd read manuals but still nothing. Bertus Keyser -Original Message- From: Bertus Keyser [mailto:bertus.keyser;impress.co.za] Sent: 29 October 2002 06:18 To: [EMAIL PROTECTED] Subject: Compatibility between Windows and Linux tomcat Hallo I would like to know if there are any compatibility issues between running Linux Apache with mod_jk and running Tomcat on Windows with the ajp13 protocol. Bertus Keyser IMPRESS SOFTWARE (SA) Peter Place Park Bryanston, Johannesburg Phone +27 11 706-0339 Fax +27 11 706-8753 Mobile+27 83 459-5624 -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org
Question on isUserInRole, getUserPrincipal
I have two JSPs. One is secured using security-constraint and the other is not. I can login properly and correctly call getUserPrincipal and isUserInRole. If the authenticated user then goes to the unsecured page those methods do not work. getUserPrincipal returns null and isUserIonRole always returns false. I would like to have personalization on the unsecured page if they happen to be authenticated when they visit that page. My first question is this, Is this the correct behavior that the Servlet spec defines? What is the recommended workaround for this problem? I am currently throwing information in the session, which does remain for the user. This example is run using the JBoss-3.0.3_Tomcat-4.1.12 release. I have not tried it under tomcat standalone because of the use of EJBs. Any help would be great. Ben Litchfield -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org
TLD not found
I get the following error when running the JSP in tomcat 4.1.12 on W2k org.apache.jasper.JasperException: null(-1,-1) File /struts-layout not found.. (and the rest of the stack trace) In web.xml I have taglib taglib-uri/struts-bean/taglib-uri taglib-location/WEB-INF/tld/struts-bean.tld/taglib-location /taglib On top of JSP I have % taglib uri=/struts-bean prefix=bean % However it worksfine if i give a full path in the JSP as % taglib uri=/WEB-INF/tld/struts-bean.tld prefix=bean % But according to TagLib Specs the first one is also valid. Or is it not? -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org
RE: Tomcat Hangs and cannot be shut down
Hi, It's very likely your app has an infinite loop or a thread lock somewhere. Check that very carefully. Tomcat, from time to time, starts processing and locks into some loop or Can you reproduce this reliably? This happens for a while and then when the session is terminated, I believe, then everything goes back to the way it was before and works fine. If you configure session timeout to something very short, e.g. 3 minutes instead of the default 30, does everything go back to the way it was before after 3 minutes? force the shutdown of Tomcat? Yes, kill the process. But you probably want to solve what's causing the error and fix that, instead of forcing a tomcat restart. Yoav Shapira Millennium ChemInformatics This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org
Re: keeping user logged in using j_security_check
Thanks Ralph. But can't I force j_security to read an existing cookie? how do i map the sessionid back to the user in case he closed his browser? Thanks, Guru - Original Message - From: Ralph Einfeldt [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Thursday, October 31, 2002 4:18 AM Subject: RE: keeping user logged in using j_security_check That feature is caused by the livetime of the session cookie. That cookie is just valid for the current browser session. If you close the browser the cookies is deleted. If you disable cookies you can reenter a session, if you use an url that contains a valid session id. -Original Message- From: Guru Mandavia [mailto:gmandavia;smartbrief.com] Sent: Wednesday, October 30, 2002 11:03 PM To: [EMAIL PROTECTED] Subject: keeping user logged in using j_security_check Every time a user closes the browser window, he is forced to re-login even though he logged in just a couple of minutes ago. Is there a way to configure j_security_check to use an existing session after the browser window is closed? -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org
RE: Compatibility between Windows and Linux tomcat ( mod_jk ajp13 )
Sorry, I am new to this list and don't yet understand the information required. Thanks for the reply. The logs does not show anything. Its as If the message never reaches the w2k pc. The real issue as I can see it is: why can w2k connect to w2k but no matter how I try I can't get Linux to connect to w2k. I have tested this now with about 4 pc's in total. I have done and redone the settings about 10 times now and still nothing with the same result every time. If I shutdown the Tomcat on the w2k pc the apache instantly notifies me with an error but if Tomcat is running it just waits for infinite. If you think the logs and config will really help please ask, again. :) -Original Message- From: Turner, John [mailto:JTurner;AAS.com] Sent: 31 October 2002 03:39 To: 'Tomcat Users List' Subject: RE: Compatibility between Windows and Linux tomcat ( mod_jk ajp13 ) The best way for someone to help you is for you to post relevant snippets of your config files, and any pertinent information from log files. Just saying it doesn't work doesn't help us help you. Off the top of my head, I would guess that the Red Hat server can't resolve a domain name for the Win2K/Tomcat server, but without getting more specific information from you, there's really no way to tell. John -Original Message- From: Bertus Keyser [mailto:bertus.keyser;impress.co.za] Sent: Thursday, October 31, 2002 3:21 AM To: Tomcat Users List Subject: RE: Compatibility between Windows and Linux tomcat ( mod_jk ajp13 ) Can anybody please help The situation: I a running Apache 1.3.20-16 (rpm version number) with tomcat-mod 3.2.1-1 (rpm version number) on a Red Hat 7.1. Also running Jakarta Tomcat 3.3.1 with the mod_jk.dll on a win2k (bad,I know). I am trying to make a connection from the Apache to the Tomcat through mod_jk with the ajp13 protocol. Problem: When I connect to the Apache on Redhat 7.1 with say http://192.168.1.1/test it is supposed to call this page from the Tomcat on the win2k machine but it just keeps on loading into infinity and never shows nothing. The config of Tomcat and Apache is not that important. I'll explain why. I have set up a second Apache on a seperate win2k box with the same config settings as the Red Hat one but when i connect to the win2k box with say http://192.168.1.2/test it connect just fine. Anybody have any clue why this might be happening between Linux -- w2k and not with w2k -- w2k? Any help please. (desperate). I have spent about 48hours in total on it. I have Google'd read manuals but still nothing. Bertus Keyser -Original Message- From: Bertus Keyser [mailto:bertus.keyser;impress.co.za] Sent: 29 October 2002 06:18 To: [EMAIL PROTECTED] Subject: Compatibility between Windows and Linux tomcat Hallo I would like to know if there are any compatibility issues between running Linux Apache with mod_jk and running Tomcat on Windows with the ajp13 protocol. Bertus Keyser IMPRESS SOFTWARE (SA) Peter Place Park Bryanston, Johannesburg Phone +27 11 706-0339 Fax +27 11 706-8753 Mobile+27 83 459-5624 -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org
RE: Compatibility between Windows and Linux tomcat ( mod_jk ajp13 )
If you don't supply the config files, the answer to your question is don't use Red Hat. If that is a sufficient answer, then read no further. At the very least, workers.properties. If you are guaranteeing that workers.properties on the Win2K boxes are identical to the workers.properties file on the Red Hat server, then the problem is either: 1. Apache on the Red Hat server has a problem, in which case the Apache access logs would be very helpful. Not all of them, just the 5-10 lines around the time of the failed request or 2. There is a network problem that is preventing mod_jk on the Red Hat server from resolving the Win2K/Tomcat server name or preventing it from reaching the Win2K/Tomcat server, perhaps a route, a missing default gateway, a bad cable, or whatever. John -Original Message- From: Bertus Keyser [mailto:bertus.keyser;impress.co.za] Sent: Thursday, October 31, 2002 9:48 AM To: Tomcat Users List Subject: RE: Compatibility between Windows and Linux tomcat ( mod_jk ajp13 ) Sorry, I am new to this list and don't yet understand the information required. Thanks for the reply. The logs does not show anything. Its as If the message never reaches the w2k pc. The real issue as I can see it is: why can w2k connect to w2k but no matter how I try I can't get Linux to connect to w2k. I have tested this now with about 4 pc's in total. I have done and redone the settings about 10 times now and still nothing with the same result every time. If I shutdown the Tomcat on the w2k pc the apache instantly notifies me with an error but if Tomcat is running it just waits for infinite. If you think the logs and config will really help please ask, again. :) -Original Message- From: Turner, John [mailto:JTurner;AAS.com] Sent: 31 October 2002 03:39 To: 'Tomcat Users List' Subject: RE: Compatibility between Windows and Linux tomcat ( mod_jk ajp13 ) The best way for someone to help you is for you to post relevant snippets of your config files, and any pertinent information from log files. Just saying it doesn't work doesn't help us help you. Off the top of my head, I would guess that the Red Hat server can't resolve a domain name for the Win2K/Tomcat server, but without getting more specific information from you, there's really no way to tell. John -Original Message- From: Bertus Keyser [mailto:bertus.keyser;impress.co.za] Sent: Thursday, October 31, 2002 3:21 AM To: Tomcat Users List Subject: RE: Compatibility between Windows and Linux tomcat ( mod_jk ajp13 ) Can anybody please help The situation: I a running Apache 1.3.20-16 (rpm version number) with tomcat-mod 3.2.1-1 (rpm version number) on a Red Hat 7.1. Also running Jakarta Tomcat 3.3.1 with the mod_jk.dll on a win2k (bad,I know). I am trying to make a connection from the Apache to the Tomcat through mod_jk with the ajp13 protocol. Problem: When I connect to the Apache on Redhat 7.1 with say http://192.168.1.1/test it is supposed to call this page from the Tomcat on the win2k machine but it just keeps on loading into infinity and never shows nothing. The config of Tomcat and Apache is not that important. I'll explain why. I have set up a second Apache on a seperate win2k box with the same config settings as the Red Hat one but when i connect to the win2k box with say http://192.168.1.2/test it connect just fine. Anybody have any clue why this might be happening between Linux -- w2k and not with w2k -- w2k? Any help please. (desperate). I have spent about 48hours in total on it. I have Google'd read manuals but still nothing. Bertus Keyser -Original Message- From: Bertus Keyser [mailto:bertus.keyser;impress.co.za] Sent: 29 October 2002 06:18 To: [EMAIL PROTECTED] Subject: Compatibility between Windows and Linux tomcat Hallo I would like to know if there are any compatibility issues between running Linux Apache with mod_jk and running Tomcat on Windows with the ajp13 protocol. Bertus Keyser IMPRESS SOFTWARE (SA) Peter Place Park Bryanston, Johannesburg Phone +27 11 706-0339 Fax +27 11 706-8753 Mobile +27 83 459-5624 -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org -- To
RE: keeping user logged in using j_security_check
There is no cookie, the browser deletes the session cookie when the browser is closed. So tomcat has no chance to assign the session to this request. The only portable solution I see would be something like that: - define an own cookie that survives the closing of the browser. (have a lookt at API Doc of javax.servlet.http.Cookie to see how to achieve that) - store the session id in the cookie - define a filter that does the following: - check each incoming request for the session id - if the request doesn't contain a session id (from cookie and url), but your cookie, redirect to an url that contains the original session id from the cookie. -Original Message- From: Guru Mandavia [mailto:gmandavia;smartbrief.com] Sent: Thursday, October 31, 2002 3:21 PM To: Tomcat Users List Subject: Re: keeping user logged in using j_security_check Thanks Ralph. But can't I force j_security to read an existing cookie? how do i map the sessionid back to the user in case he closed his browser? -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org
[tomcat4.1.12] How to manage my own default Servlet
Hello everybody I have my own default Servlet and I would like to use it only for my webapps instead of the org.apache.catalina.servlets.DefaultServletapache In order to override the default definition I have added my own tags into my web.xml Ex : servlet servlet-nameDefault/servlet-name servlet-classutil.MyDefaultServlet/servlet-class /servlet servlet-mapping servlet-nameDefault/servlet-name url-pattern//url-pattern /servlet-mapping But I have the following errors WebappClassLoader: Checking for javax/servlet/Servlet.class java.lang.reflect.InvocationTargetException: java.lang.IllegalArgumentException: addChild: Child name 'default' is not unique at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:8 15) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:807) at org.apache.catalina.core.StandardContext.addChild(StandardContext.java:1320) at java.lang.reflect.Method.invoke(Native Method) at org.apache.commons.beanutils.MethodUtils.invokeMethod(MethodUtils.java:228) at org.apache.commons.digester.SetNextRule.end(SetNextRule.java:260) at org.apache.commons.digester.Digester.endElement(Digester.java:1036) at org.apache.xerces.parsers.AbstractSAXParser.endElement(AbstractSAXParser.jav a:579) at org.apache.xerces.impl.XMLNamespaceBinder.endElement(XMLNamespaceBinder.java :646) at org.apache.xerces.impl.dtd.XMLDTDValidator.handleEndElement(XMLDTDValidator. java:1972) at org.apache.xerces.impl.dtd.XMLDTDValidator.endElement(XMLDTDValidator.java:8 78) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.handleEndElement(XMLDo cumentFragmentScannerImpl.java:1144) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEndElement(XMLDocu mentFragmentScannerImpl.java:987) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatc her.dispatch(XMLDocumentFragmentScannerImpl.java:1445) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocume ntFragmentScannerImpl.java:333) at org.apache.xerces.parsers.DTDConfiguration.parse(DTDConfiguration.java:524) at org.apache.xerces.parsers.DTDConfiguration.parse(DTDConfiguration.java:580) at org.apache.xerces.parsers.XMLParser.parse(XMLParser.java:152) at org.apache.xerces.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:116 9) at org.apache.commons.digester.Digester.parse(Digester.java:1495) at org.apache.catalina.startup.ContextConfig.applicationConfig(ContextConfig.ja va:282) at org.apache.catalina.startup.ContextConfig.start(ContextConfig.java:639) at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java: 243) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSuppor t.java:166) at org.apache.catalina.core.StandardContext.start(StandardContext.java:3493) 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.java:2189) at org.apache.catalina.startup.Catalina.start(Catalina.java:510) at org.apache.catalina.startup.Catalina.execute(Catalina.java:400) at org.apache.catalina.startup.Catalina.process(Catalina.java:180) at java.lang.reflect.Method.invoke(Native Method) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203) [ERROR] Digester - -End event threw exception java.lang.reflect.InvocationTargetException Thanks in advance François. -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org
Uploaded files corrupting when connecting to Apache
Hi, I hope this rings a bell with someone on the list who may have experienced something similar. I've included as much info as I think may be useful, but let me know if I've missed out anything important! I have a problem uploading files in Java when using Apache to connect to a servlet engine, and managed to replicate the problem in a simple test. I am attempting to upload a text file consisting of lines of characters (to make it easier to spot corruption), which is about 614k. While the file is uploading (which takes about a minute on broadband), I open another browser window and browse a completely different site. When the upload has completed, upon examining the uploaded file, I find that some of the information sent by the other browser window to the other website has been mixed into the uploaded file, although the overall file size is exactly the same as the file on the client machine. It looks like this: start of file extract Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/vnd.ms-powerpoint, application/vnd.ms-excel, application/msword, */* Referer: http://www.theregister.co.uk/content/53/index.html Accept-Language: en-gb Accept-Encoding: gzip, deflate User-Agent: Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0) Host: www.theregister.co.uk Connection: Keep-Alive end of file extract ...the symbols are all that is supposed to be there! (www.theregister.com is the site I was browsing in the other browser) I have used two different Java upload components: 1) com.oreilly.servlet 2) com.jspsmart.upload I have used two different servlet engines: 1) Tomcat4 linking to Apache via ajp13 and mod_jk 2) JRun4 linking to Apache with with mod_jrun I have used two different Linux servers: 1) RedHat 7.1-1, running Apache 1.3.19-5 2) Raq4 running Apache 1.3.20 I was using IE5.5 on a PC for the upload client and browsing the other site. I also replicated the problem by browsing another site using a Mac, which was sharing a broadband connection with the PC and running. IE5.2:mac. The problem still occured when I switched off connection sharing on the PC. The problem ONLY happens when I access the site via Apache - if I connect directly to the servlet engine's port, the problem disappears. The issue appears to be unrelated to file size. Could it be that I have not configured Apache correctly, or this is a bug in version 1.3 and I need to update to Apache 2? Andy Taylor -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org
RE: Compatibility between Windows and Linux tomcat ( mod_jk ajp13 )
To me it's not clear what you are doing at all. On which level do you try to connect from linux to win2k ? - browser - apache - apache - tomcat - can you ping the ip of the win2k server from linux ? - can you ping the name of the win2k server from linux ? - can you telnet to the name and port on the win2k server from linux ? Depending on the answer to the first question, the port varies. Either it's the apache port or the connector port for tomcat. If all answers are yes: - can you see the request in the access log ? -Original Message- From: Bertus Keyser [mailto:bertus.keyser;impress.co.za] Sent: Thursday, October 31, 2002 3:48 PM To: Tomcat Users List Subject: RE: Compatibility between Windows and Linux tomcat ( mod_jk ajp13 ) why can w2k connect to w2k but no matter how I try I can't get Linux to connect to w2k. I have done and redone the settings about 10 times now and still nothing with the same result every time. If I shutdown the Tomcat on the w2k pc the apache instantly notifies me with an error but if Tomcat is running it just waits for infinite. -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org
RE: [tomcat4.1.12] How to manage my own default Servlet
I think the error message is quite clear: You have to provide a unique name to your servlet. E.G.: servlet-nameMyDefault/servlet-name -Original Message- From: François Vallet [mailto:fvallet;infovista.com] Sent: Thursday, October 31, 2002 3:58 PM To: '[EMAIL PROTECTED]' Subject: [tomcat4.1.12] How to manage my own default Servlet servlet servlet-nameDefault/servlet-name servlet-classutil.MyDefaultServlet/servlet-class /servlet java.lang.IllegalArgumentException: addChild: Child name 'default' is not unique -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org
Re: Alias vs VirtualHost - Thanks, Charles.
Cox, Charlie wrote: depends on your goal. If both hostnames are doing the same things in all cases you should use Alias to prevent multiple copies of everything from running. If you have different contexts, logfiles, etc for each then you should use multiple host elements. Charlie -Original Message- From: [EMAIL PROTECTED] [mailto:achana;saysit.com] Sent: Friday, March 12, 2004 9:33 PM To: [EMAIL PROTECTED] Subject: Alias vs VirtualHost - which is better for me ? Hi all. Both options work for me. Which is the better solution in terms of performance ? -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org
Restart Tomcat automatically
Hi. I am a relatively new Tomcat user and I am trying to find any information on creating a service or script that will ping Tomcat and restart if it is down. Have you ever come across any documentation dealing with such a scenario? Any information would be appreciated. Thank you. David
mod_jk2 tomcat problems
Hello, I have to use Tomcat 4.1.x and apache 2 1) I attempt to use Tomcat 4.1.10 and mod_jk2 (compile by myself with jakarta-tomcat-connectors-4.1.10-src with help of http://www.pubbitch.org/jboss/mod_jk2.html) For tomcat, I place libjkjni.so in $CATALINA_HOME/lib and put this few lines in jk2.properties # list of needed handlers. handler.list=apr,channelUnix,request # Location of the socket. channelUnix.file=${jkHome}/work/jk2.socket # Dynamic library serverRoot=/usr/local/apache-2.0.43/ apr.NativeSo=${jkHome}/lib/libjkjni.so communication between apache tomcat works throw the socket file, but i show this line in catalina.out : [jk_config_file.c (261)] config.update(): Can't find config file ${serverRoot}/conf/workers2.properties but /usr/local/apache-2.0.43/conf/workers2.properties exists ... 2) I attempt to use Tomcat 4.1.10 and mod_jk2 (release version 2.0.1 in http://jakarta.apache.org/builds/jakarta-tomcat-connectors/jk2/release/v2.0.1) now apr.NativeSo=${jkHome}/lib/jkjni-2.0.so and now i have this in my catalina.out : APR not loaded, disabling jni components: java.io.IOException: /usr/local/jakarta-tomcat-4.1.10-LE-jdk14/lib/jkjni-2.0.so: libapr.so.0: cannot open shared object file: No such file or directory in my apache dir i have a not dynamic library libapr.a 3) I attempt to use Tomcat 4.1.12 and mod_jk2 (with the two version describe above) with the same config , i have now this in my catalina.out : SEVERE: Can't create apr java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory at org.apache.jk.apr.AprImpl.clinit(AprImpl.java:340) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:140) classpath pb ?? Thanks for help !
RE: Tomcat Hangs and cannot be shut down
Thanks Yoav, I don't think it's a problem with the code in my application because the pages work fine and the code in the pages gets executed without problems before hand. From time to time, when I press on a link to access a page the browser starts thinking...thinking...it never really breaks for a while either. pThen a little while later, after letting everything sit untouched for a while I shutdown the sever and Tomcat goes down clean without exceptions and starts up ok. Then after that, back to way it was before. pThanks, Lior - Do you Yahoo!? HotJobs - Search new jobs daily now
WARNING: Exception getting SSL attributes
I was wondering whether anyone else has seen this or knows what it means. I am using HTTPS and the connections are made fine to the tomcat4.1.12 server (jakarta-tomcat-4.1.12-LE-jdk14). However, on each connection the following warning is given in the logs: WARNING: Exception getting SSL attributes javax.net.ssl.SSLPeerUnverifiedException: peer not authenticated at com.sun.net.ssl.internal.ssl.SSLSessionImpl.getPeerCertificateChain(DashoA6275) at org.apache.tomcat.util.net.JSSESupport.getPeerCertificateChain(JSSESupport.java:118) at org.apache.coyote.http11.Http11Processor.action(Http11Processor.java:543) at org.apache.coyote.Response.action(Response.java:216) at org.apache.coyote.tomcat4.CoyoteAdapter.postParseRequest(CoyoteAdapter.java:314) at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:221) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:405) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:380) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:508) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:533) at java.lang.Thread.run(Thread.java:536) What does this mean? Where have I gone wrong? TIA! _ Surf the Web without missing calls! Get MSN Broadband. http://resourcecenter.msn.com/access/plans/freeactivation.asp -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org
Re: keeping user logged in using j_security_check
Ralph, One more. Is there way to run the filter prior to j_security? or are you suggesting to completely get rid of j_security and implement the security using filters? Thanks, Guru - Original Message - From: Ralph Einfeldt [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Thursday, October 31, 2002 9:52 AM Subject: RE: keeping user logged in using j_security_check There is no cookie, the browser deletes the session cookie when the browser is closed. So tomcat has no chance to assign the session to this request. The only portable solution I see would be something like that: - define an own cookie that survives the closing of the browser. (have a lookt at API Doc of javax.servlet.http.Cookie to see how to achieve that) - store the session id in the cookie - define a filter that does the following: - check each incoming request for the session id - if the request doesn't contain a session id (from cookie and url), but your cookie, redirect to an url that contains the original session id from the cookie. -Original Message- From: Guru Mandavia [mailto:gmandavia;smartbrief.com] Sent: Thursday, October 31, 2002 3:21 PM To: Tomcat Users List Subject: Re: keeping user logged in using j_security_check Thanks Ralph. But can't I force j_security to read an existing cookie? how do i map the sessionid back to the user in case he closed his browser? -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org
RE: keeping user logged in using j_security_check
Not shure about that, haven't used it. We have our own form based login that bypasses the servlet container completly. (As we still use servlet container that doesnt supplie one) If nobody else replies you have to try wether you can use a filter befor j_security_check. -Original Message- From: Guru Mandavia [mailto:gmandavia;smartbrief.com] Sent: Thursday, October 31, 2002 4:41 PM To: Tomcat Users List Subject: Re: keeping user logged in using j_security_check Ralph, One more. Is there way to run the filter prior to j_security? or are you suggesting to completely get rid of j_security and implement the security using filters? -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org
RE: Compatibility between Windows and Linux tomcat ( mod_jk ajp13 )
I can connect to the w2k machine easily with samba. I have included the config files below and attached for w2k. If you require any more information please just ask. Config files: access_log on linux/apache 192.168.1.115 - - [31/Oct/2002:16:59:53 -0200] GET /webcomm1.5 HTTP/1.1 404 291 - Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0) tomcat logs on w2k unfortunately there is no change in either servlet jk.log or jasper ( no new servlet or jasper has been created with today date either ) The config files of the w2k/tomcat pc is attached. The config files for the apache/Linux pc. Start of the httpd.conf --- ServerType standalone ServerRoot /etc/httpd LockFile /var/run/httpd.lock PidFile /var/run/httpd.pid ScoreBoardFile logs/apache_runtime_status Timeout 300 KeepAlive Off MaxKeepAliveRequests 100 KeepAliveTimeout 15 MinSpareServers 5 MaxSpareServers 20 StartServers 8 MaxClients 150 MaxRequestsPerChild 1000 LoadModule vhost_alias_module modules/mod_vhost_alias.so IfDefine HAVE_BANDWIDTH LoadModule bandwidth_module modules/mod_bandwidth.so /IfDefine IfDefine HAVE_THROTTLE LoadModule throttle_modulemodules/mod_throttle.so /IfDefine LoadModule env_module modules/mod_env.so LoadModule config_log_module modules/mod_log_config.so LoadModule agent_log_module modules/mod_log_agent.so LoadModule referer_log_module modules/mod_log_referer.so LoadModule mime_modulemodules/mod_mime.so LoadModule negotiation_module modules/mod_negotiation.so LoadModule status_module modules/mod_status.so LoadModule info_modulemodules/mod_info.so LoadModule includes_modulemodules/mod_include.so LoadModule autoindex_module modules/mod_autoindex.so LoadModule dir_module modules/mod_dir.so LoadModule cgi_module modules/mod_cgi.so LoadModule asis_modulemodules/mod_asis.so LoadModule imap_modulemodules/mod_imap.so LoadModule action_module modules/mod_actions.so LoadModule userdir_module modules/mod_userdir.so LoadModule alias_module modules/mod_alias.so LoadModule jk_module modules/mod_jk.so LoadModule rewrite_module modules/mod_rewrite.so LoadModule access_module modules/mod_access.so LoadModule auth_modulemodules/mod_auth.so LoadModule anon_auth_module modules/mod_auth_anon.so LoadModule db_auth_module modules/mod_auth_db.so LoadModule expires_module modules/mod_expires.so LoadModule headers_module modules/mod_headers.so LoadModule setenvif_modulemodules/mod_setenvif.so IfDefine HAVE_PERL LoadModule perl_modulemodules/libperl.so /IfDefine IfDefine HAVE_PHP LoadModule php_module modules/mod_php.so /IfDefine IfDefine HAVE_PHP3 LoadModule php3_modulemodules/libphp3.so /IfDefine IfDefine HAVE_PHP4 LoadModule php4_modulemodules/libphp4.so /IfDefine IfDefine HAVE_DAV LoadModule dav_module modules/libdav.so /IfDefine IfDefine HAVE_ROAMING LoadModule roaming_module modules/mod_roaming.so /IfDefine IfDefine HAVE_SSL LoadModule ssl_module modules/libssl.so /IfDefine IfDefine HAVE_PUT LoadModule put_module modules/mod_put.so /IfDefine IfDefine HAVE_PYTHON LoadModule python_module modules/mod_python.so /IfDefine ClearModuleList AddModule mod_vhost_alias.c IfDefine HAVE_BANDWIDTH AddModule mod_bandwidth.c /IfDefine IfDefine HAVE_THROTTLE AddModule mod_throttle.c /IfDefine AddModule mod_env.c AddModule mod_log_config.c AddModule mod_log_agent.c AddModule mod_log_referer.c AddModule mod_mime.c AddModule mod_negotiation.c AddModule mod_status.c AddModule mod_info.c AddModule mod_include.c AddModule mod_autoindex.c AddModule mod_dir.c AddModule mod_cgi.c AddModule mod_asis.c AddModule mod_imap.c AddModule mod_actions.c AddModule mod_userdir.c AddModule mod_alias.c AddModule mod_jk.c AddModule mod_rewrite.c AddModule mod_access.c AddModule mod_auth.c AddModule mod_auth_anon.c AddModule mod_auth_db.c AddModule mod_expires.c AddModule mod_headers.c AddModule mod_so.c AddModule mod_setenvif.c IfDefine HAVE_PERL AddModule mod_perl.c /IfDefine IfDefine HAVE_PHP AddModule mod_php.c /IfDefine IfDefine HAVE_PHP3 AddModule mod_php3.c /IfDefine IfDefine HAVE_PHP4 AddModule mod_php4.c /IfDefine IfDefine HAVE_DAV AddModule mod_dav.c /IfDefine IfDefine HAVE_ROAMING AddModule mod_roaming.c /IfDefine IfDefine HAVE_SSL AddModule mod_ssl.c /IfDefine IfDefine HAVE_PUT AddModule mod_put.c /IfDefine IfDefine HAVE_PYTHON AddModule mod_python.c /IfDefine Port 80 IfDefine HAVE_SSL Listen 80 Listen 443 /IfDefine User apache Group apache ServerAdmin root@localhost DocumentRoot /var/www/html Directory / Options FollowSymLinks AllowOverride None /Directory Directory /var/www/html Options Indexes FollowSymLinks AllowOverride None Order allow,deny Allow from all /Directory IfModule mod_userdir.c UserDir public_html /IfModule IfModule mod_dir.c
RE: Compatibility between Windows and Linux tomcat ( mod_jk ajp13 )
I am trying to: browser - apache - tomcat use browser to view Apache which calls page from Tomcat yes yes yes access.log is included in a mail I just sent. Thanks for the reply. -Original Message- From: Ralph Einfeldt [mailto:ralph.einfeldt;uptime-isc.de] Sent: 31 October 2002 05:02 To: Tomcat Users List Subject: RE: Compatibility between Windows and Linux tomcat ( mod_jk ajp13 ) To me it's not clear what you are doing at all. On which level do you try to connect from linux to win2k ? - browser - apache - apache - tomcat - can you ping the ip of the win2k server from linux ? - can you ping the name of the win2k server from linux ? - can you telnet to the name and port on the win2k server from linux ? Depending on the answer to the first question, the port varies. Either it's the apache port or the connector port for tomcat. If all answers are yes: - can you see the request in the access log ? -Original Message- From: Bertus Keyser [mailto:bertus.keyser;impress.co.za] Sent: Thursday, October 31, 2002 3:48 PM To: Tomcat Users List Subject: RE: Compatibility between Windows and Linux tomcat ( mod_jk ajp13 ) why can w2k connect to w2k but no matter how I try I can't get Linux to connect to w2k. I have done and redone the settings about 10 times now and still nothing with the same result every time. If I shutdown the Tomcat on the w2k pc the apache instantly notifies me with an error but if Tomcat is running it just waits for infinite. -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org
RE: Tomcat on Thru64 Unix (OSF1)
What JDK are you using? The LE version requires 1.4 or 1.3+xerces.jar. -Original Message- From: [EMAIL PROTECTED] [mailto:sene;cptec.inpe.br] Sent: 30 October, 2002 10:51 AM To: [EMAIL PROTECTED] Subject: Tomcat on Thru64 Unix (OSF1) Hi, I'm having some troubles while running Tomcat 4.1.12-LE under Digital Unix (OSF1). The server are running ok, but the /examples dir with the servlets are returning the error : HTTP Status 404 - /examples/servlets/ type Status report message /examples/servlets/ description The requested resource (/examples/servlets/) is not available. I'm working with the default config files. Under linux, I have no problems. Thank you. -- _ \_ \ Denys Sene dos Santos - [EMAIL PROTECTED] o/\_ http://www1.cptec.inpe.br/~sene/ - ICQ #31845401 \__,\ Meteorological Products Group - Phone: +55 12 560-8458 . | Center for Weather Forecasts and Climate Studies - CPTEC ` .-| National Institute for Space Research - MCT/INPE . \ A happy Linux User #71117 . \ .-| -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org
RE: Compatibility between Windows and Linux tomcat ( mod_jk ajp13 )
A suggestion: Take out everything to do with ajp12 from workers.properties. Delete the load-balance line. All you need are: worker.list=ajp13 worker.ajp13.port=8009 worker.ajp13.host=192.168.1.90 worker.ajp13.type=ajp13 John -Original Message- From: Bertus Keyser [mailto:bertus.keyser;impress.co.za] Sent: Thursday, October 31, 2002 10:58 AM To: Tomcat Users List Subject: RE: Compatibility between Windows and Linux tomcat ( mod_jk ajp13 ) I can connect to the w2k machine easily with samba. I have included the config files below and attached for w2k. If you require any more information please just ask. Config files: access_log on linux/apache 192.168.1.115 - - [31/Oct/2002:16:59:53 -0200] GET /webcomm1.5 HTTP/1.1 404 291 - Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0) tomcat logs on w2k unfortunately there is no change in either servlet jk.log or jasper ( no new servlet or jasper has been created with today date either ) The config files of the w2k/tomcat pc is attached. -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org
RE: Compatibility between Windows and Linux tomcat ( mod_jk ajp13 )
First of all Please post ONLY the relevant part of your httpd.conf, we don't need to know all your LoadModules lines Second, Your are using ajp12, and that isn't included in your worker.list, and even if it were, it probably would using 8007 (ajp12) unless you change your worker.properties Aryeh worker.list=ajp13 ^^^ worker.ajp12.port=8007 ^ worker.ajp12.host=localhost worker.ajp12.type=ajp12 JkMount /examples/servlet/* ajp12 JkMount /examples/*.jsp ajp12 --- Aryeh Katz VASCO www.vasco.com -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org
RE: Compatibility between Windows and Linux tomcat ( mod_jk ajp13 )
Good catch. John -Original Message- From: Aryeh Katz [mailto:aryeh;vasco.com] Sent: Thursday, October 31, 2002 11:09 AM To: Tomcat Users List Subject: RE: Compatibility between Windows and Linux tomcat ( mod_jk ajp13 ) First of all Please post ONLY the relevant part of your httpd.conf, we don't need to know all your LoadModules lines Second, Your are using ajp12, and that isn't included in your worker.list, and even if it were, it probably would using 8007 (ajp12) unless you change your worker.properties Aryeh worker.list=ajp13 ^^^ worker.ajp12.port=8007 ^ worker.ajp12.host=localhost worker.ajp12.type=ajp12 JkMount /examples/servlet/* ajp12 JkMount /examples/*.jsp ajp12 --- Aryeh Katz VASCO www.vasco.com -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org
RE: keeping user logged in using j_security_check
I don't think so. The whole point of the j_security is to protect resources and the filter is a resource(it can abort the request mapping chain and return a response itself). A valve may let you do it. I haven't worked with valves. Charlie -Original Message- From: Guru Mandavia [mailto:gmandavia;smartbrief.com] Sent: Thursday, October 31, 2002 10:41 AM To: Tomcat Users List Subject: Re: keeping user logged in using j_security_check Ralph, One more. Is there way to run the filter prior to j_security? or are you suggesting to completely get rid of j_security and implement the security using filters? Thanks, Guru - Original Message - From: Ralph Einfeldt [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Thursday, October 31, 2002 9:52 AM Subject: RE: keeping user logged in using j_security_check There is no cookie, the browser deletes the session cookie when the browser is closed. So tomcat has no chance to assign the session to this request. The only portable solution I see would be something like that: - define an own cookie that survives the closing of the browser. (have a lookt at API Doc of javax.servlet.http.Cookie to see how to achieve that) - store the session id in the cookie - define a filter that does the following: - check each incoming request for the session id - if the request doesn't contain a session id (from cookie and url), but your cookie, redirect to an url that contains the original session id from the cookie. -Original Message- From: Guru Mandavia [mailto:gmandavia;smartbrief.com] Sent: Thursday, October 31, 2002 3:21 PM To: Tomcat Users List Subject: Re: keeping user logged in using j_security_check Thanks Ralph. But can't I force j_security to read an existing cookie? how do i map the sessionid back to the user in case he closed his browser? -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org
Form auth
I would like to use formbased auth for my application, but it seams, that it is based on 1. user trying to access som resource 2. if not logged in - prompt This is of cause good. But usualy you have a webpage that has a login-form somewhere on the page to allow the user to log in at will. Log in -before- a secured page is requested. How can I implement this? I find only methods to getRemoteUser and isInRole and... no setRemoteUser or the like... Am I making sense :-) Jan
RE: Compatibility between Windows and Linux tomcat ( mod_jk ajp13 )
Just did that plus a restart of Apache but still the same result. -Original Message- From: Turner, John [mailto:JTurner;AAS.com] Sent: 31 October 2002 06:05 To: 'Tomcat Users List' Subject: RE: Compatibility between Windows and Linux tomcat ( mod_jk ajp13 ) A suggestion: Take out everything to do with ajp12 from workers.properties. Delete the load-balance line. All you need are: worker.list=ajp13 worker.ajp13.port=8009 worker.ajp13.host=192.168.1.90 worker.ajp13.type=ajp13 John -Original Message- From: Bertus Keyser [mailto:bertus.keyser;impress.co.za] Sent: Thursday, October 31, 2002 10:58 AM To: Tomcat Users List Subject: RE: Compatibility between Windows and Linux tomcat ( mod_jk ajp13 ) I can connect to the w2k machine easily with samba. I have included the config files below and attached for w2k. If you require any more information please just ask. Config files: access_log on linux/apache 192.168.1.115 - - [31/Oct/2002:16:59:53 -0200] GET /webcomm1.5 HTTP/1.1 404 291 - Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0) tomcat logs on w2k unfortunately there is no change in either servlet jk.log or jasper ( no new servlet or jasper has been created with today date either ) The config files of the w2k/tomcat pc is attached. -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org
RE: Compatibility between Windows and Linux tomcat ( mod_jk ajp13 )
Did you delete ajp12 from your JkMount lines and sub in ajp13? John -Original Message- From: Bertus Keyser [mailto:bertus.keyser;impress.co.za] Sent: Thursday, October 31, 2002 11:18 AM To: Tomcat Users List Subject: RE: Compatibility between Windows and Linux tomcat ( mod_jk ajp13 ) Just did that plus a restart of Apache but still the same result. -Original Message- From: Turner, John [mailto:JTurner;AAS.com] Sent: 31 October 2002 06:05 To: 'Tomcat Users List' Subject: RE: Compatibility between Windows and Linux tomcat ( mod_jk ajp13 ) A suggestion: Take out everything to do with ajp12 from workers.properties. Delete the load-balance line. All you need are: worker.list=ajp13 worker.ajp13.port=8009 worker.ajp13.host=192.168.1.90 worker.ajp13.type=ajp13 John -Original Message- From: Bertus Keyser [mailto:bertus.keyser;impress.co.za] Sent: Thursday, October 31, 2002 10:58 AM To: Tomcat Users List Subject: RE: Compatibility between Windows and Linux tomcat ( mod_jk ajp13 ) I can connect to the w2k machine easily with samba. I have included the config files below and attached for w2k. If you require any more information please just ask. Config files: access_log on linux/apache 192.168.1.115 - - [31/Oct/2002:16:59:53 -0200] GET /webcomm1.5 HTTP/1.1 404 291 - Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0) tomcat logs on w2k unfortunately there is no change in either servlet jk.log or jasper ( no new servlet or jasper has been created with today date either ) The config files of the w2k/tomcat pc is attached. -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org
RE: Compatibility between Windows and Linux tomcat ( mod_jk ajp13 )
Sorry. will remember next time. I have uncommented ajp12 and it hasn't changed anything. Thanks for the help -Original Message- From: Aryeh Katz [mailto:aryeh;vasco.com] Sent: 31 October 2002 06:09 To: Tomcat Users List Subject: RE: Compatibility between Windows and Linux tomcat ( mod_jk ajp13 ) First of all Please post ONLY the relevant part of your httpd.conf, we don't need to know all your LoadModules lines Second, Your are using ajp12, and that isn't included in your worker.list, and even if it were, it probably would using 8007 (ajp12) unless you change your worker.properties Aryeh worker.list=ajp13 ^^^ worker.ajp12.port=8007 ^ worker.ajp12.host=localhost worker.ajp12.type=ajp12 JkMount /examples/servlet/* ajp12 JkMount /examples/*.jsp ajp12 --- Aryeh Katz VASCO www.vasco.com -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org
RE: Compatibility between Windows and Linux tomcat ( mod_jk ajp13 )
I just commented the ajp12 statements out and kept the ajp13 mounts. -Original Message- From: Turner, John [mailto:JTurner;AAS.com] Sent: 31 October 2002 06:19 To: 'Tomcat Users List' Subject: RE: Compatibility between Windows and Linux tomcat ( mod_jk ajp13 ) Did you delete ajp12 from your JkMount lines and sub in ajp13? John -Original Message- From: Bertus Keyser [mailto:bertus.keyser;impress.co.za] Sent: Thursday, October 31, 2002 11:18 AM To: Tomcat Users List Subject: RE: Compatibility between Windows and Linux tomcat ( mod_jk ajp13 ) Just did that plus a restart of Apache but still the same result. -Original Message- From: Turner, John [mailto:JTurner;AAS.com] Sent: 31 October 2002 06:05 To: 'Tomcat Users List' Subject: RE: Compatibility between Windows and Linux tomcat ( mod_jk ajp13 ) A suggestion: Take out everything to do with ajp12 from workers.properties. Delete the load-balance line. All you need are: worker.list=ajp13 worker.ajp13.port=8009 worker.ajp13.host=192.168.1.90 worker.ajp13.type=ajp13 John -Original Message- From: Bertus Keyser [mailto:bertus.keyser;impress.co.za] Sent: Thursday, October 31, 2002 10:58 AM To: Tomcat Users List Subject: RE: Compatibility between Windows and Linux tomcat ( mod_jk ajp13 ) I can connect to the w2k machine easily with samba. I have included the config files below and attached for w2k. If you require any more information please just ask. Config files: access_log on linux/apache 192.168.1.115 - - [31/Oct/2002:16:59:53 -0200] GET /webcomm1.5 HTTP/1.1 404 291 - Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0) tomcat logs on w2k unfortunately there is no change in either servlet jk.log or jasper ( no new servlet or jasper has been created with today date either ) The config files of the w2k/tomcat pc is attached. -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org
servlet and proxy
Hi URL Connections establish by my servlets must pass throw a proxy server (HTTP/HTTPS) a simple System.getProperties().put(proxySet,true ); System.getProperties().put(proxyHost,host); System.getProperties().put(proxyPort,port); in a servlet load-on-startup doesn't work. How can i do that ? thanks
RE: Compatibility between Windows and Linux tomcat ( mod_jk ajp13 )
Sorry. will remember next time. I have uncommented ajp12 and it hasn't changed anything. JkMount /examples/servlet/* ajp12 JkMount /examples/*.jsp ajp12 As John pointed out, (and I left in to show your config), you need to change the JkMount to use the ajp13 worker. e.g JkMount /examples/servlet/* ajp13 --- Aryeh Katz VASCO www.vasco.com -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org --- Aryeh Katz VASCO www.vasco.com -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org
Re: Form auth
You could just have a button with a link to whatever your initial secured resource is (it'll prompt them to log in when they follow the link), or there might be someway to put the authorization information (username/password) in the header by using a form on a page with the action attribute mapped to a servlet that puts the fields in their appropriate header place and then forwards to a secured resource. But I haven't ever used form based authentication. Maybe check your headers when you've been authenticated and it'll help? Sorry, not a very 'coherent' response. I think I'd just have a button w/ a link to a secured resource, and let the form-based authentication take place there Mike - Original Message - From: Jan Agermose [EMAIL PROTECTED] To: 'Tomcat Users tomcat [EMAIL PROTECTED] Sent: Thursday, October 31, 2002 11:15 AM Subject: Form auth I would like to use formbased auth for my application, but it seams, that it is based on 1. user trying to access som resource 2. if not logged in - prompt This is of cause good. But usualy you have a webpage that has a login-form somewhere on the page to allow the user to log in at will. Log in -before- a secured page is requested. How can I implement this? I find only methods to getRemoteUser and isInRole and... no setRemoteUser or the like... Am I making sense :-) Jan -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org
Re: need help connecting Tomcat 4.1.12, Apache 2.0.43 using jk2 (mod_jk2-2.0.43.dll)
Thanks Robert, That almost did the trick. With the path set up correctly then Tomcat seemed to init OK but still had errors in connecting. To finally get it to work I found that I needed to explicitly state channelSocket.port=8009 in the jk2.properties. For the classpath I defined it using the $(TOMCAT_HOME) variable to keep things as adaptive as possible and it worked fine. I must say that your document was invaluable in getting this to work -- it should be included in the official Tomcat docs (IMHO). Kind regards, Mike Robert L Sowders wrote: Don't know why but the classpath lines in the new workers2.properties file has changed. I tried the old method and it works again. Don't know why it pitched a fit. Perhaps it needs to be quoted or something. To fix it just replace both class path lines in the [VM] section of workers2.properties with the following. OPT=-Djava.class.path=c:/Tomcat/bin/tomcat-jni.jar;c:/Tomcat/server/lib/commons-logging.jar Sorry for the confusion. rls M. Hockings [EMAIL PROTECTED] 10/30/2002 07:59 PM Please respond to Tomcat Users List To: Tomcat Users List [EMAIL PROTECTED] cc: Subject:Re: need help connecting Tomcat 4.1.12, Apache 2.0.43 using jk2 ( mod_jk2-2.0.43.dll) Hi Newbie, In the workers2.properties it is ${TOMCAT_HOME}/bin/tomcat-jni.jar. I've tried hard-coding it with forward slashes but the result was the same. There is probably something very simple that I'm overlooking. Thanks, Mike Tomcat Newbie wrote: How about the slashes in your path? C:\ApacheGroup\Tomcat4.1/bin/tomcat-jni.jar ^^^ - Original Message - From: M. Hockings [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Wednesday, October 30, 2002 10:00 PM Subject: Re: need help connecting Tomcat 4.1.12, Apache 2.0.43 using jk2 ( mod_jk2-2.0.43.dll) Hello, I too am trying to get this configuration working to give me a test environment that duplicates a remote server. I have followed the instructions pointed to by John Turner very closely and only modified the line in workers2.properties that points to the jvm.dll. When I start Apache I see the following in logs\error.log. If you have any hints or suggestions about what I have set up incorrectly please let me know. Both Apache and Tomcat seem to work fine individually. Thanks, Mike -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org -- Note new email address - [EMAIL PROTECTED] - Mike's Page : http://www.hockings.net/~mike Rifle Shooting in Ontario : http://www.hockings.net/rso/ Scarborough Rifle Club: http://www.hockings.net/rso/src/ Canadian Shooting Sports : http://www.CdnShootingSports.org Ontario Rifle Association : http://www.OntarioRifleAssociation.org
RE: Compatibility between Windows and Linux tomcat ( mod_jk ajp13 )
for everything? I ask because I didn't have to do this for the Linux to Linux or w2k to w2k setups. Would I ever use JkMount /examples/servlet/* ajp13 ? -Original Message- From: Aryeh Katz [mailto:aryeh;vasco.com] Sent: 31 October 2002 06:43 To: Tomcat Users List Subject: RE: Compatibility between Windows and Linux tomcat ( mod_jk ajp13 ) Sorry. will remember next time. I have uncommented ajp12 and it hasn't changed anything. JkMount /examples/servlet/* ajp12 JkMount /examples/*.jsp ajp12 As John pointed out, (and I left in to show your config), you need to change the JkMount to use the ajp13 worker. e.g JkMount /examples/servlet/* ajp13 --- Aryeh Katz VASCO www.vasco.com -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org --- Aryeh Katz VASCO www.vasco.com -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org
RE: mod_jk2 tomcat problems
I get the exact same error on Solaris 8 SPARC with J2SE v1.4.1 (with patches loaded for Java): SEVERE: Can't create apr java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory at org.apache.jk.apr.AprImpl.clinit(AprImpl.java:340) After a couple of days trying to get the ChannelUnix socket stuff to work, I've given up. Sad, but no one seems to have insights...at first blush I thought it might be a CLASSPATH problem too, but classes in commons-logging.jar are used in other parts of the Jakarta-Tomcat Connector too, if I'm not mistaken. If you look in the $CATALINA_HOME/bin directory, I believe that catalina.sh constructs/overrides any CLASSPATH env var in favor of a classpath that includes tools.jar (from jdk) and bootstrap.jar (from $CATALINA_HOME/bin). I tried including $CATALINA_HOME/server/lib/commons-logging.jar in the CLASSPATH that gets used in catalina.sh, no change -- same error. Does anyone have a success story to share regarding this problem? Paul -- mailto:Paul.Brzezinski;EDS.com Enterprise Distributed Capabilities EDS Corporation 248-265-8283 : -Original Message- : From: Maxime [mailto:max_sts;hotmail.com] : Sent: Thursday, October 31, 2002 10:09 AM : To: Tomcat Users List : Subject: mod_jk2 tomcat problems : : : Hello, : : I have to use Tomcat 4.1.x and apache 2 : : 1) : I attempt to use Tomcat 4.1.10 and mod_jk2 : (compile by myself with jakarta-tomcat-connectors-4.1.10-src : with help of http://www.pubbitch.org/jboss/mod_jk2.html) : For tomcat, I place libjkjni.so in $CATALINA_HOME/lib : and put this few lines in jk2.properties : : # list of needed handlers. : handler.list=apr,channelUnix,request : # Location of the socket. channelUnix.file=${jkHome}/work/jk2.socket : # Dynamic library : serverRoot=/usr/local/apache-2.0.43/ : apr.NativeSo=${jkHome}/lib/libjkjni.so : : communication between apache tomcat works throw the socket : file, but i show this line in catalina.out : : [jk_config_file.c (261)] config.update(): Can't find config : file ${serverRoot}/conf/workers2.properties : but /usr/local/apache-2.0.43/conf/workers2.properties exists ... : : 2) : I attempt to use Tomcat 4.1.10 and mod_jk2 : (release version 2.0.1 in : http://jakarta.apache.org/builds/jakarta-tomcat-connectors/jk2 /release/v2.0.1) now apr.NativeSo=${jkHome}/lib/jkjni-2.0.so and now i have this in my catalina.out : APR not loaded, disabling jni components: java.io.IOException: /usr/local/jakarta-tomcat-4.1.10-LE-jdk14/lib/jkjni-2.0.so: libapr.so.0: cannot open shared object file: No such file or directory in my apache dir i have a not dynamic library libapr.a 3) I attempt to use Tomcat 4.1.12 and mod_jk2 (with the two version describe above) with the same config , i have now this in my catalina.out : SEVERE: Can't create apr java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory at org.apache.jk.apr.AprImpl.clinit(AprImpl.java:340) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:140) classpath pb ?? Thanks for help ! -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org
RE: [tomcat4.1.12] How to manage my own default Servlet
Ok thanks ... -Original Message- From: Ralph Einfeldt [mailto:ralph.einfeldt;uptime-isc.de] Sent: jeudi 31 octobre 2002 16:04 To: Tomcat Users List Subject: RE: [tomcat4.1.12] How to manage my own default Servlet I think the error message is quite clear: You have to provide a unique name to your servlet. E.G.: servlet-nameMyDefault/servlet-name -Original Message- From: François Vallet [mailto:fvallet;infovista.com] Sent: Thursday, October 31, 2002 3:58 PM To: '[EMAIL PROTECTED]' Subject: [tomcat4.1.12] How to manage my own default Servlet servlet servlet-nameDefault/servlet-name servlet-classutil.MyDefaultServlet/servlet-class /servlet java.lang.IllegalArgumentException: addChild: Child name 'default' is not unique -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org
RE: [tomcat4.1.12] How to manage my own default Servlet
Ok maybe the most important is the mapping url/ and not the servlet name ... I'have read into the Servlet 2.3 spec A string containing only the '/' character indicates the default servlet of the application. In this case the servlet path is the request URI minus the context path and the path info is null. -Original Message- From: François Vallet [mailto:fvallet;infovista.com] Sent: jeudi 31 octobre 2002 15:58 To: '[EMAIL PROTECTED]' Subject: [tomcat4.1.12] How to manage my own default Servlet Hello everybody I have my own default Servlet and I would like to use it only for my webapps instead of the org.apache.catalina.servlets.DefaultServletapache In order to override the default definition I have added my own tags into my web.xml Ex : servlet servlet-nameDefault/servlet-name servlet-classutil.MyDefaultServlet/servlet-class /servlet servlet-mapping servlet-nameDefault/servlet-name url-pattern//url-pattern /servlet-mapping But I have the following errors WebappClassLoader: Checking for javax/servlet/Servlet.class java.lang.reflect.InvocationTargetException: java.lang.IllegalArgumentException: addChild: Child name 'default' is not unique at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:8 15) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:807) at org.apache.catalina.core.StandardContext.addChild(StandardContext.java:1320) at java.lang.reflect.Method.invoke(Native Method) at org.apache.commons.beanutils.MethodUtils.invokeMethod(MethodUtils.java:228) at org.apache.commons.digester.SetNextRule.end(SetNextRule.java:260) at org.apache.commons.digester.Digester.endElement(Digester.java:1036) at org.apache.xerces.parsers.AbstractSAXParser.endElement(AbstractSAXParser.jav a:579) at org.apache.xerces.impl.XMLNamespaceBinder.endElement(XMLNamespaceBinder.j ava :646) at org.apache.xerces.impl.dtd.XMLDTDValidator.handleEndElement(XMLDTDValidator . java:1972) at org.apache.xerces.impl.dtd.XMLDTDValidator.endElement(XMLDTDValidator.java:8 78) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.handleEndElement(X MLDo cumentFragmentScannerImpl.java:1144) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEndElement(XML Docu mentFragmentScannerImpl.java:987) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDis patc her.dispatch(XMLDocumentFragmentScannerImpl.java:1445) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLD ocume ntFragmentScannerImpl.java:333) at org.apache.xerces.parsers.DTDConfiguration.parse(DTDConfiguration.java:524) at org.apache.xerces.parsers.DTDConfiguration.parse(DTDConfiguration.java:580) at org.apache.xerces.parsers.XMLParser.parse(XMLParser.java:152) at org.apache.xerces.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:116 9) at org.apache.commons.digester.Digester.parse(Digester.java:1495) at org.apache.catalina.startup.ContextConfig.applicationConfig(ContextConfig.ja va:282) at org.apache.catalina.startup.ContextConfig.start(ContextConfig.java:639) at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java: 243) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSuppor t.java:166) at org.apache.catalina.core.StandardContext.start(StandardContext.java:3493) 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.java:2189) at org.apache.catalina.startup.Catalina.start(Catalina.java:510) at org.apache.catalina.startup.Catalina.execute(Catalina.java:400) at org.apache.catalina.startup.Catalina.process(Catalina.java:180) at java.lang.reflect.Method.invoke(Native Method) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203) [ERROR] Digester - -End event threw exception java.lang.reflect.InvocationTargetException Thanks in advance François. -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org
RE: servlet and proxy
You can set these properties when tomcat starts up: export CATALINA_OPTS=-Dhttp.proxyHost=w -Dhttp.proxyPort=x -Dhttps.proxyHost=y -Dhttps.ProxyPort=z Then re-start tomcat. Regards, Andy -Original Message- From: Maxime [mailto:max_sts;hotmail.com] Sent: 31 October 2002 16:38 To: Tomcat Users List Subject: servlet and proxy Hi URL Connections establish by my servlets must pass throw a proxy server (HTTP/HTTPS) a simple System.getProperties().put(proxySet,true ); System.getProperties().put(proxyHost,host); System.getProperties().put(proxyPort,port); in a servlet load-on-startup doesn't work. How can i do that ? thanks -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org
Virtual host: Exception: Context is already in use
I have Tomcat (4.1.9) setup to use multiple virtual hosts. I have the setup working with the following type of directory structure: webserverroot/webapps_1/ company_1_app1/ company_1_app2/ webapps_2/ company_2_app1/ company_2_app2/ What I would like to do is to setup the directory structure as follows: webserverroot/webapps/ company_1_app1/ company_1_app2/ company_2_app1/ company_2_app2/ Each companys app1 is the default app with context . The problem with the second scenario is that when I startup Tomcat I receive Severe END exception caused by: Context is already in use. Tomcat should be able to discern that these two default contexts are referring to two completely different domains but it doesn't appear to be working that way. Is there anyway around this that would still allow me to have each companys app1 as the default for their domain? Here are the Host entries (with fictitious company names) for scenario 2: Host name=www.company_1.comdebug=0 appBase={webserverroot}\webapps unpackWARs=true autoDeploy=true Context path= docBase=company_1_app1 debug=9 reloadable=true crossContext=true ... /Context Context path=company_1_app2 docBase=company_1_app2 debug=9 reloadable=true crossContext=true ... /Context ... /Host Host name=www.company_2.comdebug=0 appBase={webserverroot}\webapps unpackWARs=true autoDeploy=true Context path= docBase=company_2_app1 debug=9 reloadable=true crossContext=true ... /Context Context path=company_2_app2 docBase=company_2_app2 debug=9 reloadable=true crossContext=true ... /Context ... /Host Any suggestions or comments would be appreciated. -G.Reno __ Do you Yahoo!? HotJobs - Search new jobs daily now http://hotjobs.yahoo.com/ -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org
RE: JDBC / ThreadLocal pattern.
Thank you for the comments, I really will take this into the consideration, while structuring the thing. I would like to make comments on the whole still so please see intermixed : -Original Message- From: Ralph Einfeldt [mailto:ralph.einfeldt;uptime-isc.de] Sent: 31. október 2002 08:58 To: Tomcat Users List Subject: RE: JDBC / ThreadLocal pattern. I don't like this approach for connections in a web server. Allright... But I would like to point out there are some problems with the usual approach. If the connection is available for more than one request depends on the way the container handles threads. If each request is a new Thread you will win nothing. Instead you will loose performace as each request would create a new connection to the database. Yes that is true, there for we've thought of a way to have the ThreadLocal get its connection from a pool. Even if the threads are recycled (If the servlet engine supports a ThreadPool and is configured to use it), you don't have control about which request gets which thread, so I don't see how you will use this to lazy load resultsets. In this case you also have no control when the threads are killed. (It's up to the servlet engine) Well, the connection will not close unless the thread dies. The resultset would use the same connection as it was originated with, but not another one in another thread. It's true the thread might die if it's been used to serve more than some (specific) amount of request, there for I don't know if connection will be alive on my next request ? Good point. If you don't need database access in every request (which is quite typical if you use tomcat standlone) the situation even gets worse. In the long term every thread in the pool will have a connection (Each time a request with database access that is assigned to a thread that has no connection a connection has to be created for that thread.) Yes, many connections, some databases don't mind, some do mind. Many drivers have problems with connections that are not explicitly closed so you would have to make shure that close() is called whenever a thread is killed. Hmm ok, I did not know that. It's also not a good idea to rely on the garbage collector to close connections as you don't have control when the gc is run. It's very likely that you keep much more connections open than you actually need, you might even run out of connections if you hit the database limit. Still you should be able to have a fixed limit, for example tomcat is set up default to have 75 threads, this means that if you have one connection per thread, it would be something like yes, 75 connections (which is probably way to much). With a connection pool you have a much better control about the amount of open connections. We've been using connection pools, and it's been very good, we're mainly looking for more efficient ways of dealing with JDBC connections etc. I thought this was a good idea when it was first presented to me, but then I've had all kinds of different ideas if its good or bad. Ok, thanx again for those comments. -reynir Ralph Einfeldt Uptime Internet Solution Center GmbH Hamburg, Germany Hosting, Content Management, Java Consulting http://www.uptime-isc.de -Original Message- From: Reynir Hübner [mailto:reynir;hugsmidjan.is] Sent: Wednesday, October 30, 2002 8:06 PM To: Tomcat Users List Subject: JDBC / ThreadLocal pattern. In (very) short: the idea here is to have one jdbc-connection for each thread, instead of a pool with connections. 1. I will never have to worrie about not returning connections anymore, as they will always be garbage collected as soon as the thread is dead. 2. The connection will be available for more than one request so I can lazy load resultsets. 3. This might make transaction-service implementation easyer 4. many other great things -- To unsubscribe, e-mail: mailto:tomcat-user- [EMAIL PROTECTED] For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org
RE: Compatibility between Windows and Linux tomcat ( mod_jk ajp13 )
for everything? I ask because I didn't have to do this for the Linux to Linux or w2k to w2k setups. shrug Your subject stated that you were using ajp13. We generally answer questions based on the information given. Would I ever use JkMount /examples/servlet/* ajp13 ? I assume you mean apj12? As long as ajp12 is working for you, there is no reason not to use it (even if ajp13 is recommended). However, you must make sure that you have the correct listener (port 8007) if you are going to use it. --- Aryeh Katz VASCO www.vasco.com -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org
RE: Using JAXB in a Servlet (class loader prob?)
We are using Tomcat 4.0.6 and JDK 1.4.0 with just use the vanilla install of tomcat, and we don't put the xerces.jar in the WEB-INF/lib either, and all this works fine. We use JDOM in the web app, its probably because the Crimson XML parser is include in 1.4.0, and it uses that? The vanilla install of TC 4.0.6 also puts xerces in common\lib, so it's maybe using that. PS we are using the FULL version of Tomcat not the 'Lite' version for JDK 1.4.0. Hope that helps PaulE -Original Message- From: Steve Slatcher [mailto:steve_slatcher;scientia.com] Sent: Thursday, October 31, 2002 2:13 AM To: Tomcat Users List Subject: Re: Using JAXB in a Servlet (class loader prob?) Thanks for that. If it is a Tomcat bug that has been addressed, I'll put the issue on the back burner for a while. Can you remember if you noticed the xerces issue I mentioned? Extance, Paul wrote: Upgrade to tomcat 4.0.4 - 4.0.6, then you can put the jaxb-rt.jar into the WEB-INF/lib directory. I think 4.0.3 has some class loader issues with packages that start with java and javax in the WEB- INF/lib folders This solved the problem for us. PaulE -Original Message- From: Nick Lombard (VSP) [mailto:nick.lombard;vcontractor.co.za] Sent: Wednesday, October 30, 2002 5:05 AM To: Tomcat Users List Subject: RE: Using JAXB in a Servlet (class loader prob?) Hi Steve My half a cent comment. Can anone shed more light on this? Specifically I would be interested in any ways to avoid using the /common/lib directory. We are successfully using shared jar files accross applications by placing them in the $TOMCAT_HOME/shared/lib directory. This will help to not use the common/lib directory. Hope it helps. Nick. -Original Message- From: Steve Slatcher [mailto:steve_slatcher;scientia.com] Sent: Wednesday, October 30, 2002 2:54 PM To: Tomcat Users List Subject: Using JAXB in a Servlet (class loader prob?) Hi all I have some code that uses JAXB that works fine in a standalone app with the jars I expect it to need. When I put the same code in a webapp I got a couple of problems initialising the Sevlet (see log file below). I managed to get rid of one problem (javax.xml.bind.JAXBContext) by putting a copy of jaxb-api.jar in /common/lib (before it was only in app/WEB-INF/lib). The second problem was solved by copying a xerces.jar into my app/WEB-INF/lib directory (as far as I can tell my standalone app did not need org.w3c.dom.ls.DocumentLS at all). Can anone shed more light on this? Specifically I would be interested in any ways to avoid using the /common/lib directory. I'm using Tomcat 4.0.3, JAXB 1.0 beta (currently the latest version), and the magic Xerces that came to the rescue was 1.4.4. Despite the name of my webapp I am NOT intent on spamming! Cheers Steve Slatcher 2002-10-30 11:33:14 WebappLoader[/spam]: Deploying class repositories to work directory C:\jakarta-tomcat-4.0.3\work\localhost\spam 2002-10-30 11:33:14 WebappLoader[/spam]: Deploy JAR /WEB-INF/lib/activation.jar to C:\jakarta-tomcat-4.0.3\bin\..\webapps\spam\WEB-INF\lib\activation.jar 2002-10-30 11:33:14 WebappLoader[/spam]: Deploy JAR /WEB- INF/lib/dom.jar to C:\jakarta-tomcat-4.0.3\bin\..\webapps\spam\WEB- INF\lib\dom.jar 2002-10-30 11:33:15 WebappLoader[/spam]: Deploy JAR /WEB-INF/lib/jax-qname.jar to C:\jakarta-tomcat-4.0.3\bin\..\webapps\spam\WEB-INF\lib\jax-qname.jar 2002-10-30 11:33:15 WebappLoader[/spam]: Deploy JAR /WEB-INF/lib/jaxb-api.jar to C:\jakarta-tomcat-4.0.3\bin\..\webapps\spam\WEB-INF\lib\jaxb-api.jar 2002-10-30 11:33:15 WebappLoader[/spam]: Deploy JAR /WEB-INF/lib/jaxb-libs.jar to C:\jakarta-tomcat-4.0.3\bin\..\webapps\spam\WEB-INF\lib\jaxb-libs.jar 2002-10-30 11:33:15 WebappLoader[/spam]: Deploy JAR /WEB-INF/lib/jaxb-ri.jar to C:\jakarta-tomcat-4.0.3\bin\..\webapps\spam\WEB-INF\lib\jaxb-ri.jar 2002-10-30 11:33:15 WebappLoader[/spam]: Deploy JAR /WEB-INF/lib/jaxb-xjc.jar to C:\jakarta-tomcat-4.0.3\bin\..\webapps\spam\WEB-INF\lib\jaxb-xjc.jar 2002-10-30 11:33:15 WebappLoader[/spam]: Deploy JAR /WEB-INF/lib/jaxp-api.jar to C:\jakarta-tomcat-4.0.3\bin\..\webapps\spam\WEB-INF\lib\jaxp-api.jar 2002-10-30 11:33:15 WebappLoader[/spam]: Deploy JAR /WEB-INF/lib/log4j-1.2.6.jar to C:\jakarta-tomcat-4.0.3\bin\..\webapps\spam\WEB-INF\lib\log4j- 1.2.6.jar 2002-10-30 11:33:15 WebappLoader[/spam]: Deploy JAR /WEB- INF/lib/mail.jar to C:\jakarta-tomcat-4.0.3\bin\..\webapps\spam\WEB- INF\lib\mail.jar 2002-10-30 11:33:15 WebappLoader[/spam]: Deploy JAR /WEB-INF/lib/sax.jar to C:\jakarta-tomcat- 4.0.3\bin\..\webapps\spam\WEB-INF\lib\sax.jar 2002-10-30 11:33:15 WebappLoader[/spam]: Deploy JAR /WEB-INF/lib/xercesImpl.jar to C:\jakarta-tomcat-4.0.3\bin\..\webapps\spam\WEB-INF\lib\xercesImpl.jar 2002-10-30 11:33:15 WebappLoader[/spam]: Reloading checks are enabled for this Context 2002-10-30 11:33:15 StandardManager[/spam]: Seeding random number generator class
The requested resource (/BookSource/DispatchServlet) is not available.
Hi, I am writing my first JSP, servlets application using Tomcat 4.1 server. I have a Win 98 machine. I created a directory called BookSource under ROOT under webapps. This is my directory structure. C:\jakarta-tomcat\webapps\ROOT\BookSource I have web-inf and login.jsp under this directory. Under web-inf I have classes sub-directory and web.xml. I have DispatchServlet.class(under package/directory BookStore) under the classes sub-directory. My web.xml is ?xml version=1.0 encoding=ISO-8859-1 ? !DOCTYPE web-app (View Source for full doctype...) web-app servlet servlet-nameDispatchServlet/servlet-name descriptionThis servlet plays the controller role in the MVC architecture used in this application. It is generally mapped to the .do filename extension with a servlet-mapping element, and all form submits in the app will be submitted to a request URI like saveCustomer.do, which will therefore be mapped to this servlet. The initialization parameter namess for this servlet are the servlet path that will be received by this servlet (after the filename extension is removed). The corresponding value is the name of the action class that will be used to process this request./description servlet-classBookStore.DispatchServlet/servlet-class !-- Load this servlet at server startup time -- load-on-startup5/load-on-startup /servlet session-config session-timeout30/session-timeout !-- 30 minutes -- /session-config /web-app and my login.jsp is HTML HEAD TITLEBook Store Login Page/TITLE /HEAD BODY FORM method='POST' onsubmit=jsp:forward page='DispatchServlet'/ INPUT TYPE=submit VALUE=Login /FORM /BODY /HTML I am getting the error when I try to load the page http://localhost:8080/BookSource/login.jsp HTTP Status 404 - /BookSource/DispatchServlet type Status report message /BookSource/DispatchServlet description The requested resource (/BookSource/DispatchServlet) is not available. Apache Tomcat/4.1.12-LE-jdk14 Could someone help me fix this problem. thanks in advance. __ Do you Yahoo!? HotJobs - Search new jobs daily now http://hotjobs.yahoo.com/ -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org
Re: servlet and proxy
Thanks, works great . but do you know another method for only one web application an not all tomcat context ? thks Max - Original Message - From: Bodycombe, Andrew [EMAIL PROTECTED] To: 'Tomcat Users List' [EMAIL PROTECTED] Sent: Thursday, October 31, 2002 11:54 AM Subject: RE: servlet and proxy You can set these properties when tomcat starts up: export CATALINA_OPTS=-Dhttp.proxyHost=w -Dhttp.proxyPort=x -Dhttps.proxyHost=y -Dhttps.ProxyPort=z Then re-start tomcat. Regards, Andy -Original Message- From: Maxime [mailto:max_sts;hotmail.com] Sent: 31 October 2002 16:38 To: Tomcat Users List Subject: servlet and proxy Hi URL Connections establish by my servlets must pass throw a proxy server (HTTP/HTTPS) a simple System.getProperties().put(proxySet,true ); System.getProperties().put(proxyHost,host); System.getProperties().put(proxyPort,port); in a servlet load-on-startup doesn't work. How can i do that ? thanks -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org
RE: Tomcat SSL w/ Apache
On Thu, 31 Oct 2002, Turner, John wrote: If you are using Tomcat + Apache, the activity between Tomcat and Apache on the connector is not secure. It is not encrypted. SSL Request - Apache - Decrypted by Apache - Sent to Connector - Sent to Tomcat on Connector port - reply back to Apache - Response encrypted by Apache - SSL Response to Client As far as Tomcat is concerned, the request isn't secure...all Tomcat sees is a typical request on a connector port. Perhaps there is some code in isSecure() that can differentiate, but I would be surprised if there was. Surprise! The isSecure() check (as well as getScheme()) refers to the original request. So, all of what you say otherwise is correct, but isSecure() (and getScheme()) should reflect what was true of the original request, whether it came to Apache or Tomcat. I verified this using SnoopServlet in the Tomcat distrib examples context. On a machine I have, I have that available to both my http and https web server hosts/instances. Then I tried the URLs: http://www.machinename.com//examples/snoop https://www.machinename.com//examples/snoop (snoop is mapped to SnoopServlet in the examples context web.xml file.) For the first URL, Scheme (which shows the value of getScheme()) was http, and Request Is Secure (which shows the value of isSecure()) was false. For the second, the values were https and true, respectively. Now, one caveat I'll add is that this is with 4.0.4. I imagine it's possible that this behavior changed between versions. But it would seem an odd change, because it's a major change to a basic behavior (and one that I think goes against the spec). Further, some tomcat-dev people post to this list, so I would've thought they'd have commented if this were the case. I didn't respond directly to Randy's note because I didn't have any idea what might be causing the problem. It's possible that there is some configuration that needs to be set to get this behavior. But from a quick glance at my configuration, I didn't see what that might be. Oh, I just did a search of the archives (at marc.theaimsgroup.com), and looks like someone brought up this same issue quite recently (and I think I was combining/confusing the two threads). There was only one followup to the initial response there (the subject was Possible bug with isSecure()/getScheme() methods in tomcat 4.), which said: IIRC there is a bug in the coyote connector in TC 4.1.10. You have to use the org.apache.ajp.tomcat4.Ajp13Connector connector and set an attribute tomcatAuthentication=false to achieve the result you desire. In fact, I am using the Ajp13Connector, and I do have tomcatAuthentication set to false (that's to allow the authentication to be done by Apache, but maybe there's some interaction there). So there are a couple of things to try to see if it has any effect. -Original Message- From: Randy Secrist [mailto:tomcat;secristfamily.com] Sent: Wednesday, October 30, 2002 5:24 PM To: Tomcat Users List Subject: Re: Tomcat SSL w/ Apache I played around with the config for a few hours today - didn't get any results. Having read that about name based hosting before, I switched to IP based vhosting... - after poping in a few network cards... What happens now is the same as before... 1) I switch to HTTPS - and I get the standard warning about self signed certificates... 2) I accept it... 3) Tomcat get's and compiles the request...showing isSecure is false...when it should be true 4) And apache feeds me the page via https, and the browser, and the browser reports secure transmission. 5) I check Apache's logs... (No errors in SSL via apache side..) Tomcat's logs were garbled until I cleaned up my virtual host files - but now they appear to be fine... - no errors. Somewhere in there, Tomcat is getting the request - because it compiles the JSP directives, and returns false when calling %=request.isSecure()% However as noted above - this happens when using https! If I do the same thing on my linux box - it works just fine - (albeit I didn't compile apache myself on that thing... - but that shouldn't matter - because SSL does work - just NOT with Tomcat...) Here is the relevant part of my httpd.conf... - note - NameVirtualHost * is commented out prior to this... - does _default_:443 - mean it is still trying to use a default named Vhost, or a default IP? IfModule mod_ssl.c VirtualHost _default_:443 DocumentRoot c:/web/Tomcat-4-1/webapps/ROOT ErrorLog logs/ssl-error_log TransferLog logs/ssl-access_log SSLEngine on SSLCipherSuite ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL SSLCertificateFile conf/ssl/myDomain.cert SSLCertificateKeyFile conf/ssl/myDomain.key SetEnvIf User-Agent .*MSIE.* nokeepalive ssl-unclean-shutdown CustomLog logs/ssl_request_log \ %t %h
Re: mod_jk2 tomcat problems DOC ??
Hi Do you know where can i find the most complet documentation on mod_jk2 (compilation, installation configuration ...) In another thread somebody write about John Turner's excellent web page ? where can i find it ? Thks - Original Message - From: Maxime [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Thursday, October 31, 2002 10:09 AM Subject: mod_jk2 tomcat problems Hello, I have to use Tomcat 4.1.x and apache 2 1) I attempt to use Tomcat 4.1.10 and mod_jk2 (compile by myself with jakarta-tomcat-connectors-4.1.10-src with help of http://www.pubbitch.org/jboss/mod_jk2.html) For tomcat, I place libjkjni.so in $CATALINA_HOME/lib and put this few lines in jk2.properties # list of needed handlers. handler.list=apr,channelUnix,request # Location of the socket. channelUnix.file=${jkHome}/work/jk2.socket # Dynamic library serverRoot=/usr/local/apache-2.0.43/ apr.NativeSo=${jkHome}/lib/libjkjni.so communication between apache tomcat works throw the socket file, but i show this line in catalina.out : [jk_config_file.c (261)] config.update(): Can't find config file ${serverRoot}/conf/workers2.properties but /usr/local/apache-2.0.43/conf/workers2.properties exists ... 2) I attempt to use Tomcat 4.1.10 and mod_jk2 (release version 2.0.1 in http://jakarta.apache.org/builds/jakarta-tomcat-connectors/jk2/release/v2.0. 1) now apr.NativeSo=${jkHome}/lib/jkjni-2.0.so and now i have this in my catalina.out : APR not loaded, disabling jni components: java.io.IOException: /usr/local/jakarta-tomcat-4.1.10-LE-jdk14/lib/jkjni-2.0.so: libapr.so.0: cannot open shared object file: No such file or directory in my apache dir i have a not dynamic library libapr.a 3) I attempt to use Tomcat 4.1.12 and mod_jk2 (with the two version describe above) with the same config , i have now this in my catalina.out : SEVERE: Can't create apr java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory at org.apache.jk.apr.AprImpl.clinit(AprImpl.java:340) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:140) classpath pb ?? Thanks for help ! -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org
RE: Tomcat SSL w/ Apache
Cool! I didn't have time this morning to do a test, so I was winging it. Thanks for the verification. John -Original Message- From: Milt Epstein [mailto:mepstein;uiuc.edu] Sent: Thursday, October 31, 2002 12:22 PM To: Tomcat Users List Subject: RE: Tomcat SSL w/ Apache On Thu, 31 Oct 2002, Turner, John wrote: If you are using Tomcat + Apache, the activity between Tomcat and Apache on the connector is not secure. It is not encrypted. SSL Request - Apache - Decrypted by Apache - Sent to Connector - Sent to Tomcat on Connector port - reply back to Apache - Response encrypted by Apache - SSL Response to Client As far as Tomcat is concerned, the request isn't secure...all Tomcat sees is a typical request on a connector port. Perhaps there is some code in isSecure() that can differentiate, but I would be surprised if there was. Surprise! The isSecure() check (as well as getScheme()) refers to the original request. So, all of what you say otherwise is correct, but isSecure() (and getScheme()) should reflect what was true of the original request, whether it came to Apache or Tomcat. I verified this using SnoopServlet in the Tomcat distrib examples context. On a machine I have, I have that available to both my http and https web server hosts/instances. Then I tried the URLs: http://www.machinename.com//examples/snoop https://www.machinename.com//examples/snoop (snoop is mapped to SnoopServlet in the examples context web.xml file.) For the first URL, Scheme (which shows the value of getScheme()) was http, and Request Is Secure (which shows the value of isSecure()) was false. For the second, the values were https and true, respectively. Now, one caveat I'll add is that this is with 4.0.4. I imagine it's possible that this behavior changed between versions. But it would seem an odd change, because it's a major change to a basic behavior (and one that I think goes against the spec). Further, some tomcat-dev people post to this list, so I would've thought they'd have commented if this were the case. I didn't respond directly to Randy's note because I didn't have any idea what might be causing the problem. It's possible that there is some configuration that needs to be set to get this behavior. But from a quick glance at my configuration, I didn't see what that might be. Oh, I just did a search of the archives (at marc.theaimsgroup.com), and looks like someone brought up this same issue quite recently (and I think I was combining/confusing the two threads). There was only one followup to the initial response there (the subject was Possible bug with isSecure()/getScheme() methods in tomcat 4.), which said: IIRC there is a bug in the coyote connector in TC 4.1.10. You have to use the org.apache.ajp.tomcat4.Ajp13Connector connector and set an attribute tomcatAuthentication=false to achieve the result you desire. In fact, I am using the Ajp13Connector, and I do have tomcatAuthentication set to false (that's to allow the authentication to be done by Apache, but maybe there's some interaction there). So there are a couple of things to try to see if it has any effect. -Original Message- From: Randy Secrist [mailto:tomcat;secristfamily.com] Sent: Wednesday, October 30, 2002 5:24 PM To: Tomcat Users List Subject: Re: Tomcat SSL w/ Apache I played around with the config for a few hours today - didn't get any results. Having read that about name based hosting before, I switched to IP based vhosting... - after poping in a few network cards... What happens now is the same as before... 1) I switch to HTTPS - and I get the standard warning about self signed certificates... 2) I accept it... 3) Tomcat get's and compiles the request...showing isSecure is false...when it should be true 4) And apache feeds me the page via https, and the browser, and the browser reports secure transmission. 5) I check Apache's logs... (No errors in SSL via apache side..) Tomcat's logs were garbled until I cleaned up my virtual host files - but now they appear to be fine... - no errors. Somewhere in there, Tomcat is getting the request - because it compiles the JSP directives, and returns false when calling %=request.isSecure()% However as noted above - this happens when using https! If I do the same thing on my linux box - it works just fine - (albeit I didn't compile apache myself on that thing... - but that shouldn't matter - because SSL does work - just NOT with Tomcat...) Here is the relevant part of my httpd.conf... - note - NameVirtualHost * is commented out prior to this... - does _default_:443 - mean it is still trying to use a default named Vhost, or a default IP? IfModule mod_ssl.c VirtualHost _default_:443
RE: JDBC / ThreadLocal pattern.
If the connection is available for more than one request depends on the way the container handles threads. If each request is a new Thread you will win nothing. Instead you will loose performace as each request would create a new connection to the database. Yes that is true, there for we've thought of a way to have the ThreadLocal get its connection from a pool. The notion of binding a Connection to a particular Thread using a ThreadLocal is a pretty good idea. The big advantage to my mind is that you can use the Connection from any level of the call tree without passing it around as a parameter. What you need to keep in mind is that you must reset the ThreadLocal before the Thread leaves your control. In other words: - At the beginning of your processing, check out a Connection from a connection pool and bind it to the ThreadLocal. - Throughout processing, the ThreadLocal can be used to obtain access to the Connection. - At the end of your processing, close the connection (which returns it to the connection pool) and reset the ThreadLocal. If you need to maintain database state across multiple HTTP requests, a slight modification is needed: before you check a Connection out from the connection pool, look in the HttpSession to see whether there is a Connection there already. If there is, bind that Connection to the ThreadLocal. Otherwise, obtain a new Connection and put it both in the HttpSession and in the ThreadLocal. In the context of servlets, one good way to structure this would be to create a ServletWithConnection class (extending HttpServlet), and have its service() method look something like this: protected static ThreadLocal tl = new ThreadLocal(); protected void service (..) { Connection conn = connPool.getConnection(); tl.set(conn); super.service(); tl.set(null); conn.close(); } Then you can extend this servlet whenever you need a database connection, override doGet, doPost, whatever, as normal, and access the Connection via tl.get() whenever you need it. Incidentally, Martin Fowler talks about this in his new book on enterprise architecture patterns -- look at the registry pattern. http://search.barnesandnoble.com/booksearch/isbnInquiry.asp?isbn=0321127420 Cheers, bn -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org
RE: Compatibility between Windows and Linux tomcat ( mod_jk ajp13 )
Ok I just configures it to use ajp12 instead of ajp13. And now it works. Now I am really confused. Any ideas why this works but not ajp13? -Original Message- From: Aryeh Katz [mailto:aryeh;vasco.com] Sent: 31 October 2002 07:11 To: [EMAIL PROTECTED] Subject: RE: Compatibility between Windows and Linux tomcat ( mod_jk ajp13 ) for everything? I ask because I didn't have to do this for the Linux to Linux or w2k to w2k setups. shrug Your subject stated that you were using ajp13. We generally answer questions based on the information given. Would I ever use JkMount /examples/servlet/* ajp13 ? I assume you mean apj12? As long as ajp12 is working for you, there is no reason not to use it (even if ajp13 is recommended). However, you must make sure that you have the correct listener (port 8007) if you are going to use it. --- Aryeh Katz VASCO www.vasco.com -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org
RE: mod_jk2 tomcat problems DOC ??
It's here: http://www.johnturner.com/howto But there is nothing on there about JK2, as I don't use it. Robert Sowders has a very nice HOWTO for Apache + JK2, but it is for Windows. Since IIS is not involved, the setup should be nearly identical though, except for paths. ftp://pokey.wr.usgs.gov/pub/rsowders/Apache2_Jk2_TC4.1.x_JSDK1.4.x.zip John -Original Message- From: Maxime [mailto:max_sts;hotmail.com] Sent: Thursday, October 31, 2002 12:24 PM To: Tomcat Users List Subject: Re: mod_jk2 tomcat problems DOC ?? Hi Do you know where can i find the most complet documentation on mod_jk2 (compilation, installation configuration ...) In another thread somebody write about John Turner's excellent web page ? where can i find it ? Thks - Original Message - From: Maxime [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Thursday, October 31, 2002 10:09 AM Subject: mod_jk2 tomcat problems Hello, I have to use Tomcat 4.1.x and apache 2 1) I attempt to use Tomcat 4.1.10 and mod_jk2 (compile by myself with jakarta-tomcat-connectors-4.1.10-src with help of http://www.pubbitch.org/jboss/mod_jk2.html) For tomcat, I place libjkjni.so in $CATALINA_HOME/lib and put this few lines in jk2.properties # list of needed handlers. handler.list=apr,channelUnix,request # Location of the socket. channelUnix.file=${jkHome}/work/jk2.socket # Dynamic library serverRoot=/usr/local/apache-2.0.43/ apr.NativeSo=${jkHome}/lib/libjkjni.so communication between apache tomcat works throw the socket file, but i show this line in catalina.out : [jk_config_file.c (261)] config.update(): Can't find config file ${serverRoot}/conf/workers2.properties but /usr/local/apache-2.0.43/conf/workers2.properties exists ... 2) I attempt to use Tomcat 4.1.10 and mod_jk2 (release version 2.0.1 in http://jakarta.apache.org/builds/jakarta-tomcat-connectors/jk2 /release/v2.0. 1) now apr.NativeSo=${jkHome}/lib/jkjni-2.0.so and now i have this in my catalina.out : APR not loaded, disabling jni components: java.io.IOException: /usr/local/jakarta-tomcat-4.1.10-LE-jdk14/lib/jkjni-2.0.so: libapr.so.0: cannot open shared object file: No such file or directory in my apache dir i have a not dynamic library libapr.a 3) I attempt to use Tomcat 4.1.12 and mod_jk2 (with the two version describe above) with the same config , i have now this in my catalina.out : SEVERE: Can't create apr java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory at org.apache.jk.apr.AprImpl.clinit(AprImpl.java:340) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:140) classpath pb ?? Thanks for help ! -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org
Re: Using JNDI URLs for embedded XML DTDs, to avoid hard-coding
On Thu, 31 Oct 2002, Chris Brown wrote: Date: Thu, 31 Oct 2002 09:28:18 +0100 From: Chris Brown [EMAIL PROTECTED] Reply-To: Tomcat Users List [EMAIL PROTECTED] To: tomcat-user [EMAIL PROTECTED] Subject: Using JNDI URLs for embedded XML DTDs, to avoid hard-coding Hello all, Any ideas as to how I can make an XML DTD/Schema available via a JNDI URL within Tomcat? The simplest way to do this is to use a JNDI environment entry that defines the URL (as a String) and sticks it in the JNDI naming context for you. The actual value to be used is configured in server.xml (or your context config file under 4.1). Nested in your Context element, you'd set up something like this: Context path=... ... ... Environment name=url type=java.lang.String value=http://.../ ... /Context and access it from your application like this: InitialContext ic = new InitialContext(); String url = (String) ic.lookup(java:comp/env/url); In this way, you can deploy the same WAR unchanged, in different environments, by tweaking things in the server.xml file. A similar alternative would be to use a context initialization parameter, which Tomcat lets you configure in server.xml with a Parameter element, and retrieve it with: ServletContext sc = ... context instance passed to your class ...; String url = sc.getInitParameter(url); In either case, the configured value will be available in the contextInitialized() method of a ServletContextListener, or at any other time during the execution of your application. Craig -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org
RE: Compatibility between Windows and Linux tomcat ( mod_jk ajp13 )
Ok I just configures it to use ajp12 instead of ajp13. And now it works. Now I am really confused. First of all, in order for anyone to help you further, you should really specify EXACTLY what you did (preferably with a screen scrape so any typos can be caught), instead of saying it. Second of all, the fact that you were able to connect using ajp12, that would seem to indicate that you had some kind of configuration error with ajp13. The easiest way to determine why would be to look at the tomcat log files (and maybe the apache log files). I'm sure that something will pop up if you set the logging high enough --- Aryeh Katz VASCO www.vasco.com -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org
Using Realmquestions
Hi, We have multiple web applications running on Tomcat 4.0.3. We would like to have users login once and they can navigate to any applications which are allowed. I am looking into the Realm of Tomcat. In addition to putting the Realm entry in the Engine container (my conf/server.xml contains the MemoryRealm), what do I need to do to use this user authentication feature that provided by Tomcat ? How do I provide the login form page or will Tomcat take of this? Also, how does each application get the user information? Is Realm the best way? Is there any other way? Thanks in advance. Chiming
CGI's dont run - WebAppRootDir contains .
Why is the CGIServlet::findCGI method inserting the /./ in the middle of the command? command=C:\jakarta-tomcat-4.1.12-LE-jdk14\.\webapps\demo\WEB-INF\cgi\code2html.pl This is incompatible with the code at the top of the CGIServlet::run method that enforces the rule paraphrased below: RULE: the characters /./ and /../ can only occur at position 1 of the command string. the illegal character exception below is what I get in my CGI ( due to the RULE above is broken): Not running CGI [C:\jakarta-tomcat-4.1.12-LE-jdk14\.\webapps\demo\WEB-INF\cgi\code2html.pl]. DETAILS: WinNT 4.0 , Tomcat 4.1.12 Log entries from CGI DEBUGGING: 2002-10-31 09:02:22 cgi: findCGI: path=/code2html, C:\jakarta-tomcat-4.1.12-LE-jdk14\.\webapps\demo\WEB-INF/cgi 2002-10-31 09:02:22 cgi: findCGI: currentLoc=C:\jakarta-tomcat-4.1.12-LE-jdk14\.\webapps\demo\WEB-INF\cgi 2002-10-31 09:02:22 cgi: findCGI: currentLoc=C:\jakarta-tomcat-4.1.12-LE-jdk14\.\webapps\demo\WEB-INF\cgi 2002-10-31 09:02:22 cgi: findCGI: FOUND cgi at C:\jakarta-tomcat-4.1.12-LE-jdk14\.\webapps\demo\WEB-INF\cgi\code2html 2002-10-31 09:02:22 cgi: findCGI calc: name=code2html, path=C:\jakarta-tomcat-4.1.12-LE-jdk14\.\webapps\demo\WEB-INF\cgi\code2html, scriptname=/demo/cgi-bin\code2html, cginame=\code2html X_TOMCAT_SCRIPT_PATH=C:\jakarta-tomcat-4.1.12-LE-jdk14\.\webapps\demo\WEB-INF\cgi\code2html SCRIPT_NAME=/demo/cgi-bin\code2html, command=C:\jakarta-tomcat-4.1.12-LE-jdk14\.\webapps\demo\WEB-INF\cgi\code2html) STACKTRACE: java.io.IOException: org.apache.catalina.servlets.CGIServlet$CGIRunnerIllegal Character in CGI command path ('.' or '..') detected. Not running CGI [C:\jakarta-tomcat-4.1.12-LE-jdk14\.\webapps\demo\WEB-INF\cgi\code2html.pl]. at org.apache.catalina.servlets.CGIServlet$CGIRunner.run(CGIServlet.java:1533) at org.apache.catalina.servlets.CGIServlet.doGet(CGIServlet.java:635) at org.apache.catalina.servlets.CGIServlet.doPost(CGIServlet.java:597) __ Do you Yahoo!? HotJobs - Search new jobs daily now http://hotjobs.yahoo.com/ -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org