Skip to main content

Problem reloading web application

4 replies [Last post]
nahidshahin
Offline
Joined: 2005-05-04

Hello,
I am a Tomcat user but as Tomcat doesn't have the EJB container so I have to switch GlassFish. But problem is GlassFish is too heavy compared to Tomcat.
I am using ant. For deployment "sun-appserv-deploy" works fine.
But sun-appserv-update doesn't works.
Here goes some error message.
[exec] [#|2007-12-24T22:41:09.515+0100|INFO|sun-appserver9.1|javax.enterprise.system.container.web|_ThreadID=22;_ThreadName=Timer-5;|PWC1412: WebModule[/onshop_webapp] ServletContext.log():Loading WebApplicationContext for Spring FrameworkServlet 'onshop'|#]

[exec] [#|2007-12-24T22:41:14.109+0100|INFO|sun-appserver9.1|javax.enterprise.system.core|_ThreadID=22;_ThreadName=Timer-5;onshop_webapp;|CORE5002: [onshop_webapp] reloaded successfully!|#]

[exec] [#|2007-12-24T22:41:14.109+0100|INFO|sun-appserver9.1|javax.enterprise.system.core|_ThreadID=22;_ThreadName=Timer-5;onshop_webapp;|CORE5003: [onshop_webapp] failed to reload!|#]

"sun-appserv-deploy" can be use for reload purpose also but takes too much time.
Can any one suggest me If I change a simple JSP file (say simply change caption) what is the easy way to reflect this change?

Thanks
-Nahid

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
nahidshahin
Offline
Joined: 2005-05-04

Hi Nasim,
Thanks for your suggestion. Obviously oracle toplink implementation of JPA is a good option but I have setup my environment with GlassFish + Derby + Spring... Every thing is good except one thing, a way to fast reload of my web application.
I have checked reload option from "Admin Panel" of GlassFish. Have created .reload file in "server_home/domain/domain1/application/j2ee-module/app_name/.realod" . But still not works.
My Idea was just to copy changed JSP files from my build directory to "server_home/domain/domain1/application/j2ee-module/app_name/" using ANT then touch .reload file. Where is the problem?
Anyone please share your idea.
Thanks
-Nahid

hzhang_jn
Offline
Joined: 2005-07-22

What you described should work.
http://docs.sun.com/app/docs/doc/819-3673/6n5sk1d47?l=en&a=view#beadz

Were the modified jsp files copied to appropriate subdirectories?

Looking at the messages in the server.log, seems the application was actually being reloaded, but the reloading failed for some reason. You can turn the web container logging to a finer level to see if you get more messages.

When you use sun-appserv-deploy to redeploy, the application was able to redeploy successfully? This is a little strange, as the reload is essentially a directory redeployment, and share much of the code path as redeploy on the server side. Maybe you can clean up and give it another try for reload?

BTW: I believe if your changes only involve jsp file changes, a reload or a redeploy is not necessary. You only need to copy the modified jsp files to some location (I am not sure about the details here, someone from web team or netbeans plug in team would know better).

jluehe
Offline
Joined: 2004-12-01

Yes, Hong is right:

Just modify your JSP(s) under

domain-dir/applications/j2ee-apps/app-name

or

domain-dir/applications/j2ee-modules/module-name

depending on whether you're dealing with an EAR or a WAR file, and next time the modified JSP is accessed, it will be recompiled automatically.

Jan

nasim_kabi
Offline
Joined: 2005-01-05

Hey there,

If you need only Entity Bean of EJB, You can use the hibernate or oracle toplink implementation of JPA in an standalone container

Regards,

Kabi