Re: What is the relationship between the JK2 uri compoennt and the context?
It is simply the case that what is forwarded via AJP13 is some sort of HTTP request (it has all the headers, request URI,...). In that sense, the request URI that you mapped from workers2.properties must exist on the Tomcat side, too. In the environment of VHosts, you need to match VHosts on both Apache and Tomcat, plus the paths. So if you are mapping http://www.myserv.com/pbt/* to Tomcat, Tomcat must have Context path=/pbt deployed within Host name=www.myserv.com. Nix. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Applet to Servlet session fails
Hello, I have a JSP page that has an applet embeded in it. The Applet talks to a Servlet. I have a session within the JSP when I try to access the session within my Servlet, I get NullPointerException as there is no session object. How do I get the session object in my Servlet that is present in the JSP? I am using Tomcat 5.0.19 Thank you, Best Regards, Uma - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Applet to Servlet session fails
[EMAIL PROTECTED] wrote: I have a JSP page that has an applet embeded in it. The Applet talks to a Servlet. I have a session within the JSP when I try to access the session within my Servlet, I get NullPointerException as there is no session object. How do I get the session object in my Servlet that is present in the JSP? I am using Tomcat 5.0.19 If you use OBJECT ... HTML tag, you can pass parameter to applet with PARAM ... tag, namely JSESSIONID. Inside applet you call servlet with that session id, that way everybody will know the same session. I had this model once and it worked. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Bean's problem
I've changed my CLASPATH - didnt help me. Any ideas? Wojtek - Original Message - From: Wojtek Gnus [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, April 22, 2004 10:27 AM Subject: Bean's problem Hello I'm back in bussines but I've changed version of Tomcat from 3.X to 4.1.24. And bean-problems appears! Here's my configuration: Tomcat: Tomcat/4.1.24-LE-jdk14 JSDK: j2sdk1.4.2_03 WIN2000 And this is my error: org.apache.jasper.JasperException: Unable to compile class for JSP An error occurred at line: -1 in the jsp file: null Generated servlet error: [javac] Since fork is true, ignoring compiler setting. [javac] Compiling 1 source file [javac] Since fork is true, ignoring compiler setting. [javac] C:\Program Files\Apache Group\Tomcat 4.1\work\Standalone\localhost\rog\jsp\select_zmiana_jsp.java:50: cannot access beanservlets.Select_zmiana [javac] bad class file: C:\Program Files\Apache Group\Tomcat 4.1\webapps\rog\WEB-INF\classes\beanservlets\Select_zmiana.class [javac] class file contains wrong class: Select_zmiana [javac] Please remove or make sure it appears in the correct subdirectory of the classpath. [javac] beanservlets.Select_zmiana select_zmiana = null; [javac] ^ [javac] 1 error I've found on this mailing-list that my problems are related with packages. Well, in my java file I've declared use of beanservlets package and I've created directory: C:\Program Files\Apache Group\Tomcat 4.1\webapps\rog\WEB-INF\classes\beanservlets And in mu jsp file I've loaded my bean just like this: jsp:useBean class=beanservlets.Select_zmiana id=select_zmiana / But it looks that I must change something with my CLASSPATH. Am I right? Greetings Wojtek - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
servlet.http?
hi all... this is my first question on this list so please be gentle... i'm trying to use a servlet that talks to a j2me application on some cell phone. the thing is when i try to compile the code on the server machine (i put it under the tomcat's servlet examples) i get an error that i have the clases in the HTTP servlet package missing. i found them (after downloading them again) in the server's java source. my question is where should i put them so the compiler can finde them and compile the servlet? it turns out there are a lot of servlet src folders.. thanks - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
log verbosity in tomcat
Hello, I tried to increase log verbosity in server.xml file by setting debug attribute of Engine and Realm tags to 99. Verbosity of Logger I set to 4. But still only INFO messages are displayed in the log file while Jakarta docs says that * Debugging and exception messages logged by this |Realm| will be recorded by the |Logger| that is associated with our surrounding |Context|, |Host|, or |Engine| * Verbosity attribute is the verbosity level for this logger. Messages with a higher verbosity level than the specified value will be silently ignored. Available levels are 0 (fatal messages only), 1 (errors), 2 (warnings), 3 (information), and 4 (debug). If not specified, the default value will be 1 (error). I have inspected the JAASRealm.java file and found that it uses log.debug() call for logging, but I can't see any of these messages in an actual log files! Google says nothing on this. server.xml: ... Engine name=Catalina defaultHost=localhost debug=99 !-- Valve className=org.apache.catalina.valves.RequestDumperValve/ -- !-- Global logger unless overridden at lower levels -- Logger className=org.apache.catalina.logger.FileLogger prefix=catalina_log. suffix=.txt timestamp=true verbosity=4/ !-- Because this Realm is here, an instance will be shared globally -- !-- This Realm uses the UserDatabase configured in the global JNDI resources under the key UserDatabase. Any edits that are performed against this UserDatabase are immediately available for use by the Realm. -- Realm className=org.apache.catalina.realm.JAASRealm debug=99 appName=merx userClassNames=ru.mb.security.jaas.RdbmsPrincipal roleClassNames=ru.mb.security.jaas.RdbmsRole / /Engine ... Is there any way to increase verbosity of logging? Thanks in advance, Beloglazov Maksim
Re: another problem with JAAS
Oops, missed the How ;-) Subject subject = (Subject)session.getAttribute(javax.security.auth.subject); if (subject == null) { subject = new Subject(); } else { System.out.println(According to the Filter, the subject is: + subject); } and once we have logged in our subject: session.setAttribute(javax.security.auth.subject, subject); I'll write this up over the weekend Cheers, Michiel Alan Weissman wrote: Yes but how? :) What is the key that you use in the session? -Original Message- From: Michiel Toneman [mailto:[EMAIL PROTECTED] Sent: Thursday, April 22, 2004 12:51 PM To: Tomcat Users List Subject: Re: another problem with JAAS Hi Alan, That's correct, I overwrite the subject. Michiel Alan Weissman wrote: Hey Michiel - How did you overwrite Tomcat's Subject in the Session with your own? Thanks, Alan -Original Message- From: Michiel Toneman [mailto:[EMAIL PROTECTED] Sent: Thursday, April 22, 2004 9:51 AM To: Tomcat Users List Subject: Re: another problem with JAAS Hi Beloglazov, I was running into the same problem. As far as I can tell (anyone on the list, please correct me if I'm wrong), Tomcat primarily uses JAAS for authentication, but it is pretty useless for authorisation. I have no idea why the JAASRealm goes to all the trouble of setting up a Subject etc... when you can't use them in your own policy. All you can do is use isUserInRole() to check for the *name* of your role Principal. This totally defeats the point of using JAAS IMHO. I am using a JAAS implementation with is custom Policy that assigns Permission(s) based on various types of Principal that I assign to the Subject. My webapps can then do proper java Permission checks (AccessController.checkPermission(perm)). The way to go in Tomcat is using a filter, setting up (LoginContext) your Subject and use a doAsPrivileged() to wrap the servlet call. (see my earlier post on the list). However, this does not work on Tomcat (works fine on JRun4) because the filter and servlet are evaluated by Tomcat in different security contexts. The solution was to overwrite Tomcat's Subject in the session by my own Subject. I'm writing a tutorial on this, but it isn't ready yet. If you need an implementation fast, and the above is not enough to go on, I can speed up the writing ;-) Cheers, Michiel Beloglazov Maksim wrote: Hello, I've written a JAAS LoginModule and my web application successfully authorizes with it. But! While the authorization is successful, Tomcat does not recognize user Principals and roles which I assign in login module and returns that I have logged as a *null* user with no roles assigned to it. server.xml: Realm className=org.apache.catalina.realm.JAASRealm appName=merx userClassNames=ru.mb.security.jaas.RdbmsPrincipal roleClassNames=ru.mb.security.jaas.RdbmsRole debug=99/ ru.mb.security.jaas.RdbmsPrincipal and ru.mb.security.jaas.RdbmsRole are implementations of java.security.Principal interface. How can I force Tomcat recognize these Principals in a proper way? Can be the problem with moving javax.security.Principal of earlier JDKs to java.security.Principal in modern ones? Any help is greatly appreciated. Beloglazov Maksim. -- Michiel Toneman Software Engineer Bibit Global Payment Services Regulierenring 10 3981 LB Bunnik [EMAIL PROTECTED] Tel. +31-30-6595168 Fax +31-30-6564464 http://www.bibit.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Document
Please read the attached file. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: another problem with JAAS
Michiel Toneman wrote: Hi Beloglazov, I was running into the same problem. As far as I can tell (anyone on the list, please correct me if I'm wrong), Tomcat primarily uses JAAS for authentication, but it is pretty useless for authorisation. I have no idea why the JAASRealm goes to all the trouble of setting up a Subject etc... when you can't use them in your own policy. All you can do is use isUserInRole() to check for the *name* of your role Principal. This totally defeats the point of using JAAS IMHO. I am using a JAAS implementation with is custom Policy that assigns Permission(s) based on various types of Principal that I assign to the Subject. My webapps can then do proper java Permission checks (AccessController.checkPermission(perm)). The way to go in Tomcat is using a filter, setting up (LoginContext) your Subject and use a doAsPrivileged() to wrap the servlet call. (see my earlier post on the list). However, this does not work on Tomcat (works fine on JRun4) because the filter and servlet are evaluated by Tomcat in different security contexts. The solution was to overwrite Tomcat's Subject in the session by my own Subject. I'm writing a tutorial on this, but it isn't ready yet. If you need an implementation fast, and the above is not enough to go on, I can speed up the writing ;-) Cheers, Michiel Beloglazov Maksim wrote: Hello, I've written a JAAS LoginModule and my web application successfully authorizes with it. But! While the authorization is successful, Tomcat does not recognize user Principals and roles which I assign in login module and returns that I have logged as a *null* user with no roles assigned to it. server.xml: Realm className=org.apache.catalina.realm.JAASRealm appName=merx userClassNames=ru.mb.security.jaas.RdbmsPrincipal roleClassNames=ru.mb.security.jaas.RdbmsRole debug=99/ ru.mb.security.jaas.RdbmsPrincipal and ru.mb.security.jaas.RdbmsRole are implementations of java.security.Principal interface. How can I force Tomcat recognize these Principals in a proper way? Can be the problem with moving javax.security.Principal of earlier JDKs to java.security.Principal in modern ones? Any help is greatly appreciated. Beloglazov Maksim. I will appreciate if you post the link to or copy of this tutorial you are writing. By now I'm trying to drill into JAASRealm.java and find out what is really happening there. Maksim. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Applet to Servlet session fails
Can you help me with more source please? I am using applet tag and not object tag. Thank you, Best Regards, Uma Veniamin Fichin [EMAIL PROTECTED] To 04/23/2004 01:03 Tomcat Users List PM[EMAIL PROTECTED] cc Please respond to Tomcat Users List [EMAIL PROTECTED] rta.apache.org Subject Re: Applet to Servlet session fails [EMAIL PROTECTED] wrote: I have a JSP page that has an applet embeded in it. The Applet talks to a Servlet. I have a session within the JSP when I try to access the session within my Servlet, I get NullPointerException as there is no session object. How do I get the session object in my Servlet that is present in the JSP? I am using Tomcat 5.0.19 If you use OBJECT ... HTML tag, you can pass parameter to applet with PARAM ... tag, namely JSESSIONID. Inside applet you call servlet with that session id, that way everybody will know the same session. I had this model once and it worked. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[Info] Clustering and Loadbalancing
A two part article on clustering and loadbalancing with tomcat: http://www.onjava.com/lpt/a/4649 http://www.onjava.com/lpt/a/4702 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
FOUND VIRUS IN MAIL from tomcat-user@jakarta.apache.org to ansta@nspoint.net
V I R U S A L E R T Our viruschecker found a VIRUS in your email to [EMAIL PROTECTED]. We stopped delivery of this email! Now it is on you to check your system for viruses In file: /usr/local/mav/basedir/i3N9tNMp016459/i3N9tNMp016459 Found the W32/Netsky.s.eml!exe virus !!! /usr/local/mav/basedir/i3N9tNMp016459/concept9.pif Found the W32/[EMAIL PROTECTED] virus !!! For your reference, here are the headers from your email: - BEGIN HEADERS - Received: from [195.252.84.183] by pluton.nspoint.net [195.252.123.15] with SMTP id i3N9tNMp016459; Fri Apr 23 11:55:37 2004 +0200 From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: Re: Concept Date: Fri, 23 Apr 2004 11:55:54 +0200 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary==_NextPart_000_0016=_NextPart_000_0016 X-Priority: 3 X-MSMail-Priority: Normal -- END HEADERS -- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Hello
Please have a look at the attached file. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Session browsing/modifying
Hello all! Can anybody tell me how can I archive subj? I need to view all sessions rotating in a server and have an ability to modify their content, mainly for testing/debugging purposes. I'm able to walk through Tomcat containers hierarchy ServerFactory.getServer() server.findServices() service.getContainer() container.findChildren() container.getManager() manager.findSessions() ...and so on, (privileged=true), but I wonder if there are already any application which can do it for me? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: SESSION PROBLEM in UNIX
HI , Any suggestions on the problem reported below .I would like to add another point that this works perfectly in Linux . I have tomcat4 running in linux and the session does not become null .As I mentioned before in Windows it works fine ..Only in HP Unix I get this problem of the session variable becoming null..any specific settings that I need to check ? -Original Message- From: MUKUND Premchander [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 21, 2004 12:23 PM To: Tomcat Users List Subject: RE: SESSION PROBLEM in UNIX Hi, Thank you for your inputs. I couldn't implement HttpSessionListener on tomcat3.2,hence I tried with HttpSessionBindingListener before. where I added an a listener object to the session and so that when session becomes invalid then the unbound method will get called . Now as suggested I moved my application to tomcat4.1.29 and tested the same ,by implementing HttpSessionListener and also Enabled the request dumper in the server.xml. I still get the same problem i.e. after a few refresh null pointer exception is thrown when session is accessed. sessionCreated(HttpSessionEvent se) is called and I get the SOP when I load application in Browser ,but after the error occurs the sessionDestroyed(HttpSessionEvent se) is not called ( confirmed it as SOP was not displayed on the console) Also I see no difference in the dump by the request dumper for the refresh period when the problem occurred and the previous interval . Message in the log file 2004-04-21 12:02:19 ApplicationDispatcher[/MCOne] Servlet.service() for servlet jsp threw exception org.apache.jasper.JasperException Part of the request response dump: As I see it the session ID is the same and maintained . So I am unable to find out if its my application or the session management that is causing the problem. As shown above problem occurs at 12:02:19 Find below dump of 12:02:19 and previous interval 12:02:09 when the screen display is good 2004-04-21 12:02:08 RequestDumperValve[Standalone]: REQUEST URI =/MCOne/BP/BPRealtimeServlet 2004-04-21 12:02:08 RequestDumperValve[Standalone]: authType=null 2004-04-21 12:02:08 RequestDumperValve[Standalone]: characterEncoding=null 2004-04-21 12:02:08 RequestDumperValve[Standalone]: contentLength=116 2004-04-21 12:02:08 RequestDumperValve[Standalone]: contentType=application/x-www-form-urlencoded 2004-04-21 12:02:08 RequestDumperValve[Standalone]:contextPath= 2004-04-21 12:02:08 RequestDumperValve[Standalone]: cookie=JSESSIONID=314C72D3A1279E24B5095C9DA4D02DF2 2004-04-21 12:02:08 RequestDumperValve[Standalone]: header=accept=image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, application/x-shockwave-flash, */* 2004-04-21 12:02:08 RequestDumperValve[Standalone]: header=referer=http://10.3.106.177:8080/MCOne/BP/BPRealtimeServlet 2004-04-21 12:02:08 RequestDumperValve[Standalone]: header=accept-language=en-us 2004-04-21 12:02:08 RequestDumperValve[Standalone]: header=content-type=application/x-www-form-urlencoded 2004-04-21 12:02:08 RequestDumperValve[Standalone]: header=accept-encoding=gzip, deflate 2004-04-21 12:02:08 RequestDumperValve[Standalone]: header=user-agent=Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0) 2004-04-21 12:02:08 RequestDumperValve[Standalone]: header=host=10.3.106.177:8080 2004-04-21 12:02:08 RequestDumperValve[Standalone]: header=content-length=116 2004-04-21 12:02:08 RequestDumperValve[Standalone]: header=connection=Keep-Alive 2004-04-21 12:02:08 RequestDumperValve[Standalone]: header=cache-control=no-cache 2004-04-21 12:02:08 RequestDumperValve[Standalone]: header=cookie=JSESSIONID=314C72D3A1279E24B5095C9DA4D02DF2 2004-04-21 12:02:08 RequestDumperValve[Standalone]: locale=en_US 2004-04-21 12:02:08 RequestDumperValve[Standalone]: method=POST 2004-04-21 12:02:08 RequestDumperValve[Standalone]: parameter=hiddenUrlInitialize= 2004-04-21 12:02:08 RequestDumperValve[Standalone]: parameter=interval=null, check_interval 2004-04-21 12:02:08 RequestDumperValve[Standalone]: parameter=hiddenInterval=10 2004-04-21 12:02:08 RequestDumperValve[Standalone]: parameter=hiddenRealtimeMain=Summary 2004-04-21 12:02:08 RequestDumperValve[Standalone]: parameter=selectopt=10 2004-04-21 12:02:08 RequestDumperValve[Standalone]: pathInfo=null 2004-04-21 12:02:08 RequestDumperValve[Standalone]: protocol=HTTP/1.1 2004-04-21 12:02:08 RequestDumperValve[Standalone]: queryString=null 2004-04-21 12:02:08 RequestDumperValve[Standalone]: remoteAddr=10.3.106.64 2004-04-21 12:02:08 RequestDumperValve[Standalone]: remoteHost=10.3.106.64 2004-04-21 12:02:08 RequestDumperValve[Standalone]: remoteUser=null 2004-04-21 12:02:08 RequestDumperValve[Standalone]: requestedSessionId=314C72D3A1279E24B5095C9DA4D02DF2 2004-04-21 12:02:08 RequestDumperValve[Standalone]: scheme=http 2004-04-21 12:02:08 RequestDumperValve[Standalone]: serverName=10.3.106.177 2004-04-21 12:02:08
Re: Here is the document
Here is the file. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: another problem with JAAS
Michiel, that would be the one that you put there, right? Adam On 04/23/2004 10:33 AM Michiel Toneman wrote: Oops, missed the How ;-) Subject subject = (Subject)session.getAttribute(javax.security.auth.subject); if (subject == null) { subject = new Subject(); } else { System.out.println(According to the Filter, the subject is: + subject); } and once we have logged in our subject: session.setAttribute(javax.security.auth.subject, subject); I'll write this up over the weekend Cheers, Michiel Alan Weissman wrote: Yes but how? :) What is the key that you use in the session? -Original Message- From: Michiel Toneman [mailto:[EMAIL PROTECTED] Sent: Thursday, April 22, 2004 12:51 PM To: Tomcat Users List Subject: Re: another problem with JAAS Hi Alan, That's correct, I overwrite the subject. Michiel Alan Weissman wrote: Hey Michiel - How did you overwrite Tomcat's Subject in the Session with your own? Thanks, Alan -Original Message- From: Michiel Toneman [mailto:[EMAIL PROTECTED] Sent: Thursday, April 22, 2004 9:51 AM To: Tomcat Users List Subject: Re: another problem with JAAS Hi Beloglazov, I was running into the same problem. As far as I can tell (anyone on the list, please correct me if I'm wrong), Tomcat primarily uses JAAS for authentication, but it is pretty useless for authorisation. I have no idea why the JAASRealm goes to all the trouble of setting up a Subject etc... when you can't use them in your own policy. All you can do is use isUserInRole() to check for the *name* of your role Principal. This totally defeats the point of using JAAS IMHO. I am using a JAAS implementation with is custom Policy that assigns Permission(s) based on various types of Principal that I assign to the Subject. My webapps can then do proper java Permission checks (AccessController.checkPermission(perm)). The way to go in Tomcat is using a filter, setting up (LoginContext) your Subject and use a doAsPrivileged() to wrap the servlet call. (see my earlier post on the list). However, this does not work on Tomcat (works fine on JRun4) because the filter and servlet are evaluated by Tomcat in different security contexts. The solution was to overwrite Tomcat's Subject in the session by my own Subject. I'm writing a tutorial on this, but it isn't ready yet. If you need an implementation fast, and the above is not enough to go on, I can speed up the writing ;-) Cheers, Michiel Beloglazov Maksim wrote: Hello, I've written a JAAS LoginModule and my web application successfully authorizes with it. But! While the authorization is successful, Tomcat does not recognize user Principals and roles which I assign in login module and returns that I have logged as a *null* user with no roles assigned to it. server.xml: Realm className=org.apache.catalina.realm.JAASRealm appName=merx userClassNames=ru.mb.security.jaas.RdbmsPrincipal roleClassNames=ru.mb.security.jaas.RdbmsRole debug=99/ ru.mb.security.jaas.RdbmsPrincipal and ru.mb.security.jaas.RdbmsRole are implementations of java.security.Principal interface. How can I force Tomcat recognize these Principals in a proper way? Can be the problem with moving javax.security.Principal of earlier JDKs to java.security.Principal in modern ones? Any help is greatly appreciated. Beloglazov Maksim. -- struts 1.2 + tomcat 5.0.19 + java 1.4.2 Linux 2.4.20 Debian - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Bean's problem
On Fri, Apr 23, 2004 at 09:21:51AM +0200, Wojtek Gnus wrote: : I've changed my CLASPATH - didnt help me. : Any ideas? Yes, and this is the big tipoff: [javac] class file contains wrong class: Select_zmiana Have you changed the source files to match the package designation? That is, you've placed the files in a package dir of {...}/WEB-INF/classes/beanservlets/ but did you add package beanservlets ; to the head of the source file? -QM -- software -- http://www.brandxdev.net tech news -- http://www.RoarNetworX.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Memory problem with tomcat 4130
How knows how do i make to resolve this problem, is necesary to recompile the default kernel of linux redhat 9.0 and what flag must i to select. thanks? Software wrote: Hi, i've installed tomcat 4130 in my linux redhat 9.0 with the default kernel and j2sdk1.4.0 in a server with 1 GB RAM and 2.4Ghz Processor The problem is when i start the tomcat it start to consume the memory progressively and i don't have running any application in this moment, then i have to restart the tomcat again to get memory free. What can be wrong. Fabian - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [Info] Clustering and Loadbalancing
decent article and a good introduction to tomcat5's clustering. thanks for posting it. peter --- Ralph Einfeldt [EMAIL PROTECTED] wrote: A two part article on clustering and loadbalancing with tomcat: http://www.onjava.com/lpt/a/4649 http://www.onjava.com/lpt/a/4702 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do you Yahoo!? Yahoo! Photos: High-quality 4x6 digital prints for 25ยข http://photos.yahoo.com/ph/print_splash - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
tomcat 5 and cgi-bin
dear all i am trying to upgrade our server to t5, but the cgi-bin now only allows perl programs to be executed (by default). for compiled c or c++ etc, how do i modify the web.xml? many thanks cheng = Best wishes Z C Wang Yahoo! Messenger - Communicate instantly...Ping your friends today! Download Messenger Now http://uk.messenger.yahoo.com/download/index.html - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Reloading servlets instantly.
Hi all, Is it possible to decrease the time taken to check for changes of a servlet to reload ?. I want to instantly reload the servlet(within 1 second). Sometimes I have to wait a few seconds to happen this and using the Ant reload task is time consuming. I am using Tomcat 4.1.27 with a default installation and the reloadable attribute of Context is true. Some additional questions. Is it possible to know which line number in the JSP caused a compile time error and run time error ?. Does any older versions of Tomcat supports this ?. I saw this in JBoss3.0 which uses Jetty 4.0.1 which uses Jakarta JSP compiler. Or any other JSP engines support this ?. Antony Paul. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Apache2.0.49/mod_jk2 and unix domain socket
I am trying to get mod_jk2 working with Apache2.0.49 on Fedora Core 1. I want to try out the mod_jk2's ability to communicate with Tomcat using the unix domain socket capability. Does anyone have a howto on setting this up? I have tried to set the following parameters in jk2.properties channelSocket.port=8009 channelUnix.file=/opt/apache/conf/jk2.socket When I do so, I get the following error when I start tomcat 5.0.19: --cut-- Apr 23, 2004 8:29:05 AM org.apache.jk.common.ChannelSocket init INFO: JK2: ajp13 listening on /0.0.0.0:8009 Apr 23, 2004 8:29:06 AM org.apache.jk.server.JkMain start INFO: APR not loaded, disabling jni components: java.io.IOException: java.lang.UnsatisfiedLinkError: /opt/apache/modules/libjkjni.so: /opt/apache/modules/libjkjni.so: undefined symbol: apr_md5_final --cut-- I then run the following command and get the resulting output: # nm /opt/apache/modules/libjkjni.so | grep apr_md5_final U apr_md5_final Anyone have any ideas on what the problem might be? Thanks in advance for any help.
RE: servlet.http?
Hi You need to include the servlet-api.jar under $CATALINA_HOME/common/lib in your classpath. Yang -Original Message- From: Kalin Mintchev [mailto:[EMAIL PROTECTED] Sent: Friday, April 23, 2004 4:03 AM To: [EMAIL PROTECTED] Subject: servlet.http? hi all... this is my first question on this list so please be gentle... i'm trying to use a servlet that talks to a j2me application on some cell phone. the thing is when i try to compile the code on the server machine (i put it under the tomcat's servlet examples) i get an error that i have the clases in the HTTP servlet package missing. i found them (after downloading them again) in the server's java source. my question is where should i put them so the compiler can finde them and compile the servlet? it turns out there are a lot of servlet src folders.. thanks - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
URL Mapping Question
Hi I have Tomcat 4.4.18 running behind Microsofts IIS web server. In IIS I have two virtual directories defined InboundA and InboundB both of which are mapped to the same physical directory $TOMCAT_HOME/webapps/Inbound. In workers2.properties I have added the lines ... [uri:/InboundA/*] context=/Inbound [uri:/InboundB/*] context=/Inbound and I have added the context Inbound to the server.xml in $TOMCAT/conf After restarting IIS and Tomcat, the Tomcat manger application sees the Inbound context loaded and I can run the servlets contained in the context by accessing Tomcat directly via port 8080 (http://hostname:8080/Inbound/servletname, however when I use the browser to access http://hostname/InboundA/servletname or InboundB I get a 404 response from IIS rather than a response from Tomcat which implies that the forwarding is not taking place. What am I missing? Regards Roger __ This e-mail and the documents attached are confidential and intended solely for the addressee; it may also be privileged. If you receive this e-mail in error, please notify the sender immediately and destroy it. As its integrity cannot be secured on the Internet, the Atos Origin group liability cannot be triggered for the message content. Although the sender endeavours to maintain a computer virus-free network, the sender does not warrant that this transmission is virus-free and will not be liable for any damages resulting from any virus transmitted. __ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: URL Mapping Question
You definately did a hard IIS restart..? I have done simple stop/start ones using the controls and found this does not reload the mappings. -Original Message- From: Varley, Roger [mailto:[EMAIL PROTECTED] Sent: 23 April 2004 13:51 To: [EMAIL PROTECTED] Subject: URL Mapping Question Hi I have Tomcat 4.4.18 running behind Microsofts IIS web server. In IIS I have two virtual directories defined InboundA and InboundB both of which are mapped to the same physical directory $TOMCAT_HOME/webapps/Inbound. In workers2.properties I have added the lines ... [uri:/InboundA/*] context=/Inbound [uri:/InboundB/*] context=/Inbound and I have added the context Inbound to the server.xml in $TOMCAT/conf After restarting IIS and Tomcat, the Tomcat manger application sees the Inbound context loaded and I can run the servlets contained in the context by accessing Tomcat directly via port 8080 (http://hostname:8080/Inbound/servletname, however when I use the browser to access http://hostname/InboundA/servletname or InboundB I get a 404 response from IIS rather than a response from Tomcat which implies that the forwarding is not taking place. What am I missing? Regards Roger __ This e-mail and the documents attached are confidential and intended solely for the addressee; it may also be privileged. If you receive this e-mail in error, please notify the sender immediately and destroy it. As its integrity cannot be secured on the Internet, the Atos Origin group liability cannot be triggered for the message content. Although the sender endeavours to maintain a computer virus-free network, the sender does not warrant that this transmission is virus-free and will not be liable for any damages resulting from any virus transmitted. __ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE --- QAS Ltd. Developers of QuickAddress Software a href=http://www.qas.com;www.qas.com/a Registered in England: No 2582055 Registered in Australia: No 082 851 474 --- /FONT - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Open Source JSP / Taglib Calendar
Eric - This is one of the more popular Calendaring tools that I've come across. It's written entirely in JavaScript, but is very simply to implement. http://www.calendarscript.com/ Good luck. Jerry Jalenak Development Manager, Web Publishing LabOne, Inc. 10101 Renner Blvd. Lenexa, KS 66219 (913) 577-1496 [EMAIL PROTECTED] -Original Message- From: Eric Noel [mailto:[EMAIL PROTECTED] Sent: Thursday, April 22, 2004 7:07 PM To: [EMAIL PROTECTED] Subject: OT: Open Source JSP / Taglib Calendar Any one here knows of a good Open source Calendar either jsp or taglib? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This transmission (and any information attached to it) may be confidential and is intended solely for the use of the individual or entity to which it is addressed. If you are not the intended recipient or the person responsible for delivering the transmission to the intended recipient, be advised that you have received this transmission in error and that any use, dissemination, forwarding, printing, or copying of this information is strictly prohibited. If you have received this transmission in error, please immediately notify LabOne at the following email address: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Open Source JSP / Taglib Calendar
Eric - Oops - sent the wrong one. Try this one: http://www.mattkruse.com/javascript/calendarpopup/ The first one I sent you have to pay for - this one is a freebie 8-) Jerry Jalenak Development Manager, Web Publishing LabOne, Inc. 10101 Renner Blvd. Lenexa, KS 66219 (913) 577-1496 [EMAIL PROTECTED] -Original Message- From: Eric Noel [mailto:[EMAIL PROTECTED] Sent: Thursday, April 22, 2004 7:07 PM To: [EMAIL PROTECTED] Subject: OT: Open Source JSP / Taglib Calendar Any one here knows of a good Open source Calendar either jsp or taglib? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This transmission (and any information attached to it) may be confidential and is intended solely for the use of the individual or entity to which it is addressed. If you are not the intended recipient or the person responsible for delivering the transmission to the intended recipient, be advised that you have received this transmission in error and that any use, dissemination, forwarding, printing, or copying of this information is strictly prohibited. If you have received this transmission in error, please immediately notify LabOne at the following email address: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Memory problem with tomcat 4130
Fabian, I am not sure if I have the answer to your memory problem but let me give you some information to get more help from others. 1. Where are you looking to see this memory use? 2. Does Tomcat stop responding? 3. Have you loaded any of your applications? No 4. Are you using a database? 5. What JDK version are you running? 1.4.0 6. Have you made any changes to the original configuration?(Server.xml, etc) 7. How are you starting Tomcat? 8. What options did you set?(Such as memory -Xmx128m) 9. Have you read the FAQ on memory? http://jakarta.apache.org/tomcat/faq/memory.html If you will answer as many of these as possible it will help in evaluating your problem. Doug www.parsonstechnical.com - Original Message - From: Software [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Friday, April 23, 2004 8:13 AM Subject: Re: Memory problem with tomcat 4130 How knows how do i make to resolve this problem, is necesary to recompile the default kernel of linux redhat 9.0 and what flag must i to select. thanks? Software wrote: Hi, i've installed tomcat 4130 in my linux redhat 9.0 with the default kernel and j2sdk1.4.0 in a server with 1 GB RAM and 2.4Ghz Processor The problem is when i start the tomcat it start to consume the memory progressively and i don't have running any application in this moment, then i have to restart the tomcat again to get memory free. What can be wrong. Fabian - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Accessing Dll's
Hi., This code has been written in JDK 1.3.0_03 couple of years back and i implemented in JRun 3.1 Now i'm trying to use this same code in Tomcat 4.1 with J2SDK 1.4.2_03. According to your previos mail i understand that i have to rewrite the code using J2SDK 1.4.2 specifications. Is it correct? Can you please give me the steps that i have to do inorder to make my code compatible to 1.4.2.. Thanks., MALAI - Original Message - From: Wade Chandler [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Friday, April 23, 2004 12:52 AM Subject: Re: Accessing Dll's Wade Chandler wrote: Annamalai Ramasamy wrote: Hi., Yes,I did see my dll path using this line. Thanks., MALAI Ryan Lissack [EMAIL PROTECTED] wrote: Hi, Execute the following : System.out.println(System.getProperty(java.library.path)); See what directories are there. If the one(s) with your DLL(s) are not listed you can add them as a startup param to the VM using the -D option (java -Djava.library.path=.) HTH Regards, Ryan. -Original Message- From: Annamalai Ramasamy [mailto:[EMAIL PROTECTED] Sent: 22 April 2004 16:33 To: Tomcat Users List Subject: RE: Accessing Dll's Hi., Check my below java code. I do not have native source codes. I'm sure there is no version conflicts. But i have copied the dll in more than one places..like winnt, system32 and jre/bin like that. any idea? public class AddressValidate { private Address inad; private Address outad; private String usercompany; public StringBuffer csReturnErrorMsg; public StringBuffer csReturnStreet; public StringBuffer csReturnCityName; public StringBuffer csReturnCounty; public StringBuffer csReturnState; public StringBuffer csReturnZip; //To load DLL AvsWebInrterface static{ try{ System.loadLibrary(AvsWebInterface); System.out.println(DLL Loaded); }catch(Exception e){ System.err.println(Could not load DLL \AvsWebInterface \ : +e.toString()); System.out.println(Could not load DLL \AvsWebInterface \ : +e.toString()); }catch(Throwable e){ System.err.println(Could not load DLL \AvsWebInterface:\ +e.toString()); System.out.println(Could not load DLL \AvsWebInterface:\ +e.toString()); } } //end of static //-- - //Native method implemented in cpp public native String JAVAAVSValidate (String company, String street1, String city, String state, String zip, StringBuffer csReturnStreet, StringBuffer csReturnCityName, StringBuffer csReturnCounty, StringBuffer csReturnState, StringBuffer csReturnZip, StringBuffer csReturnErrorMsg) ; //-- - public AddressValidate(){ inad=null; outad=null; usercompany=new String(); } //-- - public String validate (Address inad,Address outad){ csReturnStreet=new StringBuffer(); csReturnCityName=new StringBuffer(); csReturnCounty=new StringBuffer(); csReturnState=new StringBuffer(); csReturnZip=new StringBuffer(); csReturnErrorMsg=new StringBuffer(); this.inad=inad; this.outad=outad; try{ // System.out.println(Street1 :+inad.Street1); // System.out.println(city :+inad.City); // System.out.println(state :+inad.State); // System.out.println(postalcode+inad.PostalCode); JAVAAVSValidate (usercompany, inad.Street1, inad.City, inad.State, inad.PostalCode, csReturnStreet, csReturnCityName, csReturnCounty, csReturnState, csReturnZip, csReturnErrorMsg); outad.Street1 = csReturnStreet.toString(); outad.City = csReturnCityName.toString(); outad.County = csReturnCounty.toString(); outad.State = csReturnState.toString(); outad.PostalCode = csReturnZip.toString(); // System.out.println(Street1 :+outad.Street1); // System.out.println(city :+outad.City); // System.out.println(state :+outad.State); // System.out.println(postalcode+outad.PostalCode); }catch(Exception e){ System.out.println(Error in Validating Address + e.toString()); } return (csReturnErrorMsg.toString()); } } Peter Guyatt wrote: Hi There, Can I see you native code and your class that declares you native methods. Thanks Pete -Original Message- From: Mark Schmeets [mailto:[EMAIL PROTECTED] Sent: 22 April 2004 16:13 To: Tomcat Users List Subject: Re: Accessing Dll's Hi, Is it possible that this dll is being loaded somewhere else in your instance? My experience with this error came from trying to use the Oracle native JDBC drivers. It usually came down to one of three issues, first that the dll couldn't be found, second that another web-app had already loaded it, third it was a dll versioning problem. Hope it helps. Mark Annamalai Ramasamy wrote: Hi., Again
Tomcat and restricting the size of HttpServletRequest
Hi I have an application where a client transmits data to a servlet by opening a URLConnection to the servlet and writing the data to the outputStream as a POST request which the servlet processes by reading the HttpServletRequest inputStream. What can I do to protect my servlet against a rogue client that opens the outputStream and trying to write multi-gigabytes of data and running the server out of memory or does Tomcat already have mechanisms in place to prevent this. Regards Roger __ This e-mail and the documents attached are confidential and intended solely for the addressee; it may also be privileged. If you receive this e-mail in error, please notify the sender immediately and destroy it. As its integrity cannot be secured on the Internet, the Atos Origin group liability cannot be triggered for the message content. Although the sender endeavours to maintain a computer virus-free network, the sender does not warrant that this transmission is virus-free and will not be liable for any damages resulting from any virus transmitted. __ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: URL Mapping Question
-Original Message- From: Allistair Crossley [mailto:[EMAIL PROTECTED] Sent: 23 April 2004 13:54 To: Tomcat Users List Subject: RE: URL Mapping Question You definately did a hard IIS restart..? I have done simple stop/start ones using the controls and found this does not reload the mappings. What do you mean a hard IIS restart? I stopped and started the www publishing service from the control panel. I've now physically re-booted the server and now when I try http://hostname/InboundA/servletname I get a 404 response from Tomcat which, I suppose, is a step further. So now it appears that IIS is forwarding requests for InboundA and InboundB to Tomcat but is not mapping either of the requests to Inbound. Regards Roger -Original Message- From: Varley, Roger [mailto:[EMAIL PROTECTED] Sent: 23 April 2004 13:51 To: [EMAIL PROTECTED] Subject: URL Mapping Question Hi I have Tomcat 4.4.18 running behind Microsofts IIS web server. In IIS I have two virtual directories defined InboundA and InboundB both of which are mapped to the same physical directory $TOMCAT_HOME/webapps/Inbound. In workers2.properties I have added the lines ... [uri:/InboundA/*] context=/Inbound [uri:/InboundB/*] context=/Inbound and I have added the context Inbound to the server.xml in $TOMCAT/conf After restarting IIS and Tomcat, the Tomcat manger application sees the Inbound context loaded and I can run the servlets contained in the context by accessing Tomcat directly via port 8080 (http://hostname:8080/Inbound/servletname, however when I use the browser to access http://hostname/InboundA/servletname or InboundB I get a 404 response from IIS rather than a response from Tomcat which implies that the forwarding is not taking place. What am I missing? Regards Roger __ This e-mail and the documents attached are confidential and intended solely for the addressee; it may also be privileged. If you receive this e-mail in error, please notify the sender immediately and destroy it. As its integrity cannot be secured on the Internet, the Atos Origin group liability cannot be triggered for the message content. Although the sender endeavours to maintain a computer virus-free network, the sender does not warrant that this transmission is virus-free and will not be liable for any damages resulting from any virus transmitted. __ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE --- QAS Ltd. Developers of QuickAddress Software a href=http://www.qas.com;www.qas.com/a Registered in England: No 2582055 Registered in Australia: No 082 851 474 --- /FONT - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ This e-mail and the documents attached are confidential and intended solely for the addressee; it may also be privileged. If you receive this e-mail in error, please notify the sender immediately and destroy it. As its integrity cannot be secured on the Internet, the Atos Origin group liability cannot be triggered for the message content. Although the sender endeavours to maintain a computer virus-free network, the sender does not warrant that this transmission is virus-free and will not be liable for any damages resulting from any virus transmitted. __ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat and restricting the size of HttpServletRequest
There is a max POST size limit attribute on the Connectors. Otherwise - you can code for it too: request.getContentLength() == Size of posted content. -1 if the client did not provide a Content length. -Tim Varley, Roger wrote: Hi I have an application where a client transmits data to a servlet by opening a URLConnection to the servlet and writing the data to the outputStream as a POST request which the servlet processes by reading the HttpServletRequest inputStream. What can I do to protect my servlet against a rogue client that opens the outputStream and trying to write multi-gigabytes of data and running the server out of memory or does Tomcat already have mechanisms in place to prevent this. Regards Roger - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat and restricting the size of HttpServletRequest
There is a max POST size limit attribute on the Connectors. Otherwise - you can code for it too: request.getContentLength() == Size of posted content. -1 if the client did not provide a Content length. I wondered about request.getContentLength() but was worried that it was calculated by Tomcat rather than relying on it being set by the client. Either way, if the client doesn't specify the length or lies about it then I'm still in danger of running out of room. This also begs the question as to when my servlet gets to see an incoming request - I was concerned that by the time my servlet gets to see the incoming request Tomcat had already read the incoming data and stored it in the HttpServletRequest object - in which case request.getContentLength() is of no help. Regards Roger __ This e-mail and the documents attached are confidential and intended solely for the addressee; it may also be privileged. If you receive this e-mail in error, please notify the sender immediately and destroy it. As its integrity cannot be secured on the Internet, the Atos Origin group liability cannot be triggered for the message content. Although the sender endeavours to maintain a computer virus-free network, the sender does not warrant that this transmission is virus-free and will not be liable for any damages resulting from any virus transmitted. __ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat and restricting the size of HttpServletRequest
I remember a previous discussion on this and one of the solutions was to use an applet that would check the file size prior to transmission. Can't remember if there were others. Is there anyway to monitor the size of the object as it is uploaded and terminate it if it exceeds a certain size? Just a thought. Doug www.parsonstechnical.com - Original Message - From: Varley, Roger [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Friday, April 23, 2004 10:03 AM Subject: RE: Tomcat and restricting the size of HttpServletRequest There is a max POST size limit attribute on the Connectors. Otherwise - you can code for it too: request.getContentLength() == Size of posted content. -1 if the client did not provide a Content length. I wondered about request.getContentLength() but was worried that it was calculated by Tomcat rather than relying on it being set by the client. Either way, if the client doesn't specify the length or lies about it then I'm still in danger of running out of room. This also begs the question as to when my servlet gets to see an incoming request - I was concerned that by the time my servlet gets to see the incoming request Tomcat had already read the incoming data and stored it in the HttpServletRequest object - in which case request.getContentLength() is of no help. Regards Roger __ This e-mail and the documents attached are confidential and intended solely for the addressee; it may also be privileged. If you receive this e-mail in error, please notify the sender immediately and destroy it. As its integrity cannot be secured on the Internet, the Atos Origin group liability cannot be triggered for the message content. Although the sender endeavours to maintain a computer virus-free network, the sender does not warrant that this transmission is virus-free and will not be liable for any damages resulting from any virus transmitted. __ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: URL Mapping Question
I have now managed to get it to work. I have defined two contexts (InboundA and InboundB) in server.xml and specified Inbound as the docBase for both contexts. So, what does the context parameter in workers2.properties actually do? Regards Roger -Original Message- From: Varley, Roger [mailto:[EMAIL PROTECTED] Sent: 23 April 2004 13:51 To: [EMAIL PROTECTED] Subject: URL Mapping Question Hi I have Tomcat 4.4.18 running behind Microsofts IIS web server. In IIS I have two virtual directories defined InboundA and InboundB both of which are mapped to the same physical directory $TOMCAT_HOME/webapps/Inbound. In workers2.properties I have added the lines ... [uri:/InboundA/*] context=/Inbound [uri:/InboundB/*] context=/Inbound and I have added the context Inbound to the server.xml in $TOMCAT/conf After restarting IIS and Tomcat, the Tomcat manger application sees the Inbound context loaded and I can run the servlets contained in the context by accessing Tomcat directly via port 8080 (http://hostname:8080/Inbound/servletname, however when I use the browser to access http://hostname/InboundA/servletname or InboundB I get a 404 response from IIS rather than a response from Tomcat which implies that the forwarding is not taking place. What am I missing? Regards Roger __ This e-mail and the documents attached are confidential and intended solely for the addressee; it may also be privileged. If you receive this e-mail in error, please notify the sender immediately and destroy it. As its integrity cannot be secured on the Internet, the Atos Origin group liability cannot be triggered for the message content. Although the sender endeavours to maintain a computer virus-free network, the sender does not warrant that this transmission is virus-free and will not be liable for any damages resulting from any virus transmitted. __ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE --- QAS Ltd. Developers of QuickAddress Software a href=http://www.qas.com;www.qas.com/a Registered in England: No 2582055 Registered in Australia: No 082 851 474 --- /FONT - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ This e-mail and the documents attached are confidential and intended solely for the addressee; it may also be privileged. If you receive this e-mail in error, please notify the sender immediately and destroy it. As its integrity cannot be secured on the Internet, the Atos Origin group liability cannot be triggered for the message content. Although the sender endeavours to maintain a computer virus-free network, the sender does not warrant that this transmission is virus-free and will not be liable for any damages resulting from any virus transmitted. __ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ This e-mail and the documents attached are confidential and intended solely for the addressee; it may also be privileged. If you receive this e-mail in error, please notify the sender immediately and destroy it. As its integrity cannot be secured on the Internet, the Atos Origin group liability cannot be triggered for the message content. Although the sender endeavours to maintain a computer virus-free network, the sender does not warrant that this transmission is virus-free and will not be liable for any damages resulting from any virus transmitted. __ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat and restricting the size of HttpServletRequest
I remember a previous discussion on this and one of the solutions was to use an applet that would check the file size prior to transmission. I can do that if the remote end is using my client - my concern is that once the URL is known anyone could write a program that writes huge amounts of data to that URL. Is this not a general problem for any servlet that receives data in a POST request over the internet? Is there anyway to monitor the size of the object as it is uploaded and terminate it if it exceeds a certain size? Just a thought. I guess this what I'm asking :) Regards Roger There is a max POST size limit attribute on the Connectors. Otherwise - you can code for it too: request.getContentLength() == Size of posted content. -1 if the client did not provide a Content length. I wondered about request.getContentLength() but was worried that it was calculated by Tomcat rather than relying on it being set by the client. Either way, if the client doesn't specify the length or lies about it then I'm still in danger of running out of room. This also begs the question as to when my servlet gets to see an incoming request - I was concerned that by the time my servlet gets to see the incoming request Tomcat had already read the incoming data and stored it in the HttpServletRequest object - in which case request.getContentLength() is of no help. Regards Roger __ This e-mail and the documents attached are confidential and intended solely for the addressee; it may also be privileged. If you receive this e-mail in error, please notify the sender immediately and destroy it. As its integrity cannot be secured on the Internet, the Atos Origin group liability cannot be triggered for the message content. Although the sender endeavours to maintain a computer virus-free network, the sender does not warrant that this transmission is virus-free and will not be liable for any damages resulting from any virus transmitted. __ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ This e-mail and the documents attached are confidential and intended solely for the addressee; it may also be privileged. If you receive this e-mail in error, please notify the sender immediately and destroy it. As its integrity cannot be secured on the Internet, the Atos Origin group liability cannot be triggered for the message content. Although the sender endeavours to maintain a computer virus-free network, the sender does not warrant that this transmission is virus-free and will not be liable for any damages resulting from any virus transmitted. __ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Is it Tomcat problem or my problem?
When debugging a session problem, I find it very helpful to force my browser to ask me about every cookie. This way, I can see for sure the JSESSIONID cookie being set, and can inspect things like the domain and the jsessionid value. In my coding adventures, I've tracked down two Hey my session disappeared! bugs with this technique. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Thursday, April 22, 2004 11:03 PM To: Tomcat Users List Subject: Re: Is it Tomcat problem or my problem? Doug, Its ok no problem. Any one else in the list can help me out? Thank you, Best Regards, Uma Parsons Technical Services To parsonstechnical @earthlink.net Tomcat Users List [EMAIL PROTECTED] 04/22/2004 08:06 cc PM Please respond to Tomcat Users List Subject [EMAIL PROTECTED] Re: Is it Tomcat problem or my rta.apache.org problem? Uma, At this point I am out of ideas. I have not worked with sessions and thus am not strong in this area. I am sorry that I am unable to help further at this point. Hopefully someone else on the list will pick up on something. You may wish to look into the IO error that you had on shutdown as it may be related. Sorry, Doug - Original Message - From: [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Thursday, April 22, 2004 10:16 AM Subject: Re: Is it Tomcat problem or my problem? Doug, Does it act the same from other machines? YES Does it act the same from other browsers(Modzilla, Netscape, etc)? YES Were any updates applied to the machine? Is auto update enabled on windows? NO Are the connections via http or https? HTTP Also try one more thing, on the first access do not use the URL of the login, instead use the URL of the homepage and let it redirect you to the login. The Login page is itself the Homepage of the site. I tried to print the session ID and to find out if the session is new by these statements System.out.println(session ID +session.getId()); System.out.println(session isNew +session.isNew()); For the first time when I entered betform.jsp it gave me session ID BC45E3915B4AC4E188E7E84D1AEC4E15 session isNew false When I clicked on other links in the same betform.jsp, then it gave me this info session ID 9D0D8E423E875D6ED1D79770B2CB48CC session isNew false and I was logged out. I logged in again and seen the output. Its session ID 9D0D8E423E875D6ED1D79770B2CB48CC session isNew false and when I clicked on other links in the same page it gave me the same session ID. session ID 9D0D8E423E875D6ED1D79770B2CB48CC session isNew false I am really getting frustated with this Tomcat. Any help would be great. Thank you, Uma - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL
Re: Tomcat and restricting the size of HttpServletRequest
Roger, With an applet there would be no URL. The applet would handle the file transfer and thus control the upload. It could even go as far as to authenticate the user and log the user information. If it is a big concern protect it and force the users to request a username and password. Then email it back to them. This way you can track the abuse and block the offender. As for the other, I think (Please correct me on this list) that if you send a form with a type that the servlet is not program to handle you will get an error. Like I said I think. I have not tried this. Doug - Original Message - From: Varley, Roger [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Friday, April 23, 2004 10:18 AM Subject: RE: Tomcat and restricting the size of HttpServletRequest I remember a previous discussion on this and one of the solutions was to use an applet that would check the file size prior to transmission. I can do that if the remote end is using my client - my concern is that once the URL is known anyone could write a program that writes huge amounts of data to that URL. Is this not a general problem for any servlet that receives data in a POST request over the internet? Is there anyway to monitor the size of the object as it is uploaded and terminate it if it exceeds a certain size? Just a thought. I guess this what I'm asking :) Regards Roger There is a max POST size limit attribute on the Connectors. Otherwise - you can code for it too: request.getContentLength() == Size of posted content. -1 if the client did not provide a Content length. I wondered about request.getContentLength() but was worried that it was calculated by Tomcat rather than relying on it being set by the client. Either way, if the client doesn't specify the length or lies about it then I'm still in danger of running out of room. This also begs the question as to when my servlet gets to see an incoming request - I was concerned that by the time my servlet gets to see the incoming request Tomcat had already read the incoming data and stored it in the HttpServletRequest object - in which case request.getContentLength() is of no help. Regards Roger __ This e-mail and the documents attached are confidential and intended solely for the addressee; it may also be privileged. If you receive this e-mail in error, please notify the sender immediately and destroy it. As its integrity cannot be secured on the Internet, the Atos Origin group liability cannot be triggered for the message content. Although the sender endeavours to maintain a computer virus-free network, the sender does not warrant that this transmission is virus-free and will not be liable for any damages resulting from any virus transmitted. __ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ This e-mail and the documents attached are confidential and intended solely for the addressee; it may also be privileged. If you receive this e-mail in error, please notify the sender immediately and destroy it. As its integrity cannot be secured on the Internet, the Atos Origin group liability cannot be triggered for the message content. Although the sender endeavours to maintain a computer virus-free network, the sender does not warrant that this transmission is virus-free and will not be liable for any damages resulting from any virus transmitted. __ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Accessing Dll's
Malai, Until Wade can answer with some more assistance, I wanted to let you know that you should be able to run any code developed on previous versions of java on the newer JDK. If you look up the release information on Suns site for 1.4 it should have notes on any issues for moving from 1.3 to 1.4. With that said you may find that you can rewrite the code for 1.4 and it be simpler or faster or no change depending on if there are any new features of 1.4 that you can make use of. Sorry that I can't be of more assistance on this. Doug - Original Message - From: armalai_uk [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Friday, April 23, 2004 9:12 AM Subject: Re: Accessing Dll's Hi., This code has been written in JDK 1.3.0_03 couple of years back and i implemented in JRun 3.1 Now i'm trying to use this same code in Tomcat 4.1 with J2SDK 1.4.2_03. According to your previos mail i understand that i have to rewrite the code using J2SDK 1.4.2 specifications. Is it correct? Can you please give me the steps that i have to do inorder to make my code compatible to 1.4.2.. Thanks., MALAI - Original Message - From: Wade Chandler [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Friday, April 23, 2004 12:52 AM Subject: Re: Accessing Dll's Wade Chandler wrote: Annamalai Ramasamy wrote: Hi., Yes,I did see my dll path using this line. Thanks., MALAI Ryan Lissack [EMAIL PROTECTED] wrote: Hi, Execute the following : System.out.println(System.getProperty(java.library.path)); See what directories are there. If the one(s) with your DLL(s) are not listed you can add them as a startup param to the VM using the -D option (java -Djava.library.path=.) HTH Regards, Ryan. -Original Message- From: Annamalai Ramasamy [mailto:[EMAIL PROTECTED] Sent: 22 April 2004 16:33 To: Tomcat Users List Subject: RE: Accessing Dll's Hi., Check my below java code. I do not have native source codes. I'm sure there is no version conflicts. But i have copied the dll in more than one places..like winnt, system32 and jre/bin like that. any idea? public class AddressValidate { private Address inad; private Address outad; private String usercompany; public StringBuffer csReturnErrorMsg; public StringBuffer csReturnStreet; public StringBuffer csReturnCityName; public StringBuffer csReturnCounty; public StringBuffer csReturnState; public StringBuffer csReturnZip; //To load DLL AvsWebInrterface static{ try{ System.loadLibrary(AvsWebInterface); System.out.println(DLL Loaded); }catch(Exception e){ System.err.println(Could not load DLL \AvsWebInterface \ : +e.toString()); System.out.println(Could not load DLL \AvsWebInterface \ : +e.toString()); }catch(Throwable e){ System.err.println(Could not load DLL \AvsWebInterface:\ +e.toString()); System.out.println(Could not load DLL \AvsWebInterface:\ +e.toString()); } } //end of static //-- - //Native method implemented in cpp public native String JAVAAVSValidate (String company, String street1, String city, String state, String zip, StringBuffer csReturnStreet, StringBuffer csReturnCityName, StringBuffer csReturnCounty, StringBuffer csReturnState, StringBuffer csReturnZip, StringBuffer csReturnErrorMsg) ; //-- - public AddressValidate(){ inad=null; outad=null; usercompany=new String(); } //-- - public String validate (Address inad,Address outad){ csReturnStreet=new StringBuffer(); csReturnCityName=new StringBuffer(); csReturnCounty=new StringBuffer(); csReturnState=new StringBuffer(); csReturnZip=new StringBuffer(); csReturnErrorMsg=new StringBuffer(); this.inad=inad; this.outad=outad; try{ // System.out.println(Street1 :+inad.Street1); // System.out.println(city :+inad.City); // System.out.println(state :+inad.State); // System.out.println(postalcode+inad.PostalCode); JAVAAVSValidate (usercompany, inad.Street1, inad.City, inad.State, inad.PostalCode, csReturnStreet, csReturnCityName, csReturnCounty, csReturnState, csReturnZip, csReturnErrorMsg); outad.Street1 = csReturnStreet.toString(); outad.City = csReturnCityName.toString(); outad.County = csReturnCounty.toString(); outad.State = csReturnState.toString(); outad.PostalCode = csReturnZip.toString(); // System.out.println(Street1 :+outad.Street1); // System.out.println(city :+outad.City); // System.out.println(state :+outad.State); // System.out.println(postalcode+outad.PostalCode); }catch(Exception
Init parameters in default context
I am trying to specify init context parameters in the default context in server.xml as follows: Context path= docBase=ROOT debug=0 Parameter name=configDir value=C:\config override=false/ /Context This is the only context I have listed in server.xml. Then I have my Servlet class as follows: public abstract class JdbcServlet extends HttpServlet { public void init(ServletConfig config) throws ServletException { super.init(config); String configDir = getServletContext().getInitParameter(configDir); System.out.println(configDir = + configDir); } ... } This prints out: configDir = null rather than configDir = C:\config as I would expect. It only works if I specify the parameter in a more specific context as follows: Context path=/mycontext docBase=/mycontext debug=0 Parameter name=configDir value=C:\config override=false/ /Context I have tried this with Tomcat 4.1.30 and 5.0.19 with the same results.
Re: Memory problem with tomcat 4130
Hi 1. I'm using the top command to get information about the memory Mem: 1030392k av, 707688k used, 322704k free, 0k shrd, 118096k buff 354852k actv, 136300k in_d,1676k in_c Swap: 2048248k av,2832k used, 2045416k free 434288k cached If you see the server has 1 GB the memory RAM with minimal instalation of redhat, its installation start using about 70 MB of the memory, then when i've installed tomcat without any application the memory it was consume. 2. Yes i can to start annd stop de tomcat without any problem. 3. Yes i prove using a application to connect to the database, the procesor cosume about 99.9% then it leave the use of the procesos and all is normal but the memory process start to uses the memory progressive. 4. Yes our System Engineers using connections to Oracle database by network in our LAN. 5. I'm using j2sdk1.4.0 6. Yes i've modified this parameters in catalina.sh JAVA_HOME=/usr/java/j2sdk1.4.0 ; export JAVA_HOME CATALINA_HOME=/usr/local/tomcat4130 ; export CATALINA_HOME GCOPSIZE=5 JAVA_PARAMS=-DGCOPSIZE=%GCOPSIZE and i've modified the server.xml to redirect the locations of our application to this partition !-- Define the default virtual host -- Host name=localhost debug=0 appBase=/rootweb/appsweb/ unpackWARs=true autoDeploy=true 7. I've started the tomcat firts with this parameters JAVA_HOME=/usr/java/j2sdk1.4.0 ; export JAVA_HOME CATALINA_HOME=/usr/local/tomcat4130 ; export CATALINA_HOME JAVA_OPTS=-server -Xms128m -Xmx256m -Xrs CATALINA_OPTS=-server -Xms128m -Xmx256m -Xrs the -Xms128, -Xmx, -Server, -Xrs options and always happens the same. . Thanks for you help Parsons Technical Services wrote: Fabian, I am not sure if I have the answer to your memory problem but let me give you some information to get more help from others. 1. Where are you looking to see this memory use? 2. Does Tomcat stop responding? 3. Have you loaded any of your applications? No 4. Are you using a database? 5. What JDK version are you running? 1.4.0 6. Have you made any changes to the original configuration?(Server.xml, etc) 7. How are you starting Tomcat? 8. What options did you set?(Such as memory -Xmx128m) 9. Have you read the FAQ on memory? http://jakarta.apache.org/tomcat/faq/memory.html If you will answer as many of these as possible it will help in evaluating your problem. Doug www.parsonstechnical.com - Original Message - From: Software [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Friday, April 23, 2004 8:13 AM Subject: Re: Memory problem with tomcat 4130 How knows how do i make to resolve this problem, is necesary to recompile the default kernel of linux redhat 9.0 and what flag must i to select. thanks? Software wrote: Hi, i've installed tomcat 4130 in my linux redhat 9.0 with the default kernel and j2sdk1.4.0 in a server with 1 GB RAM and 2.4Ghz Processor The problem is when i start the tomcat it start to consume the memory progressively and i don't have running any application in this moment, then i have to restart the tomcat again to get memory free. What can be wrong. Fabian - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
session-id prediction
Hello all, Is there something in Tomcat that stops an adversary from guessing someone else session-id and preform a session hijacking? thanks. Bill
RE: log verbosity in tomcat
There are two things that will impact the level of information in the logs you get: 1) The server.xml debug attribute settings, which will determine whether the catalina code will try to log a message 2) The settings on your logger, which will determine whether a message gets logged It sounds like the catalina log messages are being filtered out by your logger. You need to check the configuration of the logger that these messages are going to, and dial its level down to debug. How to do this will depend on what logger you are using (log4j, java.util logging, etc.). Benjamin J. Armintor Systems Analyst ITS-Systems: Mainframe Group University of Texas - Austin tele: (512) 232-6562 email: [EMAIL PROTECTED] -Original Message- From: Beloglazov Maksim [mailto:[EMAIL PROTECTED] Sent: Friday, April 23, 2004 9:19 AM To: Tomcat Users List Subject: log verbosity in tomcat Hello, I tried to increase log verbosity in server.xml file by setting debug attribute of Engine and Realm tags to 99. Verbosity of Logger I set to 4. But still only INFO messages are displayed in the log file while Jakarta docs says that * Debugging and exception messages logged by this |Realm| will be recorded by the |Logger| that is associated with our surrounding |Context|, |Host|, or |Engine| * Verbosity attribute is the verbosity level for this logger. Messages with a higher verbosity level than the specified value will be silently ignored. Available levels are 0 (fatal messages only), 1 (errors), 2 (warnings), 3 (information), and 4 (debug). If not specified, the default value will be 1 (error). I have inspected the JAASRealm.java file and found that it uses log.debug() call for logging, but I can't see any of these messages in an actual log files! Google says nothing on this. server.xml: ... Engine name=Catalina defaultHost=localhost debug=99 !-- Valve className=org.apache.catalina.valves.RequestDumperValve/ -- !-- Global logger unless overridden at lower levels -- Logger className=org.apache.catalina.logger.FileLogger prefix=catalina_log. suffix=.txt timestamp=true verbosity=4/ !-- Because this Realm is here, an instance will be shared globally -- !-- This Realm uses the UserDatabase configured in the global JNDI resources under the key UserDatabase. Any edits that are performed against this UserDatabase are immediately available for use by the Realm. -- Realm className=org.apache.catalina.realm.JAASRealm debug=99 appName=merx userClassNames=ru.mb.security.jaas.RdbmsPrincipal roleClassNames=ru.mb.security.jaas.RdbmsRole / /Engine ... Is there any way to increase verbosity of logging? Thanks in advance, Beloglazov Maksim - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat and restricting the size of HttpServletRequest
Content length should be the same value as the Content-Length header. Otherwise - I think it should be unknown. (Since it mirrors the cgi env var CONTENT_LENGTH) If possible - you should try to force the client to send a Content-Length -Tim Varley, Roger wrote: There is a max POST size limit attribute on the Connectors. Otherwise - you can code for it too: request.getContentLength() == Size of posted content. -1 if the client did not provide a Content length. I wondered about request.getContentLength() but was worried that it was calculated by Tomcat rather than relying on it being set by the client. Either way, if the client doesn't specify the length or lies about it then I'm still in danger of running out of room. This also begs the question as to when my servlet gets to see an incoming request - I was concerned that by the time my servlet gets to see the incoming request Tomcat had already read the incoming data and stored it in the HttpServletRequest object - in which case request.getContentLength() is of no help. Regards Roger __ This e-mail and the documents attached are confidential and intended solely for the addressee; it may also be privileged. If you receive this e-mail in error, please notify the sender immediately and destroy it. As its integrity cannot be secured on the Internet, the Atos Origin group liability cannot be triggered for the message content. Although the sender endeavours to maintain a computer virus-free network, the sender does not warrant that this transmission is virus-free and will not be liable for any damages resulting from any virus transmitted. __ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: session-id prediction
They'd have to be one incredible guesser. Session ids are random and the session ID space is gigantic. Check the archives for a session id duplication discussion that went through all the math details. -Tim Bill Gorr wrote: Hello all, Is there something in Tomcat that stops an adversary from guessing someone else session-id and preform a session hijacking? thanks. Bill - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: session-id prediction
AFAIK the session id has a random part so you need either quite some luck to guess the number or you have to find a bug in the random generator. -Original Message- From: Bill Gorr [mailto:[EMAIL PROTECTED] Sent: Friday, April 23, 2004 5:35 PM To: [EMAIL PROTECTED] Subject: session-id prediction Is there something in Tomcat that stops an adversary from guessing someone else session-id and preform a session hijacking? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
JSPs not compiled under different instances of Tomcat
Hi all! I'm running two instances of Tomcat 4.1.30 on a Windows 2000 machine. The two instances listen to port 8080 and 7001 (ok I'd like BEA...). With both I'm having problems compiling JSP pages. For example, as soon as I try to access to the examples folder and try to compile one JSP, here it comes: org.apache.jasper.JasperException: Unable to compile class for JSP An error occurred at line: -1 in the jsp file: null Generated servlet error: [javac] Compiling 1 source file at org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:130) at org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:293) at org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:353) at org.apache.jasper.compiler.Compiler.compile(Compiler.java:370) ... The same if I try to access to the Admin application, for example. The procedure I followed to have multiple instances is the usual: two folders under which I put conf, logs, webapps, work and temp. Then configuration of server.xml for both changing ports. Then I created two Windows services for starting/stopping the instances. Obviously if I use the single original instance under the installation folder of Tomcat everything runs well. Any tip?? Thanks, MarcoC - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: JSPs not compiled under different instances of Tomcat
1. verify your %JAVA_HOME% 2. verify th jdk path running catalina.bat run - Original Message - From: Marco CAMPIGLIO [EMAIL PROTECTED] To: tomcat-user [EMAIL PROTECTED] Sent: Friday, April 23, 2004 4:57 PM Subject: JSPs not compiled under different instances of Tomcat Hi all! I'm running two instances of Tomcat 4.1.30 on a Windows 2000 machine. The two instances listen to port 8080 and 7001 (ok I'd like BEA...). With both I'm having problems compiling JSP pages. For example, as soon as I try to access to the examples folder and try to compile one JSP, here it comes: org.apache.jasper.JasperException: Unable to compile class for JSP An error occurred at line: -1 in the jsp file: null Generated servlet error: [javac] Compiling 1 source file at org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandle r.java:130) at org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:2 93) at org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:353) at org.apache.jasper.compiler.Compiler.compile(Compiler.java:370) ... The same if I try to access to the Admin application, for example. The procedure I followed to have multiple instances is the usual: two folders under which I put conf, logs, webapps, work and temp. Then configuration of server.xml for both changing ports. Then I created two Windows services for starting/stopping the instances. Obviously if I use the single original instance under the installation folder of Tomcat everything runs well. Any tip?? Thanks, MarcoC - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: JSPs not compiled under different instances of Tomcat
Did you set CATALINA_BASE= not CATALINA_HOME= ? Look in the RUNNING.txt at step 4. Doug - Original Message - From: Marco CAMPIGLIO [EMAIL PROTECTED] To: tomcat-user [EMAIL PROTECTED] Sent: Friday, April 23, 2004 10:57 AM Subject: JSPs not compiled under different instances of Tomcat Hi all! I'm running two instances of Tomcat 4.1.30 on a Windows 2000 machine. The two instances listen to port 8080 and 7001 (ok I'd like BEA...). With both I'm having problems compiling JSP pages. For example, as soon as I try to access to the examples folder and try to compile one JSP, here it comes: org.apache.jasper.JasperException: Unable to compile class for JSP An error occurred at line: -1 in the jsp file: null Generated servlet error: [javac] Compiling 1 source file at org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandle r.java:130) at org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:2 93) at org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:353) at org.apache.jasper.compiler.Compiler.compile(Compiler.java:370) ... The same if I try to access to the Admin application, for example. The procedure I followed to have multiple instances is the usual: two folders under which I put conf, logs, webapps, work and temp. Then configuration of server.xml for both changing ports. Then I created two Windows services for starting/stopping the instances. Obviously if I use the single original instance under the installation folder of Tomcat everything runs well. Any tip?? Thanks, MarcoC - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: session-id prediction
I know that the space is theoretically 128 bit (2^128) but who can promise that it is not made of 12 bits of seed (which are very predictable ..). I was looking in the archive before my posting and found nothing about it, can you please point out one of the postings? thanks, Bill - Original Message - From: Tim Funk [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Friday, April 23, 2004 4:40 PM Subject: Re: session-id prediction They'd have to be one incredible guesser. Session ids are random and the session ID space is gigantic. Check the archives for a session id duplication discussion that went through all the math details. -Tim Bill Gorr wrote: Hello all, Is there something in Tomcat that stops an adversary from guessing someone else session-id and preform a session hijacking? thanks. Bill - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: session-id prediction
http://marc.theaimsgroup.com/?t=10420795603r=1w=2 As long as you have SecureRandom available - you should be OK. (Unless Sun's implementation is bad.) -Tim Bill Gorr wrote: I know that the space is theoretically 128 bit (2^128) but who can promise that it is not made of 12 bits of seed (which are very predictable ..). I was looking in the archive before my posting and found nothing about it, can you please point out one of the postings? thanks, Bill - Original Message - From: Tim Funk [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Friday, April 23, 2004 4:40 PM Subject: Re: session-id prediction They'd have to be one incredible guesser. Session ids are random and the session ID space is gigantic. Check the archives for a session id duplication discussion that went through all the math details. -Tim Bill Gorr wrote: Hello all, Is there something in Tomcat that stops an adversary from guessing someone else session-id and preform a session hijacking? thanks. Bill - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
TC5 java mail woes
Hello After posting this problem yesterday I went away and assumed that the problem must be the consequence of my IQ deficit and/or all crack smoking.. Before I start , yes I have the java mail 1.31 and a recent copy of javax.activation in both by webapp lib directory and common/lib I added the context in the relevant place in sever.xml Context path=/acme-mail docBase=acme-mail debug=9 reloadable=true crossContext=true Logger className=org.apache.catalina.logger.FileLogger prefix=acme-mail. suffix=.log timestamp=true/ Resource name=mail/Session auth=Container type=javax.mail.Session/ ResourceParams name=mail/Session parameter namemail.smtp.host/name valueout.aliceposta.it/value /parameter /ResourceParams /Context i also tried Resource name=mail/Session auth=Container type=javax.mail.Session/ ResourceParams name=mail/Session parameter namemail.smtp.host/name valueout.aliceposta.it/value /parameter /ResourceParams nested in GlobalNamingResources because it seemed a really cool thing to do at the time and i wanted to impress my friends. in acme-mail (the webapp) web.xml resource-ref description/description res-ref-namemail/Session/res-ref-name res-typejavax.mail.Session/res-type res-authContainer/res-auth /resource-ref after the taglib declarations as specified by the dtd http://java.sun.com/j2ee/dtds/web-app_2_2.dtd when i try to grab the mail session i get this.. java.lang.NoClassDefFoundError: javax/activation/DataSource point to the line where i try and feed session to the mime message constructor. Context initCtx = new InitialContext(); Context envCtx = (Context) initCtx.lookup(java:comp/env); Session mailSession = (Session) envCtx.lookup(mail/Session); Message msg = new MimeMessage(mailSession); Has no body had this problem? Mark - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Apache2.0.49/mod_jk2 and unix domain socket update
I just downloaded the fedora core 1 mod_jk2 binary and am getting the same errorr.help ! ---Original Message--- From: tomcatuser [EMAIL PROTECTED] Subject: Apache2.0.49/mod_jk2 and unix domain socket Sent: 23 Apr 2004 12:39:15 I am trying to get mod_jk2 working with Apache2.0.49 on Fedora Core 1. I want to try out the mod_jk2's ability to communicate with Tomcat using the unix domain socket capability. Does anyone have a howto on setting this up? I have tried to set the following parameters in jk2.properties channelSocket.port=8009 channelUnix.file=/opt/apache/conf/jk2.socket When I do so, I get the following error when I start tomcat 5.0.19: --cut-- Apr 23, 2004 8:29:05 AM org.apache.jk.common.ChannelSocket init INFO: JK2: ajp13 listening on /0.0.0.0:8009 Apr 23, 2004 8:29:06 AM org.apache.jk.server.JkMain start INFO: APR not loaded, disabling jni components: java.io.IOException: java.lang.UnsatisfiedLinkError: /opt/apache/modules/libjkjni.so: /opt/apache/modules/libjkjni.so: undefined symbol: apr_md5_final --cut-- I then run the following command and get the resulting output: # nm /opt/apache/modules/libjkjni.so | grep apr_md5_final U apr_md5_final Anyone have any ideas on what the problem might be? Thanks in advance for any help. ---Original Message---
Apache not sending the requested URL to Tomcat...
In Apache I have VHosting setup so that multiple domains all share the same pub directory. In Tomcat I have VHosting setup so that multiple domains all share a single web application INSTANCE When I have Apache pass requests to Tomcat, only the domain specified in the ServerName attribute of the Apache VHost config gets passed to Tomcat, even though I'm accessing the site under one of the domains specified in a ServerAlias attribute. i.e. I type in www.otherdomain.com/showServerName.jsp in my browser and the value displayed is www.domain.com NOT www.otherdomain.com How do I get it to display www.otherdomain.com? I need to be able to tell which domain the user has typed into their browser. I have tried request.getRequestURL and this also returns www.domain.com. I am grateful for any assistance. Example Config.. In Apache. VirtualHost 127.0.0.2 ServerName www.domain.com ServerAlias www.otherdomain.com .. /VirtualHost In Tomcat Host name=www.domain.com debug=0 appBase=/webs/MyWebApp unpackWARs=true autoDeploy=true Aliaswww.otherdomain.com/Alias Aliaswww.anotherdomain.com/Alias ... /Host My Environment Apache 2 Tomcat 4.1.24 RH Linux 7.x I have tried setting up multiple VHost entries in Apache, but then I received an error that Tomcat couldn't find the mapping to .do (I'm using Struts, but it didn't work for JSPs either) for all domains EXCEPT the domain in the name attribute of the Host tag in the Tomcat config file. It did serve static files from within the pub directory just fine. Maybe I wasn't doing things right when I tried this, but I hope somebody can provide me with the right way to do this, or an alternative that works. i.e. In Apache VirtualHost 127.0.0.2 ServerName www.domain.com .. /VirtualHost VirtualHost 127.0.0.2 ServerName www.otherdomain.com .. /VirtualHost Again, I am grateful for any assistance. Kurt Bonnet [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Accessing Dll's
Hi There, Just to clarify things if you have the following: package test; public class Test1 { public native int getVersion(); //load the library static { try { System.loadLibrary(SystemUtilities); } catch (java.lang.UnsatisfiedLinkError e) { e.printStackTrace(); } } public Test1() { System.out.println(Version - getVersion()); } } Then the native C code should look like this JNIEXPORT jint JNICALL Java_test_Test1 (JNIEnv *env, jobject jo, jstring js) { return 1; } This should then be built as a dll and placed in the windows/system32 directory. Example class using the native function import test.Test1; public class Version { public Version() { } public static void main (String args[]) { Test1 t1 = new Test1(); } } This should then display the following Version - 1 My guess is that the native c function does not match the class path, this would result in the error that you are seeing. Thanks Pete -Original Message- From: armalai_uk [mailto:[EMAIL PROTECTED] Sent: 23 April 2004 14:12 To: Tomcat Users List Subject: Re: Accessing Dll's Hi., This code has been written in JDK 1.3.0_03 couple of years back and i implemented in JRun 3.1 Now i'm trying to use this same code in Tomcat 4.1 with J2SDK 1.4.2_03. According to your previos mail i understand that i have to rewrite the code using J2SDK 1.4.2 specifications. Is it correct? Can you please give me the steps that i have to do inorder to make my code compatible to 1.4.2.. Thanks., MALAI - Original Message - From: Wade Chandler [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Friday, April 23, 2004 12:52 AM Subject: Re: Accessing Dll's Wade Chandler wrote: Annamalai Ramasamy wrote: Hi., Yes,I did see my dll path using this line. Thanks., MALAI Ryan Lissack [EMAIL PROTECTED] wrote: Hi, Execute the following : System.out.println(System.getProperty(java.library.path)); See what directories are there. If the one(s) with your DLL(s) are not listed you can add them as a startup param to the VM using the -D option (java -Djava.library.path=.) HTH Regards, Ryan. -Original Message- From: Annamalai Ramasamy [mailto:[EMAIL PROTECTED] Sent: 22 April 2004 16:33 To: Tomcat Users List Subject: RE: Accessing Dll's Hi., Check my below java code. I do not have native source codes. I'm sure there is no version conflicts. But i have copied the dll in more than one places..like winnt, system32 and jre/bin like that. any idea? public class AddressValidate { private Address inad; private Address outad; private String usercompany; public StringBuffer csReturnErrorMsg; public StringBuffer csReturnStreet; public StringBuffer csReturnCityName; public StringBuffer csReturnCounty; public StringBuffer csReturnState; public StringBuffer csReturnZip; //To load DLL AvsWebInrterface static{ try{ System.loadLibrary(AvsWebInterface); System.out.println(DLL Loaded); }catch(Exception e){ System.err.println(Could not load DLL \AvsWebInterface \ : +e.toString()); System.out.println(Could not load DLL \AvsWebInterface \ : +e.toString()); }catch(Throwable e){ System.err.println(Could not load DLL \AvsWebInterface:\ +e.toString()); System.out.println(Could not load DLL \AvsWebInterface:\ +e.toString()); } } //end of static //-- - //Native method implemented in cpp public native String JAVAAVSValidate (String company, String street1, String city, String state, String zip, StringBuffer csReturnStreet, StringBuffer csReturnCityName, StringBuffer csReturnCounty, StringBuffer csReturnState, StringBuffer csReturnZip, StringBuffer csReturnErrorMsg) ; //-- - public AddressValidate(){ inad=null; outad=null; usercompany=new String(); } //-- - public String validate (Address inad,Address outad){ csReturnStreet=new StringBuffer(); csReturnCityName=new StringBuffer(); csReturnCounty=new StringBuffer(); csReturnState=new StringBuffer(); csReturnZip=new StringBuffer(); csReturnErrorMsg=new StringBuffer(); this.inad=inad; this.outad=outad; try{ // System.out.println(Street1 :+inad.Street1); // System.out.println(city :+inad.City); // System.out.println(state :+inad.State); // System.out.println(postalcode+inad.PostalCode); JAVAAVSValidate (usercompany, inad.Street1, inad.City, inad.State, inad.PostalCode, csReturnStreet, csReturnCityName, csReturnCounty, csReturnState, csReturnZip, csReturnErrorMsg); outad.Street1 =
RE: SESSION PROBLEM in UNIX
Hi Good. You are making progress on this one:). You mentioned that sessionDestroyed() was never called, eh. Well, that means at that point that particular session is still in the pool, i.e., it hasn't been invalidated yet. I would like to know how you configured your session time-out. i.e., how long is the interval and how many places. Second if you don't think this is too hard to do, try to expunge the session before the second interval(you should see your SOP from your sessionDestroyed()), but still let the second request come through. Maybe you will get a different error message. -Yan -Original Message- From: MUKUND Premchander [mailto:[EMAIL PROTECTED] Sent: April 23, 2004 04:49 To: Tomcat Users List Subject: RE: SESSION PROBLEM in UNIX HI , Any suggestions on the problem reported below .I would like to add another point that this works perfectly in Linux . I have tomcat4 running in linux and the session does not become null .As I mentioned before in Windows it works fine ...any specific settings that I need to check ?Only in HP Unix I get this problem of the session variable becoming null. -Original Message- From: MUKUND Premchander [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 21, 2004 12:23 PM To: Tomcat Users List Subject: RE: SESSION PROBLEM in UNIX Hi, Thank you for your inputs. I couldn't implement HttpSessionListener on tomcat3.2,hence I tried with HttpSessionBindingListener before. where I added an a listener object to the session and so that when session becomes invalid then the unbound method will get called . Now as suggested I moved my application to tomcat4.1.29 and tested the same ,by implementing HttpSessionListener and also Enabled the request dumper in the server.xml. I still get the same problem i.e. after a few refresh null pointer exception is thrown when session is accessed. sessionCreated(HttpSessionEvent se) is called and I get the SOP when I load application in Browser ,but after the error occurs the sessionDestroyed(HttpSessionEvent se) is not called ( confirmed it as SOP was not displayed on the console) Also I see no difference in the dump by the request dumper for the refresh period when the problem occurred and the previous interval . Message in the log file 2004-04-21 12:02:19 ApplicationDispatcher[/MCOne] Servlet.service() for servlet jsp threw exception org.apache.jasper.JasperException Part of the request response dump: As I see it the session ID is the same and maintained . So I am unable to find out if its my application or the session management that is causing the problem. As shown above problem occurs at 12:02:19 Find below dump of 12:02:19 and previous interval 12:02:09 when the screen display is good 2004-04-21 12:02:08 RequestDumperValve[Standalone]: REQUEST URI =/MCOne/BP/BPRealtimeServlet 2004-04-21 12:02:08 RequestDumperValve[Standalone]: authType=null 2004-04-21 12:02:08 RequestDumperValve[Standalone]: characterEncoding=null 2004-04-21 12:02:08 RequestDumperValve[Standalone]: contentLength=116 2004-04-21 12:02:08 RequestDumperValve[Standalone]: contentType=application/x-www-form-urlencoded 2004-04-21 12:02:08 RequestDumperValve[Standalone]:contextPath= 2004-04-21 12:02:08 RequestDumperValve[Standalone]: cookie=JSESSIONID=314C72D3A1279E24B5095C9DA4D02DF2 2004-04-21 12:02:08 RequestDumperValve[Standalone]: header=accept=image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, application/x-shockwave-flash, */* 2004-04-21 12:02:08 RequestDumperValve[Standalone]: header=referer=http://10.3.106.177:8080/MCOne/BP/BPRealtimeServlet 2004-04-21 12:02:08 RequestDumperValve[Standalone]: header=accept-language=en-us 2004-04-21 12:02:08 RequestDumperValve[Standalone]: header=content-type=application/x-www-form-urlencoded 2004-04-21 12:02:08 RequestDumperValve[Standalone]: header=accept-encoding=gzip, deflate 2004-04-21 12:02:08 RequestDumperValve[Standalone]: header=user-agent=Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0) 2004-04-21 12:02:08 RequestDumperValve[Standalone]: header=host=10.3.106.177:8080 2004-04-21 12:02:08 RequestDumperValve[Standalone]: header=content-length=116 2004-04-21 12:02:08 RequestDumperValve[Standalone]: header=connection=Keep-Alive 2004-04-21 12:02:08 RequestDumperValve[Standalone]: header=cache-control=no-cache 2004-04-21 12:02:08 RequestDumperValve[Standalone]: header=cookie=JSESSIONID=314C72D3A1279E24B5095C9DA4D02DF2 2004-04-21 12:02:08 RequestDumperValve[Standalone]: locale=en_US 2004-04-21 12:02:08 RequestDumperValve[Standalone]: method=POST 2004-04-21 12:02:08 RequestDumperValve[Standalone]: parameter=hiddenUrlInitialize= 2004-04-21 12:02:08 RequestDumperValve[Standalone]: parameter=interval=null, check_interval 2004-04-21 12:02:08 RequestDumperValve[Standalone]: parameter=hiddenInterval=10 2004-04-21 12:02:08 RequestDumperValve[Standalone]: parameter=hiddenRealtimeMain=Summary 2004-04-21
RE: SESSION PROBLEM in UNIX
Forgot to include the line: request.getSession.invalidate(); should be sufficient, I hope. -Yan -Original Message- From: Yansheng Lin [mailto:[EMAIL PROTECTED] Sent: April 23, 2004 10:08 To: 'Tomcat Users List' Subject: RE: SESSION PROBLEM in UNIX Hi Good. You are making progress on this one:). You mentioned that sessionDestroyed() was never called, eh. Well, that means at that point that particular session is still in the pool, i.e., it hasn't been invalidated yet. I would like to know how you configured your session time-out. i.e., how long is the interval and how many places. Second if you don't think this is too hard to do, try to expunge the session before the second interval(you should see your SOP from your sessionDestroyed()), but still let the second request come through. Maybe you will get a different error message. -Yan -Original Message- From: MUKUND Premchander [mailto:[EMAIL PROTECTED] Sent: April 23, 2004 04:49 To: Tomcat Users List Subject: RE: SESSION PROBLEM in UNIX HI , Any suggestions on the problem reported below .I would like to add another point that this works perfectly in Linux . I have tomcat4 running in linux and the session does not become null .As I mentioned before in Windows it works fine ...any specific settings that I need to check ?Only in HP Unix I get this problem of the session variable becoming null. -Original Message- From: MUKUND Premchander [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 21, 2004 12:23 PM To: Tomcat Users List Subject: RE: SESSION PROBLEM in UNIX Hi, Thank you for your inputs. I couldn't implement HttpSessionListener on tomcat3.2,hence I tried with HttpSessionBindingListener before. where I added an a listener object to the session and so that when session becomes invalid then the unbound method will get called . Now as suggested I moved my application to tomcat4.1.29 and tested the same ,by implementing HttpSessionListener and also Enabled the request dumper in the server.xml. I still get the same problem i.e. after a few refresh null pointer exception is thrown when session is accessed. sessionCreated(HttpSessionEvent se) is called and I get the SOP when I load application in Browser ,but after the error occurs the sessionDestroyed(HttpSessionEvent se) is not called ( confirmed it as SOP was not displayed on the console) Also I see no difference in the dump by the request dumper for the refresh period when the problem occurred and the previous interval . Message in the log file 2004-04-21 12:02:19 ApplicationDispatcher[/MCOne] Servlet.service() for servlet jsp threw exception org.apache.jasper.JasperException Part of the request response dump: As I see it the session ID is the same and maintained . So I am unable to find out if its my application or the session management that is causing the problem. As shown above problem occurs at 12:02:19 Find below dump of 12:02:19 and previous interval 12:02:09 when the screen display is good 2004-04-21 12:02:08 RequestDumperValve[Standalone]: REQUEST URI =/MCOne/BP/BPRealtimeServlet 2004-04-21 12:02:08 RequestDumperValve[Standalone]: authType=null 2004-04-21 12:02:08 RequestDumperValve[Standalone]: characterEncoding=null 2004-04-21 12:02:08 RequestDumperValve[Standalone]: contentLength=116 2004-04-21 12:02:08 RequestDumperValve[Standalone]: contentType=application/x-www-form-urlencoded 2004-04-21 12:02:08 RequestDumperValve[Standalone]:contextPath= 2004-04-21 12:02:08 RequestDumperValve[Standalone]: cookie=JSESSIONID=314C72D3A1279E24B5095C9DA4D02DF2 2004-04-21 12:02:08 RequestDumperValve[Standalone]: header=accept=image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, application/x-shockwave-flash, */* 2004-04-21 12:02:08 RequestDumperValve[Standalone]: header=referer=http://10.3.106.177:8080/MCOne/BP/BPRealtimeServlet 2004-04-21 12:02:08 RequestDumperValve[Standalone]: header=accept-language=en-us 2004-04-21 12:02:08 RequestDumperValve[Standalone]: header=content-type=application/x-www-form-urlencoded 2004-04-21 12:02:08 RequestDumperValve[Standalone]: header=accept-encoding=gzip, deflate 2004-04-21 12:02:08 RequestDumperValve[Standalone]: header=user-agent=Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0) 2004-04-21 12:02:08 RequestDumperValve[Standalone]: header=host=10.3.106.177:8080 2004-04-21 12:02:08 RequestDumperValve[Standalone]: header=content-length=116 2004-04-21 12:02:08 RequestDumperValve[Standalone]: header=connection=Keep-Alive 2004-04-21 12:02:08 RequestDumperValve[Standalone]: header=cache-control=no-cache 2004-04-21 12:02:08 RequestDumperValve[Standalone]: header=cookie=JSESSIONID=314C72D3A1279E24B5095C9DA4D02DF2 2004-04-21 12:02:08 RequestDumperValve[Standalone]: locale=en_US 2004-04-21 12:02:08 RequestDumperValve[Standalone]: method=POST 2004-04-21 12:02:08 RequestDumperValve[Standalone]: parameter=hiddenUrlInitialize= 2004-04-21
Nested tags in Tomcat 5
I am having trouble getting nested tags to work in Tomcat. The code below results in the error that follows. If I remove the nested forEach it works. If I use Item c:out value=${item}/br in the first forEach it fails. The second .jsp code shows how it does work in Tomcat4. We've had the same experience with custom tags we wrote. I would greatly appreciate any help I could get with this. TIA. html body %@ taglib uri=http://java.sun.com/jsp/jstl/core; prefix=c % %@ page import=java.util.Vector % h3Iterating over a range/h3 c:forEach var=item begin=1 end=10 Item ${item}br /c:forEach % Vector v = new Vector(); v.add(One); v.add(Two); v.add(Three); v.add(Four); pageContext.setAttribute(vector, v); % h3Iterating over a Vector/h3 c:forEach items=${vector} var=item c:forEach items=${vector} var=item2 Item ${item} ${item2}br /c:forEach /c:forEach /body /html org.apache.jasper.JasperException: Unable to compile class for JSP An error occurred at line: 21 in the jsp file: /foreach.jsp Generated servlet error: [javac] Compiling 1 source file C:\Program Files\Apache Software Foundation\Tomcat 5.0\work\Catalina\localhost\_\org\apache\jsp\foreach_jsp.java:151: _jspx_meth_c_forEach_2(javax.servlet.jsp.tagext.JspTag,javax.servlet.jsp .PageContext,int[]) in org.apache.jsp.foreach_jsp cannot be applied to (org.apache.taglibs.standard.tag.rt.core.ForEachTag,javax.servlet.jsp.Pa geContext,int[]) if (_jspx_meth_c_forEach_2(_jspx_th_c_forEach_1, _jspx_page_context, _jspx_push_body_count_c_forEach_1)) ^ 1 error org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHa ndler.java:127) org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.ja va:351) org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:415) org.apache.jasper.compiler.Compiler.compile(Compiler.java:458) org.apache.jasper.compiler.Compiler.compile(Compiler.java:439) org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.ja va:553) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.ja va:291) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248) javax.servlet.http.HttpServlet.service(HttpServlet.java:856) !-- This works in Tomcat4 -- html body %@ taglib uri=http://java.sun.com/jstl/core; prefix=c % %@ page import=java.util.Vector % h3Iterating over a range/h3 c:forEach var=item begin=1 end=10 Item c:out value=${item}/br /c:forEach % Vector v = new Vector(); v.add(One); v.add(Two); v.add(Three); v.add(Four); pageContext.setAttribute(vector, v); % h3Iterating over a Vector/h3 c:forEach items=${vector} var=item c:forEach items=${vector} var=item2 Item c:out value=${item} ${item2}/br /c:forEach /c:forEach /body /html Dagmar C. Murray, Lead Systems Analyst/Engineer Purdue University 400 Centennial Mall Drive W. Lafayette, IN 47907-2016 E-Mail: [EMAIL PROTECTED]
RE: URL Mapping Question
I have wondered the same thing regarding Contexts and URI's in the workers file.. I'm using JK (1) now as I didn't know if that was a bug or by design in JK2. In JK there doesn't seem to be a context option, which leads me to believe that in JK2 it follows the same design? Sorry that wasn't much help.. Moran -Original Message- From: Varley, Roger [mailto:[EMAIL PROTECTED] Sent: Friday, April 23, 2004 10:14 AM To: Tomcat Users List Subject: RE: URL Mapping Question I have now managed to get it to work. I have defined two contexts (InboundA and InboundB) in server.xml and specified Inbound as the docBase for both contexts. So, what does the context parameter in workers2.properties actually do? Regards Roger -Original Message- From: Varley, Roger [mailto:[EMAIL PROTECTED] Sent: 23 April 2004 13:51 To: [EMAIL PROTECTED] Subject: URL Mapping Question Hi I have Tomcat 4.4.18 running behind Microsofts IIS web server. In IIS I have two virtual directories defined InboundA and InboundB both of which are mapped to the same physical directory $TOMCAT_HOME/webapps/Inbound. In workers2.properties I have added the lines ... [uri:/InboundA/*] context=/Inbound [uri:/InboundB/*] context=/Inbound and I have added the context Inbound to the server.xml in $TOMCAT/conf After restarting IIS and Tomcat, the Tomcat manger application sees the Inbound context loaded and I can run the servlets contained in the context by accessing Tomcat directly via port 8080 (http://hostname:8080/Inbound/servletname, however when I use the browser to access http://hostname/InboundA/servletname or InboundB I get a 404 response from IIS rather than a response from Tomcat which implies that the forwarding is not taking place. What am I missing? Regards Roger __ This e-mail and the documents attached are confidential and intended solely for the addressee; it may also be privileged. If you receive this e-mail in error, please notify the sender immediately and destroy it. As its integrity cannot be secured on the Internet, the Atos Origin group liability cannot be triggered for the message content. Although the sender endeavours to maintain a computer virus-free network, the sender does not warrant that this transmission is virus-free and will not be liable for any damages resulting from any virus transmitted. __ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE --- QAS Ltd. Developers of QuickAddress Software a href=http://www.qas.com;www.qas.com/a Registered in England: No 2582055 Registered in Australia: No 082 851 474 --- /FONT - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ This e-mail and the documents attached are confidential and intended solely for the addressee; it may also be privileged. If you receive this e-mail in error, please notify the sender immediately and destroy it. As its integrity cannot be secured on the Internet, the Atos Origin group liability cannot be triggered for the message content. Although the sender endeavours to maintain a computer virus-free network, the sender does not warrant that this transmission is virus-free and will not be liable for any damages resulting from any virus transmitted. __ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ This e-mail and the documents attached are confidential and intended solely for the addressee; it may also be privileged. If you receive this e-mail in error, please notify the sender immediately and destroy it. As its integrity cannot be secured on the Internet, the Atos Origin group liability cannot be triggered for the message content. Although the sender endeavours to maintain a computer virus-free network, the sender does not warrant that this transmission is virus-free and will not be liable for any damages resulting from any virus transmitted. __ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: JSPs not compiled under different instances of Tomcat
Thanks everybody. I had a look at my logs files and I found out it was a problem of Classpath. I edited setclasspath.bat under CATALINA_HOME and rebuilt the correct classpath. Then Uninstalled/RE-Installed the service and everything goes well. Thanks again and have a nice week end! MarcoC -- Initial Header --- From : Giacomo Veneri [EMAIL PROTECTED] To : Tomcat Users List [EMAIL PROTECTED] Cc : Date : Fri, 23 Apr 2004 17:13:31 +0200 Subject : Re: JSPs not compiled under different instances of Tomcat 1. verify your %JAVA_HOME% 2. verify th jdk path running catalina.bat run - Original Message - From: Marco CAMPIGLIO [EMAIL PROTECTED] To: tomcat-user [EMAIL PROTECTED] Sent: Friday, April 23, 2004 4:57 PM Subject: JSPs not compiled under different instances of Tomcat - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Apache not sending the requested URL to Tomcat...
I've wondered about this as well, and perhaps this is what you need:? http://httpd.apache.org/docs/mod/core.html#usecanonicalname I have a production app that depends on the behaviour you want changed (my tomcat app depends on ServerName being passed for all requests through ServerAlias), but it seemed to me there must be a way to switch this in Apache. -Original Message- From: Kurt [mailto:[EMAIL PROTECTED] Sent: Friday, April 23, 2004 11:01 AM To: [EMAIL PROTECTED] Subject: Apache not sending the requested URL to Tomcat... In Apache I have VHosting setup so that multiple domains all share the same pub directory. In Tomcat I have VHosting setup so that multiple domains all share a single web application INSTANCE When I have Apache pass requests to Tomcat, only the domain specified in the ServerName attribute of the Apache VHost config gets passed to Tomcat, even though I'm accessing the site under one of the domains specified in a ServerAlias attribute. i.e. I type in www.otherdomain.com/showServerName.jsp in my browser and the value displayed is www.domain.com NOT www.otherdomain.com How do I get it to display www.otherdomain.com? I need to be able to tell which domain the user has typed into their browser. I have tried request.getRequestURL and this also returns www.domain.com. I am grateful for any assistance. Example Config.. In Apache. VirtualHost 127.0.0.2 ServerName www.domain.com ServerAlias www.otherdomain.com .. /VirtualHost In Tomcat Host name=www.domain.com debug=0 appBase=/webs/MyWebApp unpackWARs=true autoDeploy=true Aliaswww.otherdomain.com/Alias Aliaswww.anotherdomain.com/Alias ... /Host My Environment Apache 2 Tomcat 4.1.24 RH Linux 7.x I have tried setting up multiple VHost entries in Apache, but then I received an error that Tomcat couldn't find the mapping to .do (I'm using Struts, but it didn't work for JSPs either) for all domains EXCEPT the domain in the name attribute of the Host tag in the Tomcat config file. It did serve static files from within the pub directory just fine. Maybe I wasn't doing things right when I tried this, but I hope somebody can provide me with the right way to do this, or an alternative that works. i.e. In Apache VirtualHost 127.0.0.2 ServerName www.domain.com .. /VirtualHost VirtualHost 127.0.0.2 ServerName www.otherdomain.com .. /VirtualHost Again, I am grateful for any assistance. Kurt Bonnet [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Apache not sending the requested URL to Tomcat...
Could someone please send me steps on how to do this? Connecting apache and tomcat using virutal host settings seems to be exactly what I need. I really dont care about mutiple virtual hosts at this point so instructions for just one are fine. Thanks for your help in advance, Malathi From: Mike Curwen [EMAIL PROTECTED] Reply-To: Tomcat Users List [EMAIL PROTECTED] To: 'Tomcat Users List' [EMAIL PROTECTED] Subject: RE: Apache not sending the requested URL to Tomcat... Date: Fri, 23 Apr 2004 11:53:46 -0500 I've wondered about this as well, and perhaps this is what you need:? http://httpd.apache.org/docs/mod/core.html#usecanonicalname I have a production app that depends on the behaviour you want changed (my tomcat app depends on ServerName being passed for all requests through ServerAlias), but it seemed to me there must be a way to switch this in Apache. -Original Message- From: Kurt [mailto:[EMAIL PROTECTED] Sent: Friday, April 23, 2004 11:01 AM To: [EMAIL PROTECTED] Subject: Apache not sending the requested URL to Tomcat... In Apache I have VHosting setup so that multiple domains all share the same pub directory. In Tomcat I have VHosting setup so that multiple domains all share a single web application INSTANCE When I have Apache pass requests to Tomcat, only the domain specified in the ServerName attribute of the Apache VHost config gets passed to Tomcat, even though I'm accessing the site under one of the domains specified in a ServerAlias attribute. i.e. I type in www.otherdomain.com/showServerName.jsp in my browser and the value displayed is www.domain.com NOT www.otherdomain.com How do I get it to display www.otherdomain.com? I need to be able to tell which domain the user has typed into their browser. I have tried request.getRequestURL and this also returns www.domain.com. I am grateful for any assistance. Example Config.. In Apache. VirtualHost 127.0.0.2 ServerName www.domain.com ServerAlias www.otherdomain.com .. /VirtualHost In Tomcat Host name=www.domain.com debug=0 appBase=/webs/MyWebApp unpackWARs=true autoDeploy=true Aliaswww.otherdomain.com/Alias Aliaswww.anotherdomain.com/Alias ... /Host My Environment Apache 2 Tomcat 4.1.24 RH Linux 7.x I have tried setting up multiple VHost entries in Apache, but then I received an error that Tomcat couldn't find the mapping to .do (I'm using Struts, but it didn't work for JSPs either) for all domains EXCEPT the domain in the name attribute of the Host tag in the Tomcat config file. It did serve static files from within the pub directory just fine. Maybe I wasn't doing things right when I tried this, but I hope somebody can provide me with the right way to do this, or an alternative that works. i.e. In Apache VirtualHost 127.0.0.2 ServerName www.domain.com .. /VirtualHost VirtualHost 127.0.0.2 ServerName www.otherdomain.com .. /VirtualHost Again, I am grateful for any assistance. Kurt Bonnet [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ FREE pop-up blocking with the new MSN Toolbar ย get it now! http://toolbar.msn.com/go/onm00200415ave/direct/01/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat and restricting the size of HttpServletRequest
At 07:03 AM 4/23/2004, you wrote: This also begs the question as to when my servlet gets to see an incoming request - I was concerned that by the time my servlet gets to see the incoming request Tomcat had already read the incoming data and stored it in the HttpServletRequest object - in which case request.getContentLength() is of no help. Regards Roger If anyone has insight into this, I'd be very curious to get a definitive answer. Although I've never explicitly explored this (or read this part of TC's code), it seems like Tomcat reads the entire POST, makes an in-memory copy of it, then passes it along to the Servlet/Filter processing the request. If this is the case, then the InputStream from the ServletRequest is not reading data across the network. Again, my reasons for surmising this are anecdotal. It seems like it'd be easier and more fault-tolerant to have the above behavior than to truly stream data over the network. Any authoritative input would be appreciated. Thanks, justin __ Justin Ruthenbeck Software Engineer, NextEngine Inc. justinr - AT - nextengine DOT com Confidential. See: http://www.nextengine.com/confidentiality.php __ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: TC5 java mail woes
It was the crack.. I had an old mail jar kicking around in my ext directory.. I killed it works fine.. No mail jar required in the webapps lib directory.. Just common/lib with activation.jar mark On 23 Apr 2004, at 17:42, Mark Lowe wrote: Hello After posting this problem yesterday I went away and assumed that the problem must be the consequence of my IQ deficit and/or all crack smoking.. Before I start , yes I have the java mail 1.31 and a recent copy of javax.activation in both by webapp lib directory and common/lib I added the context in the relevant place in sever.xml Context path=/acme-mail docBase=acme-mail debug=9 reloadable=true crossContext=true Logger className=org.apache.catalina.logger.FileLogger prefix=acme-mail. suffix=.log timestamp=true/ Resource name=mail/Session auth=Container type=javax.mail.Session/ ResourceParams name=mail/Session parameter namemail.smtp.host/name valueout.aliceposta.it/value /parameter /ResourceParams /Context i also tried Resource name=mail/Session auth=Container type=javax.mail.Session/ ResourceParams name=mail/Session parameter namemail.smtp.host/name valueout.aliceposta.it/value /parameter /ResourceParams nested in GlobalNamingResources because it seemed a really cool thing to do at the time and i wanted to impress my friends. in acme-mail (the webapp) web.xml resource-ref description/description res-ref-namemail/Session/res-ref-name res-typejavax.mail.Session/res-type res-authContainer/res-auth /resource-ref after the taglib declarations as specified by the dtd http://java.sun.com/j2ee/dtds/web-app_2_2.dtd when i try to grab the mail session i get this.. java.lang.NoClassDefFoundError: javax/activation/DataSource point to the line where i try and feed session to the mime message constructor. Context initCtx = new InitialContext(); Context envCtx = (Context) initCtx.lookup(java:comp/env); Session mailSession = (Session) envCtx.lookup(mail/Session); Message msg = new MimeMessage(mailSession); Has no body had this problem? Mark - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: JK2 JNI link bug [Was: Re: Apache2+Jk2+Tomcat5]
I was wondering if you have figured all of this out. I am running into the same problem. I am trying to figure out how to get around the gdbm library problem. ---Original Message--- From: Yang Xiao [EMAIL PROTECTED] Subject: RE: JK2 JNI link bug [Was: Re: Apache2+Jk2+Tomcat5] Sent: 13 Apr 2004 19:09:42 Hem, unfortunately, I tried that, which worked, but then tomcat complains about another XML library not being linked. I'm building Apache from scratch now... please help. Yang -Original Message- From: Nikola Milutinovic [mailto:[EMAIL PROTECTED] Sent: Tuesday, April 13, 2004 3:02 PM To: Tomcat Users List Subject: Re: JK2 JNI link bug [Was: Re: Apache2+Jk2+Tomcat5] Yang Xiao wrote: Hi, Thanks for the help I went back and modified the Makefile with all 3 libraries as you have said, recompiled and now I'm getting a different error: INFO: APR not loaded, disabling jni components: java.io.IOException: java.lang.UnsatisfiedLinkError: /usr/local/apache/modules/libjkjni.so: /usr/local/apache/lib/libaprutil-0.so.0: undefined symbol: gdbm_errno I'm not too good with C library programming, so can you help to explain what this is? Ugh, looks like there is another link dependency. libaprutil wants a link to GDBM library. Try to locate something looking like /usr/lib/lib*dbm* and add that to Makefile, without leading lib, like this -ldbm. Nix. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] ---Original Message---
Re: Accessing Dll's
armalai_uk wrote: Hi., This code has been written in JDK 1.3.0_03 couple of years back and i implemented in JRun 3.1 Now i'm trying to use this same code in Tomcat 4.1 with J2SDK 1.4.2_03. According to your previos mail i understand that i have to rewrite the code using J2SDK 1.4.2 specifications. Is it correct? Can you please give me the steps that i have to do inorder to make my code compatible to 1.4.2.. Thanks., MALAI - Original Message - From: Wade Chandler [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Friday, April 23, 2004 12:52 AM Subject: Re: Accessing Dll's Wade Chandler wrote: Annamalai Ramasamy wrote: Hi., Yes,I did see my dll path using this line. Thanks., MALAI Ryan Lissack [EMAIL PROTECTED] wrote: Hi, Execute the following : System.out.println(System.getProperty(java.library.path)); See what directories are there. If the one(s) with your DLL(s) are not listed you can add them as a startup param to the VM using the -D option (java -Djava.library.path=.) HTH Regards, Ryan. -Original Message- From: Annamalai Ramasamy [mailto:[EMAIL PROTECTED] Sent: 22 April 2004 16:33 To: Tomcat Users List Subject: RE: Accessing Dll's Hi., Check my below java code. I do not have native source codes. I'm sure there is no version conflicts. But i have copied the dll in more than one places..like winnt, system32 and jre/bin like that. any idea? public class AddressValidate { private Address inad; private Address outad; private String usercompany; public StringBuffer csReturnErrorMsg; public StringBuffer csReturnStreet; public StringBuffer csReturnCityName; public StringBuffer csReturnCounty; public StringBuffer csReturnState; public StringBuffer csReturnZip; //To load DLL AvsWebInrterface static{ try{ System.loadLibrary(AvsWebInterface); System.out.println(DLL Loaded); }catch(Exception e){ System.err.println(Could not load DLL \AvsWebInterface \ : +e.toString()); System.out.println(Could not load DLL \AvsWebInterface \ : +e.toString()); }catch(Throwable e){ System.err.println(Could not load DLL \AvsWebInterface:\ +e.toString()); System.out.println(Could not load DLL \AvsWebInterface:\ +e.toString()); } } //end of static //-- - //Native method implemented in cpp public native String JAVAAVSValidate (String company, String street1, String city, String state, String zip, StringBuffer csReturnStreet, StringBuffer csReturnCityName, StringBuffer csReturnCounty, StringBuffer csReturnState, StringBuffer csReturnZip, StringBuffer csReturnErrorMsg) ; //-- - public AddressValidate(){ inad=null; outad=null; usercompany=new String(); } //-- - public String validate (Address inad,Address outad){ csReturnStreet=new StringBuffer(); csReturnCityName=new StringBuffer(); csReturnCounty=new StringBuffer(); csReturnState=new StringBuffer(); csReturnZip=new StringBuffer(); csReturnErrorMsg=new StringBuffer(); this.inad=inad; this.outad=outad; try{ // System.out.println(Street1 :+inad.Street1); // System.out.println(city :+inad.City); // System.out.println(state :+inad.State); // System.out.println(postalcode+inad.PostalCode); JAVAAVSValidate (usercompany, inad.Street1, inad.City, inad.State, inad.PostalCode, csReturnStreet, csReturnCityName, csReturnCounty, csReturnState, csReturnZip, csReturnErrorMsg); outad.Street1 = csReturnStreet.toString(); outad.City = csReturnCityName.toString(); outad.County = csReturnCounty.toString(); outad.State = csReturnState.toString(); outad.PostalCode = csReturnZip.toString(); // System.out.println(Street1 :+outad.Street1); // System.out.println(city :+outad.City); // System.out.println(state :+outad.State); // System.out.println(postalcode+outad.PostalCode); }catch(Exception e){ System.out.println(Error in Validating Address + e.toString()); } return (csReturnErrorMsg.toString()); } } Peter Guyatt wrote: Hi There, Can I see you native code and your class that declares you native methods. Thanks Pete -Original Message- From: Mark Schmeets [mailto:[EMAIL PROTECTED] Sent: 22 April 2004 16:13 To: Tomcat Users List Subject: Re: Accessing Dll's Hi, Is it possible that this dll is being loaded somewhere else in your instance? My experience with this error came from trying to use the Oracle native JDBC drivers. It usually came down to one of three issues, first that the dll couldn't be found, second that another web-app had already loaded it, third it was a dll versioning problem. Hope it helps. Mark Annamalai Ramasamy wrote: Hi., Again same error. I did put the dll to /jre/bin and winnt/system32. Any other ideas please... Thanks., MALAI Hans Wichman wrote: sorry, i meant lib\bin\ instead of lib\ext\ grtz Sorv At 03:43 PM 4/22/2004 +0100, Annamalai Ramasamy wrote: Hi., Again Same Error.. Actually after the
Re: Accessing Dll's
Wade Chandler wrote: armalai_uk wrote: Hi., This code has been written in JDK 1.3.0_03 couple of years back and i implemented in JRun 3.1 Now i'm trying to use this same code in Tomcat 4.1 with J2SDK 1.4.2_03. According to your previos mail i understand that i have to rewrite the code using J2SDK 1.4.2 specifications. Is it correct? Can you please give me the steps that i have to do inorder to make my code compatible to 1.4.2.. Thanks., MALAI - Original Message - From: Wade Chandler [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Friday, April 23, 2004 12:52 AM Subject: Re: Accessing Dll's Wade Chandler wrote: Annamalai Ramasamy wrote: Hi., Yes,I did see my dll path using this line. Thanks., MALAI Ryan Lissack [EMAIL PROTECTED] wrote: Hi, Execute the following : System.out.println(System.getProperty(java.library.path)); See what directories are there. If the one(s) with your DLL(s) are not listed you can add them as a startup param to the VM using the -D option (java -Djava.library.path=.) HTH Regards, Ryan. -Original Message- From: Annamalai Ramasamy [mailto:[EMAIL PROTECTED] Sent: 22 April 2004 16:33 To: Tomcat Users List Subject: RE: Accessing Dll's Hi., Check my below java code. I do not have native source codes. I'm sure there is no version conflicts. But i have copied the dll in more than one places..like winnt, system32 and jre/bin like that. any idea? public class AddressValidate { private Address inad; private Address outad; private String usercompany; public StringBuffer csReturnErrorMsg; public StringBuffer csReturnStreet; public StringBuffer csReturnCityName; public StringBuffer csReturnCounty; public StringBuffer csReturnState; public StringBuffer csReturnZip; //To load DLL AvsWebInrterface static{ try{ System.loadLibrary(AvsWebInterface); System.out.println(DLL Loaded); }catch(Exception e){ System.err.println(Could not load DLL \AvsWebInterface \ : +e.toString()); System.out.println(Could not load DLL \AvsWebInterface \ : +e.toString()); }catch(Throwable e){ System.err.println(Could not load DLL \AvsWebInterface:\ +e.toString()); System.out.println(Could not load DLL \AvsWebInterface:\ +e.toString()); } } //end of static //-- - //Native method implemented in cpp public native String JAVAAVSValidate (String company, String street1, String city, String state, String zip, StringBuffer csReturnStreet, StringBuffer csReturnCityName, StringBuffer csReturnCounty, StringBuffer csReturnState, StringBuffer csReturnZip, StringBuffer csReturnErrorMsg) ; //-- - public AddressValidate(){ inad=null; outad=null; usercompany=new String(); } //-- - public String validate (Address inad,Address outad){ csReturnStreet=new StringBuffer(); csReturnCityName=new StringBuffer(); csReturnCounty=new StringBuffer(); csReturnState=new StringBuffer(); csReturnZip=new StringBuffer(); csReturnErrorMsg=new StringBuffer(); this.inad=inad; this.outad=outad; try{ // System.out.println(Street1 :+inad.Street1); // System.out.println(city :+inad.City); // System.out.println(state :+inad.State); // System.out.println(postalcode+inad.PostalCode); JAVAAVSValidate (usercompany, inad.Street1, inad.City, inad.State, inad.PostalCode, csReturnStreet, csReturnCityName, csReturnCounty, csReturnState, csReturnZip, csReturnErrorMsg); outad.Street1 = csReturnStreet.toString(); outad.City = csReturnCityName.toString(); outad.County = csReturnCounty.toString(); outad.State = csReturnState.toString(); outad.PostalCode = csReturnZip.toString(); // System.out.println(Street1 :+outad.Street1); // System.out.println(city :+outad.City); // System.out.println(state :+outad.State); // System.out.println(postalcode+outad.PostalCode); }catch(Exception e){ System.out.println(Error in Validating Address + e.toString()); } return (csReturnErrorMsg.toString()); } } Peter Guyatt wrote: Hi There, Can I see you native code and your class that declares you native methods. Thanks Pete -Original Message- From: Mark Schmeets [mailto:[EMAIL PROTECTED] Sent: 22 April 2004 16:13 To: Tomcat Users List Subject: Re: Accessing Dll's Hi, Is it possible that this dll is being loaded somewhere else in your instance? My experience with this error came from trying to use the Oracle native JDBC drivers. It usually came down to one of three issues, first that the dll couldn't be found, second that another web-app had already loaded it, third it was a dll versioning problem. Hope it helps. Mark Annamalai Ramasamy wrote: Hi., Again same error. I did put the dll to /jre/bin and winnt/system32. Any other ideas please... Thanks., MALAI Hans Wichman wrote: sorry, i meant lib\bin\ instead of lib\ext\ grtz Sorv At 03:43 PM 4/22/2004 +0100, Annamalai Ramasamy wrote: Hi.,
A word of caution upgrading Tomcat
I hate to open a can of worms, but I see no other choice. Something needs to be done about features that appear and disappear seemingly randomly between versions. Here are a few examples. Despite what the documentation says (which may or may not be accurate), these features really worked, and now don't. In TC 4.0.4, you could put Resource and ResourceParams directives in a DefaultContext. This is no longer true in TC4.1.24, and you are forced to put the Resource stuff in GlobalNamingResources, despite what the documentation said (and still says) in http://jakarta.apache.org/tomcat/tomcat-4.1-doc/config/defaultcontext.html In addition, in 4.1.24 you could put context descriptors (XML files describing your context) in the appBase of your Host, and they would load. In TC5.0.19 that feature has been removed, and you must now use META-INF or [Catalina_home]/conf/Engine/Host. I've verified this in the code. I beleive that TC5 was branched at 4.1.7. If this feature was added post 4.1.7, why did it not get integrated into the 5.0 tree? How many other post 4.1.7 features/bug fixes have been left out? No one seems to care about these loss of features. For the second loss of functionality above, I entered a bug in bugzilla which was promptly closed and I was told to RTFM. I did RTFM, and while it is confusing, it does indirectly say I can no longer do what I could in 4.1.24 (by telling me what I CAN do). No mention of this feature's deprecation or any reason why (even after I asked). Forgive me for not wanting to change my current structure, especcially since I don't see any reason why it would change. I suppose I'll be flamed for complaining about a free product, but the Apache organization, of which Tomcat is a member, is known for high quailty open-source development. These missteps seem very out of character, and I think the development team should address them, I hope that I'm not a lone in my feelings here. If I am, I'll gladly crawl back into my hole and mumble under my breath, and perhaps consider another JSP/Servlet container. Thanks for listening, John - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Accessing Dll's
Hi Wade., Thank you very much! I can pass the System.loadlibrary method...while calling my method only i'm getting error. Actually i did copy the dill to winnt/system32 and jre/bin folder. Dll accessing java code i recompiled with new jdk. So i'm in right way right? what will be issue in my case.. Thanks., MALAI - Original Message - From: Wade Chandler [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Friday, April 23, 2004 2:37 PM Subject: Re: Accessing Dll's Wade Chandler wrote: armalai_uk wrote: Hi., This code has been written in JDK 1.3.0_03 couple of years back and i implemented in JRun 3.1 Now i'm trying to use this same code in Tomcat 4.1 with J2SDK 1.4.2_03. According to your previos mail i understand that i have to rewrite the code using J2SDK 1.4.2 specifications. Is it correct? Can you please give me the steps that i have to do inorder to make my code compatible to 1.4.2.. Thanks., MALAI - Original Message - From: Wade Chandler [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Friday, April 23, 2004 12:52 AM Subject: Re: Accessing Dll's Wade Chandler wrote: Annamalai Ramasamy wrote: Hi., Yes,I did see my dll path using this line. Thanks., MALAI Ryan Lissack [EMAIL PROTECTED] wrote: Hi, Execute the following : System.out.println(System.getProperty(java.library.path)); See what directories are there. If the one(s) with your DLL(s) are not listed you can add them as a startup param to the VM using the -D option (java -Djava.library.path=.) HTH Regards, Ryan. -Original Message- From: Annamalai Ramasamy [mailto:[EMAIL PROTECTED] Sent: 22 April 2004 16:33 To: Tomcat Users List Subject: RE: Accessing Dll's Hi., Check my below java code. I do not have native source codes. I'm sure there is no version conflicts. But i have copied the dll in more than one places..like winnt, system32 and jre/bin like that. any idea? public class AddressValidate { private Address inad; private Address outad; private String usercompany; public StringBuffer csReturnErrorMsg; public StringBuffer csReturnStreet; public StringBuffer csReturnCityName; public StringBuffer csReturnCounty; public StringBuffer csReturnState; public StringBuffer csReturnZip; //To load DLL AvsWebInrterface static{ try{ System.loadLibrary(AvsWebInterface); System.out.println(DLL Loaded); }catch(Exception e){ System.err.println(Could not load DLL \AvsWebInterface \ : +e.toString()); System.out.println(Could not load DLL \AvsWebInterface \ : +e.toString()); }catch(Throwable e){ System.err.println(Could not load DLL \AvsWebInterface:\ +e.toString()); System.out.println(Could not load DLL \AvsWebInterface:\ +e.toString()); } } //end of static //-- - //Native method implemented in cpp public native String JAVAAVSValidate (String company, String street1, String city, String state, String zip, StringBuffer csReturnStreet, StringBuffer csReturnCityName, StringBuffer csReturnCounty, StringBuffer csReturnState, StringBuffer csReturnZip, StringBuffer csReturnErrorMsg) ; //-- - public AddressValidate(){ inad=null; outad=null; usercompany=new String(); } //-- - public String validate (Address inad,Address outad){ csReturnStreet=new StringBuffer(); csReturnCityName=new StringBuffer(); csReturnCounty=new StringBuffer(); csReturnState=new StringBuffer(); csReturnZip=new StringBuffer(); csReturnErrorMsg=new StringBuffer(); this.inad=inad; this.outad=outad; try{ // System.out.println(Street1 :+inad.Street1); // System.out.println(city :+inad.City); // System.out.println(state :+inad.State); // System.out.println(postalcode+inad.PostalCode); JAVAAVSValidate (usercompany, inad.Street1, inad.City, inad.State, inad.PostalCode, csReturnStreet, csReturnCityName, csReturnCounty, csReturnState, csReturnZip, csReturnErrorMsg); outad.Street1 = csReturnStreet.toString(); outad.City = csReturnCityName.toString(); outad.County = csReturnCounty.toString(); outad.State = csReturnState.toString(); outad.PostalCode = csReturnZip.toString(); // System.out.println(Street1 :+outad.Street1); // System.out.println(city :+outad.City); // System.out.println(state :+outad.State); // System.out.println(postalcode+outad.PostalCode); }catch(Exception e){ System.out.println(Error in Validating Address + e.toString()); } return (csReturnErrorMsg.toString()); } } Peter Guyatt wrote: Hi There, Can I see you native code and your class that declares you native
RE: tomcat 5 and cgi-bin
Prior to 5.0.17, the cgi executable was hardcoded to perl. From 5.0.17 onwards this is configurable. For example, if you wanted to use XXXapp as the perl executable, edit conf/web.xml to look something this: servlet servlet-namecgi/servlet-name servlet-classorg.apache.catalina.servlets.CGIServlet/servlet-class init-param param-nameclientInputTimeout/param-name param-value100/param-value /init-param init-param param-namedebug/param-name param-value6/param-value /init-param init-param param-namecgiPathPrefix/param-name param-valueWEB-INF/cgi/param-value /init-param init-param param-nameexecutable/param-name param-valueXXXapp/param-value /init-param load-on-startup5/load-on-startup /servlet servlet-mapping servlet-namecgi/servlet-name url-pattern/cgi-bin/*/url-pattern /servlet-mapping Alternatively you can put this in the web.xml for you web app. Note that XXXapp must be on your path. Mark From: zhicheng wang [mailto:[EMAIL PROTECTED] i am trying to upgrade our server to t5, but the cgi-bin now only allows perl programs to be executed (by default). for compiled c or c++ etc, how do i modify the web.xml? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: servlet.http?
Depends on your compiler. Look on the docs for how to set the classpath for the compilier and ensure that all the necessary jar files are included. Mark -Original Message- From: Kalin Mintchev [mailto:[EMAIL PROTECTED] Sent: Friday, April 23, 2004 9:03 AM To: [EMAIL PROTECTED] Subject: servlet.http? hi all... this is my first question on this list so please be gentle... i'm trying to use a servlet that talks to a j2me application on some cell phone. the thing is when i try to compile the code on the server machine (i put it under the tomcat's servlet examples) i get an error that i have the clases in the HTTP servlet package missing. i found them (after downloading them again) in the server's java source. my question is where should i put them so the compiler can finde them and compile the servlet? it turns out there are a lot of servlet src folders.. thanks - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Init parameters in default context
-Original Message- From: Keith Hankin [mailto:[EMAIL PROTECTED] I am trying to specify init context parameters in the default context in server.xml as follows: Context path= docBase=ROOT debug=0 Parameter name=configDir value=C:\config override=false/ /Context This is the ROOT context, not the default context. Hence your parameter will only be available in the root context. This prints out: configDir = null rather than configDir = C:\config as I would expect. It only works if I specify the parameter in a more specific context as follows: Context path=/mycontext docBase=/mycontext debug=0 Parameter name=configDir value=C:\config override=false/ /Context I have tried this with Tomcat 4.1.30 and 5.0.19 with the same results. Mark - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
JSP Development settings with Tomcat5
Is it possible to deploy from a war file using the deployer, but then have in-place JSP modifications detected and re-compiled dynamically? I have been unable to achieve this. I have searched the archives, read the doc and find nothing about what the recommended development setup is for doing active JSP development. I have an ant build, but do not want to run it for every single JSP tweak I make. I have played with the jasper settings: init-param param-namedevelopment/param-name param-valuetrue/param-value /init-param init-param param-namereloading/param-name param-valuetrue/param-value /init-param init-param param-namecheckInterval/param-name param-value10/param-value /init-param Still if I deploy from a war file, it ignores any changes I make under the webapps directory. I even tried deleting the generated .java and .class files under the work directory, thinking that would force it to recompile. Now way, just an error. If I just copy the webapp directory under %CATALINA_HOME%/webapps and place the context file under %CATALINA_HOME%/conf/Catalina/localhost then it will notice any JSP changes and re-compile. But of course all pages that I access have to be compiled as I hit them. The deployer app seems to be much more efficient at compiling all of the JSP pages, plus I can be doing something else while it is running. Thank you in advance - Richard - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: TC5 java mail woes
javax.activation in both by webapp lib directory and common/lib don't put the same class file in two different locations to be loaded by two different classloaders. remove it from webapp/lib and keep it only in common/lib, and try again filip -Original Message- From: Mark Lowe [mailto:[EMAIL PROTECTED] Sent: Friday, April 23, 2004 10:42 AM To: Tomcat Users List Subject: TC5 java mail woes Hello After posting this problem yesterday I went away and assumed that the problem must be the consequence of my IQ deficit and/or all crack smoking.. Before I start , yes I have the java mail 1.31 and a recent copy of javax.activation in both by webapp lib directory and common/lib I added the context in the relevant place in sever.xml Context path=/acme-mail docBase=acme-mail debug=9 reloadable=true crossContext=true Logger className=org.apache.catalina.logger.FileLogger prefix=acme-mail. suffix=.log timestamp=true/ Resource name=mail/Session auth=Container type=javax.mail.Session/ ResourceParams name=mail/Session parameter namemail.smtp.host/name valueout.aliceposta.it/value /parameter /ResourceParams /Context i also tried Resource name=mail/Session auth=Container type=javax.mail.Session/ ResourceParams name=mail/Session parameter namemail.smtp.host/name valueout.aliceposta.it/value /parameter /ResourceParams nested in GlobalNamingResources because it seemed a really cool thing to do at the time and i wanted to impress my friends. in acme-mail (the webapp) web.xml resource-ref description/description res-ref-namemail/Session/res-ref-name res-typejavax.mail.Session/res-type res-authContainer/res-auth /resource-ref after the taglib declarations as specified by the dtd http://java.sun.com/j2ee/dtds/web-app_2_2.dtd when i try to grab the mail session i get this.. java.lang.NoClassDefFoundError: javax/activation/DataSource point to the line where i try and feed session to the mime message constructor. Context initCtx = new InitialContext(); Context envCtx = (Context) initCtx.lookup(java:comp/env); Session mailSession = (Session) envCtx.lookup(mail/Session); Message msg = new MimeMessage(mailSession); Has no body had this problem? Mark - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.665 / Virus Database: 428 - Release Date: 4/21/2004 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.665 / Virus Database: 428 - Release Date: 4/21/2004 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
FOUND VIRUS IN MAIL from tomcat-user@jakarta.apache.org to ansta@nspoint.net
V I R U S A L E R T Our viruschecker found a VIRUS in your email to [EMAIL PROTECTED]. We stopped delivery of this email! Now it is on you to check your system for viruses In file: /usr/local/mav/basedir/i3NJmf7n010239/i3NJmf7n010239 Found the W32/Netsky.s.eml!exe virus !!! /usr/local/mav/basedir/i3NJmf7n010239/contact_list8.pif Found the W32/[EMAIL PROTECTED] virus !!! For your reference, here are the headers from your email: - BEGIN HEADERS - Received: from bgas7-016.ptt.yu [213.137.121.16] by pluton.nspoint.net [195.252.123.15] with SMTP id i3NJmf7n010239; Fri Apr 23 21:48:53 2004 +0200 From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: Re: Approved Date: Fri, 23 Apr 2004 21:48:50 +0200 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary==_NextPart_000_0016=_NextPart_000_0016 X-Priority: 3 X-MSMail-Priority: Normal -- END HEADERS -- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Please Help (Tomcat 4.1.30)!
I load my application from SunOne Web server to Tomcat (4.1.30). After starting Tomcat, I issued the URL http://localhost:8080/gmemd, I got the first page without all the images. Clicked the login, I got 404 error: requested resources (/servlet/Login) is not available. Here is part of the web.xml: servlet-mapping servlet-nameinvoker/servlet-name url-pattern/servlet/*/url-pattern /servlet-mapping Here is the part of the tomcat server.xml: Context path=/gmemd docBase=gmemd debug=0 reloadable=true crossContext=false Logger className=org.apache.catalina.logger.FileLogger prefix=localhost_gmemd_log. suffix=.txt timestamp=true/ /Context Here is the file structure: Webapps\gmemd Webapps\gmemd\en\home\index.jsp Webapps\gmemd\images\ Webapps\gmemd\web-inf\classes\Login.class Webapps\gmemd\web-inf\lib\. Under gmemd, there is a welcome page (index.jsp) which forwards the request to en\home\index.jsp. Here is part of the en\home\index.jsp that references the images and calls the login servelet: td a href=/en/company/careers/index.htm img name=toolbar_c2 src=/images/c2.gif width=57 height=20 border=0 /a /td td a href=/servlet/Loginimg name=toolbar1 src=/images/toolbar1.gif width=45 height=20 border=0/a /td td img src=/images/spacer.gif width=1 height=20 border=0 name=undefined_2 /td By the way, the application runs under SunOne Web Server 6.0 without problems. I am sure I must have missed something. When I checked the Tomcat examples, whatever examples are clicked, on the query string URL, I can see localhost:8080/examples be prefixed to all the URLs. Not in my application. I did not see localhost:8080/gmemd be any part of the URL. I manually prefixed the href and src attributes in the jsp with /gmemd/, my page now displays the images, but servlet still not being found. Even though my gmemd context (folder) has the same properties as examples context (folder), when I stopped the tomcat, and checked the log file, I got this: 2004-04-23 10:34:25 StandardContext[/gmemd]: Resources start failed: java.lang.IllegalArgumentException: Document base ..\webapps\gmemd does not exist or is not a readable directory at org.apache.naming.resources.FileDirContext.setDocBase(FileDirContext.java:193) at org.apache.catalina.core.StandardContext.resourcesStart(StandardContext.java:3349) at org.apache.catalina.core.StandardContext.start(StandardContext.java:3479) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188) at org.apache.catalina.core.StandardHost.start(StandardHost.java:754) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:363) at org.apache.catalina.core.StandardService.start(StandardService.java:497) at org.apache.catalina.core.StandardServer.start(StandardServer.java:2190) at org.apache.catalina.startup.Catalina.start(Catalina.java:512) at org.apache.catalina.startup.Catalina.execute(Catalina.java:400) at org.apache.catalina.startup.Catalina.process(Catalina.java:180) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203) Please help! Qin This is a PRIVATE message. If you are not the intended recipient, please delete without copying and kindly advise us by e-mail of the mistake in delivery. NOTE: Regardless of content, this e-mail shall not operate to bind CSC to any order or other contract unless pursuant to explicit written agreement or government initiative expressly permitting the use of e-mail for such purpose. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomcat stops loading when I run my servlet with load-on-startup
I have a servlet which calls a method on itself to poll a directory for XML files. When one is found, another method (read() is called which then creates a SAX parser and attempts to validate the file against an XML schema. Upon calling the parse() method, Tomcat freezes. It doesn't create or write to a log, and nothing else starts up. Nothing is accessible on port 8080, because Tomcat doesn't make it to the point where it mounts that port. When I remove the load-on-startup from this particular app's web.xml, Tomcat completes its startup process and things are accessible. I can then reintroduce the load-on-startup to the web.xml and Tomcat will automatically kick off the servlet. This time nothing freezes, and the program runs as it is supposed to. My program is attempting to validate this XML file against a schema which is accessible locally on port 8080. But that port is prevented from becoming available, so the program will just wait forever. My question is, how can I prevent my servlet from starting up until after Tomcat has completed its startup procedure? I've specified higher numbers in the load-on-startup element, but to no avail. Thanks for any help you can offer. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: TC5 java mail woes
Yeah .. sure thanks.. On 23 Apr 2004, at 21:24, Filip Hanik ((lists)) wrote: javax.activation in both by webapp lib directory and common/lib don't put the same class file in two different locations to be loaded by two different classloaders. remove it from webapp/lib and keep it only in common/lib, and try again filip -Original Message- From: Mark Lowe [mailto:[EMAIL PROTECTED] Sent: Friday, April 23, 2004 10:42 AM To: Tomcat Users List Subject: TC5 java mail woes Hello After posting this problem yesterday I went away and assumed that the problem must be the consequence of my IQ deficit and/or all crack smoking.. Before I start , yes I have the java mail 1.31 and a recent copy of javax.activation in both by webapp lib directory and common/lib I added the context in the relevant place in sever.xml Context path=/acme-mail docBase=acme-mail debug=9 reloadable=true crossContext=true Logger className=org.apache.catalina.logger.FileLogger prefix=acme-mail. suffix=.log timestamp=true/ Resource name=mail/Session auth=Container type=javax.mail.Session/ ResourceParams name=mail/Session parameter namemail.smtp.host/name valueout.aliceposta.it/value /parameter /ResourceParams /Context i also tried Resource name=mail/Session auth=Container type=javax.mail.Session/ ResourceParams name=mail/Session parameter namemail.smtp.host/name valueout.aliceposta.it/value /parameter /ResourceParams nested in GlobalNamingResources because it seemed a really cool thing to do at the time and i wanted to impress my friends. in acme-mail (the webapp) web.xml resource-ref description/description res-ref-namemail/Session/res-ref-name res-typejavax.mail.Session/res-type res-authContainer/res-auth /resource-ref after the taglib declarations as specified by the dtd http://java.sun.com/j2ee/dtds/web-app_2_2.dtd when i try to grab the mail session i get this.. java.lang.NoClassDefFoundError: javax/activation/DataSource point to the line where i try and feed session to the mime message constructor. Context initCtx = new InitialContext(); Context envCtx = (Context) initCtx.lookup(java:comp/env); Session mailSession = (Session) envCtx.lookup(mail/Session); Message msg = new MimeMessage(mailSession); Has no body had this problem? Mark - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.665 / Virus Database: 428 - Release Date: 4/21/2004 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.665 / Virus Database: 428 - Release Date: 4/21/2004 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Apache not sending the requested URL to Tomcat...
Thanks for the suggestions. I ended up following this document: http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jk2/jk2/vhosthowto.html And everything is working just fine now. request.getServerName() returns the aliased domains and the main domain as appropriate. I'm going to compare the conf files on my local machine (where I got it to work) and the production server soon and post what the configuration difference was back to the user list. - Kurt - Original Message - From: Malathi Jivan [EMAIL PROTECTED] To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Friday, April 23, 2004 12:02 PM Subject: RE: Apache not sending the requested URL to Tomcat... Could someone please send me steps on how to do this? Connecting apache and tomcat using virutal host settings seems to be exactly what I need. I really dont care about mutiple virtual hosts at this point so instructions for just one are fine. Thanks for your help in advance, Malathi From: Mike Curwen [EMAIL PROTECTED] Reply-To: Tomcat Users List [EMAIL PROTECTED] To: 'Tomcat Users List' [EMAIL PROTECTED] Subject: RE: Apache not sending the requested URL to Tomcat... Date: Fri, 23 Apr 2004 11:53:46 -0500 I've wondered about this as well, and perhaps this is what you need:? http://httpd.apache.org/docs/mod/core.html#usecanonicalname I have a production app that depends on the behaviour you want changed (my tomcat app depends on ServerName being passed for all requests through ServerAlias), but it seemed to me there must be a way to switch this in Apache. -Original Message- From: Kurt [mailto:[EMAIL PROTECTED] Sent: Friday, April 23, 2004 11:01 AM To: [EMAIL PROTECTED] Subject: Apache not sending the requested URL to Tomcat... In Apache I have VHosting setup so that multiple domains all share the same pub directory. In Tomcat I have VHosting setup so that multiple domains all share a single web application INSTANCE When I have Apache pass requests to Tomcat, only the domain specified in the ServerName attribute of the Apache VHost config gets passed to Tomcat, even though I'm accessing the site under one of the domains specified in a ServerAlias attribute. i.e. I type in www.otherdomain.com/showServerName.jsp in my browser and the value displayed is www.domain.com NOT www.otherdomain.com How do I get it to display www.otherdomain.com? I need to be able to tell which domain the user has typed into their browser. I have tried request.getRequestURL and this also returns www.domain.com. I am grateful for any assistance. Example Config.. In Apache. VirtualHost 127.0.0.2 ServerName www.domain.com ServerAlias www.otherdomain.com .. /VirtualHost In Tomcat Host name=www.domain.com debug=0 appBase=/webs/MyWebApp unpackWARs=true autoDeploy=true Aliaswww.otherdomain.com/Alias Aliaswww.anotherdomain.com/Alias ... /Host My Environment Apache 2 Tomcat 4.1.24 RH Linux 7.x I have tried setting up multiple VHost entries in Apache, but then I received an error that Tomcat couldn't find the mapping to .do (I'm using Struts, but it didn't work for JSPs either) for all domains EXCEPT the domain in the name attribute of the Host tag in the Tomcat config file. It did serve static files from within the pub directory just fine. Maybe I wasn't doing things right when I tried this, but I hope somebody can provide me with the right way to do this, or an alternative that works. i.e. In Apache VirtualHost 127.0.0.2 ServerName www.domain.com .. /VirtualHost VirtualHost 127.0.0.2 ServerName www.otherdomain.com .. /VirtualHost Again, I am grateful for any assistance. Kurt Bonnet [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ FREE pop-up blocking with the new MSN Toolbar - get it now! http://toolbar.msn.com/go/onm00200415ave/direct/01/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Accessing Dll's
armalai_uk wrote: Hi Wade., Thank you very much! I can pass the System.loadlibrary method...while calling my method only i'm getting error. Actually i did copy the dill to winnt/system32 and jre/bin folder. Dll accessing java code i recompiled with new jdk. So i'm in right way right? what will be issue in my case.. Thanks., MALAI - Original Message - From: Wade Chandler [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Friday, April 23, 2004 2:37 PM Subject: Re: Accessing Dll's Wade Chandler wrote: armalai_uk wrote: Hi., This code has been written in JDK 1.3.0_03 couple of years back and i implemented in JRun 3.1 Now i'm trying to use this same code in Tomcat 4.1 with J2SDK 1.4.2_03. According to your previos mail i understand that i have to rewrite the code using J2SDK 1.4.2 specifications. Is it correct? Can you please give me the steps that i have to do inorder to make my code compatible to 1.4.2.. Thanks., MALAI - Original Message - From: Wade Chandler [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Friday, April 23, 2004 12:52 AM Subject: Re: Accessing Dll's Wade Chandler wrote: Annamalai Ramasamy wrote: Hi., Yes,I did see my dll path using this line. Thanks., MALAI Ryan Lissack [EMAIL PROTECTED] wrote: Hi, Execute the following : System.out.println(System.getProperty(java.library.path)); See what directories are there. If the one(s) with your DLL(s) are not listed you can add them as a startup param to the VM using the -D option (java -Djava.library.path=.) HTH Regards, Ryan. -Original Message- From: Annamalai Ramasamy [mailto:[EMAIL PROTECTED] Sent: 22 April 2004 16:33 To: Tomcat Users List Subject: RE: Accessing Dll's Hi., Check my below java code. I do not have native source codes. I'm sure there is no version conflicts. But i have copied the dll in more than one places..like winnt, system32 and jre/bin like that. any idea? public class AddressValidate { private Address inad; private Address outad; private String usercompany; public StringBuffer csReturnErrorMsg; public StringBuffer csReturnStreet; public StringBuffer csReturnCityName; public StringBuffer csReturnCounty; public StringBuffer csReturnState; public StringBuffer csReturnZip; //To load DLL AvsWebInrterface static{ try{ System.loadLibrary(AvsWebInterface); System.out.println(DLL Loaded); }catch(Exception e){ System.err.println(Could not load DLL \AvsWebInterface \ : +e.toString()); System.out.println(Could not load DLL \AvsWebInterface \ : +e.toString()); }catch(Throwable e){ System.err.println(Could not load DLL \AvsWebInterface:\ +e.toString()); System.out.println(Could not load DLL \AvsWebInterface:\ +e.toString()); } } //end of static //-- - //Native method implemented in cpp public native String JAVAAVSValidate (String company, String street1, String city, String state, String zip, StringBuffer csReturnStreet, StringBuffer csReturnCityName, StringBuffer csReturnCounty, StringBuffer csReturnState, StringBuffer csReturnZip, StringBuffer csReturnErrorMsg) ; //-- - public AddressValidate(){ inad=null; outad=null; usercompany=new String(); } //-- - public String validate (Address inad,Address outad){ csReturnStreet=new StringBuffer(); csReturnCityName=new StringBuffer(); csReturnCounty=new StringBuffer(); csReturnState=new StringBuffer(); csReturnZip=new StringBuffer(); csReturnErrorMsg=new StringBuffer(); this.inad=inad; this.outad=outad; try{ // System.out.println(Street1 :+inad.Street1); // System.out.println(city :+inad.City); // System.out.println(state :+inad.State); // System.out.println(postalcode+inad.PostalCode); JAVAAVSValidate (usercompany, inad.Street1, inad.City, inad.State, inad.PostalCode, csReturnStreet, csReturnCityName, csReturnCounty, csReturnState, csReturnZip, csReturnErrorMsg); outad.Street1 = csReturnStreet.toString(); outad.City = csReturnCityName.toString(); outad.County = csReturnCounty.toString(); outad.State = csReturnState.toString(); outad.PostalCode = csReturnZip.toString(); // System.out.println(Street1 :+outad.Street1); // System.out.println(city :+outad.City); // System.out.println(state :+outad.State); // System.out.println(postalcode+outad.PostalCode); }catch(Exception e){ System.out.println(Error in Validating Address + e.toString()); } return (csReturnErrorMsg.toString()); } } Peter Guyatt wrote: Hi There, Can I see you native code and your class that declares you native methods. Thanks Pete -Original Message- From: Mark Schmeets [mailto:[EMAIL PROTECTED] Sent: 22 April 2004 16:13 To: Tomcat Users List Subject: Re: Accessing Dll's Hi, Is it possible that this dll is being loaded somewhere else in your instance? My experience with this error came from
Re: A word of caution upgrading Tomcat
John, I am in no way an expert on Tomcat, but I do know that some things are driven by the spec and not the developers. I am also sure that some things have come and gone in versions. For feature one, I would submit a bug report on the documentation, not the software, and outline in detail as you have here. Some of the documentation is carried over from previous versions and fails to get updated when changes occur. Simply ask that a notation be added that the feature no longer functions after a certain version. Minor notes are often acted upon quicker than a major rewrite. As for feature two, this is a spec issue. To support 2.4 this feature was added. As for removal of the other feature I can only guess why it no longer remains, but my money would be on, its not by spec and thus Tomcat specific. It has been noted on the list several times that there are features that are not per spec and may be removed at any time. So the safe way to do things is to follow the spec. When one likes to be on the bleeding edge, one must be prepared to bleed at times. I do not mean to flame you in any way. Only to share my opinion. But, if you do consider a different package, you will still have to change your structure, because the other package will not support it either. Read the spec, feel the spec, be the spec. If you find something that does not follow the spec then, by all means let 'em have it! IMHO Delete at will. Doug - Original Message - From: John H [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Friday, April 23, 2004 2:37 PM Subject: A word of caution upgrading Tomcat I hate to open a can of worms, but I see no other choice. Something needs to be done about features that appear and disappear seemingly randomly between versions. Here are a few examples. Despite what the documentation says (which may or may not be accurate), these features really worked, and now don't. In TC 4.0.4, you could put Resource and ResourceParams directives in a DefaultContext. This is no longer true in TC4.1.24, and you are forced to put the Resource stuff in GlobalNamingResources, despite what the documentation said (and still says) in http://jakarta.apache.org/tomcat/tomcat-4.1-doc/config/defaultcontext.html In addition, in 4.1.24 you could put context descriptors (XML files describing your context) in the appBase of your Host, and they would load. In TC5.0.19 that feature has been removed, and you must now use META-INF or [Catalina_home]/conf/Engine/Host. I've verified this in the code. I beleive that TC5 was branched at 4.1.7. If this feature was added post 4.1.7, why did it not get integrated into the 5.0 tree? How many other post 4.1.7 features/bug fixes have been left out? No one seems to care about these loss of features. For the second loss of functionality above, I entered a bug in bugzilla which was promptly closed and I was told to RTFM. I did RTFM, and while it is confusing, it does indirectly say I can no longer do what I could in 4.1.24 (by telling me what I CAN do). No mention of this feature's deprecation or any reason why (even after I asked). Forgive me for not wanting to change my current structure, especcially since I don't see any reason why it would change. I suppose I'll be flamed for complaining about a free product, but the Apache organization, of which Tomcat is a member, is known for high quailty open-source development. These missteps seem very out of character, and I think the development team should address them, I hope that I'm not a lone in my feelings here. If I am, I'll gladly crawl back into my hole and mumble under my breath, and perhaps consider another JSP/Servlet container. Thanks for listening, John - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
I have to be missing something simple
Hello, I have just built a new box I can not seem to talk to tomcat via the connector. And what is really frustrating I can not find anything in any of the error log files. Thanks for any help Here is the info Rh 9 Apache 2.0.40 Tomcat 4.1.30 I am using the mod_jk connector (jk-1.2.5) It built successfully on the box. If I go to http://www.domain.com:8080/jsp/test.jsp it works But if I try to go from the connector I get Server error! The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there was an error in a CGI script. This error is from apache not tomcat. I have these in the httpd.conf per doc LoadModule jk_module modules/mod_jk.so JkWorkersFile /etc/httpd/conf/workers.properties JkLogFile /var/log/httpd/mod_jk.log JkLogLevel info JkLogStampFormat [%a %b %d %H:%M:%S %Y] JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories JkRequestLogFormat %w %V %T My worker.properties # Define 1 real worker using ajp13 worker.list=worker1 # Set properties for worker1 (ajp13) worker.worker1.type=ajp13 worker.worker1.host=localhost worker.worker1.port=8009 worker.worker1.lbfactor=50 worker.worker1.cachesize=10 worker.worker1.cache_timeout=600 worker.worker1.socket_keepalive=1 worker.worker1.socket_timeout=300 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat stops loading when I run my servlet with load-on-startup
Look at listeners. I think there was a similar thread a while back and the solution was to have a listener kick off the servlet after all the other processes were done. You could also have your servlet start and then wait for a certain amount of time, to allow time for all other processes to start. Doug - Original Message - From: Adrian Klingel [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, April 23, 2004 4:03 PM Subject: Tomcat stops loading when I run my servlet with load-on-startup I have a servlet which calls a method on itself to poll a directory for XML files. When one is found, another method (read() is called which then creates a SAX parser and attempts to validate the file against an XML schema. Upon calling the parse() method, Tomcat freezes. It doesn't create or write to a log, and nothing else starts up. Nothing is accessible on port 8080, because Tomcat doesn't make it to the point where it mounts that port. When I remove the load-on-startup from this particular app's web.xml, Tomcat completes its startup process and things are accessible. I can then reintroduce the load-on-startup to the web.xml and Tomcat will automatically kick off the servlet. This time nothing freezes, and the program runs as it is supposed to. My program is attempting to validate this XML file against a schema which is accessible locally on port 8080. But that port is prevented from becoming available, so the program will just wait forever. My question is, how can I prevent my servlet from starting up until after Tomcat has completed its startup procedure? I've specified higher numbers in the load-on-startup element, but to no avail. Thanks for any help you can offer. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: auto-configuration of mod_jk
Let me clear a little : I used tomcat 3.2.3 with mod_jk, and automatic configuration I'm upgrading to tomcat 5 I got mod_jk to work nicely The problem is the automatic generation of mod_jk.conf - It generates the tag regarding to virtualhost, so apache is unable to read the jkMount directives. - I tried to use my host as the tag host of name property in server xml and defaultHost of engine, but it didn't work either. - The only way to make it work is stripping the VIrtualHost tag. The problem is that it is regenerated, unless I use it to create the initical configuration. SO I'd tried jk2 too, using unix sockets. I'm getting the message (error?): [Fri Apr 23 18:07:35 2004] [debug] mod_so.c(290): loaded module jk2_module [Fri Apr 23 18:07:35 2004] [debug] ../../server/apache2/mod_jk2.c(426): mod_jk2 Create config for default server (null) thanks for boring you... :) Emerson Daniel Gibby wrote: Emerson, I don't think many of us are understanding what it is you are asking... What are you trying to accomplish or what errors or obstacles are you trying to overcome? Daniel Gibby Emerson Cargnin wrote: I'm using tomcat 5.0.19, apache 2.0.47, mod_jk... Tomcat generates a mod_jk.conf file with the following clause before the jkmount clauses: VirtualHost localhost ServerName localhost With this clause, apache does not create any mapping... This is my configuration of the listener... Is there any other property of this configuration? The virtualhost clause has to match with some apache configuration??? Listener className=org.apache.jk.config.ApacheConfig append=true forwardAll=false modJk=/usr/lib/apache2/mod_jk.so jkworkersConfig=/home/echo/download/jakarta-tomcat-5.0.19/worker.properties / - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Emerson Cargnin Analista de Sistemas Setor de Desenvolvimento de Sistemas - TRE-SC tel : (048) - 251-3700 - Ramal 3181 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: A word of caution upgrading Tomcat
On Fri, Apr 23, 2004 at 02:37:04PM -0400, John H wrote: : I hate to open a can of worms, but I see no other choice. Something needs to : be done about features that appear and disappear seemingly randomly between : versions. This isn't a flame, so please don't take it as such: Products evolve. As noted by another poster, sometimes it's per the spec. (SingleThreadModel, anyone?) Other times, it's just a necessity. (Perhaps the lead dev on a given feature no longer has the time/energy to support it, and no one else picked up the torch.) Even commercial products make dramatic changes between releases, some of them not well-documented. I've handled SunOS-Solaris, WebLogic 5-8, etc. Some apps had to be rebuilt, even recoded, but frustrations were kept to a minimum when we didn't expect slam-dunk-then-Miller-Time. ;) -QM -- software -- http://www.brandxdev.net tech news -- http://www.RoarNetworX.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat stops loading when I run my servlet with load-on-startup
Yes. Rip out the load-on-startup. Now. Don't wait till Monday. Replace with a context listener (see: javax.servlet.ServletContextListener). Relax and have a stress-free weekend. justin At 01:55 PM 4/23/2004, you wrote: Look at listeners. I think there was a similar thread a while back and the solution was to have a listener kick off the servlet after all the other processes were done. You could also have your servlet start and then wait for a certain amount of time, to allow time for all other processes to start. Doug - Original Message - From: Adrian Klingel [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, April 23, 2004 4:03 PM Subject: Tomcat stops loading when I run my servlet with load-on-startup I have a servlet which calls a method on itself to poll a directory for XML files. When one is found, another method (read() is called which then creates a SAX parser and attempts to validate the file against an XML schema. Upon calling the parse() method, Tomcat freezes. It doesn't create or write to a log, and nothing else starts up. Nothing is accessible on port 8080, because Tomcat doesn't make it to the point where it mounts that port. When I remove the load-on-startup from this particular app's web.xml, Tomcat completes its startup process and things are accessible. I can then reintroduce the load-on-startup to the web.xml and Tomcat will automatically kick off the servlet. This time nothing freezes, and the program runs as it is supposed to. My program is attempting to validate this XML file against a schema which is accessible locally on port 8080. But that port is prevented from becoming available, so the program will just wait forever. My question is, how can I prevent my servlet from starting up until after Tomcat has completed its startup procedure? I've specified higher numbers in the load-on-startup element, but to no avail. Thanks for any help you can offer. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Justin Ruthenbeck Software Engineer, NextEngine Inc. justinr - AT - nextengine DOT com Confidential. See: http://www.nextengine.com/confidentiality.php __ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Help Please : Session problem with multiple Tomcats
Can anyone assist on this one? Does Tomcat have the ability to name the session cookie differently ( like BEA Weblogic does )? We are running multiple Tomcat servers with multiple JVM's and ports. Everything works fine except for the sessions. When using one browser (IE) and I flip back an forth between the two sites ( on the two ports ), the sessions are lost. How does Tomcat's session logic work? Is there a way to define two different session names so they don't clash under one browser? We've worked around it so far by using IE with one port and Netscape with the other. I've included the server.xml's from the two servers. Thanks for any help Ted Server port=18005 shutdown=SHUTDOWN debug=0 !-- Define the Tomcat Stand-Alone Service -- Service name=Publishing-Manager !-- Define a non-SSL HTTP/1.1 Connector on port 8401 -- Connector port=8601 enableLookups=true redirectPort=8443 acceptCount=10 debug=0 connectionTimeout=6/ !-- OPTIONAL: Define an SSL HTTP/1.1 Connector on port 8443 -- !-- Connector port=8443 minProcessors=2 maxProcessors=5 enableLookups=true acceptCount=10 debug=0 scheme=https secure=true Factory clientAuth=false protocol=TLS/ /Connector -- !-- Define the top level container in our container hierarchy -- Engine name=Standalone defaultHost=pubmgr debug=0 !-- Global logger unless overridden at lower levels -- Logger className=org.apache.catalina.logger.FileLogger directory=../logs prefix=pm_catalina_log. suffix=.txt timestamp=true/ Realm className=org.apache.catalina.realm.MemoryRealm / !-- Define the default virtual host -- Host name=pubmgr debug=0 appBase=webapps unpackWARs=true autoDeploy=true Valve className=org.apache.catalina.valves.AccessLogValve directory=../logs prefix=pm_access_log. suffix=.txt pattern=common/ Logger className=org.apache.catalina.logger.FileLogger directory=../logs prefix=pm_localhost_log. suffix=.txt timestamp=true/ !-- Tomcat Root Context -- Context path= docBase=ROOT debug=0 swallowOutput=true / Manager className=org.apache.catalina.session.StandardManager checkInterval=600 entropy=pubmgr /Manager /Host /Engine /Service /Server Server port=8005 shutdown=SHUTDOWN debug=0 !-- Define the Tomcat Stand-Alone Service -- Service name=Webstore !-- Define a non-SSL HTTP/1.1 Connector on port 8080 -- Connector port=80 enableLookups=true redirectPort=443 acceptCount=10 debug=0 connectionTimeout=6/ !-- Define an SSL HTTP/1.1 Connector on port 443 -- Connector port=443 minProcessors=3 maxProcessors=25 enableLookups=true acceptCount=10 debug=0 scheme=https secure=true Factory clientAuth=false protocol=TLS keystoreFile=conf/keystore / /Connector !-- Define the top level container in our container hierarchy -- Engine name=Standalone defaultHost=webstore debug=0 !-- Global logger unless overridden at lower levels -- Logger className=org.apache.catalina.logger.FileLogger directory=../logs prefix=ws_catalina_log. suffix=.txt timestamp=true/ Realm className=org.apache.catalina.realm.MemoryRealm / !-- Define the default virtual host -- Host name=webstore debug=0 appBase=webapps unpackWARs=true autoDeploy=true Valve className=org.apache.catalina.valves.AccessLogValve directory=../logs prefix=ws_access_log. suffix=.txt pattern=common/ Logger className=org.apache.catalina.logger.FileLogger directory=../logs prefix=ws_localhost_log. suffix=.txt timestamp=true/ !-- Tomcat Root Context -- Context path= docBase=ROOT debug=0 swallowOutput=true / Manager className=org.apache.catalina.session.StandardManager checkInterval=600 entropy=webstore /Manager /Host /Engine /Service /Server - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
FW: Tomcat stops loading when I run my servlet with load-on-startup
Justin, I followed your advice immediately, but the exact same thing happens. Just to restate the issue, my servlet hangs because it needs to obtain an XML Schema from localhost:8080. But it can't get it, because Tomcat won't finish loading until the servlet is finished. But the servlet won't finish until Tomcat finishes loading. Etcetera, etcetera ad infinitum. I've got some sort of logic issue here. If I want to kick off a program that polls a directory for XML files, should I probably do something where I kick off an independent thread, so that Tomcat is not waiting for my program to finish (which if it's a good poller, it never will)? Thanks, Adrian -Original Message- From: Adrian Klingel [mailto:[EMAIL PROTECTED] Sent: Friday, April 23, 2004 6:52 PM To: Adrian Klingel - Exaweb Subject: FW: Tomcat stops loading when I run my servlet with load-on-startup -Original Message- From: Justin Ruthenbeck [mailto:[EMAIL PROTECTED] Sent: Friday, April 23, 2004 6:47 PM To: Tomcat Users List Subject: Re: Tomcat stops loading when I run my servlet with load-on-startup Yes. Rip out the load-on-startup. Now. Don't wait till Monday. Replace with a context listener (see: javax.servlet.ServletContextListener). Relax and have a stress-free weekend. justin At 01:55 PM 4/23/2004, you wrote: Look at listeners. I think there was a similar thread a while back and the solution was to have a listener kick off the servlet after all the other processes were done. You could also have your servlet start and then wait for a certain amount of time, to allow time for all other processes to start. Doug - Original Message - From: Adrian Klingel [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, April 23, 2004 4:03 PM Subject: Tomcat stops loading when I run my servlet with load-on-startup I have a servlet which calls a method on itself to poll a directory for XML files. When one is found, another method (read() is called which then creates a SAX parser and attempts to validate the file against an XML schema. Upon calling the parse() method, Tomcat freezes. It doesn't create or write to a log, and nothing else starts up. Nothing is accessible on port 8080, because Tomcat doesn't make it to the point where it mounts that port. When I remove the load-on-startup from this particular app's web.xml, Tomcat completes its startup process and things are accessible. I can then reintroduce the load-on-startup to the web.xml and Tomcat will automatically kick off the servlet. This time nothing freezes, and the program runs as it is supposed to. My program is attempting to validate this XML file against a schema which is accessible locally on port 8080. But that port is prevented from becoming available, so the program will just wait forever. My question is, how can I prevent my servlet from starting up until after Tomcat has completed its startup procedure? I've specified higher numbers in the load-on-startup element, but to no avail. Thanks for any help you can offer. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Justin Ruthenbeck Software Engineer, NextEngine Inc. justinr - AT - nextengine DOT com Confidential. See: http://www.nextengine.com/confidentiality.php __ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: FW: Tomcat stops loading when I run my servlet with load-on-startup
On Fri, Apr 23, 2004 at 08:21:54PM -0400, Adrian Klingel wrote: : Just to restate the issue, my servlet hangs because it needs to obtain an : XML Schema from localhost:8080. But it can't get it, because Tomcat won't : finish loading until the servlet is finished. But the servlet won't finish : until Tomcat finishes loading. Etcetera, etcetera ad infinitum. I missed the full details of your original post, but is there any reason the servlet *must* retrieve the schema through an HTTP request? What about making the file available off the classpath, and using getResourceAsStream()? (Google for examples, there are plenty.) If it's an XML doc that's calling the schema, you could use a custom EntityResolver to do the classpath-loading bit I described above. -QM -- software -- http://www.brandxdev.net tech news -- http://www.RoarNetworX.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: FW: Tomcat stops loading when I run my servlet with load-on-startup
You are trying to load it up via HTTP? That seems a bit overkill when you are on the same server. Just load it like this... context.getResourceAsStream(/WEB-INF/config/myfile.xml); Should be able to use something like an Entity resolver to provide the schema. This is done commonly for DTD's. You specify a URL location, but load the schema off the classpath instead. Jake At 08:21 PM 4/23/2004 -0400, you wrote: Justin, I followed your advice immediately, but the exact same thing happens. Just to restate the issue, my servlet hangs because it needs to obtain an XML Schema from localhost:8080. But it can't get it, because Tomcat won't finish loading until the servlet is finished. But the servlet won't finish until Tomcat finishes loading. Etcetera, etcetera ad infinitum. I've got some sort of logic issue here. If I want to kick off a program that polls a directory for XML files, should I probably do something where I kick off an independent thread, so that Tomcat is not waiting for my program to finish (which if it's a good poller, it never will)? Thanks, Adrian -Original Message- From: Adrian Klingel [mailto:[EMAIL PROTECTED] Sent: Friday, April 23, 2004 6:52 PM To: Adrian Klingel - Exaweb Subject: FW: Tomcat stops loading when I run my servlet with load-on-startup -Original Message- From: Justin Ruthenbeck [mailto:[EMAIL PROTECTED] Sent: Friday, April 23, 2004 6:47 PM To: Tomcat Users List Subject: Re: Tomcat stops loading when I run my servlet with load-on-startup Yes. Rip out the load-on-startup. Now. Don't wait till Monday. Replace with a context listener (see: javax.servlet.ServletContextListener). Relax and have a stress-free weekend. justin At 01:55 PM 4/23/2004, you wrote: Look at listeners. I think there was a similar thread a while back and the solution was to have a listener kick off the servlet after all the other processes were done. You could also have your servlet start and then wait for a certain amount of time, to allow time for all other processes to start. Doug - Original Message - From: Adrian Klingel [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, April 23, 2004 4:03 PM Subject: Tomcat stops loading when I run my servlet with load-on-startup I have a servlet which calls a method on itself to poll a directory for XML files. When one is found, another method (read() is called which then creates a SAX parser and attempts to validate the file against an XML schema. Upon calling the parse() method, Tomcat freezes. It doesn't create or write to a log, and nothing else starts up. Nothing is accessible on port 8080, because Tomcat doesn't make it to the point where it mounts that port. When I remove the load-on-startup from this particular app's web.xml, Tomcat completes its startup process and things are accessible. I can then reintroduce the load-on-startup to the web.xml and Tomcat will automatically kick off the servlet. This time nothing freezes, and the program runs as it is supposed to. My program is attempting to validate this XML file against a schema which is accessible locally on port 8080. But that port is prevented from becoming available, so the program will just wait forever. My question is, how can I prevent my servlet from starting up until after Tomcat has completed its startup procedure? I've specified higher numbers in the load-on-startup element, but to no avail. Thanks for any help you can offer. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Justin Ruthenbeck Software Engineer, NextEngine Inc. justinr - AT - nextengine DOT com Confidential. See: http://www.nextengine.com/confidentiality.php __ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Problem with getting mod_jk to work with apache 2
Hello, I have just built a new box I can not seem to talk to tomcat via the connector. And what is really frustrating I can not find anything in any of the error log files. Thanks for any help Here is the info Rh 9 Apache 2.0.40 Tomcat 4.1.30 I am using the mod_jk connector (jk-1.2.5) It built successfully on the box. If I go to http://www.domain.com:8080/jsp/test.jsp it works But if I try to go from the connector I get Server error! The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there was an error in a CGI script. This error is from apache not tomcat. I have these in the httpd.conf per doc LoadModule jk_module modules/mod_jk.so JkWorkersFile /etc/httpd/conf/workers.properties JkLogFile /var/log/httpd/mod_jk.log JkLogLevel info JkLogStampFormat [%a %b %d %H:%M:%S %Y] JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories JkRequestLogFormat %w %V %T My worker.properties # Define 1 real worker using ajp13 worker.list=worker1 # Set properties for worker1 (ajp13) worker.worker1.type=ajp13 worker.worker1.host=localhost worker.worker1.port=8009 worker.worker1.lbfactor=50 worker.worker1.cachesize=10 worker.worker1.cache_timeout=600 worker.worker1.socket_keepalive=1 worker.worker1.socket_timeout=300 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: FW: Tomcat stops loading when I run my servlet with load-on-startup
At 05:21 PM 4/23/2004, you wrote: Justin, I followed your advice immediately, but the exact same thing happens. My response was tongue-in-cheek, but that's ok. :) Just to restate the issue, my servlet hangs because it needs to obtain an XML Schema from localhost:8080. But it can't get it, because Tomcat won't finish loading until the servlet is finished. But the servlet won't finish until Tomcat finishes loading. Etcetera, etcetera ad infinitum. I've got some sort of logic issue here. If I want to kick off a program that polls a directory for XML files, should I probably do something where I kick off an independent thread, so that Tomcat is not waiting for my program to finish (which if it's a good poller, it never will)? Ah, I see. Using the ServletContextListener will make your life easier going forward, but it doesn't directly address what you're talking about here. As others have said, you may be able to solve the immediate problem with an EntityResolver (pretty standard). The larger question, though, remains. Since there's no standard way to make a webApp unavailable after it has been fully initialized, whatever resources you need to verify the startup have to be available during the contextInitialized() timeframe. That means your options for deployment are a tad limited (ie where to place these schemas), regardless of whether you use an EntityResolver or not. It's really an issue of what types of restrictions you're willing to place on the deployment ... if it's always deployed as an exploded dir, you could use a init param to specify the OS filesystem location of the schema (or an EntityResolver). If you can put the schema somewhere in the webapp or container's classpath, you can use the getResourceAsStream() method. If you truly need to poll indefinitely for XML files (files will change during runtime), but reading one of them isn't required for you to start the context successfully, then you could fire off the thread and let your startup finish gracefully. Just depends on the other conditions of your app. justin -Original Message- From: Adrian Klingel [mailto:[EMAIL PROTECTED] Sent: Friday, April 23, 2004 6:52 PM To: Adrian Klingel - Exaweb Subject: FW: Tomcat stops loading when I run my servlet with load-on-startup -Original Message- From: Justin Ruthenbeck [mailto:[EMAIL PROTECTED] Sent: Friday, April 23, 2004 6:47 PM To: Tomcat Users List Subject: Re: Tomcat stops loading when I run my servlet with load-on-startup Yes. Rip out the load-on-startup. Now. Don't wait till Monday. Replace with a context listener (see: javax.servlet.ServletContextListener). Relax and have a stress-free weekend. justin At 01:55 PM 4/23/2004, you wrote: Look at listeners. I think there was a similar thread a while back and the solution was to have a listener kick off the servlet after all the other processes were done. You could also have your servlet start and then wait for a certain amount of time, to allow time for all other processes to start. Doug - Original Message - From: Adrian Klingel [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, April 23, 2004 4:03 PM Subject: Tomcat stops loading when I run my servlet with load-on-startup I have a servlet which calls a method on itself to poll a directory for XML files. When one is found, another method (read() is called which then creates a SAX parser and attempts to validate the file against an XML schema. Upon calling the parse() method, Tomcat freezes. It doesn't create or write to a log, and nothing else starts up. Nothing is accessible on port 8080, because Tomcat doesn't make it to the point where it mounts that port. When I remove the load-on-startup from this particular app's web.xml, Tomcat completes its startup process and things are accessible. I can then reintroduce the load-on-startup to the web.xml and Tomcat will automatically kick off the servlet. This time nothing freezes, and the program runs as it is supposed to. My program is attempting to validate this XML file against a schema which is accessible locally on port 8080. But that port is prevented from becoming available, so the program will just wait forever. My question is, how can I prevent my servlet from starting up until after Tomcat has completed its startup procedure? I've specified higher numbers in the load-on-startup element, but to no avail. Thanks for any help you can offer. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Justin Ruthenbeck Software Engineer, NextEngine Inc. justinr - AT - nextengine
RE: Help Please : Session problem with multiple Tomcats
Servelet Spec requires the session cookie to be JSESSIONID. If you launch two instances of IE, it should keep track of a session ID for each instance. That should let you do what you want. Mozilla just keeps one session ID, even with two instances. -Layton -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Friday, April 23, 2004 2:52 PM To: Tomcat Users List Subject: Help Please : Session problem with multiple Tomcats Can anyone assist on this one? Does Tomcat have the ability to name the session cookie differently ( like BEA Weblogic does )? We are running multiple Tomcat servers with multiple JVM's and ports. Everything works fine except for the sessions. When using one browser (IE) and I flip back an forth between the two sites ( on the two ports ), the sessions are lost. How does Tomcat's session logic work? Is there a way to define two different session names so they don't clash under one browser? We've worked around it so far by using IE with one port and Netscape with the other. I've included the server.xml's from the two servers. Thanks for any help Ted Server port=18005 shutdown=SHUTDOWN debug=0 !-- Define the Tomcat Stand-Alone Service -- Service name=Publishing-Manager !-- Define a non-SSL HTTP/1.1 Connector on port 8401 -- Connector port=8601 enableLookups=true redirectPort=8443 acceptCount=10 debug=0 connectionTimeout=6/ !-- OPTIONAL: Define an SSL HTTP/1.1 Connector on port 8443 -- !-- Connector port=8443 minProcessors=2 maxProcessors=5 enableLookups=true acceptCount=10 debug=0 scheme=https secure=true Factory clientAuth=false protocol=TLS/ /Connector -- !-- Define the top level container in our container hierarchy -- Engine name=Standalone defaultHost=pubmgr debug=0 !-- Global logger unless overridden at lower levels -- Logger className=org.apache.catalina.logger.FileLogger directory=../logs prefix=pm_catalina_log. suffix=.txt timestamp=true/ Realm className=org.apache.catalina.realm.MemoryRealm / !-- Define the default virtual host -- Host name=pubmgr debug=0 appBase=webapps unpackWARs=true autoDeploy=true Valve className=org.apache.catalina.valves.AccessLogValve directory=../logs prefix=pm_access_log. suffix=.txt pattern=common/ Logger className=org.apache.catalina.logger.FileLogger directory=../logs prefix=pm_localhost_log. suffix=.txt timestamp=true/ !-- Tomcat Root Context -- Context path= docBase=ROOT debug=0 swallowOutput=true / Manager className=org.apache.catalina.session.StandardManager checkInterval=600 entropy=pubmgr /Manager /Host /Engine /Service /Server Server port=8005 shutdown=SHUTDOWN debug=0 !-- Define the Tomcat Stand-Alone Service -- Service name=Webstore !-- Define a non-SSL HTTP/1.1 Connector on port 8080 -- Connector port=80 enableLookups=true redirectPort=443 acceptCount=10 debug=0 connectionTimeout=6/ !-- Define an SSL HTTP/1.1 Connector on port 443 -- Connector port=443 minProcessors=3 maxProcessors=25 enableLookups=true acceptCount=10 debug=0 scheme=https secure=true Factory clientAuth=false protocol=TLS keystoreFile=conf/keystore / /Connector !-- Define the top level container in our container hierarchy -- Engine name=Standalone defaultHost=webstore debug=0 !-- Global logger unless overridden at lower levels -- Logger className=org.apache.catalina.logger.FileLogger directory=../logs prefix=ws_catalina_log. suffix=.txt timestamp=true/ Realm className=org.apache.catalina.realm.MemoryRealm / !-- Define the default virtual host -- Host name=webstore debug=0 appBase=webapps unpackWARs=true autoDeploy=true Valve className=org.apache.catalina.valves.AccessLogValve directory=../logs prefix=ws_access_log. suffix=.txt pattern=common/ Logger className=org.apache.catalina.logger.FileLogger directory=../logs prefix=ws_localhost_log. suffix=.txt timestamp=true/ !-- Tomcat Root Context -- Context path= docBase=ROOT debug=0 swallowOutput=true / Manager className=org.apache.catalina.session.StandardManager checkInterval=600 entropy=webstore /Manager /Host /Engine /Service /Server - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Help Please : Session problem with multiple Tomcats
At 07:48 PM 4/23/2004 -0700, you wrote: Servelet Spec requires the session cookie to be JSESSIONID. If you launch two instances of IE, it should keep track of a session ID for each instance. That should let you do what you want. Mozilla just keeps one session ID, even with two instances. You have to be careful about this. IE can launch new windows in the same process or as a different process. If it launches them in the same process, then you will share the same session, just like you observe in Mozilla. If you have it set up to launch windows in a separate process, then you will have distinct session id's in each window. This isn't a matter of IE doing something right and Mozilla doing something wrong. In fact, they are both providing exactly the same behavior, except that IE can be configured to launch windows in a separate process and Mozilla always uses the same process. Jake -Layton -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Friday, April 23, 2004 2:52 PM To: Tomcat Users List Subject: Help Please : Session problem with multiple Tomcats Can anyone assist on this one? Does Tomcat have the ability to name the session cookie differently ( like BEA Weblogic does )? We are running multiple Tomcat servers with multiple JVM's and ports. Everything works fine except for the sessions. When using one browser (IE) and I flip back an forth between the two sites ( on the two ports ), the sessions are lost. How does Tomcat's session logic work? Is there a way to define two different session names so they don't clash under one browser? We've worked around it so far by using IE with one port and Netscape with the other. I've included the server.xml's from the two servers. Thanks for any help Ted Server port=18005 shutdown=SHUTDOWN debug=0 !-- Define the Tomcat Stand-Alone Service -- Service name=Publishing-Manager !-- Define a non-SSL HTTP/1.1 Connector on port 8401 -- Connector port=8601 enableLookups=true redirectPort=8443 acceptCount=10 debug=0 connectionTimeout=6/ !-- OPTIONAL: Define an SSL HTTP/1.1 Connector on port 8443 -- !-- Connector port=8443 minProcessors=2 maxProcessors=5 enableLookups=true acceptCount=10 debug=0 scheme=https secure=true Factory clientAuth=false protocol=TLS/ /Connector -- !-- Define the top level container in our container hierarchy -- Engine name=Standalone defaultHost=pubmgr debug=0 !-- Global logger unless overridden at lower levels -- Logger className=org.apache.catalina.logger.FileLogger directory=../logs prefix=pm_catalina_log. suffix=.txt timestamp=true/ Realm className=org.apache.catalina.realm.MemoryRealm / !-- Define the default virtual host -- Host name=pubmgr debug=0 appBase=webapps unpackWARs=true autoDeploy=true Valve className=org.apache.catalina.valves.AccessLogValve directory=../logs prefix=pm_access_log. suffix=.txt pattern=common/ Logger className=org.apache.catalina.logger.FileLogger directory=../logs prefix=pm_localhost_log. suffix=.txt timestamp=true/ !-- Tomcat Root Context -- Context path= docBase=ROOT debug=0 swallowOutput=true / Manager className=org.apache.catalina.session.StandardManager checkInterval=600 entropy=pubmgr /Manager /Host /Engine /Service /Server Server port=8005 shutdown=SHUTDOWN debug=0 !-- Define the Tomcat Stand-Alone Service -- Service name=Webstore !-- Define a non-SSL HTTP/1.1 Connector on port 8080 -- Connector port=80 enableLookups=true redirectPort=443 acceptCount=10 debug=0 connectionTimeout=6/ !-- Define an SSL HTTP/1.1 Connector on port 443 -- Connector port=443 minProcessors=3 maxProcessors=25 enableLookups=true acceptCount=10 debug=0 scheme=https secure=true Factory clientAuth=false protocol=TLS keystoreFile=conf/keystore / /Connector !-- Define the top level container in our container hierarchy -- Engine name=Standalone defaultHost=webstore debug=0 !-- Global logger unless overridden at lower levels -- Logger className=org.apache.catalina.logger.FileLogger directory=../logs prefix=ws_catalina_log. suffix=.txt timestamp=true/ Realm className=org.apache.catalina.realm.MemoryRealm / !-- Define the default virtual host -- Host name=webstore debug=0 appBase=webapps unpackWARs=true autoDeploy=true Valve className=org.apache.catalina.valves.AccessLogValve directory=../logs prefix=ws_access_log. suffix=.txt pattern=common/