Parse Errors
Resin 3.0

Features
Installation
Configuration
Web Applications
IOC/AOP
Resources
JSP
Servlets and Filters
Portlets
Databases
Admin (JMX)
CMP
EJB
Amber
EJB 3.0
Security
XML and XSLT
XTP
JMS
Performance
Protocols
Third-party
Troubleshooting/FAQ

Introduction
JSP Compilation
Reference
Tutorials
Articles
FAQ

JSP Page Creation
Request
Topics
Tag Libraries

JSP
parse error messages
runtime error messages
JSP
JSP Page Creation
runtime error messages

Parse Errors

Errors happen. There's a reason the patron saint of programmers is St. Murphy. Here we'll just explain Resin's error reporting to simplify tracking down errors.

There are three types of bugs you'll find in JSP code: parse errors, runtime exceptions, and functional errors.

Parse errors are easy, like grammatical errors. In the example, we've forgotten to add the second `2'.

buggy.jsp
2 + 2 = <%= 2 + %>

Resin reports the file of the error, the line, and briefly describes what's wrong. It'll report the error directly to the browser, saving the pain of hunting for an error log.

500 Servlet Exception

/test/buggy.jsp:3: Missing term.
out.print(( 2 + ));
              ^
1 error

Explanation

Behind the scenes, Resin converts the JSP file into a JavaScript program. Each of the special tags gets its own JavaScript code. The translation of buggy.jsp is actually something like:

buggy.java
out.print("2 + 2 =");
out.print((2 + ));
out.println();

So the `2 +' is still on line 3, but the character after `+' is `)'.

The generated *.java and the *.class files are created in the work-dir configured in resin.conf. By default, the work-dir is /tmp/caucho on Unix and \temp\caucho on Windows.


JSP
JSP Page Creation
runtime error messages
Copyright © 1998-2005 Caucho Technology, Inc. All rights reserved.
Resin® is a registered trademark, and HardCoretm and Quercustm are trademarks of Caucho Technology, Inc.