Install and configure the Struts Environment

Source: Internet
Author: User

1. Open the myeclipse Development Environment (My myeclipse version is 8.5) and create a new web project (all the processes will be shown in the figure ), then window-> preferences-> Server-> Tomcat-> Tomcat6.0, select Enable, and find the tomcat directory you have installed. Click OK

2. Click window-> preference-> java-> Installed Jres-> and add your jdk location (My ID is D: \ java)-> finish

3, copy struts configuration file struts. xml to the new project src, the file in: http://pan.baidu.com/s/1qWPPaig Baidu Network Disk

4, struts environment installation jar file (Class Library): http://pan.baidu.com/s/1zTeYq Baidu Network Disk

5. replace all the code in web. xml under the WebRoot-> WEB-INF:

 
   
      
   
    index.jsp
     
      
          
   
    struts2
           
   
    org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter
       
      
          
   
    struts2
           
   
    /*
       
  
 

Here we need to rename index. jsp to Hello. jsp (because the above struts. xml is Hello. jsp)


Then enter: http: // localhost: 8888/Struts2_0100_Introduction/hello. action in the browser (because there is a namespace = "/" in struts. xml)

The output solution is:



==================== The steps for the intermediate process are as follows: <喎?http: www.bkjia.com kf ware vc " target="_blank" class="keylink"> VcD4KPHA + pgltzybzcm9 "http://www.2cto.com/uploadfile/Collfiles/20140310/20140310091719122.jpg" alt = "\">

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.