GeekInterview.com
Series: Subject: Topic:

Struts Interview Questions

Showing Questions 1 - 20 of 179 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: Ajay on: Sep 3rd, 2014

To maintain the control flow huge amount of code is required.Writing huge code in jsp is against jsp technology.
So Jsp is not recommended to use as a controller

Answered by: anil on: Nov 19th, 2012

Servlets are meant to carry out the dynamic work. If we put Servlet to View rather than as controller, it holds so many server resources, unnecessary creation of Request and Response objects that makes the Server to have unnecessary burden.

What is difference between HTML tags and struts specific HTML tags

Asked By: raghava_ | Asked On: Jan 30th, 2007

Answered by: MuthuKumaran on: Jul 15th, 2014

HTML tags are static and Struts tags are dynamic. Struts tags can be created by the page authors. Binding of the property value with the Formbean property is done by the Struts tags. HTML tags support...

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

Struts html tags internally uses normal html tags only but the differnce is to reduce the developers task internally we implement normal html and those are abstracted and we provide in terms of struts specific html tags.

Is action class is servlet or not ? If yes why ?

Asked By: enjoy | Asked On: Apr 2nd, 2007

Answered by: mani.sivapuram on: May 5th, 2014

Action class is not a servlet but it is having the properties like a servlet. For example servlets have request and response objects similarly action classes is also having request and response object...

Answered by: PS on: May 17th, 2013

No.. Action class is not a servlet. The only servlet class in plain struts framework (without spring etc.) is ActionServlet.

What are the contents of web.XML and struts-config.Xml? What is the difference between them? How to relate these tow XML files?

Asked By: Akila | Asked On: Dec 21st, 2006

Answered by: Sunil Patil. on: Apr 29th, 2014

Go through run configuration -->Click on Arguments-->Click on Variables button you will get popup with diffrenet type of commnad line arguments.

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

In any web application when the client sends for a particular page then first it loads the web.xml it is also called as deployment descriptor. and in the web.xml we provide what actions has to take pl...

Please anybody send the abbreviation of struts? This is the question I have faced in the interview?

Asked By: rajesh | Asked On: Aug 10th, 2006

Answered by: jagadeesh on: Apr 16th, 2014

Struts is framework software,framework means commonly,repeatedly occurred a problems through out a project,using struts framework we can develop only web based applications.

Answered by: geeksterrahul on: Aug 3rd, 2009

Struts: Means Parts or Components(say for eg:Automobile parts).Struts framework as such, is a skelteon framework made of different parts(M,V,C).

Explain about struts control flow?

Asked By: suri_veeru | Asked On: Mar 8th, 2006

Answered by: laxman on: Dec 11th, 2012

I think there is no service method in ActionServlet class it inherit it from httpServlet class but again I dont see any
call to process method of RequestProcessor ?

Answered by: vadamalaiganesh on: Jun 5th, 2007

Hi,    The explanation given by parindia is crystal clear But not Formatted thatt why looks messy,I have formatted it,Wonderful parindia ,You are really expert.  1) When ...

How to perform unit testing on web application?

Asked By: Sridhar Reddy | Asked On: Nov 21st, 2012

What is cactus?

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: GK on: Oct 7th, 2012

Yes. In web.xml we can define as follows


action
org.apache.struts.action.ActionServlet

config
/WEB-INF/struts-config.xml,/WEB-INF/struts-my-config.xml,

2

Answered by: ABHAY RAI on: Aug 28th, 2012

Yes,You have more than one struts-config file in one single struts application.

What is difference between mvc1 architecture and mvc2 architecture?

Asked By: ravi | Asked On: Oct 4th, 2005

Answered by: narendrakumar on: Oct 4th, 2012

For small scale projects use MVC1 for large scale projects use MVC2 Because In MVC1 both view and controller implemented in servlets In MVC2 view implemented in JSP and controller impl...

Answered by: Zahid Nasim on: Jul 20th, 2011

Raja Shekhar is given a good difference between MVC1 and MVCII.

See In short,

MVC1 (Model 1) = JSP as "V" and "C", JavaBean as "M"
MVC2 (Model 2) = Servlet as "C", JSP as "V", JavaBean as "M"

In which pattern does all the action classes in the struts are organized

Asked By: sudhakar | Asked On: Nov 3rd, 2005

Please post the answer

Answered by: Saorabh Maheshwari on: Jul 6th, 2012

Command Design Pattern.

Answered by: rajandeepvij on: Oct 25th, 2009

Struts controller uses the command design pattern and the action classes use the adapter design pattern. The process() method of the RequestProcessor uses the template method design pattern. Strut...

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.

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

How many types of action clases are there in stuts?Their uses?

Asked By: suman | Asked On: May 25th, 2006

Answered by: prasanth on: Nov 24th, 2011

I think in struts1.x we are having 7 action classes

1.DispatchAction
2.ForwardAction
3.IncludeAction
4.MappingDispatchAction
5.LocalAction
6.SwitchAction
7.LookupDispatchAction

and i don't know about ActionDispatcher.

Answered by: nandana on: Jul 19th, 2011

There are 9 action classes are there
1.action
2.dispatch action
3.mapping dispatch action
4.lookup dispatch action
5.include action
6.forward action
7.switch action
8.locate action
9.download action

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

How to declare in struts-config file when we write two actions in one application.

Asked By: naggeek | Asked On: Jul 26th, 2007

Answered by: mohan on: Oct 7th, 2011

We should write two action tags in config file

Create DAO class

Asked By: aloksharma2k8 | Asked On: Jan 31st, 2009

How to create DAO class? How to use DAO class in struts action class?

Answered by: ramakrishna on: Oct 3rd, 2011

Directly we can call from Action class , Dao class ref .methods

in my project dao class methods are called from Action class

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) ActionServlet2) Action3) ActionForward4) ActionMapping5) ActionErrors6) RequestProcessor7) 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?

First | Prev | | Next | Last Page

 

 

Ads

Connect

twitter fb Linkedin GPlus RSS

Ads

Interview Question

 Ask Interview Question?

 

Latest Questions

Interview & Career Tips

Get invaluable Interview and Career Tips delivered directly to your inbox. Get your news alert set up today, Once you confirm your Email subscription, you will be able to download Job Inteview Questions Ebook . Please contact me if you there is any issue with the download.