• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

Reusable but not visible to client components with Struts and Tiles?

 
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello.

I cannot understand how to implement the following. Suppose I want to make a tile that shows weather. I write a struts action for fetching the weather.
Then if I write something like



my weather tile will be inserted into the web page. But at the same moment if a client types in her browser:



It will also show the tile as html in her browser. But I do not want my clients to know what components do I have in my system. I want my components to be available only if I do



How can I achieve this? Please, I trying to understand but I fail all the time.

Thanks.
 
Ranch Hand
Posts: 456
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
well, tiles is to assemble your jsp fragments. it's not meant to be used to secure access.

should you want to avoid that users enter an action path directly, you need to secure the actions (typically with a mandatory login)

hope this helps,
jan
 
Grigory O. Ptashko
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Jan,

I am asking about how to move some actions from users at all. It doesn't matter whether a user is registered or not. Just as like you move jsp pages to WEB-INF/jsp to prevent direct client's access to them.

I want to use some actions only from my jsp. Did you get the point?

Thanks.
 
Jan Groth
Ranch Hand
Posts: 456
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
yes, i think i got the point.

to my best knowledge, this is not possible unless you provide some mechanics that enable the action to distinguish / recognize its invoker.

a fairly easy approach would be to write an object into the session and let the action check its existence. if you don't want to call this a login, we can also name it foobar or so :-)

of course this can be done implicitly.

cheers,
jan
 
Montana has cold dark nights. Perfect for the heat from incandescent light. Tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic