This week's book giveaway is in the Agile and Other Processes forum.
We're giving away four copies of The Little Book of Impediments (e-book only) and have Tom Perry on-line!
See this thread for details.
Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

errorPage in page directive..

 
Ranjani Theyagarajan
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In file companyhome.jsp:

<html><body>
Welcome to ABC Corp!
<jsp:include page="companynews.jsp" />
</body></htm>
<%@ page errorPage="simpleerrorhandler.jsp" %>

In file companynews.jsp:

<%@ page errorPage="advancederrorhandler.jsp" %>
<h3>Todays News</h3>

Will this compile? If yes ,what would be the o/p?

In the spec i read expect import nothing can be repeated for page directive.
But if the included file also contains a errorPage attribute.
Your thoughts please...
 
MInu
Ranch Hand
Posts: 517
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i cant see anything wrong with this code.
i think it will compile....

correct me if i am wrong.
[ February 19, 2006: Message edited by: minu su ]
 
Narendra Dhande
Ranch Hand
Posts: 951
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I think this will compile correctly. The problem is when you use <%@include ...> to include the page.

Thanks
 
P Chittaranjan
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This will compile and the output shoud be

Welcome to ABC Corp!
Todays News
 
Kosala W.Abayagunawardene
Ranch Hand
Posts: 47
Firefox Browser Java Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When using Include action Only the output of the included page is inserted into the output of the including page.

so output

"welcome..." as well as "Todays News".

 
Ankit Garg
Sheriff
Posts: 9580
33
Android Google Web Toolkit Hibernate IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Kosala please Dont Wake The Zombies, that thread is 2 years old, your answer won't be of much help to that person now...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic