📄 parse_error.xtp
字号:
<s1 title="Parse Errors"><p>Errors happen. There's a reason the patron saint of programmers isSt. Murphy. Here we'll just explain Resin's error reporting tosimplify tracking down errors.</p><p>There are three types of bugs you'll find in JSP code: parse errors,runtime exceptions, and functional errors.</p><p>Parse errors are easy,like grammatical errors.In the example, we've forgotten to addthe second `2'.</p><example title='buggy.jsp'>2 + 2 = <%= 2 + %></example><p>Resin reports the file of the error, the line, andbriefly describes what's wrong. It'll report the error directly tothe browser, saving the pain of hunting for an error log.</p><results width='80%' border=3>500 Servlet Exception/test/buggy.jsp:3: Missing term.out.print(( 2 + )); ^1 error</results><s2 title='Explanation'><p>Behind the scenes, Resin converts the JSP file into a JavaScriptprogram. Each of the special tags gets its own JavaScript code. Thetranslation of buggy.jsp is actually something like:</p><example title='buggy.java'>out.print("2 + 2 =");out.print((2 + ));out.println();</example><p>So the `<code/2 +/>' is still on line 3, but the character after`<code/+/>' is `<code/)/>'.</p><p>The generated *.java and the *.class files are createdin the <var/work-dir/> configured in resin.conf. By default, the<var/work-dir/> is <var//tmp/caucho/> on Unix and <var/\temp\caucho/>on Windows.</p></s2></s1>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -