Results 1 to 6 of 6

Thread: How to mix Eclipse, WTP, Struts, and Hibernate

  1. #1
    Join Date
    Feb 2010
    Posts
    188

    How to mix Eclipse, WTP, Struts, and Hibernate

    Hi all,

    I Use Eclipse Web Tools Project, Tomcat Application, server And MySQL Database Servers, Created a Web application. Although the application (DBTest) may be very good, but also there are some limitations:

    # AtServletCodeJava Server Pages (JSP) Name is hard-coded
    # SQL has also been hard-coded into the command class.
    So i want to know that how to mix Eclipse, WTP, Struts, and Hibernate in single interface. Thanks.

  2. #2
    Join Date
    Jan 2008
    Posts
    1,521

    Re: How to mix Eclipse, WTP, Struts, and Hibernate

    I have mix by the following ways. Let us recapitulate what we have done last time. The basic Web application to achieve the following use cases:

    #Customers must register at the site following a single
    #Customers can make a single
    #Customers can browse your order
    #Administrators can list all the registered customers

    The system uses generic servlet / jsp programming model, MySQL database and Tomcat application server to achieve. Domain model the system by the Customer (Customer) and Order (order), said two classes. If you need more information reply me.

  3. #3
    Join Date
    Feb 2008
    Posts
    1,852

    Re: How to mix Eclipse, WTP, Struts, and Hibernate

    You need to creating two corresponding database tables CUSTOMERS and ORDERS to represent the data held by these objects for mix that. Has also created four is responsible for implementing the above-mentioned cases of the database using the command class, and four as a controller Servlet, to collect the user input information, call these commands and responses forwarded to the appropriate JSP. Command Executor class is responsible for dealing with the use of Tomcat connection pool database connections. Check and reply.

  4. #4
    Join Date
    May 2008
    Posts
    2,389

    Re: How to mix Eclipse, WTP, Struts, and Hibernate

    You can use AddStrutsSupport method. Use File-Import option and choose to import the WAR file, DBTestWAR file importEclipseWork space. If the work space is not DBTest project, the above-mentioned operations on it. If you already have DBTest workspace project, the existing projects in the Navigator view, right-click and select copy and paste, save existing projects. When prompted to enter a new project name, select DBTestStruts as a new project name, so as not to overwrite the existing project. Now, in order to add Struts support, you must copy the following files to theWeb-INF \ lib folder: struts.jar, commons-lang.jar, commons-collections.jar, commons-beanutils.jar, commons-validator.jar, commons-logging.jar, commons-digester.jar, commons-fileupload . jar. Check and reply.

  5. #5
    Join Date
    Oct 2005
    Posts
    2,393

    Re: How to mix Eclipse, WTP, Struts, and Hibernate

    You need to convert an existing servlet class action class, and the struts-config.xml in its definition of an appropriate mapping. In order to simplify this process, we provide an abstract for all action super-class. Check and reply.

    Code:
    import Javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    import org.apache.struts.action.Action;
    import org.apache.struts.action.ActionError;
    import org.apache.struts.action.ActionErrors;
    import org.apache.struts.action.ActionForm;
    import org.apache.struts.action.ActionForward;
    import org.apache.struts.action.ActionMapping;

  6. #6
    Join Date
    May 2008
    Posts
    2,297

    How to mix Eclipse, WTP, Struts, and Hibernate

    You can also use the WTP tools, we can easily export the project WAR file and deployed in the Tomcat. Select DBTestStruts WebProject, and from File menu, select Export. Information when prompted, select the WAR file, specify the file name, WAR files can be deployed to Tomcat by. It is best method to mix Eclipse, WTP, Struts, and Hibernate. Best of luck.

Similar Threads

  1. Struts 1 VS Struts 2
    By PsychoVillan in forum Software Development
    Replies: 6
    Last Post: 29-03-2011, 12:23 AM
  2. Beginning with the Struts 2
    By Ronchi in forum Software Development
    Replies: 4
    Last Post: 19-03-2011, 06:32 AM
  3. JSF versus Struts
    By Daksha in forum Software Development
    Replies: 3
    Last Post: 21-07-2010, 06:20 AM
  4. How to upgrade one of struts in JDEV 10.1.3
    By GeforceUser in forum Software Development
    Replies: 3
    Last Post: 14-11-2009, 05:45 PM
  5. Where can I get struts Interview questions?
    By geekboy in forum Education Career and Job Discussions
    Replies: 3
    Last Post: 04-08-2009, 11:47 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,713,944,885.44802 seconds with 17 queries