appear in JSP
Extracted code:
<%
Webapplicationcontext WAC = Webapplicationcontextutils
. Getwebapplicationcontext (This.getservletcontext ());
Userdao Userdao = (Userdao) wac.getbean ("Userdaoimpl");
String in= (String) request.getparameter ("id");
System.out.println (in);
int Num=integer.parseint (in);
%>
<%=userdao.finduserbyid (num)%><br/>
Webapplicationcontext Wac=webapplicationcontextutils.getwebapplicationcontext (This.getServletContext ());
What is Webapplicationcontext?
What is Webapplicationcontextutils?
What is This.getservletcontext ()?
The meaning of this sentence is to get the ApplicationContext object through the Webapplicationcontextutils tool class. This object is obtained through the. Getservletcontext () method, The obtained ApplicationContext object is then assigned to WAC.
Webapplicationcontext is a class in the spring package
Webapplicationcontextutils is a tool class in the spring package
Getservletcontext () is a method of obtaining parameters in Struts2
Webapplicationcontext Wac=webapplicationcontextutils.getwebapplicationcontext (This.getServletContext ()); The meaning of the sentence