项目 >> Web 框架 >> Struts

Struts(Java)

Struts

Apache Struts is a free open-source framework for creating Java web applications.

Web applications differ from conventional websites in that web applications can create a dynamic response. Many websites deliver only static pages. A web application can interact with databases and business logic engines to customize a response.

Web applications based on JavaServer Pages sometimes commingle database code, page design code, and control flow code. In practice, we find that unless these concerns are separated, larger applications become difficult to maintain.

One way to separate concerns in a software application is to use a Model-View-Controller (MVC) architecture. The Model represents the business or database code, the View represents the page design code, and the Controller represents the navigational code. The Struts framework is designed to help developers create web applications that utilize a MVC architecture.

The framework provides three key components:

  • A "request" handler provided by the application developer that is mapped to a standard URI.
  • A "response" handler that transfers control to another resource which completes the response.
  • A tag library that helps developers create interactive form-based applications with server pages.
The framework's architecture and tags are buzzword compliant. Struts works well with conventional REST applications and with nouveau technologies like SOAP and AJAX.

Homepage: http://struts.apache.org/

Loading...

struts中文问及国际化问题——终极解决方案

说实话,你们的方法都做的复杂了,Java本身就支持多国语言编码,不需要写任何程序,可以很简单的 实现。 秘诀就是两点: 1、所有HTML/JSP页面全部采用UTF-8编码 2、客户端浏览器完全支持UTF-8编码 步骤: 1、首先把所有的HTML/JSP的ContentType都设为UTF-8 2、然后对于JSP程序中的非ASCII码提示信息都不应该写在程序里面,都应该放在 application.prop...

在你的struts应用中施展部分AJAX魔法(翻译)

作者 Paul Browne 10/27/2005 翻译 pawenwen AJAX是最近在web开发流程中一次革命,它允许在一个普通的web浏览器中配置大量的动态效果。多年前Struts 都已经是Java-Web开发中的一个事实上的标准,在大量的应用中都已经使用了它。本文将告诉你,如何在你已经存在Struts应用中结合丰富的AJAX用户接口。 本文将介绍在JSP页面中包含一些JavaScript这样一个简单...

struts框架学习过程中的问题

1,错误: java.lang.NullPointerException: Module 'null' not found. 错误原因,struts运行需要的.jar文件拷贝不足,应该把它们加入到classpath中。 2,连接oracle出错,no suitable driver 错误原因不在于驱动有误,而是由于url写错了, jdbc:oracle:thin:@127.0.0.1:1521:mydatabase 写成了:jdbc:oracle.thin:@127.0.0.1:1521:mydatabase ...

我的Struts分页方法

拜读了bibiye的《一个高效简洁的Struts分页方法(原创)》后,根据bibiye的方法,自己修改了一下,也弄了一个struts下的分页,大家见笑了! 我的方法是,根据用户点击导航条上的页号(offset),到DB中读取该页的数据(不是一次全部读出),点到哪页读哪页的数据,JBX + tomcat + oracle下测试通过,数据库用的表是oracle的emp表。 ********分页类Pager.java,负...

一个高效简洁的Struts分页方法(原创)

 在网上看了几个Structs分页,感觉不是很完善,于是根据自己的经验,写了一个相对高效简洁的分页方法。由于本人水平有限,如果大家有什么更好的想法,欢迎不吝赐教。 一、 开发环境 我的开发环境是:JBuilder x + Weblogic 8.1 + Oracle 9i + Windows 2003 ,如果朋友们的开发环境不一样亦无妨。 二、开发思路 既然讲的是Struts,那自然离不了...