2013年9月10日星期二

Help jsp master

Why a jsp page without user identification code, but at load time if not logged in , then it will automatically jump to the login screen ?
begged god to answer . Environment myeclipse + tomcat
------ Solution ----------------------------------- ---------
web.xml configure filters in the bar. . .
------ Solution ---------------------------------------- ----
you found what filter validation logged in to know it.
------ Solution ---------------------------------------- ----
wrote interceptor of the bar , you can write your own interceptor class ( on a java class that inherits AbstractInterceptor class ) and then in the struts configuration file to write an interceptor , verify that the user the session if there were user information , if not , then it returns a processing result , when you configure the action in struts.xml when you can do the processing results processed ( eg : login.jsp ). So if the user does not log in , then there is no corresponding user session information , you can block access to other users logged on the next page .
------ Solution ---------------------------------------- ----
project should be used in the filter or interceptor , the landlord check web.xml. . .
------ For reference only -------------------------------------- -
we are all not only the case of fractional . Oh thank you for your answer

没有评论:

发表评论