• 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

controlling the actions to be called

 
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all ,

i have around 50 actions in my web appliation.if application starts from the index page everything is working fine. if i enter the url like http://local;ahost:8888/app/joinstep2.do in browser i am getting the probem ,because it is mandatory that http://local;ahost:8888/app/joinstep1.do should execute before join step2

please help me to handle this type of situations.if user enters any url like above it shuld redirect to login page

Any Help is appreciated

Thanks
RvRao
 
Ranch Hand
Posts: 2187
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

i have around 50 actions in my web appliation.if application starts from the index page everything is working fine. if i enter the url like http://local;ahost:8888/app/joinstep2.do in browser i am getting the probem ,because it is mandatory that http://local;ahost:8888/app/joinstep1.do should execute before join step2



Users should not have any idea what those URLs are. Users should only know about the View (HTML/JSP pages).

You can write code in the joinstep2 Action class that will check to see if joinstep1 Action has executed. If not, send the browser an error page or some other page that states they nees to do whatever joinstep1 requires.

Also, the first word in English sentences is capitalized. And the word 'I' is always capitalized.
[ September 22, 2008: Message edited by: James Clark ]
 
Ranch Hand
Posts: 245
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


if user enters any url like above it shuld redirect to login page


If you mean any url, then probably you would like to write a filter in web.xml.
However, since the 2 URLs that you gave look like they are step 1 and then step 2 towards a particular goal (and therefore not a generic requirement for all the action mappings in you application), you can implement a more localized solution in step 2 : like checking for some value in the session that is set by step 1.If it is there, then go ahead, otherwise present the login page.
reply
    Bookmark Topic Watch Topic
  • New Topic