ONGL 在jsp 页面得到后台传过来的对象值
文章分类:Web前端1、在jsp页面引入包
- <%@ page import="com.opensymphony.xwork.util.OgnlValueStack"%>
<%@ page import="com.opensymphony.xwork.util.OgnlValueStack"%>
2、得到值
- OgnlValueStack ov = (OgnlValueStack) request.getAttribute("webwork.valueStack");
- String url = (String) ov.findValue("groupId");
- out.println(url);
DAO层得到Oracle序列
文章分类:数据库1、先定义Spring jdbc 变量
- // 序列
- private DataFieldMaxValueIncrementer defectInfoCommonSeq;
// 序列 private DataFieldMaxValueIncrementer defectInfoCommonSeq;
2、DAO初始化时
- @Override
- protected void initDao() throws Exception {
- defectInfoCommonSeq = new OracleSequenceMaxValueIncrementer(super
- .getDataSource(), "PW_DEFECT_INFO_COMMON_SEQ");
- // super.getDataSource() 因为这里即成了基类,得到数据源
- }
@Override protected void initDao() throws Exception { defectInfoCommonSeq = new OracleSequenceMaxValueIncrementer(super .getDataSource(), "PW_DEFECT_INFO_COMMON_SEQ"); // super.getDataSource() 因为这里即成了基类,得到数据源 }
3、SETTER方法
- @Override
- protected String getCommonSequenceName() {
- return "PW_DEFECT_INFO_COMMON_SEQ" ;
- }