小编Ama*_*pta的帖子

java中从URL获取页面内容

无法通过以下代码从 URL 访问此页面“kissanime.com”的内容(它不返回任何内容):

String a="http://kissanime.com";
    url = new URL(a);

    URLConnection conn = url.openConnection();

try ( // open the stream and put it into BufferedReader
        BufferedReader br = new BufferedReader(
        new InputStreamReader(conn.getInputStream()))) {
    String inputLine;
    while ((inputLine = br.readLine()) != null) {
        System.out.println(inputLine);
    }
}
Run Code Online (Sandbox Code Playgroud)

java url bufferedreader

0
推荐指数
1
解决办法
8726
查看次数

在localhost上的oozie中获取错误500

http:// localhost:11000/oozie /上浏览oozie

它在网页上显示以下错误 -

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

An error occurred at line: 25 in the generated java file
The method getJspApplicationContext(ServletContext) is undefined for the type JspFactory

Stacktrace:
    org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:92)
    org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:330)
    org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:451)
    org.apache.jasper.compiler.Compiler.compile(Compiler.java:356)
    org.apache.jasper.compiler.Compiler.compile(Compiler.java:334)
    org.apache.jasper.compiler.Compiler.compile(Compiler.java:321)
    org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:592)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:328)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:723)
    org.apache.oozie.servlet.AuthFilter$2.doFilter(AuthFilter.java:126)
    org.apache.hadoop.security.authentication.server.AuthenticationFilter.doFilter(AuthenticationFilter.java:585)
    org.apache.hadoop.security.authentication.server.AuthenticationFilter.doFilter(AuthenticationFilter.java:548)
    org.apache.oozie.servlet.AuthFilter.doFilter(AuthFilter.java:131)
    org.apache.oozie.servlet.HostnameFilter.doFilter(HostnameFilter.java:84)
Run Code Online (Sandbox Code Playgroud)

在此输入图像描述

java tomcat hadoop bigdata oozie

0
推荐指数
1
解决办法
845
查看次数

标签 统计

java ×2

bigdata ×1

bufferedreader ×1

hadoop ×1

oozie ×1

tomcat ×1

url ×1