您的位置:首页 >> 编程开发 >> Java >> Struts/Hibernate >> 正文
Struts/Hibernate RSS
 

一个struts2.1超简单例子

http://www.rdxx.com 08年07月03日 00:00 我要投稿

关键词: Struts

package图包图liblib

[web.xml]

 <?xml version="1.0" encoding="UTF-8"?>

    <web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee"

        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

        xsi:schemaLocation="http://java.sun.com/xml/ns/javaee

        http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">

 

        <!-- struts2 -->

        <filter>

            <filter-name>struts2</filter-name>

            <filter-class>

                org.apache.struts2.dispatcher.FilterDispatcher

            </filter-class>

        </filter>

        <filter-mapping>

            <filter-name>struts2</filter-name>

            <url-pattern>/*</url-pattern>

        </filter-mapping>

        <!-- end struts2 -->

 

        <welcome-file-list>

            <welcome-file>index.jsp</welcome-file>

        </welcome-file-list>

    </web-app>

    [struts.xml]

 <PRE class=xml name="code"><?xml version="1.0" encoding="UTF-8"?>

    <!DOCTYPE struts PUBLIC

        "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"

        "http://struts.apache.org/dtds/struts-2.0.dtd">

 

    <struts>

        <include file="struts-default.xml"></include>

        <package name="StrutsRETestA" extends="struts-default">

            <action name="ActionOnly" class="com.action.ActionOnly">

                <result>index.jsp</result>

            </action>

        </package>

    </struts></PRE>

 

9 7 3 1 2 4 8 :


 
 
标签: Struts 打印本文
 
 
  热点搜索
 
 
 


Copyright ©2005 - 2008 Rdxx.Com,All Rights Reserved
收藏本页
收藏本站