For help with installation, bugs reports or feature requests, please head over to our new forums.
Genuitec Community on GitHub
- This topic has 6 replies, 2 voices, and was last updated 21 years, 9 months ago by
Riyad Kalla.
-
AuthorPosts
-
Paul BakerMemberHi, I’m a newbee…
Problem: I don’t want the following system files copied to the:
app/WEB-INF/lib directory.dom.jar
jaxen-full.jar
jaxp-api.jar
jdbc2_0-stdext.jar
jstl.jar
mail.jar
sax.jar
saxpath.jar
standard.jar
xalan.jar
xercesImpl.jarSteps I’ve taken to prevent these files from being copied…
I have copied the following files to the Tomcat/Shared/Lib directory:
commons-beanutils.jar
commons-collections.jar
commons-digester.jar
commons-logging.jar
dom.jar
jaxen-full.jar
jaxp-api.jar
jdbc2_0-stdext.jar
jsf-api.jar
jsf-impl.jar
jstl.jar
mail.jar
mysql-connector-java-3.0.9-stable-bin.jar
sax.jar
saxpath.jar
standard.jar
xalan.jar
xercesImpl.jarI created a Library called APACHE_SHARED (with the jars above) and included that in my Java Build Path.
I have also selected the MyEclipse-Web Option:
Ignore External Libraries During Deployment (I will manage them).But the files listed above are still copied. Why? Because this occurs I cannot do a hot deployment. Will someone point me in the right direction (doco link etc). I only want MY app classes in the app/WEB-INF/lib directory.
Thanks in advance!! Paul
November 14, 2004 at 10:19 pm #219481
Paul BakerMemberI was able to find the source of the files that I had questions about…
Preferences | MyEclipse | J2EE Project | Library Sets | J2EE 1.4I was able to remove all files except:
javax.servlet.jar & javax.servlet.jsp.jarBut is this the correct way?
My original problem was the I could not hot deploy because the JVM (tomcat) was locking the files in my app/WEB-INF/lib directory. Now I can hot deploy but am concerned that I have approached this problem the wrong way. Putting the system jar files in shared has the problem that all apps must work with the same version of JSF, etc. How do others handle this… ??
Paul
November 15, 2004 at 10:57 am #219495
Riyad KallaMemberPaul,
Are you aware that your application’s class files are suppose to go into the WEB-INF/classes dir and your application’s libraries are suppose to go into WEB-INF/lib? I’m asking because it sounds like you are going through a JARing process to put your class files in your WEB-INF/lib dir which is not necessary (unless you are working on a 3rd party library that your app uses).You should have left the JARs your app needs in your WEB-INF/lib dir, and use an exploded deployment, then MyEclipse will only hot deploy the files that change to Tomcat, that means that it won’t try and deploy jstl.jar, xalan.jar, etc… and the other JARs that are not changing, only the ones that are changing.
Working around the Tomcat locking problem is a PIA, lukily Tomcat 5 has made strides to avoid file locks completely, so you could try that if you have JDK 5.0 installed.
November 15, 2004 at 7:16 pm #219521
Paul BakerMemberThanks, rkalla. Yes, I am trying to get around the hot deploy problem.. Everytime I make a change, I must stop, redeploy, and then restart Tomcat. When I copy all of the system jar files into the TomCat shared dir as I wrote above I can hot deploy. My app classes do go into the /classes dir… I incorrectly said that there were going into the /lib file..
The error that I was getting w/in Eclipse was:
QUOTE
Undeployment failure on Tomcat 5. File C:\Apache\Tomcat 5.5\webapp\Contacts\WEB-INF\lib\jsf-impl.jar unable to be deleted. If a file is locked, you can wait until the lock times out to redeploy, or stop…
UNQUOTEI don’t get these errors now… But, I would apprecaite it if someone could tell me how I can hot deploy w/out going through the gyrations that I am..
Thanks! Paul
November 15, 2004 at 8:18 pm #219523
Riyad KallaMemberPaul,
“Hot deploy” is transparent to the user, its part of the build loop assuming you have Automatic Project building turned on AND are using Exploded deployment… every time you save a file, the changed resource is deployed out to the running application server… you don’t need to go back to the deployment menu and hit the “redeploy” button again, which does a delete/deploy operation, which is giving you those exceptions (understandably so as Tomcat has them open to load the classes).November 15, 2004 at 9:18 pm #219524
Paul BakerMemberThanks for the information. The Hot Deploy processing is working just fine – as you suggested… I made a change and then checked the Server app directory and my changed file was there. I’m not sure why TomCat is not reloading the app automatically but when I enter:
http://localhost:8080/manager/reload?path=/Security
Everything works perfect… Sorry for all the trouble..
November 16, 2004 at 8:20 am #219530
Riyad KallaMemberNo problem, I’m glad its working now. You can check with the Tomcat docs to see if you have the server setup to reload changes (usual timeout period is about 15 seconds)
-
AuthorPosts
