cancel
Showing results for 
Search instead for 
Did you mean: 

Not able to change or modify any JSP page

neha_mahanty
Active Participant
0 Kudos

Hi All,

I am working on NWDS. I am facing some problems, its like when I am changing or modifying any JSP which is in my application, I am not able to see the change reflected when I run the application. The Jsp are not getting changed.

I was able to work properly earlier suddenly it has started giving this trouble.

Any ideas please sugget

Thanks and Regards

Neha Mahanty

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

Adding to Oliver's comments, if you are using normal JSP's in your application, then the JSP's are compiled only once when they are accessed and put into WORK folder under MI.

Now if you change any normal JSP and restart your MI and then try to look for the change, it will not be reflected because in WORK folder the older compiled version of JSP still exists and due to performance reasons, the tomcat server doesn't do a recompilation if it founds already a compiled class of JSP.

So whenever you want to change the norma JSP directly, just stop the MI, do the change in JSP, delete the entire contents in the work folder and now restart your MI to see the changes in JSP.

Best Regards,

Siva.

PS:Reward with points if you find the post useful.

Former Member
0 Kudos

Hi Shiva,

are you really sure about it? If I check Tomcat coding and MI server coding - It does a check if the date of the JSP is younger then the date of the compiled version in WORK folder and it does a recompile afterwards if it is the case. The problem: sometimes this test failes completely for some reasons - that was the reason why I asked him to delete the WORK folder already. But in normal case this is not necessary. Or has the latest version a different behaviour here? The source of my MI client is MI7.0 with - I think - SP12 or SP14 - not exactly sure.

Regards,

Oliver

Former Member
0 Kudos

Hi Oliver,

I am not really sure about the exact behaviour of MI client/Tomcat now, but as far as I know with my past experience, whenever i changed the JSP file and if i start MI client without deleting WORK folder, it never used to reflect my changes.

So only after deleting the work folder, my changes to JSP's were getting reflected. So thats how I could comment on it with my past experience and I experienced this behaviour with both MI 2.5 and MI 7.0 some time back.

Regards,

Siva.

neha_mahanty
Active Participant
0 Kudos

HI All,

Thanks a lot for your response. Yes earlier I had selected the check box for add JSP as compiled classes and it has created the additional $jsp folder.

I followed all the steps you all told. I deleted the content from the data folder, and also deleted $jsp folder.

and now a new problem.. I am getting build erros

Error: Missing required source folder : ZMAU/$jsp

Thanks and Regards

Neha Mahanty

chintan_virani
Active Contributor
0 Kudos

Neha,

Check the project .classpath in Navigator tab in NWDS and remove the erroneous entry from there.

Chintan

Former Member
0 Kudos

Hi,

yes, this is correct so far. Simply build the WAR file again and check the box to keep the generated JSP files. This will cure the issue by itself, cause the folder is there again.

To understand the issue: In the project preferences, you have the build path for the project. In there you can tell Eclipse where you place your source files. The compilation of JSP files takes place in two steps: first you create a JAVA file out of the JSP - then this Java file gets compiled to CLASS files. The JAVA files are placed in the $JSP folder, so MDK adds this folder to the BUILD properties in Eclipse as source folder. If you want to live without this folder, simply open the project settings, go to the bild path and remove the $JSP path from there. This will cure the issue as well.

I would never recommend to change the textfile otself, cause this could destroy its structure and the complete project woill be useless afterwads. Beside that, you need to close Eclipse, search for the file, open it,..... why this when you can do it directly inside Eclipse.

Hope this helps!

Regards,

Oliver

chintan_virani
Active Contributor
0 Kudos

Oliver,

How can removing one line of erroneous entry damage the file structure!!!!.

Changing the .classpath is possible to do within NWDS and you don't need to search the file. YOu open the navigator tab in MI perspective and you can locate and edit the file from within NWDS.

Am I wrong here?

Chintan

Former Member
0 Kudos

Hi,

but if you change the file inside Eclipse, the new values are only read after restart of Eclipse. So my issue was: why not use the tools Eclipse delivers to do that. If you simply delete the incorrect entry - for sure this will not cause any harm. But you know how it is: you delete one row, someone on the phone, press delete button once again, a simple > char was deleted and you save it - after this the strvutre is destroyed and you have to search for this missing char. Well, that was the reason for my comment - simply inside Eclipse it is more safe and you can do it wirhout reatart.

Beside that your comment is totally and absolutely correct!

regards,

Oliver

chintan_virani
Active Contributor
0 Kudos

Oliver,

Thanks for the constructive criticism (if I can say so )

Chintan

Former Member
0 Kudos

Hi,

well, most likely you have entered: Pre Compile JSP together with the flag: keep generated JSP.

In that case MDK generates the $JSP folder as source folder. It happens form time to time, that the JSPs get not compiled again for some strange reasons. What to do: delete the $JSP folder and build the WAR file again. this should helps. How do you deploy? Just rename the source file in your WEBAPPS folder and put the WAR file into the folder. Then empty WORK folder completely and restart MI. This will deploy the latest app and it should work then.

Hope it helps to solve the issue.

Regards,

Oliver