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 Question in Simple tag with body content Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "Question in Simple tag with body content "JSP"" Watch "Question in Simple tag with body content "JSP"" New topic
Author

Question in Simple tag with body content "JSP"

Sangeetha Raja
Greenhorn

Joined: Dec 18, 2008
Posts: 28
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

Joined: Mar 28, 2007
Posts: 403
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........

Cheers!!!
Ujjwal B Soni <baroda, gujarat, india> <+919909981973>
"Helping hands are better than praying lips......"
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Question in Simple tag with body content "JSP"