473,395 Members | 1,568 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

looking for the solutiion of this:The server encountered an internal error () that pr

hi buddy,the error is:
type Exception report

message

description The server encountered an internal error () that prevented it from fulfilling this request.

exception

org.apache.jasper.JasperException: java.lang.NullPointerException
org.apache.jasper.servlet.JspServletWrapper.handle JspException(JspServletWrapper.java:541)
org.apache.jasper.servlet.JspServletWrapper.servic e(JspServletWrapper.java:435)
org.apache.jasper.servlet.JspServlet.serviceJspFil e(JspServlet.java:320)
org.apache.jasper.servlet.JspServlet.service(JspSe rvlet.java:266)
javax.servlet.http.HttpServlet.service(HttpServlet .java:803)
org.netbeans.modules.web.monitor.server.MonitorFil ter.doFilter(MonitorFilter.java:390)


root cause

java.lang.NullPointerException
org.apache.jsp.sender_jsp._jspService(sender_jsp.j ava:84)
org.apache.jasper.runtime.HttpJspBase.service(Http JspBase.java:70)
javax.servlet.http.HttpServlet.service(HttpServlet .java:803)
org.apache.jasper.servlet.JspServletWrapper.servic e(JspServletWrapper.java:393)
org.apache.jasper.servlet.JspServlet.serviceJspFil e(JspServlet.java:320)
org.apache.jasper.servlet.JspServlet.service(JspSe rvlet.java:266)
javax.servlet.http.HttpServlet.service(HttpServlet .java:803)
org.netbeans.modules.web.monitor.server.MonitorFil ter.doFilter(MonitorFilter.java:390)


note The full stack trace of the root cause is available in the Apache Tomcat/6.0.14 logs.


--------------------------------------------------------------------------------

Apache Tomcat/6.0.14
the jsp page:
<%--
Document : sender
Created on : 2008-3-17, 14:01:17
Author : Administrator
--%>

<%@page contentType="text/html;charset=gb2312" pageEncoding="UTF-8"%>
<%@page import="java.util.*"%>
<!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=gb2312">
<title>JSP Page</title>
</head>
<body>

<form method="POST" action="">
绑定用户ID:<input type="text" name="userPhone" value="" /><br>
绑定命令:<input type="text" name="command" value="" /><br>
<input type="radio" name="command" value="single" />单次定位
<input type="radio" name="command" value="consequance" />连续定位
<input type="radio" name="command" value="cease" />停止连续定位
<input type="radio" name="command" value="shutLED" />关闭定位器LED<br>
<input type="reset" value="重置" name="reset" />
<input type="submit" value="提交" name="submit" /><br>
</form>
<%
String commands=request.getParameter("command");
//String userPhone=request.getParameter("userPhone");
String msgPrefix[]={"GG","GM","GS","GL"};
String feedback="";

if(commands.equals("single"))
feedback=new String(msgPrefix[0]);
if(commands.equals("consequance"))
feedback=new String(msgPrefix[1]);
if(commands.equals("cease"))
feedback=new String(msgPrefix[2]);
if(commands.equals("shutLED"))
feedback=new String(msgPrefix[3]);
%>
<jsp:useBean id="sender" class="Bean.Sender" scope="page"/>
<jsp:setProperty name="sender" property="userPhone" param="userPhone"/>
<jsp:setProperty name="sender" property="sendData" param="<%=feedback%>"/>
<jsp:getProperty name="sender" property="userPhone"/>
<jsp:getProperty name="sender" property="sendData"/>
<%
//sender.sendCommands();
%>
<h2>first try,Hello World!</h2>
</body>
</html>
the javaBean code:
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/

package Bean;
import java.net.*;
import java.io.*;
/**
*
* @author Administrator
*/
public class Sender {
public String sendData;
public String userPhone;
public void setSendData(String sendData){this.sendData=sendData;}
public void setuserPhone(String add){this.userPhone=add;}
public String getSendData(){return this.sendData;}
public String getuserPhone(){return this.userPhone;}
public Sender(){ }
/*public void sendCommands(){
if(sendData!=null){
byte buffer[]=sendData.getBytes();
try{
InetAddress address=InetAddress.getByName(this.userPhone);
DatagramPacket sendPack=new DatagramPacket(buffer,buffer.length,address,9999);//server receiver port:8888
DatagramSocket sendSocket=new DatagramSocket();
sendSocket.send(sendPack);
}catch(Exception e){e.printStackTrace();}
}
}*/
}
Mar 19 '08 #1
1 2546
hi buddy,the error is:
type Exception report

message

description The server encountered an internal error () that prevented it from fulfilling this request.

exception

org.apache.jasper.JasperException: java.lang.NullPointerException
org.apache.jasper.servlet.JspServletWrapper.handle JspException(JspServletWrapper.java:541)
org.apache.jasper.servlet.JspServletWrapper.servic e(JspServletWrapper.java:435)
org.apache.jasper.servlet.JspServlet.serviceJspFil e(JspServlet.java:320)
org.apache.jasper.servlet.JspServlet.service(JspSe rvlet.java:266)
javax.servlet.http.HttpServlet.service(HttpServlet .java:803)
org.netbeans.modules.web.monitor.server.MonitorFil ter.doFilter(MonitorFilter.java:390)


root cause

java.lang.NullPointerException
org.apache.jsp.sender_jsp._jspService(sender_jsp.j ava:84)
org.apache.jasper.runtime.HttpJspBase.service(Http JspBase.java:70)
javax.servlet.http.HttpServlet.service(HttpServlet .java:803)
org.apache.jasper.servlet.JspServletWrapper.servic e(JspServletWrapper.java:393)
org.apache.jasper.servlet.JspServlet.serviceJspFil e(JspServlet.java:320)
org.apache.jasper.servlet.JspServlet.service(JspSe rvlet.java:266)
javax.servlet.http.HttpServlet.service(HttpServlet .java:803)
org.netbeans.modules.web.monitor.server.MonitorFil ter.doFilter(MonitorFilter.java:390)


