| |

VerySource

 Forgot password?
 Register
Search
View: 1199|Reply: 11

Can struts-config.xml be modified without restarting tomcat?

[Copy link]

1

Threads

4

Posts

4.00

Credits

Newbie

Rank: 1

Credits
4.00

 China

Post time: 2020-3-5 13:30:01
| Show all posts |Read mode
After searching, I can say that I can say that I can't. I don't see any way to do this. I hope I can understand the instructions. If you can, please tell me the specific way. Thank you!
Reply

Use magic Report

0

Threads

63

Posts

42.00

Credits

Newbie

Rank: 1

Credits
42.00

 China

Post time: 2020-5-20 11:45:01
| Show all posts
can

Set <context> can be in Tomcat\conf\server.xml, or under Tomcat\conf\Catalina\localhost, build a xxxx.xml (xxx is your context path)

<Context
docBase = "$ {catalina.home} / webapps / xxxx"
path = "xxxx"
reloadable = "true">
....

<WatchedResource> WEB-INF / struts-config.xml </ WatchedResource>
....
</ Context>
Reply

Use magic Report

0

Threads

63

Posts

42.00

Credits

Newbie

Rank: 1

Credits
42.00

 China

Post time: 2020-5-20 13:15:01
| Show all posts
If your xxx / WEB-INF / struts-config.xml changes, your xxx application will reload
Reply

Use magic Report

0

Threads

5

Posts

6.00

Credits

Newbie

Rank: 1

Credits
6.00

 China

Post time: 2020-5-20 21:45:01
| Show all posts
Add a space in WEB-INF / web.xml and save it, ok!
Reply

Use magic Report

0

Threads

63

Posts

42.00

Credits

Newbie

Rank: 1

Credits
42.00

 Norway

Post time: 2020-5-21 00:45:01
| Show all posts
> Just add a space in WEB-INF / web.xml and save it, ok!

That happens to be because there is a default Context configuration in Tomcat\conf\context.xml

<!-The contents of this file will be loaded for each web application->
<Context>

    <!-Default set of monitored resources->
    <WatchedResource> WEB-INF / web.xml </ WatchedResource>
The
    <!-Uncomment this to disable session persistence across Tomcat restarts->
    <!-
    <Manager pathname = "" />
    ->

</ Context>
Reply

Use magic Report

0

Threads

1

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

Post time: 2020-5-26 17:00:01
| Show all posts
I have to mark this, before modifying the struts-config configuration file, I have to always restart
Reply

Use magic Report

1

Threads

4

Posts

4.00

Credits

Newbie

Rank: 1

Credits
4.00

 China

 Author| Post time: 2020-5-28 08:00:01
| Show all posts
I am dizzy, in server.xml
<Host name = "localhost" appBase = "webapps"
       unpackWARs = "true" autoDeploy = "true"
       xmlValidation = "false" xmlNamespaceAware = "false">
   <Context docBase = "$ {catalina.home} / webapps / test" path = "test" reloadable = "true">
<WatchedResource> WEB-INF / struts-config.xml </ WatchedResource>
   </ Context>
</ Host>
Is this wrong? Start tomcat and report
Parsing error processing resource path /WEB-INF/struts-config.xml
java.io.FileNotFoundException
The strangest thing is that no matter what I change struts-config.xml to, this file is reported wrong
Hell
Reply

Use magic Report

0

Threads

63

Posts

42.00

Credits

Newbie

Rank: 1

Credits
42.00

 China

Post time: 2020-5-28 16:45:01
| Show all posts
Are you test directory
Reply

Use magic Report

1

Threads

4

Posts

4.00

Credits

Newbie

Rank: 1

Credits
4.00

 China

 Author| Post time: 2020-5-29 09:30:01
| Show all posts
The project name is test
Reply

Use magic Report

0

Threads

63

Posts

42.00

Credits

Newbie

Rank: 1

Credits
42.00

 China

Post time: 2020-5-29 14:15:01
| Show all posts
What is the project name and ask you if it is the tomcat\webapps\test directory
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list