Debug GWT Application with Tomcat (Eclipse)

扶醉桌前 提交于 2019-12-18 18:08:10

问题


I have tried to deploy the application with tomcat and I am succeeded. Now instead of internal GWT server I need to set tomcat as default inbuilt server and debug my application with it. The problem here I am facing is I am able to upload file into hosted mode successfully but when I tried to deploy my application to tomcat it gives me error to Struts interceptor.

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'

I request you suggest me the solution to this issue or redirect me on how to debug with tomcat in eclipse (GWT).

Can anybody redirect me on this issue...

Any help is much appreciated.

Thanking you,

Regards


回答1:


It's really easy, just follow these steps:

  1. Get google plugin for eclipse
  2. The in eclipse, right click on your project and choose Debug as -> Web Application (running on external server)
  3. Enter URL of your web app on tomcat (like http://localhost:8080/YourApp/YourApp.html and eclipse will give you new one - it will add stuff like ?gwt.codesvr=127.0.0.1:9997

And that's it. Just set up your breakpoints and debug!




回答2:


Have you tried to configure your struts.xml file to exclude parameters that seem to cause problem?

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


来源:https://stackoverflow.com/questions/4848198/debug-gwt-application-with-tomcat-eclipse

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!