• 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

Mr.Bergsten, does the book based on Model 1?

 
Ranch Hand
Posts: 3178
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I just would like to know if the explanation of JSPs in the book is based on Model 1 architecture... As far as I saw in the sample chapter of the book, which is Chapter-11, there is no connection to servlets at all... Almost everything is connected with taglib and JSPs...
And I also would like to know whether you use any servlets in other chapters to explain about the JSPs and its generated servlets?
Thank you in advance for your reply...
 
Author
Posts: 106
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Ko Ko Naing:
I just would like to know if the explanation of JSPs in the book is based on Model 1 architecture... As far as I saw in the sample chapter of the book, which is Chapter-11, there is no connection to servlets at all... Almost everything is connected with taglib and JSPs...
And I also would like to know whether you use any servlets in other chapters to explain about the JSPs and its generated servlets?
Thank you in advance for your reply...


The book consists of two main parts. One part describes all JSP 2.0 and JSTL 1.1 features using "model 1" (i.e., only JSP pages) to illustrate these features without distractions from other technologies. The other main part describes how to use JSP together with other J2EE technologies, with focus on the Servlet/JSP combination ("model 2", if you like). In this part, there's one chapter that goes through in detail how to use this combination, using Struts and Struts Action classes as Controller, beans as the Model, and JSP pages as the View, plus a filter for access control and a context lifecycle listener for initialization of application resources. Another chapter in this part discusses different ways to create and set up database connection pools and make them available through JNDI or as application scope variables.
So, in summary, the book describes both a pure JSP model (which is a good option for simple applications) as well as the servlet/JSP combo (which is better for more complex application) in detail, plus general ideas about how to use JSP together with EJB, what to think about for large scale applications that need to run in a cluster, and more. The second part also contains a number of chapters on development of custom tag libraries and how to leverage the JSTL classes in custom classes.
 
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I noticed your book focuses on struts, instead of anything else. Why did you choose this approach? I actually just started with a team that uses struts, and I'm just waiting for the need to learn it, although I'm wondering if we should explore alternatives like JSF.
Thanks.
 
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yeah, I'd also like to know if the book covers JSF although I think both JSTL and JSF are complementary to Struts. There are some overlaps among the three but the most important part of Struts is its controller framework.
Hopefully, Mr. Bergsten can share with us his thoughts and recommendations on Struts, JSTL, and JSF.
Thanks,
Zach
 
Hans Bergsten
Author
Posts: 106
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Chris Hall:
I noticed your book focuses on struts, instead of anything else. Why did you choose this approach? I actually just started with a team that uses struts, and I'm just waiting for the need to learn it, although I'm wondering if we should explore alternatives like JSF.
Thanks.


I use Struts as a concrete example of how to combine servlets and JSP, explaining how Struts works in addition to how to use its basic features. I picked Struts because it's the most commonly used framework of this kind.
JavaServer Faces (JSF) isn't covered in this book, but I have written another book about JSF, to be published late April 2004. There's some overlap between JSF and Struts, but JSF focuses on the View part (with an event-driven user interface component model similar to Swing and other GUI frameworks) while Struts focuses on the Controller part and can work with any type of user interface technology (JSP, Velocity, JSF, etc.). Let's leave it at that for now. You can read more about JSF at:
http://java.sun.com/j2ee/javaserverfaces/
 
Zach Lee
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Just found out Mr. Bergsten also wrote another book titled, guess what, "JavaServer Faces"! http://www.amazon.com/exec/obidos/ASIN/0596005393/qid=1078861343/sr=2-3/ref=sr_2_3/103-0723395-0992647
 
Chris Hall
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Hans Bergsten:

I use Struts as a concrete example of how to combine servlets and JSP, explaining how Struts works in addition to how to use its basic features. I picked Struts because it's the most commonly used framework of this kind.
JavaServer Faces (JSF) isn't covered in this book, but I have written another book about JSF, to be published late April 2004. There's some overlap between JSF and Struts, but JSF focuses on the View part (with an event-driven user interface component model similar to Swing and other GUI frameworks) while Struts focuses on the Controller part and can work with any type of user interface technology (JSP, Velocity, JSF, etc.). Let's leave it at that for now. You can read more about JSF at:
http://java.sun.com/j2ee/javaserverfaces/



Thanks for your explanation on Struts vs. JSF. I just noticed many topics covering JSF vs. Struts in the past couple weeks in this forum. Not a bad idea to 'leave it at that for now'.
 
Ko Ko Naing
Ranch Hand
Posts: 3178
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Hans Bergsten:
So, in summary, the book describes both a pure JSP model (which is a good option for simple applications) as well as the servlet/JSP combo (which is better for more complex application) in detail, plus general ideas about how to use JSP together with EJB, what to think about for large scale applications that need to run in a cluster, and more.


Does the book also discuss about the EJB to used with JSP? Or is it just to let the reader taste the flavour of J2EE and just want to introduce the concept of EJB to the reader?
If so, can I conclude that your book covers almost every part of J2EE in general, not just only emphasizing on pure JSP? :roll:
Thanks a lot for your warm reply...
 
Ranch Hand
Posts: 4982
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I think calling EJBs inside JSP maybe an add-on, you can do this, by looking up the home interface via the JNDI context inside JSP. However, it may not be a good way for doing that, since JSP should be focus on presentation. It will be better for a Servlet to make such EJB connection, as a bridge between JSP and EJB.
Make more sense?
Nick.
 
