2014-02-27 1 views
0

아주 간단한 응용 프로그램 (색인 파일)과 Java Servlet 필터를 만들었습니다.로그에 세부 사항 없음 : 모듈이 배치되지 않았습니다. 자세한 내용은 서버 로그를 참조하십시오.

내가 넷빈즈에서 배포에 로그에 다음과 같은 오류를보고 있어요 :

Deployment is in progress... 
deploy?config=file%3A%2FC%3A%2FUsers%2Fuser%2FAppData%2FLocal%2FTemp%2Fcontext490289541373061276.xml&path=/EXD 
http://localhost:8080/manager/deploy?config=file%3A%2FC%3A%2FUsers%2Fuser%2FAppData%2FLocal%2FTemp%2Fcontext490289541373061276.xml&path=/EXD 
C:\Users\user\Documents\NetBeansProjects\EXDLogger\nbproject\build-impl.xml:1070: The module has not been deployed. 
See the server log for details. 
BUILD FAILED (total time: 57 seconds) 

다른 로그의에 오류가 없습니다.

어떤 생각이 벌어지고 있습니까?

web.xml의 내용 :

<?xml version="1.0" encoding="UTF-8"?> 
<web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"> 
    <session-config> 
     <session-timeout>30</session-timeout> 
    </session-config> 
    <welcome-file-list> 
     <welcome-file>index.jsp</welcome-file> 
    </welcome-file-list> 

    <filter> 
     <filter-name>EXDLogger</filter-name> 
     <filter-class>com.cn.filters.EXDLogger</filter-class> 
     <init-param> 
      <param-name>paramExclude</param-name> 
      <!-- Parameters which should be excluded from the hash in determining 
       if a request is unique. Separate multiple values with a ; --> 
      <param-value>PARAM_1;PARAM_2</param-value> 
     </init-param> 
    </filter> 
    <filter-mapping> 
     <filter-name>EXDLogger</filter-name> 
     <url-pattern>/*</url-pattern> 
    </filter-mapping> 
</web-app> 

클래스가 호출되고 :

package com.cn.filters; 

import java.io.IOException; 
import java.util.Date; 

import javax.servlet.Filter; 
import javax.servlet.FilterChain; 
import javax.servlet.FilterConfig; 
import javax.servlet.ServletException; 
import javax.servlet.ServletRequest; 
import javax.servlet.ServletResponse; 
import javax.servlet.http.HttpServletRequest; 

public class EXDLogger implements Filter { 
    public void doFilter(ServletRequest req, ServletResponse res, 
      FilterChain chain) throws IOException, ServletException { 

     HttpServletRequest request = (HttpServletRequest) req; 

     //Get the IP address of client machine. 
     String ipAddress = request.getRemoteAddr(); 

     //Log the IP address and current timestamp. 
     System.out.println("IP "+ipAddress + ", Time " 
          + new Date().toString()); 

     chain.doFilter(req, res); 
    } 
    public void init(FilterConfig config) throws ServletException { 

     //Get init parameter 
     String testParam = config.getInitParameter("paramExclude"); 

     //Print the init parameter 
     System.out.println("Test Param: " + testParam); 
    } 
    public void destroy() { 
     //add code to release any resource 
    } 
} 

답변

0

나는 대답을 해킹. 더 좋은 것들이있을 것이라고 확신합니다. 다음과 같이 내 빌드 impl.xml의 관련 섹션을 업데이트 :

deployTarget=c:/xampp/tomcat/webapps/EXD 
client.url=http://localhost:8080/EXD/ 
:

<target depends="init,-init-cos,compile,compile-jsps,-do-compile-single-jsp,-pre-dist,-do-tmp-dist-with-manifest,-do-tmp-dist-without-manifest,-pre-run-deploy,-pre-nbmodule-run-deploy,-run-deploy-nb,-init-deploy-ant,-deploy-ant,-run-deploy-am,-post-nbmodule-run-deploy,-post-run-deploy,-do-update-breakpoints" name="run-deploy"/> 
<target if="netbeans.home" name="-run-deploy-nb"> 
    <!-- <delete dir="${deployTarget}"/> --> 
    <copy toDir="${deployTarget}" overwrite="true"> 
     <fileset dir="${build.web.dir}"></fileset> 
    </copy> 
    <copy toDir="${deployTarget}/WEB-INF/classes" overwrite="true"> 
     <fileset dir="${build.classes.dir}"></fileset> 
    </copy> 
    <!-- <nbdeploy clientUrlPart="${client.urlPart}" debugmode="true" forceRedeploy="${forceRedeploy}"/> --> 
</target> 

가 그때 내 project.properties에 추가

관련 문제