jsp内获取service
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">
<%
TbUser user = (TbUser)session.getAttribute("user");
ApplicationContext context = WebApplicationContextUtils.getWebApplicationContext(session.getServletContext());
// AdminMenuService adminMenuService = (AdminMenuService)context.getBean("adminMenuService");
MsgService msgService = (MsgService)context.getBean("msgService");
%>
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">
<%
TbUser user = (TbUser)session.getAttribute("user");
ApplicationContext context = WebApplicationContextUtils.getWebApplicationContext(session.getServletContext());
// AdminMenuService adminMenuService = (AdminMenuService)context.getBean("adminMenuService");
MsgService msgService = (MsgService)context.getBean("msgService");
%>