Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6633659
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T22:50:19+00:00 2026-05-25T22:50:19+00:00

I’m attempting to deploy to a war file in Tomcat 7. It’s giving me

  • 0

I’m attempting to deploy to a war file in Tomcat 7. It’s giving me the following error.

deploy:
   [echo] Deploying on Tomcat.

BUILD FAILED
   C:\Users\coder\workspace\projectName\build.xml:84: java.io.IOException: Server returned    
   HTTP response code: 403 for URL: http://localhost:8090/manager/deploy?path=%2FprojectName

Here’s my build file

<project name="ProjectName" default="main"
                basedir=".">

                <!-- Tell ant to use my environment variables -->
                <property environment="env"/>

                <property file="./build.properties"/>
                <property name="username" value="someUsername"/>
                <property name="password" value="somePassword"/>

                <taskdef name="deploy"    classname="org.apache.catalina.ant.DeployTask"/>

                <property name="tomcat.home"
                value="${env.CATALINA_HOME}"/>
                <property name="hibernate.home"
                value="${env.CATALINA_HOME}"/>
                <property name="servlet.jar"
                value="${tomcat.home}/common/lib/servlet-api.jar"/>
                <property name="jsp.jar"
                value="${tomcat.home}/common/lib/jsp-api.jar"/>
                <property name="hibernate.jar" value="C:/hibernate-distribution-3.6.4.Final/hibernate3.jar"/>

                <property name="deploy.dir"
                value="${tomcat.home}/webapps"/>
                <property name="build.compiler" value="modern"/>
                <property name="build.dir" value="build" />
                <property name="src.dir" value="src"/>
                <property name="war.file" value="projectName"/>
                <property name="war.file.name" value="${war.file}.war"/>

                <path id="project.class.path">
                <fileset dir="./WEB-INF/lib/">
                <include name="**/*.jar"/>
                </fileset>
                <pathelement path="${src.dir}"/>
                <pathelement path="${servlet.jar}"/>
                <pathelement path="${jsp.jar}"/>
                <pathelement path="${hibernate.jar}"/>
                </path>

                <target name="clean">
                <delete dir="${build.dir}" includeEmptyDirs="true" />
                </target>

                <target name="prep">
                <mkdir dir="${build.dir}"/>
                </target>

                <target name="compile">
                <javac srcdir="${src.dir}"
                destdir="${build.dir}"
                debug="on"
                deprecation="on">
                <include name="**/*.java"/>
                <classpath refid="project.class.path"/>
                </javac>
                </target>

                <target name="cleanWebApp">
                <delete file="${deploy.dir}/${war.file.name}" />
                <delete dir="${deploy.dir}/${war.file}"
                includeEmptyDirs="true" />
                </target>

                <target name="war">
                <war warfile="${war.file.name}"
                webxml="./WEB-INF/web.xml">
                <fileset dir="./" includes="**/*.*" excludes="*.war,
                **/*.nbattrs, web.xml, **/WEB-INF/**/*.*,
                **/project-files/**/*.*"/>
                <webinf dir="./WEB-INF" includes="**/*"
                excludes="web.xml, **/*.jar, **/*.class"/>
                <lib dir="./WEB-INF/lib"/>
                <classes dir="${build.dir}"/>
                <classes dir="${src.dir}">
                <include name="**/*.properties"/>
                </classes>
                </war>
                </target>

                <target name="deploy">
                    <echo message="Deploying on Tomcat." />
                    <deploy url="http://localhost:8090/manager" username="someUsername"
                     password="somePassword" path="/projectName" war="./${war.file.name}" />
                </target>

                <target name="main" depends="clean, prep, cleanWebApp,
                compile, war, deploy"/>

                </project>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T22:50:20+00:00Added an answer on May 25, 2026 at 10:50 pm

    The account mentioned in manager.username and manager.password, has to be in the role of “manager-script” (or “admin-script” also if that does’t work).

    It seems that “manager” and “admin” roles are changed to “manager-gui”, “admin-gui”, “manager-script” (for text connection), “admin-script” (for text connection) in Tomcat 7.

    I found 4 roles relevant to manager from below error page:

    403 Access Denied

    You are not authorized to view this page.

    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 main Manager page. 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.

    If you have not changed any configuration files, please examine the file conf/tomcat-users.xml in your installation. That file must contain the credentials to let you use this webapp.

    For example, to add the manager-gui role to a user named tomcat with a password of s3cret, add the following to the config file listed above.

    Note that for Tomcat 7 onwards, the roles required to use the manager application were changed from the single manager role to the following four roles. You will need to assign the role(s) required for the functionality you wish to access.

    manager-gui – allows access to the HTML GUI and the status pages

    manager-script – allows access to the text interface and the status pages

    manager-jmx – allows access to the JMX proxy and the status pages

    manager-status – allows access to the status pages only

    The HTML interface is protected against CSRF but the text and JMX interfaces are not. To maintain the CSRF protection:

    Users with the manager-gui role should not be granted either the manager-script or manager-jmx roles.
    If the text or jmx interfaces are accessed through a browser (e.g. for testing since these interfaces are intended for tools not humans) then the browser must be closed afterwards to terminate the session.
    For more information – please see the Manager App HOW-TO.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a .ini file as follows: [playlist] numberofentries=2 File1=http://87.230.82.17:80 Title1=(#1 - 365/1400) Example
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I want use html5's new tag to play a wav file (currently only supported
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and
In my XML file chapters tag has more chapter tag.i need to display chapters
I am trying to render a haml file in a javascript response like so:
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
We're building an app, our first using Rails 3, and we're having to build

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.