• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JSTL not working

 
shabarish vai
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi all,
my servlet code is in BeerSelect class)

and this will be forwarded to result.jsp
and in my result.jsp :


and am getting the output as
${FavFood} itself...
should i have to configure in web.xml please help
thanks
 
shabarish vai
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
sorry that was expression languages not working
 
shabarish vai
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
am facing the same problem even if i use JSTL using TLD file should we have to configure anything for expression languages to work

please help
thanks
Shabarish
 
Seetharaman Venkatasamy
Ranch Hand
Posts: 5575
Eclipse IDE Java Windows XP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,

1. whether you add jstl.jar in WEB-INF/lib folder.

2. whether you declare below in your jsp

<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

if it is not do this ... if yes.. please give some more details

Hope This Helps
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65216
95
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Follow the directions in the JSP FAQ on setting up your web application properly.
 
shabarish vai
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HI,
my result.jsp is:
my servlet isinside doPost method)


AND my web.xml is:
have added jstl.jar and standaed jar in \tomcat5\common\lib\
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65216
95
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Your web.xml is not correct. See the JSP FAQ as I instructed.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65216
95
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Also, please be sure to use UBB code tags when posting code to the forums. Unformatted code is extremely hard to read and many people that might be able to help you will just move along to posts that are easier to read. Please read this for more information.

You can go back and change your post to add code tags by clicking the .
 
shabarish vai
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
where will i get JSP FAQ
 
shabarish vai
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi i changed my <web-app> tag to even after the changes m not getting the output
am stil getting same output as ${FavFood} itself
 
Ranil Liyana Arachchige
Ranch Hand
Posts: 71
Hibernate Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
dear shabarish,

I suggest you to try the following, in the jsp try the page directive and toggle the value of isELIgnored between true|false,

ex <%@ page isELIgnored="true"%> and test the page and then again set <%@ page isELIgnored="false"%> and see,if either of that evaluates EL expression then you would be able to find where things have gone wrong,

Hope that helps,

Regards,
Ranil LiyanaArachchi
 
Seetharaman Venkatasamy
Ranch Hand
Posts: 5575
Eclipse IDE Java Windows XP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi shabarish,

this is bear bibeault JSP FAQ

link

about web.xml configuration
web.xml
 
shabarish vai
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi
but el(expression language) tag is enabled by default
 
shabarish vai
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi el worked when i used <%@ page isELIgnored="false"%>
thanks everyone
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic