Struts Tiles EL problem

C

Chris Benoit

Hello,
I want to use Struts Tiles to do this:

<tiles:insert attribute="${something}" />

It doesn't work, I get following exception:
javax.servlet.jsp.JspException: ServletException in
'/jsp/columnLayout.jsp': /jsp/columnLayout.jsp(31,1)
According to TLD or attribute directive in tag file, attribute
attribute does not accept any expressions

I get the same exception when I try to put some scriplet :
<tiles:insert attribute="<%= something here %>" />

What I did so far:
1. I put struts-el.jar into WEB-INF/lib directory (ver 1.2)

2. I put struts-tiles-el.tld into WEB-INF dir (ver 1.2)

3. I declared taglib: <%@ taglib uri="/WEB-INF/struts-tiles-el.tld"
prefix="tiles-el"%>

4. I tried to use <tiles-el:insert attribute="${something}" /> but it
throws the same exception

I use Tomcat 5.5.15 ( so it's Servlet/JSP Spec 2.4/2.0 ), Struts 1.2,
JSTL 1.1.
The IDE is MyEclipse 4.1.1

Please help.
 
C

Chris Benoit

Ok, I've found the solution:
Somehow "attribute" is not supported by Struts tiles EL:

<tiles:insert attribute="${something}" /> <== this does not work

but "name" is:
<tiles:insert name="${something}" /> <== this works well!



Chris Benoit napisal(a):
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top