2011-01-31 71 views
3

我試圖用tomcat部署應用程序,並且成功。現在,而不是內部的GWT服務器,我需要將tomcat設置爲默認的內置服務器,並使用它調試我的應用程序。我面臨的問題是我能夠成功將文件上傳到託管模式,但是當我嘗試將我的應用程序部署到tomcat時,它給我提供了Struts攔截器的錯誤。使用Tomcat調試GWT應用程序(Eclipse)

ERROR ParametersInterceptor.setParameters():242 - ParametersInterceptor - [setParameters]: Unexpected Exception caught setting 'fileUploadContentType' on 'class com.example.server.actions.FileUploadAction: Error setting expression 'fileUploadContentType' with value '[Ljava.lang.String;@12569b8' 
ERROR ParametersInterceptor.setParameters():242 - ParametersInterceptor - [setParameters]: Unexpected Exception caught setting 'fileUploadFileName' on 'class com.example.server.actions.FileUploadAction: Error setting expression 'fileUploadFileName' with value '[Ljava.lang.String;@13fb1ab' 

我請你建議我解決這個問題或重定向我如何在eclipse(GWT)中使用tomcat進行調試。

任何人都可以重定向我在這個問題上...

任何幫助深表感謝。

感謝你,

問候

+0

你使用的是eclipse插件嗎? – cupakob 2011-01-31 10:30:31

回答

7

這真的很容易,只要按照下列步驟操作:

  1. 獲取google plugin for eclipse
  2. 將在Eclipse中,右鍵點擊你的項目,然後選擇調試爲 - > Web應用程序(外部服務器上運行)
  3. 在tomcat上輸入你的web應用的URL(如http://localhost:8080/YourApp/YourApp.html和eclipse會給你一個新的 - 它會添加像?gwt.codesvr = 127.0.0.1:9997

就是這樣。只需設置斷點並調試!

+0

Thankx爲答案...但我沒有像調試一樣的選項作爲外部服務器...! :( – 2011-02-01 06:08:53

0

您是否嘗試過配置你的struts.xml文件排除似乎造成問題的參數?

<interceptor-stack name="defaultStack"> 
    <interceptor-ref name="params"> 
     <param name="excludeParams">fileUploadContentType,fileUploadFileName</param> 
    </interceptor-ref> 
</interceptor-stack> 
相關問題