facebook

Mixed HTML, JSP, and Servlet project [Closed]

  1. MyEclipse Archived
  2.  > 
  3. Application Servers and Deployment
Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #218243 Reply

    Pat_Ferrel
    Member

    I have an exiting project including images, html pages mixed with jsp pages and some servlets. These sit in the DocumentRoot folder of an Apache virtual host which is also my Tomcat 5.0/webapps/demo folder. I have imported the project into MyEclipse but cannot figure out how to deploy changes without erasing my old deployment. This would be ok except the deployment only copies my new .class files and their enclosing folders, it does not deploy all of the othe files in all of the various folders.

    1. Is there a way to get MyEclipse to deploy all of the ansilary files, gif, jpeg, html, and jsp? Do I have to use ant?

    2. Is there a way to deploy over ftp?

    3. Is there syncronization support as in “deploy only newer files”

    #218246 Reply

    Riyad Kalla
    Member

    FIRST: Please give an outline of your project structure detailing what portions contain what kinds of files. Also provide what your project root, webroot, src and output folders are set to.

    1) Yes, using exploded deployment MyEclipse picks up ‘changes’ to files via the Eclipse notification mechanism, which means changes need to be recognized by Eclipse… so if you change an image, you need to refresh your tree for the changes to be noticed/deployed.

    2) No

    3) If you use an exploed deployment, only new changes are deployed, you don’t need to do full redeployments.

    #218355 Reply

    Pat_Ferrel
    Member

    demo – folders, html, jsp, images
    Images – images
    Style-sheets – css
    WEB-INF – folders and web.xml
    classes – compiles packages
    com
    pipestone – .class files
    lib -jars
    mysql-connector-java-3.0.15-ga-bin.jar
    src – .java for classes
    com
    pipestone – .java files for above .class files
    work – temp runtime jsps

    The above is my server hierarchy. I want to compile the java files (servlets) into the classes folder then deploy the entire tree with all it’s contents to a mirror folder in my tomcat 5.0 webapps folder. I am having trouble figuring out how to do this.

    demo location = C:\Documents and Settings\Patrick J. Ferrel\My Documents\My Downloads\Eclipse\eclipse-SDK-3.1M2-win32\eclipse\workspace\demo

    desired deployment location = TOMCAT_HOME/webapps/demo

    I have tried importing the demo from the file system (it is a running web app) but can’t figure out how to get it to compile and deploy into the same structure that it came from. I am also directly changing some of the html files with Dreamweaver so I assume I will have to point DW to the files stored in the workspace and refresh MyEclipse to get them deployed (assuming I can configure it properly)

    Sorry if this is a newbee question, this is my first use of Eclipse and I’m a little confused about what points where for what reason.

    #218356 Reply

    Pat_Ferrel
    Member

    demo – folders, html, jsp, images
    —Images – images
    —Style-sheets – css
    —WEB-INF – folders and web.xml
    ——classes – compiles packages
    ———com
    ————pipestone – .class files
    ——lib -jars
    ———mysql-connector-java-3.0.15-ga-bin.jar
    ——src – .java for classes
    ———-com
    ————-pipestone – .java files for above .class files
    —work – temp runtime jsps

    as regards the previous message

    #218357 Reply

    Riyad Kalla
    Member

    Pat,
    Lukily this is a pretty straight forward webapp setup with the following mappings:

    1) Your “WebRoot” will become the root of the tree you have above
    2) Your “Output” directory will become /WEB-INF/classes
    3) Your “Source” Directory will become /WEB-INF/src

    So you can pretty much create a new Web Project, set the WebRoot dir to “/” and just drop this project right ontop of it, you will likely need to adjust the Source folder though.

    Also I would highly suggest reading our Web Projects quick start guide: http://www.myeclipseide.com/images/tutorials/quickstarts/webprojects/, it will help explain what all this mumbo jumbo means 😀

    #218664 Reply

    Pat_Ferrel
    Member

    Great, that worked.

    Next question. To deploy to two different servers I have to create two different workspaces? I see no other way to point a deployment at a server than in the Tomcat 5.0 root location preference setting. So only one Tomcat 5.0 app server per project?

    To deploy to my hosting service I need FTP. Is this being considered?

    #218672 Reply

    Riyad Kalla
    Member

    1) Yes, only one project per server, sorry about this limitation, we are aware of it and hope to address it with a major overhaul soon.
    2) Remote deployment is becomming a pretty popular request but I don’t know that it is high on our todo list *yet*, we’ve got some other really high priority items to address first, but we could come back around in the future and address it if demand was there.

Viewing 7 posts - 1 through 7 (of 7 total)
Reply To: Mixed HTML, JSP, and Servlet project [Closed]

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