Author Login
Post Reply
user Digest 12 Apr 2008 01:53:16 -0000 Issue 7975
Topics (messages 185303 through 185332):
Re: [OT] UML and Reverse Engineering
185303 by: Jeromy Evans
185305 by: Antonio Petrelli
185308 by: Jeromy Evans
185315 by: David Durham, Jr.
Re: Scheduled DB clean up service with Struts2
185304 by: Frank Fischer
185306 by: Frank Fischer
185310 by: Gabriel Belingueres
Re: interesting proxy + action chain issue
185307 by: Brad A Cupit
Re: How do I make Tomcat send 403 Forbidden page to the client in jsp and in struts?
185309 by: Randy Burgess
[OT] Re: tc5.x caching jsp
185311 by: Dave Newton
Re: Does Struts 2 support clustering?
185312 by: mojoRising
185313 by: Brad A Cupit
185317 by: Guillaume Bilodeau
185320 by: mojoRising
185321 by: Guillaume Bilodeau
Re: S2 Textfield tag date formatting
185314 by: Rene Gielen
185316 by: Rene Gielen
redirect to welcome page
185318 by: temp temp
Ajax Fileupload in struts2.
185319 by: sharath karnati
185330 by: Jeromy Evans
Two buttons on same row
185322 by: akash agrawal
185323 by: sharath karnati
185324 by: Michael Gagnon
185326 by: Márcio Gurgel
185328 by: akash agrawal
[S2] Textfield key with resource bundle
185325 by: Kelly.Graus
Re: Validation result URL contains failed parameters
185327 by: Guillaume Bilodeau
How to use annotationWorkflow Interceptor
185329 by: akash agrawal
ReferenceError: validateForm struts 2
185331 by: Márcio Gurgel
Re: How can I tell Struts 2 to throw/log exceptions for invalid OGNL Expressions
185332 by: Jeromy Evans
Administrivia:
---------------------------------------------------------------------
To post to the list, e-mail: user@(protected)
To unsubscribe, e-mail: user-digest-unsubscribe@(protected)
For additional commands, e-mail: user-digest-help@(protected)
----------------------------------------------------------------------

