abg
abg

Reputation: 2092

How to assign values to the parameters of <portlet:resourceURL/>?

I'm trying to assign values to the parameters of <portlet:resourceURL/>

<portlet:resourceURL id="<%=Constants.Color%>" var="<%=Constants.Color%>"/>

This code does not work.

public class Constants {
    public static final String Color = "Red";
}

Upvotes: 2

Views: 8484

Answers (1)

mod
mod

Reputation: 383

In order to pass param using resourceURL from your jsp you will do something like...

      <portlet:resourceURL var="varname" escapeXml="false">
        <portlet:param name="paramName" value="paramVal" />
      </portlet:resourceURL>

In your portlet

      request.getParameter("paramName");    

Upvotes: 5

Related Questions