sekhar


{ City } hyderabad
< Country > india
* Profession *
User No # 20328
Total Questions Posted # 0
Total Answers Posted # 19

Total Answers Posted for My Questions # 0
Total Views for My Questions # 0

Users Marked my Answers as Correct # 189
Users Marked my Answers as Wrong # 55
Questions / { sekhar }
Questions Answers Category Views Company eMail




Answers / { sekhar }

Question { iFlex, 28136 }

Which parser is used in Struts to parse the Structconfig.xml
file.


Answer

Struts uses SAX parser it is 100% correct.
If u have still doubt,
give wrong tag in struts-config.xml
like and obsert the console of the server
it will show sax parser exception

Is This Answer Correct ?    3 Yes 2 No

Question { Bosch, 4379 }

How do u authorize and authenticate without of
web.xml


Answer

We can maintain the authorization and authentication with
the form based security.
means create our own webform with user name and password
and check the authentication with help of either filters or
servlets

Is This Answer Correct ?    1 Yes 1 No


Question { IBM, 19676 }

In web.xml file instead of *.do can i write *.ibm, Specify
with example


Answer

yes, we can write any thing instead of *.do. but using *.do
id preferable but not mandator.

Is This Answer Correct ?    8 Yes 0 No

Question { Bosch, 16022 }

How many ways to remove the session object in the container


Answer

To remove the session object .
1. with the help of web.xml
time in minutes
2. in programatically
session.setMaxInactiveInterval(time in seconds)

to terminate immediately the session
use session.invalidate()

Is This Answer Correct ?    23 Yes 0 No

Question { CTS, 50381 }

What is the use of RequestDispatcher in servlet?


Answer

RequestDispatcher is used to move/call the another
resources (Servlets,jsps,htmls) available in the web
applicaions
we can get RequestDispatcher in two ways
1. servletContext.getRequestDispatcher("/path");
2. servletRequet.getRequestDispatcher("relativepath");

now we can move to another resources with the following
methods available in RequestDispatcher
include(req,res);
forward(req,res);

Is This Answer Correct ?    25 Yes 17 No

Question { IBM, 5206 }

Is there any limitation for no of statments executed with
in batchupdate?


Answer

No, any number of statements we can write in the batch
update but all the updates only means
(insert,delete,update) not select

Is This Answer Correct ?    5 Yes 4 No

Question { Zensar, 16139 }

If we disable cookies in our web page, what will happen?


Answer

if cookies are disable the session tracking gets failed it
unable to identifies the clients previous request.

even cookies are disable we can maintain session with
res.encodeURL("path") method.

Is This Answer Correct ?    21 Yes 0 No

Question { 16612 }

Can we write a constructor for a Servlet class ? if yes how ?
if no why not ?


Answer

yes, we can write constructor on our own but it should be
no argument public constructor only, cause container will
create the object so it needs no argument constructor.

Is This Answer Correct ?    22 Yes 1 No

Question { IBM, 35298 }

can we override service method in my servlet class..?? if
yes or no why ??


Answer

yes, we can override service() in our servlet, but not
preferable. if we want use these service from any protocol
like ftp,telnet, then we have to override.

Is This Answer Correct ?    36 Yes 6 No

Question { IBM, 22580 }

How can I make own ActionServlet? with example


Answer

Yes we can write our own ActionServlet
by extending ActionServlet,
But in web.xml we have to specify the new class in
tag

Is This Answer Correct ?    1 Yes 1 No

Question { 8344 }

can it possible to validate form field before execution of a
servlet service method if yes how??


Answer

Yes,
If it client side validation do with the javascript
if it is serverside validation we can use Filters and do
the validations there example login authenticated or not

Is This Answer Correct ?    8 Yes 1 No

Question { 7737 }

is it possible to see actionservlet in my system. if yes how


Answer

Yes we can see only .class file of ActionServlet class in
struts.jar,
If we want to see the class file use any of the decompiles
which converts .class to .java file.

Or we can download source from the apache.org site

Is This Answer Correct ?    1 Yes 0 No

Question { TCS, 17000 }

struts comes under which layer of three tire architecture
in real time projects plz i need explaination?


Answer

Yes,
Anjani kumar jha is correct
Structs comes under Controller Layer

Is This Answer Correct ?    2 Yes 2 No

Question { 14570 }

Can i use constructor in Action Class?If yes how?


Answer

Yes we can write the constructor for the Action clas rule is
Constructor should not have arguments ,
If we provide with arguments we should also proide no
argment constructor

Is This Answer Correct ?    6 Yes 1 No

Question { 16281 }

When wil use singleton class in Struts


Answer

No, It will create Instance of Action Class for each
request, internally it will use Single-ton Design pattern
for the ActionServlet.

In Action class we will actully write business logic, so
Action class is not SingleTon only ActionServlet is singleton

Is This Answer Correct ?    3 Yes 2 No

 [1]   2    Next