• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

EL ignored

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Refering to chapter 8 of Head First Servlets and JSP.
Here is my JSP code:

<html><body>
Dog’s name is: ${person.dog.name}
</body></html>

Expected output:
Dog's name is: Spike

Actual output:
Dog's name is: ${person.dog.name}

web.xml does not have el-ignored tag, nor does my JSP has isELIgnored="true"

I would appreciate any help on this.
Thanks in advance.

 
Sheriff
Posts: 14691
16
Eclipse IDE VI Editor Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Your web.xml is probably not configured properly. Check this FAQ.
 
Reena Nagdev
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Christophe Verré wrote:Your web.xml is probably not configured properly. Check this FAQ.



Thanks for reply.
I changed my web.xml accordingly.

Here is my web.xml

<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee

http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
version="2.4">
<servlet>
<servlet-name>TestBeanServlet</servlet-name>
<servlet-class>TestBeanServlet</servlet-class>
</servlet>

<servlet-mapping>
<servlet-name>TestBeanServlet</servlet-name>
<url-pattern>/TestBeanServlet</url-pattern>
</servlet-mapping>
</web-app>

But still the results are same

I m using Tomcat 5.5.
 
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Have you included the right taglib reference in the jsp?

also I do not see you using any jsp tag around "${}".. how about posting your real jsp code here?
 
Reena Nagdev
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Vijay Dharap wrote:Have you included the right taglib reference in the jsp?

also I do not see you using any jsp tag around "${}".. how about posting your real jsp code here?



Thanks a lot!!!
It worked.

Here is my output:
Dog's name is: Spike



Maybe i didn't restart my Tomcat properly previously.

Thanks Christophe
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE VI Editor Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Vijay Dharap wrote:also I do not see you using any jsp tag around "${}"


I don't know what you mean. You don't need anything around EL. Same about "Have you included the right taglib reference in the jsp?". What do you mean exactly ? Taglibs have nothing to do with EL.
 
Vijay Dharap
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Christophe Verré wrote:

Vijay Dharap wrote:also I do not see you using any jsp tag around "${}"


I don't know what you mean. You don't need anything around EL. Same about "Have you included the right taglib reference in the jsp?". What do you mean exactly ? Taglibs have nothing to do with EL.



Hello Chris,

At least I took the EL expressions in the thread for the EL in JSTL.

Can you write EL ${..} just like that in jsp and it would work? That's new to me.

Can you point to relevant documentation / tutorial about the same?

I searched on google.. could not find much in this specific aspect..

Sorry if I really misled people.. I can delete the above post to avoid confusion..
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE VI Editor Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You're looking at an old tutorial. Here is a tutorial about JSP2.0.

Sorry if I really misled people.. I can delete the above post to avoid confusion..


Don't need to be sorry. We are all learning here
 
Vijay Dharap
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Christophe Verré wrote:You're looking at an old tutorial. Here is a tutorial about JSP2.0.


Amazing stuff.. I really did not know that JSP itself got so much advanced as part of JSP 2.0!

Thanks a lot Chris!
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic