Since arriving on the scene in 2000, Apache Struts has enjoyed a very successful run, by most any standard, helping to build many, if not most, of the Java-based web applications deployed today. Its history tells of how Struts provided a solid framework to organize the mess of JSP and Servlets to make developing applications, which used mostly server-generated HTML with a touch Javascript for client-side validation, easier to develop and maintain. As time moved forward, and customer demands of web applications grew and grew, Struts 1 pretty much stayed the same, leaving more and more plumbing to the web developer.
At JavaOne 2005, several of the Struts developers (Martin Cooper, Don Brown) sat down with Rich Feit (Apache Beehive) and a few Struts users to discuss the future of Struts. We came up with the Struts Ti proposal, which described a framework that brought together a lot of good things that were developing in the web framework community. The problem is that the Struts 1 code base didn’t lend itself to drastic improvements, and its feature set was rather limited, particularly lacking in features such as Ajax, rapid development, and extensibility.
At the same JavaOne, I sat down with Jason Carreira of the OpenSymphony WebWork 2 project to discuss how we could better work together. I was interested in building on XWork, the core of their command pattern implementation, but he suggested building on WebWork 2 directly. As Rich and I worked on the first few versions of Struts Ti, we decided to take Jason’s advice. We thought it was time for a framework to address higher level application needs, and by building on the proven WebWork 2 framework, we could spend our precious spare time where we felt it would make a difference. From then on, Rich and I worked mostly with Patrick Lightbody, also a core WebWork 2 developer, and found ourselves constantly “stealing” each others ideas for our respective code bases.
Around this time, Patrick and Keith Donald of the Spring WebFlow project were kicking around an idea of a web framework to bind them all, Clarity. Clarity brought together Spring WebFlow (Keith), Struts (Ted Husted and myself), WebWork (Patrick and Jason), and Beehive (Rich) to talk about the possibility of combining efforts into one framework. Unfortunately, the devil is in the details as soon as Beehive and WebFlow were unable to make progress on merging their wizard/conversion scope features, and questions about project ownership, brand, and identity soon broke up the party.
Not wanting to lose momentum, Ted and I started discussions with Patrick and Jason on how we could better work together, and after Patrick casually suggested the idea of a merger, Ted jumped on it and the Struts/WebWork merger was born. Since Struts Ti was already based on WebWork, it wasn’t that far a leap to bring the WebWork code into the Struts project. We started the Apache Incubator process for WebWork 2 in January and graduated the WebWork 2 code, developers, and community to Apache Struts that May.
At that time, Struts was struggling with the project’s core identity, whether it was an umbrella for multiple web frameworks or not. We had Apache Shale, a web framework based off JSF, as a Struts subproject, along side Struts Action 1 (now called Struts 1) and Struts Action 2 (the graduated WebWork 2 code). Unfortunately, these subprojects were confusion to the developer and user community, accustomed to the name “Struts” referring to a single framework. After an attempt to unify the Struts Action 2 and Shale subprojects into a single Struts 2 framework, the Shale developers felt it would be better if they were their own top level project (TLP) where they are today. Struts Action 2 was soon after renamed to simply Struts 2.
Today, the Apache Struts project has two major versions of its framework, but it is one action-based framework project. WebWork continues to deliver patch releases, and will certainly continue to do so until Struts 2 goes GA or final, but all new development takes place on the Struts 2 code. For those looking for drama or a controversy in the Struts/WebWork merger story, you’ll have to look elsewhere. Both groups of developers are working happily towards a Struts 2.0 GA release, trying to combine the stability and accessibility of Struts 1 with the elegant architecture of WebWork 2. Since the initial incubation, the Struts 2 code has added major features including a plugin framework, a new API, and better Ajax tags, and as promised in the Struts Ti proposal, we won’t stop there.
I decided to write this down to help clear up where this Struts 2.0 project came from and why it includes WebWork 2 code. Mergers are tricky things and it seems even in the Open Source community, one that champions collaboration, a merger between two projects is a rarity and needs to be defended. Amusing, because you’d be hard pressed to find a Java web developer that felt there are too few web frameworks. I think the WebWork and Struts communities pulled off something special in Struts 2, and hope the merger fever catches on in the Open Source world.
$status = null;
// 20070302 - {$this->m_dbName}.mantis_bug_table -> mantis_bug_table
// Problems with MS-SQL
$query = "Select summary FROM mantis_bug_table Where id='" . $id."'";
$result = $this->m_dbConnection->exec_query($query);
if ($result)
{
$summary = $this->m_dbConnection->fetch_array($result);
// 20070302 - BUGID - on MS-SQL fetch_array() does not returns numeric indexes, then
// only choice is accessing my field name (IMHO better)
if ($summary) $summary = iconv("GB2312",TL_TPL_CHARSET,$summary['summary']);//<-修改的
else
$summary = null;
}
return $summary;
}
環境要求示例:
l TestLink和Mantis安裝在同一臺服務器上
l Mantis的鏈接:http://168.68.73.29/mantis/
l TestLink的鏈接:http://168.68.73.29/TestLink/
l Mantis數據庫名字:mantis
l Mysql登錄名字:mantis_user
l 登錄密碼:Mantis_passwd
第一步:編輯config.inc.php
找到$g_interface_bugs='NO';
改成$g_interface_bugs='MANTIS';
第二步:在mantis上設置匿名登錄權限
l 匿名登錄的設置需要打開。
l Mantis的匿名用戶具備對所有的項目都可以瀏覽的權限。
Change the following in your mantis config_inc.php (replace dummy with your created user)
# --- anonymous login -----------
# Allow anonymous login
$g_allow_anonymous_login = ON;
$g_anonymous_account = 'dummy';
注:這個dummy用戶需要administrator在后臺添加,注冊不了的
第三步:在TestLink里配置mantis的界面參數。
你必須編輯TL_ABS_PATH/cfg/mantis.cfg.php,如下所示:
/** The DB host to use when connecting to the mantis db */
define('BUG_TRACK_DB_HOST', 'localhost');
/** The name of the database that contains the mantis tables */
define('BUG_TRACK_DB_NAME', 'manti');
/** The DB type being used by mantis
values: mysql,mssql,postgres
*/
define('BUG_TRACK_DB_TYPE', 'mysql');
/** The DB type being used by mantis */
define('BUG_TRACK_DB_USER', 'mantis_user');
/** The DB password to use for connecting to the mantis db */
define('BUG_TRACK_DB_PASS', 'mantis_passwd');
mysql> GRANT SELECT,INSERT,UPDATE,DELETE,INDEX, ALTER,CREATE,DROP,REFERENCES,LOCK TABLES,CREATE TEMPORARY TABLES ON bugs.* TO bugs@localhost IDENTIFIED BY '';
# # "F:/Apache2/cgi-bin" should be changed to whatever your ScriptAliased # CGI directory exists, if you have that configured. # <Directory "F:/Apache2/cgi-bin"> AllowOverride All Options All Order allow,deny Allow from all </Directory>
10 從G:/PHPTemp拷貝libmysql.dll及ext文件夾到F:/PHP 并在F:/PHP/php.ini中修改成
;;;;;;;;;;;;;;;;;;;;;;
; Dynamic Extensions ;
;;;;;;;;;;;;;;;;;;;;;;
;
; If you wish to have an extension loaded automatically, use the following
; syntax:
;
; extension=modulename.extension
;
; For example, on Windows:
;
; extension=msql.dll
extension=php_mysql.dll
extension=php_mysqli.dll
;
; ... or under UNIX: