jsp 编译之后出现空指针异常 怎么回事
<%@pagelanguage="java"contentType="text/html;charset=UTF-8"pageEncoding="UTF-8"%><%@p...
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@page import="com.safety.shipSpecifications.manager.ShipInfoManager"%>
<%@page import="com.safety.shipSpecifications.domin.Shipinfo"%>
<%@page import="net.sf.simple.web.WebUtil"%>
<%@page import="java.text.SimpleDateFormat"%>
<%
String imo = request.getParameter("imo");
ShipInfoManager shipInfoManager = new ShipInfoManager();
Shipinfo ship = shipInfoManager.getShipinfoByImo(imo);
String mUid = WebUtil.getLoginUser(request).getId();
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
%>
<html>
<body style="overflow-x:hidden">
<jsp:include page="/common/header.jsp" flush="true"></jsp:include>
<div id="__content" style="background: #fff; vertical-align: top; height: 100%; overflow: auto; position: relative;">
<form name="updateForm" id="updateForm">
<input type="text" name="id" id="id" value="<%=ship.getId() %>">//就这行出问题
<input type="text" name="CREATEUSERID" value="<%=ship.getCreateuserid() %>">
<!-- 最后修改用户id -->
<input type="text" name="LASTMODIFYUSERID" value="<%=mUid %>">
<!-- 创建时间 -->
<input type="text" name="CREATEDATE" value="<%=sdf.format(ship.getCreatedate()) %>"> 展开
<%@page import="com.safety.shipSpecifications.manager.ShipInfoManager"%>
<%@page import="com.safety.shipSpecifications.domin.Shipinfo"%>
<%@page import="net.sf.simple.web.WebUtil"%>
<%@page import="java.text.SimpleDateFormat"%>
<%
String imo = request.getParameter("imo");
ShipInfoManager shipInfoManager = new ShipInfoManager();
Shipinfo ship = shipInfoManager.getShipinfoByImo(imo);
String mUid = WebUtil.getLoginUser(request).getId();
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
%>
<html>
<body style="overflow-x:hidden">
<jsp:include page="/common/header.jsp" flush="true"></jsp:include>
<div id="__content" style="background: #fff; vertical-align: top; height: 100%; overflow: auto; position: relative;">
<form name="updateForm" id="updateForm">
<input type="text" name="id" id="id" value="<%=ship.getId() %>">//就这行出问题
<input type="text" name="CREATEUSERID" value="<%=ship.getCreateuserid() %>">
<!-- 最后修改用户id -->
<input type="text" name="LASTMODIFYUSERID" value="<%=mUid %>">
<!-- 创建时间 -->
<input type="text" name="CREATEDATE" value="<%=sdf.format(ship.getCreatedate()) %>"> 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询