关于struts的小问题!
我配置了eclipse+easystruts来开发struts,配置后运行成功了一个例子
但做第二个例子的时候总出现这样的错误
org.apache.jasper.JasperException: Cannot find ActionMappings or ActionFormBeans collection
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:254)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(
.................
我想应该是struts.jar包的问题,但是就算把struts.jar加入calsspath还是不行
请大家帮我看看一看,先谢谢各位了!!!
问题点数:100、回复次数:13Top
1 楼cucuchen(绝情酷哥)回复于 2004-05-04 19:12:40 得分 10
struts-config.xml没有配置对啊Top
2 楼sagittarius1979(※2+2=5※)回复于 2004-05-04 19:30:32 得分 20
楼主看看下面的连接。
http://expert.csdn.net/Expert/topic/2924/2924229.xml?temp=9.070987E-02
Top
3 楼xinshou1979330(Success.java)回复于 2004-05-04 19:40:33 得分 10
同意一楼的
看一下
你的CONFIG文件
Top
4 楼100health(health100)回复于 2004-05-05 17:50:18 得分 0
struts-config.xml是自动生成的啊,应该没什么问题
我把struts下的lib的*.jar文件都拷到tomcat下的/common/lib里,可是tomcat就不能启动啊
有谁知道告诉小弟我一下啊Top
5 楼lhbf(牧野)回复于 2004-05-05 20:01:50 得分 10
一个可能的原因是你引用的formbean没有保存在request或者session等对象中Top
6 楼panpan221(我是来学习的!)回复于 2004-05-05 20:27:03 得分 10
新手学习,关注Top
7 楼cucuchen(绝情酷哥)回复于 2004-05-06 01:34:18 得分 10
我把struts下的lib的*.jar文件都拷到tomcat下的/common/lib里,可是tomcat就不能启动啊?
不会吧?如果不拷到下面能不能启动呢?我想你还是应该把struts-config.xml和web.xml都再检查一下。Top
8 楼100health(health100)回复于 2004-05-06 13:20:33 得分 0
请问lhbf(牧野),我只看见可以把action设置为request或者session。formbean没保存在request或者session等对象中,该如何设置了。Top
9 楼100health(health100)回复于 2004-05-06 13:44:36 得分 0
我的struts-config.xml和web.xml是easystruts自动配置的,应该没问题
struts-config.xml的代码是
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE struts-config PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 1.1//EN" "http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd">
<struts-config>
<data-sources />
<form-beans>
<form-bean name="HelloWordForm" type="test.struts.form.HelloWordForm">
<form-property name="word" type="java.lang.String" />
</form-bean>
</form-beans>
<global-exceptions />
<global-forwards />
<action-mappings>
<action
attribute="HelloWordForm"
name="HelloWordForm"
path="/helloword"
type="test.struts.action.HelloWordAction"
validate="false">
<forward name="success" path="/HelloWord.jsp" />
</action>
</action-mappings>
<controller />
<message-resources parameter="test.struts.ApplicationResources" />
</struts-config>
Top
10 楼zlhlj2000(六合彩)回复于 2004-05-06 13:55:36 得分 10
同意lhbf(牧野)。Top
11 楼100health(health100)回复于 2004-05-07 14:34:09 得分 0
我刚学,不明白,各位大哥能说的详细吗?Top
12 楼100health(health100)回复于 2004-05-08 16:36:40 得分 0
是不是因为我用的是2000Server,谁用的是xp的,有没有这样的问题啊???Top
13 楼bluesky35(蓝天)回复于 2004-05-08 16:40:48 得分 20
将STRUTS的API中的LIB全部COPY到PROJECT的web-inf/lib下Top