Attachment:
user_185303.ezm (zipped)Antonio Petrelli wrote:
> 2008/4/11, Jeromy Evans <jeromy.evans@(protected)>:
>
>> A good opensource option is Poseidon for UML (http://www.gentleware.com/).
>> The community edition is free but that edition doesn't include Java->UML.
>>
>
> Err... Poseidon is not open source.
> Anyway, I think that NetBeans is pretty nice:
> http://www.netbeans.org/kb/60/uml/re.html
>
> Antonio
>
oops, sorry. It also appears that Poseidon's community edition isn't free.
I can stop feeling dirty for buying EA.

Attachment:
user_185305.ezm (zipped)2008/4/11, Jeromy Evans <jeromy.evans@(protected)>:
>
> I can stop feeling dirty for buying EA.
LOL! Anyway I agree with you, Enterprise Architect is a great piece of
software, I use it in my everyday job and it's fast, reliable and great for
documentation (though I did not use it for reverse engineering).
It's a pity that under Linux it's hard to install (it needs too many strange
dependencies, like Crossover Office :-O), this is the reason why I don't buy
it for my own PC.
Antonio

Attachment:
user_185308.ezm (zipped)Antonio Petrelli wrote:
> 2008/4/11, Jeromy Evans <jeromy.evans@(protected)>:
>
>> I can stop feeling dirty for buying EA.
>>
>
>
>
> LOL! Anyway I agree with you, Enterprise Architect is a great piece of
> software, I use it in my everyday job and it's fast, reliable and great for
> documentation (though I did not use it for reverse engineering).
> It's a pity that under Linux it's hard to install (it needs too many strange
> dependencies, like Crossover Office :-O), this is the reason why I don't buy
> it for my own PC.
>
Yeah, I also decided it was too much effort to setup the linux install.
I run it within a vmware workstation running XP. I'm feeling dirty
again now.

Attachment:
user_185315.ezm (zipped)> A good opensource option is Poseidon for UML (http://www.gentleware.com/).
> The community edition is free but that edition doesn't include Java->UML.
Poseidon and ArgoUML share a common codebase. Argo does Java -> UML,
and I think the community edition of Poseidon does as well, but I'm
possibly wrong on this point.
-Dave

Attachment:
user_185304.ezm (zipped)
Sorry, of course i meant servlet context listener, not servlet filter....
> However, I would like to use my certain action
> methods, since they already contain all the
> funtionalities for DB acces.
Then i guess it would be a smart way by letting spring inject the DBA object
into your action(s) and the clean up service as well.
- Frank
>
> Thanks
> Peter
>
> > I would have thought of implementing the clean up service
> as servlet filter
> > outside struts. Or doing the same within an interceptor.
> >
> > Are there any dependencies that would need the clean up
> service to be bound
> > to a session context?
> >
> > - Frank
> >
> >
> >
> >> -----Original Message-----
> >> From: peter.theissen@(protected)]
> >> Sent: Friday, April 11, 2008 2:25 PM
> >> To: Struts Users Mailing List
> >> Subject: Scheduled DB clean up service with Struts2
> >>
> >> Hello,
> >>
> >> I now searched a while to get an idea how to implement
> >> a DB clean up service with Struts2. The best link I found
> >> was the following one:
> >> following
> >> http://www.javabeat.net/javabeat/ejb3/articles/timer_services_
> >> api_in_ejb_3_0_2.php
> >>
> >> What I dont understand is how to get the session context.
> >> As described in the link Im using dependency injection:
> >> >>>
> >> @Resource
> >> Private SessionContext s;
> >> <<<
> >> but unfortunately that doesnt work. Eclipse says that it
> >> doesnt know the @Resource annotation.
> >> However, the ejb3-persistence.jar is integrated in the
> >> libs. Therefore, the annotation should be well known
> >> to Eclipse?
> >>
> >> What I also dont understand that - even when I got that
> >> stuff with that timer working - "who" starts the bean the
> >> first time? Do I have to reconfigure something?
> >> What happens if I restart the server?
> >>
> >> Another more general question is:
> >> is that the most suitable way to implement the
> >> DB clean up service, assuing that further services
> >> wont be added in the future (otherwise: scheduler as
> >> far from what I've read)?
> >>
> >> Thanks and best regards
> >> Peter
> >>
> >>
> >>
> >>
> >>
> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: user-unsubscribe@(protected)
> >> For additional commands, e-mail: user-help@(protected)
> >>
> >>
> >>
> >
> >
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@(protected)
> > For additional commands, e-mail: user-help@(protected)
> >
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>

Attachment:
user_185306.ezm (zipped)
> I doubt that this filter/interceptor approach to executing a task
> periodically would be a good idea:
>
> What if it is take too long? What happens to the current user request?
> What if it just time out?
Agree, you're right (btw, i meant context listener when i wrote filter -
sorry).
But still it depends on the job that has to be done and about the database
design. Think about a clean up job that takes quite a while and the main web
service needs to be suspended meanwhile. Then a Servlet Context Listener
could start the db maintenance while an intercepter could catch ever request
and send back a 503 during that maintenance window. But of course the main
job would then be done from the context listener (or any pojo service that
was injected using spring i.e.).
- Frank
>
> Typical periodic clean up tasks are better performed when nobody is
> using the system (or at least when the quantity of concurrent users in
> the system be at the absolute minimum), but since this is executed
> when somebody makes a request to the web app, there is no warranty
> that this task be executed at all.
>
> 2008/4/11, Frank Fischer <frank.fischer@(protected)>:
> >
> > I would have thought of implementing the clean up service
> as servlet filter
> > outside struts. Or doing the same within an interceptor.
> >
> > Are there any dependencies that would need the clean up
> service to be bound
> > to a session context?
> >
> > - Frank
> >
> >
> > > -----Original Message-----
> > > From: peter.theissen@(protected)]
> > > Sent: Friday, April 11, 2008 2:25 PM
> > > To: Struts Users Mailing List
> > > Subject: Scheduled DB clean up service with Struts2
> > >
> > > Hello,
> > >
> > > I now searched a while to get an idea how to implement
> > > a DB clean up service with Struts2. The best link I found
> > > was the following one:
> > > following
> > > http://www.javabeat.net/javabeat/ejb3/articles/timer_services_
> > > api_in_ejb_3_0_2.php
> > >
> > > What I dont understand is how to get the session context.
> > > As described in the link Im using dependency injection:
> > > >>>
> > > @Resource
> > > Private SessionContext s;
> > > <<<
> > > but unfortunately that doesnt work. Eclipse says that it
> > > doesnt know the @Resource annotation.
> > > However, the ejb3-persistence.jar is integrated in the
> > > libs. Therefore, the annotation should be well known
> > > to Eclipse?
> > >
> > > What I also dont understand that - even when I got that
> > > stuff with that timer working - "who" starts the bean the
> > > first time? Do I have to reconfigure something?
> > > What happens if I restart the server?
> > >
> > > Another more general question is:
> > > is that the most suitable way to implement the
> > > DB clean up service, assuing that further services
> > > wont be added in the future (otherwise: scheduler as
> > > far from what I've read)?
> > >
> > > Thanks and best regards
> > > Peter
> > >
> > >
> > >
> > >
> > >
> ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: user-unsubscribe@(protected)
> > > For additional commands, e-mail: user-help@(protected)
> > >
> > >
> >
> >
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@(protected)
> > For additional commands, e-mail: user-help@(protected)
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>

Attachment:
user_185310.ezm (zipped)Then I guess it would be a good excercice to refactor that database
access code into a DAO to decouple your actions from the DB.
2008/4/11, Peter Theissen <peter.theissen@(protected)>:
> No, no dependencies at all. It should just do
> the cleanup every day.
> However, I would like to use my certain action
> methods, since they already contain all the
> funtionalities for DB acces.
>
> Thanks
> Peter
>
>
> > I would have thought of implementing the clean up service as servlet
> filter
> > outside struts. Or doing the same within an interceptor.
> >
> > Are there any dependencies that would need the clean up service to be
> bound
> > to a session context?
> > - Frank
> >
> >
> >
> > > -----Original Message-----
> > > From: peter.theissen@(protected),
> April 11, 2008 2:25 PM
> > > To: Struts Users Mailing List
> > > Subject: Scheduled DB clean up service with Struts2
> > >
> > > Hello,
> > >
> > > I now searched a while to get an idea how to implement
> > > a DB clean up service with Struts2. The best link I found
> > > was the following one:
> > > following
> http://www.javabeat.net/javabeat/ejb3/articles/timer_services_
> > > api_in_ejb_3_0_2.php
> > >
> > > What I dont understand is how to get the session context.
> > > As described in the link Im using dependency injection:
> > > >>>
> > > @Resource
> > > Private SessionContext s;
> > > <<<
> > > but unfortunately that doesnt work. Eclipse says that it
> > > doesnt know the @Resource annotation.
> > > However, the ejb3-persistence.jar is integrated in the
> > > libs. Therefore, the annotation should be well known
> > > to Eclipse?
> > >
> > > What I also dont understand that - even when I got that
> > > stuff with that timer working - "who" starts the bean the
> > > first time? Do I have to reconfigure something?
> > > What happens if I restart the server?
> > >
> > > Another more general question is:
> > > is that the most suitable way to implement the
> > > DB clean up service, assuing that further services
> > > wont be added in the future (otherwise: scheduler as
> > > far from what I've read)?
> > >
> > > Thanks and best regards
> > > Peter
> > >
> > >
> > >
> > >
> > >
> ---------------------------------------------------------------------
> > > To unsubscribe, e-mail:
> user-unsubscribe@(protected)
> > > For additional commands, e-mail: user-help@(protected)
> > >
> > >
> > >
> > >
> >
> >
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> user-unsubscribe@(protected)
> > For additional commands, e-mail: user-help@(protected)
> >
> >
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>

Attachment:
user_185307.ezm (zipped)oh yes, yes, it would include those parameters in the request, but I'd
have to figure out some OGNL that would add actionErrors and fieldErrors
as parameters for the redirect, then if my Action-being-redirected-to
extends ActionSupport the setters should automatically be called.
I think this would be done often enough that it could be built into the
Result.
At this point, however, the default behavior of not doing
POST-redirect-GET for validation errors seems to work just fine for me.
So I think I'll only do POST-redirect-GET on successful POSTs which pass
validation.
Brad Cupit
Louisiana State University - UIS
-----Original Message-----
From: Guillaume Bilodeau [mailto:gbilodeau@(protected)]
Sent: Thursday, April 10, 2008 8:06 PM
To: user@(protected)
Subject: RE: interesting proxy + action chain issue
I'm not sure if I'm missing something here, but using the
ServletActionRedirectResult with parse=true and extra parameters does
include these parameters in the redirect URL.
The problem is that this mechanism is limited to string-based (or
string-parseable) parameters, so you're ruling out objects like an
ArrayList
that would contain error messages. That's where something like flash
scope
would be useful and is unfortunately lacking in 2.0.
Cheers,
GB
Brad A Cupit wrote:
>
> Hi Guillaume,
> yep, I'm familiar with the ServletActionRedirectResult, and I'm
> especially familiar with bug you mentioned (you and I both commented
on
> it, asking for a backport to 2.0.x...on that note, anyone with commit
> access want to backport
https://issues.apache.org/struts/browse/WW-2170
> and release 2.0.12? The patch is there and ready to go) :-)
>
> What I'm not sure how to do is to get the error messages into the
> redirect url, and it seems like something you'd want often enough for
it
> to be built-in to ServletActionRedirectResult (or a class which
extends
> it).
>
> Brad Cupit
> Louisiana State University - UIS
>
>
> -----Original Message-----
> From: Guillaume Bilodeau [mailto:gbilodeau@(protected)]
> Sent: Thursday, April 10, 2008 1:24 PM
> To: user@(protected)
> Subject: RE: interesting proxy + action chain issue
>
>
> Hi Brad,
>
> Have you tried this:
> http://www.vitarara.org/cms/struts_2_cookbook/post_and_redirect
>
> I've used this for a while with good results, although recently I've
> stumbled on WW-2170 ( https://issues.apache.org/struts/browse/WW-2170
).
> It
> seems to occur only when using annotations though.
>
> Cheers,
> GB
>
>
> Brad A Cupit wrote:
>>
>> The only problem with the scope plugin is that it will use the
> session,
>> which may break the whole notion of POST-redirect-GET: if the data in
>> the session is removed or replaced by later requests, then pressing
> the
>> back or refresh buttons on the initial page with errors will not
yield
>> the same response.
>>
>> I think it would be cool if the errors were url parameters as part of
>> the redirect, but there's currently no easy way to do this. Could a
>> custom interceptor realize that the result is a redirect and turn the
>> validation errors into url parameters? Or would this need to be a
> custom
>> result class (perhaps extending ServletRedirectResult or
>> ServletActionRedirectResult)?
>>
>> Brad Cupit
>> Louisiana State University - UIS
>>
>> -----Original Message-----
>> From: Jeromy Evans [mailto:jeromy.evans@(protected)]
>> Sent: Tuesday, April 08, 2008 6:24 PM
>> To: Struts Users Mailing List
>> Subject: Re: interesting proxy + action chain issue
>>
>> Ian Meikle wrote:
>>> HI,
>>>
>>> I have been following this post with interest since I used the PRG
>> pattern
>>> in previous projects.
>>> We are using struts 2 in are current project and I like the
>> errorMessages
>>> behaviour that is part of the Action.
>>>
>>> Is it possible to persist these over the PRG cycle ?
>>> By default I assume they would be lost when we get to the GET stage
>> since
>>> they are request scope and the GET is a seperate request than the
> POST
>>
>>> that caused the error.
>>>
>>>
>>
>> Hi Ian,
>> This is an issue that Struts2 needs to handle better. It can be done
>> but its not as straight-forward as it could be.
>>
>> The scope interceptor [1] provides this feature. It allows you to
>> specify which properties should be bound to session or application
> scope
>>
>> and injected into the action.
>> The scoped modeldriven interceptor is for modeldriven actions [2].
> Both
>>
>> are included in the default stack.
>>
>> The scope plugin allows annotations to specify which properties
> persist
>> over a cycle. It's not bundled with struts but I have heard good
>> comments about it [4].
>>
>> [1] http://cwiki.apache.org/WW/scope-interceptor.html
>> [2] http://cwiki.apache.org/WW/scoped-model-driven-interceptor.html
>> [3] http://cwiki.apache.org/S2PLUGINS/scope-plugin.html
>> [4] http://article.gmane.org/gmane.comp.jakarta.struts.devel/65052
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@(protected)
>> For additional commands, e-mail: user-help@(protected)
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@(protected)
>> For additional commands, e-mail: user-help@(protected)
>>
>>
>>
>
> --
> View this message in context:
>
http://www.nabble.com/interesting-proxy-%2B-action-chain-issue-tp1654447
> 2p16612701.html
> Sent from the Struts - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>
>
--
http://www.nabble.com/interesting-proxy-%2B-action-chain-issue-tp1654447
2p16623232.html
Sent from the Struts - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@(protected)
For additional commands, e-mail: user-help@(protected)

Attachment:
user_185309.ezm (zipped)I wonder if specifying HttpServletResponse.SC_FORBIDDEN would make a
difference because the HttpServletResponse has those constants and that is
in the method signature for the Action class.
Regards,
Randy Burgess
Sr. Web Applications Developer
Nuvox Communications
> From: ryan webb <webb.ryan1@(protected)>
> Reply-To: Struts Users Mailing List <user@(protected)>
> Date: Fri, 11 Apr 2008 11:20:35 +0800
> To: Struts Users Mailing List <user@(protected)>
> Cc: <gay.mendoza@(protected)>
> Subject: How do I make Tomcat send 403 Forbidden page to the client in jsp and
> in struts?
>
> I am having difficulty with authentication of user levels.
> I have to kinds of users "user" and "administrators".
>
> What we did in mySQL db is make a user table and in it, a "level" column is
> placed containing whether a user is "administrator" or not.
> there's no problem with this actually (I just wrote the situation and
> setup).
>
> *Now, I want the server to send a 403 response to non-administrative
> personnel accessing some secured places in our site.*
>
> How can I do this?(Or is this possible? I have no idea actually..)
>
> I have a userBean.java that contains all user informations from database.
> I made this in my execute method in Action class. (Something Like this)
>
> execute(response, request, form....){
>
> UserActionForm uaf = (UserActionForm) form;
>
> UserBean userbean = new UserBean();
>
> * if (userbean.getlevel().equals("user")){
> response.sendError(SC_FORBIDDEN);
> }
>
> * return mapping.findForward....("Sucess");
> }
>
> this code does not compile..sendError() expects int value. I tried
> sendError(403) but doesn't work.
>
> Any Help is Gladly Appreciated! =)
>
> God Bless!
This email and any attachments ("Message") may contain legally privileged and/or confidential information. If you are not the addressee, or if this Message has been addressed to you in error, you are not authorized to read, copy, or distribute it, and we ask that you please delete it (including all copies) and notify the sender by return email. Delivery of this Message to any person other than the intended recipient(s) shall not be deemed a waiver of confidentiality and/or a privilege.
This email and any attachments ("Message") may contain legally privileged and/or confidential information. If you are not the addressee, or if this Message has been addressed to you in error, you are not authorized to read, copy, or distribute it, and we ask that you please delete it (including all copies) and notify the sender by return email. Delivery of this Message to any person other than the intended recipient(s) shall not be deemed a waiver of confidentiality and/or a privilege.

