Hi,

I am attempting to put together a standard run-of-the-mill 
membership-based webapp utilizing Struts/Tiles on tomcat+jboss adhering 
to accepted Model2 design pattern. The site will be acting as a kind of 
portal for both supplier and customer so I am looking to incorporate 
seperating views based on who the user is. (e.g. only a user in the 
supplier group will see links to advert placement functionality).

I have just recently been looking at Tiles and how it can be used to 
assemble the view of the webapp. All this stuff seems to have a lot of 
potential to gel together but I'm not quite there yet so I will try to 
ask as concise a question as possible without confusing myself!.

What is a good way to approach seperating jsp pages from each other 
based on a) functionality and b) user authorization, within struts and 
tiles?

In other words: Is it a good idea to maintain an inheritance tree of 
tiles definitions (xml) and then to maintain a seperate directory tree 
of implementation jsp pages for each user group? This would mean 
possibly that at some point a jsp file would contain tags like 
<logic:present role="Customer"> to distinguish between users and forward 
or include content which had been duplicated (into seperate 
'user-template' directories) but tailored for each user group which was 
allowed access to that piece of functionality?

I can see that in terms of functionality that the action mapping's 
forward must know which page to select based on functionality. Should 
the Action servlet select a particular forward based on who the user is 
too or should this be left to the utilization of tags in the jsp 
pages/templates?

One of the resources (the struts design tips catalog) mentions that the 
view should be pretty but stupid. What bearing does this have on the 
above questions?

Thanks
Joe


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to