• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

tomcat manager

 
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi,
i wish to configure the tomcat manager application and i encounter issue.
bin/tomcat-users.xml is:
<role rolename="admin"/>
<role rolename="admin-gui"/>
<role rolename="manager-gui"/>
<user username="tomcat" password="tomcat" roles="admin,admin-gui,manager-gui" />

server.xml
<Host name="www.ousor.com" appBase="webapps" unpackWAR="true" autoDeploy="true">

www.ousor.com ->192.168.77.142

conf/Catalina/www.ousor.com/manager.xml
<Context privileged="true" docBase="/root/apache-tomcat-7.0.61/webapps"
<Valva className="org.apache.catalina.valves.RemoteAddrValve"
allow="192\.168\.77\142" />
>

http://www.ousor.com:8080 is working but when i try to click on manager application button i receive error.
the same error if i try http://www.ousor.com:8080/manager/html

when i deploy an war file let`s say under /u directory,by command line,first i copy it under webapp directory and then i copy from here to /u directory.
if i copy war file directly under /u then no expanded directory will be.
is there other way to deploy by command line a war file under /u?
thans,
marius
 
Saloon Keeper
Posts: 24299
167
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You don't say what the error is. We cannot tell without some sort of message or log information.

You cannot deploy WARs by simply copying them into arbitrary directories. You have to inform Tomcat's deployer where to find them. Based on your server.xml excerpt, you're expecting to put WARs in the TOMCAT_HOME/webapps directory, since the Host statement indicates a relative directory path of "webapps".

And to deploy a WAR in the webapps directory, it must be in the webapps directory, not in a subdirectory under webapps.
 
marius tanislav
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Tim,
The error is 404 when i try http://www.vucni.com:8080/manager/html.even if i have #taill -f catalina.out,there is no error message.the same on the rest of logs.
catalina.out is:
May 05, 2015 5:11:20 AM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-bio-8080"]
May 05, 2015 5:11:20 AM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["ajp-bio-8009"]
May 05, 2015 5:11:20 AM org.apache.catalina.startup.Catalina start
INFO: Server startup in 17484 ms

war deployment.
server.xml is:
<Host name="vucni66.localdomain" appBase="u"
unpackWARs="true" autoDeploy="true">
</Host>

if i copy a war file under "u" directory and restart tomcat then i have the file deployed.
thanks,
marius
 
Tim Holloway
Saloon Keeper
Posts: 24299
167
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
By using 'appBase="u"' you have swapped out TOMCAT_HOME/webapps for the TOMCAT_HOME/u directory. There's no magic involved, just a divergence from the stock configuration.

However, I have to question why you are defining a private "Host" element instead of using Tomcat's default "localhost" Host. Custom Host elements are normally only done if you are having Tomcat run multiple Virtual Hosts.

As to why a "404" - probably because you defined the Host as "vucni66.localdomain" but you're attempting to talk to "vucni66.com". Which is probably routing to the localhost Host.
 
reply
    Bookmark Topic Watch Topic
  • New Topic