Attachment:
user_185311.ezm (zipped)--- Chris Pat <cpanon@(protected):
> I have a reset() that generates a random number. However
> after the first page view the same number persists. How
> do I stop this caching by the server?
Assuming it's actually a caching issue, google for tomcat +caching.
This is a generic HTTP issue, not Struts: it's all about the headers.
Dave

Attachment:
user_185312.ezm (zipped)
Thank you all for your help. I think we have it resolved and it was indeed
the WLCookieName parameter (JSESSIONID) in the weblogic plugin that was set
incorrectly. This has led to heavy discussion however with regards to this
question:
Is it really a good idea to implement the SessionAware interface and use a
separate Hashmap to hold the user's session data? Would it not be perhaps
safer and more efficient (and reduce the possibility of clustered session
replication issues) to simply get the session yourself and set the
attributes directly into it? What benefit is there to making struts the
middleman and using a separate Hashmap? We are having this debate currently
at my co. and I am lacking a convincing reason to avoid dealing directly
with the session. THanks!
You can configure sticky sessions, which means that requests that go to one
server in your cluster will always go to that server. To me this defeats the
purpose of the cluster because if that machine goes down the user will be
sent to another server, but their session will be gone with the down server.
However this is the best performing configuration. Another option is shared
sessions and this is covered in the WebLogic documentation at
http://edocs.bea.com. How or if the session is shared in a cluster has
nothing to do with Struts or any web application really.
Regards,
Randy Burgess
Sr. Web Applications Developer
Nuvox Communications
--
Sent from the Struts - User mailing list archive at Nabble.com.

