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
精彩评论