Can you tell me what the possible consequences?

Hi,

For example, I have deployed my J2EE web application fully (.WAR - jsp, images, jar, class, css and etc) into my Tomcat. Then what are the consequences if I deploy my J2EE application again (.WAR) but this time WITHOUT images file and WITHOUT deleting the existing full deployed web application? What are the consequences if I deploy it WITHOUT jar files too?

Regards
Dave
LVL 16
suprapto45Asked:
Who is Participating?
 
MogalManicCommented:
I think you will have to wait the whole 20 seconds and deploy a COMPLETE war.

Another option is to create a target in your build.xml that deploys to the unpacked version, only replacing the class, JSP files.  This would be the Java/JSP only build and would rely on the fact that Tomcat unpacks the WAR when it is installed.  Just locate where the war is Unpacked to, and copy(or FTP) the class/JSP files to that location.  I don't know if Tomcat will notice that the class files are changed, so you might have to reboot the application.
0
 
cincin77Commented:
1) You cannot have two applications with the same name.
2) you can deploy the application WITHOUT the images with another application name. In your JSPs or HTML pages, the images CANNOT be shown.
3)If you delete the JARS your application uses(servlets, jsps ...), then you will have CLASSNOTFOUND Exceptions when servlets or JSPs which use these classes in the jars, are called.

hope this helps.
0
 
petmagdyCommented:
Hi suprapto45,

The question is how do u deploy the war file, if u deploy it using Tomcat Admin Tools, then for the images, affcourse it will disappear from the web pages and for the JARs the dependent classes or jsps will through Class not found Exception. If u r just replacing the inflated directory of the war nothing will happen.

Cheers!
0
Cloud Class® Course: Ruby Fundamentals

This course will introduce you to Ruby, as well as teach you about classes, methods, variables, data structures, loops, enumerable methods, and finishing touches.

 
suprapto45Author Commented:
Hi,

Thanks guys.

Well, basically, my problem is this....
I am using Eclipse to build my project. As you know, Eclipse used Ant to deploy to Tomcat via build.xml. Everytime I deploy it for the testing purposes, it took me 20 seconds more because there are lots of images as well as jars file. Can I get rid of all these files when I want to deploy again to Tomcat. I tried to remove jars file.....the reduction in time is significant. It took me around 2 seconds only (I am so happy) but the application cannot run.

Regards
Dave
0
 
petmagdyCommented:
for the time beeing I can suggest the following (but those is just for development, don't use such this is production:

1- for the images put them in a separate WAR or just put them in any virtual path like apache/htdocs in apache web server
2- put the jars into a common place into tamcat that can be in the classpath of all Web apps (I don't remember that directory exactly I think ${Tomcat_home}/common/lib )

Cheers!
0
 
cincin77Commented:
After the application is deployed, the WAR file(which is actually a archive file) is opened, Right?
Cant you copy those jar files into that opened WAR file directory?
0
 
suprapto45Author Commented:
Hi,

cincin97 >> I think that I cannot do that...if you copy all the jars right after my WAR file is opened, I need to restart Tomcat again :(.

MogalManic >> "create a target in your build.xml that deploys to the unpacked version, only replacing the class, JSP files"
I like your point. I will try to do it with the combination of petmagdy solution.

petmagdy >> "put the jars into a common place into tamcat that can be in the classpath of all Web apps (I don't remember that directory exactly I think ${Tomcat_home}/common/lib )"
I will try it and combined it with MogalManic's solution.

I should tell you all soon and many thanks to you all.

Regards
Dave
0
 
suprapto45Author Commented:
Hi,

Thanks....Now I successfully created it.
What I have deployed is just the *.class, *.jsp and *.htm to the Tomcat webapps and then I restart Tomcat again and everything works perfect :). In addition, for information, I changed the build.xml

Regards
Dave

0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.