1 说说Struts的优点、缺点
Struts是开源软件,使开发者能更深入的了解其内部实现机制。
Struts 优点:
业界”标准”(很多成功案例),学习资源丰富。
Struts的优点主要集中体现在两个方面:Taglib...... <阅读全文>
Struts面试题专栏 - 最全的Struts面试题, Struts笔试题, Struts问题
DispatchAction是Struts包含的另一个能大量节省开发时间的Action类。与其它Action类仅提供单个execute()方法实现单个业务不同,DispatchAction允许你在单个Action类中编写多个与业务相关的方法。这样可以减少A...... <阅读全文>
在struts 中,控制器信息转发的配置映射信息是存储在特定的XML文件(比如struts-config.xml)中的。这些配置信息在系统启动的时候被读入内存,供struts framework在运行期间使用。在内存中,每一个<action&...... <阅读全文>
ActionServlet把全部提交的请求都被控制器委托到RequestProcessor对象。RequestProcessor使用struts-config.xml文件检查请求URI找到动作Action标示符。
一个Action 类的角色,就像客户请求动作和业务逻辑处理...... <阅读全文>
ActionServlet继承自javax.servlet.http.HttpServlet类,其在Struts framework中扮演的角色是中心控制器。它提供一个中心位置来处理全部的终端请求。控制器ActionServlet主要负责将HTTP的客户请求信息组装后,...... <阅读全文>
1. org.apache.struts.action
基本上,控制整个struts framework的运行的核心类、组件都在这个包中,比如我们上面提到的控制器ActionServlet。已经Action,ActionForm,ActionMapping等等。struts1.1比1.0多了 D...... <阅读全文>
在struts-config.xml加入一个插件,通过它加载applicationContext.xml
在struts-config.xml修改action-mapping标记,具体action交给了DelegateActionProxy
通过DelegateActionProxy进入一spring的环境。
...... <阅读全文>
strusts:是一种基于MVC模式的一个web层的处理。
Spring:提供了通用的服务,ioc/di aop,关心的不仅仅web层,应当j2ee整体的一个服务,可以很容易融合不同的技术struts hibernate ibatis ejb remote springJDBC...... <阅读全文>
国际化:不用修改代码,就适用于不同的语言国家
本地化:如果要适应一个国家,要修改源代码
实现过程:
在struts-config.xml中用如下标签说明资源文件名,注意其只是文件名,没有语言_国家
<message-resou...... <阅读全文>
手动:
public class myForm extends ActionForm
{
public ActionErrors validate()
{
actionErrors.add(ActionErrors.GLOBAL_MESSAGE,new ActionMessage(”properties中的键名”...... <阅读全文>
Struts-config.xml
<data-sources>
<data-source key=”data” type=”org.apache.commons.dbcp.BasicDataSource”>
<set-property property=”driverClass...... <阅读全文>
特性
Struts1.x
Struts2
Action类
Struts1.x要求Action类要扩展自一个抽象基类。Struts1.x的一个共有的问题是面向抽象类编程而不是面向接口编程。
Struts2的Action类实现了一个Action接口,连...... <阅读全文>
消息资源文件是一些简单的.properties文件,这些文件包含有可以被struts项目使用的消息信息,消息资源文件可以以<message-resource/>标签的形式添加到struts-config.xml文件,例如<message-resource ...... <阅读全文>
可以使用<html:javascript>标签来进行基于validation.xml的客户端验证。 例如代码<html:javascript formName=logonForm dynamicJavascript=true staticJavascript=true/>会按照validation.xml中的...... <阅读全文>
(1)在Struts应用的视图中包含哪些组件?(多选)
选项:
(A) JSP
(B) Servlet
(C) ActionServlet
(D) Action
(E) 代表业务逻辑或业务数据的JavaBean
(F) EJB
(G) 客户化标签
(2)在Struts应用的控制器中包含哪些...... <阅读全文>
(1)假设在helloapp应用中有一个hello.jsp,它的文件路径如下:
%CATALINA_HOME%/webapps/helloapp/hello/hello.jsp
那么在浏览器端访问hello.jsp的URL是什么? (单选)
选项:
(A) http://localhost:8080/hello....... <阅读全文>
1.struts
Action是不是线程安全的?如果不是,有什么方式可以保证Action的线程安全?如果是,说明原因
2.MVC,分析一下struts是如何实现MVC的
3.struts中的几个关键对象的作用(说说几个关键对象的作用)
4.spri...... <阅读全文>
转载地址:http://blog.csdn.net/David8631/archive/2008/07/19/2676615.aspx
Hibernate工作原理及为什么要用?
原理:
1. 读取并解析配置文件
2. 读取并解析映射信息,创建SessionFactory
3. 打开Sesssion
4....... <阅读全文>
题目是这样的
有两张表
一张为新闻类别表
有2个字段:
nid(pk) sort
有一张新闻内容表
有三个字段
cid(pk) nid(fk) title content
要求通过下拉列表框的方法选择新闻类别然后显示该类...... <阅读全文>
Chain result type is used for Action Chaining which means that the source result invokes an entire other action, complete with it’s own interceptor stack and result.
Redirect Action result...... <阅读全文>
Question: Can I setup Apache Struts to use multiple configuration files?
Answer: Yes Struts can use multiple configuration files. Here is the configuration example:
<servlet>
<servlet-n...... <阅读全文>
Question: Why cant we overide create method in StatelessSessionBean?
Answer: From the EJB Spec : – A Session bean’s home interface defines one or morecreate(…) methods. Each c...... <阅读全文>
Question: What is RequestProcessor and RequestDispatcher?
Answer: The controller is responsible for intercepting and translating user input into actions to be performed by the model. The contro...... <阅读全文>
Q: What is ActionServlet?
A: The class org.apache.struts.action.ActionServlet is the called the ActionServlet. In the the Jakarta Struts Framework this class plays the role of controller. All th...... <阅读全文>
1. 关闭logging和开发模式(devMode), devMode是在struts.properties中设置的, 关闭logging需要修改web.xml文件,加入以下参数
<servlet>
<init-param>
<param-name>debug</param-name&g...... <阅读全文>








