Problem with authentication through mod_webapp
Hi, I've successfully set up a JDBC Realm for my application that works perfectly when I'm going straight to Tomcat (that is using port 8080) but not when I'm trying to access it trough Apache (with mod_webapp). Authentication always fails when I'm going through mod_webapp, but work just as it should if I access it on post 8080. Any ideas? Thank you for your time. Markus -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Problem with authentication through mod_webapp
Hi Richard, No, I'm using FORM based authentication and the login page shows up when I try to access a resource inside a protected area, but no matter which account I try to log on with I just get to the login failed page. Does anyone have a JDBC Realm up and running together with mod_webapp (Apache 1.3.23 and Tomcat 4.0.3)? Markus On tisdag, juni 18, 2002, at 01:57 , Richard Plukker wrote: Do you use the basic authentication method? Maybe try the form authentication method. Because apache also has a basic authentication method, maybe these two don't get along. Markus Kirsten wrote: Hi, I've successfully set up a JDBC Realm for my application that works perfectly when I'm going straight to Tomcat (that is using port 8080) but not when I'm trying to access it trough Apache (with mod_webapp). Authentication always fails when I'm going through mod_webapp, but work just as it should if I access it on post 8080. Any ideas? Thank you for your time. Markus -- To unsubscribe, e-mail: mailto:tomcat-user- [EMAIL PROTECTED] For additional commands, e-mail: mailto:tomcat-user- [EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:tomcat-user- [EMAIL PROTECTED] For additional commands, e-mail: mailto:tomcat-user- [EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: ho to precompile alls jsps of a webapp with jspc (or jikes ?)
Hi, I havn't used jspc but your error points out that it can't find the SAX package. Go to http://java.sun.com and download a SAX parser and see if it won't work then. Markus On tisdag, juni 18, 2002, at 03:02 , Ekkehard Gentz wrote: hi, who can help me ? I want to pre-compile all jsp's of my webapp if I use jspc -webapp path-to-webapp I got an NoClassDefFoundError: org/xml/sax/SAXException regards ekkehard -- To unsubscribe, e-mail: mailto:tomcat-user- [EMAIL PROTECTED] For additional commands, e-mail: mailto:tomcat-user- [EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Null Pointer Exception - would you please take a look?
Hi Eddie, Have you tried accessing Tomcat directly and not going through Apache? I was having too much trouble using mod_webapp together with Apache and Tomcat due to that form-based authentication didn't work through Apache but it did directly with Tomcat. Maybe we should all use mod_jk instead. Is anybody running it on Mac OS X BTW? Markus On tisdag, juni 18, 2002, at 09:15 , Eddie Bush wrote: Ok, I just bumped it down to a MemoryRealm and tried that - and it works just fine. What gives with the JDBCRealm? I really need to get this going! Thank you for your input! Eddie - Original Message - From: Eddie Bush [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Tuesday, June 18, 2002 1:57 PM Subject: Re: Null Pointer Exception - would you please take a look? I'm getting really annoyed =) It seems you people haven't actually read my question thoroughly enough to actually understand what I'm doing. The thought crosses my mind that you see the subject and then just scan and put in some standard Oh he's an idiot - he needs to do this response. The problem is with a JDBCRealm! I do NOTHING to send/receive anything to/from the database. I was of the understanding that Tomcat did this when I configured the realm and set up the security-constraint. While I believe my XML to be valid and correct, I will happily post it for inspection if someone thinks it would help. Here is a sequence of what happens and the actors that are involved: Actors: Me and Tomcat Me: Enter url of page that is protected by a security constraint into my browsers address bar. Press enter. Tomcat: Returns to the client a page that looks like: !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.0 Transitional//EN HTMLHEAD META http-equiv=Content-Type content=text/html; charset=windows-1252/HEAD BODYPRE/PRE/BODY/HTML (This is not what the actual page is - it's a JSP file - index.jsp - with much different content. Also notice I'm not calling a servlet! Even if I were, it wouldn't make a bit of difference at this point because Tomcat hasn't authenticated me! This happens when Tomcat should authenticate me - it is NOT my coding!!!) In my server log file, I have an error that starts off as: 2002-06-17 12:29:28 [org.apache.catalina.connector.warp.WarpRequestHandler] java.lang.NullPointerException at interbase.interclient.PreparedStatement.setString(Unknown Source) at org.apache.catalina.realm.JDBCRealm.credentials(JDBCRealm.java) at org.apache.catalina.realm.JDBCRealm.authenticate(JDBCRealm.java) at org.apache.catalina.realm.JDBCRealm.authenticate(JDBCRealm.java) My catalina.out has no indication of anything having gone awry - it merely has status messages indicating that the server was started (why isn't there a timestamp in here?). Any ideas? Thank you for having actually READ THE ENTIRE MESSAGE so you UNDERSTAND my problem before having issued a reply =) Ack! I'm sorry but I'm frustrated by the responses I am getting - makes me wanna just jump up and down and scream at the top of my lungs ... Please - I BEG of you - clue me in here - any thoughts why this is happening? Again, I can post my XML if you think I need to. A couple of questions people have asked up to this point, along with the answer: Q: Are you passing a null string? A: I get this when I try to visit a URL that falls under a security constraint. It's a JDBCRealm. Tomcat handles this - it is not my code. Q: Are you sure the fields in your table match what Tomcat is expecting? A: Initially they didn't. My fields were of length 14 and Tomcat says they should be 15 -- but they're varchar, so does that really matter? I rebuilt the tables so that anything Tomcat uses matches exactly what the docs say - meaning I made my fields to be of length 15. I still get the same response - exactly the same response. Is this the JDBCRealm? I put my DB driver in common/lib - so Tomcat SHOULD be able to find it - right? Is this the appropriate spot? Is it possible (and how possible?) that this is my driver? I use this driver just fine doing JDBC stuff all the time - no problem. Thanks for your time! Eddie - Original Message - From: August Detlefsen [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Tuesday, June 18, 2002 1:24 PM Subject: Re: Null Pointer Exception - would you please take a look? If you are trying to insert a NULL into a NOT NULL column (or are trying to insert special chars or the String is too long), you should get a SQLException, not a NullPointerException. You should recheck that you are actually getting a valid Connection -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:tomcat-user- [EMAIL PROTECTED] For additional commands,
Re: web.xml how-to
Check the DTD for web.xml or RTFM. http://jakarta.apache.org/tomcat Markus On fredag, juni 14, 2002, at 03:34 , Scott Seidl wrote: Can someone give me a good resource on how to create the web.xml file for a web application using servlets? Thanks Scott -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Tomcat and servlet
Hi Med, Deploy your servlet in the ROOT context instead. Markus On tisdag, juni 11, 2002, at 10:08 , Thébault, Médérick wrote: Hi again, I would like to change the URL of my servlet. It can be access thru http://localhost/servlet/MyServlet; but I would like to avoid servlet part. In every example that I saw, the servlet part was always in. Is there a way to set up something like alias? Thanx Med -- To unsubscribe, e-mail: mailto:tomcat-user- [EMAIL PROTECTED] For additional commands, e-mail: mailto:tomcat-user- [EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: AJPV13 + BASIC authentication bug fixed?
Hi Mirko, I didn't know that. 4.0.3 seems to work fine for me with BASIC authentication as well as form based through Apache as well as directly. Or do you mean if you set up HTTP Authentication in Apache? Markus On tisdag, juni 11, 2002, at 09:18 , Klemm, Mirko wrote: Hi, Tomcat 4.0.1 had a bug that prevented BASIC authentication from working through Apache and AJPv13. The release notes are a bit unclear about whether this bug has been fixed with 4.0.3 or not. Does anyone know? Regards, Mirko taskarena Software Engineering GmbH Pennefeldsweg 12 D-53177 Bonn Tel.: +49 228 5505 527 Fax : +49 228 94 39 0 16 E-Mail: [EMAIL PROTECTED] Besuchen Sie uns im Internet unter: Visit our website: http://www.taskarena.net -- To unsubscribe, e-mail: mailto:tomcat-user- [EMAIL PROTECTED] For additional commands, e-mail: mailto:tomcat-user- [EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Tomcat and servlet
There's a folder named ROOT in your webapp directory. Put your servlet into the classes folder under WEB-INF and then replace the DD with yours (actually not needed just to run it). Hope this helps! Markus On tisdag, juni 11, 2002, at 11:34 , Jean-Luc BEAUDET wrote: Thébault, Médérick a écrit : Thanx for the answers, It helps the debate but... I already deployed my servlet as mentionned in the documentation (servlet path is webapps/myservlet to act as in webapps/examples). Web.xml is quite simple as nothing is set in it. See below : !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN http://java.sun.com/dtd/web-app_2_3.dtd; web-app /web-app But I still need to enter localhost/mypath/servlet/myservlet to access it. So Jean-Luc, I think I do not need to try your advice or am I completly wrong and missing something essential? And Markus, what do you mean by ROOT context? Setting ROOT in conf/server.xml as /mypath/servlet will solve the case? Thanx in advance, Cheers. Med -Message d'origine- De : Jean-Luc BEAUDET [mailto:[EMAIL PROTECTED]] Envoyé : mardi 11 juin 2002 10:48 À : Tomcat Users List Objet : Re: Tomcat and servlet Marek, Tomas a écrit : Could give more details, please. tom -Original Message- From: Markus Kirsten [mailto:[EMAIL PROTECTED]] Sent: Tuesday, June 11, 2002 10:36 AM To: Tomcat Users List Subject: Re: Tomcat and servlet Hi Med, Deploy your servlet in the ROOT context instead. Markus On tisdag, juni 11, 2002, at 10:08 , Thébault, Médérick wrote: Hi again, I would like to change the URL of my servlet. It can be access thru http://localhost/servlet/MyServlet; but I would like to avoid servlet part. In every example that I saw, the servlet part was always in. Is there a way to set up something like alias? Thanx Med -- To unsubscribe, e-mail: mailto:tomcat-user- [EMAIL PROTECTED] For additional commands, e-mail: mailto:tomcat-user- [EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] Well, The other way is to simply Deploy your own servlet zone and add a Your_Zone/WEB-INF/web.xml to bypass the default web.xml responsible of this mapping... Hope this help. Jean-Luc :O) -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:tomcat-user- [EMAIL PROTECTED] For additional commands, e-mail: mailto:tomcat-user- [EMAIL PROTECTED] Well... As your web.xml is empty, no new directives can bypass the default one... Try to add smth like: ../.. servlet servlet-nameMyServlet/servlet-name servlet-classMyServlet/servlet-class /servlet servlet-mapping servlet-nameMyServlet/servlet-name url-pattern/MyServlet/url-pattern /servlet-mapping ../.. This could do the trick. I think that all of this would be described in the servlet API 2.3. Hope this help. Jean-Luc :O) -- To unsubscribe, e-mail: mailto:tomcat-user- [EMAIL PROTECTED] For additional commands, e-mail: mailto:tomcat-user- [EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Customize Tomcat error pages
How do I configure standard error pages like 403, 404 etc. for Tomcat? I've gone through the Tomcat documentation breifly but can't find anything about it. Markus -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: newbie question urgent plz
Hi, Check your tomcat-users file located in /conf/ and add an account with the role manager or change an existing one. Good luck! Markus On tisdag, juni 11, 2002, at 01:32 , Vikramjit Singh wrote: yeah the directory structure is exactly the same. how do i check the mananger list i am typing http://localhost:8080/manager its asking for password. Regards, Vikramjit Singh, Systems Engineer, GTL Ltd. Ph. 7612929-1031 -Original Message- From: Chris Campbell [mailto:[EMAIL PROTECTED]] Sent: Tuesday, June 11, 2002 4:35 AM To: 'Tomcat Users List' Subject: RE: newbie question urgent plz What files are in the context? Do you have a webapps/CorpMIS/WEB-INF/web.xml? Does CorpMIS show up in the manager list, and if so what is its status? -Original Message- From: Vikramjit Singh [mailto:[EMAIL PROTECTED]] Sent: Tuesday, June 11, 2002 8:20 PM To: '[EMAIL PROTECTED]' Subject: newbie question urgent plz hi all, i am sending this mail again. plz somebody cud solve my problem. i have installed tomcat 4.0.3 and have been breaking my head since 15 days. I am trying to add a context CorpMIS, but its not getting added. I -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:tomcat-user- [EMAIL PROTECTED] For additional commands, e-mail: mailto:tomcat-user- [EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: newbie question urgent plz
Check the documentation! This is not an error, since you havn't supplied the manager application with any command. Try /list after manager... Please look at the documenation before asking questions. You've got all you need @ http://jakarta.apache.org/tomcat/tomcat-4.0-doc/manager- howto.html. Please mail back if you still having problems. Markus On tisdag, juni 11, 2002, at 02:48 , Vikramjit Singh wrote: ok changed the role to manager, now i didnt get that error, but this line FAIL - Unknown command -Original Message- From: Arshad Mahmood [mailto:[EMAIL PROTECTED]] Sent: Tuesday, June 11, 2002 5:47 AM To: Tomcat Users List Subject: Re: newbie question urgent plz The role needs to be manager not tomcat to use the manager application. Regards, Arshad - Original Message - From: Vikramjit Singh [EMAIL PROTECTED] To: 'Tomcat Users List' [EMAIL PROTECTED] Sent: Tuesday, June 11, 2002 1:22 PM Subject: RE: newbie question urgent plz yeah i opened my tomcat-users and changed the existing file. now the file contains this !-- NOTE: By default, no user is included in the manager role required to operate the /manager web application. If you wish to use this app, you must define such a user - the username and password are arbitrary. -- tomcat-users user name=vikram password=vikram roles=tomcat / user name=role1 password=tomcat roles=role1 / user name=both password=tomcat roles=tomcat,role1 / /tomcat-users in the url i am writing http://localhost/manager username is vikram password is vikram It is giving 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. Regards, Vikramjit Singh, Systems Engineer, GTL Ltd. Ph. 7612929-1031 -Original Message- From: Markus Kirsten [mailto:[EMAIL PROTECTED]] Sent: Tuesday, June 11, 2002 4:43 AM To: Tomcat Users List Subject: Re: newbie question urgent plz Hi, Check your tomcat-users file located in /conf/ and add an account with the role manager or change an existing one. Good luck! Markus On tisdag, juni 11, 2002, at 01:32 , Vikramjit Singh wrote: yeah the directory structure is exactly the same. how do i check the mananger list i am typing http://localhost:8080/manager its asking for password. Regards, Vikramjit Singh, Systems Engineer, GTL Ltd. Ph. 7612929-1031 -Original Message- From: Chris Campbell [mailto:[EMAIL PROTECTED]] Sent: Tuesday, June 11, 2002 4:35 AM To: 'Tomcat Users List' Subject: RE: newbie question urgent plz What files are in the context? Do you have a webapps/CorpMIS/WEB-INF/web.xml? Does CorpMIS show up in the manager list, and if so what is its status? -Original Message- From: Vikramjit Singh [mailto:[EMAIL PROTECTED]] Sent: Tuesday, June 11, 2002 8:20 PM To: '[EMAIL PROTECTED]' Subject: newbie question urgent plz hi all, i am sending this mail again. plz somebody cud solve my problem. i have installed tomcat 4.0.3 and have been breaking my head since 15 days. I am trying to add a context CorpMIS, but its not getting added. I -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:tomcat-user- [EMAIL PROTECTED] For additional commands, e-mail: mailto:tomcat-user- [EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:tomcat-user- [EMAIL PROTECTED] For additional commands, e-mail: mailto:tomcat-user- [EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Mapping *.jsp to Tomcat with webapp
Hi, I've seen some posts about this here. One earlier from me and now from some other users. Is it possible to make the most intuitive mapping to Tomcat - *.jsp in the Apache directory? Markus -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
System.out.println
What's the most easy way to print out debug messages in Tomcat? The ability to use System.out.println() seems to have gone in version 4. Is there any easy way of logging my debug messages to a log file (which is just used for this)? Markus -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: I want close one session in JSP
Hi Owen I'm not sure I understand you. Isn't the bean stored in the session? In that case it will get garbage collected because the session scope doesn't exist after you've called session.invalidate(). Markus On söndag, juni 9, 2002, at 09:37 , Anibal Constante Brito wrote: I want destroy one session, but include the JavaBean with it. I tried whit session.invalidate();, but don't work. What can I do to all JavaBeans like this jsp:useBean id=login scope=session class=jsptutorial.Login / been destroyed. that don't exist anymore. Best Regards. Owen. -- To unsubscribe, e-mail: mailto:tomcat-user- [EMAIL PROTECTED] For additional commands, e-mail: mailto:tomcat-user- [EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: web.xml parsing error on startup.
Hi Nik, Read the error message carfully and change the order of the elements to conform to the error message (i.e. servlet before welcome-file-list). I had the same problem some time ago. Order do matter! Markus On söndag, juni 9, 2002, at 04:01 , [EMAIL PROTECTED] wrote: Hello, I am using JDK1.4 and Tomcat 4.0.3, lately, I've been having this problems: Starting service Tomcat-Standalone Apache Tomcat/4.0.3 PARSE error at line 29 column 11 org.xml.sax.SAXParseException: The content of element type web-app must match (icon?,display-name?,description?,distributable?,context- param*,filter*,filter- mapping*,listener*,servlet*,servlet-mapping*,session- config?,mime-mapping*,welco me-file-list?,error-page*,taglib*,resource-env-ref*,resource- ref*,security-const raint*,login-config?,security-role*,env-entry*,ejb- ref*,ejb-local-ref*). Starting service Tomcat-Apache Apache Tomcat/4.0.3 -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: changing Tomcat's Document Root
Hi Chris, Just set the docBase attribute for that particular webapp context to your arbitrary directory. Hope this helps! Markus On lördag, juni 8, 2002, at 02:46 , Chris Ruegger wrote: I want to deploy a web app to an arbitrary directory on my machine that is *not* under the Tomcat installation directory. What is the proper way to do this? Is it by setting CATALINA_BASE to the directory before I start Tomcat? Is there a doc out there that describes how to to this? Thanks, Chris -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: problem..plz help me out
Does the example servlets and JSP work? Which platform do you use? Markus On lördag, juni 8, 2002, at 09:22 , puneet sachar wrote: Hi friends, this is my 4th mail regarding my single complain.. I have install the tomcat 4.0.3 and its doing fine as far .html files are concern but no .class and .jsp files are running on it I have asked 9-10 times abt same question again and again and I got nothing from u guys there Plz help meÖI really stuck .. With this mail Iím sending my server.xml file and web.xml file which is in my virtualhost/WEB-INF/ I know it is very tough for u to go in these files and see for errors but plz..iím in need badly and afater spending so much time here I some time feel like crying Ö and Iím in such a place and in such a part of India..where I canít get ant local computer guy with whom I can discuss ..plz do me a little favour Here are my problems 1)no .class and .jsp working only html is working 2)I have done all changes which were to made in server.xmlÖ)I have send the file also plz check it and tell me any mistake if u find) 3)Iím getting 404 error ..no servlet found 4)And Iím able to excess the .class file vis http://localhost:80/examples/servlet/abc.class But not by making my own virtual host aand not even the default root directory what i have is my own context named sachar and when i go .http://puneet:80/sachar/servlet/HelloworldServlet error -- 404 See friends ..if u can help me Iíll be very grateful to u Puneet __ Do You Yahoo!? Yahoo! - Official partner of 2002 FIFA World Cup http://fifaworldcup.yahoo.com ?xml version=1.0 encoding=ISO-8859-1? !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN http://java.sun.com/dtd/web-app_2_3.dtd; web-app servlet servlet-nameMyExample/servlet-name servlet-classHelloWorldExample/servlet-class run-as descriptionSecurity role for anonymous access/description role-nametomcat/role-name /run-as /servlet servlet-mapping servlet-nameMyExample/servlet-name url-pattern/sachar/servlet/snoop/url-pattern url-pattern/servlet/*/url-pattern /servlet-mapping /web-app !-- Example Server Configuration File -- !-- Note that component elements are nested corresponding to their parent-child relationships with each other -- !-- A Server is a singleton element that represents the entire JVM, which may contain one or more Service instances. The Server listens for a shutdown command on the indicated port. Note: A Server is not itself a Container, so you may not define subcomponents such as Valves or Loggers at this level. -- Server port=8005 shutdown=SHUTDOWN debug=0 !-- A Service is a collection of one or more Connectors that share a single Container (and therefore the web applications visible within that Container). Normally, that Container is an Engine, but this is not required. Note: A Service is not itself a Container, so you may not define subcomponents such as Valves or Loggers at this level. -- !-- Define the Tomcat Stand-Alone Service -- Service name=Tomcat-Standalone !-- A Connector represents an endpoint by which requests are received and responses are returned. Each Connector passes requests on to the associated Container (normally an Engine) for processing. By default, a non-SSL HTTP/1.1 Connector is established on port 8080. You can also enable an SSL HTTP/1.1 Connector on port 8443 by following the instructions below and uncommenting the second Connector entry. SSL support requires the following steps (see the SSL Config HOWTO in the Tomcat 4.0 documentation bundle for more detailed instructions): * Download and install JSSE 1.0.2 or later, and put the JAR files into $JAVA_HOME/jre/lib/ext. * Execute: %JAVA_HOME%\bin\keytool -genkey -alias tomcat -keyalg RSA (Windows) $JAVA_HOME/bin/keytool -genkey -alias tomcat -keyalg RSA (Unix) with a password value of changeit for both the certificate and the keystore itself. By default, DNS lookups are enabled when a web application calls request.getRemoteHost(). This can have an adverse impact on performance, so you can disable it by setting the enableLookups attribute to false. When DNS lookups are disabled, request.getRemoteHost() will return the String version of the IP address of the remote client. -- !-- Define a non-SSL HTTP/1.1 Connector on port 8080 -- Connector className=org.apache.catalina.connector.http.HttpConnector port=80 minProcessors=5 maxProcessors=75 enableLookups=true redirectPort=8443
Re: Socrates (slightly off topic)
Somewhat more off-topic: wget was originally included with Mac OS X and was later replaced with curl. Curl has got pretty many features and works just as wget if you give curl the -o flag. Basiclly curl is a browser without support for rendering HTML. Markus On torsdag, juni 6, 2002, at 06:36 , Trenton D. Adams wrote: Great, thanks. Didn't even know about wget or curl. I'll try them out. -Original Message- From: Phillip Morelock [mailto:[EMAIL PROTECTED]] Sent: June 6, 2002 12:03 AM To: Tomcat Users List Subject: Re: Socrates (slightly off topic) If not, anyone know of any good testing programs that access web pages very quickly over and over for testing purposes? wget - _F_ree curl - free perl - _F_ree There are commercial tools, but I haven't used one. fillup On 6/5/02 10:52 PM, Trenton D. Adams [EMAIL PROTECTED] wrote: I've heard of a program called socrates that was posted to this list back in 2000. It was used for testing the performance of Resin and Tomcat. I would like to use it myself for testing. Anyone here might know where it is? If not, anyone know of any good testing programs that access web pages very quickly over and over for testing purposes? -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:tomcat-user- [EMAIL PROTECTED] For additional commands, e-mail: mailto:tomcat-user- [EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Encrypted passwords in a JDBC Realm
I've just went through the documentation concerning setting up a JDBC Realm as well as some of the MySQL documentation. It seems to me that to use encrypted passwords I need to manually encrypt them before I store them in my database since it is not possible to set the digest attribute in the Realm element to the encryption algorithm MySQL uses for storing passwords (with the function password()). Is this correct? This hardly causes any problems since it's simple to encrypt the password in my application before storing it in the database, but I loose the possibility to manage passwords directly through SQL. Any workaround? Markus -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Logout using FORM based authentication
Hi, I use a JDBC Realm with FORM based authentication but haven't figured out a way for users to log out. Is it just to call session.invalidate() or is there any better way to do it? Markus -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Logout using FORM based authentication
Hi Eric, Thank you for verifying that. I've actually made my own authentication before but when I read about container-managed authentication I realised that that was exactly what I was looking for. Is there any reason for keeping the users login as a session attribute or is it better to use request.getRemoteUser() ? What's the praxis? Markus On fredag, juni 7, 2002, at 09:12 , Eric Everman wrote: Prior to the Servlet 2.3 spec, it was ambiguous as to when a client was no longer logged in. The 2.3 servlet spec states that a client is logged out when their session is invalidated. So if Tomcat works as advertised, session.invalidate() should do what you expect. Eric Everman At 12:49 PM 6/7/2002, you wrote: Hi, I use a JDBC Realm with FORM based authentication but haven't figured out a way for users to log out. Is it just to call session.invalidate() or is there any better way to do it? -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Find Tomcat training classes
http://www.google.com/search?q=tomcat+training+course Markus On fredag, juni 7, 2002, at 08:27 , Jack Li wrote: Hello, Does anyone know where to have tomcat training classes? Thanks, Jack -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Running JavaBeans
Hi Juan, There's no need to edit the deployment descriptor but you need to restart Tomcat (or redeploy the application). The compiled bean should be placed in the /app/WEB-INF/classes directory. If you still don't get it to work send over your directory structure and the important part of your jsp file. Using JavaBeans with JSP is really convinient and elegant after your JSP finds your bean. ;-) Markus On fredag, juni 7, 2002, at 10:53 , Juan wrote: Hello, I would like to use JavaBeans with jsp. Where is the classes directory? Is it automatically created? Or am I have to create it automatically? The classes directory were created manually: installdir\webapps\ROOT\WEB-INF\classes Sorry, but I tried several things without success. I'm always getting a error message: class not found (JavaBean class). May be I have to restart Tomcat or config webinf.xml Thanks in advance, Juan José Velázquez Garcia Web Development www.htmlspider.com.br -- To unsubscribe, e-mail: mailto:tomcat-user- [EMAIL PROTECTED] For additional commands, e-mail: mailto:tomcat-user- [EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Active Directory
Check with your Active Directory documentation how to make AD accessible from a LDAP client. Then just access the AD tree as a normal LDAP tree. Good hunting! Markus On torsdag, juni 6, 2002, at 09:17 , Chris Shen wrote: i know this is kind of off the topic, but i am trying to write to an Active Directory using jndi in jsp. However, i have no idea how the active directory schema works. i am just trying to look up users. does anyone have any idea on things such as what the base DN should be, objectClass, and so on? thanks! Chris -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: ??? Using JSPs to Send Not-Modified-Since Header ???
Hi Tony, Isn't it possible to put in the method after the jsp file has been rewritten (by Tomcat) to a standard java source code file? Maybe it's quick and dirty but I can't see why it shouldn't work. Best of luck! Markus On Tuesday, June 4, 2002, at 09:28 AM, Tony LaPaso wrote: Hi all, In looking at past posts, I'm afraid I know the horrible answer to this issue but I thought I'd ask just in case I missed anything. Let me start by saying I'm using Tomcat v4.0.4 beta 3. As you know, when a client (usually a web browser) has a cached version of a resource (usually a web page) it can send an If-Modified-Since header to the HTTP server. The server compares the time/date stamp specified in the header with that of the requested resource. If the resource has *not* been modified since the time specified in the If-Modified-Since header, the server sends back a 304 (Not-Modified) response, effectively telling the client (usually a web browser) that its cached version of the resource is still valid. When writing a servlet, it's easy to handle this sort of scenario. The javax.servlet.http.HttpServlet class has a service() method. This method first checks if the incoming HTTP method is a GET. If it is, the service() method proceeds to call the getLastModified() method of the servlet. As a developer, you can override getLastModified() to return a long value representing the last time the requested resource was changed. Depending on the value returned by getLastModified() (note that -1 is returned if you don't override the method) the service() method may simply return a 304, Not-Modified response rather than calling the servlet's doGet() method. Now, the $18.32 Question: How do you ensure getLastModified() is called in JSP? No, you cannot simply do this: %! public long getLastModified() { return xxx; } % The problem is that the above method will never be called by the container. I traced through some of the Tomcat/Catalina/Jasper code and it seems to me that the response code is being set to 200/OK very early on in the processing. I also took a cursory look at the JSP spec and didn't find any indication of setting a Not-Modified response code...so, I am thinking this is something that is (strangely) missing in the JSP specification. I have a JSP page that needs to update itself once per day. Therefore, it would be very handy to have the getLastModified() functionality enjoyed by servlet writers. Can anyone confirm this? Thanks... -- To unsubscribe, e-mail: mailto:tomcat-user- [EMAIL PROTECTED] For additional commands, e-mail: mailto:tomcat-user- [EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: File download with Tomcat 4.0.2
Hi Alex, I think that's actully up to the browser to determinate wheter the browser should display the data, if a helper application should do so or if the user should be prompted to download the file without displaying or executing it. So, in other words, what you need to do is to say on the page which links to the file that if the browser just displays the data you need to press [ALT] on Mac while downloading (and is it [SHIFT] on Windows?). However if your userbase i pretty constant like on an intranet you could send out instructions that files with the extension fls shouldn't be displayed in the browser but instead should the user be prompted for download (or maybe even more convinient - opened in the right application). Markus On Friday, May 31, 2002, at 11:34 PM, Alex Roussev wrote: Hello, How do I force Tomcat to serve a file as a download, instead of displaying it in the browser? For example, if I have an href pointing to a filename with extention exe and I click on the href within a browser it will prompt me to save this file. So basically, I want to do this with another file extention ( fls ). However, when I click on the href Tomcat displays the contents of this file in the browser. Is there something I need to set up the web.xml file? Do I need to define another mime-mapping ? Thank you, Alex - Do You Yahoo!? Yahoo! - Official partner of 2002 FIFA World Cup -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Authentication with Tomcat + Apache
What would be the best sollution if I have resources (non-HTML like movies etc.) which I want to protect with a custom made authentication? I have a servlet which takes care of my authentication and I want this servlet to be able to either grant or permit access to a resource based on wheter the particular user has an account (in a back end database). Thank you! Markus -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Directing .jsp requests to Tomcat
Is it possible to use the mod_webapp for Apache to let Tomcat serve .jsp files that are located in my Apache web folder? I've tried mounting a complete webapp that's located in my Tomcat directory and that's working fine but I would want my jsp files to be distributed all over my site and not in a particular directory within Tomcat. Any ideas? I can't seem to find anything concerning this either in the readme included with the mod_webapp or at the Apache site. Markus -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Help: URL's redirection (maybe a little off-topic).
Hi Luca, If you just need to do this with servlets you can either use a sendRedirect or a RequestDispatcher. SendRedirect tells the user to request another page, in oppose to a RequestDispatcher which lets another Servlet return the data requested. The best way (if you need to use the data the client posts) is to use a RequestDispatcher. Try something like: RequestDispatcher anotherServlet = servletContext.getRequestDispatcher(/ServletB); anotherServlet.forward(req, res); Please remeber that you cannot send any other to the client before sending forward() to a RequestDispatcher. I. e. you cannot setting the contenttype before you seding forward(), Using a sendRedirect is even simpler (if you do NOT need to use the data posted): res.sendRedirect(/ServletB); If you need to use the data the client posts to you, you need to setting some shared variables to theese values - for example using Session variables. But I think the best sollution to your problem is to go with the RequestDispatcher. Hope this helps! Markus On Friday, May 31, 2002, at 01:23 PM, Luca Ventura wrote: Hello everybody! I excuse with all people of the forum is the question I am posting is a little off-topic because it concerns also Internet Information Services (IIS) Web Server, but I didn't find any forum or source data where to retrieve the following information that I need absolutely:-( I have the following problem: I would like to redirect all the data sent to url A to url B. For example I would like that when my Web Server detects a request directed to url: http://mydomain/servletA (or https://mydomain/servletA using https protocol)redirects it to url http://mydomain/servletB (or https://mydomain/servletB) . In this case I am redirecting a request from servlet A to servlet B. I would like to know IF and HOW I can do it in the following Web Servers: 1)Internet Information Services (IIS) 2)Apache Tomcat I need urgently to know the first point because now I have IIS installed on my Win 2000 machine to run my ASP pages...and only in a second time I think to convert my ASP pages in JSP pages passing to Apache Tomcat Web Server. I know I can use Apache Tomcat like a plug-in of IIS to run JSP pages and servlets but I would like to obtain the best performance possible from my Web applications: so I would like to use only one Web Server and not to mix ASP and JSP pages I hope someone HELP me Thanks everybody in advance! Luca -- To unsubscribe, e-mail: mailto:tomcat-user- [EMAIL PROTECTED] For additional commands, e-mail: mailto:tomcat-user- [EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Authentication with Tomcat + Apache
Thank you. This was exactly what I was looking for. I thought that by opening a file for a servlet and then returning it like a stream to the client whould take too much resources but it also seemed like the only way I could whink of except for some kind of HTTP Authentication. But I haven't seen any packages out there that can verify a user with HTTP Authentication and then use som kind of RequestDispatcher. By the way, do you think that it's best to have the protected files on my Apache server with HTTP Authentication with a login/pass what Tomcat is aware of so Tomcat can get the resource and then send it to the user or is it better to have the files inside WEB/INF for example? I have both Apache and Tomcat running on the same machine. Markus On Friday, May 31, 2002, at 11:03 AM, Phillip Morelock wrote: What would be the best sollution if I have resources (non-HTML like movies etc.) which I want to protect with a custom made authentication? use Servlets. serve binary data as the output stream instead of text/html . You can authenticate and do all your other ok, is this person authorized, what is the filename etc., and then serve the headers and the file. If you're interested in security, definitely do not have any part of the filename as a request parameter -- look up the filename in the database. There are packages that implement the raw binary serving in a rudimentary way, I'm thinking specifically: http://www.servlets.com/cos/index.html see the ServletUtils.returnFile method...this should get you started. Be sure to read the license before using or looking at this code. cheers fillup -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]