473,421 Members | 1,695 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,421 software developers and data experts.

how to send an object from a servlet to a jsp

1
I really need help ,
i am working on an application with netbeans and servlets.
I have a form in which i give the id then select a table in which i will go and search the id to the oracle database.


i am trying to send my objet to the jsp file from the servlet.
--------------------------------------------
this is the way i did

//recherche sur la table BASE_NGHLR new instance pour acceder a la methode recherche(id)
BASE_NGHLR base=new BASE_NGHLR();
//instance pour recuperer le resultat de la recherche (qui retourne un objet)

base=base.recherche(msisdn);
//envoi a la page res_recherche.jsp
request.setAttribute("BASE_NGHLR",base.getImsi());
RequestDispatcher res=getServletContext().getRequestDispatcher("/res_recherche.jsp");
res.forward(request,response);
------------------------------------------------------

this is my error
ATTENTION: ApplicationDispatcher[/tutoj2ee] PWC1231: Servlet.service() for servlet jsp threw exception
java.lang.NullPointerException
at org.apache.jsp.res_005frecherche_jsp._jspService(r es_005frecherche_jsp.java from :125)
at org.apache.jasper.runtime.HttpJspBase.service(Http JspBase.java:109)
at javax.servlet.http.HttpServlet.service(HttpServlet .java:847)
at org.apache.jasper.servlet.JspServletWrapper.servic e(JspServletWrapper.java:406)
at org.apache.jasper.servlet.JspServlet.serviceJspFil e(JspServlet.java:483)
at org.apache.jasper.servlet.JspServlet.service(JspSe rvlet.java:373)
at javax.servlet.http.HttpServlet.service(HttpServlet .java:847)
at org.apache.catalina.core.StandardWrapper.service(S tandardWrapper.java:1523)
at org.apache.catalina.core.ApplicationDispatcher.doI nvoke(ApplicationDispatcher.java:802)
at org.apache.catalina.core.ApplicationDispatcher.inv oke(ApplicationDispatcher.java:664)
at org.apache.catalina.core.ApplicationDispatcher.pro cessRequest(ApplicationDispatcher.java:497)
at org.apache.catalina.core.ApplicationDispatcher.doD ispatch(ApplicationDispatcher.java:468)
at org.apache.catalina.core.ApplicationDispatcher.dis patch(ApplicationDispatcher.java:364)
at org.apache.catalina.core.ApplicationDispatcher.for ward(ApplicationDispatcher.java:314)
at STIC3.connectionServlet.doGet(connectionServlet.ja va:207)
at javax.servlet.http.HttpServlet.service(HttpServlet .java:734)
at javax.servlet.http.HttpServlet.service(HttpServlet .java:847)
at org.apache.catalina.core.StandardWrapper.service(S tandardWrapper.java:1523)
at .Thread.run(Thread.java:619)
Aug 10 '10 #1
0 980

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

Similar topics

3
by: SpitFire | last post by:
I need little help with Java and UDP protocol. Can someone give me an example of how can I send a object by UDP protocol. Only usefull method is DatagramPacket(byte buf, int length,...
5
by: Pete Loveall | last post by:
I have a server application that monitors a private local queue for messages. The message sent to it has a label and a response queue defined. It works correctly when the queue is accessed via...
0
by: David Burson | last post by:
Hi, I have a VB.NET windows app that needs to automatically send a simple text email when my users run a new version of the app for the first time. I thought this would be simple, but after...
2
by: Steve Bishop | last post by:
I have an application that sends a query by e-mail in Excel format using a DoCmd.SendObject statement in VBA. I need to delete the column headings now before I send it. Help appreciated. Thanks....
4
by: Ranganath Udupa | last post by:
I need to include a mail to a concerned person whenever a button is clicked in an Access form. So I used the DoCmd.SendObject command. However, it seems like I cannot send a long message text. Is...
1
by: thoemmes | last post by:
I am trying to use the following code to create an email message which takes its body from values stored in a form. I want to split the values up so I have added some line breaks to strBody. These...
7
by: Marcus | last post by:
I tried DoCmd.SendObject on Access 2002 with Win2000 and no worries, it works. But, DoCmd.SendObject does not work on Access 2002 using WinXP. Wondering if there is a work around? Marcus...
0
by: BG | last post by:
Can anyone explain how to create a macro to send a report to a person/group by using the input values entered in a report query? I generate a report by inputting date and ID # and each report...
2
by: Benny | last post by:
I have a distributed application that everyone will be running the same core application, but some may have a different interface they use because of different roles. I need to send a complex (yet...
6
by: barkmaz | last post by:
Hey, Can we send an inherited object into a function which requires its base class as REF? class y class x : y func DoSomething(ref y) DoSomething(ref x);
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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,...
1
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
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

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.