Velocity+Struts首次执行报错解决方案

尽量不要放在execute方法里面

public String test() {
		try {
			name = "Happy";
		} catch (ResourceNotFoundException e) {
			e.printStackTrace();
		} catch (ParseErrorException e) {
			e.printStackTrace();
		} catch (Exception e) {
			e.printStackTrace();
		}
		return "test";
	}

你可能感兴趣的:(velocity)