note The full stack trace of the root cause is available in the Apache Tomcat/6.0.14 logs.


--------------------------------------------------------------------------------

Apache Tomcat/6.0.14
the jsp page:
<%--
Document : sender
Created on : 2008-3-17, 14:01:17
Author : Administrator
--%>

<%@page contentType="text/html;charset=gb2312" pageEncoding="UTF-8"%>
<%@page import="java.util.*"%>
<!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=gb2312">
<title>JSP Page</title>
</head>
<body>

<form method="POST" action="">
绑定用户ID:<input type="text" name="userPhone" value="" /><br>
绑定命令:<input type="text" name="command" value="" /><br>
<input type="radio" name="command" value="single" />单次定位
<input type="radio" name="command" value="consequance" />连续定位
<input type="radio" name="command" value="cease" />停止连续定位
<input type="radio" name="command" value="shutLED" />关闭定位器LED<br>
<input type="reset" value="重置" name="reset" />
<input type="submit" value="提交" name="submit" /><br>
</form>
<%
String commands=request.getParameter("command");
//String userPhone=request.getParameter("userPhone");
String msgPrefix[]={"GG","GM","GS","GL"};
String feedback="";

if(commands.equals("single"))
feedback=new String(msgPrefix[0]);
if(commands.equals("consequance"))
feedback=new String(msgPrefix[1]);
if(commands.equals("cease"))
feedback=new String(msgPrefix[2]);
if(commands.equals("shutLED"))
feedback=new String(msgPrefix[3]);
%>
<jsp:useBean id="sender" class="Bean.Sender" scope="page"/>
<jsp:setProperty name="sender" property="userPhone" param="userPhone"/>
<jsp:setProperty name="sender" property="sendData" param="<%=feedback%>"/>
<jsp:getProperty name="sender" property="userPhone"/>
<jsp:getProperty name="sender" property="sendData"/>
<%
//sender.sendCommands();
%>
<h2>first try,Hello World!</h2>
</body>
</html>
the javaBean code:
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/

package Bean;
import java.net.*;
import java.io.*;
/**
*
* @author Administrator
*/
public class Sender {
public String sendData;
public String userPhone;
public void setSendData(String sendData){this.sendData=sendData;}
public void setuserPhone(String add){this.userPhone=add;}
public String getSendData(){return this.sendData;}
public String getuserPhone(){return this.userPhone;}
public Sender(){ }
/*public void sendCommands(){
if(sendData!=null){
byte buffer[]=sendData.getBytes();
try{
InetAddress address=InetAddress.getByName(this.userPhone);
DatagramPacket sendPack=new DatagramPacket(buffer,buffer.length,address,9999);//server receiver port:8888
DatagramSocket sendSocket=new DatagramSocket();
sendSocket.send(sendPack);
}catch(Exception e){e.printStackTrace();}
}
}*/
}
i got the solution:
there lost one sentence in the jsp code:
......
if(commands!=null){
if(commands.equal("single"))
.........
.............
}

remedy the jsp code as above,the jsp work well.
Mar 19 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Hai Nguyen | last post by:
Would anybody please tell me what is this error and what i should do I have 5 files: page1.aspx,page1.aspx.cs; page2.aspx.page2.aspx.cs and page3.cs both page1.aspx.cs and page2.aspx.cs...
6
by: Bill English | last post by:
Go here: http://68.81.193.200/error.bm I don't understand why I would be getting this error. I will be glad to answer any questions.
5
by: jam | last post by:
when I use admin account to run it, it is okay, but when I ause other account, it gives this error.... please help~~~ thx
1
by: mar-kav | last post by:
Hello, i'm a beginner so exuse me: i installed IIS 5.1, Framework1.1, vs .NET 2003 i put my web dir' in inetpub/wwwroot, tried to broows to my homepage under localhost & got this error message: ...
2
by: PencoOdStip | last post by:
http://www.slibe.com/image/7e86356e-stop/ I am beginner and tryin new stuff and get this error few times. What it means? Why c++ stops working? It just keeps linking...
5
by: maya | last post by:
hi, what is this error please? uncaught exception: Permission denied to call method Location.toString I see this error sometimes in FF error console but it says nothing about what causes...
2
by: ahmed222too | last post by:
when i use this code to copy a text file and paste it in a specific path: Dim fso As New FileSystemObject fso.CopyFile "C:\Files\file.txt", "C:\Files1\file_copy.txt" this error appear ...
2
by: Madhusudana Babu | last post by:
Hi, i got this error.Please help me any one know about this error. Microsoft JScript runtime (0x800A138F) 'objMIMSJ' is null or not an object /NewEllipseTest/mse/Template/mseError.asp, line...
1
by: =?iso-8859-1?q?KLEIN_St=E9phane?= | last post by:
Hi, I'm on Ubuntu 8.04.1 I've installed lxml with easy_install lxml command. Now, when I load etree I've this error : $ python Python 2.5.2 (r252:60911, Apr 21 2008, 11:12:42)
0
by: =?iso-8859-1?q?KLEIN_St=E9phane?= | last post by:
Le Mon, 25 Aug 2008 13:50:50 +0000, KLEIN Stéphane a écrit : I've this bug only with lxml2, lxml 1.3.3 work very well. Regards, Stephane
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development projectplanning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.