[mini howto] JSP debug

xiaoxiao2021-03-06  99

Previous JSP development often encounters Debug very painful, give a debug method for the people just started, do not leave any IDE, I hope to help solve most of the problem 0. Directly see the JSPC generated. Java gear takes Tomcat as an example. ./Work/catalina/localhost/webappname Looking for JSPC generated. Java file judgment 1. Interrupt point if (true) return; Compiler will pass through the syntax, thereby clicking, for example,: following JSP Will be in A a = new a (); immediately jump out, so we will not perform the following process, so that you can know if the program will have problems. It is very useful for Debug .... a a = new a (); if (true) return; a.setxxproper ("Hello"); ..... 2. Exception processing can take advantage of try {....} catch (Exception E) {out.println (E.GetMessage ();} to grab the exception information try {.... ..} catch (exception e) {Out.println ("debug information:" E.getMessage ();} Exception judge http://www.javaworld.com.tw/jute/post/view?bid=29&id=61072&Sty=33. Note Using IF (False), the following example can be easily used by IF (false) Troubled him, save / ** / trouble, I am afraid to forget to delete * / original / * for (i = 0; i

转载请注明原文地址:https://www.9cbs.com/read-123405.html

New Post(0)