Session crossovers ?
Hi, I have searched the tomcat bug list, and have found a few references where people are having doubts over the integrity of their HttpSessions. We have a system where we use the session object to store RMI references which identify the user to a backend system. We have reason to believe that under load, sometimes a jsp page retrives the wrong session object, i.e another users session object. We are using tomcat 3.2.3 Final Release with jdk 1.3.01-beta24 on Solaris 8 (Sparc) with Apache 1.3.20 (mod_jk and ajp13). Has anyone else exprienced a similar problem ? Thanks Shahed.
tools.jar location ??
Hi, I am having problems with tools.jar on Solaris Sparc 8 with JDK 1.3.1 I have tools.jar set in my CLASSPATH in my /etc/profile, and I start tomcat in rc2.d. This does not allow me to recompile jsp pages. I get a sun/tools/Main class not found exception when jsp pages need to be recompiled. When I tired a symlink under WEB-INF/lib to point to my jdk1.3.1 tools.jar, it seems to work only if I restart tomcat manually and not on reboot from rc2.d. So my questions are :- 1. Where should I place tools.jar ?? 2. Is thre some problem with JDK 1.3.1 tools.jar and Tomcat 3.2.1 ? I used tools.jar from JDK 1.3.0 and I think that works fine. I suspect some problems with the jdk1.3.1 tools.jar under Solaris 8 Sparc JDK 1.3.1 from Sun. Thanks Shahed
mod_jk --- tomcat communication errors
Hi, I have a Live Website running tomcat 3.2.1 on Solaris 8 / JDK 1.3 / mod_jk and ajp13 and Apache 1.3.14 I have come across the following problems 1. Occasionaly, I get a 500 server error from apache and mod_jk.log has socket timeout errors. 2. Today, the site just hung. When I made requests, mod_jk logged them, but the requests were not reaching tomcat. i.e tail -f mod_jk.log showed a request being sent, but tail -f jasper.log did not have the corrosponding jsp page show up. Any idea what can be causing this problem ? Every time this happens, I need to restart apache/tomcat. Thanks Shahed.
Re: Tomcat Threads
Each webapp / context runs with its own classloader (afaik) Thats why multiple copies of your class are being loaded. May be if you used JNDI lookups to get a handle to a connection pool with that jdbc 2.0 ext stuff ? Or maybe rmi ? But jdbc conenctions cannot go over rmi :-( Regards Shahed
Re: Stopping the correct tomcat for a virtual host
I am doing the same thing, except I have multiple tomcat.sh files for each context and corrosponding multiple server.xml files Eg tomcata.sh - servera.xml tomcatb.sh - serverb.xml When I want to stop context a, I give tomcata.sh -f servera.xml stop (or whaterver the correct syntax is) tomcat.sh wil read the port from server.xml and stop the corrrect context. Regards Shahed - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: Can tomcat do ASP in VBScript
There a a number of products that "simulate/translate" asp code. Look at iasp from halcyonsoft and chiliasp from ?? AFAIK, both run as servlets that act upon *.asp and parse their content, and interpret asp code into java methods calls. IASP even supported ADO calls. Best of Luck Shahed - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
log() ?
Sorry for this stupid question, but how do I use the log() method in servlets ? In JSP application.log() seems to work, but in servlets, I tried getServletContext().log("adad") etc and I keep getting NullPointerExceptions Thanks Shahed - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: Broken pipe error
This error drove my nuts. I was using Informix. Finally we used a connection pool called DbBroker from www.javaexchange.com. This pool constantly runs a thread that checks connection status and resets or recreates them if the connection is bad. After using this pool, all of our broken pipe erros are gone. And since there is a repair thread running, we never get a bad connection in our jsp pages unless the db server is stopped. The pool checks connection status before dispensing them. Regards Shahed. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Dual Processor Woes !!
Hi All, I have 2 Intel Solaris 8 Systems with JDK 1.3 (with java -server option set) One is a single processor unit and one is dual processor. On the single processor system, every thing works fine. On the dual processor system, I have had the strangest of problems like :- mod_jk does not return to apache after receiving a service request. and various other strange problems. Is this a threading issue with the Solaris JDK from sun on dual processor systems ? Thanks Shahed, - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
mod_jk not returning !!!
Hi, I have a major problem with mod_jk. Apache sends request to mod_jk, but mod_jk just does not return. I am using ajp12 protocol and Tomcat 3.2.1 JDK 1.3 solaris 8 intel and apache 1.3.14 This behaviour came up only after a few hours. If I look at mod_jk.log, I get the log as below. However, I have another app running on another apache virtual host using the same config, and that works fine The only difference between the 2 apps is that the one that does not work, uses a worker thread that is shared between 2 tomcat contexts. The other app that works fine uses a dedicated worker thread ajp12b. i.e virtual host A JkMount /*.jsp ajp12a /virtual host virtual host B JkMount /*.jsp ajp12a /virtual host I also have a small patch appiled to mod_jk that makes it use the SetHandler directive rather than sending all request to mod_jk and letting it figure out what it needs. Thanks Shahed. [jk_uri_worker_map.c (344)]: Into jk_uri_worker_map_t::map_uri_to_worker [jk_uri_worker_map.c (406)]: jk_uri_worker_map_t::map_uri_to_worker, Found a mat ch ajp12a [jk_worker.c (123)]: Into wc_get_worker_for_name ajp12a [jk_worker.c (127)]: wc_get_worker_for_name, done found a worker [jk_ajp12_worker.c (223)]: Into jk_worker_t::get_endpoint [jk_ajp12_worker.c (121)]: Into jk_endpoint_t::service [jk_connect.c (108)]: Into jk_open_socket [jk_connect.c (115)]: jk_open_socket, try to connect socket = 9 [jk_connect.c (124)]: jk_open_socket, after connect ret = 0 [jk_connect.c (132)]: jk_open_socket, set TCP_NODELAY to on [jk_connect.c (140)]: jk_open_socket, return, sd = 9 [jk_ajp12_worker.c (134)]: In jk_endpoint_t::service, sd = 9 [jk_ajp12_worker.c (357)]: Into ajpv12_handle_request [jk_ajp12_worker.c (361)]: ajpv12_handle_request, sending the ajp12 start sequen ce [jk_ajp12_worker.c (413)]: ajpv12_handle_request, sending the headers [jk_ajp12_worker.c (432)]: ajpv12_handle_request, sending the terminating mark [jk_ajp12_worker.c (472)]: ajpv12_handle_request done [jk_ajp12_worker.c (148)]: In jk_endpoint_t::service, sent request [jk_ajp12_worker.c (488)]: Into ajpv12_handle_response BEGIN:VCARD VERSION:2.1 N:Moolji;Shahed;A;Mr FN:Shahed Moolji NICKNAME:Shahed ORG:Teleformix LLC;Teleformix TEL;WORK;VOICE:(847)585-6817 TEL;HOME;VOICE:(847) 252-7653 ADR;WORK:;;925 N. Plum Grove Road;Schaumburg;IL;60173;USA LABEL;WORK;ENCODING=QUOTED-PRINTABLE:925 N. Plum Grove Road=0D=0ASchaumburg, IL 60173=0D=0AUSA EMAIL;PREF;INTERNET:[EMAIL PROTECTED] REV:20010222T164929Z END:VCARD - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: Removing vales from Request Object
See the removeAttribute method in the ServletRequest class. I mean removing request parameter values (posted form data) and not attributes set by the setAttribute() api calls. I looked at the *Facade*.java and RequestImpl.java code in the tomcat source, but it was quite confusing and got me no where. Thanks Shahed - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Performance ISSUES : mod_jk ajp13 Vs ajp12
Hi, We are using Tomcat 3.2.1 with Apache 1.3.14 and mod_jk on Solaris 8 Intel JDK 1.3 We have had the strangest of experiences with multiple configs including various mix match combos of TC 3.1 , TC 3.2 , JDK 1.2.2, JDK 1.3 , mod_jk / mod_jserv We finally decided to stick with mod_jk and ajp13 Every things seems ok, but today we had a problem whereby it seemd that the communication between mod_jk and apache broke. Requests were being sent to mod_jk, but then it would close the socket instead of replying back to apache, leading to a large number of sockets remaing in CLOSE_WAIT / FIN_WAIT_2 state. My boss seems to think that AJP13 is not ready for production yet. Can anyone tell me what seems to be the best combo from the following :- mod_jk and ajp12 mod_jk and ajp13 mod_jserv and ajp12 with smart content redirection (static = apache || *.jsp /servlet/ = tomcat ) mod_jserv and ajp13 ??? (dont think its allowed) Also, my mod_jk has a patch so that it acts as a Content Handler instead of the default behavior of acting like a filter. So only *.jsp and /servlet/ are handled by it. Any recomendations ? Thanks Shahed. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: R: Problem with a new version of JSP pages
I have had exactly the same problem with tomcat 3.2.1 on Solaris / Apache / mod_jk and jdk 1.3 I tried deleting the work dir, clearing cache etc etc etc No luck. When I restarted tomcat + apache, the problem disappeared. I know that someone else also faced this problem. This is quite a "freaky" thing, because I have not been able to reproduce it. Regards Shahed. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: R: Problem with a new version of JSP pages
I also did use %@ include %, but I touched the main (including) jsp page and it recompiled. But the recompiled java file in the work dir (after deleting all stuff in work) was still the old java source Its a wierd problem !! Regards Shahed. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Repost : sendRedirect and KeepAlive problem
Sorry for this repost. I searched the mail archives and did not find anyone who has a problem similar to mine. I have an application which has a logout page that 1. invalidates the session 2. redirect the user back to the index.jsp page. When I click on the logout link, I get back to the index.jsp page, but the browser progress bar goes on and on. There is an image that is present on the page that does not load until the timeout is reached. I have tomcat 3.2.1 with mod_jk and ajp13 tied to apache 1.3.14 and jdk 1.3 on Solaris Intel. In my httpd.conf I have set KeepAlive to "on" I modified all my pages that use sendRedirect to have a return; immediatly after the call to sendRedirect(). However, I face this problem only on my logout page. Has this got something to do with the fact that I am invalidating the session ? I even removed the session.invalidate(), but I still face the problem on logout.jsp However, my other pages where I use redirection work fine. Any ideas ? TIA Shahed. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Performance Tip (maybe)
Hi, Hope this info is helpfull :- We were using tomcat 3.2.1 with Apache and mod_jk. Performance was not that good. I found a (patch/enhancment) to mod_jk on the developers list mail archive. http://www.mail-archive.com/tomcat-dev@jakarta.apache.org/msg04406.html I recompiled mod_jk and reconfigured httpd.conf, and there seemd to be a noticable performance increase. Regards Shahed. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: JDBC Connection Pooling
Not that I know of, but if you need a good db connection pool, look at the one from javaexchange.com I think its called DBconnectionBroker. Seems to be better than poolman. Regards Shahed. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Performance : mod_jk called multiple times ?
Hi, I am using Tomcat 3.2.1 with mod_jk / ajp13 under Solaris 8 on Intel with JDK 1.3 and Apache 1.3.14. I have 4 worker threads defined (2 ajp12 2 ajp13). These 2 pairs of workers service 2 virtual hosts. When I request a jsp page, I see a number of entries written to mod_jk.log (as below) The first entry seems to suggest that the request was serviced. However, after that there are multiple entries that suggest that control remain in mod_jk for a log time. Also, the cpu stats show a high % of i/o wait state during each jsp request. Is there some misconfiguration ? I have followed the mod_jk howtos and am running 2 JVM's for each virtual host. Any clues ? Thanks Shahed. [jk_uri_worker_map.c (344)]: Into jk_uri_worker_map_t::map_uri_to_worker [jk_uri_worker_map.c (406)]: jk_uri_worker_map_t::map_uri_to_worker, Found a mat ch ajp13a [jk_uri_worker_map.c (344)]: Into jk_uri_worker_map_t::map_uri_to_worker [jk_uri_worker_map.c (406)]: jk_uri_worker_map_t::map_uri_to_worker, Found a mat ch ajp13a [jk_worker.c (123)]: Into wc_get_worker_for_name ajp13a [jk_worker.c (127)]: wc_get_worker_for_name, done found a worker [jk_ajp13_worker.c (651)]: Into jk_worker_t::get_endpoint [jk_ajp13_worker.c (536)]: Into jk_endpoint_t::service [jk_ajp13.c (346)]: Into ajp13_marshal_into_msgb [jk_ajp13.c (480)]: ajp13_marshal_into_msgb - Done [jk_connect.c (108)]: Into jk_open_socket [jk_connect.c (115)]: jk_open_socket, try to connect socket = 9 [jk_connect.c (124)]: jk_open_socket, after connect ret = 0 [jk_connect.c (132)]: jk_open_socket, set TCP_NODELAY to on [jk_connect.c (140)]: jk_open_socket, return, sd = 9 [jk_ajp13.c (527)]: ajp13_unmarshal_response: status = 200 [jk_ajp13.c (534)]: ajp13_unmarshal_response: Number of headers is = 1 [jk_ajp13.c (576)]: ajp13_unmarshal_response: Header[0] [Content-Type] = [text/h tml;charset=8859_1] [jk_ajp13_worker.c (489)]: Into jk_endpoint_t::done [jk_uri_worker_map.c (344)]: Into jk_uri_worker_map_t::map_uri_to_worker [jk_uri_worker_map.c (344)]: Into jk_uri_worker_map_t::map_uri_to_worker [jk_uri_worker_map.c (434)]: jk_uri_worker_map_t::map_uri_to_worker, done withou t a match [jk_uri_worker_map.c (434)]: jk_uri_worker_map_t::map_uri_to_worker, done withou t a match [jk_uri_worker_map.c (344)]: Into jk_uri_worker_map_t::map_uri_to_worker [jk_uri_worker_map.c (344)]: Into jk_uri_worker_map_t::map_uri_to_worker [jk_uri_worker_map.c (434)]: jk_uri_worker_map_t::map_uri_to_worker, done withou t a match [jk_uri_worker_map.c (434)]: jk_uri_worker_map_t::map_uri_to_worker, done withou t a match [jk_uri_worker_map.c (344)]: Into jk_uri_worker_map_t::map_uri_to_worker [jk_uri_worker_map.c (344)]: Into jk_uri_worker_map_t::map_uri_to_worker [jk_uri_worker_map.c (434)]: jk_uri_worker_map_t::map_uri_to_worker, done withou t a match [jk_uri_worker_map.c (434)]: jk_uri_worker_map_t::map_uri_to_worker, done withou t a match - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
sendRedirect and KeepAlive Problem
Hi, I am using Tomcat 3.2.1 mod_jk ajp13 with Apache 1.3.14 on Solaris 8 Intel. I had the webserver configured so that KeepAlive was off. My App worked FINE. Now, when I turned it on, I am having all sorts of problems with pages that had a sendRedirect on them. I corrected the most common problem by adding a return; after every sendRedirect() call. Anyway I still have one problem. I have a logout.jsp page as below some html which is really not required % session.invalidate(); response.sendRedirect("/path/to/index.jsp page"); if(true) // Needed else i get an error saying statement not reached. return; % Anyway, now when I click on logout.jsp, I get redirected to index.jsp, but the image on the index page does not load. The browser progress bar just seems to move on and on very slowly until it finally times out. The index page also has some redirects on it, but they are within an if block. The control falls through to the end of the index.jsp page which is just plain html code. It seems that after serving up index.jsp, any further http get requests are hanging. (In this case for the href to an image ) Is it because the session is invalidated in this case as opposed to other pages where the session is still alive ? Any idea what is going on ? Thanks Shahed. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: Servlet init method called twice
I had exactly the same problem. However, it was with my config. I had setup the directory under webapps, and also as part of a host. So tomcat was loading the same application under (in my case) 3 different contexts. Check your server.xml and see. Also check your logs (tomcat.log I think and see if the same webapp is mounted more than once) Regards Shahed. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Unable to read more than 1 init param
Hi, I am using Tomcat 3.2.1 w/JDK 1.3 w/Apache 1.3.14 I have added a few init parameters for the SnoopServlet. However when I run it, I get only 1 parameter displayed. Is this some sort of bug ? My web.xml is as follows : Thanks Shahed servlet servlet-name snoop /servlet-name servlet-class SnoopServlet /servlet-class init-param param-namebar/param-name param-value sadsadasda /param-value param-namefoo/param-name param-value sdlfslkdjfkjdsflks /param-value /init-param /servlet - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
XML as Servlet Init Params
Hi, I would like to pass an xml string as a parameter to a servlet. I tried init-param param-namefoo/param-name param-value xml param /param /xml /param-value but this does not work. Any ideas ? Thanks Shahed - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: ClassCastException
Are you using an inner class for declaring MyObject ? I faced a similar problem when I daclared a class as below in a jsp page, create an object of type ax, saved it in a session, and retrived it in another jsp page which had the same %! class ax ...% code fragment. %! class ax { public int x; } % The problem is that you cannot cast inner classes as they are qualified by their enclosing class (AFAIK) Try moving class MyObject to a seprate .java file. Regards Shahed - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
getRequestDispatcher() does not return null
Hi, I am using Tomcat 3.2.1 w/JSK 1.3 on Intel Solaris w/Apache 1.3.14 I have he following fragment of code. RequestDispatcher rd = request.getRequestDispatcher(routeto); if(rd != null) { rd.forward(request,response); } else { System.err.println("Error : Cannot get Request Dispatcher"); } According to the 2.2 JavaDoc Returns a RequestDispatcher object that acts as a wrapper for the resource located at the given path. A RequestDispatcher object can be used to forward a request to the resource or to include the resource in a response. The resource can be dynamic or static. The pathname specified may be relative, although it cannot extend outside the current servlet context. If the path begins with a "/" it is interpreted as relative to the current context root. This method returns null if the servlet container cannot return a RequestDispatcher. Now , my resource in the routeto variable points to a non existant jsp page. However, I dont get a null. The JavaDoc is a bit misleading. How can I determine if the resource exists or not ? Thanks 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 form action="/servlet/controller" input type="hidden name=referer" value ="calling.jsp" /form 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]
Re: log files in tomcat
I have modified my tomcat.sh/bat file to have java org.apache.whatever.tomcat start 1/path/to/logs/stdout.log 21 So when you startup tomcat , the stdout and stderr go to a file. But since you are using windows, I am not very sure about the syntax. just a file.log may redirect both System.out.println and System.err.println to the same file. Hope this helps Regards Shahed. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
SOT : Object Pools
Sorry for this off topic post, but we are planning to use Tomcat as an Application server. Tomcat does not offer facilities that products like WebLogic etc offer i.e Connection Pooling etc etc etc. So does anyone know of a good Java Object Pool that can be used in conjunction with Tomcat ? (Not only for pooling JDBC connections, but also Statements/Prepared Statements etc etc and ResultSet caching) I have looked into PoolMan, but am not happy with it. Even the JBoss Minevera stuff does not look impresive. Any recomendations ? Thanks Shahed. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: BIZZAR Caching Problem !!
Title: RE: BIZZAR Caching Problem !! I have %@ include file, and I did go into the proper sub directory and do an rm and after reloading, I saw new .java and .class files, so Iwas obviously in the right work directory. I cannot do any further testing though, because I cannot recreat the problem !! Has anyone else seen this problem ? I would have loved to leave things as they were and experiment, but that would stop developers. So I had to restart tomcat. Hopefully, I hope to see the problem again, and then experiment. Also, I am using worker threads. i.e I have 1 JVM and tomcat instance for each app using ajp13 with multiple worker threads. But a common tomcat install directory. Thanks for any further input. Shahed - Original Message - From: Jord Sonneveld To: [EMAIL PROTECTED] Sent: Friday, January 26, 2001 11:50 AM Subject: RE: BIZZAR Caching Problem !! What happens if you rm -rf all directories under tomcat/work? Just to make sure that nothing wacky is going on because of your host tag. Also, do you have a %@ include file= ... % or a jsp: include page= ... / directive? Sounds like you have %@, but just want to make sure. And the content of a.inc and b.inc is distinct, correct? :) j\s -Original Message-From: Shahed Ali [mailto:[EMAIL PROTECTED]]Sent: Friday, January 26, 2001 12:21 PMTo: [EMAIL PROTECTED]Subject: Re: BIZZAR Caching Problem !! Yes, Your sequence of events is correct. The .jsp and work directories are local. And restarting tomcat solved the problem. There are a few things though. The server.xml is configured with my app setup under a host tag. the directory refered to by server.xml as docBase is a symbolic link to aonther dir on the same server. Regards Shahed Now, you are saying that the newly generated .java file refers to a.inc? Perhaps tomcat is de-compiling the .java from the class in memory :) Are your .jsp files mounted over NFS or any other remote file system?
RE: java.sql.SQLException: Io exception: Broken pipe
Yes, I was talking about database connection pooling. I am now using the pool manager from javaexchange. Pretty Good !!! (www.javaexchange.com) Regards Shahed. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Servlet API 2.3 Implementations
Hi, I remember someone on this list citing an opensource implementation of JSP / Servlets other than tomcat that implemented the 2.3 spec. Since TC 4 is still in beta, I would like to look at OpenSource (read as "free") alternatives to tomcat. Thanks Shahed. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
dynamically getting currently executing jsp page
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]
Tracking Session creation / destruction
Hi, Is there any way a java servlet can keep track (be notified via an event), when ever a new client session is created / destroyed ? Thanks. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Mod JK directives for Stronghold SSL
Sorry for being so persuasive about this but here goes :- I need to pass SSL info from Stronghold 3.0 to Tomcat. It seems the JK directives differ for various server implementations. Does anyone know the correct values for the following directives so that they are compatible with Stronghold 3.0 ? JkExtractSSL JkHTTPSIndicator JkSESSIONIndicator JkCIPHERIndicator JkCERTSIndicator Thanks Shahed - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
SOLVED : Apache / SSL / Tomcat
I finally got mod_jk to pass SSL info back to tomcat. I had forgot to uncoment the apache SSLOption directive :-( Thanks Shahed. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Servlet reloading
Hi, When tomcat reloads a servlet, does it call its init method ? Thanks Shahed - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Howto : Extension file mapping ?
Hi, Can someone please give me a quick overview on how extension file mapping works ? What I really want to know what info does the servlet get when it is invoked by a file mapping ? Thanks Shahed - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
jsp:usebean documentation
Hi, Where can I find documentation that acctually explains how the jsp:useBean tag works ? The Servlet API / JSP api are very complex. The JSP tag refrence does not explain the scope of the bean. For example I know that if I have a bean residing in the session and I use the usebean tag with the scope set to session, jsp will check first if the bean lives in the session and only then will it try to create it. What about page/ request and application scope ? I know that some books explain how all this works, or I can look the generated servlet code and understand, but what my point is where can I find the docs on the Web ? java.sun.com does not seem to have the docs explaning what I am looking for. Thanks Shahed. PS : I found the answer to my questions by look at the book "Professional JSP", but I hoped to find them online !! - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Passing SSL info from Apache to tomcat
Hi, I am using Tomcat 3.2.1 w/Apache 1.3.14. (Stronghold 3.0) I have set up client certificates on my client (web browser) and set the Apache directives for a browser to require client certificates to access the site. However, when I run the Snoop Servlet, I dont get a request attribute named "java.security.cert.X509Certificate" I have added the Jk directives wich are present in the mod_jk.conf-auto file relating to SSL in my httpd.conf file. Can anyone tell me what I am missing ? Thanks Shahed. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: Multiple Tomcat instances on one machine
can I just have one common set of binaries with multiple server.xml and other configuration files? Bill Yes. I have the same config and it works fine. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: Tomcat 3.2.1 Source Tar Corrupt?
I got the same error, but I just ignored the error, built mod_jk from the source and its has been running fine for me for the last month. Regards Shahed tar: directory checksum error Any help appreciated. Thanks, Bill - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Servlet API error: sendError with commited buffer
Hi, Can anyone tell me why do I get the above error in tomcat.log ? It happens whenafter I runa jsp page, I change the protocol to https: and reload the page. Thanks Shahed.
TC 3.1 Sessions / http https
Hi, I am using Tomcat 3.1 w/JDK 1.3 on Intel Solaris 8 with StrongHold web server (Apache 1.3.14) I have a webcontext and 2 AjpServMount directives, both pointing to the same webapp. One mount is in the Virtual Host of Apache, and the other in the default server. When I create a session variable under thecontext and access it via http:// , it is not visible under https:// How can I share the session under both http and https ? I dont think I had that problem when I used TC 3.2.1 and used NamedVirtualHost in Apache. However, is there anyway to get it to work with TC 3.1 ? Thanks Shahed
Session Object Serailization
Hi, Does tomcat seralize session objects ? 1. If it does, and I have non serializable objects like SQL Connections sitting in my session, then what should I do ? 2. If it does not, and I have a lot of sessions lying around, then will tomcat crash due tomemory limitations ? Thanks Shahed
Re: Session Object Serailization
Hi, Thanks for the insight, but what I meant was will Tomcat automatically serialise a session if it grows too large ? Or will it do so only if the server is ready to shutdown. Ido NOTwant my session data to be serailzed without my knowing . Thanks Shahed. -Original Message-From: Craig R. McClanahan [EMAIL PROTECTED]To: [EMAIL PROTECTED] [EMAIL PROTECTED]Date: Tuesday, January 02, 2001 4:45 PMSubject: Re: Session Object Serailization Alef Arendsen wrote: can't you make any object that you cannot make serializable just TRANSIENT so it won't cause any problems??? alef You can do this, *if* you have control over the source of the classes in question, and *if* the class will still operate correctly after the object is reloaded, and the transient instance variable has a null value instead of pointing at something real. I suspect neither of these is likely to be the case for a JDBC driver that you are using. For example, most JDBC drivers have a buried reference to a java.net.Socket inside their Connection implementations, which is required to perform TCP/IP reads and writes to the database server. If you mark this variable transient, it will be initialized to null when the object is deserialized and reloaded, so you'll start getting NullPointerException errors -- since the rest of the driver assumes that the socket was initialized at open() time and will not be erased until close(). Craig McClanahan
encodeRedirectURL in TC 3.1
Hi, I am using Tomcat 3.1 standalone on Intel Solaris 8 and JDK 1.3. When I send a response.encodeRredirectURL("page.jsp?Msg=This is a Message"), it does not convert the spaces in Msg=. I tested with Netscape 6 on Linux. I searched BugRat, but could not find a match. Is this a known Bug ? Thanks Shahed.
Init() being called 3 times
Hi, I am loading a servlet on startup. In the init(), I have a setting some system properties, and doing some logging. When I inspect the logs, its seems that the init method is called exactly 3 times. Any idea whats going on ? I am using Tomcat 3.2.1 w/Apache 3.1.14 on Solaris 8 Intel w/JDK 1.3 Thanks Shahed.
Host Multiple Contexts
Hi, I have a host entry in my server.xml pointing to a webapp. This webapp is in the webapps directory. When I start tomcat, it loads 2 contexts each refering to the same application. one is webapps/myapp and the other is www.host.com I have now moved my app to a separate directory, and only one context is created. But is there any way to tell the context mamager not to load a directory under webapps as acontext by default ? Thanks Shahed.
Howto compile mod_jserv ?
Hi, I tried searching the FAQ, but cant seem to find how to compile mod_jserv.so. I have downloaded the tomcat 3.1.1 source. Where can I find the command to compile the so and with expanations of any compile flags that are used ? Thanks Shahed.
HANDLER THREAD PROBLEM: java.lang.NullPointerException
I get these errors sometimes, can cant figure out what the problem is. Can someone tell me where should I start looking ? Thanks Shahed HANDLER THREAD PROBLEM: java.lang.NullPointerExceptionERROR: can't find default error handler or error in default error page
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.
Re: Disable session cookies
I tried doing this, but my app which uses a session variable to check if a user has logged into the site still does not work. Where can I find a full description of this tag ? Also, will it work seamlessly for response.sendRedirect("http://www.myserver.com/page.jsp") and a href="page.jsp"/a ? Thanks Shahed. -Original Message- From: Craig R. McClanahan [EMAIL PROTECTED] To: [EMAIL PROTECTED] [EMAIL PROTECTED] Date: Thursday, December 21, 2000 12:27 PM Subject: Re: Disable session cookies Which version of Tomcat are you using? Tomcat 3.1 doesn't support this feature. In Tomcat 3.2, search the "conf/server.xml" file for the "noCookies" attribute and set it to true. Greetings Ralf Craig McClanahan
Load Balancing / multiple mount points
Hi, I am trying to load balance a virtual host running on apache 1.3.14 with tomcat 3.2. I have setup multiple worker threads and have Multiple JkMount points for the same virtual host pointing to the same mount point. i.e I have the following directives under the same apache virtual host (mapped to tomcat context) directive. JkMount /*.jsp ajp13a JkMount /*.jsp ajp13b JkMount /*.jsp ajp13c I am running multiple instances of Tomcat from the same TOMCAT_HOME, but with different server.xml files and each server.xml file has its own log and work directories and the workers listen on different ports. Is this an acceptable way of doing Load Balancing for 1 website / context ? Are there any docs on how to detrmine the load balance factor etc ? 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 had2 webapp 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.
Re: One virtualhost per webapp
Tomcat 3.2 has a HOST directive. Use that. I am doing just what you are trying to do and running only 1 instance of Tomcat. Regards Shahed. -Original Message- From: Angel Aray [EMAIL PROTECTED] To: [EMAIL PROTECTED] [EMAIL PROTECTED] Date: Tuesday, December 12, 2000 11:15 PM Subject: One virtualhost per webapp Hi everyone, I've got a couple of applications running on tomcat and I would like each of them to run on a separate apache VirtualHost so than when I point the browser to http://appA.domain.com/index.jsp it is mapped to context /appA and http://appB.domain.com/index.jsp it is mapped to context /appB on the same tomcat instance. It seemed simple at first but I've had a tough time trying to get it to work. I've read the mod_jk howto several times but nothing there seems to help. The mod_jserv info on the apache user guide has something close but it says that you need to run each context on its own JVM and I would prefer not to do that. Any ideas of how to do this? Regards, Angel Aray.
Qs on Load Balancing and JkMount
Hi , All the examples and archive messages that I have seen so far talk about load balancing using either multiple JVM's or Multiple Connector Directives with different port numbers and corrosponding workers in the workers.properties file. But they all use different Mount Moints for each worker ! However my need is to Load Balance a *SINGLE MOUNT POINT* ( A single Virtual Apache Hostcorrosponding to aHost (context) in server.xml ) i.e I want http://ww.mysite.com/*.jsp to be load balanced by 4 worker threads. I am currently using 4 JkMount Directives, and the server is up and running. i.e JkMount /*.jsp ajp13 JkMount /*.jsp Xajp13 JkMount /*.jsp Yajp13 JkMount /*.jsp Zajp13 Also if I name the workers ajp13a , ajp13b and ajp13c, apache does not start and gives me an error saying that it cannot find the workers file !!! Anyway, my question are :- 1. Is this the right way to have a single mount point load balanced ? 2. If so, is it a good idea to run the tomcat instances in the same JVM ? Or should I run multiple tomcat/JVM instances on the same / different servers ? Thanks Shahed.
Re: Custom error pages!!
I dont know about the specs, but I think all errorpages need the iserrorpage = true page directive. So that could mean that they should be .jsp (?) Shahed
Apache SOAP 2.0 w/Tomcat 3.2
Hi, I know that this must have come up before, but can any one tell me if I can safely run Tomcat 3.2 with Apache SOAP 2.0 (latest version) I remember postings in the dev list talking about class loader problems when it came to loading the XML parsing classes used by Tomcat Vs Apache Soap. Is there something that I need to look at, or is the installation pretty straight forward ? 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 Connector 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.