Help coderanch get a
new server
by contributing to the fundraiser
  • 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
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Carey Brown
  • Mikalai Zaikin
Bartenders:
  • Lou Hamers
  • Piet Souris
  • Frits Walraven

Delete html:errors listing

 
Ranch Hand
Posts: 91
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
How do i remove the errors? After i list the errors on the page i want to reset the html:errors. I assumed it was being stored in the request attribute, but after i clear that (and i see that it goes away) i still see the errors listed.. and every refresh causes the same exception being written out.

here is my current code.


since i'm catching the error and passing it along, the original time i should see this for example.
You do not have the appropriate privileges to perform this action

but if i refresh the page say 3 more times, i see
You do not have the appropriate privileges to perform this action
You do not have the appropriate privileges to perform this action
You do not have the appropriate privileges to perform this action
You do not have the appropriate privileges to perform this action

How do i fix this?

Thanks
 
Joshua Elkino
Ranch Hand
Posts: 91
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I guess i should also mention i'm doing forwarding to that page. (account.jsp)

I mention this because if i do a new direct request to that same page (account.jsp), all the messages are gone. But if i call the link (doadminstuff.jsp) that causes the request processor to check for privileges and then forwards to that page and adds an error, i get all those errors. EVEN when i log out and invalidate and log back in.

I wouldn't think this is cached since the # of errors always increases.

here is the request processor code
 
Ranch Hand
Posts: 349
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Do you have code to re-initialize the errors object in your request processor everytime it gets called? I think request processors only have a single instance so that errors object may be getting re-used everytime if its a class level variable.
 
Joshua Elkino
Ranch Hand
Posts: 91
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yup doing a errors.clear() right before adding the errors worked! Thanks.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic