views:

82

answers:

3

I'm working with Eclipse 3.5, Tomcat 6, JSF 1.2 and IceFaces 1.8. Whenever I update any file in my app, I have to restart the server to see the latest changes. How to update my app without restarting the server?

The server option "Automatically publish when resource changes" is already selected.

Update: If I change the main file, the changes can be seen immediately. However, if I update any file used in a <jsp:directive.include /> tag, I must restart the server to check the changes or update the main file with a fake update, like adding a white space.

+2  A: 

In the Servers view, doubleclick the Tomcat entry, go to the section Publishing in right top and select Automatically publish when resources change.

alt text

It will however not happen immediately, it will take about 3 seconds. Glassfish for example, does it in a subsecond.

BalusC
This option is checked and I can see that after I change any file the status changes to [Republish] and then to [Synchronized] in the servers view. It's fine, but it seems that it does not work for files used inside a jsp:directive.include.
Paulo Guedes
I don't experience this, I however have never used `<jsp:directive.include>`, just `<jsp:include>`. Which Tomcat plugin are you using? The builtin one?
BalusC
When I used `<jsp:include>`, the contents of the included file do not even appear, as though nothing is really included. I have no idea why. I'm including a .jsp file -- a vertical navigation bar. I'm using the builtin plugin.
Paulo Guedes
You're using JSPX, not JSP. But this shouldn't matter. How about *Help > Check for Updates*? See if WTP needs an update. The server plugin falls in this category. To exclude one or other, try creating a simple JSP file instead of JSPX. Just `<html><body><jsp:include page="include.jsp" /></body></html>` and so on.
BalusC
Well, your answer to my first question is right: I should check the "automatically republish..." option, which was already done, so I accept your answer. But the include vs directive.include issue seems to be a totally new question to be posted to SO. It's really not working for me. The WTP was just downloaded, no need to update. Probably I'm doing something wrong.
Paulo Guedes
+1  A: 

I've used JRebel before for that http://www.zeroturnaround.com/jrebel/
It's not free, but has 30 days trial.

Adam
A: 

Here is example how to use JRebel and JSF http://przemek-nowak.pl/2010/10/jrebel-czyli-jak-przyspieszyc-prace-programisty/, automatically publishing is good only in small projects.

przemek