julie li

Greenhorn
+ Follow
since Feb 10, 2003
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by julie li

I have created JBoss3 to MySQL and Oracle connection pooling.
But the default database connection is 2.
Could anybody tell me how to change the default numbers of connection for any Datasourc.
Thanks&Regards
Guozhen
21 years ago
Hi E,rico and Boyet,
Thanks for your help. I have passed the SCWCD exam with score 86%
Best Regards
julie
Question 22
Question for Java Beans.
The contents of beans class are as follows:-
package projsp;
public class trying
{
private String name;
private int age;
public void setName(String n)
{
name=n;
}
public void setAge(int a)
{
age=a;
}

public int getAge()
{
return age;
}
public String getName()
{
return name;
}
}
The contents of test.jsp file are as follows:
<%@ page language="java" import="projsp.*" %>
<jsp:useBean id="test" class="projsp.trying" />
<html>
The Name is <getProperty name="test" property="name" />
The Age is < jsp:getProperty name="test" property="age" />
</html>
If a user types in http://servername:8080/test.jsp?name=Anand&age=22 the out put is
A The Name is Anand
The Age is 22
B The Name is Null
The Age is 0

C It gives a compilation error as the
properties are not set prior
to retrieving them
D The Name is null
The Age is null


I think the correct answer is B.
But the Question Auther choose D.
Could anybody help to explain it to me?
Thanks a lot !!!