Java Code Examples for javax.servlet.jsp.JspException#getMessage()

The following examples show how to use javax.servlet.jsp.JspException#getMessage() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: SelectTagTests.java    From spring-analysis-note with MIT License 5 votes vote down vote up
@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"));
	}
}
 
Example 2
Source File: SelectTagTests.java    From java-technology-stack with MIT License 5 votes vote down vote up
@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"));
	}
}
 
Example 3
Source File: DumpVisitor.java    From netbeans with Apache License 2.0 5 votes vote down vote up
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();
}
   }
 
Example 4
Source File: DumpVisitor.java    From netbeans with Apache License 2.0 5 votes vote down vote up
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();
}
   }
 
Example 5
Source File: SelectTagTests.java    From spring4-understanding with Apache License 2.0 5 votes vote down vote up
@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"));
	}
}