This content has been marked as final.
Show 3 replies
-
1. Re: EL in included JSP
jlaskowski Oct 7, 2005 6:43 AM (in response to knovoselov)Hi,
I don't understand. Does it mean that your portlets with EL statements don't work in JBoss Portal? I work with 2.2.0-ALPHA and had no problems with it.
Jacek -
2. Re: EL in included JSP
knovoselov Oct 7, 2005 2:05 PM (in response to knovoselov)I have JBoss Portal 2.0 release installed from "JBoss Portal + JBoss AS 4.0.2" bundle.
I modified JBoss HelloWorld portlet to look like:public void doView(RenderRequest request, RenderResponse response) { response.setContentType("text/html"); request.setAttribute("hello", "world"); try { PortletContext context = getPortletContext(); PortletRequestDispatcher rd = context .getRequestDispatcher("/hello.jsp"); rd.include(request, response); } catch (Exception e) { e.printStackTrace(); } }
I am include this JSP file:<h3>Hello World from JSP file!</h3> 1+1 = ${1+1} <br/> Hello attribute value: <b>${hello}</b> <br/>
Output looks like this:
---
Hello World from JSP file!
1+1 = ${1+1}
Hello attribute value: ${hello}
ContextPath: ${pageContext.request.contextPath}
---
As you see EL expressions aren't evaluated. Is it only me who has this problem?
Same file accessed from plain web application produces expected result.
Thanks,
Konstantin
-
3. Re: EL in included JSP
knovoselov Oct 7, 2005 3:12 PM (in response to knovoselov)Never mind. I solved the problem by inserting attribute version="2.4" for <web-app> tag in the web.xml