获取当前容器bean 对象
WebApplicationContext webApplicationContext = WebApplicationContextUtils.getRequiredWebApplicationContext(config.getServletContext());
SerialNumberService serialNumberService = (SerialNumberService)webApplicationContext.getBean("serialNumberService");
oracle 时间比较
sql ="select * from YC_IMG";whereStr=" where 1=1";whereStr+="and IMG_DATE >=to_date('" + myForm.getBegDateStr() + "','yyyy-mm-dd hh24:mi') and IMG_DATE <=to_date('" + myForm.getEndDateStr() + "','yyyy-mm-dd hh24:mi')"; fn的嵌套使用:
<img width="50" height="35" src="<%=request.getContextPath() %>${fn:replace(fn:replace(dm.IMG_PATH,'home','imgData'),'/IMG','')}${dm.IMG_NAME}"/> 获取web目录下的根目录,直到项目的名称
String realpathdir = request.getSession().getServletContext().getRealPath("");
数据列表展示时,表格table隔行换色以及点击整行变色
<% String trClass = "#FFFFFF"; if (index.intValue() % 2 == 1) { trClass = "#E9F6FE"; }%><tr bgcolor="<%=trClass %>" > </tr>