apache - 在设计 Java EE 应用程序时,包 org.eclipse.swt.dnd 显示错误

标签 apache tomcat swt

我在设计界面时遇到的问题 如下:

为了合并拖放功能,我正在使用 SWT 和所有 SWT 拖放类在包中定义 org.eclipse.swt.dnd .现在我的问题是,在开发 独立应用程序我已经包含了名为 swt-4.2.1-win32-win32-x86它工作正常。但是虽然 如果包含包,则开发 Java EE 应用程序 org.eclipse.swt.dnd在一个jsp页面中 <%@page language="java" import="org.eclipse.swt.SWT"%>它显示以下错误:

HTTP Status 500 - Unable to compile class for JSP:

--------------------------------------------------------------------------------

type Exception report

message Unable to compile class for JSP:

description The server encountered an internal error that prevented it
from fulfilling this request.

exception

org.apache.jasper.JasperException: Unable to compile class for JSP:

An error occurred at line: [16] in the generated java file:
[C:\javaPrograms\.metadata\.plugins\org.eclipse.wst.server.core\tmp3\work\Catalina\localhost\wanem\org\apache\jsp\wanem_jsp.java]

只能导入一个类型。 org.eclipse.swt.SWT 解析为一个包

Stacktrace:
        org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:103)
        org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:331)
        org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:468)
        org.apache.jasper.compiler.Compiler.compile(Compiler.java:378)
        org.apache.jasper.compiler.Compiler.compile(Compiler.java:353)
        org.apache.jasper.compiler.Compiler.compile(Compiler.java:340)
        org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:646)
        org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:357)
        org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)
        org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
        javax.servlet.http.HttpServlet.service(HttpServlet.java:728)


note The full stack trace of the root cause is available in the Apache
Tomcat/7.0.37 logs.

最佳答案

SWT 用于编写桌面应用程序,不适用于 JSP。你可能想看看 Remote Application Platform .

关于apache - 在设计 Java EE 应用程序时,包 org.eclipse.swt.dnd 显示错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15555954/

相关文章:

radio-button - SWT:以编程方式设置单选按钮

apache - htaccess 递归 mod_rewrite

css - Apache 别名不起作用,WAMP

apache - 如何配置apache查看隐藏的(`.`)文件?

java - 无法在tomcat服务器中运行FTPServer java文件

java - 我的 Tomcat 应用程序可以在 Ubuntu 服务器上写入哪些文件夹

java - 如何应用旋转的一部分

java - 如何使用tomcat启动网络套接字应用程序?

java - 将 2 个 jface TreeViewers 垂直对齐到特定元素

java - 为什么SWT List填充全复合?