pictrueclass.jsp页面(pictrueclass.html是转后的)
<form name="w" action="saveXiangCe.htm?" method="post" target="_parent" onSubmit="return CheckForm();">
<div class="blogname"><h3><a href="#" target="_blank">我要提问</a></h3>创建相册分类名称:<input type="text" name="siteinfo" maxlength="12" /><span>最大长度为12个汉字</span></div>
<button type="submit">保存</button><button type="reset">取消</button>
</form>我在action里面写了
String siteinfo=request.getParameter("siteinfo");
Company com=this.companBiz.byLoginUser(request.getSession().getAttribute("username").toString());
String Time=new SimpleDateFormat("yyyy-MM-dd hh:mm:ss").format(new java.util.Date());
BlogXiangCe blogXiangCe=new BlogXiangCe();
blogXiangCe.setCompany(com);
blogXiangCe.setXxiangCe(siteinfo);
blogXiangCe.setXtime(Time);
this.blogXiangCeBiz.save(blogXiangCe);
response.sendRedirect("blog/system/pictrueclass.html");
applicationContext.xml 里面的设置
<bean name="/saveXiangCe" class="com.fanna.struts.action.ToBlogSaveXiangCAction">
<property name="blogArticlesBiz" ref="blogArticlesBiz"></property>
<property name="blogXiangCeBiz" ref="blogXiangCeBiz"></property>
<property name="companBiz" ref="companyBiz"></property>
</bean>是保存进去了,就下面不显示!我在怎么弄下让它下面刷出来!!!!!在线等!!

解决方案 »

  1.   

    response.sendRedirect("blog/system/pictrueclass.html");
    换成 
    request.getDispatcherHeader("blog/system/pictrueclass.html").forward(request,response);试试
      

  2.   

    response.sendRedirect("blog/system/pictrueclass.html");
    你不觉得这个路径开头少了个/.?
      

  3.   

    可能你用的是相对路径吧.!
    但是改不改转发不是问题喔.  redirect两次请求, forward才一次请求.!
    LZ是想怎么个刷新法.?  没太明白.1
      

  4.   

    sendRedirect 你用这个方法,数据时会丢失的改成forward试试
      

  5.   

    response.sendRedirect("/system/pictrueclass.html");
      

  6.   

    request.getRequestDispatcher("/blog/system/pictrueclass.html").forward(request, response);试一下。