facebook

Deploy Myeclipse 7.0 Webservice to standalone webserver

  1. MyEclipse Archived
  2.  > 
  3. Web Services
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #296508 Reply

    Is there any documentation on this site on how to deploy the REST Webservice created in the MyeClipse 7.0 tutorial to a standalone version of Tomcat or to JBoss.

    Everything works fine within Tomcat running thru the IDE but not within a standalone version of Tomcat or JBoss running tomcat?

    Thanks

    #296561 Reply

    Brian Fernandes
    Moderator

    kayak,

    There is nothing special we do to the embedded Tomcat to have it run the REST web services, all the required libraries are part of your application. I have a few questions:
    1) What version is your standalone Tomcat?
    2) Are you running it (Tomcat) with JDK 5?
    3) What goes wrong with the standalone version of Tomcat? I assume you are using MyEclipse to deploy the application?

    #296573 Reply

    Biran,

    Answers to your questions:
    1.) Tomcat version is 5.5.26
    2.) Java Version 1.5.0_16
    3.)When using the following URL: http://localhost:8080/WebRoot/restdemo/services/customers

    I get the following error when trying to run the Tutorial Web Service:
    HTTP:Status 404 WebRoot/restdemo/services/customers
    The requested resource (/WebRoot/restdemo/services/customers) is not available.

    However use this URL:
    http://localhost:8080/WebRoot/
    I do get the index.jsp to display properly “This is my JSP page.”

    4.) No I did not deploy from MyEclipse, the Tomcat server I’d like to run this on is on a different machine. My initial question was: Is there any documentation on how to deploy the REST service to a standalone version of Tomcat.

    So not being sure, what I did was copy the entire WebRoot directory from the restdemo project to the webapp directory in Tomcat.

    Then I copied the following jars:
    activation-1.1.jar
    asm-3.1.jar
    jaxb-api-2.1.jar
    jaxb-impl-2.1.10.jar
    jersey-core-1.0.2.jar
    jersey-server-1.0.2.jar
    jsr311-api-1.0.jar
    stax-api-1.0-2.jar
    javaee.jar
    jsf.impl.jar
    jsf-api.jar
    jstl-1.2.jar

    to the TomcatWebRoot/lib directory. Then restart tomcat and get the errors above.

    What is the proper way to deploy the REST WebService Tutorial to a seperate server that myeclipse cannot access.

    Thank you.

    #296574 Reply

    @kayak20012001 wrote:

    Biran,

    Answers to your questions:
    1.) Tomcat version is 5.5.26
    2.) Java Version 1.5.0_16
    3.)When using the following URL: http://localhost:8080/WebRoot/restdemo/services/customers

    I get the following error when trying to run the Tutorial Web Service:
    HTTP:Status 404 WebRoot/restdemo/services/customers
    The requested resource (/WebRoot/restdemo/services/customers) is not available.

    However use this URL:
    http://localhost:8080/WebRoot/
    I do get the index.jsp to display properly “This is my JSP page.”

    4.) No I did not deploy from MyEclipse, the Tomcat server I’d like to run this on is on a different machine. My initial question was: Is there any documentation on how to deploy the REST service to a standalone version of Tomcat.

    So not being sure, what I did was copy the entire WebRoot directory from the restdemo project to the webapp directory in Tomcat.

    Then I copied the following jars:
    activation-1.1.jar
    asm-3.1.jar
    jaxb-api-2.1.jar
    jaxb-impl-2.1.10.jar
    jersey-core-1.0.2.jar
    jersey-server-1.0.2.jar
    jsr311-api-1.0.jar
    stax-api-1.0-2.jar
    javaee.jar
    jsf.impl.jar
    jsf-api.jar
    jstl-1.2.jar

    to the TomcatWebRoot/lib directory. Then restart tomcat and get the errors above.

    After all this I removed the WebRoot directory I manually installed and then changed the server properties to packaged archive in the ME server settings….found the restdemo.war file in the $user/MyEclpise 7.1/.metatdata/.me_tcat/webapps directory and moved that to the tomcat webapps directory….restarted Tomcat it expanded the war file and created a restdemo directory with all the jar files I had manually moved. Now however still get the same error with the new URL:http/localhost:8080/restdemo/services/customers

    What is the proper way to deploy the REST WebService Tutorial to a seperate server that myeclipse cannot access.

    Thank you.

    #296904 Reply

    Brian Fernandes
    Moderator

    kayak,

    Sorry for the delayed response on this one.

    1) Have you considered setting up this external server inside MyEclipse (assuming it’s on the same machine) so you can deploy to it from within ME without having to do anything manually?

    2) Your URL looks completely incorrect, your application should be at: http://localhost:8080/restdemo and not http://localhost:8080/WebRoot/

    3) To manually deploy – select your project in the package explorer and choose Export from the context menu. Select Java EE > WAR File (MyEclipse) to get a WAR file. Copy this WAR file into the “webapps” folder in your tomcat installation and then start tomcat. That should be all that is required to deploy your application, please note the URL above, “WebRoot” generally never appears in the URL.

    Hope this helps.

Viewing 5 posts - 1 through 5 (of 5 total)
Reply To: Deploy Myeclipse 7.0 Webservice to standalone webserver

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