日期:2014-05-17  浏览次数:20649 次

求助----返回前一个页面

这是个弹窗,在这里进行后台验证,弹出下面的提示后怎么返回这个弹窗呢?


代码在这里:
public ModelAndView addStory(HttpServletRequest req, HttpServletResponse res){
HashMap model = new HashMap();

String[] tagids = req.getParameterValues("tagid");
String[] ftagids = req.getParameterValues("ftagid");
String sid = (req.getParameter("sid")==null)?"":req.getParameter("sid");
String  content=(req.getParameter("content")==null)?"":req.getParameter("content");
String  forumTitle=(req.getParameter("forumTitle")==null)?"":req.getParameter("forumTitle");
String  u_tag=(req.getParameter("u_tag")==null)?"":req.getParameter("u_tag");
String  mfilepath=(req.getParameter("mfilepath")==null)?"":req.getParameter("mfilepath");
String ip=mytools.getIpAddr(req);
long ipAddr =mytools.ipToLong(ip);
TbUserOperaLog log =new TbUserOperaLog();
String remark="";
String location ="/storyList.do";
HttpSession session = req.getSession();
TbUser user = (TbUser)session.getAttribute("_currentUser");
if(user==null | session==null){
String msg="請先登錄!";
model.put("msg", msg);
if(!sid.equals("")){
model.put("location", "/forumList.do?sid="+sid);
return new ModelAndView(this.showMessageView,model);
}
model.put("location", location);
return new ModelAndView(this.showMessageView,model);
}
TbForumPost tbForumPost = new TbForumPost ();
tbForumPost.setContents(content);
if(mfilepath==""){
tbForumPost.setIsphoto(0);
}else{
tbForumPost.setIsphoto(1);
}
tbForumPost.setTitle(forumTitle);
tbForumPost.setTypeid(Integer.parseInt(ObjectType.ForumPost.getCode()));

tbForumPost.setUid(user.getId());
tbForumPost.setStatus(Integer.parseInt(AuditStatus.Auditing.getCode()));
tbForumPost.setIsgood(0);
tbForumPost.setReplies(0);
tbForumPost.setClick_num(0);
tbForumPost.setLast_ip(ipAddr);
tbForumPost.setLast_r_time(new Date());
tbForumPost.setCreateTime(new Date());

int fcount = forumPostService.addForumPost(tbForumPost);

if(fcount>0 ){
if(!mfilepath.equals("")){
TbPhotoPath tp =  new  TbPhotoPath();
tp.setCreateTime(new Date());
tp.setP_path(mfilepath);
tp.setStatus(Integer.parseInt(AuditStatus.Auditing.getCode()));
int ppcount = photoPathService.addPhotoPath(tp);

if(ppcount>0){
TbPhotoRelation tr = new TbPhotoRelation();
tr.setCreateTime(new Date());
tr.setObject_type(Integer.parseInt(PhotoObjectType.ForumPostPhoto.getCode()));
tr.setPhoto_id(ppcount);
tr.setObject_id(fcount);
photoRelationService.addPhotoRelation(tr);
}
log.setUid(user.getId());
log.setCreatetime(new Date());
Date date =new Date();
log.setIp(ipAddr);
log.setOperate(Integer.parseInt(UserOper.ForumPublish.getCode()));
remark=user.getAccount()+"于"+date+"添加了論題《"+forumTitle+"》";
log.setRemark(remark);
userOperaLogService.addUserOperaLog(log);


}

/*if(!url.equals("")){
TbPhotoPath tp&n