• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Question in Simple tag with body content "JSP"

 
Sangeetha Raja
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am trying to execute a tag with JSP body content. I understand that every statements of JSP page can be ecxecuted by JSP body content.

The Jsp file has:


The tld file has;



The TagEight java class has;


I am getting error mesage;

when i run the Jsp...
JSPG0049E: /Jsp/SimpleTagTest.jsp failed to compile : JSPG0091E: An error occurred at line: 62 in the file: /Jsp/SimpleTagTest.jspJSPG0093E: Generated servlet error from file: /Jsp/SimpleTagTest.jsp C:\Program Files\.............\Test_EAR\SampleServlet.war\Jsp\_SimpleTagTest.java:265: cannot resolve symbolsymbol : method print (int)location: class java.io.Writer out.print( scount ); ^1 error



Note:Jsp file is in Jsp folder of the Webcontent, TagTest.tld is in WEB-INF.

Why i am getting the error message even the body content is "JSP"
Can anyone of you please help me t understand this?
 
ujjwal soni
Ranch Hand
Posts: 403
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

To resolve this problem, you need to change the body-content tag value in your taglib file.

Change it according to what i have specified below.



Remember :

with JSP 2.0 <body-content> does not have a default value and is a mandatory element.

With simple tags the options you could have is 1.) scriptless 2.) tagdependent 3.) empty

with classic tag's the options would be 1.) scriptless 2.) tagdependent 3.) empty 4.) JSP

ie: For tag files its.. Scriptless... but for custom tags.. its mandatory...

"HELPING HANDS ARE BETTER THAN PRAYING LIPS......."


HOPE THIS RESOLVES YOUR PROBLEM........
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic