aspose file tools*
The moose likes Struts and the fly likes Q 4 author: extending struts for local needs Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Q 4 author: extending struts for local needs" Watch "Q 4 author: extending struts for local needs" New topic
Author

Q 4 author: extending struts for local needs

Gian Franco
blacksmith
Ranch Hand

Joined: Dec 16, 2003
Posts: 977
Dear author,

How should one introduce an extension to struts
if some specification can't be realized with the
given set of struts-possibilities? Are there some
fixed rules that should be followed in these
cases, in order not to break struts'design?

Cheers,

Gian


"Eppur si muove!"
Lasse Koskela
author
Sheriff

Joined: Jan 23, 2002
Posts: 11962
    
    5
What kind of needs/extensions are you talking about?


Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
Gian Franco
blacksmith
Ranch Hand

Joined: Dec 16, 2003
Posts: 977
Hi,

An example, the only one really since I've just
been exposed to struts, comes from the following:
I've got a set of custom tags that do their thing,
and often they include a body with struts components.
This combination is so recurrent that I would like
to wrap the whole thing into a single custom tag.
Therefore the need for some hooks for an elegant
solution to this problem.

Cheers,

Gian
Lasse Koskela
author
Sheriff

Joined: Jan 23, 2002
Posts: 11962
    
    5
Hmm. In theory, you could write a custom tag that uses the Struts tag classes directly, i.e. doing something like

I doubt that this would make your situation much better, though.
Gian Franco
blacksmith
Ranch Hand

Joined: Dec 16, 2003
Posts: 977
Hi,

This is indeed how it has been solved now
but I'm not really pleased with the solution
it 'smells' a bit.

Cheers,

Gian
[ January 12, 2005: Message edited by: Gian Franco Casula ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Q 4 author: extending struts for local needs