David Newton wrote:
Colin Freas wrote:... Servlets, JSP, Beans, Struts, and Tiles.
Not really, except maybe for beans. None of the other things there are "convention" by default, unless you count wildcarding.
David Newton wrote:
Colin Freas wrote:And style sheets exclusively affect the view, thus they belong with the JSP - however it's created.
Unless, of course, the requirement demands something else. Tiles was created to allow configuration of view-side properties (a) outside of Java code, and (b) outside of the JSP. Things like stylesheets, for example.
I was responding to the implication of your assertion that relying on the action name is a better idea.David Newton wrote:...the JSP isn't the greatest common denominator, the action is...
David Newton wrote:
Colin Freas wrote:Either way, I don't believe the motivation for the creation of software should restrict it's use.
You are responding to something that was never said; perhaps you got your threads confused.
David Newton wrote:...that's the kind of problem Tiles was created to avoid...
David Newton wrote:
Colin Freas wrote:And whatever that motivation I'll say this: I generally expect request.getRequestURL() to return the URL I see in the browser.
That's an unreasonable assumption, particularly when including dynamically including resources, and can be container-dependent.
David Newton wrote:
Colin Freas wrote:
I put an attribute into my tiles-def.xml file, "customStyleSheet", and gave the attribute a default "" in the master definition.
But this results in a <link> with an href of something like "/app/styles/" without a filename. Doesn't seem to break anything, and I could put in a zero byte default file, but is there some way to suppress the rendering of that <link> if <tiles:getAsString name="customStyleSheet"/> is zero length?
Sure; check to see if it has a value.