把struts-config.xml和web.xml替换成随书附带的源码,就能正常运行,可我输的和源码一样啊,查了好几遍了,真郁闷,555
解决方案 »
- Java多CPU多线程的问题
- c3p0读取clob NewProxyResultSet错误
- 谁能提供一个用Myeclipse或者JBuilder构建webservice服务端和客户端的实例
- 为什么 Tomcat和Apathe整合后访问,jsp页面不解释,而显示原码?
- JPA中的OneToMany如何多次使用相同的实体
- 去网上那里能找到有关j2EE的相关资料?
- 请问java里面有没有像c里面#define那种宏定义
- j2ee应用程序服务器是什么概念啊?
- 这两个有什么区别啊<%@include file="/public/head.jsp" %> <jsp:include page="/public/head.j
- API是什么意思
- 有没有人是做ajax+jsp的?怎么看到大家的帖子都是ajax+asp.net(c#)的?
- synchronzied 有什么用啊,高手给讲讲!
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE struts-config PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 1.0//EN" "http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd"><!-- This is the Struts configuration file for the "Hello!" sample application --><struts-config>
<!-- Form Bean Definitions -->
<form-beans>
<form-bean name="HelloForm" type="hello.HelloForm" />
</form-beans> <!-- Action Mapping Definitions -->
<action-mappings>
<!-- Say Hello! -->
<action path = "/HelloWorld"
type = "hello.HelloAction"
name = "HelloForm"
scope = "request"
validate = "true"
input = "/hello.jsp"
>
<forward name="SayHello" path="/hello.jsp" />
</action>
</action-mappings> <!-- Message Resources Definitions -->
<message-resources parameter="hello.application"/></struts-config>web.xml:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN" "http://java.sun.com/dtd/web-app_2_2.dtd">
<web-app>
<display-name>HelloApp Structs Application</display-name><!--Standard Action Servlet Configuration -->
<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>
<load-on-startup>2</load-on-startup>
</servlet> <!--Standard Action Servlet Mapping -->
<servlet-mapping>
<servlet-name>action</servlet-name>
<url-pattern>*.do</url-pattern>
</servlet-mapping> <--The Usual Welcome File List -->
<welcome-file-list>
<welcme-file>hello.jsp</welcome-file>
</welcome-file-list> <!--Struts Tag Library Descriptors -->
<taglib>
<taglib-uri>/WEB-INF/struts-bean.tld</taglib-uri>
<taglib-location>/WEB-INF/struts-bean.tld</taglib-location>
</taglib> <taglib>
<taglib-uri>/WEB-INF/struts-html.tld</taglib-uri>
<taglib-location>/WEB-INF/struts-html.tld</taglib-location>
</taglib> <taglib>
<taglib-uri>/WEB-INF/struts-logic.tld</taglib-uri>
<taglib-location>/WEB-INF/struts-logic.tld</taglib-location>
</taglib></web-app>
是不是编码方式问题??