This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Websphere and the fly likes JSP changes does not reflect Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Products » Websphere
Bookmark "JSP changes does not reflect" Watch "JSP changes does not reflect" New topic
Author

JSP changes does not reflect

Deepak Vadgama
Greenhorn

Joined: Jul 02, 2007
Posts: 29
I am using Websphere 5.1 Test Environment
I have a jsp named "header.jsp" included in all other jsps.

<%@ include file="../common/header.jsp" %>

When i change header.jsp i expect the changes to be reflected in all jsps
But its getting reflected only in single jsp

The "Build Automatically" option is enabled.
The server is in Debug mode
I tried re-building the project, and restarting the project and also restarting the server but no luck

Could you please help me out

Thank you in advance


-- deepak <br />SCJP 5.0, SCWCD 5.0
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 30138
    
150

Deepak,
A JSP is only recompiled when the JSP changes. Your outer JSPs don't know that the header changed.

You can delete the compiled JSPs from the WebSphere test server to clear this cache. This will force a recompile for all JSPs which will reflect your header changes.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
Deepak Vadgama
Greenhorn

Joined: Jul 02, 2007
Posts: 29
Hi Jeanne,

Thanks a lot for the information, i didn't know that, JSP (included one) changes are not detected automatically by the server.

Could you please also tell me how do i clear the server cache.
I have Websphere Application Server 5.1 Test Environment.

I went through some sites, to find the steps to clear the cache.
Do i need to install cachemonitor application on my server, or is there any simpler way.

Thank you in advance.
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 30138
    
150

Originally posted by Deepak Vadgama:
Could you please also tell me how do i clear the server cache.
I have Websphere Application Server 5.1 Test Environment.

I used to know this off the top of my head, but I've been on RAD 6 for too long and they've changed how to do it. It's just a directory on disk though. Try searching your hard drive for the name of your JSP. I vaguely remember in being under workspace/.plugins/.metadata, but it might have been under the install directory.


I went through some sites, to find the steps to clear the cache.
Do i need to install cachemonitor application on my server, or is there any simpler way..

CacheMonitor is for WebSphere command caching. It does not empty the JSP cache.
Deepak Vadgama
Greenhorn

Joined: Jul 02, 2007
Posts: 29
Hi Jeanne,

You were right. I searched for files with same names as my jsps on my disk, and found that the jsp cache(java/class files) resides at following path

Workspace\.metadata\.plugins\com.ibm.wtp.server.core\tmp0\cache\localhost\server1\EAR\war\

After deleting the class files, i ran the application, and now all jsps are reflecting the changes in child jsp.

Thanks a lot for your help.
You saved me lot of time of R&A (Research and Analysis)
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 30138
    
150

Deepak,
No problem. Thanks for posting the directory in case anyone else has this problem in the future!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JSP changes does not reflect
 
Similar Threads
Making changes in Java files without restarting server
to change file (java/jsp) in my project and it don't have the need to restart tomcat
Need restarting the weblogic server everytime I make changes in jsp.
jsp not displaying the changes
Regarding Jboss Restart through Java Coding