Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can we use multiple ActionServlet in Struts?

Status
Not open for further replies.

jollyplay

Programmer
Dec 16, 2003
90
Hello

I have a doubt in a Struts Application. Can we use multiple ActionServlet in a Struts Application?. If so then, please provide example for this.

Thank you in advance.

Regards,
balachandar
 
Hi,

Then you are breaking the rules of MVC by having multipule ActionServlets? Insted extend the ActionServlet.

Cheers
Venu
 
Dear venu,

Could you explain more clearly? What you are saying is

class ourclass1 extends ActionServlet{
.
.
}

class ourclass1 extends ActionServlet{
.
.
}

right? Could i know what is the benefit of this?
----------
My doubt is , can we use like below?

<web-app>
<servlet>
<servlet-name>actionfirst</servlet-name>
<servlet-class>org.apache.struts.action.ActionServlet</servlet-class>

<servlet>
<servlet-name>actionsecond</servlet-name>
<servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
...
<web-app>

in this case, how it is affecting MVC architechture?

Please explain.

thank you,
balachandar

 
the first question you need to ask is WHY do you need to use multiple servlets. struts is a SINGLE servlet model framework that supports multiple modules (for larger and coordinated application development) if that's what you're looking.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top