• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

help, help, help.

 
Ernest Lee
Ranch Hand
Posts: 145
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
is there any restriction on where to put directive, action, scriplet, expression, etc...?
like do i have to put all directive before action, etc???
 
Carl Trusiak
Sheriff
Posts: 3341
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Very few restrictions except your own conventions. The one that does come to mind is < @page import="java.packageorclass"..., you must do that before any scriptlet/expression etc. uses that imported class or package.
 
Win Yu
Ranch Hand
Posts: 224
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
But BodyContent is not.
 
Fozan Zaidi
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Hi Lee
Thanks for replying me .The key pt. which is to be remembered regarding problem is that"To know that which code goes where".
eg:
Declarations go out of _jspService method after page translation and present in translated servlet as instance variables and methods(so there is no restriction for declaration to come before or after which code in jsp page)

scriptlets ,expressions,java code equivalent custum actions and useBean actions goes to _jspService method of translated servlet
variable declared in scriptlets and expressions are local variable to service method should be declared before their use in other scriptlets and expressions
taglib directive is used to load tld library .U r required to load the corresponding library of custum tag handler before use Ur custum action in jsp file
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic