why jsp pages must be parsed again when the wls7 restart?? Now I'm using the webloigc application server 7.0 as a web server.I deploy my web app on it,but when I restart the server again,the jsp pages must be must be parsed again,even if I the pages had been parsed on last. I found the weblogic7 like to delete the directory "%wls_home%/user_projects/mydomain/myserver/.wlnotdelete",so my jsp pages must be parsed again. Now,What can I do for this,Can you tell me how to deal with.Thanks.
I believe you can set your server's staging mode to "no-stage" and I think that will fix this. I think if you restart the server and staging mode is "stage", then it restages the application and that triggers a jsp recompile. I think this is right, but it has been a while since I tried it. If that doesn't work, you can set the working directory in the jsp-param of weblogic.xml. That will cause generated classes go go somewhere YOU choose rather than in some .wlnotdelete place under server control. Or, you can precompile your jsps to classes using weblogic.jspc before you start the server. Output the jsp classes to WEB-INF/classes of your webapp. This is a good choice if you are not changing your jsps much.
Thanks! But the method what you tell me can't solve the problem.I set the server's staging mode to "no-stage" and even set the jsp workingDir to a new directory.but the jsp pages must be parsed again,and the WLS delete the new jsp working dir againt.I don't want to use precomiler method,beause i don't waste much time in debugging the wap app.
Yea. Sorry. I just tried it and you are right. no-stage doesn't help this. My memory must be going :/ But if you set the jsp-param for workingDir in weblogic.xml that does keep jsps from begin recompiled when you restart the server. Just set it to where-ever you'd like the jsp clsss files to go and the server won't delete it when it restarts. For example, you could set workingDir to point to your webapp's WEB-INF/classes.
You don't need keepgenerated. That causes the .java files to be kept, which you don't need unless you just want to look at them. All you need is the class files, which will go in workingDir automatically. The only reason I ever used keepgenerated was to help track exception line numbers back to the original jsp (exception file names and line numbers refered to the generated source, not the jsp). But that is not necessary any more. In WLS 7, if you set the jsp-param called debug to true, then WLS will rewrite the debug information in the generated class files to refer to the jsp. So, with this option on, all your exceptions will have line numbers and file names refering to the original jsp file rather than the obscure generated java.
Yes, WLS 7 changed the deployment mechanisms from what were there in 6.x. The changes make the server work better in production (especially with clusters), but those same changes sometimes make developers change some settings to make development mode more convenient. For example, WLS 6.x stored the compiled jsp class files in the webapp's WEB-INF/classes directory. But that causes problems in production (like: "Hey, don't write to my application!"). Also, it was easier for 6.1 to get out of sync when you have lots of servers doing the same thing (cluster). So some directories were moved around, and that caused your problem. Glad things are working for you now.