Ko Ko Naing
Ranch Hand
Posts: 3178
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Mr.Bergsten,
Since u told to continue this thread here, I'd better continue my question from that thread here...
What I want to mean in that thread is whether other design patterns, which are related to MVC such as Front Controllers relationship with JSPs, Filters set before and after JSPs, are discussed in the book... It seems that the chapter-18 and chapter-19 covers about them in general... I'm not sure if it is really covered in that chapter or not...
Thanks a lot for being here, clearing our doubts on your book...
 
Ko Ko Naing
Ranch Hand
Posts: 3178
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Nicholas Cheung:
I think calling EJBs inside JSP maybe an add-on, you can do this, by looking up the home interface via the JNDI context inside JSP. However, it may not be a good way for doing that, since JSP should be focus on presentation. It will be better for a Servlet to make such EJB connection, as a bridge between JSP and EJB.
Make more sense?


Yes, Nick, you make more sense... But since the name of the book is "JavaServer Pages", it will be almost about pure JSPs... And also Mr.Bergsten has just mentioned that Part II of the book is on Model 1, which and Part III of the book is on Model 2... I'm wondering in which part EJB connection is discussed... If it is in Part II, then I guess it will be discussed, according to Model 1... But if it is in Part III, there will be servlet in-between to deal with EJB connection. Then it is on Model 3...
Hope Mr.Bergsten is the only one who can answer this clearly...
Thanks for your opinion as well, Nick...
 
Ranch Hand
Posts: 8945
Firefox Browser Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello Mr.Bergsten,
I can use your book as a reference for SCWCD v 1.4? I am 100% sure that I am going to fail in the beta, so I am going to write the exam again.
 
Ko Ko Naing
Ranch Hand
Posts: 3178
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Pradeep Bhat:
Hello Mr.Bergsten,
I can use your book as a reference for SCWCD v 1.4? I am 100% sure that I am going to fail in the beta, so I am going to write the exam again.


Hi Pradeep,
I used the sample chapter-11 to study about the Tag Files Implementation... But only about half of that chapter is suitable for the exam... Maybe 50% or 60% of the chapter can be used to learn Tag Files topic related to the exam objectives... I'm not sure about the other chapters... but as far as I see in the TOC, Part II is based pure on JSP and I hope Part II will surely help you to prepare for the SCWCD 1.4 exam...
I used a lot of sample chapters from several books to learn new things in JSP 2.0... One from the current book in the promotion, three from the Falkner's book and one from Core JSTL book and so on...
 
Hans Bergsten
Author
Posts: 106
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Ko Ko Naing:

Does the book also discuss about the EJB to used with JSP? Or is it just to let the reader taste the flavour of J2EE and just want to introduce the concept of EJB to the reader?
If so, can I conclude that your book covers almost every part of J2EE in general, not just only emphasizing on pure JSP? :roll:
Thanks a lot for your warm reply...


EJB is only covered in general, to describe how the MVC roles can be allocated to objects of different types (servlets, JSP, JavaBeans objects, EJBs, DAOs, etc.) and when it makes sense to use these object types. It doesn't cover EJB in detail at all, but gives you some hints about how to design the application to simplify adding EJB to the mix if and when you need it.
 
Hans Bergsten
Author
Posts: 106
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Ko Ko Naing:
Mr.Bergsten,
Since u told to continue this thread here, I'd better continue my question from that thread here...
What I want to mean in that thread is whether other design patterns, which are related to MVC such as Front Controllers relationship with JSPs, Filters set before and after JSPs, are discussed in the book... It seems that the chapter-18 and chapter-19 covers about them in general... I'm not sure if it is really covered in that chapter or not...
Thanks a lot for being here, clearing our doubts on your book...


I'm not using the formal J2EE pattern names in the book (I'll try to improve on this in the future to make it easier for people familar with the patterns to connect the dots), but yes, I cover Front Controllers (Struts is a concrete example), filters for access control, Data Access Objects (DAO), etc. in Part III of the book (e.g., in Chapter 18 and 19).
 
Hans Bergsten
Author
Posts: 106
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Ko Ko Naing:

Yes, Nick, you make more sense... But since the name of the book is "JavaServer Pages", it will be almost about pure JSPs... And also Mr.Bergsten has just mentioned that Part II of the book is on Model 1, which and Part III of the book is on Model 2... I'm wondering in which part EJB connection is discussed... If it is in Part II, then I guess it will be discussed, according to Model 1... But if it is in Part III, there will be servlet in-between to deal with EJB connection. Then it is on Model 3...
Hope Mr.Bergsten is the only one who can answer this clearly...
Thanks for your opinion as well, Nick...


IMHO, EJBs only make sense in an application that also use servlet technology (though most applications don't need EJBs at all), and should be accessed through business logic classes, not directly from JSP pages. The book doesn't discuss this in detail, but gives you some hints in Chapter 18 and 20.
 
Hans Bergsten
Author
Posts: 106
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Pradeep Bhat:
Hello Mr.Bergsten,
I can use your book as a reference for SCWCD v 1.4? I am 100% sure that I am going to fail in the beta, so I am going to write the exam again.


I didn't write the book with certification tests in mind, rather to teach people how to use the technology in a good and sensible way. I admit I'm not a big fan of certification programs (they seem to focus on details that anyone can look up in a book or a spec instead of the full understanding of the Big Picture, which IMHO is the important part), so I can't say how well the book works as a reference for SCWCD or any other certification test.
 
Ko Ko Naing
Ranch Hand
Posts: 3178
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you very much for your greatest replies to almost all of the posts in this thread... I do hope that Nick and Pradeep also will get what they want from your replies...
 
I would challenge you to a battle of wits, but I see you are unarmed - shakespear. Unarmed 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