Use struts WML tag to implement WAP development - TILES

xiaoxiao2021-03-06  98

First define Tiles:

end samples ->

layout.jsp: <% @ page contenttype = "text / vnd.wap.wml; charset = UTF-8"%> <% @ include file = "/ web-inf / pages / common / taglibs .jsp "%>

taglibs.jsp: <% @ Taglib URI = "/ Web-inf / app.tld" prefix = " App "%> <% @ Taglib URI =" / Web-inf / struts-bean.tl D "prefix =" bean "%> <% @ Taglib URI =" / Web-inf / struts-wml.TLD "prefix =" WML "%> <% @ Taglib URI ="

/Web-inf/struts-logic.tld "prefix =" logic "%> <% @ Taglib URI =" / Web-inf / struts-tiles.tld "prefix =" tiles "%> struts-config.xml

NOTE: You would only flesh out the details in the "form-bean" declarations if you had a generator tool that used them to create the corresponding Java classes for you Otherwise, you would need only the "form-bean" element itself,. With the corresponding "name" and "type" attributes .-->

= "autocommit" value = "false" /> ->

"logonform" type = "org.apache.struts.Webapp.Example.logonform" /> -> ->

<-! Edit user registration ->

<-! Edit mail subscription -> < Forward name = "failure" path = "/ mainmenu.jsp" />

<-! Save mail subscription -> < Forward name = "subscription" path = "/ subs" />

转载请注明原文地址:https://www.9cbs.com/read-96786.html

New Post(0)
CopyRight © 2020 All Rights Reserved
Processed: 0.032, SQL: 9