我在设计界面时遇到的问题 如下:
为了合并拖放功能,我正在使用 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/