3 ms·
One big problem; if you keep most of the Java code on the servlet side and you throw an exception, the stack trace will give you the line number of the offendin
by tomh 16y ago
One big problem; if you keep most of the Java code on the servlet side and you throw an exception, the stack trace will give you the line number of the offending code.
OTOH, if you do all that heavy lifting in the JSP side, depending on your choice of server, you get a stack trace...either without a line number, or with a line number of the JSP which was compiled and turned into a Java program on the fly.
And we all know what machine-generated Java looks like, right? Like a big plate of pain with some extra pain on top. Good luck bug-hunting that one.
- kp212 16y agoYeah you are right, lets just forget using jsp without the framework model.
- eccp 16y agoNot entirely true. On Tomcat 5 and 6, the resulting code is really close to the original, plus lots of out.write(). If the logs show an exception on org.apache.jsp.mypage_jsp._jspService(mypage_jsp.java:NNNN), you can find the generated Java class on TOMCAT_HOME/work/Catalina/localhost/myapp and it's rather straightforward from there. I do this on a daily basis to maintain a legacy app. Not sexy but, not hard either.