GeekInterview.com
Series: Subject: Topic:

Struts Interview Questions

Showing Questions 1 - 20 of 109 Questions
First | Prev | | Next | Last Page
Sort by: 
 | 

Why servlet is used as controller ?Not JSP? I want complete explation?

Asked By: khalid_it | Asked On: Nov 6th, 2006

In struts servlet control the application and we know that a JSP compiled into a servlet first. The only problem with the servlet is that it needs to write out.Println call per HTML line. But as a controller in struts servlets do not force the programmers to write out.Println, that is the part of JSP...

Answered by: Amandeep Bhatia on: May 22nd, 2012

If JSP is used as controller,it will be violated MVC architecture of web based applications.Since as per MVC pattern JSP is for VIEW and servlet is for controller.

Answered by: Hanuman on: Apr 13th, 2012

Excellent question

How you will handle errors and exceptions using struts

Asked By: Interview Candidate | Asked On: Jul 15th, 2005

Answered by: Dadaso V. pawar on: May 21st, 2012

To handle errors server side validation can be used using ActionErrors classes can be used. or If you need to handle an exception in a specific way for a certain action you can use the exception-mapp...

Answered by: nitesh on: Nov 10th, 2011

we can handle exception in two ways declarative exception & programmatic exception handling

Struts actionservlet

Asked By: khadarzone | Asked On: Apr 14th, 2008

Why do we have only one actionservlet in struts?(asked in polaris interview for Java experienced people , on april 11, chennai)

Answered by: pradeep simhadri on: May 15th, 2012

ActionServlet acts as a controller in Struts 1.x,Structs is a Mvc2 architecture based web-framework, According to MVC2 there must be only one Controller in our app,

Answered by: swapnil on: Oct 1st, 2011

We can configure many servlets, pls check it.

Can I have more than one struts-config.XML file for a single struts application?

Asked By: Suresh.M | Asked On: Sep 4th, 2006

Answered by: sampra on: Apr 3rd, 2012

yes we can have multilpe files

Answered by: pdommara on: Dec 29th, 2011

Yes you can have two or more. But you need to configure at web.xml and the container reads from web.xml.


Thanks
Praveen.

Multiple struts-config.XML files

Asked By: javidn | Asked On: Jan 10th, 2012

In struts, for what purpose we will be creating multiple struts-config.XML files? Can anyone help me out?

Answered by: sampra on: Apr 3rd, 2012

Yes we can have mutilple config files ..this will be good for modulariazaion

Answered by: Ashish on: Mar 30th, 2012

Struts Modules allow a team to logically separate their segment of a single application into the "sub-Web" application . In such a case , each sub-web part will have its own struts-config.xml file. e....

What we will define in struts-config.XML file. And explain their purpose

Asked By: Interview Candidate | Asked On: May 8th, 2005

Answered by: pradeepkmr18 on: Jun 7th, 2008

These are the tags we can define

<data-sources/>
<form- beans/>,
<global- forwards/>,
,
,
<message-resources>,
<switch-action>
<plug-in/> 

Answered by: Sony V George on: Apr 4th, 2007

We can say like soul of struts is Struts-config.xml.The server will read struts-config.xml once only on the time of server starting. so server will know how and where to re-route to each and every req...

Difference between struts 1.X and struts 2.X

Asked By: siva2baba | Asked On: Apr 10th, 2008

What is the difference between struts 1.X and struts 2.X

Answered by: krishna on: Sep 29th, 2011

struts1:: It uses abstract classes rather than interfaces. struts2:: It provides a base ActionSupport class that implements commonly used interfaces like ( Action, ServletResponseAware, ServletReques...

Answered by: Deva on: Jul 26th, 2011

1. Struts 2 is Action based framework, where as in struts 1.2 its control based.
2. There is ActionForm concept in struts 2.0
3. In struts 2 configuration file renamed to struts.xml from struts-config.xml
4. introduced interceptors instead of request processor.
5. Easy to configure.

What are the core classes of struts?

Asked By: Interview Candidate | Asked On: Jul 12th, 2005

Answered by: v.prathibha on: Sep 23rd, 2011

Actionform, Actionclass, ActionMapping, ActionForwrd, Action Errors.

Answered by: devabscmca on: Jul 31st, 2010

The core class of struts framework is
1) ActionServlet
2) Action
3) ActionForward
4) ActionMapping
5) ActionErrors
6) RequestProcessor
7) ActionForm

Struts application in rad error

Asked By: Gouthami | Asked On: Jul 21st, 2011

I am trying to run the struts application in rad using websphere application 6.1 but its not working its giving as error: there is no action mapped for namespace / and action name . - [unknown location] at com.Opensymphony.Xwork2.Defaultactionproxy.Prepare(defaultactionproxy.Java:178) at org.Apache.Struts2.Impl.Strutsactionproxy.Prepare(strutsactionproxy.Java:61) at...

Answered by: ankurpremi on: Aug 30th, 2011

Have you mapped the default action in struts.xml?

How to add multiple .Property files in sturts-config.XML file..?

Asked By: Rafi | Asked On: Oct 17th, 2006

If any one knows the answer plz add..

Answered by: Vani.Y on: Aug 14th, 2011

By assigning a key attribute to each property file,while configuring in struts configuration file.

Answered by: VIRAT REDDY on: Jul 30th, 2011

By configuring in struts config file as follows:

