原创 定製自己的struts標籤
我們知道,struts的標籤都定義在*.tld標籤庫文件中。這樣,我們就可以建一個tld文件,定義自己的個性化標籤。以下以html標籤爲例,創建一個含有table標籤的tld文件1.mytag.tld: <?xml version="1
原创 struts taglib 源碼之--ButtonTag
ButtonTag繼承自BaseHandlerTag,並添加了property,text,value等屬性.源碼如下(jakarta-struts-1
原创 對struts form bean 的一個疑問
在struts中,每個action對應一個form bean,表單中的字段在對應的form bean中也必須對應有相應的字段.這樣,當要給前臺表單增加
原创 struts常見問題——form bean的映射:Cannot retrieve mapping for action
web.xml配置文件: <servlet> <servlet-name>action</servlet-name> <servlet-class>org.apache.struts.action.ActionServlet
原创 struts html標籤一覽
Page Construction Tags This taglib contains tags used to create struts input forms, as well as other tags generally u
原创 web組件的三種關聯關係
1.請求轉發:轉發的源組件和目標組件共享request範圍內的共享數據在Servlet的service()方法中執行以下代碼:RequestDispatcher rd = request.getRequestDispatcher("hel
原创 Strus常見錯誤及原因分析
Strus常見錯誤及原因分析 本篇文章包含了在用Struts開發web應用時經常碰到的一些異常和錯誤,根據異常或錯誤信息本身,經常可以找到潛在的錯誤發生原因。 下面列出了一些Struts的常見錯誤和異常,並給出了一些可能發生此類錯誤或
原创 tomcat中的路徑實踐
今天用實際例子驗證了一下tomcat中的各種路徑.在 webapps目錄中創建了一個pathtest的目錄,結構如下: webapps/ pathtest/
原创 struts中使用cookie
在action中設置cookie,如: Cookie c = new Cookie( "userInfo" ,"pian_yun_2"); c.setComment( "A test cookie" ); c.setMaxAge(12
原创 struts標籤屬性
struts標籤屬性:name:一般指javabean的名稱property:標籤名稱,與html的name對應style:標籤樣式,與html的st
原创 struts taglib 源碼之--BaseHandlerTag
BaseHandlerTag是處理標籤事件和style,title等基本屬性的抽象類.具體的標籤類繼承於此類,添加額外屬性.源碼如下(jakarta-
原创 struts標籤html:checkbox
在使用struts標籤html:checkbox 的時候,如何讓checkbox框默認是選中的,一般情況 下都是當formbean裏面該property的值和標籤上value給定的值相等的時候,生成的jsp頁面上纔是選中的,其實,還有幾種
原创 struts標籤bean:cookie,bean:write,logic:page,logic:present,logic:iterate使用實例
jsp頁面index.jsp: <%@page contentType="text/html;charset=gb2312" language="ja
原创 struts常見問題——Can't find file '/WEB-INF/tiles-defs.xml'
解決方法:刪除struts-config.xml裏有關的tiles-defs.xml配置。
原创 struts中的findForward
在struts中有兩個類具有findForward方法:1。 ActionMapping的findForward方法查找的範圍是action配置中設定