Provide access to important Struts variables and constants so they could be
easily used with JSTL
-------------------------------------------------------------------------------------------------
Key: STR-2941
URL: http://issues.apache.org/struts/browse/STR-2941
Project: Struts 1
Issue Type: Improvement
Components: Core, Taglibs
Reporter: Michael Jouravlev
Priority: Minor
Struts taglib has many tags that encapsulate Struts/servlet constants/variables
and expand them into plain HTML tags. As an example, take a look at <html:base>
tag.
Consider the "home.jsp" page is located in directory "pages". Let us also
consider that application context is defined as "myapp".
An <html:base> tag specified in home.jsp page will generate something like this:
<base href="http://myserver:8080/myapp/pages/home.jsp">
A suggested alternative to <html:base> tag would look like:
<base href="${pageroot}">
Another example, <html:link>.
Instead of
<html:link action="/myAction">My Action</html:link>
one would use
<a href="${contextroot}/myAction">My Action</a>
The benefits:
* Tag library can be simplified
* No need to support proper HTML attributes for different tags; why Struts
should care whether HTML developed by a programmer is valid or not?
* The markup looks more like real HTML
* HTML editing software will not choke on custom tags
* No hidden meaning, no side effects, just plain old HTML.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/struts/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira