Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / First Aid / June 2005

Tip: Looking for answers? Try searching our database.

advantage of using JSP tag over Java code

Thread view: 
jrefactors@hotmail.com - 02 Jun 2005 23:28 GMT
I want to know the advantage of using JSP tags over Java code?

For example,

<jsp:setProperty name="beanInstanceName" property="propertyName" /> is
using the JSP tag.

But we can also write Java scripplet code
<% beanInstanceName.setPropertyName(); %>

Another example is

<jsp:getProperty name="beanInstanceName" property="propertyName" /> and
beanInstanceName.getPropertyName();

Please advise.
thanks!!
Robert Maas, see http://tinyurl.com/uh3t - 11 Jun 2005 05:47 GMT
> From: jrefactors@hotmail.com
> I want to know the advantage of using JSP tags over Java code?
[quoted text clipped - 3 lines]
> But we can also write Java scripplet code
> <% beanInstanceName.setPropertyName(); %>

I see two advantages to pure XML JSP code without any scriptlets:

Practical advantage:
A validating XML parser is sufficient to detect all syntax errors in
pure XML/JSP code but can't understand scriptlets. Furthermore an
XML-based tool can extract a symbol table from such XML/JSP code, i.e.
a simple list of all properties that have been setted or getted. If the
manifest for your library's public interface is also written in XML,
then an XML tool can then likewise extract the symbol table of
definitions from your manifest file, and then check the calls against
the definitions to verify that the XML/JSP file isn't trying to set or
get anything that isn't defined in the java library.

Political advantage:
If you work in a highly fragmented company, where one group of
employees knows java but doesn't know any HTML, and another group knows
HTML/XML but doesn't know any java, and neither group is allowed to
tresspass into the other's work by learning any skill belonging to the
other group, then the HTML/XML only group can edit the pure XML/JSP
files without violating company rules.

Now I'm just a beginner in this topic, so somebody more knowledgeable
please fill in anything I've overlooked.


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.