• Post Reply Bookmark Topic Watch Topic
  • New Topic

Bean and Import  RSS feed

 
Anthony Karta
Ranch Hand
Posts: 342
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I bit confuse:

are there differences between using Bean and <%@import com.bbb%>

like open connection to database should we put in Bean or just import and instantiated the object?

we can achieve the same thing, isn't it?

thanks all
tony
 
Julian Kennedy
Ranch Hand
Posts: 823
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Tony,

Yes, you can achieve exactly the same things with <jsp:useBean> or <%@page import ...%> and scriptlets. The goal is to separate project roles so that web designers, with no programming experience, can implement pages and programmers, with no web design skills (or interest! ) can concentrate on logic. The first step towards that goal is to use <jsp:useBean> in preference to scriptlets where possible. Further steps include using custom JSP tags (taglibs), ideally including some de facto standards like JSTL or Struts. I believe the latest development in this direction is JavaServer Faces, which looks pretty cool .

Jules
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!