• 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

Question from Mock exam. Pls, comment on your answer

 
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Doomingdale's has an online application where customers may browse the latest season's catalogs. Currently no e-commerce is planned. What J2EE technology is best suited for this application?

A. Java Servlets
B. JSP with Java classes
C. CMP entity beans
D. BMP entity beans
E. Stateless Session beans with DAO
 
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Possible candidates for this are A, B & C. Since the data will be used only for browsing and no e-commerce. BMP / CMP is not needed.

Out of A, B & C.
A - We need as controllers
B - For displaying HTML, but this option also has java classes hence we might want to be careful, i would say we need not choose this.
C - We need this option for retriving data from database.

So the final answers could be only A & C, if java classes were not part of B then we might want to include that too. Hope this answers your question.

- Panindra
 
Ranch Hand
Posts: 224
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In real exam, the question also specifies how many answers you have to choose. You need to select right number of answers from the list.

In this question, the correct answers are A and B. This is more of J2EE applicabibility question. EJBs are required when you are dealing with transaction, security... Because these two are not mentioned in the question, answer E is false.

One of the misunderstanding with the SCEA is, many of us think you need to select EJB by default for all distributed applications. You can write distributed applications with out EJB as long as transaction, security, concurrent programming is not required. Simple servlets, JSP and database access is sufficient for most browser based, read only data applications.

Please have a look at Rod Johnson book on "Expert one-on-one: J2EE Design and Development".
 
veena madhukar
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I had A and B as my answer. But arc2patterns ...had suggested the answer as E. That is when i got confused. Than you for your reply.
 
Ranch Hand
Posts: 372
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I would say only A is the correct answer. How can you have ONLY JSPs and Java classes without servlets? Requests from a JSP can go only to a servlet, how can they go to a plain java class? On the other hand, you can use only servlets by using out.println() inside the servlets. If asked to choose the best answer, I would say A as strictly speaking B is technically incorrect
 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The current implementation of JSPs mean that they ARE servlets; you can verify this by looking inside your servlet container to see where it keeps the cimpiled JSPs: there will be a servlet .java file and the corresponding .class file.

If you're really pushed you can implement an MVC framwork using just JSPs instead of JSPs/servlets and just use POJOs to implement the business tier (along with the fascade). The business tier will sit on top of JDBC. Not the best long term planning but it will work.
 
Ranch Hand
Posts: 88
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In the actual exam ..the applicability section is not as confusing as it sounds here !! This is an old post ...but I go with Majji .. the principle is



1. Go to EJB container if you require transaction/persistance ( even if no persistance is required)
2. For browse only (catalogs) - Stick to the web container !! you can have a servlet front or a JSP front ...if you have a servlet front your entire stuff can base out of servlet...(generation of HTML can become kind of tough .. especially if it has some CSS stuff ... remember HTMLKona of Weblogic ???).If you have JSP front you can take the benefit of Taglibs and JSTL and the other regular client features like CSS, Javascript, DHTML etc can be made use of!!. Talking of regular POJO is meant by usebean in JSP....You can surely have JSPs as your controller ...


It is true that JSP is translated into a servlet ...but when we design we think of what kind of UI fronts we are looking at ..and A and B are the two fronts A= servlet , B= JSP

This concept is kind of old ..since we have lot of front end J2EE patterns ..but I think my logic works for this question.

So really speaking

I would say only A is the correct answer. How can you have ONLY JSPs and Java classes without servlets?



Is not true from the design perspective ...but if you look from an implemetation perspective you are correct.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic