RE: Problem with running send mail jsp example
Do you have an SMTP server on your machine? -Original Message- From: phani [mailto:[EMAIL PROTECTED]] Sent: 18 June 2002 09:40 To: tomcat-user Subject: Problem with running send mail jsp example hi, I try to run the send mail example comes with tomcat 4.0. But i am getting follwoing exception. ENCOUNTERED EXCEPTION: javax.mail.SendFailedException: Sending failed; nested exception is: javax.mail.MessagingException: Could not connect to SMTP host: localhost, port: 25; nested exception is: java.net.ConnectException: Connection refused: connect javax.mail.SendFailedException: Sending failed; nested exception is: javax.mail.MessagingException: Could not connect to SMTP host: localhost, port: 25; nested exception is: java.net.ConnectException: Connection refused: connect at javax.mail.Transport.send0(Transport.java:219) at javax.mail.Transport.send(Transport.java:81) at SendMailServlet.doPost(Unknown Source) I changed the parameter in server.xml but no luck.. parameter namemail.smtp.host/name value192.168.1.91/value/parameter Where i went wrong? Thanks in advance phani DISCLAIMER This e-mail and any attachments thereto may contain information which is confidential and/or protected by intellectual property rights and are intended for the sole use of the recipient(s) named above. Any use of the information contained herein (including, but not limited to, total or partial reproduction, communication or distribution in any form) by persons other than the designated recipient(s) is prohibited. If you have received this e-mail in error, please notify the sender either by telephone or by e-mail and delete the material from any computer. Thank you for your cooperation. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Problem with running send mail jsp example
Hi, SMTP server is running on 192.168.1.91 port 25 so i changed the value localhost to 192.168.1.91 in server.xml And for info my .java application sending mail is running fine with the above given SMTP server host. Thanks you phnai - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, June 18, 2002 1:13 PM Subject: RE: Problem with running send mail jsp example Do you have an SMTP server on your machine? -Original Message- From: phani [mailto:[EMAIL PROTECTED]] Sent: 18 June 2002 09:40 To: tomcat-user Subject: Problem with running send mail jsp example hi, I try to run the send mail example comes with tomcat 4.0. But i am getting follwoing exception. ENCOUNTERED EXCEPTION: javax.mail.SendFailedException: Sending failed; nested exception is: javax.mail.MessagingException: Could not connect to SMTP host: localhost, port: 25; nested exception is: java.net.ConnectException: Connection refused: connect javax.mail.SendFailedException: Sending failed; nested exception is: javax.mail.MessagingException: Could not connect to SMTP host: localhost, port: 25; nested exception is: java.net.ConnectException: Connection refused: connect at javax.mail.Transport.send0(Transport.java:219) at javax.mail.Transport.send(Transport.java:81) at SendMailServlet.doPost(Unknown Source) I changed the parameter in server.xml but no luck.. parameter namemail.smtp.host/name value192.168.1.91/value/parameter Where i went wrong? Thanks in advance phani DISCLAIMER This e-mail and any attachments thereto may contain information which is confidential and/or protected by intellectual property rights and are intended for the sole use of the recipient(s) named above. Any use of the information contained herein (including, but not limited to, total or partial reproduction, communication or distribution in any form) by persons other than the designated recipient(s) is prohibited. If you have received this e-mail in error, please notify the sender either by telephone or by e-mail and delete the material from any computer. Thank you for your cooperation. -- 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: Problem with running send mail jsp example
It's not the answer to your question, but to make it work, you could specify the smtp host in your Servlet: Properties props = new Properties(); props.put(smtp.host, smtp_host); Session session = Session.getDefaultInstance(props, null); Message msg = new MimeMessage(session); etc... HTH Markus -Original Message- From: phani [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Date: Tue, 18 Jun 2002 13:19:26 +0530 Subject: Re: Problem with running send mail jsp example Hi, SMTP server is running on 192.168.1.91 port 25 so i changed the value localhost to 192.168.1.91 in server.xml And for info my .java application sending mail is running fine with the above given SMTP server host. Thanks you phnai - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, June 18, 2002 1:13 PM Subject: RE: Problem with running send mail jsp example Do you have an SMTP server on your machine? -Original Message- From: phani [mailto:[EMAIL PROTECTED]] Sent: 18 June 2002 09:40 To: tomcat-user Subject: Problem with running send mail jsp example hi, I try to run the send mail example comes with tomcat 4.0. But i am getting follwoing exception. ENCOUNTERED EXCEPTION: javax.mail.SendFailedException: Sending failed; nested exception is: javax.mail.MessagingException: Could not connect to SMTP host: localhost, port: 25; nested exception is: java.net.ConnectException: Connection refused: connect javax.mail.SendFailedException: Sending failed; nested exception is: javax.mail.MessagingException: Could not connect to SMTP host: localhost, port: 25; nested exception is: java.net.ConnectException: Connection refused: connect at javax.mail.Transport.send0(Transport.java:219) at javax.mail.Transport.send(Transport.java:81) at SendMailServlet.doPost(Unknown Source) I changed the parameter in server.xml but no luck.. parameter namemail.smtp.host/name value192.168.1.91/value/parameter Where i went wrong? Thanks in advance phani DISCLAIMER This e-mail and any attachments thereto may contain information which is confidential and/or protected by intellectual property rights and are intended for the sole use of the recipient(s) named above. Any use of the information contained herein (including, but not limited to, total or partial reproduction, communication or distribution in any form) by persons other than the designated recipient(s) is prohibited. If you have received this e-mail in error, please notify the sender either by telephone or by e-mail and delete the material from any computer. Thank you for your cooperation. -- 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: Tomcat 4 JNDI
I've tried that but it does not still works ... It is correct to put jndi.properties (with information that point to my ejb server) file in my classpath ? - Original Message - From: Richard Plukker [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Tuesday, June 18, 2002 9:27 AM Subject: Re: Tomcat 4 JNDI In tomcat 4 you can also use the ejb-ref element in the server.xml look at the tomcat examples, hope it will work. good luck On Tuesday 18 June 2002 08:56, you wrote: I've a problem: i want to call my EJB resource (running on a remote machine on JBoss 3.0) from a servlet (running on my local machine). I've tried to put in classpath jndi.properties file like this: java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory java.naming.provider.url=remote-machine java.naming.factory.url.pkgs=org.jboss.naming.org.jnp.interfaces and to modify web-xml file: resource-env-ref resource-env-ref-nameAddressEJBHome/resource-env-ref-name resource-env-ref-typecom.sun.j2ee.blueprints.address.ejb.AddressEJBBean/ r esource-env-ref-type /resource-env-ref can you help me ? -- 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: is Tomcat Crap???
Tomcat is no Crap, Maybe other web containers are better, but that doesn't mean that it's crap. Try writing your own web-container (first release will probably be crap). There are some tedious things in tomcat, mostly redeployment, or reloading webapps. This is done great in orion as i can remember. I believe that Resin and Orion are free for developers but when you use it commercialy then you have to pay. Weblogic is expensive. Also Weblogic and Orion are J2ee containers they have the whole EJB thing too. Maybe you want it maybe you don't JBoss is released now with Jetty integrated, does anyone have any experience? A good alternative to Tomcat? As closing remark I would like to say that i don't like a new evangelist war like Vi vs Emacs, Windows vs Linux, PC vs Mac and all those childish comparisons. If someone likes Orion -- fine, if one uses Resin -- good for you, if someone uses anything else -- that's okay by me. What I do like is a technical comparison, without childish politics or evangelism greetings, Richard On Tuesday 18 June 2002 09:32, you wrote: What do you think? http://radio.weblogs.com/0107789/stories/2002/05/28/isTomcatCrap.html --mike -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Tomcat 4 JNDI
giluka wrote: I've tried that but it does not still works ... It is correct to put jndi.properties (with information that point to my ejb server) file in my classpath ? - Original Message - From: Richard Plukker [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Tuesday, June 18, 2002 9:27 AM Subject: Re: Tomcat 4 JNDI In tomcat 4 you can also use the ejb-ref element in the server.xml look at the tomcat examples, hope it will work. good luck On Tuesday 18 June 2002 08:56, you wrote: I've a problem: i want to call my EJB resource (running on a remote machine on JBoss 3.0) from a servlet (running on my local machine). I've tried to put in classpath jndi.properties file like this: java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory java.naming.provider.url=remote-machine java.naming.factory.url.pkgs=org.jboss.naming.org.jnp.interfaces and to modify web-xml file: resource-env-ref resource-env-ref-nameAddressEJBHome/resource-env-ref-name resource-env-ref-typecom.sun.j2ee.blueprints.address.ejb.AddressEJBBean/ r esource-env-ref-type /resource-env-ref can you help me ? -- 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] You should try to start tomcat with a # java -Djava.naming.factory.initial=com.sun.jndi.ldap.LdapCtxFactory \ -Djava.naming.provider.url=ldap://localhost:389/o=jnditutorial \ List # java -Djava.naming.factory.initial=com.sun.jndi.fscontext.RefFSContextFactory \ -Djava.naming.provider.url=file:/tmp \ List You should take a look at the jndi tutorial:http://java.sun.com/products/jndi/tutorial/beyond/env/source.html -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: redirecting the output to a log file
Hi Richards, I am already using file stream to write a log of my application specific info (and will move the application in next iteration to log4j). However i am having problem with capturing the error messages which catalina dumps if there is any error. They are appearing in the window in which catalina is running - since the scroll up immediatly, i could not read them, and they are not appearing in any of the log files under CATALINA_HOME\logs\ When i issued the bin\startup.bat a.out or bin\startup.bat 2a.err it only prints that tomcat started etc but not the error dump. Regards Satya - Original Message - From: Richard Plukker [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Monday, June 17, 2002 9:20 PM Subject: Re: redirecting the output to a log file Hello Satya, I suggest Log4j. You can log to different out streams. You can configure the way you log outside you program code, using a log4j.properties file. @see http://jakarta.apache.org/log4j Also you can use the catalina way of logging. And you can make your own logging mechanism by appending to a java.io.RandomAccess file. But keep in mind that you have to programm a lot to make it thread safe etc. Good luck. Richard On Monday 17 June 2002 17:32, you wrote: Hi All, I am using catalina. When my servlets are sending some stack trace / debug output, all such output is dumped in the catalina window. I tried changing the logger class in server.xml, used startup 2output.txt etc but no technique is working, I am using standalone catalina on windows NT Please suggest Satya -- 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: redirecting the output to a log file
Satya wrote: Hi Richards, I am already using file stream to write a log of my application specific info (and will move the application in next iteration to log4j). However i am having problem with capturing the error messages which catalina dumps if there is any error. They are appearing in the window in which catalina is running - since the scroll up immediatly, i could not read them, and they are not appearing in any of the log files under CATALINA_HOME\logs\ When i issued the bin\startup.bat a.out or bin\startup.bat 2a.err it only prints that tomcat started etc but not the error dump. Regards Satya - Original Message - From: Richard Plukker [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Monday, June 17, 2002 9:20 PM Subject: Re: redirecting the output to a log file Hello Satya, I suggest Log4j. You can log to different out streams. You can configure the way you log outside you program code, using a log4j.properties file. @see http://jakarta.apache.org/log4j Also you can use the catalina way of logging. And you can make your own logging mechanism by appending to a java.io.RandomAccess file. But keep in mind that you have to programm a lot to make it thread safe etc. Good luck. Richard On Monday 17 June 2002 17:32, you wrote: Hi All, I am using catalina. When my servlets are sending some stack trace / debug output, all such output is dumped in the catalina window. I tried changing the logger class in server.xml, used startup 2output.txt etc but no technique is working, I am using standalone catalina on windows NT Please suggest Satya -- 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] Hello Satya, These messages are in catalina.out You can use tail -f catalina.out to see what is happening. Or if you work on windows, you should go to the properties of the dosbox and put the buffer size to 1000 lines than you can scroll up. good luck, Richard -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Tomcat 3.3.1: how to deny access for certain IP addresses?
Thanks to ravi and Ralph for their fast replies. From that it looks like what I want can't easily be done. I need it as a protection against misconfiguration on the client side within the intranet. So firewall is out. It is a third party software so modifying the code is out. And porting the valve from Tomcat 4.0 is beyond my non-existing Java skills. I was hoping for something simple like the valve but for TC 3.3.1. Thanks anyway, Michael -Original Message- From: ravi [SMTP:[EMAIL PROTECTED]] Sent: Monday, June 17, 2002 2:03 PM To: Tomcat Users List Subject: Re: Tomcat 3.3.1: how to deny access for certain IP addresses? hi mike, one way of handling it is thro ur appln itself by using request.getRemoteAddr() which returns the IP address of the client requesting ur servlet this can then be compared/patternmatched against a databse or any other storage unit... regs, ravi - Original Message - From: Lemke, Michael IZ/HZA-IC1 [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, June 17, 2002 4:44 PM Subject: Tomcat 3.3.1: how to deny access for certain IP addresses? The subject pretty much says it. We run Tomcat 3.3.1 as a webserver (no Apache or anything) and would like to deny access from certain IP addresses. More precisely, for a certain servlet. Can this be done and if yes, how? Thanks, Michael -- Michael Lemke -- Information Services Communication (IZ/HZA-IC1) INA-Schaeffler KG, Tel: +49 (0)9132 - 82 3441 Industriestr 1-3,e-mail: [EMAIL PROTECTED] D-91074 Herzogenaurach http://www.ina.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] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Comparing Tomcat VS other (was is Tomcat Crap???)
Yep no worries, I totally agree with you. I was just (still?) a bit anxious. If anybody can provide any technical comparison, please do ;-) Thanx, --mike Richard Plukker wrote: Tomcat is no Crap, Maybe other web containers are better, but that doesn't mean that it's crap. Try writing your own web-container (first release will probably be crap). There are some tedious things in tomcat, mostly redeployment, or reloading webapps. This is done great in orion as i can remember. I believe that Resin and Orion are free for developers but when you use it commercialy then you have to pay. Weblogic is expensive. Also Weblogic and Orion are J2ee containers they have the whole EJB thing too. Maybe you want it maybe you don't JBoss is released now with Jetty integrated, does anyone have any experience? A good alternative to Tomcat? As closing remark I would like to say that i don't like a new evangelist war like Vi vs Emacs, Windows vs Linux, PC vs Mac and all those childish comparisons. If someone likes Orion -- fine, if one uses Resin -- good for you, if someone uses anything else -- that's okay by me. What I do like is a technical comparison, without childish politics or evangelism greetings, Richard On Tuesday 18 June 2002 09:32, you wrote: What do you think? http://radio.weblogs.com/0107789/stories/2002/05/28/isTomcatCrap.html --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]
Re: Tomcat4.1.2 shutdown error
Remy Maucherat wrote: Shapira, Yoav wrote: Howdy, I actually disagree with the interpretation of the error: if you try to shutdown tomcat when it's not running, you'll get a ConnectionRefused exception from when it tries to connect to the shutdown port. But I don't have an answer to the original question ;) Is Remy watching this thread? Looking at the line number, the NamingResources field is null, but can't see any situation where this would happen. Could you send what exactly you are doing to get that error, or any specific info on your configuration ? If you have all your webapps up and running, I really don't see how it can happen. Remy Hi and thank you for answering. I got the impression that I was the only one that could read my mail ;-) Tomcat is up and running as well as my webapp, although I do have unexpected jsp error message since I've upgraded from T3.2 to T4.1.2. This shutdown error happens when I run the catalina script with 'stop'. Maybe reading my .xml (first attempt) would help you finding what's going on? Thanx again, --mike java.lang.NullPointerException at org.apache.catalina.core.NamingContextListener.lifecycleEvent(NamingCon text L istener.java:343) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleS uppo r t.java:166) at org.apache.catalina.core.StandardServer.stop(StandardServer.java:2216) at org.apache.catalina.startup.Catalina.start(Catalina.java:541) 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.ja va:3 9 ) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccesso rImp l .java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203) -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] ?xml version=1.0 encoding=ISO-8859-1? !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN http://java.sun.com/dtd/web-app_2_3.dtd; web-app !-- Define example application events listeners -- listener listener-classlisteners.ContextListener/listener-class /listener listener listener-classlisteners.SessionListener/listener-class /listener servlet servlet-name cgi /servlet-name servlet-class userInterface.servlets.cgi /servlet-class /servlet servlet servlet-name userInterface.servlets.cgi_ei /servlet-name servlet-class EI.userInterface.servlets.cgi_ei /servlet-class /servlet servlet servlet-name Servletinitializer /servlet-name servlet-class userInterface.servlets.Servletinitializer /servlet-class load-on-startup 1 /load-on-startup /servlet servlet-mapping servlet-namecgi/servlet-name url-pattern/docsoul/*/url-pattern /servlet-mapping !-- security-constraint display-nameExample Security Constraint/display-name web-resource-collection web-resource-nameProtected Area/web-resource-name -- !-- Define the context-relative URL(s) to be protected -- !-- url-pattern/jsp/security/protected/*/url-pattern -- !-- If you list http methods, only those methods are protected -- !-- http-methodDELETE/http-method http-methodGET/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-nametomcat/role-name role-namerole1/role-name /auth-constraint /security-constraint -- /web-app !-- Alternate Example-less Configuration File -- !-- Note that component elements are nested corresponding to their parent-child relationships with each other -- !-- A Server is a singleton element that represents the entire JVM, which may contain one or more Service instances. The Server listens for a shutdown command on the indicated port. Note: A Server is not itself a Container, so you may not define subcomponents such as Valves or Loggers at this level. -- Server port=8005 shutdown=SHUTDOWN debug=0 !-- Uncomment this entry to enable JMX MBeans support -- !-- Listener className=org.apache.catalina.mbeans.ServerLifecycleListener debug=0 port=-1 login=admin password=admin/ -- !-- A Service is a collection of one or
AW: Tomcat 3.3.1: how to deny access for certain IP addresses?
A firewall doesn't have to be an external device. It can be software that runs on the server that runs tomcat. (Which kind of software depends on the operating system you use to run tomcat). If you use linux you have already a firewall as part of the os. (IPChains for linux 2.2/IPTables for linux 2.4) E.G. for MS: http://www.zonelabs.com/store/content/home.jsp (That's no recommendation, I never used it. It's just the first one that came to my mind) -Ursprüngliche Nachricht- Von: Lemke, Michael IZ/HZA-IC1 [mailto:[EMAIL PROTECTED]] Gesendet: Dienstag, 18. Juni 2002 11:39 An: 'Tomcat Users List' Betreff: RE: Tomcat 3.3.1: how to deny access for certain IP addresses? Thanks to ravi and Ralph for their fast replies. From that it looks like what I want can't easily be done. I need it as a protection against misconfiguration on the client side within the intranet. So firewall is out. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: accessing servlets from webapps like my-webapp/sub-dir/
To answer my own mail Experiments have shown me that I can achieve this result if I use a webapp specifcation like this one: Context path=/directory1/directory2 docBase=directory1/directory2 debug=0 reloadable=true crossContext=true/ However, it will not work if I do not specify this and attempts to specify things like /directory1/** have failed, which is a shame because I really need ot be able to generate new directories automatically and call servlets from within them. CHEERS SAM Sam Joseph wrote: Hi There, [Apologies for potential repeat posting - I sent this main yesterday, but I wasn't subscribed to the list and I can't seem to access the latest mails in the archives. Maybe it didn't even come through since I wasn't subscribed ... anyways ...] I don't suppose that there is some way I can have servlets in a webapp respond to a request like this: GET /my-webapp/sub-dir/servlet/MyServlet HTTP/1.0 I know that the standard is to have my-webapp/servlet, but I'm in a tricky situation where I have to call back to a servlet from a Japanese phone applet, that will only allow me access to locations below where it was originally downloaded from. Thus if it gets downloaded from my-webapp/sub-dir it can only make http calls where the path is prefixed with this my-webapp/sub-dir/ path. I can download things directly from my-webapp and then access my-webapp/servlet, but I need to create many of these applets and it is impractical to store them all in the root of the webapp. Is there some way I can specify sub-divisions in the servlet space of the webapp using tomcat - or somehow automatically have these requests re-interpreted to ignore the intermediate sub-dir? Thanks in advance CHEERS SAM -- 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: Tomcat4.1.2 shutdown error
Hi and thank you for answering. I got the impression that I was the only one that could read my mails ;-) Tomcat is up and running as well as my webapp, although I do have unexpected jsp error message since I've upgraded from T3.2 to T4.1.2. This shutdown error happens when I run the catalina script with 'stop'. Maybe reading my .xml (first attempt) would help you finding what's going on? Thanx again, --mike WEB.XML -- ?xml version=1.0 encoding=ISO-8859-1? !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN http://java.sun.com/dtd/web-app_2_3.dtd; web-app !-- Define example application events listeners -- listener listener-classlisteners.ContextListener/listener-class /listener listener listener-classlisteners.SessionListener/listener-class /listener servlet servlet-name cgi /servlet-name servlet-class userInterface.servlets.cgi /servlet-class /servlet servlet servlet-name userInterface.servlets.cgi_ei /servlet-name servlet-class EI.userInterface.servlets.cgi_ei /servlet-class /servlet servlet servlet-name Servletinitializer /servlet-name servlet-class userInterface.servlets.Servletinitializer /servlet-class load-on-startup 1 /load-on-startup /servlet servlet-mapping servlet-namecgi/servlet-name url-pattern/docsoul/*/url-pattern /servlet-mapping !-- security-constraint display-nameExample Security Constraint/display-name web-resource-collection web-resource-nameProtected Area/web-resource-name -- !-- Define the context-relative URL(s) to be protected -- !-- url-pattern/jsp/security/protected/*/url-pattern -- !-- If you list http methods, only those methods are protected -- !-- http-methodDELETE/http-method http-methodGET/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-nametomcat/role-name role-namerole1/role-name /auth-constraint /security-constraint -- /web-app = SERVER.XML -- !-- Alternate Example-less Configuration File -- !-- Note that component elements are nested corresponding to their parent-child relationships with each other -- !-- A Server is a singleton element that represents the entire JVM, which may contain one or more Service instances. The Server listens for a shutdown command on the indicated port. Note: A Server is not itself a Container, so you may not define subcomponents such as Valves or Loggers at this level. -- Server port=8005 shutdown=SHUTDOWN debug=0 !-- Uncomment this entry to enable JMX MBeans support -- !-- Listener className=org.apache.catalina.mbeans.ServerLifecycleListener debug=0 port=-1 login=admin password=admin/ -- !-- A Service is a collection of one or more Connectors that share a single Container (and therefore the web applications visible within that Container). Normally, that Container is an Engine, but this is not required. Note: A Service is not itself a Container, so you may not define subcomponents such as Valves or Loggers at this level. -- !-- Define the Tomcat Stand-Alone Service -- Service name=Tomcat-Standalone !-- A Connector represents an endpoint by which requests are received and responses are returned. Each Connector passes requests on to the associated Container (normally an Engine) for processing. By default, a non-SSL HTTP/1.1 Connector is established on port 8080. You can also enable an SSL HTTP/1.1 Connector on port 8443 by following the instructions below and uncommenting the second Connector entry. SSL support requires the following steps (see the SSL Config HOWTO in the Tomcat 4.0 documentation bundle for more detailed instructions): * Download and install JSSE 1.0.2 or later, and put the JAR files into $JAVA_HOME/jre/lib/ext. * Execute: %JAVA_HOME%\bin\keytool -genkey -alias tomcat -keyalg RSA (Windows) $JAVA_HOME/bin/keytool -genkey -alias tomcat -keyalg RSA (Unix) with a password value of changeit for both the certificate and the keystore itself. By default, DNS lookups are enabled when a web application calls request.getRemoteHost(). This can have an adverse impact on
REPOST: 2 questions..requests...
hi, I have 2 questions (not really related) : 1. How can I get the header if-modified-since, from the request object, when I print out the enumeration of getHeaderNames() it's not there. 2. I've been writing some scripts in java, mainly regluar-expression related stuff,downloading webpages with HttpUrlConnection, parsing some strings out of 'em, and so on. I have been playing around executing the whole thing in a jsp site. The execution of this jsp page can take few minutes, depending on some parameters. For me it is very much ok, because I needed to run this script onetime only. But what bothers me, is the fact, that when I run it, Internet Explorer seems to reload the page, so it runs twice. I am wondering if this is a bug in tomcat or Internet Explorer. In the end I moved all the script into a standalone application and executed it ok ( did not run twice). So this is not a problem I will solve, but I wonder if this is a known problem with tomcat-jsp execution, where does the time-gap lie, when does it start to reload, is this somekind of a ping request from Internet Explorer that executes the page again if it hasn't loaded with in some time or what is happening ? if any one knows, tell me. It does not happen with any other jsp page, and I actually saw the page blink or flash when it got reloaded in IExpl. I am using tomcat 4.0.3 standalone, without coyote. and then Internet explorer 6. Thank you, best regards, -reynir -- 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: AW: Installation of a signed SSL certificate
Hi Sven Glad to hear you got it sorted, I'm sorry I didn;t spot your post sooner. : ( Let me know if there is anything else you require from us. Regards, Sven Woltmann wrote: Hi all, I finally managed to install the certificate. In case someone else gets into the same situation, here's the solution: 1. I installed a test root certificate from Thawte into $JAVA_HOME/jre/lib/security/cacerts. 2. When importing the certificate for my website, I had to use the same alias as the key and use the option "-trustcacerts". When I tried this before I always got the error message "Keytool-Fehler: java.lang.Exception: Kette konnte nicht aus Antwort entnommen werden." (Sorry, I have a German Java installation, this means something like "Couldn't find chain in response"). Sven -Ursprngliche Nachricht- Von: Sven Woltmann Gesendet: Freitag, 7. Juni 2002 17:49 An: '[EMAIL PROTECTED]' Betreff: Installation of a signed SSL certificate Hi, I have a problem installing an SSL certificate. I am using Tomcat 4.0.4-b3 standalone on Linux. First, I created a key pair with "keytool -genkey..." and configured the "server.xml". I am now able to view my webpages with https://myserver Of course, my browser tells me that the certificate is not trusted, so I created a "certificate signing request" and created a test certificate on www.thawte.com. I installed the certificate signing request using "keytool -import..." into the same keystore where I created the key. The keystore has 2 entries now, a "keyEntry" and a "trustedCertEntry". I restarted Tomcat and tried https://myserver again. But it still displays the untrusted self-signed certificate, not the one I got from Thawte. Can anyone tell me how to configure Tomcat to use the signed certificate instead? Thanks, Sven -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- Jason Barr Thawte Tech Support https://www.thawte.com/cgi/support/contents.exe +27 21 917 8913 smime.p7s Description: S/MIME Cryptographic Signature
request.getParameter(th) returned null
Hello I'm using tomcat 4.0.3 I've got some html-page which contains the following combo box to display a part of a clock .. select name=th option value=/option option value=0101/option option value=0202/option option value=0303/option option value=0404/option option value=0505/option option value=0606/option option value=0707/option option value=0808/option option value=0909/option option value=1010/option option value=/option option value=1212/option option value=1313/option option value=1414/option option value=1515/option option value=1616/option option value=1717/option option value=1818/option option value=1919/option option value=2020/option option value=2121/option option value=/option option value=2323/option /select ... after form submit I call request.getParameter(th) in my servlet to get the value the a user chose. Surprisingly in some cases it returnes null; My customers use IE on various windows systems. I think the bug is in the browser (IE) (Maybe because select name is th) Did anybody encounter such a problem? Thanks in advance for help
Problems compiling mod_jk
Hello everybody, I've downloaded jakarta-tomcat-connectors-4.0.2-01.src.tar.gz and I've launched ant and ant install without problems (they created a build directory in the jk subdir) Then I've changed to the native subdir to launch the command ./configure --with-apxs=/usr/local/apache/bin/apxs --enable-EAPI (I'm using Apache 1.3.24, Tomcat 4.0.3 and Ant 1.4.1 on a RedHat 7.2, kernel 2.4.7-10) I have no configure and then (following the directions in REAME.configure) I've tried with autoconf. autoconf creates a configure file but gives me a couple of errors: autoconf: Undefined macros: configure.in:18:AC_LIBTOOL_DLOPEN configure.in:26:AC_PROG_LD (I'm using autoconf 2.13-14 and libtool 1.4-8) I've tried to launch ./configure --with-apxs., but it gives me: loading cache ./config.cache configure: error: can not find install-sh or install.sh in scripts/build/unix ./scripts/build/unix Any ideas??? I've tried also with jakarta-tomcat-connectors-4.0.4-b3-src.tar.gz, but I obtain immediately this error when I launch ant __ guess_catalina40: guess_catalina41: cpath: prepare: [copy] Could not find file /usr/local/src/jakarta-tomcat-connectors-4.0.4-b3-src/coyote/build/lib/tomcat-coyote.jar to copy. BUILD FAILED /usr/local/src/jakarta-tomcat-connectors-4.0.4-b3-src/jk/build.xml:100: Could not find file /usr/local/src/jakarta-tomcat-connectors-4.0.4-b3-src/coyote/build/lib/tomcat-coyote.jar to copy. ___ I need a version of mod_jk with EAPI enabled and I have not been able to find a compiled one... Any help would be greatly appreciated. bye Luca __ Luca Zancan Logica S.r.l. e-mail [EMAIL PROTECTED] URL http://www.logicaonline.com __ -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: AJP vs WARP Connector
Subject: Re: AJP vs WARP Connector From: Bruno V [EMAIL PROTECTED] === It's true that there are few info. I wouldn't blame the developpers. But there could be just a word, like connectors for Tomcat 4 and Apache 2 are in beta or alpha stage ... . I tryed to reference all the howto and infos about Apache Tomcat integration. Obviously, everybody's having hard time to setup this. (Personnaly, my own HowTo will wait for better days.) Here is my reference page : http://bruno.vernay.free.fr/HowTo/Apache-tomcat/bWebServer/references.html The Jakarta-Tomcat project lacks a good official KnowLedge Management tool. All we have is the online documentation and the newsgroup. PS: I still didn't find Nikola Milutinovic's HowTo's URL. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
AW: request.getParameter(th) returned null
I think that no value was selected when this happens. Maybe you should define a default: option value=00 selected00/option -Ursprüngliche Nachricht- Von: Vano Beridze [mailto:[EMAIL PROTECTED]] Gesendet: Dienstag, 18. Juni 2002 13:37 An: '[EMAIL PROTECTED]' Betreff: request.getParameter(th) returned null snip/ after form submit I call request.getParameter(th) in my servlet to get the value the a user chose. Surprisingly in some cases it returnes null; snip/ -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
R: request.getParameter(th) returned null
Hi Vano, I think that the cause of the unexpected behaviour is the absence of a default option (one of the option tags should have a selected attribute). I suppose in your sample code IE shows the first option (00), but doesn't treat it as a selected by default option and doesn't insert the th parameter in the request, unless the user changes the combobox value. So try to use selected attribute in one of the options. Regards. Alessio -Messaggio originale- Da: Vano Beridze [mailto:[EMAIL PROTECTED]] Inviato: martedì 18 giugno 2002 13.37 A: '[EMAIL PROTECTED]' Oggetto: request.getParameter(th) returned null Hello I'm using tomcat 4.0.3 I've got some html-page which contains the following combo box to display a part of a clock .. select name=th option value=/option option value=0101/option option value=0202/option option value=0303/option option value=0404/option option value=0505/option option value=0606/option option value=0707/option option value=0808/option option value=0909/option option value=1010/option option value=/option option value=1212/option option value=1313/option option value=1414/option option value=1515/option option value=1616/option option value=1717/option option value=1818/option option value=1919/option option value=2020/option option value=2121/option option value=/option option value=2323/option /select ... after form submit I call request.getParameter(th) in my servlet to get the value the a user chose. Surprisingly in some cases it returnes null; My customers use IE on various windows systems. I think the bug is in the browser (IE) (Maybe because select name is th) Did anybody encounter such a problem? Thanks in advance for help - Disclaimer - This email and any attachments thereto may contain information which is confidential and/or protected by intellectual property rights and are intended for the sole use of the recipient(s) named above. Any use of the information contained herein (including, but not limited to, total or partial reproduction, communication or distribution in any form) or the taking of any action in reliance on the contents, by persons other than the designated recipient(s) is strictly prohibited. If you have received this email in error, please notify the sender either by telephone or by email and delete the material from any computer. Thank you for your cooperation. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Parameters for virtual servers in server.xml? Is it possible?
Can anybody answer this question? I want to add parameters which are available to a servlet but different for each virtual host. I need to have a value called service provider id which is all I need to get the extra required information from LDAP. I need to do this so that the same code can be used across all virtual hosts Any ideas how this can be done Donie -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Problem with authentication through mod_webapp
Hi, I've successfully set up a JDBC Realm for my application that works perfectly when I'm going straight to Tomcat (that is using port 8080) but not when I'm trying to access it trough Apache (with mod_webapp). Authentication always fails when I'm going through mod_webapp, but work just as it should if I access it on post 8080. Any ideas? Thank you for your time. Markus -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Problem with authentication through mod_webapp
Do you use the basic authentication method? Maybe try the form authentication method. Because apache also has a basic authentication method, maybe these two don't get along. Markus Kirsten wrote: Hi, I've successfully set up a JDBC Realm for my application that works perfectly when I'm going straight to Tomcat (that is using port 8080) but not when I'm trying to access it trough Apache (with mod_webapp). Authentication always fails when I'm going through mod_webapp, but work just as it should if I access it on post 8080. Any ideas? Thank you for your time. Markus -- To unsubscribe, e-mail: mailto:[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]
SSL Client authentication
Hi all, I am using SSL client authentication on Tomcat 4.0.1 but I am getting some errors. I've enabled client authentication in server.xml and I've created all the certificates. If somebody has some experience in similar configurations please have a look to the steps I followed and let me know if you see something wrong: * Generate tomcat certificate *** keytool -genkey -alias tomcat -keyalg RSA keytool -certreq -alias tomcat -file tomcat.csr * Generate the ca certificate *** openssl req -new -newkey rsa:512 -nodes - \ out ca.req -keyout ca.key openssl x509 -trustout -signkey ca.key -days 365 \ -req -in ca.req -out ca.crt * Sign the tomcat request to generate my certificates * openssl x509 -CA ca.crt -CAkey ca.key -in tomcat.csr \ -out tomcat.crt -req -CAcreateserial Import both into the cacerts *** keytool -import -file ca.crt -alias RootCert \ -keystore $JAVA_HOME/jre/lib/security/cacerts keytool -import -file tomcat.crt -alias tomcat \ -keystore $JAVA_HOME/jre/lib/security/cacerts *** Generate a client certificate *** openssl req -new -newkey rsa:512 -nodes -out \ client.req -keyout client.key openssl x509 -CA ca.crt -CAkey ca.key -req -in client.req -out client.crt But when I run the following test: openssl s_client -cert client.crt -key client.key \ -connect localhost:8443 I get an error: CONNECTED(0003) 2504:error:14077410:SSL routines:SSL23_GET_SERVER_HELLO:sslv3 alert handshake failure:s23_clnt.c:455: Any idea? Thanks Spiros -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Problem with authentication through mod_webapp
Hi Richard, No, I'm using FORM based authentication and the login page shows up when I try to access a resource inside a protected area, but no matter which account I try to log on with I just get to the login failed page. Does anyone have a JDBC Realm up and running together with mod_webapp (Apache 1.3.23 and Tomcat 4.0.3)? Markus On tisdag, juni 18, 2002, at 01:57 , Richard Plukker wrote: Do you use the basic authentication method? Maybe try the form authentication method. Because apache also has a basic authentication method, maybe these two don't get along. Markus Kirsten wrote: Hi, I've successfully set up a JDBC Realm for my application that works perfectly when I'm going straight to Tomcat (that is using port 8080) but not when I'm trying to access it trough Apache (with mod_webapp). Authentication always fails when I'm going through mod_webapp, but work just as it should if I access it on post 8080. Any ideas? Thank you for your time. Markus -- To unsubscribe, e-mail: mailto:tomcat-user- [EMAIL PROTECTED] For additional commands, e-mail: mailto:tomcat-user- [EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:tomcat-user- [EMAIL PROTECTED] For additional commands, e-mail: mailto:tomcat-user- [EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: mod_jk and mod_jk2 HELP
OK, I'm curious. Without the JkMount directive, how does apache know what content to send to tomcat? How are you differentiating between static content (*.html, *.gif, etc.) and dynamic content (servlets, JSP)? Without the JkMount directive, it would seem to me that all your content is being served by tomcat, which means there's no need for apache (or even a connector). Is this something new to mod_jk2, that it is able to tell on the fly what to send to tomcat? John Turner [EMAIL PROTECTED] http://www.aas.com -Original Message- From: Mark Pelillo [mailto:[EMAIL PROTECTED]] Sent: Monday, June 17, 2002 8:49 PM To: Tomcat Users List Subject: RE: mod_jk and mod_jk2 HELP While at first I figured the quotes from the book were useless, but I actualy made it work. I was working on Solaris 8 and Solaris 8 for sparc system. I am installing Apache 2.0.35 with php and Tomcat. I started off with tomcat 4.03, then moved to tomcat 4.04 b3 and finally to 4.1.3-beta. The solution was to move the LoadModule jk2_module modules/mod_jk2.so first in line. And amazing it works. I don't have to include any of the jkmount line in the the Apache's httpd.conf. Instead I have to modify the worker2.properties file, which in a different format, so I haven't got my app running yet. The biggest problem is the documentation or lack there of. I had no problem doing the installtion with Apache 1.3, but 2.0 had been nothing but a headache.
RE: AJP vs WARP Connector
Since mod_webapp forwards all requests to tomcat, what is Apache doing in your scenario? I'm just curious...I originally started with mod_webapp but switched to mod_jk because of this limitation. If you found a way to get mod_webapp to distinguish between static content and dynamic content, I'd sure like to hear about it. John Turner [EMAIL PROTECTED] http://www.aas.com -Original Message- From: Nikola Milutinovic [mailto:[EMAIL PROTECTED]] Sent: Tuesday, June 18, 2002 1:19 AM To: Tomcat Users List Subject: Re: AJP vs WARP Connector Sounds like what the Coyote/JK2 effort is all about. To add to the discussion, I have had my share head-banging against the walls. I have mostly done it myself and succeeded in setting up mod_webapp with virtual hosts on Apache2. It would have been much easier if one of the developers worked with me. I didn't say do it for me, I said work with me, give me hints, mentor me. After all, it was in my best interest to make it work. And I was prepared to go the extra mile. Right now, mod_webapp seams to be sitting dead in the water, I don't know if Pierre is back on track. mod_jk2 seam like a more vital project. Nix.
ho to precompile alls jsps of a webapp with jspc (or jikes ?)
hi, who can help me ? I want to pre-compile all jsp's of my webapp if I use jspc -webapp path-to-webapp I got an NoClassDefFoundError: org/xml/sax/SAXException regards ekkehard -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: ho to precompile alls jsps of a webapp with jspc (or jikes ?)
Hi, I havn't used jspc but your error points out that it can't find the SAX package. Go to http://java.sun.com and download a SAX parser and see if it won't work then. Markus On tisdag, juni 18, 2002, at 03:02 , Ekkehard Gentz wrote: hi, who can help me ? I want to pre-compile all jsp's of my webapp if I use jspc -webapp path-to-webapp I got an NoClassDefFoundError: org/xml/sax/SAXException regards ekkehard -- To unsubscribe, e-mail: mailto:tomcat-user- [EMAIL PROTECTED] For additional commands, e-mail: mailto:tomcat-user- [EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Null Pointer Exception - would you please take a look?
I'm not exactly sure what's going on. It happens when I try to visit an area of a site that has a security constraint. My user authentication database is in a RDBMS, and I use the JDBC realm to connect to it. I'm never supplied with a prompt to login. - Original Message - From: John Gregg [EMAIL PROTECTED] To: 'Tomcat Users List' [EMAIL PROTECTED] Sent: Monday, June 17, 2002 5:38 PM Subject: RE: Null Pointer Exception - would you please take a look? Is the String you're setting null? I can't say how your driver handles that case, but maybe it doesn't like it. The jdk javadocs don't mention it. Is the String too big for the column, does it have weird characters in it? If you can turn on debugging for the driver, try that. If you have the source, recompile with debugging on and run in a debugger. If you're desperate enough, decompile the bytecode, recompile with debugging on, and run it in the debugger. You didn't hear it from me. john -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]. org]On Behalf Of Eddie Bush Sent: Monday, June 17, 2002 5:18 PM To: Tomcat Users Mailing List Subject: Null Pointer Exception - would you please take a look? I'm running Tomcat 4.0.1, InterBase 6 Super Server, and Apache 1.3.22. Everything works super, until I throw in a JDBC realm and try to connect to an application protected by a security constraint. When I do, I get the following exception in my server log: 2002-06-17 12:29:28 [org.apache.catalina.connector.warp.WarpRequestHandler] java.lang.NullPointerException at interbase.interclient.PreparedStatement.setString(Unknown Source) at org.apache.catalina.realm.JDBCRealm.credentials(JDBCRealm.java) at org.apache.catalina.realm.JDBCRealm.authenticate(JDBCRealm.java) at org.apache.catalina.realm.JDBCRealm.authenticate(JDBCRealm.java) ... and it continues. I hate to paste it all unless it's necessary to do so. My thought was that someone may have experienced this - or that it may be a known issue. I checked the docs to ensure that my driver implements PreparedStatement and setString() ... and it does. It's a JDBC 1.0 driver though. What would be the recommended course of action? I'm not sure what's going on here for certain, and that's why I'm posting. Thanks in Advance! Eddie -- 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]
Any other Tomcat mailing lists/newsgroups/resources besides this one?
Hi, Are there any others besides this one? Not that this one isn't good, but I'd just like a few alternate sources. Thanks, Noah -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Null Pointer Exception - would you please take a look?
Alas, I do not have code to the JDBCRealm =( I figured that this would be a cut-and-dried problem -- either the JDBCRealm implementation or perhaps my driver behaving poorly. In either case, I figured someone would be able to tell right off my my description, but perhaps I described the circumstance poorly. It happens when I visit a page that has a security constraint. I'm never offered a login dialog. I'm using BASIC authentication - no SSL -- transport-guarantee is NONE. I'm just trying to get the BASIC auth down and then move on to configuring SSL and doing it properly via form-based login. Thanks! - Original Message - From: August Detlefsen [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Monday, June 17, 2002 6:14 PM Subject: RE: Null Pointer Exception - would you please take a look? Are you sure you are actually getting a Connection? Are you sure that your PreparedStatement itself is not null? Can you post the offending code? --- John Gregg [EMAIL PROTECTED] wrote: Is the String you're setting null? I can't say how your driver handles that case, but maybe it doesn't like it. The jdk javadocs don't mention it. Is the String too big for the column, does it have weird characters in it? If you can turn on debugging for the driver, try that. If you have the source, recompile with debugging on and run in a debugger. If you're desperate enough, decompile the bytecode, recompile with debugging on, and run it in the debugger. You didn't hear it from me. john -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]. org]On Behalf Of Eddie Bush Sent: Monday, June 17, 2002 5:18 PM To: Tomcat Users Mailing List Subject: Null Pointer Exception - would you please take a look? I'm running Tomcat 4.0.1, InterBase 6 Super Server, and Apache 1.3.22. Everything works super, until I throw in a JDBC realm and try to connect to an application protected by a security constraint. When I do, I get the following exception in my server log: 2002-06-17 12:29:28 [org.apache.catalina.connector.warp.WarpRequestHandler] java.lang.NullPointerException at interbase.interclient.PreparedStatement.setString(Unknown Source) at org.apache.catalina.realm.JDBCRealm.credentials(JDBCRealm.java) at org.apache.catalina.realm.JDBCRealm.authenticate(JDBCRealm.java) at org.apache.catalina.realm.JDBCRealm.authenticate(JDBCRealm.java) ... and it continues. I hate to paste it all unless it's necessary to do so. My thought was that someone may have experienced this - or that it may be a known issue. I checked the docs to ensure that my driver implements PreparedStatement and setString() ... and it does. It's a JDBC 1.0 driver though. What would be the recommended course of action? I'm not sure what's going on here for certain, and that's why I'm posting. Thanks in Advance! Eddie -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] __ Do You Yahoo!? Yahoo! - Official partner of 2002 FIFA World Cup http://fifaworldcup.yahoo.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Null Pointer Exception - would you please take a look?
- Original Message - From: John Gregg [EMAIL PROTECTED] Is the String you're setting null? I can't say how your driver handles that case, but maybe it doesn't like it. The jdk javadocs don't mention it. Is the String too big for the column, does it have weird characters in it? If There are no special characters in that field, although I never imagined that the field size might cause a problem. I will check that. Thank You! -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
REPOST-UPDATED: Apache Tomcat/4.0.3 - HTTP Status 302 - MovedTemporarily
In a nutshell, I have ONE machine running ONE instance of Apache with multiple virtual sites. Each website runs it's own Tomcat 4.0.3 instance. One virtual site communicates via HTTPS with another site on the same server and gets only 302 status responses for ALL requests, even though requesting the same resources with a browser (such as IE, Netscape) return the resources without any problems - no redirects either. I can change this code and have the requesting server make successful requests to other secure servers elsewhere, and other non-secure servers (elsewhere and on the same box). The virtual sites have different IP addresses as well. Any ideas here? Thanks! -jeremy- Here¹s a sample of the servlet code that makes the HTTPS request: URL url = null; HttpsURLConnection con = null; PrintWriter pout = null; BufferedReader pin = null; try { url = new URL(https://secure.server.com/index.jsp;); System.out.println(Connecting to ' + url.toString() + '...); con = (HttpsURLConnection)url.openConnection(); con.setFollowRedirects(false); con.setHostnameVerifier( new HostnameVerifier() { public boolean verify( String urlHost, SSLSession ssls ){ if( !urlHost.equals(ssls.getPeerHost())){ System.out.println(certificate + ssls.getPeerHost() + does not match host + urlHost + but + continuing anyway); } return true; }} ); con.setDoOutput(true); con.setDoInput(true); con.setUseCaches(false); con.setDefaultUseCaches(false); con.setRequestProperty(Content-Type,application/x-www-form-urlencoded); ((HttpURLConnection)con).setRequestMethod(POST); StringBuffer params = new StringBuffer(); params.append(auth_code=); params.append(URLEncoder.encode(auth_code, UTF-8)); pout = new PrintWriter(con.getOutputStream()); pout.println(params.toString()); pout.flush(); pout.close(); ... Etc ... -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Tomcat 3.3.1: how to deny access for certain IP addresses?
Tomcat 3.3.x uses modules/interceptors instead of valves. A single class can participate in many aspects of server operation. Your class would extend BaseInterceptor and implement one or more methods to achieve the desired behavior. The postReadRequest might be a reasonable one to use. A non-zero return value triggers the status handler, which assumes the value is the error status. Returning 403 would cause a a forbidden error. Some digging into the sources would be needed, but hopefully not to much. Cheers, Larry -Original Message- From: Lemke, Michael IZ/HZA-IC1 [mailto:[EMAIL PROTECTED]] Sent: Tuesday, June 18, 2002 5:39 AM To: 'Tomcat Users List' Subject: RE: Tomcat 3.3.1: how to deny access for certain IP addresses? Thanks to ravi and Ralph for their fast replies. From that it looks like what I want can't easily be done. I need it as a protection against misconfiguration on the client side within the intranet. So firewall is out. It is a third party software so modifying the code is out. And porting the valve from Tomcat 4.0 is beyond my non-existing Java skills. I was hoping for something simple like the valve but for TC 3.3.1. Thanks anyway, Michael -Original Message- From: ravi [SMTP:[EMAIL PROTECTED]] Sent: Monday, June 17, 2002 2:03 PM To: Tomcat Users List Subject:Re: Tomcat 3.3.1: how to deny access for certain IP addresses? hi mike, one way of handling it is thro ur appln itself by using request.getRemoteAddr() which returns the IP address of the client requesting ur servlet this can then be compared/patternmatched against a databse or any other storage unit... regs, ravi - Original Message - From: Lemke, Michael IZ/HZA-IC1 [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, June 17, 2002 4:44 PM Subject: Tomcat 3.3.1: how to deny access for certain IP addresses? The subject pretty much says it. We run Tomcat 3.3.1 as a webserver (no Apache or anything) and would like to deny access from certain IP addresses. More precisely, for a certain servlet. Can this be done and if yes, how? Thanks, Michael -- Michael Lemke -- Information Services Communication (IZ/HZA-IC1) INA-Schaeffler KG, Tel: +49 (0)9132 - 82 3441 Industriestr 1-3,e-mail: [EMAIL PROTECTED] D-91074 Herzogenaurach http://www.ina.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] -- To unsubscribe, e-mail: mailto:tomcat-user- [EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
tomcat crashed the computer?
Hello I've got a pbleme this night with Tomcat. A lot of request for a jsp file happened (20/sec) and then the computer crashes. I'm not sur that it is the reason but the computer crashed at 01:13 and the flood begin at 01:02 with a maximum just before the crash. Does someone have an idea? I havent found an answer on google or in the mailing list. The system is FreeBSD Tomcat 3.3.1 working with apache 1.3.24 I haven't modify the server.xml. I have nothing in the logs except in httpd.log where i see all these requests. I hope someone can help me Regards Guillaume Mignot -- [.] Ajp12Connector port=8007 / [] Host name=myhost.com Context path= docBase=webapps/myapp debug=0 reloadable=true/ /Host -- -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
netstat -a localhost to localhost
Hello everyone, I have a redhat 6.2 machine ( I know a little behind the times, but it works very well) with Tomcat 4.0.1 running with mod webapp both securely and non-securely. I little question. Whne I run a netstat -a I notice many connection from and to localhost from the ports I designated in my server.xml configuration file. Is this normal? Here is a little output: tcp0 0 localhost:2327 localhost:8008 ESTABLISHED tcp0 0 localhost:8008 localhost:2326 ESTABLISHED tcp0 0 localhost:2326 localhost:8008 ESTABLISHED tcp0 0 localhost:8008 localhost:2325 ESTABLISHED tcp0 0 localhost:2325 localhost:8008 ESTABLISHED tcp0 0 localhost:8008 localhost:2324 ESTABLISHED tcp0 0 localhost:2324 localhost:8008 ESTABLISHED tcp0 0 localhost:8008 localhost:2323 ESTABLISHED tcp0 0 localhost:2323 localhost:8008 ESTABLISHED tcp I find it odd that the server ( being idle ) would have that many localhost connections ESTABLISHED. This is not public yet so there are not too many requests yet. I am thinking it could be a java thing. In my catalina.sh I have CATALINA_OPTS set with -Xmx64m -Xms32m. Maybe tomcat will open as many connections as it can with the amount of memory I allow it??? Any help would be appreciated. Thanks for all the help, --chad -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
AW: AJP vs WARP Connector
The only way I can imagine, is to place the static resources outside of the webapp. (But this requires additional configuration on the apache site if you want to protect some of these resources.) Don't know if that realy works, as I use tomcat stand alone. -Ursprüngliche Nachricht- Von: Turner, John [mailto:[EMAIL PROTECTED]] Gesendet: Dienstag, 18. Juni 2002 15:01 An: 'Tomcat Users List' Betreff: RE: AJP vs WARP Connector Since mod_webapp forwards all requests to tomcat, what is Apache doing in your scenario? I'm just curious...I originally started with mod_webapp but switched to mod_jk because of this limitation. If you found a way to get mod_webapp to distinguish between static content and dynamic content, I'd sure like to hear about it. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Any other Tomcat mailing lists/newsgroups/resources besides this one?
Howdy, If this one doesn't have enough traffic for you, we could certainly generate more ;) There's tomcat-dev for developers of tomcat to discuss what's going on. There's the jGuru tomcat FAQ at www.jguru.com/faq/Tomcat. I think you may be able to ask questions, forum-style, there as well. And there's a bunch of individual people's FAQs, guides, etc. Do a google search for tomcat faq and you'll see ;) Yoav Shapira Millennium ChemInformatics -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Tuesday, June 18, 2002 9:13 AM To: [EMAIL PROTECTED] Subject: Any other Tomcat mailing lists/newsgroups/resources besides this one? Hi, Are there any others besides this one? Not that this one isn't good, but I'd just like a few alternate sources. Thanks, Noah -- To unsubscribe, e-mail: mailto:tomcat-user- [EMAIL PROTECTED] For additional commands, e-mail: mailto:tomcat-user- [EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: netstat -a localhost to localhost
chad kellerman wrote: Tomcat 4.0.1 running with mod webapp both securely and non-securely. ... When I run a netstat -a I notice many connection from and to localhost from the ports I designated in my server.xml configuration file. mod_webapp keeps several connections open all the time so it doesn't have to pay for setting up and tearing down a socket for each new request. It's normal. -- Christopher St. John [EMAIL PROTECTED] DistribuTopia http://www.distributopia.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Null Pointer Exception - would you please take a look?
There are also no nulls in that column. - Original Message - From: Eddie Bush [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Tuesday, June 18, 2002 8:09 AM Subject: Re: Null Pointer Exception - would you please take a look? - Original Message - From: John Gregg [EMAIL PROTECTED] Is the String you're setting null? I can't say how your driver handles that case, but maybe it doesn't like it. The jdk javadocs don't mention it. Is the String too big for the column, does it have weird characters in it? If There are no special characters in that field, although I never imagined that the field size might cause a problem. I will check that. Thank You! -- 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]
trouble importing Tyrex classes...
Greetings, I'm having trouble building tomcat. I've got the build.properties setup to point to where I have Tyrex installed and I also have tyrex-1.0.jar in my CLASSPATH. The build.properties file has build.sysclasspath=last This is what ant spits out at me... [javac] Compiling 292 source files to /usr/appl/src/sma/apachebuild/jakarta-tomcat-4.0.3-src/catalina/build/server/classes [javac] /usr/appl/src/sma/apachebuild/jakarta-tomcat-4.0.3-src/catalina/src/share/org/apache/naming/factory/TyrexTransactionFactory.java:75: Class tyrex.tm.Tyrex not found in import. [javac] import tyrex.tm.Tyrex; [javac]^ Is there a simple test I can run that might give me more info as to why ant can't seem to get tyrex into/out of my CLASSPATH? -- Sean M. Alderman ITRACK Systems Analyst PACE/NCI - NASA Glenn Research Center (216) 433-2795 Calling a windowed operating system Windows is like naming an automobile Wheels. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
No Serializer found for response
I've recently upgraded to Tomcat 4.0.3 LE and SOAP 2.3.1. After the upgrade (and adding some jars to Tomcats classpath), A SOAP RPC service previously working with SOAP 2.2 and Tomcat 4.0.3 (non-LE) which returned an object composed of various simple types using a SOAPMappingRegistry and (De)Serializer which I wrote no longer worked. I get the error No Serializer found for: MyClassName. I've tried not using the SOAPMappingRegistry and instead specifying all of the mappings explicitly in the deployment descriptor and get the following error: MyCustomSerializer is unable to be resolved as a valid Serializer. Straightforward enough, so I decided to replace my serializer in the deployment descriptor with Apache's BeanSerializer (MyCustomSerializer extends BeanSerializer) just to make sure something wasn't amiss with my serializer and I continued to get BeanSerializer is unable to be resolved as a valid Serializer. I've checked the BeanSerializer Code and things seem pretty similar between version 2.2 and 2.3.1. It seems to me that either I have a classpath problem (which would be strange considering tomcat is able to find my rpc services classes and the other soap classes) or something has changed with the way the SOAPMappingRegistry and (de)serializers are resolved. I just wanted to check if anyone else has encountered this problem before starting to dig around in that code. On a side note, I'm relatively new to client/server debugging and would be interested if anyone could point me to a good primer/tools for doing so. I'm currently using forte 3, and it seems relatively difficult to debug a server side process that doesn't use forte's bundled version of tomcat. Thanks for your help Jason Donmoyer Software Engineer CHI Systems, Inc. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
PJA Library, BootClasspath, Configuring JVM -- Tomcat 4.x and JDK1.3
Hi Forum, Is there a way to setup the BootClasspath of Tomcat and to configure the JVM (JDK1.3) to execute with modified system properties?I am trying to use PJA libraries in Tomcat 4.x. This library enables Linux to manage pdf files but it needs some configuration extras. The library requires the following to run a class anmed uTest: For instance, if we want to execute the uTest class and the PJA library is under the /home/libs directory: Java -Xbootclasspath/a:/home/libs/pja.jar -Dawt.toolkit=com.eteks.awt.PJAToolkit -Djava.awt.graphicsenv = com.eteks.java2d.PJAGraphicsEnvironment uTest In other words, the pja.jar must be added to the BootClasspath and the JVM must execute the class with custom system properties. Thanks in advance for your help Carlos -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: PJA Library, BootClasspath, Configuring JVM -- Tomcat 4.x and JDK1.3
Hi: First at all if you need use FONTS (paint some string) you must create pjaf files to yours fonts (Verdana, Arial, etc...). This files must be in classpath (for example in ${JAVA_HOME}/jre/lib/fonts) You must replace Linux/UNIX sun/java2d package implementation with Windows implementation (this is the first line in my BOOTCLASSPATH variable). Under Solaris I have configured with a SH: BOOTCLASSPATH=/home/libs/sun_java2d.jar BOOTCLASSPATH=${BOOTCLASSPATH}:${JAVA_HOME}/jre/lib/rt.jar BOOTCLASSPATH=${BOOTCLASSPATH}:/home/libs/pja.jar CLASSPATH=.:${JAVA_HOME}/jre/lib/fonts JAVA=${JAVA_HOME}/bin/java nohup $JAVA -Xmx128m -Xbootclasspath:${BOOTCLASSPATH} -Dawt.toolkit=com.eteks.awt. PJAToolkit -Djava.awt.graphicsenv=com.eteks.java2d.PJAGraphicsEnvironment -Djava2d.font .usePlatformFont=false -Djava.awt.fonts=/home/fonts -classpath ${CLASSPATH} MyClass Bye. Joaquín. - Original Message - From: Carlos [EMAIL PROTECTED] To: Tomcat-User (E-mail) [EMAIL PROTECTED] Sent: Tuesday, June 18, 2002 4:47 PM Subject: PJA Library, BootClasspath, Configuring JVM -- Tomcat 4.x and JDK1.3 Hi Forum, Is there a way to setup the BootClasspath of Tomcat and to configure the JVM (JDK1.3) to execute with modified system properties?I am trying to use PJA libraries in Tomcat 4.x. This library enables Linux to manage pdf files but it needs some configuration extras. The library requires the following to run a class anmed uTest: For instance, if we want to execute the uTest class and the PJA library is under the /home/libs directory: Java -Xbootclasspath/a:/home/libs/pja.jar -Dawt.toolkit=com.eteks.awt.PJAToolkit -Djava.awt.graphicsenv = com.eteks.java2d.PJAGraphicsEnvironment uTest In other words, the pja.jar must be added to the BootClasspath and the JVM must execute the class with custom system properties. Thanks in advance for your help Carlos -- 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: Local webapp config for remote deployment?
After doing some more investigation, I've found the following. If the webapp is not present when Tomcat is started, but webapps/MyApp.xml exists, the Context in the xml file will be added to server.xml when MyApp is deployed. Although the Context is added to server.xml, the deploy fails, reporting Application already exists at path /MyApp--in other words, the configuration for the application is present but the app itself isn't. In order to get MyApp.war onto the server, it's necessary to undeploy the webapp, which removes the Context from server.xml, and deploy it again... except the new deployment ignores the Context in MyApp.xml and uses only the defaults in the webapp's web.xml file. So it's a Catch-22 situation: either you have the local configuration and no app, or the app and no local configuration. (This is all with 4.1.4; the release notes in 4.1.5 don't seem to indicate any changes that would affect the behaviour.) Peter J. Peter Janes wrote: Oops... it *was* actually there, I just snipped it accidentally while making the file more generic for the list. The actual Context tag I've been using is: Context path=/MyApp docBase=../work/Standalone/localhost/manager/MyApp.war debug=1 cookies=false override=true I've also tried docBase=../work/Standalone/localhost/LG.war, since the app isn't actually part of manager. (Also, because I didn't include the information before, I'm using Tomcat 4.1.4 under Java 1.4.) Thanks, Peter J. Jacob Kjome wrote: Hello Peter, You have no appBase attribute on your context element. You need to point that to your deployed directory or .war file. Jake Monday, June 17, 2002, 1:46:04 PM, you wrote: PJ I seem to recall that remotely-deployed web apps can be configured locally PJ starting in the Servlet 2.3 spec. (Unfortunately I can't find chapter and PJ verse at the moment.) The gist is that a config fragment is placed in the PJ webapps directory with the same basename as the path, and this would be used PJ as well as/instead of the .war's embedded web.xml. In fact, I can see this PJ being done for the manager webapp, which is locally configured in PJ ${CATALINA_HOME}/webapps/manager.xml. PJ I'd like to be able to do this with my own application, but haven't had any PJ luck. I'm trying to add an init parameter, foo, and redirect the app's PJ log messages to its own file. Presuming the path is /MyApp, I have the PJ following config fragment in ${CATALINA_HOME}/webapps/MyApp.xml. PJ Context path=/MyApp debug=1 cookies=false override=true PJ Parameter name=foo value=bar override=true/ PJ Valve className=org.apache.catalina.valves.AccessLogValve PJ prefix=MyApp. suffix=.log pattern=common/ PJ /Context PJ I've tried turning debug on and off, setting override to true and false (is PJ it just me, or does the double-negative in the deployment descriptor PJ documentation confuse anyone else), and enabling various combinations of the PJ Parameter and Valve elements, and completely restarting the server, all with PJ no luck. PJ It seems unlikely, but do I need to create a ServletContextListener or PJ ServletContextAttributeListener to pick up the extra init parameters? PJ Is there (hopefully) some fundamental step I've missed? PJ Thanks, PJ Peter J. -- fix, n., v. What one does when a problem has been reported too many times to be ignored. --The New Hacker's Dictionary, 3rd ed. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: PJA Library, BootClasspath, Configuring JVM -- Tomcat 4.x and JDK1.3
Hi Carlos, I run Tomcat with PJA on a headless Linux server. You just need to add the extra java parameters to the CATALINA_OPTS variable in your catalina.sh script: for your environment it would be: CATALINA_OPTS=-Xbootclasspath/a:/home/libs/pja.jar \ -Dawt.toolkit=com.eteks.awt.PJAToolkit \ -Djava.awt.graphicsenv=com.eteks.java2d.PJAGraphicsEnvironment \ -Djava.awt.fonts=$JAVA_HOME/jre/lib/fonts/ (assuming that $JAVA_HOME contains the location of your JDK installation directory) Hope this helps, Best Regards, Chris Newland -Original Message- From: Carlos [mailto:[EMAIL PROTECTED]] Sent: 18 June 2002 15:48 To: Tomcat-User (E-mail) Subject: PJA Library, BootClasspath, Configuring JVM -- Tomcat 4.x and JDK1.3 Hi Forum, Is there a way to setup the BootClasspath of Tomcat and to configure the JVM (JDK1.3) to execute with modified system properties?I am trying to use PJA libraries in Tomcat 4.x. This library enables Linux to manage pdf files but it needs some configuration extras. The library requires the following to run a class anmed uTest: For instance, if we want to execute the uTest class and the PJA library is under the /home/libs directory: Java -Xbootclasspath/a:/home/libs/pja.jar -Dawt.toolkit=com.eteks.awt.PJAToolkit -Djava.awt.graphicsenv = com.eteks.java2d.PJAGraphicsEnvironment uTest In other words, the pja.jar must be added to the BootClasspath and the JVM must execute the class with custom system properties. Thanks in advance for your help Carlos -- 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: Coyote Connector Help
Anyone using Apache Tomcat - Coyote Connector on Solaris 7? Any luck with making it work?? I have tomcat 4.0.3 and apache 2.0.36. Web Tools eServices Operations Office: 302.391.7756 -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Tomcat PID: alive or not
Hi all, well with a Perl script I have found the PID Tomcat and I write it in a tomcat.pid file. With this PID how can I know if Tomcat is alive or not in a script? My purpose is to check if Tomcat is alive and if not I restart Tomcat. The problem is that with PID Tomcat I don't know how to check if Tomcat is alive. Can you help me? Thanks for your help Laura -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Tomcat PID: alive or not
Having the PID doesn't tell you anything about whether or not the process is capable of serving requests. For that, you will have to create a script and run it in a cron job that makes a request to tomcat every so often (every minute?) and checks to see if a valid response was received. If not, restart tomcat using the PID. There are any number of monitoring programs out there, UN*X-based or Windows, that, given a URL, can determine if a valid response was received. I usually create a small servlet that does nothing but output a string that says I'm OK or something similar. Then the monitoring script looks for that text string in the reply, and behaves accordingly. John Turner [EMAIL PROTECTED] http://www.aas.com -Original Message- From: Laura [mailto:[EMAIL PROTECTED]] Sent: Tuesday, June 18, 2002 11:49 AM To: [EMAIL PROTECTED] Subject: Tomcat PID: alive or not Hi all, well with a Perl script I have found the PID Tomcat and I write it in a tomcat.pid file. With this PID how can I know if Tomcat is alive or not in a script? My purpose is to check if Tomcat is alive and if not I restart Tomcat. The problem is that with PID Tomcat I don't know how to check if Tomcat is alive. Can you help me? Thanks for your help Laura -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Tomcat PID: alive or not
Which monitoring programs do you advise me? Laura Alle 17:53, martedì 18 giugno 2002, hai scritto: Having the PID doesn't tell you anything about whether or not the process is capable of serving requests. For that, you will have to create a script and run it in a cron job that makes a request to tomcat every so often (every minute?) and checks to see if a valid response was received. If not, restart tomcat using the PID. There are any number of monitoring programs out there, UN*X-based or Windows, that, given a URL, can determine if a valid response was received. I usually create a small servlet that does nothing but output a string that says I'm OK or something similar. Then the monitoring script looks for that text string in the reply, and behaves accordingly. John Turner [EMAIL PROTECTED] http://www.aas.com -Original Message- From: Laura [mailto:[EMAIL PROTECTED]] Sent: Tuesday, June 18, 2002 11:49 AM To: [EMAIL PROTECTED] Subject: Tomcat PID: alive or not Hi all, well with a Perl script I have found the PID Tomcat and I write it in a tomcat.pid file. With this PID how can I know if Tomcat is alive or not in a script? My purpose is to check if Tomcat is alive and if not I restart Tomcat. The problem is that with PID Tomcat I don't know how to check if Tomcat is alive. Can you help me? Thanks for your help Laura -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Tomcat PID: alive or not
Howdy, Wget: http://www.gnu.org/software/wget/wget.html Yoav Shapira Millennium ChemInformatics -Original Message- From: Laura [mailto:[EMAIL PROTECTED]] Sent: Tuesday, June 18, 2002 11:58 AM To: Tomcat Users List Subject: Re: Tomcat PID: alive or not Which monitoring programs do you advise me? Laura Alle 17:53, martedì 18 giugno 2002, hai scritto: Having the PID doesn't tell you anything about whether or not the process is capable of serving requests. For that, you will have to create a script and run it in a cron job that makes a request to tomcat every so often (every minute?) and checks to see if a valid response was received. If not, restart tomcat using the PID. There are any number of monitoring programs out there, UN*X-based or Windows, that, given a URL, can determine if a valid response was received. I usually create a small servlet that does nothing but output a string that says I'm OK or something similar. Then the monitoring script looks for that text string in the reply, and behaves accordingly. John Turner [EMAIL PROTECTED] http://www.aas.com -Original Message- From: Laura [mailto:[EMAIL PROTECTED]] Sent: Tuesday, June 18, 2002 11:49 AM To: [EMAIL PROTECTED] Subject: Tomcat PID: alive or not Hi all, well with a Perl script I have found the PID Tomcat and I write it in a tomcat.pid file. With this PID how can I know if Tomcat is alive or not in a script? My purpose is to check if Tomcat is alive and if not I restart Tomcat. The problem is that with PID Tomcat I don't know how to check if Tomcat is alive. Can you help me? Thanks for your help Laura -- To unsubscribe, e-mail: mailto:tomcat-user- [EMAIL PROTECTED] For additional commands, e-mail: mailto:tomcat-user- [EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
a few questions
Hi! I'm a new user of the list. I've also recently started using Tomcat. I have some experince with Orion and Resin. Here are my questions: I just read an article on embedding Tomcat. Is it legal to embed Tomcat in a close source application?! getServletContext() returns a context only accessible from the current webapp. Can I share a context between all webapps?! I'd rather not modify web.xml and do things centrally in server.xml. How about when I'm embeding Tomcat?! Is there a way to do this is a non-Tomcat specific way? Thank you very much. Gabriel -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: IIS 5.0 Help
If you're accessing 8080, that is tomcat standalone, IIS isn't even involved in that request. You have to connect the two on port 80, using a connector (isapi_redirect.dll), in order to serve requests from tomcat via IIS on port 80. This might help: http://jakarta.apache.org/tomcat/tomcat-4.0-doc/config/ajp.html (the IIS-specific section is about 2/3's down the page). John Turner [EMAIL PROTECTED] http://www.aas.com -Original Message- From: Michael A. Plett [mailto:[EMAIL PROTECTED]] Sent: Tuesday, June 18, 2002 12:10 PM To: Tomcat Users List Subject: IIS 5.0 Help I have a windows 2000 server with IIS 5.0 on it. I have used tomcat 3.2 with no problem. When I try to install 4.0.3 on it I can not get it to work without having to append :8080 to the URL's. This works ok for my inside network but for the outside network you can not get to the URL's through :8080. What would be the problem? or does anyone know how to solve this? thanks ___ | | _ |Michael Plett | _ / )|Manager Application Engineering|( \ / / | MailTo: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] | \ \ _( ( | _ _ | ) )_ (((\ \ |_/ )___( \_| / /))) (\\ \ \_/ / \ \_/ / //) \ /Axis Technologies \ / \_/16633 Dallas Parkway Suite 600 \_/ / / Addison, TX 75001 \ \ /___/ (972) 588-1874 FAX: (972) 588-1876\___\ 1-888-324-2036
Tomcat 3.2.4 - Loading jar files in the lib Directory
Hello, I've just subscribed to this list, and I have a question. If anybody could help, I would appreciate that. I am JARring a few .properties archives, and saving them in the WEB-INF/lib directory. After the service is restarted the server was supposed to pre-load the archives in that directory and make them available for the application. It's not working. Do I have to change any option in the server.xml file or other file? (I've already set the reloadable=true in the Context for my application.) Thanks in advance, Kiev Gama _ Join the worlds largest e-mail service with MSN Hotmail. http://www.hotmail.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
JNDIRealm without roles???
Hello, I want to use JNDIRealm wothout Rolesearch. In my LDAP-Directory no roles are set and I didn't set any roles in my web.xml. The Catalina log shows that the Realm authenticates Username and Password correct, although Access denied! I don't know why. This are the Entries in the log-file: 2002-06-18 17:44:43 JNDIRealm[Standalone]: Username schmutz2 successfully authenticated 2002-06-18 17:44:43 JNDIRealm[Standalone]: getRoles(uid=schmutz2,o=PIRONET,c=DE) I searched the source code of JNDIRealm and this way seems to be implemented: // Are we configured to do role searches? ArrayList list = new ArrayList(); if ((roleFormat == null) || (roleName == null)) return (list); So I think it must authenticate, but Access denies. Can anybody help me please -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: JNDIRealm without roles???
Add this at the bottom of your web.xml, just before you close the web-app element: security-constraint web-resource-collection web-resource-nameresourceName/web-resource-name url-pattern/*/url-pattern /web-resource-collection auth-constraint !--This will allow any role including no role-- role-name*/role-name /auth-constraint /security-constraint login-config auth-methodBASIC/auth-method realm-namemyRealm/realm-name /login-config -Original Message- From: Christian Schmitz [mailto:[EMAIL PROTECTED]] Sent: Tuesday, June 18, 2002 11:46 AM To: '[EMAIL PROTECTED]' Subject: JNDIRealm without roles??? Hello, I want to use JNDIRealm wothout Rolesearch. In my LDAP-Directory no roles are set and I didn't set any roles in my web.xml. The Catalina log shows that the Realm authenticates Username and Password correct, although Access denied! I don't know why. This are the Entries in the log-file: 2002-06-18 17:44:43 JNDIRealm[Standalone]: Username schmutz2 successfully authenticated 2002-06-18 17:44:43 JNDIRealm[Standalone]: getRoles(uid=schmutz2,o=PIRONET,c=DE) I searched the source code of JNDIRealm and this way seems to be implemented: // Are we configured to do role searches? ArrayList list = new ArrayList(); if ((roleFormat == null) || (roleName == null)) return (list); So I think it must authenticate, but Access denies. Can anybody help me please -- 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]
Need Help with SecurityManager
First, is there a good tutorial on using SecurityManager? The info in the Tomcat Docs is rather sparse. Ultimately what I'm looking to do is protect non-jsp files, such as PDF docs. But so for I can't even start my app with the SecurityManager turned on. Here's what I get: catalina.out: Starting service Tomcat-Standalone Apache Tomcat/4.0.1 Template Servlet Error Loading Screen Definitions: URL /WEB-INF/screendefinition s_en_US.xml not found Starting service Tomcat-Apache Apache Tomcat/4.0.1 I'm not sure why the .xml file isn't being found, but it doesn't cause a problem with the app - everything works fine w/o SecurityManager. webpage: java.lang.NullPointerException at com.sun.j2ee.template.TemplateServlet.process(TemplateServlet.java:117) at com.sun.j2ee.template.TemplateServlet.doGet(TemplateServlet.java:87) at javax.servlet.http.HttpServlet.service(HttpServlet.java:740) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher. java:679) at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatch er.java:431) at org.apache.catalina.core.ApplicationDispatcher.access$0(ApplicationDispatche r.java:359) at org.apache.catalina.core.ApplicationDispatcher$PrivilegedForward.run(Applica tionDispatcher.java:130) at java.security.AccessController.doPrivileged(Native Method) at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher .java:347) at org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:409) at org.apache.jsp.index$jsp._jspService(index$jsp.java:57) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.ja va:202) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:382) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:474) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application FilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.access$0(ApplicationFilterCh ain.java:197) at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain .java:176) at java.security.AccessController.doPrivileged(Native Method) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh ain.java:172) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja va:243) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 66) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja va:201) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 66) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2344) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164 ) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 66) at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve. java:170) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 64) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170 ) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 64) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:462) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 64) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java :163) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 66) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java: 1011) at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1106 ) at java.lang.Thread.run(Thread.java:484) attachment: winmail.dat
Re: Configuration problems: mod_webapp with Tomcat 4.0.3 and Apache 2.0.35
because the Tomcat-Apache Service listens on port 8008 ( see your server.xml, at the end ) best regards carlos ferreira Jeffrey Bonevich wrote: Why would I do that when Tomcat is listening on 8080? Actually did a little more research and there is already a bug registered that covers this issue. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=4042 Looks as though there has been no action on this one for a while, and now it is very pertinent as the Port directive no longer exists for Apache 2. jeff Jay Gardner wrote: Try localhost:8008 instead --Jay Gardner -Original Message- From: Jeffrey Bonevich [mailto:[EMAIL PROTECTED]] Sent: Thursday, April 18, 2002 5:57 PM To: [EMAIL PROTECTED] Subject: Configuration problems: mod_webapp with Tomcat 4.0.3 and Apache 2.0.35 Ok, on to the next set of issues! Finally got mod_webapp compiled properly and installed in Apache 2 (configtest returns Syntax Ok). Then I add the VirtualHost section: NameVirtualHost 65.186.165.33 VirtualHost 65.186.165.33 ServerName tomcat.bonevich.com DocumentRoot /usr/local/tomcat/webapps/ WebAppConnection warpConnection warp localhost:8080 WebAppDeploy examples warpConnection /examples /VirtualHost ...and when I do another configtest I get errors: [root@strider apache2]# bin/apachectl configtest Syntax error on line 995 of /usr/local/apache2/conf/httpd.conf: Invalid port number (p1) No Port statement found Line 995 is the WebAppDeploy directive. Is this mod_webapp looking for the (now depracated) Port statement in the main body of the config? If so, time to update code. If not, what am I missing? (As a side note, tried the VirtualHost directives with 127.0.0.1, with :80 appended, and with just *; same error each time.) jeff -- Jeffrey Bonevich Ann Arbor, Michigan [EMAIL PROTECTED] http://www.bonevich.com Hwæt! Wë Gär-Dena in geär-dagum, peod-cyninga, prym gefrünon, hü ða aepelingas ellen fremedon! -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Security Policy problem - need to specify ALL jar files with a codebase wildcard
Hi, We are having trouble using security policies (catalina.policy) to grant access to a codebase that has multiple jar files. I am able to get folder-based codebases to work correctly: eg: grant file://d:/webapps/- This successfully grants access to all the permissions I set, which works fine for Servlets and JSP files, but JAR files in the WEB-INF/lib folder cannot access the permissions. Using a jar:file URL works: For example: jar:file:/D:/webapps/ROOT/WEB-INF/lib/myjar.jar!/ However: jar:file:/D:/webapps/- ... fails being an invalid JAR URL as it doesn't end in !/ While this works on a file-by-file workaround, it means we have to set the permissions for every jar file, in every context of the webapps folder in order to enforce the security policy effectively. As we host different customers uploading different applications, and different contexts, this makes the security policies unusable for JAR files. Is there a way to specify these as a wildcard URL like the server libraries do? eg: grant codeBase file:${catalina.home}/lib/- { permission java.security.AllPermission; }; Any suggestions? FURTHER NOTES - For Tomcat Developers === I have investigated this further with policy dumps of the security logs, and jave noticed Tomcat creates CodeSource objects using the jar:file:/jar-path.jar!/ url format when deploying jar files from the webapps folder. When deploying the system jar files however, it seems to use the file:/jar-file.jar format, which allows the master permissions (catalina.home/lib/-) to work as wildcards. Thanks in advance, Neale Rudd metawerx http://www.metawerx.net -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Shutdown Error - /WEB-INF/lib/commons-digester missing
I am using the 4.1 version of Tomcat contained in the JWSDP (Java Web Services Developers Pack EA2) from Sun along with the versions of startup.sh and shutdown.sh provided. My platform is Linux RedHat 7.1. Tomcat starts and functions correctly; however, when I use the shutdown script to stop it, I get the error that the commons-digester is missing. More specifically, the catalina log entry looks like this: WebappClassLoader: Resource '/WEB-INF/lib/commons-digester.jar' is missing. I have even tried putting the commons-digester.jar in the lib directory of the Root context, but the error persists on shutdown. The latest scripts appear virtually identical to those that I used under Tomcat 4.0.3 where I did not see the problem. Any suggestions as to the source of the error. Cynthia Jeness -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Parameters for virtual servers in server.xml? Is it possible?
You can put parameters such as this in web.xml for each webapp: context-param param-nameserviceProvider/param-name param-valueservice1/param-value descriptionThis is the description/description /context-param Then you can get them in your servlet using: application.getInitParameter(serviceProvider); //application is your javax.servlet.ServletContext --- Donie Kelly [EMAIL PROTECTED] wrote: Can anybody answer this question? I want to add parameters which are available to a servlet but different for each virtual host. I need to have a value called service provider id which is all I need to get the extra required information from LDAP. I need to do this so that the same code can be used across all virtual hosts Any ideas how this can be done Donie -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] __ Do You Yahoo!? Yahoo! - Official partner of 2002 FIFA World Cup http://fifaworldcup.yahoo.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
LDAP and SimpleRealm - Tomcat 4.0.3
Guys, I am using SimpleRealm with Tomcat 4.0.3 for authentication. It works but when inside my servlet I use LDAP for authorization I get the following error: javax.naming.NoInitialContextException: Cannot instantiate class: weblogic WLInitialContextFactory. Root exception is java.lang.ClassNotFoundExcepti blogic.jndi.WLInitialContextFactory at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappCl der.java:1394) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappCl der.java:1243) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:313) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:195) (...) The jar file containing this class is under {Tomcat.home}/common/lib as for documentation. Is it because I need to use an LDAP realm instead of simple realm also for authentication? I don't get this problem if I use other servlet containers. Thanks Angelo -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Problems with the session in a jsp file...
Hello!!, i'm a new user in this list. I have a problem with the sessions in my wap application. I use tomcat 4.0.2 and in the tomcat config i put the option cookies=false. When i test the aplication in a mobil phone the test failled because i can't save the session. I use the method encodeURL() in a jsp file in this manner: do type=accept label=Sumar name=num go href=%= response.encodeURL(t.jsp) %?status=1amp;numero=$numero/ /do I suposse that the sessionId is coming with the method encodeURL but The jsessionid isn't appear in the url of the cellular and the session lost. i don't know what happen and how resolve that problem, i need your help!!! Thanks so much... Carolina -- ** Carolina Waizani Wizani Kynesoft Sistemas C.A. telf: 0412-7234283 [EMAIL PROTECTED] [EMAIL PROTECTED] ** -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Null Pointer Exception - would you please take a look?
If you are trying to insert a NULL into a NOT NULL column (or are trying to insert special chars or the String is too long), you should get a SQLException, not a NullPointerException. You should recheck that you are actually getting a valid Connection --- Eddie Bush [EMAIL PROTECTED] wrote: There are also no nulls in that column. - Original Message - From: Eddie Bush [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Tuesday, June 18, 2002 8:09 AM Subject: Re: Null Pointer Exception - would you please take a look? - Original Message - From: John Gregg [EMAIL PROTECTED] Is the String you're setting null? I can't say how your driver handles that case, but maybe it doesn't like it. The jdk javadocs don't mention it. Is the String too big for the column, does it have weird characters in it? If There are no special characters in that field, although I never imagined that the field size might cause a problem. I will check that. Thank You! -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] __ Do You Yahoo!? Yahoo! - Official partner of 2002 FIFA World Cup http://fifaworldcup.yahoo.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
classpath problem? maybe?
Hello, I am getting frustrated with this little jsp /javabean problem. I hope someone can steer me in the proper direction. in my server.xml file I have set: Host className = org.apache.catalina.connector.warp.WarpHost name=testdomain.net debug=0 appBase=/home/test/www/webapps unpackWARs=false Valve className=org.apache.catalina.valves.AccessLogValve directory=/home/test/tomcat-test-logs prefix=access-log pattern=common/ Context path=manager docBase=manager debug=0 privileged=true/ Context path=webapps docBase=webapps debug=0 reloadable=true/ /Host I created a test jsp file with the line jsp:useBean id=myBean scope=page class= examples.bean1/ The bean1.class file I have in /home/test/www/webapps/examples. But when I call the page I get the error java.lang.ClassNotFoundException: examples.bean1 It seems that everything else works for the site. I created a war file of the examples and everything seems to work. Basic jsp pages work fine also. IT just when I created this bean I get errors. Can anyone offer me any suggestions with this? I am running tomcat 4.0.3 on red hat with mod_webapp. THanks for the help. --chad -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Please help with Tomcat - newbie
Hello, I am trying to get the servlet to obtain a list of filenames and directories in my servlet class to be sent back to the applet. However, I am not sure if my approach is correct. I used the following code in my servlet class in the directory: C:\(where i installed my tomcat)\Apache Tomcat 4.0\webapps\ROOT\WEB-INF\classes\MyServlet.class Codes in the class: File directory = new File(classes); File [] filenames = directory.listFile(); The result i get is null. No directory name classes. However, when I tried using . (I presume it means current directory), it seems to be in windows/system32 ?? I am quite confused about this. How do I actually refer to the directory I mentioned above? Do I need to configure anything? I really need help! Your advise will be much appreciated. Thanks Best Regards, Simon
mod_jk with Apache 2.0.36/TC 4.0.4-b3 on NT
I am having problems getting mod_jk to work with apache 2.0.36 and tomcat 4.0.4-b3. I have created the workers.properties file (inserted below). I have added in the listener and connector for AJP in server.xml file. If I try to have TC auto create the mod_jk.conf file it does not start TC and does not auto create the mod_jk.conf file for apache. One I am not sure about is the worker.inprocess.class_path. If anyone could please help it would be greatly appreciated. Thanks, Charles workers.tomcat_home=c:/jakarta-tomcat-4.0.4-b3 workers.java_home=$(JAVA_HOME) ps=\ worker.list=ajp13, ajp14 worker.ajp13.port=8009 worker.ajp13.host=localhost worker.ajp13.type=ajp13 worker.ajp13.lbfactor=1 worker.ajp14.port=8010 worker.ajp14.host=localhost worker.ajp14.type=ajp14 worker.ajp14.secretkey=secret worker.ajp14.credentials=myveryrandomentropy worker.ajp14.lbfactor=1 worker.loadbalancer.type=lb worker.loadbalancer.balanced_workers=ajp13 worker.inprocess.type=jni worker.inprocess.class_path=$(workers.tomcat_home)$(ps)server$(ps)lib$(ps) catalina.jar worker.inprocess.cmd_line=start worker.inprocess.jvm_lib=$(workers.java_home)$(ps)jre$(ps)bin$(ps)classic$ (ps)jvm.dll worker.inprocess.stdout=$(workers.tomcat_home)$(ps)logs$(ps)inprocess.stdo ut worker.inprocess.stderr=$(workers.tomcat_home)$(ps)logs$(ps)inprocess.stde rr attachment: winmail.dat -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Null Pointer Exception - would you please take a look?
I'm getting really annoyed =) It seems you people haven't actually read my question thoroughly enough to actually understand what I'm doing. The thought crosses my mind that you see the subject and then just scan and put in some standard Oh he's an idiot - he needs to do this response. The problem is with a JDBCRealm! I do NOTHING to send/receive anything to/from the database. I was of the understanding that Tomcat did this when I configured the realm and set up the security-constraint. While I believe my XML to be valid and correct, I will happily post it for inspection if someone thinks it would help. Here is a sequence of what happens and the actors that are involved: Actors: Me and Tomcat Me: Enter url of page that is protected by a security constraint into my browsers address bar. Press enter. Tomcat: Returns to the client a page that looks like: !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.0 Transitional//EN HTMLHEAD META http-equiv=Content-Type content=text/html; charset=windows-1252/HEAD BODYPRE/PRE/BODY/HTML (This is not what the actual page is - it's a JSP file - index.jsp - with much different content. Also notice I'm not calling a servlet! Even if I were, it wouldn't make a bit of difference at this point because Tomcat hasn't authenticated me! This happens when Tomcat should authenticate me - it is NOT my coding!!!) In my server log file, I have an error that starts off as: 2002-06-17 12:29:28 [org.apache.catalina.connector.warp.WarpRequestHandler] java.lang.NullPointerException at interbase.interclient.PreparedStatement.setString(Unknown Source) at org.apache.catalina.realm.JDBCRealm.credentials(JDBCRealm.java) at org.apache.catalina.realm.JDBCRealm.authenticate(JDBCRealm.java) at org.apache.catalina.realm.JDBCRealm.authenticate(JDBCRealm.java) My catalina.out has no indication of anything having gone awry - it merely has status messages indicating that the server was started (why isn't there a timestamp in here?). Any ideas? Thank you for having actually READ THE ENTIRE MESSAGE so you UNDERSTAND my problem before having issued a reply =) Ack! I'm sorry but I'm frustrated by the responses I am getting - makes me wanna just jump up and down and scream at the top of my lungs ... Please - I BEG of you - clue me in here - any thoughts why this is happening? Again, I can post my XML if you think I need to. A couple of questions people have asked up to this point, along with the answer: Q: Are you passing a null string? A: I get this when I try to visit a URL that falls under a security constraint. It's a JDBCRealm. Tomcat handles this - it is not my code. Q: Are you sure the fields in your table match what Tomcat is expecting? A: Initially they didn't. My fields were of length 14 and Tomcat says they should be 15 -- but they're varchar, so does that really matter? I rebuilt the tables so that anything Tomcat uses matches exactly what the docs say - meaning I made my fields to be of length 15. I still get the same response - exactly the same response. Is this the JDBCRealm? I put my DB driver in common/lib - so Tomcat SHOULD be able to find it - right? Is this the appropriate spot? Is it possible (and how possible?) that this is my driver? I use this driver just fine doing JDBC stuff all the time - no problem. Thanks for your time! Eddie - Original Message - From: August Detlefsen [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Tuesday, June 18, 2002 1:24 PM Subject: Re: Null Pointer Exception - would you please take a look? If you are trying to insert a NULL into a NOT NULL column (or are trying to insert special chars or the String is too long), you should get a SQLException, not a NullPointerException. You should recheck that you are actually getting a valid Connection -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
tomcat 4.1.3 and symlink directory
I just downloaded tomcat 4.1.3 beta version(LE for jdk1.4) and noticed that it does not serve jsp pages under a symlinked directory. Is this a new feature or a bug? This has worked for us on 4.0 tomcat. In our application, there are some shared jsp pages sitting under say /shared. For each client, there is a symlink /client/pages/shared pointing to /shared. Other pages work fine, but when I tried to include a shared page, tomcat somehow does not see that page and there is no '/shared' dir created under work directory. Thanks for your help. Liu capitalthinking.com
Re: Null Pointer Exception - would you please take a look?
This may be to much to ask for - but are you able to get this to work with a different DBMS? On first glance, it appears you (not literally) might be passing null to the JDBC driver's setString() method and the JDBC driver can't handle the null value. Consequently - things explode. If so - it would be JDBC driver's fault and not tomcat. (But that could be subject to opinion too) -Tim Eddie Bush wrote: I'm getting really annoyed =) It seems you people haven't actually read my question thoroughly enough to actually understand what I'm doing. The thought crosses my mind that you see the subject and then just scan and put in some standard Oh he's an idiot - he needs to do this response. The problem is with a JDBCRealm! I do NOTHING to send/receive anything to/from the database. I was of the understanding that Tomcat did this when I configured the realm and set up the security-constraint. While I believe my XML to be valid and correct, I will happily post it for inspection if someone thinks it would help. Here is a sequence of what happens and the actors that are involved: Actors: Me and Tomcat Me: Enter url of page that is protected by a security constraint into my browsers address bar. Press enter. Tomcat: Returns to the client a page that looks like: !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.0 Transitional//EN HTMLHEAD META http-equiv=Content-Type content=text/html; charset=windows-1252/HEAD BODYPRE/PRE/BODY/HTML (This is not what the actual page is - it's a JSP file - index.jsp - with much different content. Also notice I'm not calling a servlet! Even if I were, it wouldn't make a bit of difference at this point because Tomcat hasn't authenticated me! This happens when Tomcat should authenticate me - it is NOT my coding!!!) In my server log file, I have an error that starts off as: 2002-06-17 12:29:28 [org.apache.catalina.connector.warp.WarpRequestHandler] java.lang.NullPointerException at interbase.interclient.PreparedStatement.setString(Unknown Source) at org.apache.catalina.realm.JDBCRealm.credentials(JDBCRealm.java) at org.apache.catalina.realm.JDBCRealm.authenticate(JDBCRealm.java) at org.apache.catalina.realm.JDBCRealm.authenticate(JDBCRealm.java) My catalina.out has no indication of anything having gone awry - it merely has status messages indicating that the server was started (why isn't there a timestamp in here?). Any ideas? Thank you for having actually READ THE ENTIRE MESSAGE so you UNDERSTAND my problem before having issued a reply =) Ack! I'm sorry but I'm frustrated by the responses I am getting - makes me wanna just jump up and down and scream at the top of my lungs ... Please - I BEG of you - clue me in here - any thoughts why this is happening? Again, I can post my XML if you think I need to. A couple of questions people have asked up to this point, along with the answer: Q: Are you passing a null string? A: I get this when I try to visit a URL that falls under a security constraint. It's a JDBCRealm. Tomcat handles this - it is not my code. Q: Are you sure the fields in your table match what Tomcat is expecting? A: Initially they didn't. My fields were of length 14 and Tomcat says they should be 15 -- but they're varchar, so does that really matter? I rebuilt the tables so that anything Tomcat uses matches exactly what the docs say - meaning I made my fields to be of length 15. I still get the same response - exactly the same response. Is this the JDBCRealm? I put my DB driver in common/lib - so Tomcat SHOULD be able to find it - right? Is this the appropriate spot? Is it possible (and how possible?) that this is my driver? I use this driver just fine doing JDBC stuff all the time - no problem. Thanks for your time! Eddie -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Null Pointer Exception - would you please take a look?
Ok, I just bumped it down to a MemoryRealm and tried that - and it works just fine. What gives with the JDBCRealm? I really need to get this going! Thank you for your input! Eddie - Original Message - From: Eddie Bush [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Tuesday, June 18, 2002 1:57 PM Subject: Re: Null Pointer Exception - would you please take a look? I'm getting really annoyed =) It seems you people haven't actually read my question thoroughly enough to actually understand what I'm doing. The thought crosses my mind that you see the subject and then just scan and put in some standard Oh he's an idiot - he needs to do this response. The problem is with a JDBCRealm! I do NOTHING to send/receive anything to/from the database. I was of the understanding that Tomcat did this when I configured the realm and set up the security-constraint. While I believe my XML to be valid and correct, I will happily post it for inspection if someone thinks it would help. Here is a sequence of what happens and the actors that are involved: Actors: Me and Tomcat Me: Enter url of page that is protected by a security constraint into my browsers address bar. Press enter. Tomcat: Returns to the client a page that looks like: !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.0 Transitional//EN HTMLHEAD META http-equiv=Content-Type content=text/html; charset=windows-1252/HEAD BODYPRE/PRE/BODY/HTML (This is not what the actual page is - it's a JSP file - index.jsp - with much different content. Also notice I'm not calling a servlet! Even if I were, it wouldn't make a bit of difference at this point because Tomcat hasn't authenticated me! This happens when Tomcat should authenticate me - it is NOT my coding!!!) In my server log file, I have an error that starts off as: 2002-06-17 12:29:28 [org.apache.catalina.connector.warp.WarpRequestHandler] java.lang.NullPointerException at interbase.interclient.PreparedStatement.setString(Unknown Source) at org.apache.catalina.realm.JDBCRealm.credentials(JDBCRealm.java) at org.apache.catalina.realm.JDBCRealm.authenticate(JDBCRealm.java) at org.apache.catalina.realm.JDBCRealm.authenticate(JDBCRealm.java) My catalina.out has no indication of anything having gone awry - it merely has status messages indicating that the server was started (why isn't there a timestamp in here?). Any ideas? Thank you for having actually READ THE ENTIRE MESSAGE so you UNDERSTAND my problem before having issued a reply =) Ack! I'm sorry but I'm frustrated by the responses I am getting - makes me wanna just jump up and down and scream at the top of my lungs ... Please - I BEG of you - clue me in here - any thoughts why this is happening? Again, I can post my XML if you think I need to. A couple of questions people have asked up to this point, along with the answer: Q: Are you passing a null string? A: I get this when I try to visit a URL that falls under a security constraint. It's a JDBCRealm. Tomcat handles this - it is not my code. Q: Are you sure the fields in your table match what Tomcat is expecting? A: Initially they didn't. My fields were of length 14 and Tomcat says they should be 15 -- but they're varchar, so does that really matter? I rebuilt the tables so that anything Tomcat uses matches exactly what the docs say - meaning I made my fields to be of length 15. I still get the same response - exactly the same response. Is this the JDBCRealm? I put my DB driver in common/lib - so Tomcat SHOULD be able to find it - right? Is this the appropriate spot? Is it possible (and how possible?) that this is my driver? I use this driver just fine doing JDBC stuff all the time - no problem. Thanks for your time! Eddie - Original Message - From: August Detlefsen [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Tuesday, June 18, 2002 1:24 PM Subject: Re: Null Pointer Exception - would you please take a look? If you are trying to insert a NULL into a NOT NULL column (or are trying to insert special chars or the String is too long), you should get a SQLException, not a NullPointerException. You should recheck that you are actually getting a valid Connection -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Null Pointer Exception - would you please take a look?
Hi Eddie, Have you tried accessing Tomcat directly and not going through Apache? I was having too much trouble using mod_webapp together with Apache and Tomcat due to that form-based authentication didn't work through Apache but it did directly with Tomcat. Maybe we should all use mod_jk instead. Is anybody running it on Mac OS X BTW? Markus On tisdag, juni 18, 2002, at 09:15 , Eddie Bush wrote: Ok, I just bumped it down to a MemoryRealm and tried that - and it works just fine. What gives with the JDBCRealm? I really need to get this going! Thank you for your input! Eddie - Original Message - From: Eddie Bush [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Tuesday, June 18, 2002 1:57 PM Subject: Re: Null Pointer Exception - would you please take a look? I'm getting really annoyed =) It seems you people haven't actually read my question thoroughly enough to actually understand what I'm doing. The thought crosses my mind that you see the subject and then just scan and put in some standard Oh he's an idiot - he needs to do this response. The problem is with a JDBCRealm! I do NOTHING to send/receive anything to/from the database. I was of the understanding that Tomcat did this when I configured the realm and set up the security-constraint. While I believe my XML to be valid and correct, I will happily post it for inspection if someone thinks it would help. Here is a sequence of what happens and the actors that are involved: Actors: Me and Tomcat Me: Enter url of page that is protected by a security constraint into my browsers address bar. Press enter. Tomcat: Returns to the client a page that looks like: !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.0 Transitional//EN HTMLHEAD META http-equiv=Content-Type content=text/html; charset=windows-1252/HEAD BODYPRE/PRE/BODY/HTML (This is not what the actual page is - it's a JSP file - index.jsp - with much different content. Also notice I'm not calling a servlet! Even if I were, it wouldn't make a bit of difference at this point because Tomcat hasn't authenticated me! This happens when Tomcat should authenticate me - it is NOT my coding!!!) In my server log file, I have an error that starts off as: 2002-06-17 12:29:28 [org.apache.catalina.connector.warp.WarpRequestHandler] java.lang.NullPointerException at interbase.interclient.PreparedStatement.setString(Unknown Source) at org.apache.catalina.realm.JDBCRealm.credentials(JDBCRealm.java) at org.apache.catalina.realm.JDBCRealm.authenticate(JDBCRealm.java) at org.apache.catalina.realm.JDBCRealm.authenticate(JDBCRealm.java) My catalina.out has no indication of anything having gone awry - it merely has status messages indicating that the server was started (why isn't there a timestamp in here?). Any ideas? Thank you for having actually READ THE ENTIRE MESSAGE so you UNDERSTAND my problem before having issued a reply =) Ack! I'm sorry but I'm frustrated by the responses I am getting - makes me wanna just jump up and down and scream at the top of my lungs ... Please - I BEG of you - clue me in here - any thoughts why this is happening? Again, I can post my XML if you think I need to. A couple of questions people have asked up to this point, along with the answer: Q: Are you passing a null string? A: I get this when I try to visit a URL that falls under a security constraint. It's a JDBCRealm. Tomcat handles this - it is not my code. Q: Are you sure the fields in your table match what Tomcat is expecting? A: Initially they didn't. My fields were of length 14 and Tomcat says they should be 15 -- but they're varchar, so does that really matter? I rebuilt the tables so that anything Tomcat uses matches exactly what the docs say - meaning I made my fields to be of length 15. I still get the same response - exactly the same response. Is this the JDBCRealm? I put my DB driver in common/lib - so Tomcat SHOULD be able to find it - right? Is this the appropriate spot? Is it possible (and how possible?) that this is my driver? I use this driver just fine doing JDBC stuff all the time - no problem. Thanks for your time! Eddie - Original Message - From: August Detlefsen [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Tuesday, June 18, 2002 1:24 PM Subject: Re: Null Pointer Exception - would you please take a look? If you are trying to insert a NULL into a NOT NULL column (or are trying to insert special chars or the String is too long), you should get a SQLException, not a NullPointerException. You should recheck that you are actually getting a valid Connection -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:tomcat-user- [EMAIL PROTECTED] For additional commands,
RE: Null Pointer Exception - would you please take a look?
First, back-off. Yeah, maybe some people aren't reading your e-mails carefully, but some of us are supposed to be billing clients and not answering your e-mails. Second, an introduction to the art of reading stack traces. There's no problem loading your driver. If there had been, you would be getting a different error message. The connection is not null. Again, if so, you never your have gotten as far as you have. The statement is not null. If it was, the stack trace would finish one line earlier than it does. The problem is that setString() has been called and there's a NPE. My educated guess is that the String param is null. The username is the parameter there, BTW. Look at the Tomcat source. What puzzles me about your situation is that you say you're accessing a url (a jsp, right?) that you THINK is protected. What's the url and what does your web.xml file say? Tomcat is obviously trying to log you in via the JDBCRealm but you said you're not getting prompted to enter a username and password. That's a stumper to me. It at least explains why setString() might be getting a null param. With basic authentication, the browser remembers the login info and resubmits it on every request, I think. The only way to log out is to restart your brower. By default Tomcat caches the login info also, so you wouldn't see an attempt to hit the db unless you turned off this caching, which you probably didn't. So, I would say there's an issue with web.xml not doing what you think it should do but I can't put my finger on what it is. Post your url and web.xml contents. You might also look at the status codes in the access log. john -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]. org]On Behalf Of Eddie Bush Sent: Tuesday, June 18, 2002 1:57 PM To: Tomcat Users List; [EMAIL PROTECTED] Subject: Re: Null Pointer Exception - would you please take a look? I'm getting really annoyed =) It seems you people haven't actually read my question thoroughly enough to actually understand what I'm doing. The thought crosses my mind that you see the subject and then just scan and put in some standard Oh he's an idiot - he needs to do this response. The problem is with a JDBCRealm! I do NOTHING to send/receive anything to/from the database. I was of the understanding that Tomcat did this when I configured the realm and set up the security-constraint. While I believe my XML to be valid and correct, I will happily post it for inspection if someone thinks it would help. Here is a sequence of what happens and the actors that are involved: Actors: Me and Tomcat Me: Enter url of page that is protected by a security constraint into my browsers address bar. Press enter. Tomcat: Returns to the client a page that looks like: !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.0 Transitional//EN HTMLHEAD META http-equiv=Content-Type content=text/html; charset=windows-1252/HEAD BODYPRE/PRE/BODY/HTML (This is not what the actual page is - it's a JSP file - index.jsp - with much different content. Also notice I'm not calling a servlet! Even if I were, it wouldn't make a bit of difference at this point because Tomcat hasn't authenticated me! This happens when Tomcat should authenticate me - it is NOT my coding!!!) In my server log file, I have an error that starts off as: 2002-06-17 12:29:28 [org.apache.catalina.connector.warp.WarpRequestHandler] java.lang.NullPointerException at interbase.interclient.PreparedStatement.setString(Unknown Source) at org.apache.catalina.realm.JDBCRealm.credentials(JDBCRealm.java) at org.apache.catalina.realm.JDBCRealm.authenticate(JDBCRealm.java) at org.apache.catalina.realm.JDBCRealm.authenticate(JDBCRealm.java) My catalina.out has no indication of anything having gone awry - it merely has status messages indicating that the server was started (why isn't there a timestamp in here?). Any ideas? Thank you for having actually READ THE ENTIRE MESSAGE so you UNDERSTAND my problem before having issued a reply =) Ack! I'm sorry but I'm frustrated by the responses I am getting - makes me wanna just jump up and down and scream at the top of my lungs ... Please - I BEG of you - clue me in here - any thoughts why this is happening? Again, I can post my XML if you think I need to. A couple of questions people have asked up to this point, along with the answer: Q: Are you passing a null string? A: I get this when I try to visit a URL that falls under a security constraint. It's a JDBCRealm. Tomcat handles this - it is not my code. Q: Are you sure the fields in your table match what Tomcat is expecting? A: Initially they didn't. My fields were of length 14 and Tomcat says they should be 15 -- but they're varchar, so does that really matter? I rebuilt the tables so that anything Tomcat uses matches exactly what the docs say - meaning I made my fields to be of length 15. I still get the same response - exactly the same response. Is this the
Re: Null Pointer Exception - would you please take a look?
But why would this be happening? I haven't even been presented with a prompt at which I could enter a usename/password! I understand what you are saying - but I'm not sure ... I'm not sure =) No, I don't really have another DBMS I can plug in easily. Let me go ahead and post my realm definition - maybe someone will see a problem with it: Realm className=org.apache.catalina.realm.JDBCRealm debug=99 driverName=interbase.interclient.Driver connectionURL=jdbc:interbase://host//path/to/my/data/file.gdb connectionName=validuser connectionPassword=validuserpswd userTable=member userNameCol=username userCredCol=passwd userRoleTable=member_role roleNameCol=rolename / Is this good? It's nested in an Engine element (WarpEngine) which is nested in a Connector element (WarpConnector) which is nested in a Service element which is nested in a Server element. Basically what I did was take the config file that came with Tomcat, cut out ALL of the stand-alone stuff - and leave the Warp stuff. Does it sound as though I've approached this poorly? It works for everything except this danged authentication! Thanks so much! Eddie - Original Message - From: Tim Funk [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Tuesday, June 18, 2002 2:22 PM Subject: Re: Null Pointer Exception - would you please take a look? This may be to much to ask for - but are you able to get this to work with a different DBMS? On first glance, it appears you (not literally) might be passing null to the JDBC driver's setString() method and the JDBC driver can't handle the null value. Consequently - things explode. If so - it would be JDBC driver's fault and not tomcat. (But that could be subject to opinion too) -Tim Eddie Bush wrote: I'm getting really annoyed =) It seems you people haven't actually read my question thoroughly enough to actually understand what I'm doing. The thought crosses my mind that you see the subject and then just scan and put in some standard Oh he's an idiot - he needs to do this response. The problem is with a JDBCRealm! I do NOTHING to send/receive anything to/from the database. I was of the understanding that Tomcat did this when I configured the realm and set up the security-constraint. While I believe my XML to be valid and correct, I will happily post it for inspection if someone thinks it would help. Here is a sequence of what happens and the actors that are involved: Actors: Me and Tomcat Me: Enter url of page that is protected by a security constraint into my browsers address bar. Press enter. Tomcat: Returns to the client a page that looks like: !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.0 Transitional//EN HTMLHEAD META http-equiv=Content-Type content=text/html; charset=windows-1252/HEAD BODYPRE/PRE/BODY/HTML (This is not what the actual page is - it's a JSP file - index.jsp - with much different content. Also notice I'm not calling a servlet! Even if I were, it wouldn't make a bit of difference at this point because Tomcat hasn't authenticated me! This happens when Tomcat should authenticate me - it is NOT my coding!!!) In my server log file, I have an error that starts off as: 2002-06-17 12:29:28 [org.apache.catalina.connector.warp.WarpRequestHandler] java.lang.NullPointerException at interbase.interclient.PreparedStatement.setString(Unknown Source) at org.apache.catalina.realm.JDBCRealm.credentials(JDBCRealm.java) at org.apache.catalina.realm.JDBCRealm.authenticate(JDBCRealm.java) at org.apache.catalina.realm.JDBCRealm.authenticate(JDBCRealm.java) My catalina.out has no indication of anything having gone awry - it merely has status messages indicating that the server was started (why isn't there a timestamp in here?). Any ideas? Thank you for having actually READ THE ENTIRE MESSAGE so you UNDERSTAND my problem before having issued a reply =) Ack! I'm sorry but I'm frustrated by the responses I am getting - makes me wanna just jump up and down and scream at the top of my lungs ... Please - I BEG of you - clue me in here - any thoughts why this is happening? Again, I can post my XML if you think I need to. A couple of questions people have asked up to this point, along with the answer: Q: Are you passing a null string? A: I get this when I try to visit a URL that falls under a security constraint. It's a JDBCRealm. Tomcat handles this - it is not my code. Q: Are you sure the fields in your table match what Tomcat is expecting? A: Initially they didn't. My fields were of length 14 and Tomcat says they should be 15 -- but they're varchar, so does that really matter? I rebuilt the tables so that anything Tomcat uses matches exactly what the docs say - meaning I made my fields to be of length 15. I
Re: Null Pointer Exception - would you please take a look?
I think I'm about to that point. This is rally starting to peeve me off. - Original Message - From: Markus Kirsten [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Tuesday, June 18, 2002 2:27 PM Subject: Re: Null Pointer Exception - would you please take a look? Hi Eddie, Have you tried accessing Tomcat directly and not going through Apache? I was having too much trouble using mod_webapp together with Apache and Tomcat due to that form-based authentication didn't work through Apache but it did directly with Tomcat. Maybe we should all use mod_jk instead. Is anybody running it on Mac OS X BTW? Markus On tisdag, juni 18, 2002, at 09:15 , Eddie Bush wrote: Ok, I just bumped it down to a MemoryRealm and tried that - and it works just fine. What gives with the JDBCRealm? I really need to get this going! Thank you for your input! Eddie - Original Message - From: Eddie Bush [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Tuesday, June 18, 2002 1:57 PM Subject: Re: Null Pointer Exception - would you please take a look? I'm getting really annoyed =) It seems you people haven't actually read my question thoroughly enough to actually understand what I'm doing. The thought crosses my mind that you see the subject and then just scan and put in some standard Oh he's an idiot - he needs to do this response. The problem is with a JDBCRealm! I do NOTHING to send/receive anything to/from the database. I was of the understanding that Tomcat did this when I configured the realm and set up the security-constraint. While I believe my XML to be valid and correct, I will happily post it for inspection if someone thinks it would help. Here is a sequence of what happens and the actors that are involved: Actors: Me and Tomcat Me: Enter url of page that is protected by a security constraint into my browsers address bar. Press enter. Tomcat: Returns to the client a page that looks like: !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.0 Transitional//EN HTMLHEAD META http-equiv=Content-Type content=text/html; charset=windows-1252/HEAD BODYPRE/PRE/BODY/HTML (This is not what the actual page is - it's a JSP file - index.jsp - with much different content. Also notice I'm not calling a servlet! Even if I were, it wouldn't make a bit of difference at this point because Tomcat hasn't authenticated me! This happens when Tomcat should authenticate me - it is NOT my coding!!!) In my server log file, I have an error that starts off as: 2002-06-17 12:29:28 [org.apache.catalina.connector.warp.WarpRequestHandler] java.lang.NullPointerException at interbase.interclient.PreparedStatement.setString(Unknown Source) at org.apache.catalina.realm.JDBCRealm.credentials(JDBCRealm.java) at org.apache.catalina.realm.JDBCRealm.authenticate(JDBCRealm.java) at org.apache.catalina.realm.JDBCRealm.authenticate(JDBCRealm.java) My catalina.out has no indication of anything having gone awry - it merely has status messages indicating that the server was started (why isn't there a timestamp in here?). Any ideas? Thank you for having actually READ THE ENTIRE MESSAGE so you UNDERSTAND my problem before having issued a reply =) Ack! I'm sorry but I'm frustrated by the responses I am getting - makes me wanna just jump up and down and scream at the top of my lungs ... Please - I BEG of you - clue me in here - any thoughts why this is happening? Again, I can post my XML if you think I need to. A couple of questions people have asked up to this point, along with the answer: Q: Are you passing a null string? A: I get this when I try to visit a URL that falls under a security constraint. It's a JDBCRealm. Tomcat handles this - it is not my code. Q: Are you sure the fields in your table match what Tomcat is expecting? A: Initially they didn't. My fields were of length 14 and Tomcat says they should be 15 -- but they're varchar, so does that really matter? I rebuilt the tables so that anything Tomcat uses matches exactly what the docs say - meaning I made my fields to be of length 15. I still get the same response - exactly the same response. Is this the JDBCRealm? I put my DB driver in common/lib - so Tomcat SHOULD be able to find it - right? Is this the appropriate spot? Is it possible (and how possible?) that this is my driver? I use this driver just fine doing JDBC stuff all the time - no problem. Thanks for your time! Eddie - Original Message - From: August Detlefsen [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Tuesday, June 18, 2002 1:24 PM Subject: Re: Null Pointer Exception - would you please take a look? If you are trying to insert a NULL into a NOT NULL column (or are
mod_jk with Apache 2.0.36/TC 4.0.4-b3 on NT
I am having problems getting mod_jk to work with apache 2.0.36 and tomcat 4.0.4-b3. I have created the workers.properties file (inserted below). I have added in the listener and connector for AJP in server.xml file. If I try to have TC auto create the mod_jk.conf file it does not start TC and does not auto create the mod_jk.conf file for apache. One I am not sure about is the worker.inprocess.class_path. If anyone could please help it would be greatly appreciated. Thanks, Charles # workers.properties file content # workers.tomcat_home=c:/jakarta-tomcat-4.0.4-b3 workers.java_home=$(JAVA_HOME) ps=\ worker.list=ajp13, ajp14 worker.ajp13.port=8009 worker.ajp13.host=localhost worker.ajp13.type=ajp13 worker.ajp13.lbfactor=1 worker.ajp14.port=8010 worker.ajp14.host=localhost worker.ajp14.type=ajp14 worker.ajp14.secretkey=secret worker.ajp14.credentials=myveryrandomentropy worker.ajp14.lbfactor=1 worker.loadbalancer.type=lb worker.loadbalancer.balanced_workers=ajp13 worker.inprocess.type=jni worker.inprocess.class_path=$(workers.tomcat_home)$(ps)server$(ps)lib$(ps)ca talina.jar worker.inprocess.cmd_line=start worker.inprocess.jvm_lib=$(workers.java_home)$(ps)jre$(ps)bin$(ps)classic$(p s)jvm.dll worker.inprocess.stdout=$(workers.tomcat_home)$(ps)logs$(ps)inprocess.stdout worker.inprocess.stderr=$(workers.tomcat_home)$(ps)logs$(ps)inprocess.stderr attachment: winmail.dat -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Caching-Problem Tomcat 4.0.x (Tomcat 3.3.1 works)
Hi, I have the following problem: I have a servlet that creates as a result a (plain) html file on the server and saves it on the server. The browser than requests the html page to display it. The html page created by the servlet is updated very fast (each second). To indicate this, the html page contains a time stamp to track the correct update of the page. It seems that Tomcat4.0.x does not recognize that the html file has been changed and delivers the old version of the html page. Only if the browser is waiting about 5s until it requests the new created html page, it works. With Tomcat 3.3.1 the servlet can update the html file as often as needed. Tomcat 3.3.1 always delivers the newest version. (In the html file there are the needed meta tags to avoid caching the page on the client side and to avoid caching in a proxy!) So, my question is: 1) Does Tomcat 4.0.x have a problem that a static html page to be delivered has been updated within the last second? 2) Does Tomcat 4.0.x have any internal caching mechanisms (to avoid loading the html file from the disk for each request)? 3) If so: Is there any possibility to configure this caching? Greetings Michael Michael Timpe Melchiorstr. 24 50670 Köln eMail: [EMAIL PROTECTED]
RE: Null Pointer Exception - would you please take a look?
This is a known problem of interclient JDBC driver, they claim partly JDBC 2.0 compatibility, but i should say it JDBC 0.5 :) If you try firebiurd instead of 6.0 you try the jca driver at firebird.sourceforge.org it's a Type 4 driver you doesnt need interserver at all.. last time i tested it worked btw.. Saludos , Ignacio J. Ortega -Mensaje original- De: Eddie Bush [mailto:[EMAIL PROTECTED]] Enviado el: 18 de junio de 2002 21:15 Para: Tomcat Users List Asunto: Re: Null Pointer Exception - would you please take a look? Ok, I just bumped it down to a MemoryRealm and tried that - and it works just fine. What gives with the JDBCRealm? I really need to get this going! Thank you for your input! Eddie - Original Message - From: Eddie Bush [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Tuesday, June 18, 2002 1:57 PM Subject: Re: Null Pointer Exception - would you please take a look? I'm getting really annoyed =) It seems you people haven't actually read my question thoroughly enough to actually understand what I'm doing. The thought crosses my mind that you see the subject and then just scan and put in some standard Oh he's an idiot - he needs to do this response. The problem is with a JDBCRealm! I do NOTHING to send/receive anything to/from the database. I was of the understanding that Tomcat did this when I configured the realm and set up the security-constraint. While I believe my XML to be valid and correct, I will happily post it for inspection if someone thinks it would help. Here is a sequence of what happens and the actors that are involved: Actors: Me and Tomcat Me: Enter url of page that is protected by a security constraint into my browsers address bar. Press enter. Tomcat: Returns to the client a page that looks like: !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.0 Transitional//EN HTMLHEAD META http-equiv=Content-Type content=text/html; charset=windows-1252/HEAD BODYPRE/PRE/BODY/HTML (This is not what the actual page is - it's a JSP file - index.jsp - with much different content. Also notice I'm not calling a servlet! Even if I were, it wouldn't make a bit of difference at this point because Tomcat hasn't authenticated me! This happens when Tomcat should authenticate me - it is NOT my coding!!!) In my server log file, I have an error that starts off as: 2002-06-17 12:29:28 [org.apache.catalina.connector.warp.WarpRequestHandler] java.lang.NullPointerException at interbase.interclient.PreparedStatement.setString(Unknown Source) at org.apache.catalina.realm.JDBCRealm.credentials(JDBCRealm.java) at org.apache.catalina.realm.JDBCRealm.authenticate(JDBCRealm.java) at org.apache.catalina.realm.JDBCRealm.authenticate(JDBCRealm.java) My catalina.out has no indication of anything having gone awry - it merely has status messages indicating that the server was started (why isn't there a timestamp in here?). Any ideas? Thank you for having actually READ THE ENTIRE MESSAGE so you UNDERSTAND my problem before having issued a reply =) Ack! I'm sorry but I'm frustrated by the responses I am getting - makes me wanna just jump up and down and scream at the top of my lungs ... Please - I BEG of you - clue me in here - any thoughts why this is happening? Again, I can post my XML if you think I need to. A couple of questions people have asked up to this point, along with the answer: Q: Are you passing a null string? A: I get this when I try to visit a URL that falls under a security constraint. It's a JDBCRealm. Tomcat handles this - it is not my code. Q: Are you sure the fields in your table match what Tomcat is expecting? A: Initially they didn't. My fields were of length 14 and Tomcat says they should be 15 -- but they're varchar, so does that really matter? I rebuilt the tables so that anything Tomcat uses matches exactly what the docs say - meaning I made my fields to be of length 15. I still get the same response - exactly the same response. Is this the JDBCRealm? I put my DB driver in common/lib - so Tomcat SHOULD be able to find it - right? Is this the appropriate spot? Is it possible (and how possible?) that this is my driver? I use this driver just fine doing JDBC stuff all the time - no problem. Thanks for your time! Eddie - Original Message - From: August Detlefsen [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Tuesday, June 18, 2002 1:24 PM Subject: Re: Null Pointer Exception - would you please take a look? If you are trying to insert a NULL into a NOT NULL column (or are trying to insert special chars or the String is too long), you should get a SQLException, not a NullPointerException. You should recheck that
Re: Null Pointer Exception - would you please take a look?
- Original Message - From: John Gregg [EMAIL PROTECTED] To: 'Tomcat Users List' [EMAIL PROTECTED] Sent: Tuesday, June 18, 2002 2:34 PM Subject: RE: Null Pointer Exception - would you please take a look? First, back-off. Yeah, maybe some people aren't reading your e-mails carefully, but some of us are supposed to be billing clients and not answering your e-mails. Not trying to start any flames John. I'd just prefer that if someone doesn't have the time to read and understand my question that they not reply - that's all. When you look at the third message in a row that says Make sure you're not giving a null value or He isn't checking to make sure he has a valid connection it gets kinda exasperating. I understand people have things they have to do - that they get paid to do - and I fault nobody for that. Your previous reponse, to be honest, is the most useful one I have gotten until you sent this one - thank you for honestly trying to come up with a solution - I DO appreciate it. Second, an introduction to the art of reading stack traces. There's no problem loading your driver. If there had been, you would be getting a different error message. The connection is not null. Again, if so, you never your have gotten as far as you have. The statement is not null. If it was, the stack trace would finish one line earlier than it does. The problem is that setString() has been called and there's a NPE. My educated guess is that the String param is null. The username is the parameter there, BTW. Look at the Tomcat source. Yes - I agree and these were my thoughts as well - but why? =) Is it perhaps a mis-configuration on my part? I honestly believe I have the XML right. It works fine with a MemoryRealm - only when I go to a JDBCRealm does it start having problems. What puzzles me about your situation is that you say you're accessing a url (a jsp, right?) that you THINK is protected. What's the url and what does your web.xml file say? Tomcat is obviously trying to log you in via the JDBCRealm but you said you're not getting prompted to enter a username and password. That's a stumper to me. It at least explains why setString() might be getting a null param. With basic authentication, the browser remembers the login info and resubmits it on every request, I think. The only way to log out is to restart your brower. By default Tomcat caches the login info also, so you wouldn't see an attempt to hit the db unless you turned off this caching, which you probably didn't. So, I would say there's an issue with web.xml not doing what you think it should do but I can't put my finger on what it is. Post your url and web.xml contents. No - I don't think it's protected =) I know it's protected. If I access it with a MemoryRealm everything works as expected. It's only when I introduce the JDBCRealm that things get out of whack. I always restart my browser =) Heck I've even tried rebooting. Oh - and I always close OutlookExpress when I close IE too - I've had things that cause me to be suspicious of it causing things to be cached between browser session. Call me over-paranoid - but I like to be extra sure =) My web.xml is: ?xml version=1.0 encoding=ISO-8859-1 ? !DOCTYPE web-app (View Source for full doctype...) - web-app - welcome-file-list welcome-fileindex.jsp/welcome-file /welcome-file-list - security-constraint - web-resource-collection web-resource-nameadmin/web-resource-name url-pattern/*/url-pattern /web-resource-collection - auth-constraint role-namemanager/role-name /auth-constraint - user-data-constraint transport-guaranteeNONE/transport-guarantee /user-data-constraint /security-constraint - login-config auth-methodBASIC/auth-method realm-nameAuthentication Test/realm-name /login-config - security-role role-namemanager/role-name /security-role /web-app You might also look at the status codes in the access log. Will do - but I'm not sure where I can make sense of them - I'll take a look on the TC site though. john Sorry if I offended you - I wasn't trying to - I was quite offended at the responses I was getting though. I felt as though I were being treated like an idiot - and I am not an idiot =) I _do_ understand that people are in business to make money and not just answer questions for free all day long, however if that person doesn't have time to actually read my question - and not just the subject - I'd prefer they just pass me by. It's a waste of both of our time if they do otherwise - would you not agree? No - I don't feel you fall in this category - you've given good, sound advice. Sincerely, Eddie -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: mod_jk with Apache 2.0.36/TC 4.0.4-b3 on NT
Hi, I have a problem in the same area: 1) I put mod_jk2.dll to the modules dir of apache. 2) I added LoadModule jk2_module modules/mod_jk2.dll to my httpd.conf file 3) I added the directive JkMount /*.jsp ajp13 to my httpd.conf file Testing the conf file using apache.exe -t httpd.conf, the following report will be written: Invalid command 'JkMount', perhaps mis-spelled or defined by a module not included in the server configuration I did not found any installation instructions for mod_jk2. The old documentation for mod_jk seems not to be valid (JkMount definitely worked with mod_jk). Any ideas? Greetings Michael - Original Message - From: Charles Sanders [EMAIL PROTECTED] To: Tomcat Users List (E-mail) [EMAIL PROTECTED] Sent: Tuesday, June 18, 2002 7:36 PM Subject: mod_jk with Apache 2.0.36/TC 4.0.4-b3 on NT I am having problems getting mod_jk to work with apache 2.0.36 and tomcat 4.0.4-b3. I have created the workers.properties file (inserted below). I have added in the listener and connector for AJP in server.xml file. If I try to have TC auto create the mod_jk.conf file it does not start TC and does not auto create the mod_jk.conf file for apache. One I am not sure about is the worker.inprocess.class_path. If anyone could please help it would be greatly appreciated. Thanks, Charles # workers.properties file content # workers.tomcat_home=c:/jakarta-tomcat-4.0.4-b3 workers.java_home=$(JAVA_HOME) ps=\ worker.list=ajp13, ajp14 worker.ajp13.port=8009 worker.ajp13.host=localhost worker.ajp13.type=ajp13 worker.ajp13.lbfactor=1 worker.ajp14.port=8010 worker.ajp14.host=localhost worker.ajp14.type=ajp14 worker.ajp14.secretkey=secret worker.ajp14.credentials=myveryrandomentropy worker.ajp14.lbfactor=1 worker.loadbalancer.type=lb worker.loadbalancer.balanced_workers=ajp13 worker.inprocess.type=jni worker.inprocess.class_path=$(workers.tomcat_home)$(ps)server$(ps)lib$(ps)ca talina.jar worker.inprocess.cmd_line=start worker.inprocess.jvm_lib=$(workers.java_home)$(ps)jre$(ps)bin$(ps)classic$(p s)jvm.dll worker.inprocess.stdout=$(workers.tomcat_home)$(ps)logs$(ps)inprocess.stdout worker.inprocess.stderr=$(workers.tomcat_home)$(ps)logs$(ps)inprocess.stderr -- 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: Null Pointer Exception - would you please take a look?
Awesome! Thank you Ignacio! Thank you John! I had been thinking of switching to Firebird but didn't think it would be terribly important for me to do so at this point - you just bumped the priority up =) No interserver? Wow - I should gain a lot of free resources out of that! Thank you so much Eddie - Original Message - From: Ignacio J. Ortega [EMAIL PROTECTED] To: 'Tomcat Users List' [EMAIL PROTECTED] Sent: Tuesday, June 18, 2002 2:55 PM Subject: RE: Null Pointer Exception - would you please take a look? This is a known problem of interclient JDBC driver, they claim partly JDBC 2.0 compatibility, but i should say it JDBC 0.5 :) If you try firebiurd instead of 6.0 you try the jca driver at firebird.sourceforge.org it's a Type 4 driver you doesnt need interserver at all.. last time i tested it worked btw.. Saludos , Ignacio J. Ortega -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Please help with Tomcat - newbie
Howdy ;) By definition (see servlet spec), you can't read anything under WEB-INF. If you could, the right approach would be like String path = getServletContext().getRealPath(/WEB-INF/classes) File directory = new File(path); ... Yoav Shapira Millennium ChemInformatics -Original Message- From: Simon Wong [mailto:[EMAIL PROTECTED]] Sent: Tuesday, June 18, 2002 2:58 PM To: [EMAIL PROTECTED] Subject: RE: Please help with Tomcat - newbie Hello, I am trying to get the servlet to obtain a list of filenames and directories in my servlet class to be sent back to the applet. However, I am not sure if my approach is correct. I used the following code in my servlet class in the directory: C:\(where i installed my tomcat)\Apache Tomcat 4.0\webapps\ROOT\WEB- INF\classes\MyServlet.class Codes in the class: File directory = new File(classes); File [] filenames = directory.listFile(); The result i get is null. No directory name classes. However, when I tried using . (I presume it means current directory), it seems to be in windows/system32 ?? I am quite confused about this. How do I actually refer to the directory I mentioned above? Do I need to configure anything? I really need help! Your advise will be much appreciated. Thanks Best Regards, Simon -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: mod_jk with Apache 2.0.36/TC 4.0.4-b3 on NT
Off the top of my head you need the AddModule directive in addition to LoadModule: AddModule mod_jk2.c John Turner [EMAIL PROTECTED] http://www.aas.com -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Tuesday, June 18, 2002 3:59 PM To: Tomcat Users List; [EMAIL PROTECTED] Subject: Re: mod_jk with Apache 2.0.36/TC 4.0.4-b3 on NT Hi, I have a problem in the same area: 1) I put mod_jk2.dll to the modules dir of apache. 2) I added LoadModule jk2_module modules/mod_jk2.dll to my httpd.conf file 3) I added the directive JkMount /*.jsp ajp13 to my httpd.conf file Testing the conf file using apache.exe -t httpd.conf, the following report will be written: Invalid command 'JkMount', perhaps mis-spelled or defined by a module not included in the server configuration I did not found any installation instructions for mod_jk2. The old documentation for mod_jk seems not to be valid (JkMount definitely worked with mod_jk). Any ideas? Greetings Michael - Original Message - From: Charles Sanders [EMAIL PROTECTED] To: Tomcat Users List (E-mail) [EMAIL PROTECTED] Sent: Tuesday, June 18, 2002 7:36 PM Subject: mod_jk with Apache 2.0.36/TC 4.0.4-b3 on NT I am having problems getting mod_jk to work with apache 2.0.36 and tomcat 4.0.4-b3. I have created the workers.properties file (inserted below). I have added in the listener and connector for AJP in server.xml file. If I try to have TC auto create the mod_jk.conf file it does not start TC and does not auto create the mod_jk.conf file for apache. One I am not sure about is the worker.inprocess.class_path. If anyone could please help it would be greatly appreciated. Thanks, Charles # workers.properties file content # workers.tomcat_home=c:/jakarta-tomcat-4.0.4-b3 workers.java_home=$(JAVA_HOME) ps=\ worker.list=ajp13, ajp14 worker.ajp13.port=8009 worker.ajp13.host=localhost worker.ajp13.type=ajp13 worker.ajp13.lbfactor=1 worker.ajp14.port=8010 worker.ajp14.host=localhost worker.ajp14.type=ajp14 worker.ajp14.secretkey=secret worker.ajp14.credentials=myveryrandomentropy worker.ajp14.lbfactor=1 worker.loadbalancer.type=lb worker.loadbalancer.balanced_workers=ajp13 worker.inprocess.type=jni worker.inprocess.class_path=$(workers.tomcat_home)$(ps)server$(ps)lib$(ps)ca talina.jar worker.inprocess.cmd_line=start worker.inprocess.jvm_lib=$(workers.java_home)$(ps)jre$(ps)bin$(ps)classic$(p s)jvm.dll worker.inprocess.stdout=$(workers.tomcat_home)$(ps)logs$(ps)inprocess.stdout worker.inprocess.stderr=$(workers.tomcat_home)$(ps)logs$(ps)inprocess.stderr -- 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]
Urgent: JSP is not running on Internet!!!
We have an IIS/Tomcat environment to execute jsp pages. When we type http://localhost/Chat/ChatRequest.jsp or http://ms1/Chat/ChatRequest.jsp and run jsps from intranet, it works perfectly. However, when we use a public IP and type like http://xx.xx.xx.xx/Chat/ChatRequest.jsp, we can get the jsp page as the source(It shouldn't be) shown on web browser, but the script is not executed at all. Please give me some ideas what could be wrong? Rong -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Urgent: JSP is not running on Internet!!!
When you say run jsps from intranet, do you mean the same server as the xx.xx.xx.xx in your example, or separate servers? It looks like your production server doesn't know that *.jsp is to be redirected to tomcat and is serving it with the default MIME type of text/html. If all of the servers in your example are the same machine, make sure your virtual hosting configuration for xx.xx.xx.xx has the correct mapping for *.jps. If they are separate servers, it looks like your production server doesn't have a connector installed or configured correctly if it is installed. John Turner [EMAIL PROTECTED] http://www.aas.com -Original Message- From: Rong Li [mailto:[EMAIL PROTECTED]] Sent: Tuesday, June 18, 2002 4:25 PM To: [EMAIL PROTECTED] Subject: Urgent: JSP is not running on Internet!!! We have an IIS/Tomcat environment to execute jsp pages. When we type http://localhost/Chat/ChatRequest.jsp or http://ms1/Chat/ChatRequest.jsp and run jsps from intranet, it works perfectly. However, when we use a public IP and type like http://xx.xx.xx.xx/Chat/ChatRequest.jsp, we can get the jsp page as the source(It shouldn't be) shown on web browser, but the script is not executed at all. Please give me some ideas what could be wrong? Rong -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Please help with JDBCReam logout problem
I am using a JDBCRealm for user authentication with form-based authentication and Tomcat 4.0.3 (see config info below). I've also configured an HttpSessionListener that prints a message when a session is created or destroyed. A page called home.jsp is used as the default page. When I access the URL of the app, I see a session created and I get the login form. I log in as, for example, user1. I then see the home.jsp page. I then log out by calling a Struts Action where I call session.invalidate(). Source shown below. I can see the session being destroyed. Now, if I log in as another user, say user2, I sometimes get in as user2 and sometimes get in as user1. I can tell the difference because the two users have different roles that govern what is printed on the home page. This is a real security problem because a user with fewer privileges (roles) can log on right after a user with more privileges and sometimes get logged in as the user with more privileges. Help would be greatly appreciated. Michael --- In server.xml !-- DCE Context -- Context path=/dce docBase=dce debug=0 reloadable=true Realm className=org.apache.catalina.realm.JDBCRealm debug=5 driverName=org.gjt.mm.mysql.Driver connectionURL=jdbc:mysql://localhost/web_users?user=root userTable=users userNameCol=user_name userCredCol=user_pass userRoleTable=user_role roleNameCol=role_name / /Context - --- In web.xml --- listener listener-classcom.arinc.dce.ProjectionLoader/listener-class /listener welcome-file-list welcome-file/home.jsp/welcome-file /welcome-file-list security-constraint web-resource-collection web-resource-namedce/web-resource-name url-pattern/*/url-pattern /web-resource-collection auth-constraint role-namedce.user/role-name /auth-constraint /security-constraint login-config auth-methodFORM/auth-method realm-namedce/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 - --- In LogoutAction.java --- // LogoutAction.java package com.arinc.dce.actions; import org.apache.struts.action.Action; import org.apache.struts.action.ActionMapping; import org.apache.struts.action.ActionForm; import org.apache.struts.action.ActionForward; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.ServletException; import javax.sql.DataSource; import java.sql.Connection; import java.sql.SQLException; import java.io.IOException; public class LogoutAction extends Action { public ActionForward perform(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { System.out.println(inside LogoutAction); // Just invalidate the session and return the user to the home page request.getSession().invalidate(); ActionForward f = mapping.findForward(thanks); System.out.println(got ActionForward + f); return f; } } - -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: mod_jk with Apache 2.0.36/TC 4.0.4-b3 on NT
Sorry, but a similiar result Invalid command 'AddModule', perhaps mis-spelled or defined by a module not included in the server configuration - Original Message - From: Turner, John [EMAIL PROTECTED] To: 'Tomcat Users List' [EMAIL PROTECTED] Sent: Tuesday, June 18, 2002 10:16 PM Subject: RE: mod_jk with Apache 2.0.36/TC 4.0.4-b3 on NT Off the top of my head you need the AddModule directive in addition to LoadModule: AddModule mod_jk2.c John Turner [EMAIL PROTECTED] http://www.aas.com -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Tuesday, June 18, 2002 3:59 PM To: Tomcat Users List; [EMAIL PROTECTED] Subject: Re: mod_jk with Apache 2.0.36/TC 4.0.4-b3 on NT Hi, I have a problem in the same area: 1) I put mod_jk2.dll to the modules dir of apache. 2) I added LoadModule jk2_module modules/mod_jk2.dll to my httpd.conf file 3) I added the directive JkMount /*.jsp ajp13 to my httpd.conf file Testing the conf file using apache.exe -t httpd.conf, the following report will be written: Invalid command 'JkMount', perhaps mis-spelled or defined by a module not included in the server configuration I did not found any installation instructions for mod_jk2. The old documentation for mod_jk seems not to be valid (JkMount definitely worked with mod_jk). Any ideas? Greetings Michael - Original Message - From: Charles Sanders [EMAIL PROTECTED] To: Tomcat Users List (E-mail) [EMAIL PROTECTED] Sent: Tuesday, June 18, 2002 7:36 PM Subject: mod_jk with Apache 2.0.36/TC 4.0.4-b3 on NT I am having problems getting mod_jk to work with apache 2.0.36 and tomcat 4.0.4-b3. I have created the workers.properties file (inserted below). I have added in the listener and connector for AJP in server.xml file. If I try to have TC auto create the mod_jk.conf file it does not start TC and does not auto create the mod_jk.conf file for apache. One I am not sure about is the worker.inprocess.class_path. If anyone could please help it would be greatly appreciated. Thanks, Charles # workers.properties file content # workers.tomcat_home=c:/jakarta-tomcat-4.0.4-b3 workers.java_home=$(JAVA_HOME) ps=\ worker.list=ajp13, ajp14 worker.ajp13.port=8009 worker.ajp13.host=localhost worker.ajp13.type=ajp13 worker.ajp13.lbfactor=1 worker.ajp14.port=8010 worker.ajp14.host=localhost worker.ajp14.type=ajp14 worker.ajp14.secretkey=secret worker.ajp14.credentials=myveryrandomentropy worker.ajp14.lbfactor=1 worker.loadbalancer.type=lb worker.loadbalancer.balanced_workers=ajp13 worker.inprocess.type=jni worker.inprocess.class_path=$(workers.tomcat_home)$(ps)server$(ps)lib$(ps)ca talina.jar worker.inprocess.cmd_line=start worker.inprocess.jvm_lib=$(workers.java_home)$(ps)jre$(ps)bin$(ps)classic$(p s)jvm.dll worker.inprocess.stdout=$(workers.tomcat_home)$(ps)logs$(ps)inprocess.stdout worker.inprocess.stderr=$(workers.tomcat_home)$(ps)logs$(ps)inprocess.stderr -- -- -- 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: Urgent: JSP is not running on Internet!!!
I don't think I am using virtual hosting feature, or am I? Anyway, here is the more detailed info. They are the same server. xx.xx.xx.xx is the public IP of that server. The strange thing is that I can run the JSPs from any machine inside our intranet by typing http://ms1/Chat/ChatRequest.jsp. (ms1 is the machine name). If I change the url to http://xx.xx.xx.xx/Chat/ChatRequest.jsp, I cannot execute the jsp page on any machine, not even on the local machine ms1. The source will always be fetched and shown on web browser. Thanks, Rong Turner, John wrote: When you say run jsps from intranet, do you mean the same server as the xx.xx.xx.xx in your example, or separate servers? It looks like your production server doesn't know that *.jsp is to be redirected to tomcat and is serving it with the default MIME type of text/html. If all of the servers in your example are the same machine, make sure your virtual hosting configuration for xx.xx.xx.xx has the correct mapping for *.jps. If they are separate servers, it looks like your production server doesn't have a connector installed or configured correctly if it is installed. John Turner [EMAIL PROTECTED] http://www.aas.com -Original Message- From: Rong Li [mailto:[EMAIL PROTECTED]] Sent: Tuesday, June 18, 2002 4:25 PM To: [EMAIL PROTECTED] Subject: Urgent: JSP is not running on Internet!!! We have an IIS/Tomcat environment to execute jsp pages. When we type http://localhost/Chat/ChatRequest.jsp or http://ms1/Chat/ChatRequest.jsp and run jsps from intranet, it works perfectly. However, when we use a public IP and type like http://xx.xx.xx.xx/Chat/ChatRequest.jsp, we can get the jsp page as the source(It shouldn't be) shown on web browser, but the script is not executed at all. Please give me some ideas what could be wrong? Rong -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- Rong Li Senior Software Engineer Concerto Software 305-436-2384 [EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Urgent: JSP is not running on Internet!!!
This is an IIS configuration problem. If it happens correctly with ms1 than tomcat is working correctly. What is happening is that IIS, when faced with a request to xx.xx.xx.xx, doesn't know what to do with it, at least as far as JSP are concerned. Can you get normal (non-JSP) content from the webserver using xx.xx.xx.xx? Does this machine have two network interfaces? It sounds like it does. Is IIS setup to listen on all interfaces? -Original Message- From: Rong Li [mailto:[EMAIL PROTECTED]] Sent: Tuesday, June 18, 2002 4:41 PM To: Tomcat Users List Subject: Re: Urgent: JSP is not running on Internet!!! I don't think I am using virtual hosting feature, or am I? Anyway, here is the more detailed info. They are the same server. xx.xx.xx.xx is the public IP of that server. The strange thing is that I can run the JSPs from any machine inside our intranet by typing http://ms1/Chat/ChatRequest.jsp. (ms1 is the machine name). If I change the url to http://xx.xx.xx.xx/Chat/ChatRequest.jsp, I cannot execute the jsp page on any machine, not even on the local machine ms1. The source will always be fetched and shown on web browser. Thanks, Rong Turner, John wrote: When you say run jsps from intranet, do you mean the same server as the xx.xx.xx.xx in your example, or separate servers? It looks like your production server doesn't know that *.jsp is to be redirected to tomcat and is serving it with the default MIME type of text/html. If all of the servers in your example are the same machine, make sure your virtual hosting configuration for xx.xx.xx.xx has the correct mapping for *.jps. If they are separate servers, it looks like your production server doesn't have a connector installed or configured correctly if it is installed. John Turner [EMAIL PROTECTED] http://www.aas.com
RE: mod_jk with Apache 2.0.36/TC 4.0.4-b3 on NT
According to this guide: http://www.galatea.com/flashguides/apache-tomcat-24-win32.xml for apache 2, it should be: IfModule !mod_jk.c LoadModule jk_module modules/mod_jk.dll /IfModule Granted, this is for mod_jk and not mod_jk2, but I believe the two are similar. I missed the apache 2 on the first time around, I am using apache 1.3 on Windows and the AddModule directive is required. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Tuesday, June 18, 2002 4:34 PM To: Tomcat Users List Subject: Re: mod_jk with Apache 2.0.36/TC 4.0.4-b3 on NT Sorry, but a similiar result Invalid command 'AddModule', perhaps mis-spelled or defined by a module not included in the server configuration - Original Message - From: Turner, John [EMAIL PROTECTED] To: 'Tomcat Users List' [EMAIL PROTECTED] Sent: Tuesday, June 18, 2002 10:16 PM Subject: RE: mod_jk with Apache 2.0.36/TC 4.0.4-b3 on NT Off the top of my head you need the AddModule directive in addition to LoadModule: AddModule mod_jk2.c John Turner [EMAIL PROTECTED] http://www.aas.com
Question about home page path
We all know how fads come and go. Right now, one of the fads among large websites seems to be hide all path info - at least on the home page. Is there any (easy) way to accomplish this in Tomcat? Basically, I want to have http://www.mydomain.com show up in home page, even though /myappdir/index.jsp is being served up. Thanks. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Urgent: JSP is not running on Internet!!!
Yes, it can get the normal(non-jsp) page. I don't know if the IIS is using two network interfaces, I need to check that. Thanks, Rong Turner, John wrote: This is an IIS configuration problem. If it happens correctly with ms1 than tomcat is working correctly. What is happening is that IIS, when faced with a request to xx.xx.xx.xx, doesn't know what to do with it, at least as far as JSP are concerned. Can you get normal (non-JSP) content from the webserver using xx.xx.xx.xx? Does this machine have two network interfaces? It sounds like it does. Is IIS setup to listen on all interfaces? -Original Message- From: Rong Li [mailto:[EMAIL PROTECTED]] Sent: Tuesday, June 18, 2002 4:41 PM To: Tomcat Users List Subject: Re: Urgent: JSP is not running on Internet!!! I don't think I am using virtual hosting feature, or am I? Anyway, here is the more detailed info. They are the same server. xx.xx.xx.xx is the public IP of that server. The strange thing is that I can run the JSPs from any machine inside our intranet by typing http://ms1/Chat/ChatRequest.jsp. (ms1 is the machine name). If I change the url to http://xx.xx.xx.xx/Chat/ChatRequest.jsp, I cannot execute the jsp page on any machine, not even on the local machine ms1. The source will always be fetched and shown on web browser. Thanks, Rong Turner, John wrote: When you say run jsps from intranet, do you mean the same server as the xx.xx.xx.xx in your example, or separate servers? It looks like your production server doesn't know that *.jsp is to be redirected to tomcat and is serving it with the default MIME type of text/html. If all of the servers in your example are the same machine, make sure your virtual hosting configuration for xx.xx.xx.xx has the correct mapping for *.jps. If they are separate servers, it looks like your production server doesn't have a connector installed or configured correctly if it is installed. John Turner [EMAIL PROTECTED] http://www.aas.com -- Rong Li Senior Software Engineer Concerto Software 305-436-2384 [EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Question about home page path
I would like an answer to a similar question myself. Except for a servlet instead of a jsp or html file. I know this can be done to some extent using servlet tags in the web.xml file, but any info would be great! Later. -Original Message- From: Sean LeBlanc [mailto:[EMAIL PROTECTED]] Sent: Tuesday, June 18, 2002 1:15 PM To: [EMAIL PROTECTED] Subject: Question about home page path We all know how fads come and go. Right now, one of the fads among large websites seems to be hide all path info - at least on the home page. Is there any (easy) way to accomplish this in Tomcat? Basically, I want to have http://www.mydomain.com show up in home page, even though /myappdir/index.jsp is being served up. 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: Null Pointer Exception - would you please take a look?
Hi Eddie, I use Interbasse to do what you are trying, but directly to Tomcat, so I know it can be done. My server.xml entry follows. The only thing I see different is that you have two forward slashes after the host name. Is this a typo? Does this work with your other JDBC apps? I'm accessing a database on a Solaris system so Windows would be a little different. The error message you are getting is from the Interbase driver so Tomcat IS finding interclient.jar. It is basically saying that it is getting a bad filename The only other thing I can think of with Interbase is that you have to be sure that file.gdb has granted read authorization to username on your member table. Realm className=org.apache.catalina.realm.JDBCRealm debug=0 driverName=interbase.interclient.Driver connectionURL=jdbc:interbase://myhost.mydomain.com/dbDir/databases/usersdb. gdb connectionName=username connectionPassword=password userTable=USERS userNameCol=USER_NAME userCredCol=USER_PASS userRoleTable=USER_ROLES roleNameCol=ROLE_NAME / Rick - Original Message - From: Eddie Bush [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Tuesday, June 18, 2002 3:26 PM Subject: Re: Null Pointer Exception - would you please take a look? But why would this be happening? I haven't even been presented with a prompt at which I could enter a usename/password! I understand what you are saying - but I'm not sure ... I'm not sure =) No, I don't really have another DBMS I can plug in easily. Let me go ahead and post my realm definition - maybe someone will see a problem with it: Realm className=org.apache.catalina.realm.JDBCRealm debug=99 driverName=interbase.interclient.Driver connectionURL=jdbc:interbase://host//path/to/my/data/file.gdb connectionName=validuser connectionPassword=validuserpswd userTable=member userNameCol=username userCredCol=passwd userRoleTable=member_role roleNameCol=rolename / Is this good? It's nested in an Engine element (WarpEngine) which is nested in a Connector element (WarpConnector) which is nested in a Service element which is nested in a Server element. Basically what I did was take the config file that came with Tomcat, cut out ALL of the stand-alone stuff - and leave the Warp stuff. Does it sound as though I've approached this poorly? It works for everything except this danged authentication! Thanks so much! Eddie - Original Message - From: Tim Funk [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Tuesday, June 18, 2002 2:22 PM Subject: Re: Null Pointer Exception - would you please take a look? This may be to much to ask for - but are you able to get this to work with a different DBMS? On first glance, it appears you (not literally) might be passing null to the JDBC driver's setString() method and the JDBC driver can't handle the null value. Consequently - things explode. If so - it would be JDBC driver's fault and not tomcat. (But that could be subject to opinion too) -Tim Eddie Bush wrote: I'm getting really annoyed =) It seems you people haven't actually read my question thoroughly enough to actually understand what I'm doing. The thought crosses my mind that you see the subject and then just scan and put in some standard Oh he's an idiot - he needs to do this response. The problem is with a JDBCRealm! I do NOTHING to send/receive anything to/from the database. I was of the understanding that Tomcat did this when I configured the realm and set up the security-constraint. While I believe my XML to be valid and correct, I will happily post it for inspection if someone thinks it would help. Here is a sequence of what happens and the actors that are involved: Actors: Me and Tomcat Me: Enter url of page that is protected by a security constraint into my browsers address bar. Press enter. Tomcat: Returns to the client a page that looks like: !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.0 Transitional//EN HTMLHEAD META http-equiv=Content-Type content=text/html; charset=windows-1252/HEAD BODYPRE/PRE/BODY/HTML (This is not what the actual page is - it's a JSP file - index.jsp - with much different content. Also notice I'm not calling a servlet! Even if I were, it wouldn't make a bit of difference at this point because Tomcat hasn't authenticated me! This happens when Tomcat should authenticate me - it is NOT my coding!!!) In my server log file, I have an error that starts off as: 2002-06-17 12:29:28 [org.apache.catalina.connector.warp.WarpRequestHandler] java.lang.NullPointerException at interbase.interclient.PreparedStatement.setString(Unknown Source) at org.apache.catalina.realm.JDBCRealm.credentials(JDBCRealm.java) at
RE: mod_jk with Apache 2.0.36/TC 4.0.4-b3 on NT
That is one of the sources among others that I have used. Still not working with the LoadModule and after adding in this it does not allow apache to start(yes the mod_jk.dll file is in the modules dir). Any further information or sources would be great. thanks -Original Message- From: Turner, John [mailto:[EMAIL PROTECTED]] Sent: Tuesday, June 18, 2002 3:52 PM To: 'Tomcat Users List' Subject: RE: mod_jk with Apache 2.0.36/TC 4.0.4-b3 on NT According to this guide: http://www.galatea.com/flashguides/apache-tomcat-24-win32.xml for apache 2, it should be: IfModule !mod_jk.c LoadModule jk_module modules/mod_jk.dll /IfModule Granted, this is for mod_jk and not mod_jk2, but I believe the two are similar. I missed the apache 2 on the first time around, I am using apache 1.3 on Windows and the AddModule directive is required. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Tuesday, June 18, 2002 4:34 PM To: Tomcat Users List Subject: Re: mod_jk with Apache 2.0.36/TC 4.0.4-b3 on NT Sorry, but a similiar result Invalid command 'AddModule', perhaps mis-spelled or defined by a module not included in the server configuration - Original Message - From: Turner, John [EMAIL PROTECTED] To: 'Tomcat Users List' [EMAIL PROTECTED] Sent: Tuesday, June 18, 2002 10:16 PM Subject: RE: mod_jk with Apache 2.0.36/TC 4.0.4-b3 on NT Off the top of my head you need the AddModule directive in addition to LoadModule: AddModule mod_jk2.c John Turner [EMAIL PROTECTED] http://www.aas.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Null Pointer Exception - would you please take a look?
Yeah - it works fine except when I use it in this context. The double // after the host is a ... well it's like this: =) protocol:subprotocol://server/path ... and because my path starts with a /, I have two of them - works super on everything else. I run on RHL 7.2 =) The first one is a delimiter - the second is necessary to indicate the path. ... at least that's how I've always done it. I read it somewhere I think, but I couldn't tell you where. I just downloaded Firebird - and upon looking at the docs I think I quite like it. I'm in the process of uninstalling interclient, as it wasn't an RPM install - so I guess I get to do that part by hand =) Ignacio tells me I won't need interserver anymore, so ... I want to be sure everything is as 'tight' (security-wise and file-system-wise) as it can be. I abhor needless clutter floating around ... unless it's in my personal directory ;) lol From the looks/sound of things, I can either use the driver approach or I have the option of binding a datasource into JNDI - InterBase didn't offer that, so it's a step ahead, I think. I figure the JDBCRealm will use the driver approach (since the only JNDI lookup supported by TC is currently LDAP), and then I can just have my initialization servlet bind a reference to the appropriate POOLING datasource (I liked that part =) provided by Firebird into JNDI and have the rest of my app get it from there. I wish the TC guys would let you configure a pool for the JDBCRealm. I know ... I know ... it's in the works. That'll be really nice! Thanks for your comments - I'm not sure where I'm going to turn for sure at this point. In the end I'll either wind up using TC stand-alone or using mod_jk instead of mod_webapp. I'll cross that bridge later ;) Thanks =) Eddie - Original Message - From: Rick Fincher [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Tuesday, June 18, 2002 4:04 PM Subject: Re: Null Pointer Exception - would you please take a look? Hi Eddie, I use Interbasse to do what you are trying, but directly to Tomcat, so I know it can be done. My server.xml entry follows. The only thing I see different is that you have two forward slashes after the host name. Is this a typo? Does this work with your other JDBC apps? I'm accessing a database on a Solaris system so Windows would be a little different. The error message you are getting is from the Interbase driver so Tomcat IS finding interclient.jar. It is basically saying that it is getting a bad filename The only other thing I can think of with Interbase is that you have to be sure that file.gdb has granted read authorization to username on your member table. Realm className=org.apache.catalina.realm.JDBCRealm debug=0 driverName=interbase.interclient.Driver connectionURL=jdbc:interbase://myhost.mydomain.com/dbDir/databases/usersdb. gdb connectionName=username connectionPassword=password userTable=USERS userNameCol=USER_NAME userCredCol=USER_PASS userRoleTable=USER_ROLES roleNameCol=ROLE_NAME / Rick -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: mod_jk with Apache 2.0.36/TC 4.0.4-b3 on NT
I have tried (unsuccessfully) to get Apache 2.0.36 to work with TC 3.3 on Win2k, with roughly the same problem. I am curious, though, have you checked the (Windows) application event log? I found that Apache was tripping over the LoadModule statement and it was reporting to Windows that it could not find the module. It would also screwup the path statement (combining /'s and \'s) and I wonder if that was the real problem. Anyhow, sorry I can't offer any help, but if more than one of us is having the same problem w/Apache 2.0.36 and the mod_jk.dll connector, we might be looking at a bug somewhere. On another note, I have been able to get Apache 1.3.24 to work successfully. -CRS -Original Message- From: Charles Sanders [mailto:[EMAIL PROTECTED]] Sent: Tuesday, June 18, 2002 5:40 PM To: 'Tomcat Users List' Subject: RE: mod_jk with Apache 2.0.36/TC 4.0.4-b3 on NT That is one of the sources among others that I have used. Still not working with the LoadModule and after adding in this it does not allow apache to start(yes the mod_jk.dll file is in the modules dir). Any further information or sources would be great. thanks -Original Message- From: Turner, John [mailto:[EMAIL PROTECTED]] Sent: Tuesday, June 18, 2002 3:52 PM To: 'Tomcat Users List' Subject: RE: mod_jk with Apache 2.0.36/TC 4.0.4-b3 on NT According to this guide: http://www.galatea.com/flashguides/apache-tomcat-24-win32.xml for apache 2, it should be: IfModule !mod_jk.c LoadModule jk_module modules/mod_jk.dll /IfModule Granted, this is for mod_jk and not mod_jk2, but I believe the two are similar. I missed the apache 2 on the first time around, I am using apache 1.3 on Windows and the AddModule directive is required. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Tuesday, June 18, 2002 4:34 PM To: Tomcat Users List Subject: Re: mod_jk with Apache 2.0.36/TC 4.0.4-b3 on NT Sorry, but a similiar result Invalid command 'AddModule', perhaps mis-spelled or defined by a module not included in the server configuration - Original Message - From: Turner, John [EMAIL PROTECTED] To: 'Tomcat Users List' [EMAIL PROTECTED] Sent: Tuesday, June 18, 2002 10:16 PM Subject: RE: mod_jk with Apache 2.0.36/TC 4.0.4-b3 on NT Off the top of my head you need the AddModule directive in addition to LoadModule: AddModule mod_jk2.c John Turner [EMAIL PROTECTED] http://www.aas.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: WEB-INF directory is not created...?
On Mon, 17 Jun 2002, Hai To Thanh wrote: Date: Mon, 17 Jun 2002 19:14:38 -0700 (PDT) From: Hai To Thanh [EMAIL PROTECTED] Reply-To: Tomcat Users List [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: WEB-INF directory is not created...? Hi, I installed Tomcat 4.0 under Linux. Now, I am creating a new web application follow instruction: http://localhost:8080/manager/ install?path=/exercisewar=file:/exercise After that, following message appeared: OK-installed application at context path /exercise. But WEB-INF directory was not created. So I can not see true result when I try to open it under browses. Tomcat never creates a WEB-INF directory for you -- if you want one, it's up to you to have it in the exercise directory already. Help me...! Thank you Craig -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]