Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
Catch error while Page Generation
Aghosh
Hi ,
we have a requirement, the user wants a way that if they add a file or jsp in a dcr and the page is not coming up properly or is broken due to the bad file or jsp. The user should be able to see the error that the due to the file the page is not able to generate or is broken.
Is it possible to do something like that "catch the page generation error"
Please advice!!!
Abhishek
Find more posts tagged with
Comments
kummi
What do you mean by adding JSP ? Do they use the browse option to select the JSP file ?
I assume so ..
Try to use form API , while generating , try to execute/compile the JSP file using a callserver command .. very round about way ..
Rick Poulin
Is it possible to do something like that "catch the page generation error"
The problem here isn't actually caused during page generation; it's caused by attempting to render the generated page. That's a big difference, since the onus is on your page to behave appropriately. If you're using a jsp:include tag, you might want to write your own that provides the level of error handling you're looking for. In any case, the solution would be very specific to your output. Any TeamSite based solution to this problem, as kummi suggested, would be addressing the problem indirectly. However, it should not be too hard to use FormAPI/callserver/ajax to call the included file and check the HTTP response code (or check the body for a stack trace), assuming that the included file is expected to work as a standalone page and doesn't require context from a parent.