Attachment:
user_185313.ezm (zipped)>> Would it not be perhaps safer and more efficient (and reduce the
>> possibility of clustered session replication issues) to simply
>> get the session yourself and set the
>> attributes directly into it?
the Map passed in when you implement SessionAware is just a wrapper
around the real session. So any changes that you make to the Map are
immediately written out to the real session, so there shouldn't be any
problem with session replication. Though I must confess, I don't know
what you mean that the problem was with the JSESSIONID parameter.
>> What benefit is there to making struts the
>> middleman and using a separate Hashmap?
This decouples your action from the underlying servlets, while minimally
coupling you to Struts. As a result, your action is only tied to the
Map. This makes testing easier: just pass in a normal HashMap to the
setSession() method rather than a mock HttpSession. By decoupling like
this, your code is more of a POJO and less of a Struts-specific Action
(and certainly less tied to the Servlet spec), thus enabling the logic
to be used elsewhere, perhaps in a different project, or in the same
project but after moving to an alternative front-end framework.
Brad Cupit
Louisiana State University - UIS

Attachment:
user_185317.ezm (zipped)I suggest you have a look at the source code for the
org.apache.struts2.dispatcher.SessionMap, this is what gets injected to your
SessionAware action. As you'll see it's simply a class that implements the
java.util.Map interface and wraps a HttpSession. Calls to the get, put and
remove methods all impact the underlying session object. It's not a
separate HashMap.
Cheers,
GB
mojoRising wrote:
>
> Thank you all for your help. I think we have it resolved and it was indeed
> the WLCookieName parameter (JSESSIONID) in the weblogic plugin that was
> set incorrectly. This has led to heavy discussion however with regards to
> this question:
> Is it really a good idea to implement the SessionAware interface and use a
> separate Hashmap to hold the user's session data? Would it not be perhaps
> safer and more efficient (and reduce the possibility of clustered session
> replication issues) to simply get the session yourself and set the
> attributes directly into it? What benefit is there to making struts the
> middleman and using a separate Hashmap? We are having this debate
> currently at my co. and I am lacking a convincing reason to avoid dealing
> directly with the session. THanks!
>
>
>
--
Sent from the Struts - User mailing list archive at Nabble.com.

