JSP debugging experience.

xiaoxiao2021-03-06  60

My experience is a number of servers, this seems to be wrong, using the other, this method is very easy. -------------------------------------------------- ------------- 1 Use console or browser to output possible errors (equivalent to breakpoints) 2 Adjustment in the program to find abnormalities to find that the problem is in direct use Browser browsing, problems slowly find ------------------------------------- ------------------------ All JavaWeb Server supports Java source code after JSP compiles to servlet, so you only have to give Out of error message and the source code of the servlet, you can get it quickly. This method is very suitable for more complex, advanced, implied errors, and very useful. Web Server, such as JRun, RESIN can find the appropriate file directly in the web-inf / jsp directory. For WebLogic, you need to configure the runtime system parameters, of course, you can also compile directly with WebLogic.jspc. -------------------------------------------------- ------------ Individual summary of some debugging experience: Method 1: Removing the error of the error to block the code you think, then call the page, if the page does not report an error, prove you to shield The code has an error. Otherwise, a part of the code will be shielded, and only the page does not report. Method 2: Put some important variables out.println (); come out, see if you want to get the value. The browser report is generally worthless. -------------------------------------------------- ------------- Try {...} catch (exception se) {se.printstacktrace (system.err);} finally {....} If there is a mistake, Which row is displayed in JBuilder, as well as the cause of the error.

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

New Post(0)