Win a copy of Java 9 Revealed this week in the Features new in Java 9 forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Can I use <jsp:useBean tag in portlet?  RSS feed

barry nevel
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a portlet in which I want to use a javabean by using <jsp:useBean> tag.
This works fine but I have a problem when I try to namespace it.

First off...
Do I need to namespace it or will the portal session ensure it's unique?

<c:set var="ns">
<portlet:namespace />

<jsp:useBean id="${ns}someBean" scope="session" class="xx.yy.zz" />

I get an error saying I cannot use EL expressions there.

Does anyone have any suggestions?

Ben Souther
Posts: 13411
Firefox Browser Redhat VI Editor
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!