JForum 是一個功能強大,易于管理的開源論壇.
分析原代碼,主要從modulesMapping.properties和templatesMapping.properties這兩個文件入手.
modulesMapping.properties文件
主要用來配置訪問Action的方法.
例如url為 http://cy2007:8080/jforum/forums/show/402.page ,我們可以
找modulesMapping.properties里的forums=net.jforum.view.forum.ForumAction這一句,
url的forums與modulesMapping.properties的forums配對,url的show與ForumAction的show方法配對,
402為ForumAction的參數.
templatesMapping.properties文件
主要是Action處理后,返回頁面的對應文件
例如上面的ForumAction的show方法,對應templatesMapping.properties的forums.show = forum_show.htm
成功處理后,會跳到forum_show.htm頁面.
分析原代碼,主要從modulesMapping.properties和templatesMapping.properties這兩個文件入手.
modulesMapping.properties文件
主要用來配置訪問Action的方法.
例如url為 http://cy2007:8080/jforum/forums/show/402.page ,我們可以
找modulesMapping.properties里的forums=net.jforum.view.forum.ForumAction這一句,
url的forums與modulesMapping.properties的forums配對,url的show與ForumAction的show方法配對,
402為ForumAction的參數.
templatesMapping.properties文件
主要是Action處理后,返回頁面的對應文件
例如上面的ForumAction的show方法,對應templatesMapping.properties的forums.show = forum_show.htm
成功處理后,會跳到forum_show.htm頁面.