Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Content assist in Eclipse does not work for EL in JSP files

Tags:

eclipse

jsp

el

I'm developing a Spring MVC web app in Eclipse Kepler (JEE edition). I'm using plain JSP as view technology.

I put a model on the request as an attribute and read it from the request in the JSP using 'useBean'.

When I do this, content assist fails for this object inside EL (expression language). It works however for:

  • my bean object within scriptlet code
  • standard objects that are always available in JSP (even inside EL!)

In other words: content assist works fine, except when I try it on a bean from inside an EL construct.

Summarizing the problem in code:

<jsp:useBean id="pageModel" type="org.myorg.PageModel" scope="request" />
THIS WORKS - a property of a prefined object: ${pageContext.request.... }
THIS WORKS - write out property from 'pageModel' in scriptlet code: <%= pageModel.... %>
THIS DOES NOT - write out property from 'pageModel' in EL: ${pageModel....}

All help would be greatly appreciated!

like image 380
Quirijn Avatar asked Nov 10 '22 08:11

Quirijn


1 Answers

JSP page by default ignores EL, so try

<%@ page isELIgnored="false" %>
like image 160
Java Coder Avatar answered Nov 15 '22 08:11

Java Coder