Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/jsp/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
HTTP状态500-JSP中的java.lang.NullPointerException_Jsp - Fatal编程技术网

HTTP状态500-JSP中的java.lang.NullPointerException

HTTP状态500-JSP中的java.lang.NullPointerException,jsp,Jsp,我的JSP页面以前工作正常,但没有出现错误。它正在工作,但突然出现了一些错误。以下是发生错误的代码。有人能帮我吗 我无法理解错误,我关闭了eclipse并再次尝试,但它不起作用。同时,其他JSP页面也在工作 <%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML

我的JSP页面以前工作正常,但没有出现错误。它正在工作,但突然出现了一些错误。以下是发生错误的代码。有人能帮我吗

我无法理解错误,我关闭了eclipse并再次尝试,但它不起作用。同时,其他JSP页面也在工作

<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" 
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<link rel="stylesheet" href="css/style.css" type="text/css" media="all" />
<style>
    .dropdown { position: relative; display: inline-block;  }
    .dropdown-content { display: none; position: absolute;  }
    .dropdown:hover .dropdown-content { display: block;     }
</style>
<script src="../bootstrap1/js/jquery-1.11.2.min.js"></script>
</head>
<body>
<!-- Header -->
<%
 HttpSession sess = request.getSession();
 String admin = sess.getAttribute("admin").toString();
 %>
 <div id="header">
<div class="shell">
    <!-- Logo + Top Nav -->
    <div id="top">
        <h1><a href="#">Share360</a></h1>
        <div id="top-navigation">
            Welcome <b><%out.println(admin); %></b>             
            <span>|</span>
            <a href="../profile.jsp">Profile Settings</a>
            <span>|</span>
            <a href="../login.jsp">Log out</a>
        </div>
    </div>
    <!-- End Logo + Top Nav -->

    <!-- Main Nav -->
    <div id="navigation">
        <ul>
            <li><a href="mainpage.jsp" class="active"><span>Dashboard</span>
</a></li>


              <div class="dropdown">

                </div>
            </div>

.dropdown{位置:相对;显示:内联块;}
.dropdown内容{显示:无;位置:绝对;}
.dropdown:hover.dropdown内容{display:block;}
欢迎
|
|
错误如下:


查看您的服务器资料。HTTP 500错误代码用于内部服务器错误。500状态代码或内部服务器错误表示服务器由于未知原因无法处理请求