Sami Sayeed

Ranch Hand
+ Follow
since Oct 05, 2004
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 Sami Sayeed

Hi,

whenever we user type and class in the method
and if the bean is not available in the defined scope of the jsp:useBean,
The bean shall be instantiated by the container.
So if we use something like this.

<jsp:useBean id="person" type="foo.Person" class="foo.Employee"> <jsp:setProperty name="person" property="*" /></jsp:useBean>
The code in the jsp would be..
foo.Person person = new foo.Employee();
Now when the setProperty is called the Parameters of the form fields are matched for the attributes in the class but the mutator methods are used.

for example,
the form has empID defined in the Employee class so,
the setEmpID will be called on the person(object).
As you know the methods are called based on the constructor used and not on the type of the Object,
I hope I have helped in understanding the concept.
cheers
SCJP,SCWCD1.4
Sami
Hi,

Congrats Bahadar,

Great Score..


Sami
Hi,

URLEncoding is getting rid of the spaces and some special characters.
1.http://<domain>/<webapp-context>/hello.jsp?name=Sayeed Sami.
if you do url encoding it would look like the following
1.http://<domain>/<webapp-context>/hello.jsp?name=Sayeed+Sami.or %2b will be used for spaces in the values of the parameters.

2.If we encode the url the container can use urlrewriting in case of teh client disabling the cookies.

Thr uri means after the web context
hello.jsp but not the parameters.
Correct me if Iam wrong
Sami
Hi Sudhakar,

try this out.

1. make some changes in your jsp, like add a space or whatever..
2. now try giving a request.
I tried it at my end and seems to work fine.

cheers
Sami
Hi Swami,

Congratulations...

cheers
Sami
Hi,
make sure you are using tomcat 5.1

<jsp-config>

<jsp-property-group>
<description>
Special property group for JSP Configuration JSP example.
</description>
<display-name>JSPConfiguration</display-name>
<url-pattern>*.jsp</url-pattern>
<scripting-invalid>true</scripting-invalid>


</jsp-property-group>
</jsp-config>

try this out..
cheers
Sami
Hi ,
Thats an error in the book,
its c:forTokens, download the errata from www.wickedlysmart.com
<%
// this is just for a test, we must avoid to use scripting in jsps
String [] names={"one",two","three"};
request.setAttribute("names",names);
%>
<c:forTokens items="${names}" delims="," var="name">
${name}
</c:forTokens>
sami
Hi,

make sure it is tomcat version 5,
you dont have to anything specific to make the el work, by default it should work,

only for the jstl you need to copy the jstl.jar and the standard.jar files in the WEB-iNF/lib directory of the webapp

Sami
Hi,

For the JSTL and EL I feel there is no need for you to go through the specs.

Sami
Hi All,

Thanks you for your wishes,

Iam planning to take SCBCD next .. maybe after 2 months

Sami
Hi,
That is just to show that you can have a if block with a condition,

If you want you can declare a boolean variable with that name assign the true value to it.
and test to see how the SkipPageException works,

if(true)
{
throw new SkipPageException();
}
Hi All,

First of all thanks to Bryan Basham, Kathy Sierra, Bert Bates for writing the wonderful book HFS,

I took around 2 months to prepare,
Thanks to everyone at the Javranch for answering my queries and clearing my doubts,

1. read through the book thoroughly.
2. concentrated on JSTL, JavaBeans,Security,EL
3.Worked out all the examples given in the book,
4.I had some prior experience in custom tag libraries but this book helped me in brushing up things.
5.I used the professional java tag libraries from wrox.
6. worked extensively on .tag files.

Overall the Book HFS is more than sufficient to pass the Exam,
Design Pattern questions are real tricky.(concentrate on them).

Hope this helps
Hi All,

I cleared the SCWCD with 91%,
I missed out on some questions which were really very very tricky.
At the EOD I felt I could have achieved a better percentage.
Hi All,

I cleared the SCWCD with 91%,
I missed out on some questions which were really very very tricky.
At the EOD I felt I could have achieved a better percentage.


Sami
19 years ago
Hi,

Even the 3rd option given in the book doesnt work,

It is an error, it will fail for the same reason as the first option fails.

Whenever you use just the type the bean will not be instantiated .
if there is no bean in the mentioned scope then the container will throw an exception.
Sami