Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Need jar files for EL  RSS feed

 
Vibhas Kumar
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Friends i am new to java server pages and right now reading Expression Language from Head First. I just want to know that which jar i have to download and which tag library to use in order to run Expression Language. Right now i am using Eclipse Galileo for that. I am showing you my simple code for this:-


but the output is not showing me the browser name. Can any body help me what is the reason.
Thanks in advance
 
Vijitha Kumara
Saloon Keeper
Posts: 3997
42
Chrome Fedora Hibernate
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Which web container are you using? Check the JspFaq to see how to use EL/JSTL etc..
 
Vishwanath Krishnamurthi
Ranch Hand
Posts: 331
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What was your browser showing?

You appear to be using the following browser:
${header["user-agent"]}

or

You appear to be using the following browser: <Nothing displayed here>


If it's the second case, probly EL is working just right...
Check if user-agent is empty... That may be the reason why nothing is shown.

You can do that with


See if it displays 'true'
 
Vibhas Kumar
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi am actually using mozilla and m using eclipse galileo and tomcat5 server. No even if i m trying to write simple EL like ${1} it is simply displaying ${1} instead of displaying 1.

 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Does that mean you read the FAQ page Vijitha pointed you to, and your setup is exactly as described there?
 
Vibhas Kumar
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes but i did not find what to be done for this issue. I am posting one more example.

Servlet:


and jsp code:


The expected answer is to display the name but i am getting only the Title name but no value . I am using mozilla firefox and using Eclipse galileo with tomcat5 server. Please identify the problem.
 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please take care how you use CODE tags - they should include code, but not running text.

The important part is how your web.xml file is set up. The page you should have looked at (which is linked from the page Vijitha mentioned) is http://faq.javaranch.com/java/ElOrJstlNotWorkingAsExpected. Note that Tomcat 5 is a JSP 2.0 container.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!