Win a copy of Learning OpenStack Networking: Build a solid foundation in virtual networking technologies for OpenStack-based clouds this week in the Cloud/Virtualization forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Knute Snortum
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Ganesh Patekar
  • Stephan van Hulst
  • Pete Letkeman
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Ron McLeod
  • Vijitha Kumara

Problem in jsp while using standard action  RSS feed

 
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)}
 
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?
 
Author and ninkuma
Marshal
Posts: 66797
168
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
Posts: 66797
168
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 ]
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!