Timestamps in mod_jk.log
Hi, Could the developers of mod_jk please add timestamp logging and if possible request url to mod_jk.log ? Thanks Shahed.
Re: non-servlet components
> What is the "proper" way to implement non-servlet singleton components in > the Tomcat framework? I am not sure of any proper way, but I have a class that has a static method that returns a reference to a private member variable. The class has no constructor, and the getInstance() method creates the returned reference object if its not already present. Otherwise it returns the existing instance. This approach is used in Connection Pooling classes, and it works fine for me. Regards Shahed. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re : extracting jsp file name
Sorry for the confusion. I have a MVC framework in which all jsp pages post data to a controller servlet. In this servlet, I need to findout which jsp page invoked it. Currently I am passing a hidden variable with value="/callingpage.jsp" i.e in calling.jsp I have the code fragment I want to replace this with some jsp token in each page so that i dont have to hardcode the jsp page name in every page. At first I thought of using the HTTP referer header in the servlet, but that only works for the first time. The servlet does a servlet forward(), and so the next time I look at the HTTP Referer header, I get the name of the servlet and not the jsp page which called the servlet. The only way I could think of is getting the generated class name in jsp and UnMangling it. I could either do that or write my own Mangler class. Now I looked at the Mangler code in CommandLineCompiler.java from jasper. The interface file Mangler.java has a comment that says that I can *plug in* my own mangler. However, would that mean rewriting CommandLineCompiler since it implements Mangler ? Thanks Shahed - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
REPOST : extracting jsp filename from generated class
Hi all, Sorry for this repost. >From within a jsp page, I need to know the name of the jsp page. If I do a <%=this.getClass()%>, I get a string which represents the class name of the generated servlet. Is there some standard way in which I can extract the jsp page from that name ? Another Qs :- How does Tomcat know that a certain jsp page maps to a certain class ?. If I can access that data, then I can possibly lookup the pagename. Any clues ? Thanks Shahed. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
BIZZAR Caching Problem !!
Hi, I am using Tomcat 3.2.1 w/Sun JDK 1.3 on Solaris 8 + Apache 1.3.14 + mod_jk Now here is my problem. I have a jsp page with an include to refer to file a.inc. I change the include to refer to another file (b.inc) I reload the page. I still see the content of a.inc. I touch the jsp file. No change. I go to the work directory and rm * (delete all generated class and java files) I reload the page. No change. I look at the generated .java code for my jsp page. It sill includes the old a.inc file. FINALLY I restart tomcat. Everything back to normal. Can anyone tell me what was going on ? Does mod_jk somehow cache the jsp file ? Thanks Shahed. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
JSP generated .java Naming Convention
Hi, I need to get the name of the current jsp page in a scriptlet. The jsp page could be serverd up by a link or by a jsp:forward or a redirect. If I do <%=this.getClass()%>, I get the following for a jsp page tmp/ST003.jsp tmp._0002ftmp_0002fST_00030_00030_00033_0002ejspST003_jsp_1 Is there some standard way of extracting the jsp page name form this ? Or is this naming convention subject to change ? Or is there any other way ? Thanks Shahed. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: possible problem with CLIENT-CERT login and security constraint on TOMCAT 4.0
Hi, This is slightly off the original post. But I want to do auth based on client certificates. However, I am using Tomcat 3.2.1 with Apache and Virtual Hosts. Also I have the tag in my server.xml. Now I remember reading people having problems passing a client cert from apache to tomcat or something to that effect. Are there any examples out there that talk about how to set up client cert auth with Apache + Tomcat + acquiring a client cert + Becoming an issure of client certs. Thanks Shahed.
Object Passivation in TC 3.2.x ?
Hi, I am creating a connection pool in my jsp pages. This connection pool is a context wide static class that is referenced by each jsp page through a static class method. If the website is inactive for about 2-3 hours, I get an error trying to get connections from the pool. I suspect that this is due to that class being serialized. This does not seem to happen in tomcat 3.1 though. The same site / connection pool class works fine !!! Is this my problem ? Is there any way to turn this off. Thanks Shahed.
Socket Exception using Tomcat 3.2.1
Hi, I upgraded from Tomcat 3.2 to 3.2.1 on Solaris Intel JDK 1.3 w/Apache 1.3.14 (Stronghold 3.0) I even recompiled mod_jk.so with the 3.2.1 src/native/apache1.3 .c file. (BTW a diff -b seems to indicate that both the TC 3.2 mod_jk.so and the 3.2.1 .so generated the same object code) I had 2 web app configured that worked just fine under Tomcat 3.2. Using exactly the same configuration (other than changing the paths etc) one of the apps works fine under TC 3.2.1, but the other gives me the following stack trace and I get a 500 Internal Server Error when I go past the login page in my application. Both the apps use the same framework for jdbc connection pooling / logging in etc etc. The moment I reverted to Tomcat 3.2, everything works fine. java.net.SocketException: Connection reset by peer: Connection reset by peer at java.net.SocketInputStream.socketRead(Native Method) at java.net.SocketInputStream.read(SocketInputStream.java:86) at org.apache.tomcat.service.connector.TcpConnector.receiveFully(TcpConnector.java:150) at org.apache.tomcat.service.connector.TcpConnector.receive(TcpConnector.java:121) at org.apache.tomcat.service.connector.Ajp13ConnectionHandler.processConnection(Ajp13ConnectionHandler.java:146) at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416) at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498) at java.lang.Thread.run(Thread.java:484) Any idea whats going on ? Thanks Shahed.
Nightly Build Link broken ?
Hi, I am trying to download Tomcat 3.2.1 B. Is it the same as the release version of Tomcat 3.2.1 ? In any case, the Nightly Build Link for downloading the source code of Tomcat seems to be broken. Thanks Shahed.
How to check if Load Balancing is working ?
I am using Tomcat 3.2 with Apache 1.3.14 on Solarin 8 Intel / JSK 1.3 and am using ajp13 with Load Balancing. I am running a single Tomcat instance with Multiple directives for each worker. Is there any way that I can monitor the Load balancing using either O/s specfic tools (activity on ajp13 ports) or by setting any Log parameters which would tell me that the multiple connection are acctually being used ? Thanks Shahed.
Load Balancing Info
Hi All, The examples in the tomcat docs that talk about load balancing etc seem to be incorrect. Are there any good docs out there that can explain to me how to set up a load balanced environment ? I think what I want to do is set up multiple worker threads, but all of them need to service the same Mout Point. All the examples talk about is doing load balancing for different mount points. Also they are not clear if I have to run multiple tomcat instances or edit the server.xml and add more directives running on different ports. Thanks Shahed.
Reading SSL Client Cert in TC 3.2
Hi, I am using Tomcat 3.2 with Apache Stronghold 3.0. I am aware that there are directives in TC 3.2 which allow SSL info to be passed back to Tomcat. What I would like to know is whether there are any sample jsp / servlet code or any website that shows me how I can retrieve SSL Client Certificate info and use it for authenticating the client. I know that there is some class in the javax.security package that deals with X.509 certificates etc etc, but what I am looking out for is sample code as I am very new to SSL and Client certificates (and good authentication methods) in general. Thanks Shahed.
Patches
Hello, Where can I get hold of patches to Tomcat and their descriptions ? Also, how can I find out which patches are applied to my installed version of tomcat ? I have downloaded a binary version. Thanks Shahed.
Include Directive 3.1 Vs 3.2
I noticed that if I have an include directive within another include directive, in Tomcat 3.1, the 2nd include has a path relative to the jsp doument. But in 3.2 its relative to the 1st include document. i.e A.jsp ---> includes 1.inc -> includes 2.inc Both 1.inc and 2.inc are under the ./include directory In 3.1 A.jsp would have <@ include file = "include/1.inc" and 1.inc would have <@ include file = "include/2.inc"> In 3.2 A.jsp would have <@ include file = "include/1.inc" and 1.inc would have <@ include file = "2.inc"> Is this a change in the jsp spec or something specfic to tomcat ? Thanks Shahed
Tomcat 3.2 on Solaris 8 with Sun JDK 1.1.2
I have faced this problem earlier with Tomcat 3.1. It just does not seem to work with JDK 1.2.2. When I access a jsp, the .java file under the work directory get stuck at out.write("\r\n\r\n\r\n"); It works fine if I set JAVA_HOME to jdk1.2.1 Is this bug fixed in later versions ? Thanks Shahed
Cannot compile mod_jk under Solaris 8 Intel
Hi, I am having a problem compiling mod_jk on Solaris 8 (Intel) for Tomcat 3.2. I have tried with both jdk1.2.1 and jdk1.2.2 for the include files since I know that Tomcat 3.1 had a problem with 1.2.2 Anyway, if I dont give the -lposix4 flag, I get the fdatasync symbol not found error. If I do give the -lposix4 flag, I get a message saying that cannot start server. BTW, I am using StrongHold (Apache 1.3.14) and the apxs etc are from stronghold. Thanks Shahed
Client Certificate Auth
(Sorry if this is a bit off topic) I am using Tomcat 3.1 with Apache - Stronghold. I am new to SSL / Digital certificates, and was wondering if any one can point me to any example code / url or even a book title which has an example of how to read a client digital certificate and grant access to users based on that. Firstly is this supported in Tomcat 3.1 with Apache as the web server ? Also is there any way that I can dispense certificates off my web server rather than ask the users to get a certificate from a CA. Thanks Shahed.
Fw: Virtual Hosts and Context Path Question
-Original Message-From: Shahed Ali <[EMAIL PROTECTED]>To: [EMAIL PROTECTED] <[EMAIL PROTECTED]>Cc: [EMAIL PROTECTED] <[EMAIL PROTECTED]>Date: Friday, December 01, 2000 11:33 AMSubject: Virtual Hosts and Context Path Question I am running Apache Stronghold with Virtual Hosts and Tomcat 3.1 I am using Named Hosts and have www.a.com and www.b.com both pointing to the same IP address. Now when I go to http://www.a.com I want my DoucmentRoot to point to /usr/local/jakarta-tomcat/webapps/A_APP/index.jsp But I also have to modify the Context Path = "" in server.xml to point to webapps/MYAPP Now suppose I want http://www.b.com to point to /usr/local/jakarta-tomcat/webapps/B_APP/index.jsp, I would need to also set the Context path = "" ? How can I go about doing this ? OR Or If I have virtual hosts using the same Tomcat Server, then do I need to keep all my jsp stuff in different contexts and Set up an alias in each virtual host = Context Path ? So when I want to serve up jsp pages for site A I say http://www.a.com/siteAjsp/myapp.jsp And when I want to serve up jsp pages for site B I say http://www.b.com/siteBjsp/myapp.jsp Where siteAjsp , siteBjsp etc all have to be unique aliases/context-paths combinations. Eg NameVirtualHost 192.168.5.100 ServerName www.a.com DocumentRoot "/home/a" Alias /siteAjsp "/usr/local/jakarta/tomcat/webapps/siteAjsp" ApJServMount /siteAjsp/servlet /siteAjsp . <<<<<<<<<<<< For this Host in server.xml Context path="/siteAjsp" docbase = "webapps/siteAjsp" ServerName www.b.com DocumentRoot "/home/a" Alias /siteBjsp "/usr/local/jakarta/tomcat/webapps/siteBjsp" ApJServMount /siteBjsp/servlet /siteBjsp . <<<<<<<<<<<< For this Host in server.xml Context path="/siteBjsp" docbase = "webapps/siteBjsp" Thanks Shahed