File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSP and the fly likes JSTL not working Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "JSTL not working" Watch "JSTL not working" New topic
Author

JSTL not working

shabarish vai
Ranch Hand

Joined: May 26, 2008
Posts: 79
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

Joined: May 26, 2008
Posts: 79
sorry that was expression languages not working
shabarish vai
Ranch Hand

Joined: May 26, 2008
Posts: 79
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

Joined: Jan 28, 2008
Posts: 5575

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

Joined: Jan 10, 2002
Posts: 61218
    
  66

Follow the directions in the JSP FAQ on setting up your web application properly.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
shabarish vai
Ranch Hand

Joined: May 26, 2008
Posts: 79
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

Joined: Jan 10, 2002
Posts: 61218
    
  66

Your web.xml is not correct. See the JSP FAQ as I instructed.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61218
    
  66

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

Joined: May 26, 2008
Posts: 79
where will i get JSP FAQ
shabarish vai
Ranch Hand

Joined: May 26, 2008
Posts: 79
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

Joined: Sep 20, 2008
Posts: 71

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


SCJP 1.4 (80%) , SCWCD5.0 (91%) , SCEA / OCMEA
Seetharaman Venkatasamy
Ranch Hand

Joined: Jan 28, 2008
Posts: 5575

hi shabarish,

this is bear bibeault JSP FAQ

link

about web.xml configuration
web.xml
shabarish vai
Ranch Hand

Joined: May 26, 2008
Posts: 79
hi
but el(expression language) tag is enabled by default
shabarish vai
Ranch Hand

Joined: May 26, 2008
Posts: 79
hi el worked when i used <%@ page isELIgnored="false"%>
thanks everyone
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JSTL not working