Hi, I'm new to the forum and I hope you can help me. At work, I'm the lead (web) designer in a team that has taken on a JSP project and none of us have any experience besides playing around with a few things in the past and our inexperience is causing us problems. Let me outline the main one: Every page uses a couple of include files (for the HTML header and the main menu). I did this because menus generally change a hell of a lot before going live and I reckoned it would be easier to change one file than (what will be) many many JSPs. Problem is, when I change the include file, the output doesn't get updated because no change was made to the JSP. Is there anyway we can force the JSPs to recompile even though no changes have been made? We are using <%@ include %> because when we used <jsp:include /> Websphere Studio stuck in a whole load of stuff about RAM files and none of the includes worked. We are using Tomcat 3.3
Your developing in webshere studio and running Tomcat? The include directive causes the include to only occur once, at translation time. Whereas, jsp:include is checked at every request (a bit slower). Your options I'm aware of: 1. Get jsp:include working (try it outside websphere studio) 2. If on unix, perform a 'touch' on your jsp files. On windows, resave all files that use include :-( 3. Restart tomcat
Jason E. Brawner<br />Sun Certified Java Programmer<br />Sun Certified Web Component Developer
Joined: Feb 08, 2002
Originally posted by Jason Brawner: Your developing in webshere studio and running Tomcat?
Yep, the motives are purely financial...
The include directive causes the include to only occur once, at translation time. Whereas, jsp:include is checked at every request (a bit slower).
Speed isn't an issue during dev and we could do a global Search/Replace to go from jsp:include to the directive before going live it was going to be an issue.
1. Get jsp:include working (try it outside websphere studio)
I'll try this over the weekend.
3. Restart tomcat
Tried that and it didn't work Thanks for chipping in though. Here's hoping [ February 08, 2002: Message edited by: brokenvoice ]
Joined: Dec 19, 2001
If you delete the contents of the TOMCAT_HOME\work directory before restarting it will work. Although, I know this isn't the solution your looking for.
"brokenvioce" Your name doesn't agree with the javaranch guidelines. Please take a moment and edit your profile after reviewing the guidelines at http://www.javaranch.com/name.jsp Please change your Publicly Displayed name to follow the guidelines. thanks for your cooperation. - satya
You have to re-save the Top level JSP in order for the changes to showup. Put a space or something and then save the file. Restart (after you saved the top level file) should generally work. Make sure your request is being processed by Tomcat and your browser is not reloading the file from the cache. When you do a restart, 99% of the times, you will hit the server. Also use the < SHIFT > key when doing a refresh of the browser. Good luck and please do change your display name. - satya
Joined: Feb 08, 2002
Sorry about the displayed name thing. I tend to on autopilot when it comes to registering for things. As for changing something in each JSP to force the change, that would defeat the purpose of hiving off the menu and header to separate files. There will be many, many JSPs and if I have to make a change in each one of them, that is only slightly less laborious than changing the header and menu in each of them. Using <jsp:include /> works fine on my setup at home (Tomcat 4, no WS Studio) so we may need to do some re-jigging in the office on Monday and see if we come up with anything. Failing that, we can delete the files in the work directory as was suggested.