0
<%@attribute name="myid" required="true"%>
<input type="text" id="<%=it.java.class.utils.ParameterPortlet.%>${myid}" />

I want to concatenate <%=java.class%> with ${myid} to get it.java.class.utils.ParameterPortlet.myid. But after deploying my project I get this error:

ERROR [http-bio-8080-exec-86][PortletRequestDispatcherImpl:137] org.apache.jasper.JasperException: Unable to compile class for JSP
org.apache.jasper.JasperException: Unable to compile class for JSP

In it.java.class.utils.ParameterPortlet I have myClass.java that contains a list of strings:

public final class myClass {
    public static final String INPUTNAMEID = "myname";
    public static final String INPUTCITYID = "mycity";
    public static final String INPUTID = "myid";
}

So what I want to do is to change dynamically the "myid" <%=it.java.class.utils.ParameterPortlet.myid%> using JSTL to myinput, myselect, myid, etc..

What I did wrong?
Any help is appreciated. Thank you!

Mustapha Aoussar
  • 5,833
  • 15
  • 62
  • 107

1 Answers1

1

Use the class, which will have its toString method invoked:

<input type="text" id="<%=it.java.class.utils.ParametriPortlet.class%>${myid}" />
Kevin Bowersox
  • 93,289
  • 19
  • 159
  • 189