Tiles and Struts problem

G

Giox

Hello everybody, I'm a newbye in JSP and I need some helps.
As exercise I'm trying to implement a simple portal with two different
kind of user (admin and normal one) and depending to which one access
the system I show different pages.
In order to avoid security lack (this is simply training for me, so if
this is wrong please let me know) I placed the registration page in the
more external level, while other pages can be accessed only through the
findForward action of Action Form because they are stored in WEB-INF
folder.
At present time I'm starting Tiles, and I decided to implement a menu
tile to allow the user to access pages that resides in its "profile".
However I cannot use html:link because the pages reside in the limited
access zone. How can I perform this action? I'm not able to understand
how to create this menu, but I see on the web many application with
such a structure. Is there some simply way or I have to move the
reserved pages out of WEB-INF and to control access to them through
session attributes?
Any help will be appreciated
 
W

Wouter Beheydt

Giox said:
Hello everybody, I'm a newbye in JSP and I need some helps.
As exercise I'm trying to implement a simple portal with two different
kind of user (admin and normal one) and depending to which one access
the system I show different pages.
In order to avoid security lack (this is simply training for me, so if
this is wrong please let me know) I placed the registration page in the
more external level, while other pages can be accessed only through the
findForward action of Action Form because they are stored in WEB-INF
folder.
At present time I'm starting Tiles, and I decided to implement a menu
tile to allow the user to access pages that resides in its "profile".
However I cannot use html:link because the pages reside in the limited
access zone. How can I perform this action? I'm not able to understand
how to create this menu, but I see on the web many application with
such a structure. Is there some simply way or I have to move the
reserved pages out of WEB-INF and to control access to them through
session attributes?
Any help will be appreciated

I think you can call a struts action from the html:link tag. In the
action you do what you want. If no more processing is needed, just
forward to the intended page.

Something like this :
<html:link styleClass="menu" page="/your_action.do">

Wouter
 
G

Giox

Well, I have to improve my knowledge, but I would like to call a tile
window, that contains a menu and a main page.
I will try to act as you suggested.
Gio


Wouter Beheydt ha scritto:
 
W

Wouter Beheydt

Giox said:
Well, I have to improve my knowledge, but I would like to call a tile
window, that contains a menu and a main page.
I will try to act as you suggested.
Gio

Giovanni,

That should be no problem. From a struts action you can forward to
anything you like : a page, another action or a tiles layout.
If you don't succeed, please mail me privately (I don't think this
interests everybody here) and I'll send you a set of files as an
example. I don't pretend to have perfect applications but they work ...

Wouter
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,534
Members
45,008
Latest member
Rahul737

Latest Threads

Top