Win a copy of Rust Web Development this week in the Other Languages forum!

Suresh KumarPandey

Ranch Hand
+ Follow
since Sep 08, 2012
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Suresh KumarPandey

can anybody tell whether it is possible to add cause in this class. Right now getCause() is fetching null.
what is the exact difference between data abstraction and encapsulation.

According to me using encapsulation we provide the users which are using my class to access the variables through a public method there by hiding the implementation details and if i would need to change anything in my methods i can do it woithout breaking others code.

Data abstraction is used for loose coupling so that we can make reusable codes.
Hi guys,

can you please tell me what will be the best book for learning Spring.
7 years ago
Hello fellow ranchers,

Yesterday I passed the OCEJWCD ( JEE6) with 84% and I would like to share my experience with everyone here.

1. Firstly I would like to thank all fellow ranchers for helping and clearing out lots of my doubts.
2.It took me around 3 months to complete the exam because i was not working on the development project .I used to do small coding at home. I would like to give advice to everyone preparing for the exam that try to write small codes yourself to understand the concepts.

3. Books and reading material :
(i) I read the Head First Servlet and JSP thoroughly and completed all the exercises given.
(ii) Servelt3.0 specifications. This is very important ! Read it thoroughly ! Especially about servlet security and dynamic registration and section Asynchronous Processing, chapter 8: Annotations and Pluggability, Section 13.4.1 @ServletSecurity annotation and methods of HtppServletRequest,Servlet Request,HttpServletResponse,Servlet Response and servlet context and request dispatcher given in the specification.

4. Practice Exams :
(i) Enthuware mock exams are really very good. If you want to learn and have clear concept , this the best mock exams to go through.Spending money on this is totally worth. i bought it after advice from a fellow rancher.
(ii) Piotr's Mock exams( are also very good.


Please go through 260 questions mentioned in this blog also .They are really nice.

5. The actual exam is not that much difficult , so if you are scoring about more than 80% in the mock exams , then you are good to go .

Once again thanks a lot and good luck for preparation everyone
7 years ago
will we consider < metadata-complete> as element attribute or element.

if we say it as element attribute then will <enabled> will be also called element attribute
7 years ago
Can anybody explain the meaning of this :

<filter-name>Logging Filter</filter-name>

would result in the Logging Filter being invoked by client requests starting
/products/... but not underneath a request dispatcher call where the request
dispatcher has path commencing /products/.... The LoggingFilter would be
invoked both on the initial dispatch of the request and on resumed request.

7 years ago
hi I am just confused in one of the code given in servlet specification 3.0

1.REQUEST to /url/A
FORWARD to /url/B

getRequestDispatcher("/url/B").forward(request,response)) ;
AsyncContext ac =request.startAsync();
ac.dispatch() <- This dispatches the request to original url /url/A as the startAsync is called on the original request only and the first request was for /url/A.

2. REQUEST to /url/A
FORWARD to /url/B

getRequestDispatcher("/url/B").forward(request,response)) ;
AsyncContext ac =request.startAsync(;

ac.dispatch() <- This dispatches the request to /url/B . can anybody please explain whether this will be not called on the original request and how deos it work.

7 years ago
Suppose i am using useBean in one of the jsp to check for the user registration. suppose the url which is hit is simultaneously used by 4 users and suppose object type created i.e. ID is person .When the last user enters the details and submits the details a person has just submitted ,that is person id already created , then how the useBean will work in this scenario.
7 years ago
Change the Welcome.html like this
<form action="servlet" method="post">
User Name:<input type="text" name="uname">
<input type="submit" value="Submit">

Change the web.xml file





It will work

7 years ago
I am quoting this from the Servlet 3.0 specification about asynchronous processing.

can anybody please explain the concepts

"The @WebServlet and @WebFilter annotations described in Chapter 8 have an
attribute - asyncSupported that is a boolean with a default value of false.
When asyncSupported is set to true the application can start asynchronous
processing in a separate thread by calling startAsync (see below), passing it a
reference to the request and response objects, and then exit from the container on the
original thread. This means that the response will traverse (in reverse order) the
same filters (or filter chain) that were traversed on the way in. The response isn't
committed till complete (see below) is called on the AsyncContext. The
application is responsible to handle concurrent access to the request and response
objects if the async task is executing before the container-initiated dispatch that
called startAsync has returned to the container."

8 years ago
From where to get the mock papers for the OCWCD exams apart from the kathy Sierra book for OCWCD for servlets and JSP
i have used braces with else but then also it is giving error
8 years ago
Why the else is giving error here
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "">
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title> Simple Web Application </title>
boolean b=false;;

<% if (b) { %>
<jsp:forward page="forward.jsp"></jsp:forward>
<% } %>
<jsp:include page="include.jsp"></jsp:include>

8 years ago

Why the foo method of class X is not throwing a a compile error because according to the override rule ,if the superclass method has not declared exception ,the subclass method can't declare a new exception
8 years ago