简体   繁体   中英

HTTP Status 500 - java.lang.NullPointerException in JSP

My JSP page was working before, but out of no where an error occurred. It was working but suddenly some error occurred. The following is the code to which error occurred. Can someone help me.

I couldn't understand the error, I closed eclipse and tried again, but it's not working. At the same time other JSP pages are working.

<%@ 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>

The error is as below:

在此处输入图片说明

Check out your server stuff. HTTP 500 error code is for Internal Server Error. The 500 status code, or Internal Server Error, means that server cannot process the request for an unknown reason.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM