javax.servlet.jsp.JspException#getMessage ( )源码实例Demo

下面列出了javax.servlet.jsp.JspException#getMessage ( ) 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。

源代码1 项目: spring-analysis-note   文件: SelectTagTests.java
@Test
public void withInvalidList() throws Exception {
	this.tag.setPath("country");
	this.tag.setItems(new TestBean());
	this.tag.setItemValue("isoCode");
	try {
		this.tag.doStartTag();
		fail("Must not be able to use a non-Collection typed value as the value of 'items'");
	}
	catch (JspException expected) {
		String message = expected.getMessage();
		assertTrue(message.contains("items"));
		assertTrue(message.contains("org.springframework.tests.sample.beans.TestBean"));
	}
}
 
源代码2 项目: java-technology-stack   文件: SelectTagTests.java
@Test
public void withInvalidList() throws Exception {
	this.tag.setPath("country");
	this.tag.setItems(new TestBean());
	this.tag.setItemValue("isoCode");
	try {
		this.tag.doStartTag();
		fail("Must not be able to use a non-Collection typed value as the value of 'items'");
	}
	catch (JspException expected) {
		String message = expected.getMessage();
		assertTrue(message.contains("items"));
		assertTrue(message.contains("org.springframework.tests.sample.beans.TestBean"));
	}
}
 
源代码3 项目: netbeans   文件: DumpVisitor.java
public static String dump(Node n) {
       try {
           DumpVisitor dv = new DumpVisitor();
           n.accept(dv);
           return dv.getString();
       } catch (JspException e) {
           LOGGER.log(Level.INFO, null, e);
           return e.getMessage();
}
   }
 
源代码4 项目: netbeans   文件: DumpVisitor.java
public static String dump(Node.Nodes page) {
       try {
           DumpVisitor dv = new DumpVisitor();
           page.visit(dv);
           return dv.getString();
       } catch (JspException e) {
           LOGGER.log(Level.INFO, null, e);
           return e.getMessage();
}
   }
 
源代码5 项目: spring4-understanding   文件: SelectTagTests.java
@Test
public void withInvalidList() throws Exception {
	this.tag.setPath("country");
	this.tag.setItems(new TestBean());
	this.tag.setItemValue("isoCode");
	try {
		this.tag.doStartTag();
		fail("Must not be able to use a non-Collection typed value as the value of 'items'");
	}
	catch (JspException expected) {
		String message = expected.getMessage();
		assertTrue(message.contains("items"));
		assertTrue(message.contains("org.springframework.tests.sample.beans.TestBean"));
	}
}
 
 同类方法