<welcome-file>/indexservlet</welcome-file>
</welcome-file-list>
private static final String CONTENT_TYPE = "text/html; charset=UTF-8";
public void init() throws ServletException {
}
public void doGet(HttpServletRequest request, HttpServletResponse response) throws
ServletException, IOException {
response.setContentType(CONTENT_TYPE);
if (request.getUserPrincipal() != null) {
String userid = request.getUserPrincipal().getName();
Class cls = oper.getClass();
InvocationHandler ds = new OperProxy(oper);
IndexOperInterface operi = (IndexOperInterface) Proxy.
newProxyInstance(cls.getClassLoader(),
cls.getInterfaces(), ds);
UserQuery userquery = new UserQuery();
userquery.setUser_id(userid);
MenuItemList menulist = operi.getMenuItemList(user1);
WorkItemList worklist = operi.getWorkItemList(user1);
if (user1 != null) {
request.getSession().setAttribute("userid", user1.getUser_id());
request.getSession().setAttribute("username",
user1.getUser_name());
request.getSession().setAttribute("department",
user1.getUser_department());
}
if (menulist != null) {
request.getSession().setAttribute("menulistbean",
menulist.getMenulist());
}
if (worklist != null) {
request.getSession().setAttribute("worklistbean",
worklist.getWorkItemList());
}
}
}
public void doPost(HttpServletRequest request, HttpServletResponse response) throws
ServletException, IOException {
doGet(request, response);
}
public void destroy() {
}
}