This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

EL expression not working

 
Jade Lucky
Greenhorn
Posts: 9
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi guys,
I tried the example shown in HF Servlet and JSP book for EL expressions and I could not get it working.


This is my first Jsp user1.jsp


My second Jsp is TestEL jsp

<%= application.getAttribute("mail") %> < - Only when it has this part, it works and Prints the user Name " Smily"
${applicationScope.mail} <- This part does not do so


My Web.xml is


Can someone see what i am doing wrong?

Thanks
 
Ankit Garg
Sheriff
Posts: 9497
22
Android Google Web Toolkit Hibernate IntelliJ IDE Java Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Checkout this if it helps...
 
Cindy Carney
Ranch Hand
Posts: 57
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have been working on this all afternoon, and have encountered the same problems as you. I am using Eclipse - what are you using?

I've tracked it down to the fact that the init-param is never successfully read - it comes IN as null, and that's why it's propagating as null farther on down the code.

Is there any Web expert out there that can tell us what we're doing wrong?

--Cindy
 
Cindy Carney
Ranch Hand
Posts: 57
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, I finally switched to the Tomcat app server, and got a trivial example to work. However, the same code doesn't work with the built-in WebSphere app server.

I'm going to chalk it up to a container bug, at this point.

user1.jsp


web.xml

 
Christophe Verré
Sheriff
Pie
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm going to chalk it up to a container bug, at this point.

It's difficult to believe. What is the version of the server ? Which servlet/JSP API does it support ?
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic