毕设之每天总结 三【12.03.30】

A类:

/**
 * @author zfss Email: zfss2012@gmail.com
 * @version Date: 2012-3-19,Time: 下午09:30:23
 */
public class A{
	public void rukou(){
		onSubmit();
	}
	protected void onSubmit(){
		
	}
}

B类:

/**
 * @author zfss Email: zfss2012@gmail.com
 * @version Date: 2012-3-30,Time: 下午05:29:51
 */
public class B extends A{
	protected void method(){
		System.out.println("run success");
	}
}

C类:

/**
 * @author zfss Email: zfss2012@gmail.com
 * @version Date: 2012-3-30,Time: 下午05:32:42
 */
public class C extends B{
	
	@Override
	protected void onSubmit(){
		method();
	}
	
	public static void main(String[] args){
		new C().rukou();
	}
}

A类提供运行逻辑,B类提供功能大全,C类具体实现并有取舍的调用B类提供功能


今天遇到的问题:

1.(已解决)javax.el.PropertyNotFoundException:Property 'userId' not found on type com.shu.cms.domain.collection.ProjectEntity

jsp页面上el表达式用错了

以前一直没怎么注意spring mvc 的post 和get的区别。。今天好好看了一下

spring mvc 部分源码:

@Override
	protected ModelAndView handleRequestInternal(HttpServletRequest request, HttpServletResponse response)
			throws Exception {

		// Form submission or new form to show?
		if (isFormSubmission(request)) {
			// Fetch form object from HTTP session, bind, validate, process submission.
			try {
				Object command = getCommand(request);
				ServletRequestDataBinder binder = bindAndValidate(request, command);
				BindException errors = new BindException(binder.getBindingResult());
				return processFormSubmission(request, response, command, errors);
			}
			catch (HttpSessionRequiredException ex) {
				// Cannot submit a session form if no form object is in the session.
				if (logger.isDebugEnabled()) {
					logger.debug("Invalid submit detected: " + ex.getMessage());
				}
				return handleInvalidSubmit(request, response);
			}
		}

		else {
			// New form to show: render form view.
			return showNewForm(request, response);
		}
	}

protected boolean isFormSubmission(HttpServletRequest request) {
		return "POST".equals(request.getMethod());
	}


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值