Hi!

I have here some JSPs which include other files. Now, various servlet engines
implement the <%@ include file.... %> directive differently. I want to be sure
which example is fully JSP 1.0 compliant.

JSWDK implementation:
----------------------
include.jsp:
--
<html>
Example to demonstrate include bug:
<%@include file="test.jsp" %>
</html>
--

test.jsp:
--
<html>
including...
<%@include file="dir/first.jsp" %>
</html>
--

now in subdir "dir" I have first.jsp:
--
<html>
Hello...
<%@include file="dir/second.jsp" %>
</html>
--

and second.jsp:
--
<html>
...world!
</html>
--


Now, I've tested various servlet and JSP engines, for instance, JSWDK and
ServletExec execute the above code correctly, whereas Resin and JServ/GNU JSP
fail at "first.jsp" which should have the include directive written as one of
the following:

<%@include file="dir/second.jsp" %>
<%@include file="../dir/second.jsp" %>
<%@include file="second.jsp" %>

Are the above directives fully JSP 1.0 spec compliant or is the JSWDK's?

We have developed and tested out JSP pages with Sun JSWDK and I suppose this is
the reference implementation, and other JSP engines should be written
accordingly. But then I could be wrong, and JSWDK is buggy, or vice versa.


Primoz

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html

Reply via email to