struts1的配置文件|Struts的配置文件的文件名叫什么

A. Struts的配置文件的文件名叫什么

Struts应用采用两个基于XML的配置文件来配置,分别是web.xml和struts-cofig.xml文件.web.xml文件是配置所有web应用的而struts-config.xml文件是struts专用的配置文件,事实上也是可以根据需要给这个配置文件起其他名称的.

B. struts1的配置文件action有几种方法

我知道的有两种一种是常规配置,一种动态配置

C. struts1 action如何写重定向,配置文件中如何配置

struts1没学过,学过struts2,在里面是<action name="loginUser" class="action.LoginAction"> <result type="redirect">index.jsp</result> <result name="input">Login.jsp</result> <result name="error">Login.jsp</result> </action>登陆成功重定向到index.jsp

D. 谁可以讲讲struts1中的web.xml和struts-config.xml文件的作用,他们是如何

很简单~~Hi我~

E. Spring配置文件问题用的是Struts1

很明显啊.你的wmsProjectDAO 没有setter方法啊…怎么给你注入呢啊?

F. Struts 1 的struts.xml配置问题

struts-config.xml中的parameter="method"表示使用分发action时用到的参数如果没有这个参数,那么自动执行action中的execute方法,如果有这个参数,把execute方法名改成传入的参数名就行了,同时action继承DispanterAction。就相当于我们写servlet的时候,需要通过传递的参数来区分同一个servlet中,哪一部分的代码是添加,哪一部分进行删除操作一样

G. tomcat 5.0 + struts1 配置文件问题

你的javaee的jar包是分开的吗,不是javaee.jar吗?应该是解析tld的时候发生异常,你把struts1的jar包展开一下看有没有struts-html-1.1.tld如果米有的话,你把他拷贝到你的WEBINF目录下面

H. 请问struts1.1中action是如何调用配置文件的

web.xml文件中配置了servlet,里面配置了所有的请求都被action接管,而这个action就是struts,并且配置了一些struts相关的参数,比如struts的配置文件,这里是struts-config.xml,你的里面是struts-config-ems-energynav.xml,在初始化时容器就会读入这些参数,所以你可以直接用而不用管,struts的配置文件里面是一样的,也由容器负责初始化过程,所以你在里面配置了就可以直接用了。<?xml version="1.0" encoding="UTF-8"?><web-app xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.4" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"> <servlet> <servlet-name>action</servlet-name> <servlet-class>org.apache.struts.action.ActionServlet</servlet-class> <init-param> <param-name>config</param-name> <param-value>/WEB-INF/struts-config.xml</param-value> </init-param> <init-param> <param-name>debug</param-name> <param-value>3</param-value> </init-param> <init-param> <param-name>detail</param-name> <param-value>3</param-value> </init-param> <load-on-startup>0</load-on-startup> </servlet> <servlet-mapping> <servlet-name>action</servlet-name> <url-pattern>*.do</url-pattern> </servlet-mapping> <welcome-file-list> <welcome-file>index.jsp</welcome-file> </welcome-file-list></web-app>

I. 想用<html:form>标签,struts1的配置文件怎么写

问完2问1·~晕<action scope="request" path=" " name="configForm" parameter="" type=""> <forward name="success" path="/pages/index.jsp"></forward> </action>path 就是映射名 name是formbean的名字,type action类名 parameter action的方法名<forward name="success" path="/pages/index.jsp"></forward>跳转名以及跳转的路径

J. struts1 和 struts2 的配置文件有什么区别怎么写请具体举个实例…..谢谢了!

struts1 使用servlet,他面向抽象类,安全性相对struts2的安全性低;和 struts2使用的是拦截器 ,它面向接口,同时安全性高


赞 (0)