2011-03-01 3 views
1

제가 이클립스에서 내 서블릿 프로젝트를 war 파일로 내 보낸 다음 webapp/hello 폴더에 배치했습니다.전쟁 서블릿 바람둥이가 찾을 수 없습니다

내가 그것을 어떻게 실행합니까

/webapps/hello/hellotest.war

?

내가이

http://127.0.0.1:8080/hello/foo

를 입력하지만이 전쟁 파일 안에 내 web.xml 파일은 webapps

<?xml version="1.0" encoding="UTF-8"?> 
<web-app id="WebApp_ID" version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"> 
    <display-name>helloTest</display-name> 
    <servlet> 
     <description> 
     </description> 
     <display-name>foo</display-name> 
     <servlet-name>foo</servlet-name> 
     <servlet-class> 
     foo</servlet-class> 
    </servlet> 
    <servlet-mapping> 
     <servlet-name>foo</servlet-name> 
     <url-pattern>/foo</url-pattern> 
    </servlet-mapping> 
    <welcome-file-list> 
     <welcome-file>index.html</welcome-file> 
     <welcome-file>index.htm</welcome-file> 
     <welcome-file>index.jsp</welcome-file> 
     <welcome-file>default.html</welcome-file> 
     <welcome-file>default.htm</welcome-file> 
     <welcome-file>default.jsp</welcome-file> 
    </welcome-file-list> 
</web-app> 
+0

바람둥이를 사용하고 있다고 가정합니다. 바람둥이를 재시작 한 후 webapps 아래의 디렉토리 구조는 무엇입니까? – Paul

답변

1

놓습니다 hellotest.war 파일

입니다 실행되지 않습니다 Tomcat의 폴더. Tomcat 인스턴스가 실행 중이고 올바르게 설정되었다고 가정하면 응용 프로그램은 폴더 webapps/hellotest에 자동으로 배포해야합니다. 그런 다음 URL http://127.0.0.1:8080/hellotest/에서 신청서에 액세스 할 수 있습니다.

관련 문제