Code
  1. <struts-config>
  2.     <form-beans>
  3.                -------------------------
  4.                 ----------------------------
  5. </form-beans>
  6. <action-mappings>
  7.     --------------------
  8.        ----------------------
  9. </action-mappings>
  10. <message-resources parameter="name of prop file1"/>
  11. <message-resources parameter="name of prop file2"/>
  12. ------------------------
  13. --------------
  14. -
  15. </struts-config>

What is the diffrence between apache struts and jakarta struts ?

Asked By: avneesh1983 | Asked On: Apr 11th, 2006

Answered by: abdul khalik on: May 11th, 2006

both are same

Answered by: Sharad on: Apr 25th, 2006

They are the same

Explain about token feature in struts

Asked By: Interview Candidate | Asked On: Jul 8th, 2005

Answered by: VK on: Jun 15th, 2007

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 ur...

Answered by: krish on: Oct 26th, 2006

In classes we will write the Tocken code

What is struts

Asked By: Interview Candidate | Asked On: Sep 7th, 2005

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 as various jakarta commons packages. Struts encourages application architectures based on the model...

Answered by: vana_mlk on: Jul 2nd, 2010

I worked with struts it completely MVC base. I used SHINE pattern. It is a MVC base too. Actually it is an open source project to implement J2EE application.

Answered by: satyanandr on: Sep 11th, 2009

Apache Struts is a frame work build on several design patterns like MVC, FrontController, Factory, Singleton etc., It is most suitable framework to develop web based applications, because  this f...

Explain all tyes of action classes in struts

Asked By: har_5047 | Asked On: Jun 20th, 2010

Answered by: adroitsandeep on: Sep 2nd, 2010

Forward Action
Include action
Dispatch Action
Lookup Dispatch Action

Answered by: Amitabha Roy on: Jun 21st, 2010

1.       Action2.       ForwardAction3.       IncludeAction4.       DispatchActi...

Struts 2 framework

Asked By: snjy85 | Asked On: Apr 7th, 2009

What are the advantages and disadvantages of struts 2 framework?

Star Read Best Answer

Editorial / Best Answer

Answered by: tirumurugan

Member Since Jun-2009 | Answered On : Jun 25th, 2009

Advantages of struts

1. Centralized file-based configuration
2. Form beans.
3. Bean tags.
4. HTML tags
5. Form field validation
6. Consistent approach.

Disadvantages of struts

1. Bigger learning curve
2. BAD documentation
3. Less transparent
4. Rigid approach.

Answered by: lwpro2 on: Oct 1st, 2010

1. no need coding action forms
2. can be any method
3. action name can contain place holders
4. interceptors
5. value stacks
6. thread safe

compared to struts 1

Answered by: tirumurugan on: Jun 25th, 2009

Advantages of struts

1. Centralized file-based configuration
2.
Form beans.
3. Bean tags.
4. HTML tags
5. Form field validation
6.
Consistent approach.

Disadvantages of struts

1. Bigger learning curve
2.
BAD documentation
3. Less transparent
4. Rigid approach.

Struts framework

Asked By: jeenjustin | Asked On: Jul 30th, 2008

Why we use struts framework in project?

Answered by: mani.sivapuram on: Feb 15th, 2011

Generally in any project we should use any design pattern to make project success. So many people find some sort of problems in their design but atlast they provide one solution to those common probl...

Answered by: vinaymudgil007 on: Feb 3rd, 2011

Benifits of using struts framework are [these are the reasons we should use struts]:-(1) Its based on MVC architecture [MVC-2 to be specific] and brings a clear line of demarkation between Controller ...

Struts heirarchy of files

Asked By: jeenjustin | Asked On: Jul 30th, 2008

What is heirarchy of files in struts?

Answered by: mani.sivapuram on: Feb 15th, 2011

When we send the request from client then first it touches the ActionServlet--->RequestProcessor---->ActionForm(do the required validations)---->Action (execute method is executed)---->Service class(i...

Answered by: ameesala on: May 14th, 2009

When the request is recived by ActionServlet it looks for the ActionMapping entries in the Struts-config.xml. ActionMapping returns the appropriate Action class where we handle the business logic.Finally execute() returns the ActionForward key (View).

How do you perform tight coupling and loose coupling in struts ?

Asked By: rajendra.panda | Asked On: Apr 30th, 2011

Is it require to perform coupling in struts ? If yes then how?

How can container will know this is a struts application?

Asked By: purandhar | Asked On: Aug 20th, 2006

Answered by: mani.sivapuram on: Feb 17th, 2011

Here one thing i want to finalize i.e everything is working on servlet container only i.e we need only serlet container not sturts container .since when we deploy the application into the servlet cont...

Answered by: vinaymudgil007 on: Feb 7th, 2011

The control is forwarded from the container to struts controller when is reads an entry like :-- <servlet-name>action</servlet-name>        <serv...

Explain savetoken() function

Asked By: selva | Asked On: Sep 12th, 2007

Answered by: mani.sivapuram on: Feb 17th, 2011

When we send the request once to the server then we should disable that button otherwise the user may thought that the request is not sent so he send the request again and again. Here the problem is w...

Answered by: DEBABRAT on: Nov 24th, 2007

saveToken() method is used for duplicate form submission.Let's take an example i.e. yahoo email registration formYou filled the form and press the "submit" button more than once.For each action you do...

First | Prev | | Next | Last Page

 

 

Connect

twitter fb Linkedin GPlus RSS

Ads

Interview Question

 Ask Interview Question?

 

Career Counselling

 Have Career Question?

 Ask Chandra

 Ask Only Career questions.

Follow us:
 

Latest Questions

Ads

Interview & Career Tips

Get invaluable Interview and Career Tips delivered directly to your inbox. Get your news alert set up today, click "Subscribe".