java - WAR file can't be deployed on Tomcat 7 without wtpwebapps folder -


i facing problem deploying war file on tomcat server. tomcat server configuration follows:

tomcat config

my steps deploy:

  1. i created war file in eclipse kepler (windows 7 64 bit, no maven used).
  2. uploaded tomcat web application manager.
  3. clicked deploy.

tomcat unpacks war file in tomcat/webapps , throws me nullpointerexception. missing files should imported project work right.

when working in eclipse, source these files gave workspace path, given in server settings , adding wtpwebapps folder, offered eclipse default. complete path looks this:

c:\users\myusername\kepler\workspace.metadata.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\myprojectname\web-inf\classes\project\fdsproject\fds.prj

now, when deploy project, locates in webapps folder, not in wtpwebapps , if try start in browser, shows me nullpointerexception. copy wtpwebapps folder workspace tomcat installation folder, near webapps, project starting successfully.

it means cannot start project on server, deploying standalone war file. must add manually wtpwebapps project in tomcat server installation folder. how can optimize , start project war file deployed? thank you!

edit

my project structure looking this: project structure

  1. stop tomcat server

  2. in settings view tomcat server settings in eclipse -> server locations, check use tomcat installation(...)

  3. now, can change deploy path, if want webapps, input it.

edit

the values below control how tomcat deal war file

autodeploy="true" unpackwars="true" 

just search these values in server.xml file , edit values need.


Comments

Popular posts from this blog

Command prompt result in label. Python 2.7 -

javascript - How do I use URL parameters to change link href on page? -

amazon web services - AWS Route53 Trying To Get Site To Resolve To www -