Tiles and Struts problem

Discussion in 'Java' started by Giox, Oct 28, 2006.

  1. Giox

    Giox Guest

    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
    Giox, Oct 28, 2006
    #1
    1. Advertising

  2. Giox wrote:
    > 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
    Wouter Beheydt, Oct 29, 2006
    #2
    1. Advertising

  3. Giox

    Giox Guest

    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:

    > Giox wrote:
    > > 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
    Giox, Oct 30, 2006
    #3
  4. Giox wrote:
    > 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
    Wouter Beheydt, Oct 30, 2006
    #4
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Rich M
    Replies:
    0
    Views:
    2,049
    Rich M
    Mar 5, 2004
  2. Gurudev
    Replies:
    1
    Views:
    3,247
    Gurudev
    Dec 3, 2004
  3. Thomas Lutz
    Replies:
    3
    Views:
    5,148
    SreejithS
    Feb 29, 2012
  4. Replies:
    7
    Views:
    25,950
    dagger007
    Mar 24, 2008
  5. Joshua
    Replies:
    2
    Views:
    395
    Joshua
    Dec 15, 2005
Loading...

Share This Page