zoukankan      html  css  js  c++  java
  • struts2框架搭建


     

    struts2 框架搭建

    1 拷贝核心的jar 包

    2 编写struts2 的配置文件

    <?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">
      <display-name></display-name>    
       <filter>
            <filter-name>struts2</filter-name>
            <filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter</filter-class>
        </filter>
    
        <filter-mapping>
            <filter-name>struts2</filter-name>
            <url-pattern>/*</url-pattern>
        </filter-mapping>
    
      <welcome-file-list>
        <welcome-file>index.jsp</welcome-file>
      </welcome-file-list>
    </web-app>


    3建立struts.xml 配置文件(src 下)

    <?xml version="1.0" encoding="UTF-8"?>
    
    <!DOCTYPE struts PUBLIC
        "-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
        "http://struts.apache.org/dtds/struts-2.3.dtd">
    
    <struts>
       <constant name="struts.devMode" value="true" />
    </struts>

    这样就配置成功了

  • 相关阅读:
    翘边阴影
    原生js实现 拖拽事件
    js实现计算器
    js实现选项卡
    js随机生成座号
    1.记住密码 提示框
    媒体查询
    高性能JavaScript 读书笔记
    調用WEB services
    Dragon Quest VIII 流程攻略(繁体中文完结版)
  • 原文地址:https://www.cnblogs.com/qerror404/p/4868577.html
Copyright © 2011-2022 走看看