Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Need clearance  RSS feed

 
Ramasubramaniam Rathinasubbu
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear friends,

in my web module,

i am using like this

index.jsp

<html>
<jsp:useBean id="detail" class="com.sc.News"/>

<%
ArrayList newsarr = detail.getDetails("shownews");


%>
</html>

Here, i want to know, from jsp we are calling the bean using <jsp:usebean> tag .
is it good practice, and is it giving poor performance.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65824
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There's nothing wrong with the <jsp:useBean> part of your example, but the user of scriptlets in the rest of the example is a very poor practice. Scriptlets have been discredited for over 8 years now. It's well past time to move on. You should be using the JSTL and EL rather than scriptlets.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!