473,395 Members | 1,762 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.

How to fix servlet threw exception error

I am workin on a mms project and it has the following modules
  1. sender and reciever (j2me -using sun wireless toolkit)
  2. mm7 and mmsc (java- using eclipse)
  3. vasp server and content server (java servelets- using eclipse and tomcat apache)

During normal run the connection should go somewhat like this

sender-->vasp server-->mm7-->mmsc-->reciever-->content server

I have removed all the visible errors. The apache server is up and running, no doubt bout that. I am using port no 80 instead of 8080, so I can enter URLs of the form http://localhost/... instead of http://localhost:8080/....

When i try to run the servelets i get errors such as:

-->The server encountered an internal error () that prevented it from fulfilling this request.
-->SEVERE: Servlet.service() for servlet Vasp_Server threw exception
java.lang.NullPointerException
at Vasp_Server.doGet(Vasp_Server.java:12)

the part of the code that causes this is as below-->

Expand|Select|Wrap|Line Numbers
  1. public class Vasp_Server extends HttpServlet
  2. {
  3.     HttpServletResponse res;
  4.     public void doGet( HttpServletRequest req,HttpServletResponse res ) throws IOException, ServletException
  5.     {
  6.         this.res = res;
  7.         String req_msg = req.getParameter( "param" );
  8. (ERROR HERE-->)    req_msg = req_msg.trim();
  9.         if( req_msg.equals( "vasp_msg" ))
  10.         {
  11.             System.out.println("Inside vasp msg provider" );
  12.             vasp_msg_provider();
  13.         } and so on...
May 17 '10 #1
0 1383

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

Similar topics

2
by: Michael | last post by:
Hello I am trying to write a Java-Program which converts a XML-file in a HTML. It should take the Transformation-file from the XML-file itself. Below find a possible XML-file: <?xml...
0
by: Ravi Tallury | last post by:
Hi We are having issues with our application, certain portions of it stop responding while the rest of the application is fine. I am attaching the Java Core dump. If someone can let me know what...
73
by: RobertMaas | last post by:
After many years of using LISP, I'm taking a class in Java and finding the two roughly comparable in some ways and very different in other ways. Each has a decent size library of useful utilities...
2
by: michela rossi | last post by:
Hi, Wonder if someone can help. We have a client for whom we have to build a website that cannot use cookies. The server technology will be Unix, JSP/Java, Apache-Tomcat. Will be using J2SE, no...
1
by: ptaz | last post by:
Hi I'm trying to run a web page but I get the following error. Ca anyone please tell me a solution to this. Thanks Ptaz HTTP Status 500 - type Exception report
11
by: DrUg13 | last post by:
In java, this seems so easy. You need a new object Object test = new Object() gives me exactly what I want. could someone please help me understand the different ways to do the same thing in...
0
by: Markus Wollny | last post by:
Hello! When I try to run ./configure --with-java, it complains that ant doesn't work. However ant is installed, as is the latest Java SDK 1.4.2 from sun, PATH and JAVA_HOME are set correctly; ...
1
by: David Van D | last post by:
Hi there, A few weeks until I begin my journey towards a degree in Computer Science at Canterbury University in New Zealand, Anyway the course tutors are going to be teaching us JAVA wth bluej...
0
oll3i
by: oll3i | last post by:
package library.common; import java.sql.ResultSet; public interface LibraryInterface { public ResultSet getBookByAuthor(String author); public ResultSet getBookByName(String name);
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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 project—planning, 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.