5
votes

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!

1
Have you set up all the files you need for content assist? Here's a link that might help: help.eclipse.org/kepler/… - Calon
@Slartibartfast: that's not it. ${pageContext.xxx} wouldn't have worked either then. - BalusC
Have you tried with Eclipse Juno or SpringToolSuite? - Federico Piazza
I ended up moving to IntelliJ. Nothing seemed to work.. - Quirijn

1 Answers

1
votes

JSP page by default ignores EL, so try

<%@ page isELIgnored="false" %>