ashwin kumar


{ City } bangalore
< Country > india
* Profession *
User No # 18691
Total Questions Posted # 0
Total Answers Posted # 4

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

Users Marked my Answers as Correct # 54
Users Marked my Answers as Wrong # 14
Questions / { ashwin kumar }
Questions Answers Category Views Company eMail




Answers / { ashwin kumar }

Question { Bosch, 16030 }

How many ways to remove the session object in the container


Answer

session.invalidate() used to kill the session object,this
method is usually called, for ex: when we logoff from an
application.

and

session.removeAttribute()

Is This Answer Correct ?    16 Yes 3 No

Question { IBM, 22591 }

How can I make own ActionServlet? with example


Answer

You can make your own ActionServlet by extending
RequestProcessor class and overriding its methods. The
example is given below....

package com.visualbuilder;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.struts.action.RequestProcessor;

public class CustomRequestProcessor extends
RequestProcessor {

public boolean processPreprocess(HttpServletRequest
request, HttpServletResponse response) {

System.out.println("Called the preprocess method before
processing the request");
return super.processPreprocess(request,response);
}
}
The following is web.xml file u should change it accoringly

version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-
app_2_4.xsd"> action name> class>com.visualbuilder.CustomActionServlet class> config name> /WEB-INF/struts-config.xml value> 2 startup> name>action *.do pattern> file>index.jsp

Is This Answer Correct ?    22 Yes 7 No


Question { 7746 }

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


Answer

Well one can only see the .class file of an ActionServlet,
ActionServlet .class file is zipped and kept in Struts.jar
file.

Is This Answer Correct ?    7 Yes 1 No

Question { Ericsson, 21422 }

Can we call destroy() method inside the init() method? What
happens when we do so?


Answer

Yes you can call a destroy() method in init() method, but
remember destroy() method will behave like normal method
but not as life-cycle method.

Is This Answer Correct ?    9 Yes 3 No