• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Changing deployment variable values through UI at runtime

 
Roshan Khandelwal
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi ,

Application Overview :
  • The application uses a Configuration file , to decide on the paths to search for files on the server .
  • The Welcome page displays this information on the client side , allowing the user to change / edit or simply confirm the values .

  • For most of the times , it would be a simple confirm , but the edit and save options have been provided to be able to change these paths .

    Now these values are read and set in a "ConfigObject - simply getters and setters" at servlet startup [ init method ] , kind of global variable . and this object is available to all requests .

    There are two save options , that i intend to provide :

    a) Edit the values for this session / user only . So the User say changes a particular value and now the modified value is used for him .
    b) Edit the values permanently : So say the path on the server changed . A normal way would be to change the values in the configuration file and then redeploy the application .
    I want to ask , is it possible to change the values of a global variable at runtime and still it gets reflected for all new requests , without starting the server .
     
    Bear Bibeault
    Author and ninkuma
    Marshal
    Pie
    Posts: 65229
    95
    IntelliJ IDE Java jQuery Mac Mac OS X
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Sure, if it's common to all, just store it in application scope.
     
    Roshan Khandelwal
    Ranch Hand
    Posts: 35
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    I will try this out and update ..!!

    Thanks for replying .
     
    • Post Reply
    • Bookmark Topic Watch Topic
    • New Topic