歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux基礎 >> Linux教程 >> Ubuntu下Eclipse indigo版在線安裝struts插件

Ubuntu下Eclipse indigo版在線安裝struts插件

日期:2017/2/28 15:50:28   编辑:Linux教程

Ubuntu下eclipse indigo版在線安裝struts插件:

1.打開eclipse,進入Help->Install new software...;

2.添加新站點,命名為:mvc,地址:http://mvcwebproject.sourceforge.net/update/;

3.添加站點後搜索到列表中有:Alveole Studio MVC Web Project項,打勾選中,next下去執行在線安裝,根據網速決定安裝進度,完成後重啟eclipse;

4.新建項目:
1)先創建一個Dynamic Web Project,命名為fweb;
2)進入file->new->other...->web選中Alveole Studio MVC Web Project後next;
3)在Enter or select the parent folder裡選擇列表裡的fweb;
4)file name輸入:struts.aswp,然後next直到finish,fweb項目自動生成struts代碼框架;
5)web.xml配置:
======================================================================
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID" version="2.5">
<display-name>fweb</display-name>
<filter>
<filter-name>org.apache.struts2.dispatcher.FilterDispatcher</filter-name>
<filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class>
</filter>
<filter-mapping>
<filter-name>org.apache.struts2.dispatcher.FilterDispatcher</filter-name>
<url-pattern>*.action</url-pattern>
</filter-mapping>
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
</web-app>
============================================================================
6)struts.aswp圖形化配置,建立MVC關系;

5.具體操作教程參考地址:http://www.linuxidc.com/Linux/2012-05/61317.htm

HelloWorld2.zip下載:

免費下載地址在 http://linux.linuxidc.com/

用戶名與密碼都是www.linuxidc.com

具體下載目錄在 /2012年資料/5月/28日/Ubuntu下Eclipse indigo版在線安裝struts插件/

Copyright © Linux教程網 All Rights Reserved