`
svygh123
  • 浏览: 123194 次
  • 性别: Icon_minigender_1
  • 来自: 广西
社区版块
存档分类
最新评论

编程经验

阅读更多
    1.判断是否登陆:
                        Action里写request.setAttribute("_javascript", "alert('您还没有登陆,请先登陆!')");
                        <logic:present name="JAVASCRIPT">
          <script type="text/javascript">
             <bean:write name="JAVASCRIPT" filter="false" />
          </script>       
        </logic:present>
    2.accountType ==null ||"".equals(accountType)写成公共方法
    3.Action里的添加后跳转到查询页面:this.listProject(mapping, form, request, response);
    4.Action可以返回void类型,比如登陆验证,然后用RequestDispatcher也可以
    5.提交表单尽量用隐藏域hidden,Action用request.setAttribute("");
    6.<%
String path = request.getContextPath();
String basePath = request.getScheme() + "://"
+ request.getServerName() + ":" + request.getServerPort()
+ path + "/";
%>
           <base href="<%=basePath%>">
   <script type="text/javascript" src="js/jquery-1.3.min.js"></script> 
   <script type="text/javascript" src="quser/js/list_qgroup.js"></script>
    7.
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics