Is it possible to update the app without restarting the server in JSF?
Asked Answered
K

2

5

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.

Kries answered 3/10, 2010 at 3:50 Comment(0)
K
4

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.

Korry answered 3/10, 2010 at 3:58 Comment(6)
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.Kries
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?Korry
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.Kries
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.Korry
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.Kries
In fact, for changes to classes, you should check the "Never publish".. Otherwise the context gets reloaded completely (takes a lot of time). If it is set to "Never", you just get the hot-swap.Gneiss
T
3

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

Theodora answered 3/10, 2010 at 10:18 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.