*
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes Can somebody help me with jsp:invoke? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "Can somebody help me with jsp:invoke?" Watch "Can somebody help me with jsp:invoke?" New topic
Author

Can somebody help me with jsp:invoke?

alzamabar
Ranch Hand

Joined: Jul 24, 2002
Posts: 379
Sorry, I looked at the JSP 2.0 specs, I tried to invoke it on my tag files, but still I don't understand how jsp:invoke works. Is there anyone who can explain this to me?

Thanks.


Marco Tedone<br />SCJP1.4,SCJP5,SCBCD,SCWCD
Ritu varada
Ranch Hand

Joined: Sep 08, 2004
Posts: 117
Maybe this will help

http://java.sun.com/products/jsp/syntax/2.0/syntaxref2021.html#8837


SCJP,SCWCD(1.4)
alzamabar
Ranch Hand

Joined: Jul 24, 2002
Posts: 379
I visited the link but still I couldn't have an example to run.

I wrote the Tag file as follows:



And the JSP file as follows:



I get the following exception:

org.apache.jasper.JasperException: /HelloTag.jsp(11,0) Unable to find setter method for attribute: aFragment
org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:39)
org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:409)
org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:150)
org.apache.jasper.compiler.Generator$GenerateVisitor.evaluateAttribute(Generator.java:2677)
org.apache.jasper.compiler.Generator$GenerateVisitor.generateSetters(Generator.java:2825)
org.apache.jasper.compiler.Generator$GenerateVisitor.generateCustomDoTag(Generator.java:2363)
org.apache.jasper.compiler.Generator$GenerateVisitor.visit(Generator.java:1663)
org.apache.jasper.compiler.Node$CustomTag.accept(Node.java:1441)
org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2163)
org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2213)
org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2219)
org.apache.jasper.compiler.Node$Root.accept(Node.java:456)
org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2163)
org.apache.jasper.compiler.Generator.generate(Generator.java:3272)
org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:244)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:470)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:451)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:439)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:511)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:295)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)



I am puzzled
Ritu varada
Ranch Hand

Joined: Sep 08, 2004
Posts: 117
I don't know much about jsp:invoke and I am taking the exam tomorrow! Anyway, I found this example in the web.See if this makes sense.

http://www.oracle.com/technology/sample_code/tech/java/codesnippet/jsps/customtag/how-to-tagfile.html#jsp
Ritu varada
Ranch Hand

Joined: Sep 08, 2004
Posts: 117
Or this one!
http://today.java.net/pub/a/today/2003/11/25/tagfiles.html
Marcos Doria
Greenhorn

Joined: Feb 13, 2014
Posts: 1
Try to change aFragment to afragment, thats it, will work.


att,

Marcos Turisco.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Can somebody help me with jsp:invoke?
 
Similar Threads
jsp:invoke
Custom tags and standard actions
difference between jsp:doBody and jsp:invoke actions
jsp:doBody V/S jsp:invoke
regarding jsp:invoke