• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

Question in Simple tag with body content "JSP"

 
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
Ranch Hand
Posts: 405
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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........
 
What a show! What atmosphere! What fun! What a tiny ad!
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic