2 Answers
2

Is SessionConfig exposed as a bean in your JSP (as part of request / session / Struts Form)?

If it's not, you can expose it. And if it's a static class containing global settings (which, by the looks of it, is a possibility), you can create a small wrapper and put it in the servlet context which you'd then be able to access from Struts tags as scope="application".
Once that's done you can check your condition via Struts tags:

currently, instead of sessionConfig is use MyFormIncludingConfigParameters In the DynaForm I also have a property adminMode It works, although the concepts are still a bit cloudy (what scope="application" means, how I coud trigger a non-DynaForm class)
–
poseidSep 21 '09 at 13:51

scope="application" means Struts would look for a bean in ServletContext. It's a part of J2EE spec, you can read about it in Sun's tutorial. For non-DynaForm class, it either has to be defined as form in struts config (it will then automatically be bound to request or session as specified) or you have to manually bind it to request in your action; you can then use the above code replacing 'sessionConfig' with attribute name you've bound it to.
–
ChssPly76Sep 21 '09 at 16:13

Without more information, it's hard to answer this, but I'd think instead of separate views: one for admin mode, one for normal mode. Extracting the parts of your pages into tiles will help you do this without a lot of pain; see: http://tiles.apache.org/