Struts and the View

G

gk

Struts Action returns ActionForward object which is responsible for
the view component.


like this

public ActionForward execute(ActionMapping mapping, ActionForm inForm,
HttpServletRequest request, HttpServletResponse response) throws
Exception {
// blah
//blah
return mapping.findForward("welcome");
}




But i dont want the view..... what i would do ?


i want to call this method only but dont want to show any view.

is that possible in Struts ?
 
A

Aj-India

U could give the forward name for the given target in
struts-config.xml, the same view from which this action class is
invoked.
 
R

raavi

Hi
if u dont want the view and want to perform only the execution of
your action, then make your forward null.i.e write the program code as
return mapping.findForward(null);
hope this may help you.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top