-
1. Re: Working around jsps recompiling all the time
frodeh Aug 20, 2003 4:50 PM (in response to pascalpt)You could delete the jsp-servlet from the default config, but then You have to remember it in every app-config. (web.xml for each app)
-
2. Re: Working around jsps recompiling all the time
pascalpt Aug 20, 2003 9:38 PM (in response to pascalpt)I'm not sure I understand your reply. What do you mean by delete the jsp-servlet from the default config?
-
3. Re: Working around jsps recompiling all the time
frodeh Aug 21, 2003 12:07 AM (in response to pascalpt)In the jbossweb-tomcat.sar/web.xml there is a servlet-config for handling requests to JSP-files (the servlet-config where you set scratch-dir parameter).
You can comment out this config completly in this file, and include it in the web.xml for your app. But you will have to include it in all the apps that uses JSP's, otherwise those won't get compiled... -
4. Re: Working around jsps recompiling all the time
frodeh Aug 21, 2003 4:16 AM (in response to pascalpt)I have tested a bit more, and found one easier way..
In the WEB.XML for your app, you create a servlet like this :
<servlet-name>jsp2</servlet-name>
<servlet-class>org.apache.jasper.servlet.JspServlet</servlet-class>
<init-param>
<param-name>logVerbosityLevel</param-name>
<param-value>WARNING</param-value>
</init-param>
<init-param>
<param-name>scratchdir</param-name>
<param-value>(Your path)</param-value>
</init-param>
<load-on-startup>3</load-on-startup>
and map it like this :
<servlet-mapping>
<servlet-name>jsp2</servlet-name>
<url-pattern>*.jsp</url-pattern>
</servlet-mapping>
Note that you cannot name it JSP, since this servlet-name is already taken, but you can specify the same mapping, and this mapping will override the default one... -
5. Re: Working around jsps recompiling all the time
pascalpt Aug 21, 2003 3:54 PM (in response to pascalpt)It works fine. Thanks.
I didn't like having to hard-code a path in the web.xml because it's better to not have to edit the web.xml file every time you go to a different machine. It turns out that a relative path will start you in the bin directory of jboss so putting "../temp/app_name" gives me a nice place to put the file that's machine (and OS) independent.
Though my problem is solved, it still feel kludgy to have to do it that way. It would be nicer to have one of the following solutions:
1. A way to tell jboss not to delete compiled jsps on redeploy
2. Prepend the application name in the temp directory. Is there one example where that would break anything? Jasper should be smart enough to isolate the applications without me having to do it manually.
The current approach will do for now, thanks again for your help.
Pascal -
6. Re: Working around jsps recompiling all the time
gmoore1 Sep 8, 2003 9:03 AM (in response to pascalpt)I am confused on this issue as well. There is an attribute that can be set in the <server-dir>/deploy/jbossweb-tomcat.sar/META-INF/jboss-service.xml that prevents the tmp deployments from being deleted. This is where the compiled JSP servlets are generated. When not present (the default) the value defaults to true
The attribute to set
false
has no effect????
Is this a bug, or am I missing something???