Originally posted by B Mampilli: Hi, I have a jsp which i need to forceible translate and recompile everytime it is accessed. Is there any method of doing that? Regards, Boney
You can call the jsp with the parameter jsp_precompile. Have a look at it in the specification. I'm just wondering the reason of why you want to do that. It'll mean that every request will behave as if it is the very first one. And you know that the container will have to translate/compile/load (if it hasn't) the jsp again. This will become really slow..
I'm not going to be a Rock Star. I'm going to be a LEGEND! --Freddie Mercury
Hi, The jsp_precompile option is used to precompile a jsp before its use so that subsequent accesses to the jsp would not result in a time delay. But this is exactly what I want. I want that every time a JSP is requested for it should be re-translated and recomplied. I will explain the scenario where I need it. It's a bit long and complicated but stay with me. I have a main page. The name of the main page is mainframe.jsp. mainframe.jsp contains three frames in it. The three frames have source (src) specified as topframe.jsp, middleframe.jsp, and bottomframe.jsp. So whenever mainframe.jsp is called, it inturn calls topframe.jsp, middleframe.jsp, and bottomframe.jsp and loads them in the mainframe page. In topframe.jsp, I have an text field. Whenever the user enters text into it, and submits the form, the form goes to a servlet for some database entries and then comes back and loads mainframe.jsp. This time, there is some scriptlet in middleframe.jsp which retireves the values from the database and displays it. Now the problem: When middleframe.jsp is called, there is no change in the middleframe.jsp so the new values from the database are not displayed. It displays the previously displayed mainframe.jsp page again. So, I need some method by which I can forcebile, translate and compile mainframe.jsp everytime it is accessed.
Hi, I really wonder if it is problem of recompiling jsp,if value is picked from database then just refreshing jsp will do the needful :roll: . I m eager to know if it is working fine with precompile option Cheers Praful
All desirable things in life are either illegal, banned, expensive or married to someone else !!!
You probably have a caching problem. Causing the JSP to re-translate is like using nuclear weapons to crack walnuts. Find out why your page is not updating with the new data and fix the real problem. bear
how do i refresh a jsp? if it is by calling it, then it is not working.. Wandering thoughts... The problem could be cause I am using frames, but i have to use frames so no option... logically i feel that using frames should not cause a problem.
Well.. got the solution.. the problem was in using frames... In frames if we have a form then when we specify the action element of the form, we also need to specify an element target. The target element specifies where the output should be displayed. so i set the target of topframe.jsp to the mainframes.jsp and pronto.. it works.... Spent more than half a day on this .. but i good learning....
Thanks for all your quick suggestions and help. Appreciated.