Thanks
I've test it.The classpath will be searched first. So I need another solution.
>
>发件人: Dave Newton
>收件人: Struts Users Mailing List ; Yonder
>
>发送日期: 2011年8月1日, 星期一, 下午 7:27
>主题: Re: can i override freemarker template
>
>
>I don't recall which will be searc
Thanks for the feedback.. my first thought was to use interceptors but I
decided against this since in principle I mainly use interceptors for stuff
like setting up ThreadLocals for the request, auditing requests and for
access control etc. but not for business logic. Action chaining also entered
m
Yep, a service is the canonical solution--my impression was that the
OP was trying to avoid *any* knowledge of the additional search stuff,
but composing capabilities via services sure seems like the easiest
thing to do.
Dave
On Mon, Aug 1, 2011 at 9:32 AM, Aaron Brown wrote:
> If I were coding
If I were coding the search part, I'd probably place the secondary
piece inside a searching business service. Your action would
instantiate a search business service and ask it to get search results
based on a query string. The business service would do that and also
(based on whatever business log
Well, I don't have an issue with memory leaks now, and it's been a while
since I had some problem with it(but it was due to some references in a list
not cleaned).. It maybe a 'cargo cult', but I don't think it is
harmful,-apart from some overhead- so I just prefer to be on the safe side.
A little
Meh, while I think turning this into something event-based is way overkill,
I wouldn't turn to chaining, either. I'd probably just use an interceptor,
AOP, or any other "around"-type solution.
I view actions as something a user can hit (insert mom-joke here), not as a
chunk of general-purpose func
Unless you have proof an action's properties are causing a memory leak, it
sounds like "cargo cult" programming to me. Most cases if leaks like this
are caused by something else in the code keeping references.
Have you profiled the app to see if what you want is really necessary? I'm
pretty skepti
I don't recall which will be searched first, or if it will even search both.
I've probably just try it.
That said, if this type of customization is a feature of the application,
I've strongly consider a cleaner solution, like serving the templates from a
database, or providing a clear, consistent
Dear all,
I'm using struts 2.2.3 and conversion plugin. I have set the
struts.convention.result.path to '/WEB-INF/views' and I know the convension
plugin will searching for results in the Servlet container and in the class
path. So can I put the default result template in classpath and if need,
Well, the interceptor should be the first one on the stack, so all data
required in the result should have been already used. It's not a bad idea, I
will work with that.
With respect to the GC, back in 2002 when I started using Java the GC didn't
work quite well, and my team and I started clearing
Doing what you are looking for through an interceptor is quite
trivial: you should simply check (after the invocation.invoke() call)
if an action implements Destroyable IF and then call the destroy
method.
Anyway, I think that the garbage collector in this specific case is
able to do a good work,
11 matches
Mail list logo