• 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

How are Standard bean action tags useful

 
Ranch Hand
Posts: 580
Eclipse IDE
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Using standard bean action tags helps the web page designer in understanding the things better . And it is easy to maintain for the programmer.
I want to know if there is any improvement in terms of performance... like ... is the page loading time less if we use tags instead of the scriptlets/expressions ?
Or any such advantage of using tags over scriptlets/expressions. ?
 
Ranch Hand
Posts: 437
Oracle Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi, James.

I want to know if there is any improvement in terms of performance... like ... is the page loading time less if we use tags instead of the scriptlets/expressions ?



I think(I am guessing), scriptlets/expressions are faster over standard actions. If we compare the benefits of standard actions over scriptlets, this is minor issue.

Or any such advantage of using tags over scriptlets/expressions. ?



Reduces the development time.
 
James Tharakan
Ranch Hand
Posts: 580
Eclipse IDE
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
How does it reduces the development time ?
 
Ranch Hand
Posts: 55
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Chinmaya Chowdary wrote:Hi, James.

I want to know if there is any improvement in terms of performance... like ... is the page loading time less if we use tags instead of the scriptlets/expressions ?



I think(I am guessing), scriptlets/expressions are faster over standard actions. If we compare the benefits of standard actions over scriptlets, this is minor issue.


Why do you think so ?
The only thing that is quicker is maybe translation phase
Imagine:

it's translated into:

So there is almost no difference with doing it by scriptlet by our own
 
Chinmaya Chowdary
Ranch Hand
Posts: 437
Oracle Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi, Łukasz.

If our jsp contains, jsp standard action
during translation time, jsp engine sees this standard action and verifies the syntax, like wether user has entered mandatory field(id) or not etc.? It does with the help of 'jspxml.xsd' file that is present in 'jsp-api.jar'. The corresponding jsp:useBean has declaration

In the above declaration there is declaration for 'id' attribute
The translator verifies against this syntax and if we don't specify 'scope', by default it is 'page'. All this will be done against this file. If it found correct, then the page will be translated.

All the above procedure takes time. There is no such procedure, if we use scripting. Container will spend minimum effort in this case.
Based on the above, I think scriptlets are faster than standard actions.
 
Chinmaya Chowdary
Ranch Hand
Posts: 437
Oracle Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

James Tharakan wrote:How does it reduces the development time ?



If we say in jsp, the container will translates it into


No need to write the above code by the developer. Thus it reduces the development time.
 
Łukasz Suchecki
Ranch Hand
Posts: 55
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
development time - yes
translation time - yes
but improves performance - NO (it's the same)

And yes - I've noticed that I've choosen bad sentence to quote - I was speaking about performance not development time (sorry for mistake)
 
James Tharakan
Ranch Hand
Posts: 580
Eclipse IDE
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks guys, i got what you guys are trying to point out..

So in what terms can we actually compare them? Actually are they comparable?
 
Sheriff
Posts: 14691
16
Eclipse IDE VI Editor Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The only thing I have to say is : no matter what, don't use scriptlets in JSP. This only makes pages difficult to read and difficult to maintain.
 
I've been selected to go to the moon! All thanks to this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic