2017-12-08 2:06 GMT+01:00 albert kao <albertk...@gmail.com>:
> I am looking for an example that SessionMap should be used instead of Map.
>
> In the Struts 2 Getting Started HTTP Session tutorial (
> https://struts.apache.org/getting-started/http-session.html),
> HelloWorldAction.java used
> private Map<String, Object> userSession;
>
> I used SessionMap to replace Map.
> i.e.
> private SessionMap<String, Object> userSession;
>
> I got the same result after I compiled & executed the modified program, so
> this is not an example to show the difference between SessionMap and Map.

The short answer is: you should not use SessionMap and stick with Map

This an internal implementation that can change at any time and you
shouldn't depend on any concrete implementation but just use the
interface - this is safer.


Regards
-- 
Ɓukasz
+ 48 606 323 122 http://www.lenart.org.pl/

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org

Reply via email to