GeekInterview.com
   Home |  Tech FAQ  |   Interview Questions |  Placement Papers |  Tech Articles |  Learn |  Freelance Projects |  Online Testing |  Geeks Talk |  Job Postings |  Knowledge Base | Site Search |  Add/Ask Question

GeekInterview.com  >  Interview Questions  >  J2EE  >  Struts
Go To First  |  Previous Question  |  Next Question 
 Struts  |  Question 84 of 102    Print  
what is switch action & forwardAction in struts

  
Total Answers and Comments: 2 Last Update: February 13, 2007     Asked by: kiran.p 
  
 Sponsored Links

 
 Best Rated Answer
Submitted by: Rafiq
 
Switch action is used to navigate/move from one module to other module in struts, where as forwardAction is used is used to navigate/move within same module

Above answer was rated as good by the following members:
pradeepkmr18, arvindkatoch
February 12, 2007 01:59:41   #1  
Rafiq        

RE: what is switch action & forwardAction in struts
Switch action is used to navigate/move from one module to other module in struts, where as forwardAction is used is used to navigate/move within same module
 
Is this answer useful? Yes | NoAnswer is useful 1   Answer is not useful 0Overall Rating: +1    
February 13, 2007 03:20:26   #2  
ArulMurugan        

RE: what is switch action & forwardAction in struts
A Forward Action is a standard Action forwards the request to the context-relative URI(JSP/Servlet) specified by the parameter property of the associated ActionMapping.To configure the use of the Forward Action in your struts-config.xml file, create an entry like this: which will forward control to the context-relative URI specified by the parameter attribute.A Switch Action is a standard Action that switches to a new module and then forwards control to a URI within the new module. Switch Action elements are used only in applications consisting of more than one module. Valid request parameters for this Action are:page - Module-relative URI (beginning with "/") to which control should be forwarded after switching. prefix - The module prefix (beginning with "/") of the module to which control should be switched. Use a zero-length string for the default module. The appropriate ModuleConfig object will be stored as a request attribute, so any subsequent logic will assume the new module. Action Mapping in struts-config.xml looks as follows.To link to a page in another module, use a URI as followshttp://localhost:8080/mywebapp/toModule.do?prefix=/myModule&page=/index.jspThe Swtich Action, first switch to myModule and forward to index.jsp in myModule.
 
Is this answer useful? Yes | NoAnswer is useful 2   Answer is not useful 0Overall Rating: +2    

 Related Questions

Answered by asreeni on 2005-04-08 03:24:40: The core of the Struts framework is a flexible control layer based on standard technologies like Java Servlets, JavaBeans, ResourceBundles, and XML, as well 
Latest Answer : Struts is an opensource frame work designed based on MVC architechture which is used     to develop webapplications.It is famous because of Centralized controller and loosely coupling nature. ...

Latest Answer : The new features added to Struts 1.1 are 1. RequestProcessor class 2. Method perform() replaced by execute() in Struts base Action Class3. Changes to web.xml and struts-config.xml4.Declarative exception handling5.Dynamic ActionForms6.Plug-ins7.Multiple ...

Latest Answer : When we deploy our application in the server, at first the container reads the information from web.xml file.Here ActionServlet object will be created and init() of ActionServlet will be called.Here ActionServlet is the backbone to the whole application.When ...

Latest Answer : Yes, we use Service locator design pattern    We can call from Action Calss through JNDI to home object.          then call remote object from home object ...

Latest Answer : There are only five struts tag libraries1)Bean tag lib2)Html tag lib3)logic tag lib4)nested tag lib5)Template tag libothers are JSTL tag libraries(ex: c.tld,sql.tld,fmt.tld) ...

Latest Answer : hi,to handle the errors:in struts project to handle the error objet by using ActionError object and to handle the errors by using ActionErrors object.for supposeActionError ae1=new ActionError("err.one");ActionError ae2=new ActionError("err.two");Action ...

Latest Answer : These are the tags we can define ,,,,,  ...

Latest Answer : This is the class from which business logic of stutsbegins,which contains execute method ..This class contains all deployment information of particualar Action object.This class determines where the result must send once its processing is complete ...

Latest Answer : Tokens are used to prevent multi click problem in struts. In Action class method at the begining of the code, need to call the saveToken() that generates an unique identifier for the "request url" and stotes it in the session and also in the ...

Latest Answer : Struts play’s a c role. Struts also have built-in solutions for developing v part. ...


 Sponsored Links

 
Related Articles

What are the limitations with switch statement?

Switch statement is a powerful statement used to handle many alternatives and provides good presentation for C program. But there are some limitations with switch statement which are given below: Logical operators cannot be used with switch statement. For instance case k>=20: is not allowe
 

The Interview Snafu

How to turn someone else’s mistake to your advantage Your dream job is about to become reality. A recruiter gave you the heads up about the perfect position at Humungous Conglomerate, Inc. You went through five interviews as well as a battery of psychological tests mandated by their HR de
 

Winning a Job Interview with a Winning Resume

Does your resume unlock your potential, take your skills to the highest level and win you the interview and the job you want now? The job market today is highly competitive and even if you think you have what it takes to get an interview you won’t get over the line without a polished, prof
 

Importance of Proper English during Job Interview

Importance of Proper English during Job Interview Your job interview is crucially important and it will determine whether or not you will get the job Depending on the type of job you re going for it is very important for you to use proper English In most cases jobs which offer higher salaries will h
 

JSP Action tags

JSP Action tags In this section let us see about Action tag which is another type of tag forward action tag and useBean action tag used in Java Server pages with syntax usage example and explanation in detail mosgoogle Action Tag Action tag is used to transfer the control between pages and is also u
 

HR Interview - HR Interview Mistakes You Will Want To Avoid

HR Interview Mistakes You Will Want To Avoid The job interview can be a stressful process This is especially true for those who are going after a competitive position Your nonverbal communication combined with the answers you give during the interview will determine if you are hired mosgoogle While
 

HR Interview - Behavioral HR Interviews

Behavioral HR Interviews As the name implies a behavioral interview is an interview that is held by a human resources department to determine if an applicant has the behaviors that are appropriate for a job The company must know how an applicant will behave in a certain situations mosgoogle The logi
 

HR Interview - How To Prepare For Your HR Interview

How To Prepare For Your HR Interview Before you begin thinking about how you are going to dress for the interview it is important to do your research first You should learn everything you can about the company you wish to work for When you have detailed information about your employer you will conve
 

HR Interview - Telephone Interview Etiquette

Telephone Interview Etiquette When you conduct a telephone interview for a job it is important to show the proper etiquette Not only is it important it is critical is you wish to be hired by the company There are a number of things you will want to do and other things should never be done mosgoogle
 

HR Interview - How To Succeed At HR Interviews

How To Succeed At HR Interviews There are a number of things you will need to do in order to make sure you pass the interview process Your appearance is something that you will want to pay close attention to Even if you feel that your appearance shouldn t be a factor in whether or not you re highere
 





About Us  |   Privacy Policy  |   Terms and Conditions  |   Contact  |   Site Map  |   Add Question  |   Propose Category  |   RSS Feeds  |   Articles Sitemap  |   Site Updates  |   Add Resource

Copyright © 2005 - 2008 GeekInterview.com. All Rights Reserved
Page copy protected against web site content infringement by Copyscape