• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

FrontController and Command Pattern together

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am currently developing a web application and trying to implement FrontController design pattern. FrontController delegates incoming requests to a RequestHelper, the helper intern creates a command based on the url-pattern. The command executes and returns the next view. My problem is When the command executes it gets a list of items for view, the client selects one of the items for further processing. When the user selects an item it generates a new command based on the url-pattern and the list is no more accessible. How to keep the list even after executing a new command. I dont want to use a "HttpSession" or "ServletContext". Is there any alternative or a pattern for preserving the list for feature. Please help me.
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

phani sajja wrote:I dont want to use a "HttpSession" or "ServletContext"


Why not? That's what they're for.

That's like saying "I don't want to use a hammer to bang in a nail".
 
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hopefully the OP just meant they don't want to use it directly? In which case give an attribute map to the controller and/or command.
 
Bear Bibeault
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm hoping so. So many times in these forums we've seen the admonition to use the session wisely twisted into "Don't use the session!".
reply
    Bookmark Topic Watch Topic
  • New Topic