Ravi Appana

Greenhorn
+ Follow
since Aug 25, 2004
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 Ravi Appana

Can someone explain why this option is wrong in the JSP Document:

B: The following would be valid as the first line of a JSP document: <jsp:root xmlns:uri="http://java.sun.com/JSP/Page" version="2.0">

The jsp prefix must always be bound to the JSP namespace: http://java.sun.com/JSP/Page

But, Is it an error to bound the JSP namespace "http://java.sun.com/JSP/Page" with a different prefix. Is the above option wrong, because of using the prefix "uri".
The question is a bit unclear to me. Can some one explain the question and answer?
---
2.RequestDispatcher dispatcher =request.getRequestDispatcher("/app/first.html");
dispatcher.include(request,response);

---

Can you specify a static html page in getting the request dispatcher?
"f" should be the other correct option in the second question, since the return value of the function is a map, and "name" might be the key for which the value is being shown from that expression.

<jsp:useBean id="person" type="foo.Person" class="foo.Employee">
<jsp:setProperty name="person" property="name" param="userName" />
</jsp:useBean>

I understood this as:

"a request parameter is being set to a property of a new bean attribute in the page scope."

Am I correct?


This code means, if a bean is not present in the page scope(which is the default, if not specified in useBean), create it in the page scope, and for the bean property "name", call the setName(String) method with the value corresponding to the request parameter name "userName".

<jsp:useBean id="person" type="foo.Person" class="foo.Employee" />

is same as

<jsp:useBean id="person" type="foo.Person" class="foo.Employee" scope="page" />
Bimal,In the example you provided, how did you verify that there are infact two servlet instances loaded?

About the SingleThreadModel, I read from HFSJ. Also in the Techdocs link you have given, the statement is
"If a servlet implements this interface, you are guaranteed that no two threads will execute concurrently in the servlet's service method. The servlet container can make this guarantee by synchronizing access to a single instance of the servlet"
Which means that the requests are queued up when there is a single servlet instance that implemented SingleThreadModel.
But, also the statement ended with an OR clause - "by maintaining a pool of servlet instances and dispatching each new request to a free servlet"
I am not sure how the container can be made to choose this.

Also, In the JSP specification first chapter, it is specified if a JSP's page directive has the "isThreadSafe" attribute set to false, the JSP container shall dispatch multiple outstanding client requests, one at a time, in order they were recieved, to the page implementation servlet for processing.

Please share your thoughts.

Thanks,
Ravi.
The version entry in the web.xml seems wrong. Please check it to be 2.4
Go to the Links in this Forum's home page.
You don't have to memorize all HTTP Status/Error Codes. Please post your doubt in the forum.
Moreover, if you have two kind of servlet mapping for the same servlet, you must have two different URL-mappings for them. So, there would be two instances now.

There would be only one servlet instance always, even if there are two URL-mappings for the same servlet. Once a container has loaded a servlet class and has initialized the servlet (can happen after the first request), after which any request for that servlet (irrespective of the URL mapping it came from), the Container allocates a thread for the same servlet instance that is already available.

Topic:SingleThreadModel Q: The servlet container may create multiple instances of the servlet and dispatch each servlet request to a different servlet instance.

If the SingleThreadModel (deprecated as per 2.4 Spec) is used, the container creates one instance of the servlet, and queues up the requests for that servlet, serving one client at a time.

It is advisable to not use instance variables in servlets.But, if the need is really there, you need to ensure that the state of the instance variables is maintained same across multiple requests.

Thanks,
Ravi.
Hi Huang,

Is experiennce required in Servlets and JSP to clear in a short span of less than 2 months. Did you have exprerience before in Servlets and JSP. You achieved it in a short frame. Congrats on your success.

Good luck for future,
17 years ago
A tip : Do note that some Companies outsource HR work. The screening might be done by people who don't know about Technology. You need to be prepared for this. As the one over the phone or the person screening your resume might be going through a check list. Many screeners don't understand J2EE. So, if you want to sell yourself in the Java World, need to be explicit in mentioning the full names of the ceritfications and also put both Java, J2EE. If your certification is against the latest version, do specify it.
Hi,

After much dilemma on when I should give the exam, finally I gave it 2 days back and cleared it with only one error. Although it still bothers me which question(in Operators & Assignment) could have gone wrong, I am very much excited on seeing the result.

My preparation is in the same line with many of those who have posted here. I got the spirit to continue from the book K&B, and the confidence from Dan Chisolm Tests, while insight knowledge from Khalid Mughals volume. Practice is also a good key.

This is my second visit to this website. The first time I came here in the last week, I read about the success stories and got inspiration to give the test soon.

Scoring >70% consistently in Dan Chisolm Tests would tell you that you are ready for a big score. The score in Marcus Green 1.4 test would be near to the one you achieve in the exam.

Congrats to all those who tasted this success earlier and All the Best for the people planning in the future.

I am looking forward to go on which way - "Web Developer" Or "Developer". Any pointers/suggestions in this regard is appreciated. You can mail me directly too. As mentioned I am new to here, so please consider in throwing any bricks

Best Regards,
17 years ago