观看浪曦出的Struts2视频第三讲
按照老师讲的照做
但是出现如下问题
HTTP Status 404 - No result defined for action action.PointAction and result input--------------------------------------------------------------------------------type Status reportmessage No result defined for action action.PointAction and result inputdescription The requested resource (No result defined for action action.PointAction and result input) is not available.
--------------------------------------------------------------------------------Apache Tomcat/6.0.16找了点相关信息,说在sturts.xml文件中加入
<result name="success">/output.jsp</result>原来struts.xml文件中action配置如下
<action name="pointConverter" class="action.PointAction">
<result name="success">/output.jsp</result>
</action>
加入后确实不报错了但是,我自定义的类型转换类根本就没有调用就直接输出了写了配置文件文件名
PointAction-conversion.properties
内容
point=converter.PointConverter请高手指教附加说明,我用的struts2是从网上下载的最新的
按照老师讲的照做
但是出现如下问题
HTTP Status 404 - No result defined for action action.PointAction and result input--------------------------------------------------------------------------------type Status reportmessage No result defined for action action.PointAction and result inputdescription The requested resource (No result defined for action action.PointAction and result input) is not available.
--------------------------------------------------------------------------------Apache Tomcat/6.0.16找了点相关信息,说在sturts.xml文件中加入
<result name="success">/output.jsp</result>原来struts.xml文件中action配置如下
<action name="pointConverter" class="action.PointAction">
<result name="success">/output.jsp</result>
</action>
加入后确实不报错了但是,我自定义的类型转换类根本就没有调用就直接输出了写了配置文件文件名
PointAction-conversion.properties
内容
point=converter.PointConverter请高手指教附加说明,我用的struts2是从网上下载的最新的
解决方案 »
- html中表格布局时如何背景图片的大小随表格的大小变化而变化?
- 门户网站前台点连接时是后台动态生成的jsp转好的html页面
- 求一句SQL,谢谢
- 求高手解释一段代码!!!
- 网站首页是直接从数据库中读取数据吗?
- 请问我使用struts会影响到网页美工的工作吗?
- 如何实现输入字母查出在数据库中以字母相匹配的中文实现自动补全功能
- 谁有jspsmartupload包,请给我一份。谢谢了,急用[email protected]
- 为什么找不到包呢。大家帮帮忙,谢谢。
- 怎么在一个函数中向页面上输出html页面
- jsp 输出 带有 空格和换行 的文本 出现的问题 ,
- 互动功能实现,分别实现评论、投票和调查的功能
properties文件必须放在 项目\WEB-INF\classes下
converter.PointConverter是你写的类吗?你在程序中有没有用反射获取这个类?
提示的很清楚,就是缺少result为input 所对应的页面配置文件中加入
......
<result name="input">/xxx/xxx.jsp</result>
......
局部的:propertyName=类型转换器
user=lee.UserConverter
全局的:lee.User=lee.UserConverter lee是包名,User类,UserConverter是类型转换器!
我认真的看了下源代码
发现是这里出的问题
int x = Integer.parseInt( paramValues[0] );
int y = Integer.parseInt( paramValues[1] );
0,1我写成1 ,2 了
抱歉是一个低级错误
怎么才能避免出现这种低级错误呢?