控制器在Struts [英] Controller in Struts

查看:108
本文介绍了控制器在Struts的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

$ MVC中的Controller是什么?

What is Controller in MVC ?

是否 struts.xml Servlet (Action Class)?

Is it struts.xml or Servlet (Action Class)?

我们的应用程序中可以有多个 Controller

Can we have more than one Controller in our application?

拥有多个控制器是个好习惯吗?

Is it good practice to have more than one controller?

推荐答案

在Struts中,应用程序控制器层代码/功能分为两部分:

In Struts, application Controller layer code/functionality is split into two parts:


  • ActionServlet with RequestHandler

  • 动作课程

  • ActionServlet with RequestHandler
  • Action classes

ActionServlet FrontController模式

alt text http://onjava.com/onjava/2005/11/02/graphics/figure3.gif

图片来自 OnJava文章

这篇关于控制器在Struts的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