刚用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>
哪里出问题了.....
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>
哪里出问题了.....
解决方案 »
- 如何批量抓取,sogou结果页的链接?
- 集合在jsp页面显示的问题!
- lucene索引创建问题
- 弹出选择框如何实现的
- 测试webservice接口出错 请高手指点,谢谢
- 现在在做SSH的上手开发,请指点
- ejb连接websphere报错:java.lang.NoClassDefFoundError: com/ibm/ejs/ras/Tr
- 菜鸟问题:请问怎样将两个时间相减啊???
- 自动垃圾收集在CORBA中不可用,要自己处理垃圾吗?那岂不是失去了java的一大优势?
- 请问一下 这个是什么意思 public Properties() { this(null)}
- 【struts1.2】我又测试不通了..
- spring事务问题
......没报错信息额,就是没进action
http://localhost:8080/mmshuxia/next/nextPhoto.action?userPhotoIndex=1
我改成request.getContextPath(), 是一样的
这个样子我把 <package name="next" namespace="/next" extends="json-default"> 改成
<package name="next" namespace="/next" extends="struts-default"> 就能访问, 也就是说
json配置出问题了?
Struts2 json应该怎么搞额
type:"GET",
dataType:"json"吧。。数据类型有没有指定是json的?
dataType:"json" ? 求贴代码
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();
}
改一下json包源码或者重写一下对时间的转换
我亲身遇到过的经验
或者你把时间字段转换去掉 看看能不能正常运行