Meaningless Drivel is fun!*
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes Is a scripting allowed in the body of standard action tags? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "Is a scripting allowed in the body of standard action tags?" Watch "Is a scripting allowed in the body of standard action tags?" New topic
Author

Is a scripting allowed in the body of standard action tags?

Roman Mazur
Ranch Hand

Joined: Sep 02, 2008
Posts: 42
Is a scripting allowed in the body of standard action tags?

Thanks,


SCJP 6, SCWCD J2EE 5 http://www.compcoding.com/
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61300
    
  66

What happened when you tried it?


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Roman Mazur
Ranch Hand

Joined: Sep 02, 2008
Posts: 42
I tested the scripting inside the body of standard action tags.

This is the Test class...



This is the code inside the jsp page...



and this is the result (no errors):
Roman
Mazur

According to the result I assume that scripting is allowed in the body of standard action tags.
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14688
    
  16

You can search for such details in the JSP specification. The useBean tag is described at JSP.5.1. It says :
Typically, the body will contain either scriptlets or jsp:setProperty tags that will be used to modify the newly created object, but the contents of the body are not restricted.


[My Blog]
All roads lead to JavaRanch
Roman Mazur
Ranch Hand

Joined: Sep 02, 2008
Posts: 42
Thank you guys,
 
GeeCON Prague 2014
 
subject: Is a scripting allowed in the body of standard action tags?