Attachment:
user_185320.ezm (zipped)Thank you very much. I found the source code and looked at it and now I
understand perfectly. I can't believe I missed all that info the SessionMap
object. So then once you have a sessionMap I assume that that the
sessionMap is the only thing you need for accessing the request, clearing
the session, and invalidating the session, right? Also, is the
serialVersionUID in fact the same thing as the sessionId?
Guillaume Bilodeau wrote:
>
> I suggest you have a look at the source code for the
>
org.apache.struts2.dispatcher.SessionMap, this is what gets injected to
> your SessionAware action. As you'll see it's simply a class that
> implements the
java.util.Map interface and wraps a HttpSession. Calls to
> the get, put and remove methods all impact the underlying session object.
> It's not a separate HashMap.
>
> Cheers,
> GB
>
>
--
Sent from the Struts - User mailing list archive at Nabble.com.

Attachment:
user_185321.ezm (zipped)The injected sessionMap is sufficient if all you need to do is get, set and
remove session attributes. For other things like invalidating the session,
you should implement ServletRequestAware and retrieve the session using the
injected HttpServletRequest.
As you can see from the source code, the sessionMap doesn't give you access
to the request.
The serialVersionUID has nothing to do with the session ID, it's for
standard Java serialization[1].
Cheers,
GB
[1] http://java.sun.com/j2se/1.5.0/docs/api/java/io/Serializable.html
http://java.sun.com/j2se/1.5.0/docs/api/java/io/Serializable.html
Thank you very much. I found the source code and looked at it and now I
understand perfectly. I can't believe I missed all that info the SessionMap
object. So then once you have a sessionMap I assume that that the
sessionMap is the only thing you need for accessing the request, clearing
the session, and invalidating the session, right? Also, is the
serialVersionUID in fact the same thing as the sessionId?
Guillaume Bilodeau wrote:
>
> I suggest you have a look at the source code for the
>
org.apache.struts2.dispatcher.SessionMap, this is what gets injected to
> your SessionAware action. As you'll see it's simply a class that
> implements the
java.util.Map interface and wraps a HttpSession. Calls to
> the get, put and remove methods all impact the underlying session object.
> It's not a separate HashMap.
>
> Cheers,
> GB
>
>
--
Sent from the Struts - User mailing list archive at Nabble.com.

