ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
1. Tomcat manager uses a cookie to store a session, so you need to use 2 curl commands with a cookie jar - one to login and get the session cookie and one to do the reload (using the cookie you got in the first call).
2. You should use the exact same url in your curl as is used in the browser.
yes, but you need to do the 2 curl commands in sequence, either one of the cron jobs could fire first. If the reload fires first - it wont have the session cookie, or it will be an old one if the file still hanging around.
So i would put them in a shell script and call that from the crontab file.
<body>
<h1>403 Access Denied</h1>
<p>
You are not authorized to view this page.
</p>
<p>
If you have already configured the Manager application to allow access and
you have used your browsers back button, used a saved book-mark or similar
then you may have triggered the cross-site request forgery (CSRF) protection
that has been enabled for the HTML interface of the Manager application. You
will need to reset this protection by returning to the
<a href="/manager/html">main Manager page</a>. Once you
return to this page, you will be able to continue using the Manager
appliction's HTML interface normally. If you continue to see this access
denied message, check that you have the necessary permissions to access this
application.
</p>
You will have to look at the network traffic when yopu successfully complete the operation in the browser to see what to use for the id.
You can use developer tools in chrome or firebug in firefox to look at what gets sent back and forth to tomcat server.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.