You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by James Erb <je...@hotwire.com> on 2002/01/23 21:11:13 UTC

jsp templates: using expression in content files

We're stumped folks.  I'm using struts templates as a way make UI
development more efficient--but we have the following issue.

Imagine a page like the following: 

<%@ page language="java"  %>
<%@ taglib uri="/WEB-INF/struts-template.tld" prefix="template" %>




<%! String name = "bob"; %>


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

<html>
<head>
	<title>Untitled</title>
</head>

<body>


<template:insert template="/web/jsp/templates/testTemplate.jsp" >

<template:put name="layout" content="layout.jsp" />

</template:insert>


</body>
</html


The problem is in the content file "gotten" by the template
--layout.jsp--contains the expression

<%= name %>

We consistently get "symbol not found" compilation errors. Can it really be
that templates are good for the inclusion of only static content? We'd like
to use templates to include JSP content that contains expressions.

Also, we've tried <jsp:expression> etc.

Please help..


James Erb
Director of Web Development
Hotwire
jerb@hotwire.com
415/343-8411
www.hotwire.com

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: jsp templates: using expression in content files

Posted by Michael Mehrle <mi...@datasaur.com>.
Have you tried Tiles? I'm working with it right now, and am on the cusp of
inserting dynamic tags... just an idea.

----- Original Message -----
From: "James Erb" <je...@hotwire.com>
To: <st...@jakarta.apache.org>
Sent: Wednesday, January 23, 2002 12:11 PM
Subject: jsp templates: using expression in content files


> We're stumped folks.  I'm using struts templates as a way make UI
> development more efficient--but we have the following issue.
>
> Imagine a page like the following:
>
> <%@ page language="java"  %>
> <%@ taglib uri="/WEB-INF/struts-template.tld" prefix="template" %>
>
>
>
>
> <%! String name = "bob"; %>
>
>
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
>
> <html>
> <head>
> <title>Untitled</title>
> </head>
>
> <body>
>
>
> <template:insert template="/web/jsp/templates/testTemplate.jsp" >
>
> <template:put name="layout" content="layout.jsp" />
>
> </template:insert>
>
>
> </body>
> </html
>
>
> The problem is in the content file "gotten" by the template
> --layout.jsp--contains the expression
>
> <%= name %>
>
> We consistently get "symbol not found" compilation errors. Can it really
be
> that templates are good for the inclusion of only static content? We'd
like
> to use templates to include JSP content that contains expressions.
>
> Also, we've tried <jsp:expression> etc.
>
> Please help..
>
>
> James Erb
> Director of Web Development
> Hotwire
> jerb@hotwire.com
> 415/343-8411
> www.hotwire.com
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>
>



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>