Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / August 2007

Tip: Looking for answers? Try searching our database.

Struts: XHTML support

Thread view: 
Tim Slattery - 30 Aug 2007 19:38 GMT
I'm writing apps in Struts, and our pages are supposed to be xhtml
1.1. We're using Struts 1.1, which has an "xhtml" attribute for the
"html" tag. When you use that tag, you get a "lang" attribute in the
rendered html tag, which is not allowed in xhtml 1.1. And you get a
"name" attribute in the form tag, which is also not allowed.

I've tried Struts 1.3.5, which is better. You don't get a "name"
attribute in the form tag, instead the form bean name is put into an
id attribute. I've tried to specify my own id attribute
(styleId="something"), that causes page rendering to stop at the form
tag, with no error message. Also, the "lang" attribute in still in the
html tag

I haven't tried 1.3.8 yet, is that any better?

Also, a general gripe: The taglib documentation at
http://struts.apache.org/1.3.8/struts-taglib/tagreference.html is a
mess! many of the & characters have been changed to entities(&).
In general a good idea, but not when the & is itself the first
character in an entity! Also < and > characters delimiting HTML tags
seem to have been turned into entities. You get stuff like this:

<p><strong> Define An Input Form </strong></p> <p> Renders an HTML
&lt;form&gt; element whose contents are described by the body content
of this tag. The form implicitly interacts with the specified request
scope or session scope bean to populate the input fields with the
current property values from the bean. </p> <p> The form bean is
located, and created if necessary, based on the form bean
specification for the associated <code>ActionMapping</code>. </p>

Ugh!

Signature

Tim Slattery
Slattery_T@bls.gov
http://members.cox.net/slatteryt

Tim Slattery - 30 Aug 2007 21:09 GMT
>I haven't tried 1.3.8 yet, is that any better?

So now I've tried 1.3.8. I copied the libraries in, recompiled my
*.java modules, redeployed. Now it doesn't run at all. I get this:

Parsing of JSP File '/index.jsp' failed:
--------------------------------------------------------------------------------
/index.jsp(3): Error in using tag library
uri='http://struts.apache.org/tags-html-el' prefix='html-el': type
mismatch for property 'filter', for Tag class
'org.apache.strutsel.taglib.html.ELOptionTag': tld says boolean,
implementation type is java.lang.String
probably occurred due to an error in /index.jsp line 3:
<%@ taglib uri="http://struts.apache.org/tags-html-el"
prefix="html-el" %>

The "taglib" directive quoted at the bottom of that paragraph is in
the page and has been forever, it has not changed. Is the
struts-el-1.3.8.jar library really screwed up?

Signature

Tim Slattery
Slattery_T@bls.gov
http://members.cox.net/slatteryt



Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.