apache struts question?


Web tier: servlets, JSP, Web frameworks: apache struts question?

  1. apache struts question? (3 messages)

    I am using the struts/tiles+websphere4 development project.I have a question.If I have changed the tiles+defs.xml and struts-config.xml to fit my requirement. but I must to restart the websphere4 server. the changes to work good. But I hope don't restart the websphere4 server may the changes to work . please tell me how to do it .

    Threaded Messages (3)

  2. apache struts question?[ Go to top ]

    To my knowledge, it's not possible for a Struts application to pick up on the changes automatically. This used to be possible in earlier versions of the framework (1.0.X) by using the reload action. However, since 1.1 beta releases, this action has been removed and it's not longer natively supported. I have created some custom functionality that allowed an application to support this feature, but it's not something that you get out of the box with Struts 1.1.

    Just some thoughts if you're thinking about doing something like this on your own:

    1) Create a timer thread and wakes up every so often (make it configurable) and that checks the lastmodifieddate on the files.

    2) If anything changed, block all incoming requests and re-initialize the entire application. This is the tricky part since Struts 1.1 supports multiple config files, tiles defs, validator defs and so on.

    3) Allow requests to start flowing again.

    It's definitely not trivial, but it is possible. You also might think about just using the containers support for redeploying the WAR file. Of course, this is much more cumbersome but more in-line with standard J2EE practices.

  3. apache struts question?[ Go to top ]

    You also might think about just using the containers support for redeploying the WAR file.
    can I use the method to debug the structs propertiest files load ?

    this problem is debug jsp page define and resource view problem in development term. if application developed and deploy to server. no the problem.
  4. Code[ Go to top ]

    Hey Chuck,
    I tried a lot to make this working. Is it possible to get your sample code to reload the config file?

    Or do you have struts 1.0 source code, I tried to find it, but couldn't get it.