facebook

exporting wars

  1. MyEclipse IDE
  2.  > 
  3. General Development
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #208288 Reply

    John Myers
    Member

    I apologize if this question is already answered in the documentation:

    I need to generate a war file for my webapp to manually upload to a server. It’s possibly to do this manually, but I’m sure there is a more automated way.

    Also, what is the procedure to add a library to the webapp (i.e. jdbc driver jars)?

    Thanks,

    John Myers

    #208304 Reply

    Riyad Kalla
    Member

    I need to generate a war file for my webapp to manually upload to a server.

    You can change your deployment to “packaged” and MyEclipse will create the WAR file for you. HOWEVER, we always suggest that for ‘official’ production deployment, that people have in place their own deployment routines (like complex Ant scripts to pull project from CVS, and make a WAR file then copy it to the server). But we realize that what our deployment tool does is helpful to many people and they want to use it anyway, so that’s fine too.

    Also, what is the procedure to add a library to the webapp (i.e. jdbc driver jars)?

    JDBC drivers (like MySQL Connector/J) will depend on how you use them. If you are using the App Server’s connection pooling, then you would drop the driver in the web server’s lib dir (/common/lib on Tomcat). If your app is using the JDBC driver and you need it for class resolution reasons, then you can just add it to your Java Build Path, but first you would need to put the JAR in the proper location. I’ve always done connection pooling through my app server, so I don’t know if its ever ‘correct’ to put a JDBC driver in your project’s WEB-INF/lib, so I’m hesitant to comment on this.

    #208316 Reply

    John Myers
    Member

    More clearly, what I meant was create a war without having to set up an app server and deploy it to the app server.

    Also, does anyone have an example of an ant script that is used for such a deployment?

    And by adding library I meant generally, using a jdbc library as an example. It sounds like if I just add it to the build path myeclipse will automatically put it in the lib directory?

    Thanks,

    John Myers

    #208321 Reply

    Riyad Kalla
    Member

    More clearly, what I meant was create a war without having to set up an app server and deploy it to the app server.

    Ahh, then no. Our deployment tool is intended for development, we leave it up to developers to create Ant scripts for their own deployment needs since everyone’s is different.

    And by adding library I meant generally, using a jdbc library as an example. It sounds like if I just add it to the build path myeclipse will automatically put it in the lib directory?

    Actually no. Lets use SpringFramework as an example, in that case you would need to put all the libs you need for Spring in your WEB-INF/lib folder, and the default setting for ME is to automatically add JARs in that directory to your build path. If you just add something to your classpath, you will be able to compile your project, but as soon as you deploy it, you will start getting “ClassNotFoundException” in the app server logs.

    #208325 Reply

    Scott Anderson
    Participant

    If you just add something to your classpath, you will be able to compile your project, but as soon as you deploy it, you will start getting “ClassNotFoundException” in the app server logs.

    In 3.8 Beta 2 you’ll be able to specify that you’d also like these jars deployed, just like you do dependent projects. However, this functionality is not in Beta 1 so what Riyad said is correct for the current release. I just wanted to give you a ‘verbal preview’ of where we’re going.

Viewing 5 posts - 1 through 5 (of 5 total)
Reply To: exporting wars

You must be logged in to post in the forum log in