Is there a bug in Tomcat 4.0 - MY JSP PAGES Does not get Refreshed every time I make changes to them -
Hi All, I am using Tomcat 4.0 and my jsp pages do not get refreshed i.e. the JSP engine does not check to see if the JSP has been changed at all. All I need to do is remove the class files from the work directory and then I can see the new changes. I request if any, can help me understand if I need to add any to my web.xml or to the server.xml to tell the JSP Engine to check for updated or changed JSP's every time. I used Tomcat 3.2 and have no problems with the similar situation. Thanks for your help in Advance. Praveen Moturu
Re: Is there a bug in Tomcat 4.0 - MY JSP PAGES Does not get Refreshed every time I make changes to them -
This bug existed in beta 5, and was fixed shortly thereafter in a nightly build. It's also fixed in beta 6. If you're still experiencing problems with beta 6, please file a bug report: http://nagoya.apache.org/bugzilla/ Craig McClanahan On Tue, 24 Jul 2001, Praveen Moturu wrote: Hi All, I am using Tomcat 4.0 and my jsp pages do not get refreshed i.e. the JSP engine does not check to see if the JSP has been changed at all. All I need to do is remove the class files from the work directory and then I can see the new changes. I request if any, can help me understand if I need to add any to my web.xml or to the server.xml to tell the JSP Engine to check for updated or changed JSP's every time. I used Tomcat 3.2 and have no problems with the similar situation. Thanks for your help in Advance. Praveen Moturu
Re: tomcat-4.0 and JSP class reloading
i was litlle un detailed sorry but i try to explain. This can be test with Tomcat 4.0 b6-dev (last week CVS version at least i haven't see this to be fixed) make app dir like test/ then create index.jsp. make some class like test.testIt that context is like package test; public class TestIt public TestIt } public int getNumber(){ return 303 } public String getString(){ return TestString } } and turn reloading on to test/ context then create servlet that uses this Class [test.TestIt] (i think you know how to do it) make it print number and string to HTML page. then do same to index.jsp (i all so think you can do it) then compile these to test/WEB-INF/classes and run tomcat. then Look what you have there (what are outputs) and changes those string and number and recompile classes. after about 15 secs servlet has new context but JSP doesn't. I allready have fix this and submit a patch but now one have replyed anything:) it's just a little bug there.. Tuukka ps. need for more details?? pss. if someone allready has this fixed he/she is really glad because this BUG forces to stop Tomcat and reload it again everytime when Classes that belongs to JSP changes. I have spent to much time waiting:P --- --Me olemme keskella jotain. jossa olemme totaalisen ulkopuolisia-- On Wed, 30 May 2001 10:46:39 Craig R. McClanahan wrote: On Wed, 30 May 2001, Tuukk4 |[:)-| p4s4n3n wrote: hey, Is anyone fixing that point? Problem is that JSP doesn't reload classes when servlet container in same context does? Can you provide a small example that illustrates this? Tuukka Craig McClanahan Get 250 color business cards for FREE! http://businesscards.lycos.com/vp/fastpath/
Re: tomcat-4.0 and JSP class reloading
See below. On Thu, 31 May 2001, Remy Maucherat wrote: i was litlle un detailed sorry but i try to explain. This can be test with Tomcat 4.0 b6-dev (last week CVS version at least i haven't see this to be fixed) and turn reloading on to test/ context then create servlet that uses this Class [test.TestIt] (i think you know how to do it) make it print number and string to HTML page. then do same to index.jsp (i all so think you can do it) then compile these to test/WEB-INF/classes and run tomcat. then Look what you have there (what are outputs) and changes those string and number and recompile classes. after about 15 secs servlet has new context but JSP doesn't. I allready have fix this and submit a patch but now one have replyed anything:) it's just a little bug there.. Tuukka ps. need for more details?? pss. if someone allready has this fixed he/she is really glad because this BUG forces to stop Tomcat and reload it again everytime when Classes that belongs to JSP changes. I have spent to much time waiting:P Ok, I understand the bug a bit better now. To fix it, I would always load the external classes using the thread's context class loader instead of trying to keep an up to date reference on it, using something like : RCS file: /home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/servlet/Jasp erLoader.java,v retrieving revision 1.3 diff -r1.3 JasperLoader.java 174c174 // Class is in a package, delegate to parent --- // Class is in a package, delegate to thread context class loader 176c176,177 clazz = parent.loadClass(name); --- clazz = Thread.currentThread().getContextClassLoader() .loadClass(name); [ Note : Since the parent is now not used anymore, a lot of useless code should be removed. ] I'm not a Jasper guru, so I don't know if it's a good idea to do this. Remy I'm not sure this proposed change would really make any difference. The parent classloader here is the web app classloader already, which is the same thing that the context class loader is set to. NOTE: If we do something like this, we need to make sure that getResource() and getResourceAsStream() work in JasperLoader as well. I'll do some more investigation today. Craig
Re: tomcat-4.0 and JSP class reloading
Quoting Craig R. McClanahan [EMAIL PROTECTED]: See below. On Thu, 31 May 2001, Remy Maucherat wrote: I'm not sure this proposed change would really make any difference. The parent classloader here is the web app classloader already, which is the same thing that the context class loader is set to. NOTE: If we do something like this, we need to make sure that getResource() and getResourceAsStream() work in JasperLoader as well. I'll do some more investigation today. Apparently, the problem was that the parent reference wasn't reset after reloading. So using a dynamic call would solve this. Remy
Re: tomcat-4.0 and JSP class reloading
On Thu, 31 May 2001 12:40:34 Remy Maucherat wrote: Quoting Craig R. McClanahan [EMAIL PROTECTED]: See below. On Thu, 31 May 2001, Remy Maucherat wrote: I'm not sure this proposed change would really make any difference. The parent classloader here is the web app classloader already, which is the same thing that the context class loader is set to. NOTE: If we do something like this, we need to make sure that getResource() and getResourceAsStream() work in JasperLoader as well. I'll do some more investigation today. Apparently, the problem was that the parent reference wasn't reset after reloading. So using a dynamic call would solve this. Remy hey, I can show point because i know i have been workin on this problem a while (2 weeks). Main problem is in org.apache.catalina.loader.StandardLoader in setClassLoader() method and there in if (servletContext instanceof ApplicationContext) ((ApplicationContext) servletContext).setAttributeReadOnly (Globals.CLASS_LOADER_ATTR); Because this preverts ClassLoader rereshing for Jasper (One can write only once). Then we have to 'ReLoad' reloaded ClassLoader in org.apache.jasper.servlet.JspServlet e.g in loadJSP(String jspUri, String classpath, boolean isErrorPage, HttpServletRequest req, HttpServletResponse res) Because Jasper's ClassLoader doesn't point to our new ClassLoader URLClassLoader classLoader = (URLClassLoader)context.getAttribute(Constants.SERVLET_CLASS_LOADER); if(classLoader != parentClassloader){ ..Do the securing stuff.. } and make little If whether it has changed or not. this is simpliest Answer and were the 'problem' is. after this everything has worked for me just fine:) Tuukka ps. I can submit a patch:) Get 250 color business cards for FREE! http://businesscards.lycos.com/vp/fastpath/
tomcat-4.0 and JSP class reloading
hey, Is anyone fixing that point? Problem is that JSP doesn't reload classes when servlet container in same context does? Tuukka --- --Me olemme keskella jotain. jossa olemme totaalisen ulkopuolisia-- Get 250 color business cards for FREE! http://businesscards.lycos.com/vp/fastpath/
Re: tomcat-4.0 and JSP class reloading
On Wed, 30 May 2001, Tuukk4 |[:)-| p4s4n3n wrote: hey, Is anyone fixing that point? Problem is that JSP doesn't reload classes when servlet container in same context does? Can you provide a small example that illustrates this? Tuukka Craig McClanahan
RE: Tomcat 4.0 and JSP
Maybe he was concerned about users like you. -Original Message- From: John Golubenko [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 14, 2001 07:43 Why would you complain about HTML mail, if you using M$ software (outlook)? If you were the person like me, the Linux user, then I'll understand. ;) Original Message On 2/13/01, 10:19:16 PM, "Remy Maucherat" [EMAIL PROTECTED] wrote regarding Re: Tomcat 4.0 and JSP: How in apache do I get all my .jsp files to be executed by tomcat. Even when I use the WebAppMount, the servlets work, but it won't execute the jsp. Basically I don't car about servlets, I just want my server to recognize any *.jsp and have tomcat 4.0 execute without having to specify a port in the URL like 8080. There are a few things I would do : - Don't send HTML mails to mailing lists ;) - You can run TC 3.2 with Apache just fine. mod_webapp is very alphaish right now. - You can run TC 4.0 standalone. The port on which the HTTP connector runs can be changed in the conf/server.xml file (so set it to be 80 instead of 8080). Remy - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: Tomcat 4.0 and JSP
1) It's a good habit to get into. HTML mail is evil, wastes bandwidth and most mailers won't format it. 2) If you post html to say, [EMAIL PROTECTED], you would get flamed so hard your mailbox would be filled for months to come. 3) JUST DON't DO IT! Oh, and wrap at 76 characters too please :-) -Thom * John Golubenko ([EMAIL PROTECTED]) wrote on Wed Feb 14, 2001 at 06:42:45 +: Why would you complain about HTML mail, if you using M$ software=20 (outlook)? If you were the person like me, the Linux user, then I'll understand. ;)= Original Message On 2/13/01, 10:19:16 PM, "Remy Maucherat" [EMAIL PROTECTED] wrote regard= ing=20 Re: Tomcat 4.0 and JSP: How in apache do I get all my .jsp files to be executed by tomcat. Even when I use the WebAppMount, the servlets work, but it won't exe= cute the jsp. Basically I don't car about servlets, I just want my serve= r to recognize any *.jsp and have tomcat 4.0 execute without having to= specify a port in the URL like 8080. There are a few things I would do : - Don't send HTML mails to mailing lists ;) - You can run TC 3.2 with Apache just fine. mod_webapp is very alphais= h right now. - You can run TC 4.0 standalone. The port on which the HTTP connector = runs can be changed in the conf/server.xml file (so set it to be 80 instead= of 8080). Remy - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Tomcat 4.0 and JSP
How in apache do I get all my .jsp files to be executed by tomcat. Even when I use the WebAppMount, the servlets work, but it won't execute the jsp. Basically I don't car about servlets, I just want my server to recognize any *.jsp and have tomcat 4.0 execute without having to specify a port in the URL like 8080. Here is my current apache httpd.conf virtual host. VirtualHost 192.168.1.101 ServerName www.jefetech.comDocumentRoot /home/httpd/htmlErrorLog /home/httpd/jefetech_error.logWebAppConnection warpConnection warp 192.168.1.101:8008WebAppMount examples warpConnection /examples/ /VirtualHost Thank you so much for your time, Jeff
Re: Tomcat 4.0 and JSP
How in apache do I get all my .jsp files to be executed by tomcat. Even when I use the WebAppMount, the servlets work, but it won't execute the jsp. Basically I don't car about servlets, I just want my server to recognize any *.jsp and have tomcat 4.0 execute without having to specify a port in the URL like 8080. There are a few things I would do : - Don't send HTML mails to mailing lists ;) - You can run TC 3.2 with Apache just fine. mod_webapp is very alphaish right now. - You can run TC 4.0 standalone. The port on which the HTTP connector runs can be changed in the conf/server.xml file (so set it to be 80 instead of 8080). Remy - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: Tomcat 4.0 and JSP
Why would you complain about HTML mail, if you using M$ software (outlook)? If you were the person like me, the Linux user, then I'll understand. ;) Original Message On 2/13/01, 10:19:16 PM, "Remy Maucherat" [EMAIL PROTECTED] wrote regarding Re: Tomcat 4.0 and JSP: How in apache do I get all my .jsp files to be executed by tomcat. Even when I use the WebAppMount, the servlets work, but it won't execute the jsp. Basically I don't car about servlets, I just want my server to recognize any *.jsp and have tomcat 4.0 execute without having to specify a port in the URL like 8080. There are a few things I would do : - Don't send HTML mails to mailing lists ;) - You can run TC 3.2 with Apache just fine. mod_webapp is very alphaish right now. - You can run TC 4.0 standalone. The port on which the HTTP connector runs can be changed in the conf/server.xml file (so set it to be 80 instead of 8080). Remy - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]