Menu

#218 ServletUtils

open
nobody
2
2007-06-26
2007-01-09
Anonymous
No

Currently, when I want to convert a ServletRequest or a ServletConfig to a PropertyReader instance, then the returned instance is unmodifiable.

I would like to be able to modify it, so I can remove, add or modify key-value pairs. It's currently quite a hassle to do this, since I have to copy it into a BasicPropertyReader (for example) and then I can modify it.

Suggested solution:
- Have a ServletUtils class in org.xins.common.servlet.
- Add a method: toProperties(ServletConfig)
- Add a method: toProperties(ServletRequest)
- Make both methods return a BasicPropertyReader

Let me know if you like it and want me to implement it.

Discussion

  • Nobody/Anonymous

    Logged In: NO

    That was from me (Ernst). SourceForge login system is behaving awkward, logging me out all the time...

     
  • Anthony Goubard

    Anthony Goubard - 2007-01-24

    Logged In: YES
    user_id=987589
    Originator: NO

    Yes, I had a previous team leader who thought that every objects passed to the user should be immutable. So we have in XINS immutable request and result objects, immutable lists, XML elements and PropertyReader everywhere.

     
  • Anthony Goubard

    Anthony Goubard - 2007-06-26
    • priority: 5 --> 2
     
  • Ernst de Haan

    Ernst de Haan - 2008-03-28

    Logged In: YES
    user_id=11053
    Originator: NO

    I've got a partial implementation in our Subversion repository.

     

Log in to post a comment.