Forums Register Login

Difference between jsp:useBean and ....

+Pie Number of slices to send: Send
Theoretically speaking, is there any difference as far as object resources is concern, when you extend or import a class(bean) and using that class(bean) as bean by <jsp:useBean ..../>
The only thing differ is the syntax of course but for using it as the objects resources is the same.
Am I making sense? Thanks.
+Pie Number of slices to send: Send
No, they are not the same. When you import a class or package you are merely making it available to the compiler to use when resolving references to it. When you use jsp:useban, you are causing an instance of the bean class to become instantiated and placed in the scope that you specify -- unless a bean of that id and class laready exists in the scope, in which case the id is just "hooked up" to the existing instance.
+Pie Number of slices to send: Send
Thanks Bear! I appreciate your answer also to the other one.
When it is used for evil, then watch out! When it is used for good, then things are much nicer. Like this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 1095 times.
Similar Threads
using jsp:useBean
jsp:useBean tag
give another jsp to action
Diff between jsp:useBean and java class inJSP
difference between Class attribute and beanName attribute of jsp:useBean
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 06:16:09.