Re: Java - Reloading Changes for JSPs

174 views
Skip to first unread message

Fabien Lenoir

unread,
Jun 15, 2012, 4:37:00 AM6/15/12
to google-a...@googlegroups.com
Touching appengine-web.xml make dev server reload every classes (Servlets, and maybe also JSPs). Under eclipse, you can configure it so that it touch this file on every change you do.

See 2nd answer of http://stackoverflow.com/questions/800701/how-do-i-restart-the-google-app-engine-java-server-in-eclipse

Le mardi 12 juin 2012 21:54:31 UTC+2, Chromag a écrit :
I'm sure this is a stupid question but I was curious how GAE Java developers handle this situation.  When you're doing day-to-day development with GAE under Eclipse how do you handle code changes?  For example - I'll make frequent changes to the JSP's as I tweak the frontend and reload constantly as I change things.  How do I handle this when developing in a GAE environment in Eclipse (technically under STS, but still).

From what I can tell it seems like even if I make a wording change in the JSP I have to completely stop the GAE server and start it again.  Is there a way around this?  Is there a better solution?

Thanks.

Jeff Schnitzer

unread,
Jun 15, 2012, 2:17:39 PM6/15/12
to google-a...@googlegroups.com
I can tell you my solution: Don't use JSP. There are many other
Java-based template solutions that have a dev mode that reloads the
templates on every request. I use Cambridge, which is great if you're
fairly tech savvy because the docs are sparse. If you're on the
novice side, you might want to use something like Velocity,
Freemarker, or StringTemplate:

http://stackoverflow.com/questions/174204/suggestions-for-a-java-based-templating-engine

Be careful about touching appengine-web.xml - it breaks if you have
appstats turned on. Star this issue:

http://code.google.com/p/googleappengine/issues/detail?id=7052

Jeff

On Tue, Jun 12, 2012 at 12:54 PM, Chromag <chro...@gmail.com> wrote:
> I'm sure this is a stupid question but I was curious how GAE Java developers
> handle this situation.  When you're doing day-to-day development with GAE
> under Eclipse how do you handle code changes?  For example - I'll make
> frequent changes to the JSP's as I tweak the frontend and reload constantly
> as I change things.  How do I handle this when developing in a GAE
> environment in Eclipse (technically under STS, but still).
>
> From what I can tell it seems like even if I make a wording change in the
> JSP I have to completely stop the GAE server and start it again.  Is there a
> way around this?  Is there a better solution?
>
> Thanks.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google App Engine" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/google-appengine/-/J5JdB795Qw4J.
> To post to this group, send email to google-a...@googlegroups.com.
> To unsubscribe from this group, send email to
> google-appengi...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/google-appengine?hl=en.

Joakim

unread,
Jun 15, 2012, 3:31:55 PM6/15/12
to google-a...@googlegroups.com
I can assure you that JSPs can be reloaded as often as needed using the App Engine dev server. My development environment (IntelliJ IDEA) is currently set to automatically copy all changed non-Java files to the deployed directory when the IDE loses focus. The effect is that all I have to do is toggle to my browser's window and hit refresh to see the changes. If anything, I think the problem lies in Eclipse or its configuration. Unfortunately, I am unfamiliar with the environment, but this SO question seems like it could be relevant, even though the server in the question is Tomcat: http://stackoverflow.com/questions/998737/integrating-tomcat-and-eclipse-as-a-hot-deploy-environment
> To post to this group, send email to google-appengine@googlegroups.com.
> To unsubscribe from this group, send email to
> google-appengine+unsubscribe@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages