You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Anthony Martin <An...@TRAMS.com> on 2001/05/01 19:33:27 UTC
Struts::WAP ... sorta
I got WAP to work using Struts. I couldn't find any WML taglibs, so I just
use HTML comments so I could still benefited from the standard tags like
<bean:write> and <bean:message>. Example:
<%@ page language="java" contentType="text/vnd.wap.wml"
%><%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean"
%><%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html"
%><%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic"
%><?xml version="1.0"?>
<!DOCTYPE wml PUBLIC "-//PHONE.COM//DTD WML 1.1//EN"
"http://www.phone.com/dtd/wml11.dtd">
<wml>
<!--<html:html locale="true">-->
<!--<html:form action="/listProfile">-->
<card id="filter" title="filter">
<p mode="nowrap">
Matched: <bean:write name="listProfileForm" property="max" />
.
. other cool stuff here
.
</p>
</card>
<!--</html:form>-->
<!--</html:html>-->
</wml>
Hope this is helpful to someone, and maybe someone else has a tip/gotcha for
me.
Anthony
It is by caffeine alone I set my mind in motion.
It is by the Beans of Java that thoughts acquire speed,
the hands acquire shaking, the shaking becomes a warning.
It is by caffeine alone I set my mind in motion.
Re: Struts::WAP ... sorta
Posted by Richard Backhouse <rb...@oakgrovesoftware.com>.
Anthony,
I have just completed an hdml interface to my already existing j2ee/struts based
application. It turned out to be very successful in how it works with the struts
controller architecture. It ended up being an additional webapp that I added to
provide an interface to my ejb backend. The action classes that I wrote for the
hdml jsps worked with the same data strutures that I had in place for my html
front end.
The majority of the work was writing hdml ui tags to wrapper most of the hdml
tags (choice, entry, ce etc.) I had to use these when they were dependent on
dynamic content. They generally pulled values out of beans stored in the
request/session. These tags complimented the logic and bean tags that struts
provides. You could see them as being hdml equivalent of the struts html tags.
Right now I am putting together an example hdml/struts app that demonstrates
what I have put together with the goal of producing a white paper. The tags I
have need more work to make them more reusable.
Richard Backhouse
Oak Grove Software
Quoting Anthony Martin <An...@TRAMS.com>:
> I got WAP to work using Struts. I couldn't find any WML taglibs, so I
> just
> use HTML comments so I could still benefited from the standard tags like
> <bean:write> and <bean:message>. Example:
>
> <%@ page language="java" contentType="text/vnd.wap.wml"
> %><%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean"
> %><%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html"
> %><%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic"
> %><?xml version="1.0"?>
> <!DOCTYPE wml PUBLIC "-//PHONE.COM//DTD WML 1.1//EN"
> "http://www.phone.com/dtd/wml11.dtd">
>
> <wml>
> <!--<html:html locale="true">-->
> <!--<html:form action="/listProfile">-->
> <card id="filter" title="filter">
> <p mode="nowrap">
> Matched: <bean:write name="listProfileForm" property="max" />
> .
> . other cool stuff here
> .
> </p>
> </card>
> <!--</html:form>-->
> <!--</html:html>-->
> </wml>
>
> Hope this is helpful to someone, and maybe someone else has a tip/gotcha
> for
> me.
>
>
> Anthony
>
> It is by caffeine alone I set my mind in motion.
> It is by the Beans of Java that thoughts acquire speed,
> the hands acquire shaking, the shaking becomes a warning.
> It is by caffeine alone I set my mind in motion.
>
Re: Can not read i18n properties file
Posted by shunhui zhu <sh...@yahoo.com>.
Pau, I did a similar test for a chinese version with
resource_zh.properties. If I change my browser
language preferences (in IE), I do get the chinese
version, although to display it correctly, I needed to
select chinese encoding in IE's view menu. My guess is
that the response header is not setting the
"Content-language" header or the charset header, but I
haven't looked into it.
Shunhui
--- Sean Pau <se...@yahoo.com> wrote:
> I test creating resource properties file for
> Japanese language. I use
> Windows Notepad and edit resources_ja.properties and
> save it under UTF-8 and
> Unicode format. Struts could display when the file
> is in UTF-8 format but
> the text came out rubbish. When the file is in
> Unicode format, Struts is not
> reading it, instead it reads the default
> resources.properties file. Both
> UTF-8 and Unicode format resources_ja.properties
> files display the Japanese
> text OK when I drag it into IE and also WordPad. Pls
> help. Thanks
>
>
>
_________________________________________________________
> Do You Yahoo!?
> Get your free @yahoo.com address at
> http://mail.yahoo.com
>
__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.yahoo.com/
Can not read i18n properties file
Posted by Sean Pau <se...@yahoo.com>.
I test creating resource properties file for Japanese language. I use
Windows Notepad and edit resources_ja.properties and save it under UTF-8 and
Unicode format. Struts could display when the file is in UTF-8 format but
the text came out rubbish. When the file is in Unicode format, Struts is not
reading it, instead it reads the default resources.properties file. Both
UTF-8 and Unicode format resources_ja.properties files display the Japanese
text OK when I drag it into IE and also WordPad. Pls help. Thanks
_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com