RE: Error while running JSP's on tomcat 3.2.4
Hi, Which version of Java do you have. I see that there is no direct reference to any format function in JspCalendar.java. From the stack trace, it appears that the error occurs somewhere in org.apache.jasper.Constant.getString(). The problem might be that you have some setting in your server.xml or web.xml file that is not well formed or something. The Jasper API has the following information for the getString() functions: Format the string that is looked up using key using args. ..and.. Get hold of a message or any string from our resources database I've got no idea though were it is trying to get a message from in the resource database. My guess would be with some Locale specific string. Try setting your Locale to en_UK or en_US and see what happens. The java.text.Format.format I guess comes from the java.text.DateFormat class, which uses the Locale information supplied by the call to org.apache.jasper.Constants.getString(). Hope some of this help. Paul -Original Message- From: Gupta, Ashish (CORP, Consultant) [mailto:[EMAIL PROTECTED]] Sent: 17 February 2003 19:59 To: Tomcat Users List Subject: RE: Error while running JSP's on tomcat 3.2.4 Hi Paul, The Code is as follows :- html !-- Copyright (c) 1999 The Apache Software Foundation. All rights reserved. -- %@ page session=false% body bgcolor=white jsp:useBean id='clock' scope='page' class='dates.JspCalendar' type=dates.JspCalendar / font size=4 ul liDay of month: is jsp:getProperty name=clock property=dayOfMonth/ liYear: is jsp:getProperty name=clock property=year/ liMonth: is jsp:getProperty name=clock property=month/ liTime: is jsp:getProperty name=clock property=time/ liDate: is jsp:getProperty name=clock property=date/ liDay: is jsp:getProperty name=clock property=day/ liDay Of Year: is jsp:getProperty name=clock property=dayOfYear/ liWeek Of Year: is jsp:getProperty name=clock property=weekOfYear/ liera: is jsp:getProperty name=clock property=era/ liDST Offset: is jsp:getProperty name=clock property=DSTOffset/ liZone Offset: is jsp:getProperty name=clock property=zoneOffset/ /ul /font /body /html -Original Message- From: Paul Bothma [mailto:[EMAIL PROTECTED]] Sent: Monday, February 17, 2003 12:50 PM To: Tomcat Users List Subject: RE: Error while running JSP's on tomcat 3.2.4 Hi, Could you please post the JSP file. The problem appears to be with a MessageFormat.format() call in your code somewhere. Paul -Original Message- From: Gupta, Ashish (CORP, Consultant) [mailto:[EMAIL PROTECTED]] Sent: 17 February 2003 15:24 To: [EMAIL PROTECTED] Subject: Error while running JSP's on tomcat 3.2.4 Hello All, I have an installation of Tomcat 3.2.4 on a windows 2000 professional box. The server parses the HTML pages fine, however on parsing the JSP pages i get the following error: Error: 500 Location: /examples/jsp/dates/date.jsp Internal Servlet Error: org.apache.jasper.JasperException: Unable to compile class for JSP at org.apache.jasper.servlet.JspServlet.doLoadJSP(JspServlet.java:630) at org.apache.jasper.servlet.JasperLoader.loadJSP(JasperLoader.java:332) at org.apache.jasper.servlet.JspServlet.loadJSP(JspServlet.java:542) at org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary(JspSe rvlet.java:258) at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.ja va:268) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:429) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:500) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405) at org.apache.tomcat.core.Handler.service(Handler.java:287) at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372) at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:80 6) at org.apache.tomcat.core.ContextManager.service(ContextManager.java:752) at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpC onnectionHandler.java:213) at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416) at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:501) at java.lang.Thread.run(Thread.java:474) Root cause: java.lang.IllegalArgumentException: Unknown argument at java.text.MessageFormat.format(MessageFormat.java:643) at java.text.MessageFormat.format(MessageFormat.java:449) at java.text.Format.format(Format.java:128) at org.apache.jasper.Constants.getString(Constants.java:211) at org.apache.jasper.Constants.message(Constants.java:247) at org.apache.jasper.compiler.JspParseEventListener.handleDirective(JspParseEve ntListener.java:677
RE: Tomcat querry
Hi, Look in the file /conf/tomcat-users.xml. If you want to use the Tomcat Administration or Manager tools, you will need something like this: ?xml version='1.0' encoding='utf-8'? tomcat-users role rolename=tomcat/ role rolename=role1/ role rolename=manager/ role rolename=admin/ user username=tomcat password=tomcat roles=tomcat/ user username=role1 password=tomcat roles=role1/ user username=both password=tomcat roles=tomcat,role1/ user username=root password=root roles=admin,manager/ /tomcat-users You can also look at: http://localhost:8080/tomcat-docs/realm-howto.html, for other methods of adding users, i.e. JDBC. Regards, Paul. -Original Message- From: Jayanshu Gandhi [mailto:[EMAIL PROTECTED]] Sent: 18 February 2003 07:36 To: [EMAIL PROTECTED] Subject: Tomcat querry Dear Sir, I have installed tomcat-4.1.18 on red hat linux-8.0 My problem is how to set password and username for administrator and manager and also for other users and group. Kindly show me steps. Thanking you, Jayanshu Gandhi __ Do you Yahoo!? Yahoo! Shopping - Send Flowers for Valentine's Day http://shopping.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Using Tomcat as a service in Windows 2000
Hi, Here is some docs on using IIS and Tomcat. http://paul.xtracker.co.za/iis.zip Paul -Original Message- From: AllStarRewards, Inc. Tech Support [mailto:[EMAIL PROTECTED]] Sent: 18 February 2003 10:26 To: [EMAIL PROTECTED] Subject: Using Tomcat as a service in Windows 2000 Hello, I'm trying to run Tomcat as a service on Windows 2000 Server and am having a few difficulties. I have the wrapper.properties setup and working properly and the jk_nt_service file installed as a service, but the service will not run. My configuration is as follows: Server running Windows 2000 Server and Tomcat 4.1.12 Any help would be appreciated. Thanks. Michael --- AllStarRewards, Inc. Michael D Downing - CTO 3900 Crosby Dr, Suite 2204 Telephone: 859-272-9393 Lexington, KY 40515 Toll Free: 877-834-2003 Fax: 859-273-3662 Email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Error while running JSP's on tomcat 3.2.4
Hi, Could you please post the JSP file. The problem appears to be with a MessageFormat.format() call in your code somewhere. Paul -Original Message- From: Gupta, Ashish (CORP, Consultant) [mailto:[EMAIL PROTECTED]] Sent: 17 February 2003 15:24 To: [EMAIL PROTECTED] Subject: Error while running JSP's on tomcat 3.2.4 Hello All, I have an installation of Tomcat 3.2.4 on a windows 2000 professional box. The server parses the HTML pages fine, however on parsing the JSP pages i get the following error: Error: 500 Location: /examples/jsp/dates/date.jsp Internal Servlet Error: org.apache.jasper.JasperException: Unable to compile class for JSP at org.apache.jasper.servlet.JspServlet.doLoadJSP(JspServlet.java:630) at org.apache.jasper.servlet.JasperLoader.loadJSP(JasperLoader.java:332) at org.apache.jasper.servlet.JspServlet.loadJSP(JspServlet.java:542) at org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary(JspSe rvlet.java:258) at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.ja va:268) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:429) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:500) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405) at org.apache.tomcat.core.Handler.service(Handler.java:287) at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372) at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:80 6) at org.apache.tomcat.core.ContextManager.service(ContextManager.java:752) at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpC onnectionHandler.java:213) at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416) at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:501) at java.lang.Thread.run(Thread.java:474) Root cause: java.lang.IllegalArgumentException: Unknown argument at java.text.MessageFormat.format(MessageFormat.java:643) at java.text.MessageFormat.format(MessageFormat.java:449) at java.text.Format.format(Format.java:128) at org.apache.jasper.Constants.getString(Constants.java:211) at org.apache.jasper.Constants.message(Constants.java:247) at org.apache.jasper.compiler.JspParseEventListener.handleDirective(JspParseEve ntListener.java:677) at org.apache.jasper.compiler.DelegatingListener.handleDirective(DelegatingList ener.java:116) at org.apache.jasper.compiler.Parser$Directive.accept(Parser.java:215) at org.apache.jasper.compiler.Parser.parse(Parser.java:1077) at org.apache.jasper.compiler.Parser.parse(Parser.java:1042) at org.apache.jasper.compiler.Parser.parse(Parser.java:1038) at org.apache.jasper.compiler.Compiler.compile(Compiler.java:209) at org.apache.jasper.servlet.JspServlet.doLoadJSP(JspServlet.java:612) at org.apache.jasper.servlet.JasperLoader.loadJSP(JasperLoader.java:332) at org.apache.jasper.servlet.JspServlet.loadJSP(JspServlet.java:542) at org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary(JspSe rvlet.java:258) at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.ja va:268) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:429) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:500) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405) at org.apache.tomcat.core.Handler.service(Handler.java:287) at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372) at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:80 6) at org.apache.tomcat.core.ContextManager.service(ContextManager.java:752) at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpC onnectionHandler.java:213) at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416) at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:501) at java.lang.Thread.run(Thread.java:474) I have been trying to figure out the cause of the problem but in vain. Would appreciate any help or clues as to what the problem might be. Thanks, Ashish - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
JAR problems with Tomcat 4.1.12 on Redhat 7.1
Hi, This is a two part question, although I think the problems are related. I'm using Tomcat 4.1.12 on Redhat 7.1 and JDK 1.4.1 RPM. Tomcat starts up fine except for the following errors: The /admin context doesn't want to load due to the following error: 2003-02-18 09:00:34 WebappLoader[/admin]: Deploying class repositories to work directory /usr/jakarta-tomcat-4.1.12/work/Standalone/localhost/admin 2003-02-18 09:00:34 WebappLoader[/admin]: Deploy class files /WEB-INF/classes to /usr/jakarta-tomcat-4.1.12/webapps/../server/webapps/admin/WEB-INF/classes 2003-02-18 09:00:34 WebappLoader[/admin]: Deploy JAR /WEB-INF/lib/struts.jar to /usr/jakarta-tomcat-4.1.12/webapps/../server/webapps/admin/WEB-INF/lib/strut s.jar 2003-02-18 09:00:34 ContextConfig[/admin] Exception processing JAR at resource path /WEB-INF/lib/struts.jar javax.servlet.ServletException: Exception processing JAR at resource path /WEB-INF/lib/struts.jar .. - Root Cause - java.io.IOException: No such file or directory at java.io.UnixFileSystem.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) The struts.jar file is located in /server/webapps/admin/WEB-INF/lib, not sure if the part: /WEB-INF/lib/struts.jar to /usr/jakarta-tomcat-4.1.12/webapps/../server/webapps/admin/WEB-INF/lib/strut s.jar, is correct though. I didn't make any changes to /conf/server.xml and the directory structure has not been altered either, so I can't see why this shouldn't work. The rest of Tomcat works, for exaple the /manager context works fine, and can be accessed via: http://localhost:8080/manager/. The other problem is that when I try to compile some JAVA classes that I wrote located in /HP/WEB-INF/classes using the following command: $JAVA_HOME/bin/javac -classpath $PATH_TO_LIB/servlets.jar $PATH_TO_WEB-INF/classes/*.java, I get the following error: Permission denied (I'm running all of this as root). Then I did chmod a+x servlets.jar, and then I get the following: Cannot execute a binary file. The file location is correct, etc. I think there is something wrong with the handling of JAR files, becuase I can't connection to a MySQL database using org.gjt.mm.Driver either. Doesn't give a ClassNotFoundException through. Anyway, if someone has any ideas, please help. Attached are the log files for the admin context and localhost. Thanks, Paul 2003-02-18 09:00:34 WebappLoader[/admin]: Deploying class repositories to work directory /usr/jakarta-tomcat-4.1.12/work/Standalone/localhost/admin 2003-02-18 09:00:34 WebappLoader[/admin]: Deploy class files /WEB-INF/classes to /usr/jakarta-tomcat-4.1.12/webapps/../server/webapps/admin/WEB-INF/classes 2003-02-18 09:00:34 WebappLoader[/admin]: Deploy JAR /WEB-INF/lib/struts.jar to /usr/jakarta-tomcat-4.1.12/webapps/../server/webapps/admin/WEB-INF/lib/struts.jar 2003-02-18 09:00:34 ContextConfig[/admin] Exception processing JAR at resource path /WEB-INF/lib/struts.jar javax.servlet.ServletException: Exception processing JAR at resource path /WEB-INF/lib/struts.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:3493) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:821) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:807) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:579) at org.apache.catalina.core.StandardHostDeployer.addChild(StandardHostDeployer.java:529) 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.commons.beanutils.MethodUtils.invokeMethod(MethodUtils.java:228) at org.apache.commons.digester.SetNextRule.end(SetNextRule.java:260) at org.apache.commons.digester.Digester.endElement(Digester.java:1036) at org.apache.xerces.parsers.AbstractSAXParser.endElement(AbstractSAXParser.java:579) at org.apache.xerces.impl.XMLNamespaceBinder.endElement(XMLNamespaceBinder.java:646) at org.apache.xerces.impl.dtd.XMLDTDValidator.handleEndElement(XMLDTDValidator.java:1972)
Apache 2 and Tomcat 4.1.12 on W2K
Hi, Senario: I want to use Apache as a front end server to server static content and Tomcat listening on port 8009 using mod_jk or perhaps another method to get Apache to forward *.jsp and /servlet requests to Tomcat. I'm using James 4.1.12 on W2K an would like to use the tomcat.conf-auto file. I've looked through the documentation for Tomcat but can't find out where I need to add the setting to enable Tomcat to create the file on startup. I've tried the Tomcat 3 method of using ApacheConfig confighome=c:/jakarta-tomcat/conf/ / in /conf/server.xml, but I can't still find the config file. Any idea what I need to do to create this file. FYI. I'm want to use the auto config file, because I'm having troubles using a file that I created manually for Apache. The problem is with the AddModule mod_jk.c line in /conf/httpd.conf. I've looked through Apache's docs and it appears that the AddModule statement has been removed. I guess that the mod_jk.dll only works for version 1.3 of Apache. (I did notice something in the Apache docs that there are some changes to how modules are loaded in v. 2). Any ideas on what can be done to get Tomcat and Apache 2 to work together. Thanks, Paul - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: servlets don't work in own webapp (finshed writing this time)
Hi, Look at the web.xml for /examples. You'll see that you need to map your servlet, etc. Looks something like this: servlet servlet-nameSendMailServlet/servlet-name servlet-classSendMailServlet/servlet-class /servlet servlet-mapping servlet-nameSendMailServlet/servlet-name url-pattern/SendMailServlet/url-pattern /servlet-mapping Hope this help. Paul -Original Message- From: Jaap Duursma [mailto:[EMAIL PROTECTED]] Sent: 15 February 2003 13:23 To: [EMAIL PROTECTED] Subject: servlets don't work in own webapp (finshed writing this time) (sorry for the first mail, i exedently pressed control-s, this time finished writing it) status : succesfully installed Tomcat 4.1.18, can access the webserver tru http://localhost:8180/ and the examples also work. problem : servlets don't work in my own webapp, jsp's do work. what I did : created own directory structure in the webapp folder (next to examples) : webapps/pso webapps/pso/WEB-INF/ webapps/pso/WEB-INF/classes with files : webapps/pso/Hello.jsp webapps/pso/WEB-INF/classes/HelloWorld.java (and .class) in conf/server.xml added the line : Context path=/pso docBase=pso debug=0 reloadable=true also copied the HelloWorld to the webapps/examples/WEB-INF/classes directory where I can access it succesfull at : http://localhost:8180/examples/servlets/HelloWorld but when I go to http://localhost:8180/pso/servlets/HelloWorld it doesn't work and gives me a 404 error, resource is not available. http://localhost:8180/pso/Hello.jsp does work. I tried everything, looked on the net and googled but no luck yet. Could really use some help. also tried to put the following web.xml in webapps/pso/WEB-INF/ ?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/j2ee/dtds/web-app_2_3.dtd; web-app /web-app Didn't make any difference. Probably do something wrong or overlooking something, but i cannot seem to find what. any help is appriciated. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat 4.1.12 Form authentication with IIS 5
Hi, I've changed the web.xml to the following: security-constraint display-nameHP Admin Security Constraint/display-name web-resource-collection web-resource-nameProtected Area/web-resource-name url-pattern/admin/index.jsp/url-pattern url-pattern/admin/products.jsp/url-pattern url-pattern/admin/groups.jsp/url-pattern /web-resource-collection auth-constraint role-nameadmin/role-name /auth-constraint /security-constraint login-config auth-methodFORM/auth-method realm-nameusers/realm-name form-login-config form-login-page/admin/login.jsp/form-login-page form-error-page/jsp/error.jsp?code=login/form-error-page /form-login-config /login-config !-- Security roles referenced by this web application -- security-role role-nameadmin/role-name /security-role , so as you can see the login.jsp page is not in the secured area any more. At the moment, I do get directed to the login.jsp but when I try to submit the form to 'j_security_check' I get the following error from IIS: HTTP 405 - Resource not allowed. When I modify uriworkermap.properties to include j_security_check, I get redirected to a '404' error from Tomcat (based on my error-page settings in web.xml). When I consult my MySQL logs I can see that Tomcat does not even reach the stage where it should try to authenticate using MySQL. Here is the relevant bit from my localhost_hp_log.txt Log starts--- 2003-02-14 10:15:23 Authenticator[/HP]: Security checking request POST /HP/admin/j_security_check 2003-02-14 10:15:23 Authenticator[/HP]: Already authenticated '' 2003-02-14 10:15:23 Authenticator[/HP]: Not subject to any constraint 2003-02-14 10:15:23 StandardContext[/HP]: Mapping contextPath='/HP' with requestURI='/HP/admin/j_security_check' and relativeURI='/admin/j_security_check' 2003-02-14 10:15:23 StandardContext[/HP]: Mapped to servlet 'default' with servlet path '/admin/j_security_check' and path info 'null' and update=true 2003-02-14 10:15:23 StandardContext[/HP]: Mapping contextPath='/HP' with requestURI='/HP/jsp/error.jsp' and relativeURI='/jsp/error.jsp' 2003-02-14 10:15:23 StandardContext[/HP]: Mapped to servlet 'jsp' with servlet path '/jsp/error.jsp' and path info 'null' and update=true Log ends--- Also, for some reason when I go to /admin it takes quite a long time (about 5 sec) to redirect me to login.jsp, whereas when I go to /admin on port 8080 it goes much quicker and it add the jsessionid= to the URL (which it doesn't do with IIS) Thanks, Paul -Original Message- From: Sean Dockery [mailto:[EMAIL PROTECTED]] Sent: 14 February 2003 04:08 To: Tomcat Users List Subject: Re: Tomcat 4.1.12 Form authentication with IIS 5 What happens when you move your form-login-page outside of the /admin/ folder? Sean Dockery [EMAIL PROTECTED] Certified Java Web Component Developer Certified Delphi Programmer SBD Consultants http://www.sbdconsultants.com - Original Message - From: Paul Bothma [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, February 13, 2003 06:11 Subject: Tomcat 4.1.12 Form authentication with IIS 5 Hi, I'm using Tomcat 4.1.12 with IIS 5. When I connect directly to http://localhost:8080/HP/admin/ the Tomcat FORM authentication works fine, but when I try to connect to http://localhost/HP/admin I get the following error: HTTP Status 403 - Access to the requested resource has been denied -- -- type Status report message Access to the requested resource has been denied description Access to the specified resource (Access to the requested resource has been denied) has been forbidden. -- -- Apache Tomcat/4.1.12 Here is the relevant extract from my web.xml file: security-constraint display-nameHP Administration/display-name web-resource-collection web-resource-nameProtected Area/web-resource-name url-pattern/admin/*/url-pattern /web-resource-collection auth-constraint role-nameHP_admin/role-name /auth-constraint /security-constraint login-config auth-methodFORM/auth-method realm-nameusers/realm-name form-login-config form-login-page/admin/login.jsp/form-login-page form-error-page/error.html/form-error-page /form-login-config /login-config !-- Security roles referenced by this web application -- security-role role-nameHP_admin/role-name /security-role I'm using the isapi_redirect.dll filter in IIS to redirect any request to *.jsp to Tomcat. (Works fine outside of the secure sections) Any ideas on how to correct this error. Paul - To unsubscribe
Tomcat 4.1.12 Form authentication with IIS 5
Hi, I'm using Tomcat 4.1.12 with IIS 5. When I connect directly to http://localhost:8080/HP/admin/ the Tomcat FORM authentication works fine, but when I try to connect to http://localhost/HP/admin I get the following error: HTTP Status 403 - Access to the requested resource has been denied type Status report message Access to the requested resource has been denied description Access to the specified resource (Access to the requested resource has been denied) has been forbidden. Apache Tomcat/4.1.12 Here is the relevant extract from my web.xml file: security-constraint display-nameHP Administration/display-name web-resource-collection web-resource-nameProtected Area/web-resource-name url-pattern/admin/*/url-pattern /web-resource-collection auth-constraint role-nameHP_admin/role-name /auth-constraint /security-constraint login-config auth-methodFORM/auth-method realm-nameusers/realm-name form-login-config form-login-page/admin/login.jsp/form-login-page form-error-page/error.html/form-error-page /form-login-config /login-config !-- Security roles referenced by this web application -- security-role role-nameHP_admin/role-name /security-role I'm using the isapi_redirect.dll filter in IIS to redirect any request to *.jsp to Tomcat. (Works fine outside of the secure sections) Any ideas on how to correct this error. Paul - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
JDBCRealm
Hi, I'm trying to use a JDBC realm with Tomcat 4.1.12. I've been able to use the XML based one in conf/tomcat-users.xml. I have created all the tables and inserted the users. Also, I know that Tomcat can connect to the database. The problem is that I'm not entirely sure what has to be changed in server.xml and also the web.xml files. Basically what happens is that the username and password get rejected, even though they are correctly inserted into the database called 'Tomcat'. The password is stored using plain text. The Realm tag is nested in Engine so it ought to be picked up, etc. This is the bit that I changed in server.xml: !-- Realm className=org.apache.catalina.realm.UserDatabaseRealm debug=0 resourceName=UserDatabase validate=true/ -- Realm className=org.apache.catalina.realm.JDBCRealm debug=99 driverName=org.gjt.mm.mysql.Driver connectionURL=jdbc:mysql://localhost/Tomcat?user=HPamp;password=123456 userTable=users usernameCol=user_name userCredCol=user_pass userRoleTable=user_roles roleNameCol=role_name resourceName=UserDatabase / Not sure what needs to be done to this bit: Server GlobalNamingResources Resource auth=Container description=User database name=UserDatabase scope=Shareable type=org.apache.catalina.UserDatabase/ ResourceParams name=UserDatabase parameter namefactory/name valueorg.apache.catalina.users.MemoryUserDatabaseFactory/value /parameter parameter namepathname/name valueconf/tomcat-users.xml/value /parameter /ResourceParams /GlobalNamingResources ... /Server And in web.xml I have the following: security-constraint display-nameHP Admin Security Constraint/display-name web-resource-collection web-resource-nameProtected Area/web-resource-name url-pattern/admin/*/url-pattern /web-resource-collection auth-constraint role-nameHP_admin/role-name /auth-constraint /security-constraint login-config auth-methodFORM/auth-method realm-nameHP Admin/realm-name form-login-config form-login-page/admin/login.jsp/form-login-page form-error-page/error.html/form-error-page /form-login-config /login-config !-- Security roles referenced by this web application -- security-role role-nameHP_admin/role-name /security-role Please help, Paul - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: JDBCRealm [SOLVED]
Oops, I made a case mistake with usernameCol=user_name, should be userNameCol=user_name Thanks. Paul -Original Message- From: Paul Bothma [mailto:[EMAIL PROTECTED]] Sent: 13 February 2003 17:02 To: Tomcat Help Subject: JDBCRealm Hi, I'm trying to use a JDBC realm with Tomcat 4.1.12. I've been able to use the XML based one in conf/tomcat-users.xml. I have created all the tables and inserted the users. Also, I know that Tomcat can connect to the database. The problem is that I'm not entirely sure what has to be changed in server.xml and also the web.xml files. Basically what happens is that the username and password get rejected, even though they are correctly inserted into the database called 'Tomcat'. The password is stored using plain text. The Realm tag is nested in Engine so it ought to be picked up, etc. This is the bit that I changed in server.xml: !-- Realm className=org.apache.catalina.realm.UserDatabaseRealm debug=0 resourceName=UserDatabase validate=true/ -- Realm className=org.apache.catalina.realm.JDBCRealm debug=99 driverName=org.gjt.mm.mysql.Driver connectionURL=jdbc:mysql://localhost/Tomcat?user=HPamp;password=123456 userTable=users usernameCol=user_name userCredCol=user_pass userRoleTable=user_roles roleNameCol=role_name resourceName=UserDatabase / Not sure what needs to be done to this bit: Server GlobalNamingResources Resource auth=Container description=User database name=UserDatabase scope=Shareable type=org.apache.catalina.UserDatabase/ ResourceParams name=UserDatabase parameter namefactory/name valueorg.apache.catalina.users.MemoryUserDatabaseFactory/value /parameter parameter namepathname/name valueconf/tomcat-users.xml/value /parameter /ResourceParams /GlobalNamingResources ... /Server And in web.xml I have the following: security-constraint display-nameHP Admin Security Constraint/display-name web-resource-collection web-resource-nameProtected Area/web-resource-name url-pattern/admin/*/url-pattern /web-resource-collection auth-constraint role-nameHP_admin/role-name /auth-constraint /security-constraint login-config auth-methodFORM/auth-method realm-nameHP Admin/realm-name form-login-config form-login-page/admin/login.jsp/form-login-page form-error-page/error.html/form-error-page /form-login-config /login-config !-- Security roles referenced by this web application -- security-role role-nameHP_admin/role-name /security-role Please help, Paul - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]