You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Denis Balazuc <de...@trader.com> on 2001/11/05 23:43:30 UTC
jsp:include / @include.....help !
Hi all
The features around the include tags and jsp:include directives is not clear
to me....
Does anyone know where I can find a document about those directives ?
For instance, what's good behind <jsp:include> and %@include file=""%, and
what's bad (the pros and cons)
Also, I don't really catch the meaning of "relative" when reading
http://java.sun.com/products/jsp/pdf/card11.pdf
Is that relative to the web server URL or to the current context ? It does
not match what I experiment with Tomcat 3.2.3...
Why is that both do not work the same way at all ? ("relative" does not seem
to have the same meaning on both cases)
In short....I'd love to read more about it....so if you know where the
definitive-killer document lies....
Thanks
--
To unsubscribe: <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>
Re: jsp:include / @include.....help !
Posted by Nikola Milutinovic <Ni...@ev.co.yu>.
> Hi all
>
> The features around the include tags and jsp:include directives is not clear
> to me....
> Does anyone know where I can find a document about those directives ?
>
> For instance, what's good behind <jsp:include> and %@include file=""%, and
> what's bad (the pros and cons)
> Also, I don't really catch the meaning of "relative" when reading
> http://java.sun.com/products/jsp/pdf/card11.pdf
> Is that relative to the web server URL or to the current context ? It does
> not match what I experiment with Tomcat 3.2.3...
> Why is that both do not work the same way at all ? ("relative" does not seem
> to have the same meaning on both cases)
>
> In short....I'd love to read more about it....so if you know where the
> definitive-killer document lies....
http://java.sun.com -> servlet 2.3 and JSP 1.2 specifications
<%@ include file=""%> is a compile-time directive, used when JSP page needs to be transformed into a servlet (anytime it is changed and then someone requests it). It is like "#include <*.h>" directive from C/C++. The file is included as-is, the raw source of it, whatever it is.
<jsp:include page=""> is a run-time action, which will REQUEST the URL from the engine and include the output it gets from it. If it is a text file, I guess it will be included as-is (although filtering can change that). If it is a JSP or a Servlet, it will be executed and the resulting output will be included.
From the specification, I'd say <jsp:include ...> cannot include resources outside the server. Am I wrong? Can something like <jsp:include page="http://test.company.com/test/test.php"> be done? Or do I have to write java code to open a socket to the URL and spit it's output to the out?
Nix.
RE: include / @include.....help !
Posted by "Parmar, Deepak" <de...@mediaone.net>.
see this article:
<http://java.oreilly.com/news/jsptips_1100.html>
Deepak
-----Original Message-----
From: Denis Balazuc [mailto:denis.balazuc@trader.com]
Sent: Monday, November 05, 2001 5:44 PM
To: Tomcat Users List
Subject: jsp:include / @include.....help !
Hi all
The features around the include tags and jsp:include directives is not clear
to me....
Does anyone know where I can find a document about those directives ?
For instance, what's good behind <jsp:include> and %@include file=""%, and
what's bad (the pros and cons)
Also, I don't really catch the meaning of "relative" when reading
http://java.sun.com/products/jsp/pdf/card11.pdf
Is that relative to the web server URL or to the current context ? It does
not match what I experiment with Tomcat 3.2.3...
Why is that both do not work the same way at all ? ("relative" does not seem
to have the same meaning on both cases)
In short....I'd love to read more about it....so if you know where the
definitive-killer document lies....
Thanks
--
To unsubscribe: <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>
--
To unsubscribe: <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>