sri sun

Greenhorn
+ Follow
since Jun 22, 2008
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 sri sun

Hi friends

Please clarify my doubts.
1 "<tag> element is mandatory" is it true?
2 "<jsp-version> element is mandatory" is it true?
3 "<uri> element is mandatory "is it true?
4 "Is the name of DD must be web.xml& Is it case sensitive".

Thanks in advance
Hai friends

I am silent viewer of this forum.My exam is there within three days.I had no previous working experience.Actually I am doing some mockexams.In those I got some doubts.

Please carify my doubts

What is the output when you try to invoke the servlet defined below with the following URL from the address line from your browser:

http://localhost/servlet/com.baboon.scwcd.servletmodel.TestParamServlet?Param=10
package com.baboon.scwcd.servletmodel;
public class TestParamServlet extends HttpServlet {
protected void doPost(HttpServletRequest req, HttpServletResponse resp)
throws ServletException, IOException {
resp.getWriter().println (req.getParameter("param"));
}
}
1 Code compiles, blank page is displayed with the value 10 printed out.
2 Code compiles, blank page is displayed.
3 Code compiles, blank page is displayed with the value null printed out.
4 Code fails compilation, exception NullPointerException not caught.
5 Code compiles, HTTP GET request not supported.


Acc to mock Ans is 5.But in HFSJ it will fail.