JNDI context read only ??.
Hi, I want to put an object into the JNDI context, but I get an exception that says the context is read only. Is there a way to make it writable? Context ctx = (Context) new InitialContext().lookup(java:comp/env); ctx = ctx.createSubcontext(glqso); ctx.bind(ResourceManager, _rm); thanks, Mike - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Where does system.out go?
Hello, In a JSP page i'm doing some testing. I have System.out.println() statements in there temporarily. Anyone know where they go? I checked the Context's logger that they are not there. Mike - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: HTTP 404 on j_security_check
All, My solution was to bypass it all together. I wanted to use that realm in order to enable single sign on for multiple webapps. After a week of struggling with problems exactly like you described, I finally gave up. After thinking for a few minutes I guessed (correctly) that single sign on after authentication can be accomplished easily by setting a cookie (which is what the catalina code does) since a cookie can easily survive between calls to different webapps. I had already had code in my servlet and jsp pages to check for a logged In object in the users session. I just modified it slightly to check for the cookie as well. It works great and I don't have any of the issues of redirecting to pages that come with using the form based authentication. mike/ -Original Message- From: Maxime Colas des Francs [mailto:[EMAIL PROTECTED]] Sent: Wednesday, September 11, 2002 8:43 AM To: Tomcat Users List Subject: HTTP 404 on j_security_check Hi I use a Form based authentification in web.xml : [...] login-config auth-methodFORM/auth-method realm-nameAuthentication Area/realm-name form-login-config form-login-page/login.jsp/form-login-page form-error-page/login_failed.jsp/form-error-page /form-login-config /login-config [...] in login.jsp : [...] form method=GET action=j_security_check input type=text name=j_username input type=password name=j_password /form [...] authentification works great but after, if i click on the Back button of my browser to go back on the login page and i try the authentification again, Tomcat launch a HTTP 404 error on /j_security_check (page refresh don't change anything) in access.log (i protect /pages/* and login form is in /login.jsp): 10.20.0.7 - - [10/Sep/2002:11:01:15 -0500] GET /pages/home.jsp HTTP/1.1 302 764 10.20.0.7 - - [10/Sep/2002:11:01:15 -0500] GET /login.jsp HTTP/1.1 200 7070 10.20.0.7 - - [10/Sep/2002:11:01:21 -0500] GET /j_security_check?j_username=bobj_password=bob HTTP/1.1 302 764 10.20.0.7 - bob [10/Sep/2002:11:01:23 -0500] GET /pages/home.jsp HTTP/1.1 200 5018 here, all is ok , i'm authentified as bob (i think that 302 HTTP return code is a good thing ? servlet redirection ??) now i click on back button and attempt to re-authentifiate bob and ... 10.20.0.7 - bob [10/Sep/2002:11:01:29 -0500] GET /j_security_check?j_username=bobj_password=bob HTTP/1.1 404 734 404 error ... Do you have a solution ? Thanks a lot. (bilingue english/french) -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: The requested resource (/login/j_security_check) is not available
... this is one, of many frustrations that I found while experiementing with singleSignOn, realms, and defining secured areas in the webapp. The main crux of the problem is that when you submit to /j_security_check there is no way to also specify where tomcat should re-direct to. This works ok for simple cases. Example: 1) try to go to a secure page. 2) tomcat intercepts and display login page 3) user submits login page, tomcat display where user was trying to go in step #1 but when you start talking about using the back button, having servlets redirect to pages, having jsps redirect to pages, tomcat gets confused as to where to go after authenticating the user. Personally, I've given up on it. So far it's been a lot of work without much benefit. So instead, I'm going to set a cookie myself at path / and use that to authenticate users over multiple webapps, which should be what the single sign on valve is doing anyway. mike/ -Original Message- From: Dick de Jong [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 27, 2002 7:58 AM To: '[EMAIL PROTECTED]' Subject: The requested resource (/login/j_security_check) is not available Dear all, I've installed tomcat4.0 and a simple website used for testing authentication (JNDI Realm). I have the following problem. The authentication (against LDAP) works fine. I'm redirected to the index.htm page (simple main page). But when I press the back button and go back to the login page and try to login again, I get the following error message (this does NOT happen when I explicitly logout (session.invalidate()) before). Does anyone know whether this is a config error from my side or a bug in tomcat? I prefer a declarative authentication above a programmatic authentication. Error message: Apache Tomcat/4.0.3 - HTTP Status 404 - /login/j_security_check type Status report message /login/j_security_check description The requested resource (/login/j_security_check) is not available. I'm using the following data : == website structure tomcat4.0 /conf /server.xml /webapps /TestLogin /WEB-INF /web.xml /index.htm /login /login.jsp == server.xml (Realm setup): Context path=/TestLogin docBase=TestLogin debug=99 reloadable=true useNaming=true Realm className=org.apache.catalina.realm.JNDIRealm connectionURL=ldap://localhost:389; connectionName=cn=Directory Manager connectionPassword=mypwd debug=99 roleBase=ou=Accounts,dc=mycompany,dc=com roleName=cn roleSearch=(eeuniquemember={0}) roleSubtree=false userPattern=cn={0},ou=Members,dc=mycompany,dc=com userPassword=userPassword / /Context == web.xml web-app welcome-file-list welcome-fileindex.htm/welcome-file /welcome-file-list security-constraint web-resource-collection web-resource-name/web-resource-name url-pattern/*/url-pattern http-methodGET/http-method http-methodPOST/http-method /web-resource-collection auth-constraint description/description role-name4/role-name /auth-constraint /security-constraint login-config auth-methodFORM/auth-method form-login-config form-login-page/login/login.jsp/form-login-page form-error-page/login/login.jsp/form-error-page /form-login-config /login-config security-role role-name4/role-name /security-role /web-app == login.jsp page html head titleLogin/title % if (request.getParameter(mode) != null) { session.invalidate(); } % body bgcolor=white form method=POST action='j_security_check' table border=0 cellspacing=5 tr th align=rightUsername:/th td align=leftinput type=text name=j_username/td /tr tr th align=rightPassword:/th td align=leftinput
RE: JDBCRealm + Form Based Auth. How do I tell it were to go if loginis ok?
... As of right now you can't! tomcat relies on where the user was trying to go in order to figure out where to redirect to after the form is submitted. Example: 1) try to get to /secure_html/prices.html 2) tomcat intercepts, displays login page, and remember where user was trying to go. 3) user submits, tomcat authenticats, tomcat redirects to location in step #1 If you search though the bug database (i think) a user posted an update to one of the catalina class files that allowed for a j_url hidden tag in the form (or something like that name), and the updated code pulled that value out and redirect to that url. I haven't tried it and I don't think I will because I've given up on using tomcat's single sign on and authentication abilities. mike/ -Original Message- From: Alexander Wallace [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 27, 2002 3:18 AM To: Tomcat Users List Subject: JDBCRealm + Form Based Auth. How do I tell it were to go if loginis ok? Hello there. Very new to realms and java, so sorry if this is too stupid. I have set up a JDBCRealm using PostgreSQL and it all seems to work, It does connect and load the roles, and when I try to access protected resources, it does go to the Form based login I specigy in web.xml and the error page for that works too. My question is, since the form action in the login page points to %= response.encodeURL(j_security_check) %, how, or where do I specify where my app goes after a succesful login? Thanks in advance! -- 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]
how to delete a cookie?????
... I'm testing the use of cookies by basically setting up a jsp page in two different contexts and flipping back and forth between them. I've tried to delete the cookie by calling setMaxAge() with -1, 0, and 1 but i've not been able to been able to successfully delete the cookie, i.e when i flip to the other context i get my found cookie message instead of the cookie missing, adding a new one message. Anyone been able to successfully delete a cookie? mike/ -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: how to delete a cookie?????
I was able to trace the source of the problem. When I add the cookie I call setPath(/); because I want the cookie visible across multiple webapps. However, when I get the cookie out of the response by calling getCookies(), the value of getPath() = null! So it's like the path information disappeared or isn't being reconstructed correctly! So after I get the cookie from the request, I call setPath(/) again and call setMaxAge(0), readd it to the response by calling addCookie(c) and with that the cookie was sucessfully deleted! Not having the / path persisting really through me. I didn't think of it because it seemed like such an obvious thing that tomcat would handle. mike/ -Original Message- From: Milt Epstein [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 27, 2002 3:42 PM To: Tomcat Users List Subject: Re: how to delete a cookie? On Tue, 27 Aug 2002, Michael Remijan wrote: ... I'm testing the use of cookies by basically setting up a jsp page in two different contexts and flipping back and forth between them. I've tried to delete the cookie by calling setMaxAge() with -1, 0, and 1 but i've not been able to been able to successfully delete the cookie, i.e when i flip to the other context i get my found cookie message instead of the cookie missing, adding a new one message. Anyone been able to successfully delete a cookie? You don't specify fully what you're doing to delete the cookie. Remember, after you set up the cookie (BTW, max age of 0 should delete it), you need to add the cookie to the response. Changing the cookie in the request alone and/or not adding it to the response won't do anything. Milt Epstein Research Programmer Systems and Technology Services (STS) Campus Information Technologies and Educational Services (CITES) University of Illinois at Urbana-Champaign (UIUC) [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]
JDBCRealm - difference between no user/password and SQLException
Hi all, Using the JDBCReal, you specify in web.xml what page to goto if there is an error form-error-page.../form-error-page. However, I believe that this page is used for both non fatal situations, like the the username/password doesn't exist, and for fatal situations, like if if the database is down. Is there any way to tell the difference so that a relogin page can be displayed in one instance and a fatal error page in the other? thanks, mike/ -Original Message- From: Barney Hamish [mailto:[EMAIL PROTECTED]] Sent: Thursday, August 22, 2002 12:01 PM To: 'Tomcat Users List' Subject: RE: specify the url after j_security_check login The user is directed to the login when they request a secure resource. If they complete the login process successfully then they ar forwarded to the page that they asked for previously. Hamish -Original Message- From: Michael Remijan [mailto:[EMAIL PROTECTED]] Sent: Thursday, August 22, 2002 6:53 PM To: Tomcat Users List Subject: specify the url after j_security_check login Hi, is it possible to specify what url tomcat should goto after a j_security_check login is successful instead of tomcat just loading what's in your welcome-file-list ? thanks, mike/ -Original Message- From: Robert L Sowders [mailto:[EMAIL PROTECTED]] Sent: Thursday, August 08, 2002 11:33 PM To: Tomcat Users List Cc: 'Tomcat Users List' Subject: RE: Tomcat + apache Here you go Aaron, ftp://pokey.wr.usgs.gov/pub/rsowders/Apache2_Win2k_TC4.1.8_JSDK1.4.doc This is an install for Win2k, Tomcat 4.1.8, JDSK1.4.0, mod_jk2 It' fairly easy to install. Sorry, all I have right now is a Word Doc, but all the hyper links work, I think. If you want Apache with SSL then I can do that too, but it's more complicated. Yall have fun now, hear? rls Aaron Chan [EMAIL PROTECTED] 08/07/2002 02:29 AM Please respond to Tomcat Users List To: 'Tomcat Users List' [EMAIL PROTECTED] cc: Subject:RE: Tomcat + apache Hi, I am using Windows 2000 Server instead of Linux. Anywhere I can go to find help on setting up? Thanks. Aaron Chan -Original Message- From: Simone Chiaretta [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 06, 2002 7:57 PM To: Tomcat Users List Subject: R: Tomcat + apache Ops, sorry I forgot to mention I've linux red hat 7.3 Tomcat 4.0.4 Apache 2.0.39 java 1.4.0 I've seen the 3 connectors which is the best? Thx Simone -Messaggio originale- Da: Turner, John [mailto:[EMAIL PROTECTED]] Inviato: martedì 6 agosto 2002 13.44 A: 'Tomcat Users List' Oggetto: RE: Tomcat + apache To get tomcat to work with apache for serving mixed content, you will need to choose a connector. At this time, there are three to choose from: mod_jk (AJP), mod_webapp (WARP), and mod_jk2. Then you configure apache to serve certain content, and send other content to tomcat via the connector for processing. Without knowing your platform and OS environment, there's no way to point you to documentation on how to work with a connector. You can make the entire environment start at boot time quite easily. Again, not knowing your environment, there's no way to point you to alternatives. John Turner [EMAIL PROTECTED] -Original Message- From: Simone Chiaretta [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 06, 2002 7:28 AM To: [EMAIL PROTECTED] Subject: Tomcat + apache Sorry for this questions that could have been already answered, but I didn't find anything on the net and the archive doesn't have a search feature. I'm new in tomcat world, basically I'm a programmer but I've to setup a web server on linux with apache and tomcat. What I'd like to know is: 1 - How can I integrate apache 2.x with tomcat 4.0.4 (I mean having apache handle static files and php, while tomcat just handles java dynamic contents) 2 - How can I make this environment start at boot time. Thank you Simone -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Apache 2 and Tomcat 4
... I do have this done. Right now I'm thinking that it has to do with the Apache configuration. If I have directory browsing turned on, and an index.html file is not found, then apache will display the directory. I'm hoping that if I turn directory browsing off, and it doesn't find index.html it'll forward the request to tomcat. This sound like it'll work? mike/ -Original Message- From: Robert L Sowders [mailto:[EMAIL PROTECTED]] Sent: Monday, August 12, 2002 5:41 AM To: Tomcat Users List Cc: Tomcat Users List Subject: RE: Apache 2 and Tomcat 4 You need to register the dairy as a Context in the server.xml file, something like this assuming the path is /dairy Context path=/dairy docBase=diary debug=0 reloadable=true / If your installation is working correctly at http://localhost:8080 then please read http://localhost:8080/tomcat-docs/appdev/index.html for an easy way to deploy applications under 4.1.x. using Ant. Good luck rls Michael Remijan [EMAIL PROTECTED] 08/11/2002 02:57 PM Please respond to Tomcat Users List To: Tomcat Users List [EMAIL PROTECTED] cc: Subject:RE: Apache 2 and Tomcat 4 Robert, Yes, but I don't and can't use an index.html. I need index.jsp so I can put a tag in the page that will do a redirect to another jsp page if need be. I've setup workers2.properties like this: [uri:/diary] info=Diary webapp in the default context context=/diary debug=0 [uri:/diary/servlet/*] info=Prefix mapping [uri:/diary/do/*] info=Prefix mapping [uri:/diary/*.jsp] info=Extension mapping but still get a directory listing when I goto http://localhost/diary or http://localhost/diary/ So it's like apache isn't forwarding this request to tomcat. If I put in http://localhost/diary/index.jsp it works fine. mike/ -Original Message- From: Robert L Sowders [mailto:[EMAIL PROTECTED]] Sent: Monday, August 05, 2002 6:37 PM To: Tomcat Users List Subject: RE: Apache 2 and Tomcat 4 Mod_jk2 doesn't have anything to do with the default index page. That is up to Apache or Tomcat depending on what dirs Tomcat is mounting with mod_jk2. This is determined in the works2.properties file in the APACHE_HOME\conf directory. (*.jsp) Tomcat is set to recognize the index.jsp as the default in it's directories already. If you just want a page to look at instead of the directory listing for the example directory then a simple index.html will do just fine. Have a look at TOMCAT_HOME\examples\servlets\index.html or the TOMCAT_HOME\examples\jsp\index.html. Apache will hand you these pages so there's no need to do a index.jsp. Remember let Apache and Tomcat do their respective jobs, static for Apache, and jsp for Tomcat. Michael Remijan [EMAIL PROTECTED] 08/05/2002 12:52 PM Please respond to Tomcat Users List To: Tomcat Users List [EMAIL PROTECTED] cc: Subject:RE: Apache 2 and Tomcat 4 Robert, I tracked it down. I've been using jdk1.4.1beta. Once I downloaded and installed jdk1.4.0 it started to work. How do I get mod_jk2 to recognize index.jsp as the default page. I obviously need that other than a directory listing. I have index.jsp added to DirectoryIndex in httpd.conf and I have the welcome-file-list set in the web.xml's mike/ -Original Message- From: Robert L Sowders [mailto:[EMAIL PROTECTED]] Sent: Monday, August 05, 2002 1:03 PM To: Tomcat Users List Cc: Tomcat Users List Subject: RE: Apache 2 and Tomcat 4 Hey Mike, What do the apache log files say? Chck there to see any errors during startup for Tomcat. Check your JAVA_HOME environment variable and path statement for accuracy. You may also want to include the JAVA_HOME\bin dir in the path so the JAI is found. Hope this helps. Michael Remijan [EMAIL PROTECTED] 08/05/2002 09:50 AM Please respond to Tomcat Users List To: Tomcat Users List [EMAIL PROTECTED] cc: Subject:RE: Apache 2 and Tomcat 4 Robert, I followed these steps but it doesn't appear to be working. The stderr.log says: --- TomcatStarter: main() Try org.apache.tomcat.startup.Main Try org.apache.catalina.startup.BootstrapService Starting org.apache.catalina.startup.BootstrapService java.lang.NoClassDefFoundError: org/xml/sax/InputSource at java.lang.Class.newInstance0(Native Method) at java.lang.Class.newInstance(Unknown Source) at org.apache.catalina.startup.BootstrapService.init(BootstrapService.java:198) at org.apache.catalina.startup.BootstrapService.main(BootstrapService.java:292) at java.lang.reflect.Method.invoke(Native Method) at org.apache.jk.apr.TomcatStarter.run(TomcatStarter.java:127) at java.lang.Thread.run(Unknown Source) --- couple things about your post: (1) you say Cut and paste the following jk2.properties file
automatically serve index.jsp
hi all, I'm currently working on Apache 2.0.39 - tomcat-4.1.8 with mod_jk2 and jdk1.4.0_01. I've posted previously about apache giving a directory listing instead of returning index.jsp. The only way I've been able to get around this problem is editing the workers2.properties file to include a mapping to the whole webapp... - workers2.properties (snippet) --- [uri:/diary/*] info=Map the whole webapp --- I have an alias and directory in httpd.conf set up as follows - httpd.conf (snippet) ## ## diary webapp ## Alias /diary C:/apps/Tomcat/jakarta-tomcat-4.1.8-LE-jdk14/webapps/diary Directory C:/apps/Tomcat/jakarta-tomcat-4.1.8-LE-jdk14/webapps/diary Options FollowSymLinks MultiViews IncludesNoExec AddOutputFilter Includes html htm gif jpeg jpg AllowOverride None Order allow,deny Allow from all /Directory The question I have is, because of mapping the whole webapp in the workers2.properties file, will that basically override apache serving static content? I assuming it would but I don't have the time to go digging around in the connector's source. thanks, mike/ -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: automatically serve index.jsp
... Yes I did. In fact it was the first thing I tried. I also tried getting rid of the AddOutputFilter snippet of the Directory tag thinking it was preventing apache from loading the jsp page. that didn't work either. mike/ -Original Message- From: Steve Prior [mailto:[EMAIL PROTECTED]] Sent: Monday, August 12, 2002 12:53 PM To: Tomcat Users List Subject: Re: automatically serve index.jsp You're a little ahead of me in doing this, but did you try adding index.jsp to a DirectoryIndex directive in Apache? This was very obious to do in Apache 1.3, not sure as obvious in 2.0. Steve Michael Remijan wrote: hi all, I'm currently working on Apache 2.0.39 - tomcat-4.1.8 with mod_jk2 and jdk1.4.0_01. I've posted previously about apache giving a directory listing instead of returning index.jsp. The only way I've been able to get around this problem is editing the workers2.properties file to include a mapping to the whole webapp... - workers2.properties (snippet) --- [uri:/diary/*] info=Map the whole webapp --- I have an alias and directory in httpd.conf set up as follows - httpd.conf (snippet) ## ## diary webapp ## Alias /diary C:/apps/Tomcat/jakarta-tomcat-4.1.8-LE-jdk14/webapps/diary Directory C:/apps/Tomcat/jakarta-tomcat-4.1.8-LE-jdk14/webapps/diary Options FollowSymLinks MultiViews IncludesNoExec AddOutputFilter Includes html htm gif jpeg jpg AllowOverride None Order allow,deny Allow from all /Directory The question I have is, because of mapping the whole webapp in the workers2.properties file, will that basically override apache serving static content? I assuming it would but I don't have the time to go digging around in the connector's source. thanks, mike/ -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: automatically serve index.jsp
... having this snippet workers2.properties also works - workers2.properties (snippet) --- [uri:/diary/] info=Map the whole webapp --- mike/ -Original Message- From: Steve Prior [mailto:[EMAIL PROTECTED]] Sent: Monday, August 12, 2002 12:53 PM To: Tomcat Users List Subject: Re: automatically serve index.jsp You're a little ahead of me in doing this, but did you try adding index.jsp to a DirectoryIndex directive in Apache? This was very obious to do in Apache 1.3, not sure as obvious in 2.0. Steve Michael Remijan wrote: hi all, I'm currently working on Apache 2.0.39 - tomcat-4.1.8 with mod_jk2 and jdk1.4.0_01. I've posted previously about apache giving a directory listing instead of returning index.jsp. The only way I've been able to get around this problem is editing the workers2.properties file to include a mapping to the whole webapp... - workers2.properties (snippet) --- [uri:/diary/*] info=Map the whole webapp --- I have an alias and directory in httpd.conf set up as follows - httpd.conf (snippet) ## ## diary webapp ## Alias /diary C:/apps/Tomcat/jakarta-tomcat-4.1.8-LE-jdk14/webapps/diary Directory C:/apps/Tomcat/jakarta-tomcat-4.1.8-LE-jdk14/webapps/diary Options FollowSymLinks MultiViews IncludesNoExec AddOutputFilter Includes html htm gif jpeg jpg AllowOverride None Order allow,deny Allow from all /Directory The question I have is, because of mapping the whole webapp in the workers2.properties file, will that basically override apache serving static content? I assuming it would but I don't have the time to go digging around in the connector's source. thanks, mike/ -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: automatically serve index.jsp
... Nope, that does work either. I've been using tomcat for a while so I've already tried the most of those kinds of things. It looks to me like the mappings in the workers2.properties file is looked at first. If a matching is found, it is forwarded to tomcat. If not, it goes to apache. Since I have directory browsing for that directory off and no index.html I get apache's standard error message for not being able to see that file. What I want apache to do is translate http://localhost/diary/ into http://localhost/diary/index.jsp. can I do this with a redirect? mike/ -Original Message- From: Subir Sengupta [mailto:[EMAIL PROTECTED]] Sent: Monday, August 12, 2002 1:24 PM To: 'Tomcat Users List' Subject: RE: automatically serve index.jsp Put this in your web.xml welcome-file-list welcome-fileindex.jsp/welcome-file /welcome-file-list Subir -Original Message- From: Michael Remijan [mailto:[EMAIL PROTECTED]] Sent: Monday, August 12, 2002 11:02 AM To: Tomcat Users List Subject: RE: automatically serve index.jsp ... having this snippet workers2.properties also works - workers2.properties (snippet) --- [uri:/diary/] info=Map the whole webapp --- mike/ -Original Message- From: Steve Prior [mailto:[EMAIL PROTECTED]] Sent: Monday, August 12, 2002 12:53 PM To: Tomcat Users List Subject: Re: automatically serve index.jsp You're a little ahead of me in doing this, but did you try adding index.jsp to a DirectoryIndex directive in Apache? This was very obious to do in Apache 1.3, not sure as obvious in 2.0. Steve Michael Remijan wrote: hi all, I'm currently working on Apache 2.0.39 - tomcat-4.1.8 with mod_jk2 and jdk1.4.0_01. I've posted previously about apache giving a directory listing instead of returning index.jsp. The only way I've been able to get around this problem is editing the workers2.properties file to include a mapping to the whole webapp... - workers2.properties (snippet) --- [uri:/diary/*] info=Map the whole webapp --- I have an alias and directory in httpd.conf set up as follows - httpd.conf (snippet) ## ## diary webapp ## Alias /diary C:/apps/Tomcat/jakarta-tomcat-4.1.8-LE-jdk14/webapps/diary Directory C:/apps/Tomcat/jakarta-tomcat-4.1.8-LE-jdk14/webapps/diary Options FollowSymLinks MultiViews IncludesNoExec AddOutputFilter Includes html htm gif jpeg jpg AllowOverride None Order allow,deny Allow from all /Directory The question I have is, because of mapping the whole webapp in the workers2.properties file, will that basically override apache serving static content? I assuming it would but I don't have the time to go digging around in the connector's source. thanks, mike/ -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: automatically serve index.jsp
... Nope, I've tried that too. and I'm using mod_jk2 so the JkMount doesn't apply mike/ -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Monday, August 12, 2002 2:19 PM To: Tomcat Users List Subject: RE: automatically serve index.jsp Add index.jsp in the DirectoryIndex statement of Apache. Also check your JkMount statements. Apache needs to forward all jsps to Tomcat. RS Michael Remijan Michael.Remijan@sTo: Tomcat Users List olocup.com[EMAIL PROTECTED] cc: 08/12/02 02:03 PM Subject: RE: automatically serve index.jsp Please respond to Tomcat Users List ... Nope, that does work either. I've been using tomcat for a while so I've already tried the most of those kinds of things. It looks to me like the mappings in the workers2.properties file is looked at first. If a matching is found, it is forwarded to tomcat. If not, it goes to apache. Since I have directory browsing for that directory off and no index.html I get apache's standard error message for not being able to see that file. What I want apache to do is translate http://localhost/diary/ into http://localhost/diary/index.jsp. can I do this with a redirect? mike/ -Original Message- From: Subir Sengupta [mailto:[EMAIL PROTECTED]] Sent: Monday, August 12, 2002 1:24 PM To: 'Tomcat Users List' Subject: RE: automatically serve index.jsp Put this in your web.xml welcome-file-list welcome-fileindex.jsp/welcome-file /welcome-file-list Subir -Original Message- From: Michael Remijan [mailto:[EMAIL PROTECTED]] Sent: Monday, August 12, 2002 11:02 AM To: Tomcat Users List Subject: RE: automatically serve index.jsp ... having this snippet workers2.properties also works - workers2.properties (snippet) --- [uri:/diary/] info=Map the whole webapp --- mike/ -Original Message- From: Steve Prior [mailto:[EMAIL PROTECTED]] Sent: Monday, August 12, 2002 12:53 PM To: Tomcat Users List Subject: Re: automatically serve index.jsp You're a little ahead of me in doing this, but did you try adding index.jsp to a DirectoryIndex directive in Apache? This was very obious to do in Apache 1.3, not sure as obvious in 2.0. Steve Michael Remijan wrote: hi all, I'm currently working on Apache 2.0.39 - tomcat-4.1.8 with mod_jk2 and jdk1.4.0_01. I've posted previously about apache giving a directory listing instead of returning index.jsp. The only way I've been able to get around this problem is editing the workers2.properties file to include a mapping to the whole webapp... - workers2.properties (snippet) --- [uri:/diary/*] info=Map the whole webapp --- I have an alias and directory in httpd.conf set up as follows - httpd.conf (snippet) ## ## diary webapp ## Alias /diary C:/apps/Tomcat/jakarta-tomcat-4.1.8-LE-jdk14/webapps/diary Directory C:/apps/Tomcat/jakarta-tomcat-4.1.8-LE-jdk14/webapps/diary Options FollowSymLinks MultiViews IncludesNoExec AddOutputFilter Includes html htm gif jpeg jpg AllowOverride None Order allow,deny Allow from all /Directory The question I have is, because of mapping the whole webapp in the workers2.properties file, will that basically override apache serving static content? I assuming it would but I don't have the time to go digging around in the connector's source. thanks, mike/ -- 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
RE: Apache 2 and Tomcat 4
Robert, Yes, but I don't and can't use an index.html. I need index.jsp so I can put a tag in the page that will do a redirect to another jsp page if need be. I've setup workers2.properties like this: [uri:/diary] info=Diary webapp in the default context context=/diary debug=0 [uri:/diary/servlet/*] info=Prefix mapping [uri:/diary/do/*] info=Prefix mapping [uri:/diary/*.jsp] info=Extension mapping but still get a directory listing when I goto http://localhost/diary or http://localhost/diary/ So it's like apache isn't forwarding this request to tomcat. If I put in http://localhost/diary/index.jsp it works fine. mike/ -Original Message- From: Robert L Sowders [mailto:[EMAIL PROTECTED]] Sent: Monday, August 05, 2002 6:37 PM To: Tomcat Users List Subject: RE: Apache 2 and Tomcat 4 Mod_jk2 doesn't have anything to do with the default index page. That is up to Apache or Tomcat depending on what dirs Tomcat is mounting with mod_jk2. This is determined in the works2.properties file in the APACHE_HOME\conf directory. (*.jsp) Tomcat is set to recognize the index.jsp as the default in it's directories already. If you just want a page to look at instead of the directory listing for the example directory then a simple index.html will do just fine. Have a look at TOMCAT_HOME\examples\servlets\index.html or the TOMCAT_HOME\examples\jsp\index.html. Apache will hand you these pages so there's no need to do a index.jsp. Remember let Apache and Tomcat do their respective jobs, static for Apache, and jsp for Tomcat. Michael Remijan [EMAIL PROTECTED] 08/05/2002 12:52 PM Please respond to Tomcat Users List To: Tomcat Users List [EMAIL PROTECTED] cc: Subject:RE: Apache 2 and Tomcat 4 Robert, I tracked it down. I've been using jdk1.4.1beta. Once I downloaded and installed jdk1.4.0 it started to work. How do I get mod_jk2 to recognize index.jsp as the default page. I obviously need that other than a directory listing. I have index.jsp added to DirectoryIndex in httpd.conf and I have the welcome-file-list set in the web.xml's mike/ -Original Message- From: Robert L Sowders [mailto:[EMAIL PROTECTED]] Sent: Monday, August 05, 2002 1:03 PM To: Tomcat Users List Cc: Tomcat Users List Subject: RE: Apache 2 and Tomcat 4 Hey Mike, What do the apache log files say? Chck there to see any errors during startup for Tomcat. Check your JAVA_HOME environment variable and path statement for accuracy. You may also want to include the JAVA_HOME\bin dir in the path so the JAI is found. Hope this helps. Michael Remijan [EMAIL PROTECTED] 08/05/2002 09:50 AM Please respond to Tomcat Users List To: Tomcat Users List [EMAIL PROTECTED] cc: Subject:RE: Apache 2 and Tomcat 4 Robert, I followed these steps but it doesn't appear to be working. The stderr.log says: --- TomcatStarter: main() Try org.apache.tomcat.startup.Main Try org.apache.catalina.startup.BootstrapService Starting org.apache.catalina.startup.BootstrapService java.lang.NoClassDefFoundError: org/xml/sax/InputSource at java.lang.Class.newInstance0(Native Method) at java.lang.Class.newInstance(Unknown Source) at org.apache.catalina.startup.BootstrapService.init(BootstrapService.java:198) at org.apache.catalina.startup.BootstrapService.main(BootstrapService.java:292) at java.lang.reflect.Method.invoke(Native Method) at org.apache.jk.apr.TomcatStarter.run(TomcatStarter.java:127) at java.lang.Thread.run(Unknown Source) --- couple things about your post: (1) you say Cut and paste the following jk2.properties file into the JAVA_HOME\conf directory (Edit paths to suit) I'm assuming you mean TOMCAT_HOME (2) my jdk1.4 is in c:\program files\j2se. this make a difference? mike/ -Original Message- From: Robert L Sowders [mailto:[EMAIL PROTECTED]] Sent: Friday, August 02, 2002 11:18 PM To: [EMAIL PROTECTED] Subject: Re: Apache 2 and Tomcat 4 Sure thing, But it's for Tomcat 4.1.8 Install J2sdk1.4.0_01 http://java.sun.com/j2se/1.4/download.html No need to install src or demos. I chose an install path of c:\1\java, try to keep it simple. Add the java bin directory to the system PATH variable in my case it is C:\1\java\bin Add JAVA_HOME to the system variables pointing it at where you installed JSDK mine is C:\1\java Install Apache 2.0.39 http://www.apache.org/dist/httpd/binaries/win32/apache_2.0.39-win32-x86-no_ssl.msi Make a nice short path without any blank spaces for the installation. Mine is C:\1\Apache2 During installation set domain and ServerName to localhost. Install Tomcat 4.1.8 http://jakarta.apache.org/builds/jakarta-tomcat-4.0/test/v4.1.8/bin/jakarta-tomcat-4.1.8-LE-jdk14.exe Again make sure to chose a nice short install path without any
RE: NOW DESPERATE: Package not found
I had problems similar to this using jdk1.4.x with older versions of tomcat. what versions are you using? mike/ -Original Message- From: Josh [mailto:[EMAIL PROTECTED]] Sent: Sunday, August 11, 2002 10:04 PM To: [EMAIL PROTECTED] Subject: NOW DESPERATE: Package not found Ok, I stopped and started the tomcat service, and now it won't even find the package. I get Package au.com.multemedia.wf.ui not found in import. yet WEB-INF\classes\au\com\multemedia\wf\ui clearly exists and contains two class files. Does anybody have any idea what the bloody hell is wrong with this sytem? Is there an alternative to tomcat? -Josh Rimmer, real dumplings, proper dumplings when they're properly cooked to perfection, proper dumplings, should not bounce. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: ClassNotFound
There were earlier posts about this I think. I believe the db2 drivers are not 100% java. Which means there are *.dll or *.so files or something else which contains native code that the java classes of the db2 drivers use. You need to make sure those *.dll or *.so files are available via the PATH system variable. And there might be more system variables that need to be set. I'd refer to your jdbc-db2 reference. mike/ -Original Message- From: Lindomar Silva [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 06, 2002 2:49 PM To: Tomcat Users List Subject: ClassNotFound Hi All. Well, i have a problem with my driver db2 (db2java.zip) I'm using linux with tomcat 4 and j2sdk 1.4.0. This driver works on console, but on tomcat don't work?! I put this archive (db2java.zip) on classpath as well /common/lib on tomcat, but the same appear(no driver suitable). Anybody have any idea? Thanks. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Forcing authentication
... It really depends on how you have done the coding of the classes and what kind of framework (struts?, other?) you used for the webapp. The idea is simple though. when the form is submitted, you need to have a method that: 1) queries a datastore for username/password 2) does something if username/password FOUND or 3) does something if username/password NOT FOUND What you need to do is split that method up into two seperate methods. Then, for the registration process you need a method that: 1) inserts the username/password into a datastore 2) does the same as #2 above. This can be as simple as calling a common method in the class or as complex as (if using struts for example) re-forwarding the request, constructing the url appropriately (Ex: http://localhost/mywebapp/login.do?username=mikepassword=secret If i knew more about your framework and how you've got you classes written I could help you more. mike/ -Original Message- From: Guillermo Payet [mailto:[EMAIL PROTECTED]] Sent: Wednesday, August 07, 2002 12:47 PM To: [EMAIL PROTECTED] Subject: Forcing authentication Hi, I've asked this one before, but got no answers, so here goes an abridged version. I'd like to force a FORM authentication by somehow calling /login/j_security_check from a jsp page, or doing something equivalent, so that the application can decide to force the authentication of a session in some cases, whithout the user having to go through the login form. We're using Tomcat 4.0.3 I found this pointer to a purported solution to our problem: http:[EMAIL PROTECTED]%3E But it ain't working. I've tried all kinds of variations on this, but I cannot figure out how to make it work. It seems that once a request is matched against auth constraints, (which happens when the registration page is first loaded) it will not be matched again. This means that any redirection of the request to j_security_check just returns a 404, since authenticate() is never called again and so it fails to intercept the request and authenticate the session. Any ideas?? Any help is appreciated! thanks! --Guillermo Payet -- Guillermo Payet O C E A NG R O U P email: [EMAIL PROTECTED] web: http://www.oceangroup.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Oracle 8.1.7 JDBC classes
users, This may sound stupid but did the classname of the driver change? like in the previous version it was com.oracle.sql.Driver and in the new version it's COM.oracle.sql.OracleDriver? I highly doubt it but it's another idea. mike/ -Original Message- From: Ralph Einfeldt [mailto:[EMAIL PROTECTED]] Sent: Friday, August 02, 2002 6:49 AM To: Tomcat Users List Subject: AW: Oracle 8.1.7 JDBC classes Which tomcat version do you use. as far as I can remember at least one tomcat version ignored any jar in the tomcat directories that contained certain classes (java.sql.* I believe). Compare the contents of the two oracle jars to see if something changed in this respect. -Ursprüngliche Nachricht- Von: Roland Carlsson [mailto:[EMAIL PROTECTED]] Gesendet: Freitag, 2. August 2002 13:38 An: Tomcat Users List Betreff: Re: Oracle 8.1.7 JDBC classes I have tride to put the 8.1.7 version of the jdbcdriver in the %catalina_home%/common/lib/ but i still get a ClassNotFoundException. When putting the old 8.1.5 version there it works like a charm -- 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]
apache + tomcat 4.1.7
I've seen tons of posts about apache2 and tomcat 4.0.x. what about tomcat 4.1.7? will the same techniques apply? mike/ -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
webapp startup problem w Tomcat4.1.7
users, I've started developing with tomcat-4.1.7 with jdk1.4.1b14 on windows2000. i'm deployed in this directory: C:\apps\Tomcat\jakarta-tomcat-4.1.7\webapps\diary. Tomcat outputs to it's log file the following error when trying to deploy a webapp. Anyone have an idea about this one? 2002-08-02 10:06:29 ContextConfig[/diary] Exception processing JAR at resource path /WEB-INF/lib/MossLibrary.jar javax.servlet.ServletException: Exception processing JAR at resource path /WEB-INF/lib/MossLibrary.jar at org.apache.catalina.startup.ContextConfig.tldScanJar(ContextConfig.java:930) at org.apache.catalina.startup.ContextConfig.tldScan(ContextConfig.java:868) at org.apache.catalina.startup.ContextConfig.start(ContextConfig.java:647) at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:243) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:166) at org.apache.catalina.core.StandardContext.start(StandardContext.java:3445) 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:2185) 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 sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203) - Root Cause - java.io.IOException: The system cannot find the path specified at java.io.WinNTFileSystem.createFileExclusively(Native Method) at java.io.File.checkAndCreate(File.java:1313) at java.io.File.createTempFile(File.java:1401) at java.io.File.createTempFile(File.java:1438) at sun.net.www.protocol.jar.URLJarFile$1.run(URLJarFile.java:169) at java.security.AccessController.doPrivileged(Native Method) at sun.net.www.protocol.jar.URLJarFile.retrieve(URLJarFile.java:164) at sun.net.www.protocol.jar.URLJarFile.getJarFile(URLJarFile.java:42) at sun.net.www.protocol.jar.JarFileFactory.get(JarFileFactory.java:78) at sun.net.www.protocol.jar.JarURLConnection.connect(JarURLConnection.java:85) at sun.net.www.protocol.jar.JarURLConnection.getJarFile(JarURLConnection.java:69) at org.apache.catalina.startup.ContextConfig.tldScanJar(ContextConfig.java:906) at org.apache.catalina.startup.ContextConfig.tldScan(ContextConfig.java:868) at org.apache.catalina.startup.ContextConfig.start(ContextConfig.java:647) at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:243) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:166) at org.apache.catalina.core.StandardContext.start(StandardContext.java:3445) 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:2185) 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 sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203) -Original Message- From: Milt Epstein [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 31, 2002 11:01 PM To: Tomcat Users List Subject: Apache Authentication for Tomcat This is an addition to a thread from a day or two ago. I didn't pay much attention to it then, because it wasn't something I needed to worry about
RE: Classpath Woes...
Hi, Another great example of why I strongly advocate *against* the use if ide's!! Mike -Original Message- From: Ben Boule [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 30, 2002 5:06 PM To: '[EMAIL PROTECTED]' Subject: Classpath Woes... Hi, I was wondering if anyone could help me out with a problem with Tomcat 3.3.x. We've developed our application under the Tomcat 3.2.x implementation that is integrated into JBuilder 6. We use Struts for our framework. The application works fine in that environment. I am now trying to set up the deployment, and we wanted to use either Tomcat 3.3.x or Tomcat 4.0.x.Tomcat 4 seems to have issues with our ORB implementation (Borland) so for now I am working with 3.3.x. The problem is that when the application goes to compile a .jsp file for the first time, it encounters a ClassNotFoundException trying to find a Jasper class, JspServlet. e.x. (from the std output) 2002-07-30 17:58:30 - Ctx(/app name) : Class not found: org.apache.jasper.servlet.JspServlet If I copy the jasper.jar file from $TOMCAT_HOME/lib/container into app name/WEB-INF/lib, then the Jasper classes are not found. However, this results in another class not found exception, this time it can't find the classes for the javac compiler! (sun.tools.something) If I then copy the tools.jar file from the JDK 1.3 distribution into the WEB-INF/lib directory, everything works. This would obviously seem to be an unacceptable solution however. I can't figure out why this is happening. It doesn't happen with the example applications under the exact same environment. (JAVA_HOME is set to point to JDK 1.3.1, TOMCAT_HOME is set to the right directory as well.) I have read the classloader-howto several times but I can't figure out what's wrong. Thanks, Ben Boule -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: putting custom code in front of Struts Main Servlet
What I did is extend the org.apache.struts.action.ActionServlet override the init() method and then in WEB-INF/web.xml use the name of your class for the servlet-class.../servlet-class entry. Mike -Original Message- From: Chris Ruegger [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 31, 2002 8:18 AM To: Tomcat Users List Subject: putting custom code in front of Struts Main Servlet This is a bit off topic but we are using Tomcat with Struts. We want to be able to always execute some code before the Struts servlet is invoked, to check for things like lost session, permission, etc. What is the best way to do this? I'm thinking either have a servlet that we send everything to, then have it call the Struts servlet, or use servlet filters somehow (have not used them yet but vaguely familiar with them) What approaches have others used for this? Thanks -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
share session between webapps
... Is there technique to share a session, or objects within the session between web applications? What I want to do is login or register at a site and if the user moves to a different webapp, I want to be able to determine, by looking for an object in the user's session, that they are already logged in. Using realms and single sign on doesn't appear to do what I want because it A) doesn't allow me to get me the primary key for the user, B) doesn't allow me to write any special processing code, specifically to md5 encrypt the password before performing the query. C) most importantly, it doesn't seem to allow me to carry information accross webapps. mike/ -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Connection between TOMCAT and DB2 ???
... Here's a thought. are the drivers for DB2 100% java native. I'm remembering a problem a colleage of mind had using the the jdbc drivers for a database named Progress. It turns out they were not 100% java and relied on calls to native libraries. If you're running on windows it'll be a dll or something. mike/ -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 31, 2002 8:46 AM To: Tomcat Users List Subject: RE: Connection between TOMCAT and DB2 ??? Hello John, It was a nice thinking but I didn't worked. It is not finding the driver even now...I tried printing the classpath..though it shows the all 3 .jar files included but it is working only in %SQLLIB%\bin directory that is if I try to run my file by keeping it in %SQLLIB%\bin directory it worked fine and retieve resultsets from database but not from TOMCAT_HOME directory... Any other tries..? Nishant Awasthi Corporate Systems Development Progressive Insurance Turner, JohnTo: 'Tomcat Users List' JTurner@AAS.[EMAIL PROTECTED] com cc: (bcc: Nishant Awasthi) Subject: RE: Connection between TOMCAT and 07/31/2002 DB2 ??? 09:27 AM Please respond to Tomcat Users List Try renaming your .zip files to .jar files. Just change the extension from .zip to .jar without changing the files themselves. John Turner [EMAIL PROTECTED] -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 31, 2002 9:22 AM To: [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: Connection between TOMCAT and DB2 ??? Hello everyone... thanks for showing interest in the list and to make it grow... I have a situation here. I am using tomcat 4.0.3 and jdk 1.3.1_04. I want to write a soap service which will bring the resultset from IBM DB2 database. Before implementing soap I am writing a simple Java Ndb2servlet.java file inside %TOMCAT_HOME%\webapps\soap\WEB-INF\classes Now it compile fine but when I try to run it it says: COMPILING C: \jakarta-tomcat-4.0.4\webapps\soap\WEB-INF\classesjavac Ndb2servlet.java RUNNING C:\jakarta-tomcat-4.0.4\webapps\soap\WEB-INF\classesjava Ndb2servlet SQL Exception: No suitable driver I have tried to put db2java.zip, runtime.zip and sqlj.zip in %TOMCAT_HOME% \common\lib and and also included in system classpath then restarted TOMCAT but still it couldn't find driver. DO I need to do something special for my JAVA file in tomcat to find DB2driver Please help thanks Nishant Awasthi Corporate Systems Development Progressive Insurance -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Connection between TOMCAT and DB2 ???
.. I'm going to bet it's because of Program Files try putting it in a directory without spaces or use progra~1 in place of Program Files mike/ -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 31, 2002 9:35 AM To: Tomcat Users List Subject: RE: Connection between TOMCAT and DB2 ??? Hello Mark, I am currently using COM.ibm.db2.jdbc.app.DB2Driver driver to run my simple java program for establishing DB2-Tomcat connectivity. I tried changing it to COM.ibm.db2.jdbc.net.DB2Driver still it says, No suitable driver I think my tomcat is not able to find out db2java.zip file which is placed in C:\Program Files\SQLLIB\java DO I need to add some contextpath in server.xml of TOMCAT to tell tomcat to look for DB2 jdbc driver in %SQLLIB%\java directory? I was looking at server.xml in TOMCAT and found that there is something called Realm / comment above which says !-- Replace the above Realm with one of the following to get a Realm stored in a database and accessed via JDBC -- I tried changing it to DB2 compatible information..but didn't worked...I had problem starting tomcat... Can you guide me in some other way? Nishant Awasthi Corporate Systems Development Progressive Insurance Sullivan, Mark E Mark.Sullivan@nav-internatTo: 'Tomcat Users List' ional.com [EMAIL PROTECTED] cc: (bcc: Nishant Awasthi) 07/31/2002 09:54 AMSubject: RE: Connection between TOMCAT and Please respond to Tomcat DB2 ??? Users List Who's DB2 jdbc driver are you trying to use? If you're using the IBM implementation, you can either load the COM.ibm.db2.jdbc.net.DB2Driver or the COM.ibm.db2.jdbc.app.DB2Driver If you use the wrong one, you will get a No suitable driver exception. The correct one depends on the situation, and in this case it's probably the .net one. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 31, 2002 8:46 AM To: Tomcat Users List Subject: RE: Connection between TOMCAT and DB2 ??? Hello John, It was a nice thinking but I didn't worked. It is not finding the driver even now...I tried printing the classpath..though it shows the all 3 .jar files included but it is working only in %SQLLIB%\bin directory that is if I try to run my file by keeping it in %SQLLIB%\bin directory it worked fine and retieve resultsets from database but not from TOMCAT_HOME directory... Any other tries..? Nishant Awasthi Corporate Systems Development Progressive Insurance Turner, JohnTo: 'Tomcat Users List' JTurner@AAS.[EMAIL PROTECTED] com cc: (bcc: Nishant Awasthi) Subject: RE: Connection between TOMCAT and 07/31/2002 DB2 ??? 09:27 AM Please respond to Tomcat Users List Try renaming your .zip files to .jar files. Just change the extension from .zip to .jar without changing the files themselves. John Turner [EMAIL PROTECTED] -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 31, 2002 9:22 AM To: [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: Connection between TOMCAT and DB2 ??? Hello everyone... thanks for showing interest in the list and to make it grow... I have a situation here. I am using tomcat 4.0.3 and jdk 1.3.1_04. I want to write a soap service which will bring the resultset from IBM DB2 database. Before implementing soap I am writing a simple Java Ndb2servlet.java file inside %TOMCAT_HOME%\webapps\soap\WEB-INF\classes Now it compile fine but when I try to run it it says: COMPILING C: \jakarta-tomcat-4.0.4\webapps\soap\WEB-INF\classesjavac Ndb2servlet.java RUNNING C:\jakarta-tomcat-4.0.4\webapps\soap\WEB-INF\classesjava
RE: Connection between TOMCAT and DB2 ???
No, It should be as simple as dropping the xxx.jar file (if it's xxx.zip rename it to xxx.jar!) into the %TOMCAT_HOME%/common/lib directory. I would do/verify the following 1) put tomcat in a directory structure where the names of the directories don't contain spaces 2) make sure TOMCAT_HOME is set 3) make sure CATALINA_HOME=%TOMCAT_HOME% 4) copy xxx.jar to %TOMCAT_HOME%/common/lib 5) open a new DOS window to get the new values of the environment variables 6) change directory to %TOMCAT_HOME%/bin 7) issue c:\..catalina.bat run 8) if it's still not working it's probably becuase the drivers are not 100% java and rely on native method calls to some dll. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 31, 2002 9:40 AM To: Tomcat Users List Subject: RE: Connection between TOMCAT and DB2 ??? Mike I don't understand by what you mean by 100% java native. But yes I am sure that if I run my java code by placing my java file in C:\Program Files\SQLLIB\bin directory it works absolutely fine hence I can say it is java native to DB2 directory. But I cannot make the same file run from outside the DB2 realm...that is when I place same java file in TOMCAT_HOME directory it doesnot find the driver... DO I need to make changes in my server.xml file in %TOMCAT_HOME%\conf and add some context ot do I need to add some Realm information ??? Thanks Nishant Awasthi Corporate Systems Development Progressive Insurance Michael Remijan Michael.Remijan@soTo: Tomcat Users List locup.com [EMAIL PROTECTED] cc: (bcc: Nishant Awasthi) 07/31/2002 10:13 AMSubject: RE: Connection between TOMCAT and Please respond to DB2 ??? Tomcat Users List ... Here's a thought. are the drivers for DB2 100% java native. I'm remembering a problem a colleage of mind had using the the jdbc drivers for a database named Progress. It turns out they were not 100% java and relied on calls to native libraries. If you're running on windows it'll be a dll or something. mike/ -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 31, 2002 8:46 AM To: Tomcat Users List Subject: RE: Connection between TOMCAT and DB2 ??? Hello John, It was a nice thinking but I didn't worked. It is not finding the driver even now...I tried printing the classpath..though it shows the all 3 .jar files included but it is working only in %SQLLIB%\bin directory that is if I try to run my file by keeping it in %SQLLIB%\bin directory it worked fine and retieve resultsets from database but not from TOMCAT_HOME directory... Any other tries..? Nishant Awasthi Corporate Systems Development Progressive Insurance Turner, JohnTo: 'Tomcat Users List' JTurner@AAS.[EMAIL PROTECTED] com cc: (bcc: Nishant Awasthi) Subject: RE: Connection between TOMCAT and 07/31/2002 DB2 ??? 09:27 AM Please respond to Tomcat Users List Try renaming your .zip files to .jar files. Just change the extension from .zip to .jar without changing the files themselves. John Turner [EMAIL PROTECTED] -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 31, 2002 9:22 AM To: [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: Connection between TOMCAT and DB2 ??? Hello everyone... thanks for showing interest in the list and to make it grow... I have a situation here. I am using tomcat 4.0.3 and jdk 1.3.1_04. I want to write a soap service which will bring the resultset from IBM DB2 database. Before implementing soap I am writing a simple Java Ndb2servlet.java file inside %TOMCAT_HOME%\webapps\soap\WEB-INF\classes Now it compile fine but when I try to run it it says: COMPILING C: \jakarta-tomcat-4.0.4\webapps\soap
RE: AW: Connection between TOMCAT and DB2 ???
the dll needs to be part of the PATH environment variable (refer to that website below) so *prepend* %SQLLIB%\lib to PATH and see what happens. mike/ -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 31, 2002 11:05 AM To: Tomcat Users List Subject: Re: AW: Connection between TOMCAT and DB2 ??? Hello Ralph, I already have the suitable db2jdbc.dll file in my %SQLLIB%\lib directory It also have all the suitable .jar files in its place. What I think is getting qorng is the URL connection string.. String url = jdbc:db2:sample ; I also tried writing follwing in place of above setting: //jdbc:db2://n5533030:5/sample; But nothing works... Thanks for consistently helping me... Nishant Awasthi Corporate Systems Development Progressive Insurance Ralph Einfeldt ralph.einfeldt@uptiTo: Tomcat Users List me-isc.de [EMAIL PROTECTED] cc: (bcc: Nishant Awasthi) 07/31/2002 11:51 AM Subject: AW: Connection between TOMCAT and Please respond to DB2 ??? Tomcat Users List According to http://www-3.ibm.com/software/data/db2/java/v5/faq.html#q7 it's a native driver. The page also has a list how the libraries are called under wich os. Find this file and add the directory that contains this file to the (library) path. -Ursprüngliche Nachricht- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Gesendet: Mittwoch, 31. Juli 2002 17:42 An: Tomcat Users List Betreff: RE: Connection between TOMCAT and DB2 ??? -- 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]
simple example of using SingleSignOn
users, Would it be possible for someone to post an example of the use of the SingleSignOn valve, Valve className=org.apache.catalina.authenticator.SingleSignOn debug=0/ including the example webapp and the files: $TOMCAT_HOME/conf/server.xml $TOMCAT_HOME/conf/web.xml thanks mike/ -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Native OS authentication using single sign on ...
I've been following these posts closely because I want to do basically the same thing as well. My stupid question is what happens after you submit the form?? What I would like to do is create an Object and put it in the users session. However, if the user goes click on a link that takes them to another webapp, will the object that I put in the session still be available?? Single Sign On is great but if I can't passes a shared object around via the session (or some other technique) it doesn't do me any good. Mike -Original Message- From: HAVENS,PETER (HP-Cupertino,ex3) [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 30, 2002 1:53 PM To: '[EMAIL PROTECTED]' Subject: Native OS authentication using single sign on ... I am currently trying to authenticate multiple webapps under a single authentication mechanism. That is login once and you can access all of the webapps under a given virtual host. I have enabled single sign on in the server.xml file and I have added a security-constraint and login-config in my conf/web.xml file. Everything is working great and it is authenticating users against the conf/tomcat-users.xml file. Now I want to take the next step to do native OS authentication using a JNI to a C or C++ module that uses PAM. How do I change my login.jsp page pointed to by the login-config to call a bean instead of just authenticating against the tomcat-users.xml? Any input would be greatly appreciated. I have included part of my conf/web.xml and my login.jsp. Thanks in advance. -Peter --Portion of conf/web.xml- security-constraint display-nameGryphon Authentication/display-name web-resource-collection web-resource-nameProtected Area/web-resource-name !-- Define the context-relative URL(s) to be protected -- url-pattern/*/url-pattern !-- If you list http methods, only those methods are protected -- http-methodGET/http-method http-methodDELETE/http-method http-methodPOST/http-method http-methodPUT/http-method /web-resource-collection auth-constraint !-- Anyone with one of the listed roles may access this area -- role-name*/role-name /auth-constraint /security-constraint !-- Default login configuration uses form-based authentication -- login-config auth-methodFORM/auth-method realm-nameGryphon Form-Based Authentication/realm-name form-login-config form-login-page/login.jsp/form-login-page form-error-page/error.jsp/form-error-page /form-login-config /login-config end of conf/web.xml login.jsp- html head titleLogin Page/title body bgcolor=white form method=POST action='%= response.encodeURL(j_security_check) %' table border=0 cellspacing=5 tr th align=rightUsername:/th td align=leftinput type=text name=j_username/td /tr tr th align=rightPassword:/th td align=leftinput type=password name=j_password/td /tr tr td align=rightinput type=submit value=Log In/td td align=leftinput type=reset/td /tr /table /form % if ( ! request.isSecure() ) { // Forward to a secure page String sslURL = https://; + request.getServerName() + :1188 + request.getRequestURI(); % brbr brbWARNING:/b This is a non-secure page! brbr brClick a href=%= sslURL %here/a to use SSL. brbr % } % /body /html -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: $20 bucks to the 1st person who actually solves my problem!!!
David, This might be worth a shot. in the page you want reloaded, try adding in this head META HTTP-EQUIV = "Pragma" CONTENT="no-cache" /head this meta tag forces no cache of the page so it is suppose to be refreshed from the server everytime. Let me know if this help. Mike -Original Message- From: Adress, David S. [mailto:[EMAIL PROTECTED]] Sent: Friday, December 08, 2000 7:29 AM To: '[EMAIL PROTECTED]'; 'JRun-Talk' Subject: $20 bucks to the 1st person who actually solves my problem!!! I am on this for days and I can't figure out what I'm doing wrong. I will send $20 bucks to 1st person who actually solves my problem. I am using jsp page's to control the layout of my page and servlets to spit back table data or to do database transactions. I have a jsp page that displays a list of employees. The jsp page has an include statement to include the servlet to spit out the table. The jsp just handles the general look of the page and the servlet just spits out the table and table html tags. Next to each record I have an add and delete hyperlink. If someone clicks the add link it displays another page to add an employee and then the action servlet adds the record and then goes back to the jsp list page. If some one deletes a record it calls a servlet to delete and then the servlet redirects back to the jsp list page. But the list doesn't display the updated data without having me hit the refresh button in the browser. I tried using Tomcat and now am using Jrun and am still having the same problem. I've included all the proper meta tags in the jsp list page not to cache but it's not working. I've also tries doing it with reponse.setHeader but it doesn't work either. I've tried sending a random number param to the page ShowList?rnd=Randomnumber it still doesn't work.
servlet or page target _top in IE
Hi, Ok, in Navigator I can use META HTTP-EQUIV="Window-target" CONTENT="_top" and have a servlet call a page and have that page not be in a frame. As usual, Navigator and IE don't agree. IE ignores this META tag so the page still appears in the frame. I also tried response.setHeader("Window-target", "_top"); but that doesn't work for Navigator or IE. So anyone know how to target _top? Michael J. Remijan Software Engineer dChain Commerce 2401 South Neil Street Champaign, IL 61820 217.398.1860 x249
servlet or page target _top in IE
Hi, Ok, in Navigator I can use META HTTP-EQUIV="Window-target" CONTENT="_top" and have a servlet call a page and have that page not be in a frame. As usual, Navigator and IE don't agree. IE ignores this META tag so the page still appears in the frame. I also tried response.setHeader("Window-target", "_top"); but that doesn't work for Navigator or IE. So anyone know how to target _top? Michael J. Remijan Software Engineer dChain Commerce 2401 South Neil Street Champaign, IL 61820 217.398.1860 x249