File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes mock exam question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "mock exam question" Watch "mock exam question" New topic
Author

mock exam question

harikumar devandla
Greenhorn

Joined: Nov 26, 2004
Posts: 10
which of the following statements are correct regarding the code?

<jsp:useBean id="name" class="java.lang.String" />
<%= name %>

1. wont compile
2. It is valid jsp line and it ll print the variable called name
3. It ll compile but produce null as the output
4.It ll work if u create a javabean class with only one variable of type java.lang.String

Can anyone help me with this question.?

Thanks
Nitish Bahadur
Ranch Hand

Joined: Aug 25, 2003
Posts: 118
I am inclined to say none of the above. It will compile and print blank as the output.
Mikalai Zaikin
Ranch Hand

Joined: Jun 04, 2002
Posts: 3204
    
    5
Well, it may be assumed answer 4) - every bean must have unique name in its scope.

regards,
MZ


Free SCDJWS 5.0 Study Guide - SCDJWS 5.0 Quiz (How to get SCDJWS 5.0 Quiz)
Java Platform, Enterprise Edition 6 Web Services Developer Certified Expert Exam Study Guide and Quiz
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: mock exam question