• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Paul Clapham
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Roland Mueller
  • Piet Souris
Bartenders:

EL is not working

 
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello



after execution I get in output ${cmd} but not its contents, how to solve this?
 
Saloon Keeper
Posts: 28765
211
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You need a useBean element to define "cmd" as the name of an actual Java object.
 
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Try including isELIgnored= "false" in the page directive.
 
Sheriff
Posts: 67756
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The <jsp:useBean> is not necessary if the scoped variable cmd has already been established on the request by a controller. Is that the case?

Actually, if you are seeing ${cmd}, including the delimiters, on the browser, it more likely means that the EL is not enabled, probably due to a misconfiguration of your application. See the JSP FAQ for information on properly configuring you web application.
 
Bear Bibeault
Sheriff
Posts: 67756
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

nikhil pasupukuntla wrote:Try including isELIgnored= "false" in the page directive.


No, that's a band-aid. The real fix is to configure the web app correctly eliminating the need for goop on all the pages.
 
misha nesterenko
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
this variable goes from spring model, which scope is it in jsp page?

actually isELIgnored="false" helped, but how can configure application to avoid including this attribute
 
Nikhil Pasupukuntla
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You have to set the <el-ignored> tag in DD to configure for the entire application.
 
Bear Bibeault
Sheriff
Posts: 67756
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

misha nesterenko wrote:actually isELIgnored="false" helped, but how can configure application to avoid including this attribute


Yeah, but you don't want to put that on every page.

The most likely culprit is your deployment descriptor. Is it defined using the Servlet 2.3 DTD? If so, that will disable the EL!

See the JSP FAQ for the proper way to set up the web.xml.
 
misha nesterenko
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thank you, proper xmlns helped
 
reply
    Bookmark Topic Watch Topic
  • New Topic