• 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
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

How to deploy my own directory in Tomcat?

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I did deployment as below:
--webapp
|--myWeb
|--jsp
|--WEB-INF
|--classes
and modified server.xml in conf,
<Context path="/examples".....>
....
</Context>
<Context path="/myWeb" docBase="webapps/myWeb" debug="0"
reloadable="true" crossContext="true">
</Context>
However I still cannot run my own directory "myWeb".
 
Ranch Hand
Posts: 100
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hiii
i think you only need to write
docBase="/myWeb"
instead of
docBase="webapps/myWeb"

and it should work...
Thanks
Amit
 
Ranch Hand
Posts: 3695
IntelliJ IDE Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Actually, drop the leading slash.

<Context path="/myWeb" docBase="myWeb" debug="0" ...>

Also, your WEB-INF directory must contain a web.xml file.

It can be virtually empty, containing only the following:

<web-app />

But the file must be there.
 
It runs on an internal combustion engine. This ad does not:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic