?
Solved

Can you tell me what the possible consequences?

Posted on 2005-05-12
8
Medium Priority
?
310 Views
Last Modified: 2013-11-24
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
0
Comment
Question by:suprapto45
  • 3
  • 2
  • 2
  • +1
8 Comments
 
LVL 3

Assisted Solution

by:cincin77
cincin77 earned 200 total points
ID: 13984303
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
 
LVL 13

Expert Comment

by:petmagdy
ID: 13984312
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
 
LVL 16

Author Comment

by:suprapto45
ID: 13984393
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
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
LVL 21

Accepted Solution

by:
MogalManic earned 600 total points
ID: 13984684
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
 
LVL 13

Assisted Solution

by:petmagdy
petmagdy earned 400 total points
ID: 13985172
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
 
LVL 3

Expert Comment

by:cincin77
ID: 13985369
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
 
LVL 16

Author Comment

by:suprapto45
ID: 13992447
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
 
LVL 16

Author Comment

by:suprapto45
ID: 13993053
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

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this post we will learn how to make Android Gesture Tutorial and give different functionality whenever a user Touch or Scroll android screen.
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
Viewers will learn about the different types of variables in Java and how to declare them. Decide the type of variable desired: Put the keyword corresponding to the type of variable in front of the variable name: Use the equal sign to assign a v…
This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.
Suggested Courses
Course of the Month14 days, 8 hours left to enroll

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question