Tutorials to .com

Tutorials to .com » Jsp » Tapestry-hivemind » Exception Handling Tapestry modify page

Exception Handling Tapestry modify page

Print View , by: iSee ,Total views: 10 ,Word Count: 403 ,Date: Thu, 16 Apr 2009 Time: 2:28 AM

tapestry of the exception handling information page compare the whole, in the development stage of the amendment of the debugging is very good. 。 However, in run-time user to see when this will be at a loss of information.

;, ;tapestry,,,,。 Therefore, I would be abnormal for the two sets of screen design, a set of services in the development phase, called the design period of abnormal screen; the other is for end-users to see, called the run-time anomaly screen; design period abnormal screen completely abnormal tapestry default screen, and run-time exception handling anomalies in the design phase of information into the log file, and to display customized information to users anomaly, so the page can be very simple, his message is displayed.

To this end, the need to modify the default configuration Tapestry, modify the default page of the exception handling.

,Exception.htmlException.javaMyException.htmlMyException.java,MyException.html<span jwcid="@RequestDisplay"/>。 1. The org \ apache \ tapestry \ pages \ copy all the files to your project, modify Exception.java renamed Exception.html and MyException.html and MyException.java, delete MyException.html behind his <span jwcid = "@ RequestDisplay" /> can be.

2. Can also be the basis of the above two steps, on the other abnormal screen to customize and modify.

3. Hivemind.xml to add the following code:
<contribution configuration-id="tapestry.InfrastructureOverrides">
<property name="exceptionPageName" value="MyException"/>
<property name="staleSessionPageName" value="MyStaleSession"/>
<property name="staleLinkPageName" value="MyStaleLink"/>
</ contribution>
,,。 Can, so do not need to modify the tapestry-4.0.jar file, unless a last resort, do not modify the document.


tapestry & hivemind Articles


Can't Find What You're Looking For?


Rating: Not yet rated

Comments

No comments posted.