刚用Struts2,望见谅!ff调试404Struts.xml:
ajax:
ff调试:  <struts>
<!-- 默认的视图主题 -->
    <constant name="struts.i18n.encoding" value="UTF-8"></constant>   
    <constant name="struts.ui.theme" value="simple" />
<constant name="struts.objectFactory" value="spring" />
<constant name="struts.enable.DynamicMethodInvocation" value="false" />
    <constant name="struts.objectFactory" value="org.apache.struts2.spring.StrutsSpringObjectFactory" />
    <!--  添加各个action映射文件 -->
    <include file="struts/photo.xml"/>   </struts>
哪里出问题了.....

解决方案 »

  1.   


    ......没报错信息额,就是没进action
      

  2.   

    没进action肯定是url拼的不对么,你把alert(url)看看是不是你要的那个请求.还有basePath改成request.getContextPath()再试试
      

  3.   

    这是alert出来的路径
    http://localhost:8080/mmshuxia/next/nextPhoto.action?userPhotoIndex=1
    我改成request.getContextPath(), 是一样的
      

  4.   

    改成request.getContextPath()+"/next/nextPhoto.action?userPhotoIndex=1"request.getContextPath()后面是不带"/"的哎
      

  5.   

    alert打出来如果要是不带"/"  就是/mmshuxianext/nextPhoto.action?userPhotoIndex=1
    这个样子我把 <package name="next" namespace="/next" extends="json-default">  改成
     <package name="next" namespace="/next" extends="struts-default">  就能访问, 也就是说
    json配置出问题了?
               Struts2 json应该怎么搞额
      

  6.   

    是不是少了jar包。 你前台请求的时候好像少了。。    
    type:"GET",
    dataType:"json"吧。。数据类型有没有指定是json的?
      

  7.   

    type:"GET",
    dataType:"json"  ? 求贴代码
      

  8.   

    有。。现在能进action了
    if(userPhoto.size()>=userPhotoIndex){
          Map<String,String> map=new HashMap<String,String>();   
             map.put("imageSrc", userPhoto.get(userPhotoIndex).getPhotoBigPath());
             map.put("uploadTime", userPhoto.get(userPhotoIndex).getPhotoUploadTime().toString().substring(0,16));
             map.put("browserNum", userPhoto.get(userPhotoIndex).getPhotoBrowserNum()+"");
             JSONObject json=JSONObject.fromObject(map);   //debug到这一步有问题,但又没异常信息...
             tip=json.toString();   
         }  
      

  9.   

    找到问题了,少个commons-lang.jar
      

  10.   

    可能和你json包版本有关系可能你那个json版本对时间字段的处理需要进行改动对于timestamp类型的时间及sql等时间类型的转换没有处理。。
    改一下json包源码或者重写一下对时间的转换
    我亲身遇到过的经验
    或者你把时间字段转换去掉 看看能不能正常运行