The problem is that the nested double quotes in your include statement aren't valid
JSP syntax. Try changing it to
<jsp:include page='<%= request.getParameter("article") %>' flush="true" />
with single quotes.
Alternately you can assign the value to a variable and avoid the need for nested
quotes:
<% String article = request.getParameter("article"); %>
<jsp:include page="<%= article %>" include="true" />
Cheers,
Wes
Terri Shea wrote:
> problem:
> I have a jsp file: getnews.jsp and an html file which links to it.
>
> the links look like:
>
> <a
> href="getnews.jsp?article=a/lexis_nexis.imb.ft/19991126/383eaa98.4db5.1038/i
> ndex.html">link text</a>
>
> getnews.jsp is an html template with a server-side include to pull the
> specified article in: I have tried two kinds of includes, with the same
> result
>
> <jsp:include page="<%= request.getParameter("article") %>" />
> or
> <%@ include file="<%=request.getParameter("article")%>" %>
>
> error message:
>
> com.sun.jsp.compiler.ParseException:
> /usr/netscape/server4/devdocs/news/getnews.jsp(80,56) "Attribute article has
> no value"
>
> ------------
>
> troubleshooting:
>
> I can write the value of "article" in a standard link like this:
>
> <a href="/news/<%=request.getParameter("article") %>">link text</a>
>
> with no error, and the link works perfectly.
>
> I have also tried the following code in getnews.jsp
>
> <% String myArticle = request.getParameter("article"); %>
> <jsp:include page="myArticle" />
>
> with the following error:
>
> java.io.IOException: "Error: Attempt to clear a buffer that's already been
> flushed"
>
> platform: .jsp is being handled by WebSphere on a Sun box.
>
> ----------------------------------------------------------
> any help would be appreciated!
> -------------------------
> Terri Shea
> [EMAIL PROTECTED]
>
> ===========================================================================
> 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
===========================================================================
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