Attachment:
user_185314.ezm (zipped)
You might want to read here:
http://struts.apache.org/2.x/docs/formatting-dates-and-numbers.html
Cheers,
Rene
akinss wrote:
>
> I'm trying to use a textfield tag for date input. I need to format this
> in
> the form dd/MM/yyyy HH:mm:ss
>
> The teaxtfield tag formats the date to a Locale based format
> DateFormat.SHORT via XWorkBasicConverter. For my locale this turns out
> to
> be dd/MM/yy. This is not the format I want.
>
> <s:textfield cssClass="field" key="filter.dateTimeStart"
> name="filter.dateTimeStart"/>
>
> DateTimePicker wont allow you to apply a style class to the input field so
> it wont format. Bug has been reported in Struts JIRA (WW-1778) and a fix
> made. Need to wait for Struts 2.1 before this will work so I can't use
> this.
>
> Using the value parameter and a date tag won't work because this
> overwrites
> the value entered. If the user enters a value that can't be converted to
> a
> date it isn't re-displayed, the field is displayed empty.
>
> <s:textfield cssClass="field" key="filter.dateTimeStart"
> name="filter.dateTimeStart">
> <s:param name="value">
> <s:date name="filter.dateTimeStart" format="dd/MM/yyyy HH:mm:ss" />
> </s:param>
> </s:textfield>
>
> In the S2 guide for Type Conversion (
> http://struts.apache.org/2.x/docs/type-conversion.html) it has a note
> saying
> not to use Type Conversion for dates.
>
> Does anyone know of a way to do this?
>
>
> Thanks in advance.
>
>
--
Sent from the Struts - User mailing list archive at Nabble.com.

Attachment:
user_185316.ezm (zipped)As a followup to my own posting: Sorry for not reading properly, of
course your problem does not really relate to output formatting.
Guillaume is right here IMO, for a fixed Date format a custom
TypeConverter should be the way to go, as long as the datepicker does
not work for you.
Regards,
Rene
Rene Gielen schrieb:
> You might want to read here:
> http://struts.apache.org/2.x/docs/formatting-dates-and-numbers.html
>
> Cheers,
> Rene
>
>
> akinss wrote:
>> I'm trying to use a textfield tag for date input. I need to format this
>> in
>> the form dd/MM/yyyy HH:mm:ss
>>
>> The teaxtfield tag formats the date to a Locale based format
>> DateFormat.SHORT via XWorkBasicConverter. For my locale this turns out
>> to
>> be dd/MM/yy. This is not the format I want.
>>
>> <s:textfield cssClass="field" key="filter.dateTimeStart"
>> name="filter.dateTimeStart"/>
>>
>> DateTimePicker wont allow you to apply a style class to the input field so
>> it wont format. Bug has been reported in Struts JIRA (WW-1778) and a fix
>> made. Need to wait for Struts 2.1 before this will work so I can't use
>> this.
>>
>> Using the value parameter and a date tag won't work because this
>> overwrites
>> the value entered. If the user enters a value that can't be converted to
>> a
>> date it isn't re-displayed, the field is displayed empty.
>>
>> <s:textfield cssClass="field" key="filter.dateTimeStart"
>> name="filter.dateTimeStart">
>> <s:param name="value">
>> <s:date name="filter.dateTimeStart" format="dd/MM/yyyy HH:mm:ss" />
>> </s:param>
>> </s:textfield>
>>
>> In the S2 guide for Type Conversion (
>> http://struts.apache.org/2.x/docs/type-conversion.html) it has a note
>> saying
>> not to use Type Conversion for dates.
>>
>> Does anyone know of a way to do this?
>>
>>
>> Thanks in advance.
>>
>>
>

Attachment:
user_185318.ezm (zipped)Is there a way to specify welcome page through struts-configration like when a request comes to my application can I redirect him to login.do ?
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com

Attachment:
user_185319.ezm (zipped)Hi All,
I tried Ajax fileupload program from below link,
http://www.struts2.org/ajax-file-upload-in-struts2-using-ajax-file-upload-plugin/#comment-100
When I tried to access, I'm getting below error message
FreeMarker template error!
Error on line 27, column 20 in template/simple/head.ftl
Expecting a string, date or number here, Expression parameters.debug?default(false) is instead a
freemarker.template.TemplateBooleanModel$1
The problematic instruction:
----------
==> ${parameters.debug?default(false)} [on line 27, column 18 in template/simple/head.ftl]
----------
Java backtrace for programmers:
----------
If anyone having code for doing AJAX fileupload with struts2 then please send to me.
Thanks in advance.
Regards,
Sharath.
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com

Attachment:
user_185330.ezm (zipped)I'm not familiar with that plugin, however it uses YUI and ajax file
uploads via YUI are really simple. If you take a moment to read this
page you'll understand it a little better:
http://developer.yahoo.com/yui/connection/
My guess from the error below is that you're missing the afile:head tag
and instead used the s:head tag
Otherwise there's a template conflict (two tags using the simple theme
head template), or the tag's is simply broken.
sharath karnati wrote:
> Hi All,
>
> I tried Ajax fileupload program from below link,
>
> http://www.struts2.org/ajax-file-upload-in-struts2-using-ajax-file-upload-plugin/#comment-100
>
> When I tried to access, I'm getting below error message
>
> FreeMarker template error!
>
> Error on line 27, column 20 in template/simple/head.ftl
> Expecting a string, date or number here, Expression parameters.debug?default(false) is instead a
freemarker.template.TemplateBooleanModel$1
> The problematic instruction:
> ----------
> ==> ${parameters.debug?default(false)} [on line 27, column 18 in template/simple/head.ftl]
> ----------
>
> Java backtrace for programmers:
> ----------
>
> If anyone having code for doing AJAX fileupload with struts2 then please send to me.
>
> Thanks in advance.
>
> Regards,
> Sharath.
>
>
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam? Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
>
> ------------------------------------------------------------------------
>
> No virus found in this incoming message.
> Checked by AVG.
> Version: 7.5.519 / Virus Database: 269.22.12/1372 - Release Date: 10/04/2008 5:36 PM
>

Attachment:
user_185322.ezm (zipped)Hi,
s:submit creates a row for a button. I have two buttons and two submit appears on two different row. How do I put them on the same row? Can anyone give an example?
Thanks,
-Akash
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com

Attachment:
user_185323.ezm (zipped)Hi Akash,
Put 'theme=simple' this will solve your problem.
--Sharath.
akash agrawal <akash_agrawal@(protected):
Hi,
s:submit creates a row for a button. I have two buttons and two submit appears on two different row. How do I put them on the same row? Can anyone give an example?
Thanks,
-Akash
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@(protected)
For additional commands, e-mail: user-help@(protected)
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com

Attachment:
user_185324.ezm (zipped)Edit your struts.xml to reflect the following:
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">
<struts>
<constant name="struts.ui.theme" value="simple" />
...
...
</struts>
The behavior should be more as you expect after that. You will lose things
like the label property on textfields though. In that case you just type it
outside like:
...
<tr>
<td>User ID:</td>
<td><s:textfield name="account.login" /></td>
</tr>
...
-----Original Message-----
From: akash agrawal [mailto:akash_agrawal@(protected)]
Sent: Friday, April 11, 2008 3:51 PM
To: user@(protected)
Subject: Two buttons on same row
Hi,
s:submit creates a row for a button. I have two buttons and two submit
appears on two different row. How do I put them on the same row? Can anyone
give an example?
Thanks,
-Akash
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@(protected)
For additional commands, e-mail: user-help@(protected)

Attachment:
user_185326.ezm (zipped)Hi Akash,
I think that is not a good idea just change the theme.. Doing that you're
gona lose some functionality.. Like validation, etc..
There's a way, overwriting the xhtml theme (I made this in a project, and
it's working).
Do the following steps:
1 - Unzip the struts 2 core jar;
2 - Copy template/xhtml and paste into your WebContent directory;
3 - Overwrite your "submit.ftl" with the code:
<#--
/*
* $Id: Action.java 502296 2007-02-01 17:33:39Z niallp $
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
-->
<#t/>
<#include "/${parameters.templateDir}/simple/submit.ftl" />
<#t/>
This also can help you:
http://struts.apache.org/2.0.11.1/docs/template-loading.html
You also, can make calls to diferent css classes for rendering labels, td's
etc.
Hope that help you!
2008/4/11, Michael Gagnon <mgagnon@(protected)>:
>
> Edit your struts.xml to reflect the following:
>
> <?xml version="1.0" encoding="UTF-8" ?>
> <!DOCTYPE struts PUBLIC
> "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
> "http://struts.apache.org/dtds/struts-2.0.dtd">
> <struts>
> <constant name="struts.ui.theme" value="simple" />
> ...
> ...
> </struts>
>
>
>
>
> The behavior should be more as you expect after that. You will lose things
> like the label property on textfields though. In that case you just type
> it
> outside like:
> ...
> <tr>
> <td>User ID:</td>
> <td><s:textfield name="account.login" /></td>
> </tr>
> ...
>
>
> -----Original Message-----
> From: akash agrawal [mailto:akash_agrawal@(protected)]
> Sent: Friday, April 11, 2008 3:51 PM
> To: user@(protected)
> Subject: Two buttons on same row
>
> Hi,
>
> s:submit creates a row for a button. I have two buttons and two submit
> appears on two different row. How do I put them on the same row? Can
> anyone
> give an example?
>
> Thanks,
>
> -Akash
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam? Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>

Attachment:
user_185328.ezm (zipped)Hi Marcio,
You are correct. Doing so will change the theme for the whole application. There is another way to just change the theme for specific buttons. (Check a previous reply to my question by Sharath)
eg:
<s:submit type="input" value="my button" name="submit" theme="simple" ></s:submit>
previous reply:
Hi Akash,
Put 'theme=simple' this will solve your problem.
--Sharath.
--- On Fri, 4/11/08, Márcio Gurgel <marcio.rga@(protected):
> From: Márcio Gurgel <marcio.rga@(protected)>
> Subject: Re: Two buttons on same row
> To: "Struts Users Mailing List" <user@(protected)>
> Date: Friday, April 11, 2008, 3:04 PM
> Hi Akash,
>
> I think that is not a good idea just change the theme..
> Doing that you're
> gona lose some functionality.. Like validation, etc..
> There's a way, overwriting the xhtml theme (I made this
> in a project, and
> it's working).
>
> Do the following steps:
>
> 1 - Unzip the struts 2 core jar;
> 2 - Copy template/xhtml and paste into your WebContent
> directory;
> 3 - Overwrite your "submit.ftl" with the code:
> <#--
> /*
> * $Id: Action.java 502296 2007-02-01 17:33:39Z niallp $
> *
> * Licensed to the Apache Software Foundation (ASF) under
> one
> * or more contributor license agreements. See the NOTICE
> file
> * distributed with this work for additional information
> * regarding copyright ownership. The ASF licenses this
> file
> * to you under the Apache License, Version 2.0 (the
> * "License"); you may not use this file except
> in compliance
> * with the License. You may obtain a copy of the License
> at
> *
> * http://www.apache.org/licenses/LICENSE-2.0
> *
> * Unless required by applicable law or agreed to in
> writing,
> * software distributed under the License is distributed on
> an
> * "AS IS" BASIS, WITHOUT WARRANTIES OR
> CONDITIONS OF ANY
> * KIND, either express or implied. See the License for
> the
> * specific language governing permissions and limitations
> * under the License.
> */
> -->
> <#t/>
> <#include
> "/${parameters.templateDir}/simple/submit.ftl"
> />
> <#t/>
>
> This also can help you:
> http://struts.apache.org/2.0.11.1/docs/template-loading.html
>
> You also, can make calls to diferent css classes for
> rendering labels, td's
> etc.
> Hope that help you!
>
>
>
>
> 2008/4/11, Michael Gagnon
> <mgagnon@(protected)>:
> >
> > Edit your struts.xml to reflect the following:
> >
> > <?xml version="1.0"
> encoding="UTF-8" ?>
> > <!DOCTYPE struts PUBLIC
> > "-//Apache Software Foundation//DTD Struts
> Configuration 2.0//EN"
> >
> "http://struts.apache.org/dtds/struts-2.0.dtd">
> > <struts>
> > <constant name="struts.ui.theme"
> value="simple" />
> > ...
> > ...
> > </struts>
> >
> >
> >
> >
> > The behavior should be more as you expect after that.
> You will lose things
> > like the label property on textfields though. In that
> case you just type
> > it
> > outside like:
> > ...
> > <tr>
> > <td>User ID:</td>
> > <td><s:textfield
> name="account.login" /></td>
> > </tr>
> > ...
> >
> >
> > -----Original Message-----
> > From: akash agrawal [mailto:akash_agrawal@(protected)]
> > Sent: Friday, April 11, 2008 3:51 PM
> > To: user@(protected)
> > Subject: Two buttons on same row
> >
> > Hi,
> >
> > s:submit creates a row for a button. I have two
> buttons and two submit
> > appears on two different row. How do I put them on the
> same row? Can
> > anyone
> > give an example?
> >
> > Thanks,
> >
> > -Akash
> >
> > __________________________________________________
> > Do You Yahoo!?
> > Tired of spam? Yahoo! Mail has the best spam
> protection around
> > http://mail.yahoo.com
> >
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> user-unsubscribe@(protected)
> > For additional commands, e-mail:
> user-help@(protected)
> >
> >
> >
> >
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> user-unsubscribe@(protected)
> > For additional commands, e-mail:
> user-help@(protected)
> >
> >
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com

Attachment:
user_185325.ezm (zipped)
Hello,
I'm trying to use the key attribute in the s:textfield tag to display a
label from my resource bundle. I have a single application resource bundle
that I am able to access with the s:text tag, so I know the resource bundle
is working. However, when I use the key attribute, I just get an empty
string as the label.
This works:
<s:text name="user.firstname"/>
This doesn't display the label:
<s:textfield key="user.firstname" name="..."/>
Does anyone have any ideas?
Thanks!
Kelly
--
Sent from the Struts - User mailing list archive at Nabble.com.

Attachment:
user_185327.ezm (zipped)
*sigh*
I confused the s:form method attribute and used it to specify the method to
call on the action, not the HTTP form submit method. Everything's working
now. Definitely not my brightest moment.
Thanks a bunch,
GB
Laurie Harper wrote:
>
> Guillaume Bilodeau wrote:
>> Hi guys,
>>
>> I'm using Struts 2.0.11 for a standard web application and using
>> annotations
>> all the way. I have the following action, with some fields and getters /
>> setters omitted for brevity:
>>
>> @ParentPackage("default")
>> @Results( {
>> @Result(name = "input", type = ServletDispatcherResult.class, value =
>> "/views/users/changePassword.jsp"),
>> @Result(type = ServletActionRedirectResult.class, value = "workbench",
>> params = {
>> "namespace", "/workbench", "parse", "true", "actionMessageKey",
>> "${actionMessageKey}" }) })
>> @Validation
>> public class ChangePasswordAction extends ActionSupport {
>> @Override
>> @Validations(requiredStrings = {
>> @RequiredStringValidator(fieldName = "currentPassword", message = "",
>> key
>> = "users.changePassword.currentPassword.invalid"),
>> @RequiredStringValidator(fieldName = "newPassword1", message = "", key
>> =
>> "users.changePassword.newPassword.invalid"),
>> @RequiredStringValidator(fieldName = "newPassword2", message = "", key
>> =
>> "users.changePassword.newPassword.invalid") }, expressions = {
>> @ExpressionValidator(expression = "newPassword1.equals(newPassword2)",
>> message = "", key = "users.changePassword.mismatch") })
>> public String execute() {
>> String result = Action.INPUT;
>>
>> try {
>> userService.changeUserPassword(getUser().getId(), currentPassword,
>> newPassword1);
>> result = Action.SUCCESS;
>> }
>> catch (InvalidPasswordException e) {
>>
>> addActionError(getText("users.changePassword.currentPassword.invalid"));
>> }
>>
>> return result;
>> }
>> }
>>
>> The accompanying JSP, changePassword.jsp, contains a simple form with 3
>> fields (current, new, confirm new password) and a submit button.
>>
>> When leaving all form fields and submitting the form, the validation
>> interceptor correctly executes, correctly identifies all validation
>> errors
>> and correctly executes the input result. The rendered page correctly
>> shows
>> the correct form with all expected error messages next to the
>> corresponding
>> fields. Basically, the whole request handling works as expected.
>> However,
>> the browser's address bar now shows the following:
>>
>> http://localhost:8080/healthcheck/users/changePassword.go?currentPassword=&newPassword1=&newPassword2=&general.submit=Submit
>>
>> The URL contains all failed parameters with their values in clear text,
>> which is something I don't want. The behavior is the same when using an
>> empty result type for the input result.
>>
>> 1. Is there a way not to see these parameters in the final URL?
>> 2. I don't see why these parameters need to be added to the URL when they
>> are clearly accessible to the JSP using the value stack. Surely there
>> must
>> be a good reason to this?
>
>
> That's basic HTML/HTTP. You need to change your form to submit using the
> POST method instead of GET. See the 'method' attribute of s:form.
>
> L.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>
>
--
Sent from the Struts - User mailing list archive at Nabble.com.

Attachment:
user_185329.ezm (zipped)Hi,
I am looking at the example provided on this link:
http://struts.apache.org/2.x/docs/annotationworkflowinterceptor.html
I couldn't find annotationWorkflow in my struts-default.xml
<interceptor-ref name="annotationWorkflow"/>
I get an error from framework:
2008-04-11 18:04:58.817 ERROR [StandardContext 3638]: Exception starting filter struts2
Unable to find interceptor class referenced by ref-name annotationWorkflow - interceptor-ref - file:/C:/apache-tomcat-5.5.20/webapps/pm/WEB-INF/classes/struts.xml:32:49
at
com.opensymphony.xwork2.config.providers.InterceptorBuilder.constructInterceptorReference (
InterceptorBuilder.java:50)
Any ideas?
____________________________________________________________________________________
Be a better friend, newshound, and
know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ

Attachment:
user_185331.ezm (zipped)Hi all!
I got this error: ReferenceError: validateForm_frmExcl is not defined when
a form to be validated is inside a <sx:tabbedPanel> <sx:div>
I read some solutions that Musashi and Jeromy wrote about this, but I still
getting the error..
Includding that there's a new attribute (separateScripts) into struts 2.1
dojo tags to resolve this.
I tried to put this attribute and executeScripts="true" inside all related
dojo tags, but the error persists.
Here's some screens:
Page with a list:
http://s291.photobucket.com/albums/ll311/marciorga/?action=view¤t=sistema2-1.png
Same page with error:
http://s291.photobucket.com/albums/ll311/marciorga/?action=view¤t=sistema3.png
By the way... Is that possible to take out this blue/purple border from
TabbedPanel?
I changed the templateCssPath but it doesn't changed the border.
Tanks so much!

Attachment:
user_185332.ezm (zipped)mraible wrote:
> Following up months later as this has come up again now that 2.1 is close to
> release. The current version does log messages for invalid properties, but
> it doesn't blow up for invalid properties which is more of what I'm looking
> for.
>
>
Hi Matt,
I'm not convinced that you really want what you say you want.
Sure, if you use:
<s:property name="prop"/>
You want to see a message in the log stating that the property didn't
exist. Fair enough.
However, if you use:
<s:property name="prop" default="a"/>
Then I presume you don't want a message in the log if property didn't
exist. But OGNL doesn't know about the default attribute.
Similarly in FTL if you used:
${parameters.nameValue}?default("a")
You wouldn't want a warning from the framework if nameValue doesn't
exist because freemarker will handle that if you don't provide a default.
Quite clearly, when setting a property it's the framework's
responsibility to report if the property didn't exist.
But whose responsibility is it to report that an attempt to read a
property was made but the property didn't exist. I'm sure many
algorithms depending on silent failure so they can provide a default.
My opinion is that it's best handled in the view and FTL has the best
implementation of this (particularly in 2.4.x where there's improved
handling for nulls and blanks).
> When I blogged about this[1], one of the responses was the following:
>
>
>
>
>> When you are using freemarker as your result technology in struts2 you get
>> great feedback on problems like this. This is not indicative of the whole
>> framework -- just the result-type that you are using (probably jsp?)
>>
>>
>
> I tried FreeMarker this morning and discovered that the problem exists there
> too. Grrr. I've experienced Struts 2 being eliminated as a web framework
> candidate on a couple projects because of this. Kindof annoying.
>
>
So what do you really want? My guess here is that you invoked a struts
tag and the tag swallowed the error and provided a default to the
freemarker template.