• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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........
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic