ASP.NET Page.ispostback相当于JSP / Java的 [英] ASP.NET Page.ispostback equivalent in JSP/Java
问题描述
是否有任何ASP.NET Page.IsPostback相当于JSP / Java的?我需要做的就是检查这个请求是否是第一次或者是造成后回来。有JSP页面上几个组合框,我需要加载它仅适用于第一次,(我从数据库加载组合框的数据)不每次重新加载页面。我们重新加载在同一页基于各种输入/选择等,所以我一直在寻找这种类型的方法。
如果(POST.equalsIgnoreCase(request.getMethod())及和放大器;
((request.getRemoteURL()= NULL和放大器;!&安培;
request.getRemoteURL()。的toString()。equalsIgnoreCase(http://yoursite.com)){ //调用回传
}
您还可能看到此<一个href=\"http://stackoverflow.com/questions/4688190/how-to-generate-events-in-jsp-pages\">question
Is there any ASP.NET Page.IsPostback equivalent in JSP/Java? What I need to do is check whether this request is first time or is it result of post back. There are few Combo Boxes on JSP page and I need to load it only for the first time, (I am loading combo box's data from DB) not everytime page reloads. We reload the same page based on various input/selections etc. So I was looking for that type of method.
if ( "POST".equalsIgnoreCase(request.getMethod()) &&
((request.getRemoteURL() != null &&
request.getRemoteURL().toString().equalsIgnoreCase("http://yoursite.com")) {
//postback call
}
You may also see this question
这篇关于ASP.NET Page.ispostback相当于JSP / Java的的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!