This week's book giveaway is in the Design forum.
We're giving away four copies of Design for the Mind and have Victor S. Yocco on-line!
See this thread for details.
Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problem in jsp while using standard action

 
vinoth subramaniam
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, i am using JSTL 1.1 standard taglib. i am using eclipse IDE. I read the faq part http://faq.javaranch.com/java/JstlTagLibDefinitionsand i downloaded the two jar files standard.jar and jstl.jar from the http://jakarta.apache.org/site/downloads/downloads_taglibs-standard.cgi. Then i put those files in the WEB-INF folder. Right now i am facing the following problem.


in the controller servlet i added some attribue (request scope) named music_array and tip.





I can able to iterate through that collection by using the "<c:>" prefix (line 14 and 23). But i can't able to use the <fn:> standard actions. i am getting a following error. I can use the other prefixes core, xml, sql, and fmt. But i cant use the fn prefix. what is the problem caussing this error?
What is the logical reason behind this problem. Please clear me.

org.apache.jasper.JasperException: /result.jsp(24,2) The function convEntity cannot be located with the specified prefix
org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:40)
org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:407)
org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:148)
org.apache.jasper.compiler.Validator$1FVVisitor.visit(Validator.java:1254)
org.apache.jasper.compiler.ELNode$Function.accept(ELNode.java:123)
org.apache.jasper.compiler.ELNode$Nodes.visit(ELNode.java:194)
org.apache.jasper.compiler.ELNode$Visitor.visit(ELNode.java:235)
org.apache.jasper.compiler.ELNode$Root.accept(ELNode.java:54)
org.apache.jasper.compiler.ELNode$Nodes.visit(ELNode.java:194)
org.apache.jasper.compiler.Validator$ValidateVisitor.validateFunctions(Validator.java:1263)
org.apache.jasper.compiler.Validator$ValidateVisitor.visit(Validator.java:603)
org.apache.jasper.compiler.Node$ELExpression.accept(Node.java:897)
org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2166)
org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2216)
org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2222)
org.apache.jasper.compiler.Node$Root.accept(Node.java:457)
org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2166)
org.apache.jasper.compiler.Validator.validate(Validator.java:1484)
org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:167)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:296)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:277)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:265)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:564)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:302)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
request_forwarder.doPost(request_forwarder.java:79)
javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)


Please clear my issue. Thanks in advance..! Please ask if you need any futher information.
 
vinoth subramaniam
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
22 <c : out value='${tip}'></c : out>
23 ${fn:convEntity(pageContent.tip)}
 
Satya Maheshwari
Ranch Hand
Posts: 368
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
${fn:convEntity(pageContent.tip)}


What does convEntity do? I am unable to find such a function in http://java.sun.com/jsp/jstl/functions. Does it exist?
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64715
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Then i put those files in the WEB-INF folder.
Not correct. Read the FAQ again.
 
vinoth subramaniam
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i put the two jar files in the WEB-INF/lib folder
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64715
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You did not answer this question:
Originally posted by Satya Maheshwari:
What does convEntity do? I am unable to find such a function in http://java.sun.com/jsp/jstl/functions. Does it exist?
 
vinoth subramaniam
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It is use to convert the angle brackets in the attribute into something the browser will render as angle brackets.
 
vinoth subramaniam
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i am just started to learn how people are trying to help each other, in this forum. Thanks for spending your valuable time and effort. Hope i'll identify the problem soon.
 
Satya Maheshwari
Ranch Hand
Posts: 368
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by vinoth subramaniam:
It is use to convert the angle brackets in the attribute into something the browser will render as angle brackets.


Here you can find the functions in http://java.sun.com/jsp/jstl/functions . I do not find convEntity listed here. I guess, as you are trying to use a function which does not exist, its giving an error.

[ September 10, 2008: Message edited by: Satya Maheshwari ]
[ September 10, 2008: Message edited by: Satya Maheshwari ]
 
vinoth subramaniam
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi ,you are right. There is no such function in the fn. i confused with the custom tags.

but i found the problem. i think the Problem is in the jstl.jar file. Its only have four packages

1. javax.servlet.jsp.jstl.core.*;
2. javax.servlet.jsp.jstl.fmt.*;
3. javax.servlet.jsp.jstl.sql.*;
4. javax.servlet.jsp.jstl.tlv.*;

and also the standard.jar file having following packages

org.apache.taglibs.standard
org.apache.taglibs.standard.extra.spath
org.apache.taglibs.standard.functions
org.apache.taglibs.standard.lang.jstl
org.apache.taglibs.standard.lang.jstl.parser
org.apache.taglibs.standard.lang.jstl.test
org.apache.taglibs.standard.lang.jstl.test.beans
org.apache.taglibs.standard.lang.support
org.apache.taglibs.standard.resources
org.apache.taglibs.standard.tag.common.core
org.apache.taglibs.standard.tag.common.fmt
org.apache.taglibs.standard.tag.common.sql
org.apache.taglibs.standard.tag.common.xml
org.apache.taglibs.standard.tag.el.core
org.apache.taglibs.standard.tag.el.fmt
org.apache.taglibs.standard.tag.el.sql
org.apache.taglibs.standard.tag.el.xml
org.apache.taglibs.standard.tag.rt.core
org.apache.taglibs.standard.tag.rt.fmt
org.apache.taglibs.standard.tag.rt.sql
org.apache.taglibs.standard.tag.rt.xml
org.apache.taglibs.standard.tei
org.apache.taglibs.standard.tlv

If i am not wrong, there is some problem in the jar files. Ans aldo please tell me where i can get the two jar files.

i downloaded those two jar files from it from http://jakarta.apache.org/site/downloads/downloads_taglibs-standard.cgi, and i found those two jar files in the jakarta-taglibs-standard-1.1.2 zip file.

Please tell me where can i get the jar files having that "fn" package. Or else tell ,the path and steps to download it. Thanks
 
Satya Maheshwari
Ranch Hand
Posts: 368
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please tell me where can i get the jar files having that "fn" package. Or else tell ,the path and steps to download it. Thanks


The URL you have specified is correct. This contains the 'fn' taglib as well. That's all you need. I think this is not the problem.
[ September 11, 2008: Message edited by: Satya Maheshwari ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic