gpt4 book ai didi

java - HTTP 状态 500 错误

转载 作者:行者123 更新时间:2023-11-28 23:03:52 25 4
gpt4 key购买 nike

我收到类似这样的错误

org.apache.jasper.JasperException: Unable to compile class for JSP: 
An error occurred at line: 6 in the generated java file
Only a type can be imported. com.sixpanview.getcoordinate resolves to a package
An error occurred at line: 7 in the generated java file
Only a type can be imported. com.sixpanview.fileReader resolves to a package
An error occurred at line: 8 in the generated java file
Only a type can be imported. com.sixpanview.cookieInfo resolves to a package

在 .jsp 程序中使用 getcoordinatefileReadercookieInfo 的行出现错误,堆栈跟踪是

at org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:92)
at org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:330)
at org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:439)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:356)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:334)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:321)
at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:592)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:328)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:602)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(Thread.java:679)

为什么我得到它?

最佳答案

您不能导入。您需要在该包中导入

在您的导入语句中,将您的导入替换为:-

com.sixpanview.getcoordinate.*;
com.sixpanview.fileReader.*;
com.sixpanview.cookieInfo.*;

我假设这些包下没有其他子包。

.* 将导入该包下的所有类。理想情况下,您不应该这样做。而是从那些包中导入一个特定的类,如果你知道它们是什么的话。

喜欢:-

import java.util.List; 

优于:-

import java.util.*;

P.S : -请不要在您的内容中使用粗体,除非它真的非常重要,需要突出显示。它很难阅读。并在以后发布您的代码片段,同时发布异常。

关于java - HTTP 状态 500 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13430092/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com