Struts Tiles EL problem

Discussion in 'Java' started by Chris Benoit, Mar 7, 2006.

  1. Chris Benoit

    Chris Benoit Guest

    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.
    Chris Benoit, Mar 7, 2006
    #1
    1. Advertising

  2. Chris Benoit

    Chris Benoit Guest

    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):
    > 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.
    Chris Benoit, Mar 7, 2006
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Rich M
    Replies:
    0
    Views:
    2,036
    Rich M
    Mar 5, 2004
  2. Gurudev
    Replies:
    1
    Views:
    3,234
    Gurudev
    Dec 3, 2004
  3. Thomas Lutz
    Replies:
    3
    Views:
    5,129
    SreejithS
    Feb 29, 2012
  4. Replies:
    7
    Views:
    25,883
    dagger007
    Mar 24, 2008
  5. Joshua
    Replies:
    2
    Views:
    382
    Joshua
    Dec 15, 2005
Loading...

Share This Page