开发者

passing values between two jsp files

  <%   if(empRecNum != null && !(empRecNum.equals(开发者_JS百科"")))
        {
           empSelected=true;
        }
        boolean canModify = UTIL.hasSecurity("PFTMODFY") && empSelected;
%>

<script type="text/javascript">

    function add(){
        alert('hello');
        df('ADD');
    }

</script>

On the click of add button, i need to pass the boolean value to another jsp and then go on with the df servlet function.


pass in URL like

second.jsp?param=value

access param from second jsp

request.getParameter("param");  

OR: Store it in cookie

OR: Persist it in DB


I found this, which may help:

http://www.exampledepot.com/egs/javax.servlet.jsp/caller.jsp.html

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