You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Graham Reeds <gr...@ntlworld.com> on 2005/01/28 06:18:48 UTC
Struts, XHTML, DOCTYPES, and EL (several newbie questions)
Okay I am new to struts (around a week) and having made a couple of little
test apps am moving towards validation and w3c compliance. I am using 1.2.4
for what it is worth in Netbeans 4.0.
There appears two methods of enabling html compliance with struts. The
first is <html:html xhtml="true"> which adds the xmlns info. The second is
via <html:xhmtl /> which is closed so I guess I don't need it if I have
xhtml="true" in my opening tags. Or do I? Documentation suggests that
without the <html:xhtml /> then the output will be to html 4.x (no closed
tags etc.). I am correct in assuming this? Code doesn't seem changed
either way but then again my JSP is well formed to begin with.
Also there doesn't appear to be a doctype tag in struts. Is there one in
the JSTL? I have done a search but haven't found an answer. It seems to be
rather obvious to me that since every file will be reduced to (x)html and by
w3c standards a (x)html file must have a DOCTYPE that a tag would be
present. However I haven't found one.
Also what version of the struts should I be using? The standard struts or
the el version? From what I can make out it would appear the EL version
will be the 1.3 release with a lot of the Struts/JSTL overlap removed and a
new parser?. Would it be better to use the EL version over the "regular"
version?
On the Netbeans front (I know this isn't the place for it but I hope someone
can help) the documentation that appears when selecting the tags doesn't
have any description of what the tags do. Where is this information locally
or should I download the src to get the documentation? I'd rather have a
local copy than use the public one on sao/api/.
Thanks for your time, Graham Reeds.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: Struts, XHTML, DOCTYPES, and EL (several newbie questions)
Posted by Graham Reeds <gr...@ntlworld.com>.
I have another question. I seem to only get the JavaDoc help for Struts
in the source of JSP files where I have the reference to the tag's via
an <%@taglib ...%> scriplet. In Java I receive the error "JavaDoc not
installed" from Netbeans so I was wondering where the docs folder for
struts is (or where I can get a copy)? I could use the online version,
but I'd rather have a local copy integrated into NB.
Thanks.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: Struts, XHTML, DOCTYPES, and EL (several newbie questions)
Posted by Eddie Bush <ea...@gmail.com>.
Have you tried examining the source? ;-) Let's do:
If you set <html:html xhtml="true"> the code is going to set a
PageContext variable indicating XHTML should be used to true. You can
find an identical line of code in the XhtmlTag class. I'd say, based
off the code, that they're functionally equivalent.
For you DOCTYPE question: I don't believe you'll find one. You could
keep this in a XHTML.inc file - somewhere - and use the @include
directive or <jsp:include> to place it into pages where you wanted to
use it. The @include directive does a static include (includes the
content at compile time) and <jsp:include> includes the content
dynamically at the time of the request.
Struts current "production-quality" code-base is 1.2.4. Using the
EL-tags are more of a convenience than a "right way" to do things.
They can be indespensible for removing run-time expressions from your
pages though, since they allow EL-expressions for attribute values.
For your javadoc concerns ... you should have a
struts-documentation.war file that came with your distribution (look
under webapps). You should be able to extract the api docs from
there. You might want to jar them up - been a while since I used
NetBeans, so I don't recall.
NetBeans knows about the tag attributes because of the TLD files. You
can get better descriptions of the tags' attributes from the
struts-documentation.war app (you might just install it in your
container so you'll have it for reference).
Good Luck!
--
Eddie Bush
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org