You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Aivar Annamaa <ai...@gmail.com> on 2011/01/16 19:10:48 UTC

Ant deploy task failing with listing of html from manager page

Hi

I'm trying to get started with Tomcat 7.0.6 on Win7. I'm able to deploy
using WAR upload form in Manager, but deploying using ant (1.8.2) "deploy"
task fails -- it just lists a bunch of html (without an error message) and
then says that BUILD FAILED.

I wrote my build.xml according to sample from Tomcat 7.0 documentation (
http://tomcat.apache.org/tomcat-7.0-doc/appdev/build.xml.txt). Only thing I
changed was manager.url -- because I suspect that there is a mistake in the
sample. It says that manager.url should be  "[...]/manager" but with this i
would get only FileNotFoundException. So I changed it to
"[...]/manager/html", and got following result:

D:\workspace-stuff\TomcatTestProject>ant install
Buildfile: D:\workspace-stuff\TomcatTestProject\build.xml
Trying to override old definition of datatype resources

prepare:

compile:

install:
   [deploy] <html>
   [deploy] <head>
   [deploy] <style>
   [deploy] H1
{font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:2
2px;} H2
{font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;}
H3
{font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;}
BODY {
font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} B
{font-family:Tahoma,Arial
,sans-serif;color:white;background-color:#525D76;} P
{font-family:Tahoma,Arial,sans-serif;background
:white;color:black;font-size:12px;}A {color : black;}A.name {color :
black;}HR {color : #525D76;}
   [deploy]   table {
   [deploy]     width: 100%;
   [deploy]   }
   [deploy]   td.page-title {
   [deploy]     text-align: center;

       ...

   [deploy] </tr>
   [deploy] </table>
   [deploy] <br>
   [deploy] <hr size="1" noshade="noshade">
   [deploy] <center><font size="-1" color="#525D76">
   [deploy]  <em>Copyright &copy; 1999-2011, Apache Software
Foundation</em></font></center>
   [deploy] </body>
   [deploy] </html>

BUILD FAILED

Similar result comes from "list" task.
Hopefully someone can give me advice how to get deploying through ant
working!

Aivar

Re: Ant deploy task failing with listing of html from manager page

Posted by Aivar Annamaa <ai...@gmail.com>.
Thanks, that did the trick! :)

Actually I tried "manager/text" before, but as I was using the role
"manager" (as the documentation suggested) I got 403 for response.

Aivar

It should be [...]/manager/text
>
> Note, that your user should have the role of "manager-script" to be
> able to access that URL.
>

Re: Ant deploy task failing with listing of html from manager page

Posted by Konstantin Kolinko <kn...@gmail.com>.
2011/1/16 Aivar Annamaa <ai...@gmail.com>:
> Hi
>
> I'm trying to get started with Tomcat 7.0.6 on Win7. I'm able to deploy
> using WAR upload form in Manager, but deploying using ant (1.8.2) "deploy"
> task fails -- it just lists a bunch of html (without an error message) and
> then says that BUILD FAILED.
>
> I wrote my build.xml according to sample from Tomcat 7.0 documentation (
> http://tomcat.apache.org/tomcat-7.0-doc/appdev/build.xml.txt). Only thing I
> changed was manager.url -- because I suspect that there is a mistake in the
> sample. It says that manager.url should be  "[...]/manager" but with this i
> would get only FileNotFoundException. So I changed it to
> "[...]/manager/html", and got following result:

It should be [...]/manager/text

Note, that your user should have the role of "manager-script" to be
able to access that URL.

Best regards,
Konstantin Kolinko

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org