观看浪曦出的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是从网上下载的最新的

解决方案 »

  1.   

    debug一下,看走你的action了吗?感觉你的action有问题,没有form吗?
      

  2.   

    我做数据库连接配置文件时知道
    properties文件必须放在 项目\WEB-INF\classes下
      

  3.   

    没看那教程,但问下
    converter.PointConverter是你写的类吗?你在程序中有没有用反射获取这个类?
      

  4.   

    message No result defined for action action.PointAction and result input 
    提示的很清楚,就是缺少result为input 所对应的页面配置文件中加入
    ......
    <result name="input">/xxx/xxx.jsp</result>
    ......
      

  5.   

    类型转换的是全局的还是局部的?
    局部的:propertyName=类型转换器
             user=lee.UserConverter 
    全局的:lee.User=lee.UserConverter  lee是包名,User类,UserConverter是类型转换器!
      

  6.   

    真的谢谢各位的帮助了
    我认真的看了下源代码
    发现是这里出的问题
    int x = Integer.parseInt( paramValues[0] );
    int y = Integer.parseInt( paramValues[1] ); 
    0,1我写成1 ,2 了
    抱歉是一个低级错误
    怎么才能避免出现这种低级错误呢?