• 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
  • paul wheaton
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

Book marking pages problem

 
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Given that a user maybe stupid enough to book mark a jsp page that's midway through a business process, should I be writing code to handle this kind of thing.

Actually in my instance the user would be book marking a '.do'. Obviously they'll arrive at the action and that action is going to start throwing RuntimeExceptions because everyting that it expects to see in the request, session, application etc won't be there.

What's the general approach to this kind of thing? Use ExceptionHandler and forward to a standard error page
 
Ranch Hand
Posts: 415
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi

can u be a bit elaborate on what u r saying
 
Simon Good
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
A user is using website 'X' that incorporates a number of pages that go into making up a complete business process. There is a dependancy upon, for example, page 'C' in as much as page 'A' and 'B' must have been completed. The user for some reason decides to put page C into their favourites. They complete the business process and go and away. At some point in the future they look in their favourites and choose to go to page 'C' of web site 'X'. Now obviously everything will fall a part when the request is made because they've jumped into the middle of a business process. So how does one get round this kind of thing?

I'm using struts so the user is actually booking marking a url that looks like http://www.mydomain/mywebapp/pageC.do. As soon as the user requests this URL there will be a load of RuntimeExceptions that occur because the information that should be in the session, application won't be there.

Are ExceptionHandlers of any use?

If I were using a security model this problem wouldn't exist since they wouldn't have authenticated and they'd be kicked out by the app server, but I'm not, so it does!

Hope that makes sense
 
sreenath reddy
Ranch Hand
Posts: 415
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
see it is ur duty to handle that ...because in ur application action class u need to check for the attributes and should handle the scenarios like they are being null r not and even there might be some data coming for that request .so its always better to handle these things

r else u can write a global exception handler in oredr to over come the above scenarios but what happens is this will become so general .....................if u have suff time its betteru handle all the exc in ur action class itself
 
Villains always have antidotes. They're funny that way. Here's an antidote disguised as a tiny ad:
Clean our rivers and oceans from home
https://www.kickstarter.com/projects/paulwheaton/willow-feeders
reply
    Bookmark Topic Watch Topic
  • New Topic