Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa JSP-Interview-Questions Passing a 2 Dimentional Array From one Jsp to Another Jsp file and Retreving it

Have Programming Question? Ask it here!
 
 
 


Madishetty Rajarshi
Passing a 2 Dimentional Array From one Jsp to Another Jsp file and Retreving it
0 Answer(s)      2 years and 7 months ago
Posted in : JSP-Interview Questions


Hi I have a 2 dimensional integer array declared and values are dynamically stored into it in one jsp file .I passed this array into another Jsp File and when i tried to retrieve the data in the 2 Dimensional array it is raising a Null Pointer Exception.I am attaching the sample code . Please help Me

JSP FILE 1 : // declatarion int final_equivalentset[][] = new int[5050][5050]; // values are entered dynamically session.setAttribute("myequivalentset",final_equivalentset);// added to session attribute

JSP FILE 2 : // the file where i retrieve the data

            Object obj =(int[][])session.getAttribute("myequivalentset");
    int equivalentset[][] = ( int[][])obj;

1----> **for( int check1 = 0;final_equivalentset[i-1][check1]!=0; check1++)
2----> { %><%= final_equivalentset[i-1][check1] %> <% } %>
<% **

The above code is raising the Null Pointer Exception Both at lines marked as 1---> and 2---> its stack trace is

strong text java.lang.NullPointerException org.apache.jsp.Major0020Project.Blue005fGray005fTemplate.signaturesjsp.jspService(signaturesjsp.java:161) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) javax.servlet.http.HttpServlet.service(HttpServlet.java:717) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:377) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260) javax.servlet.http.HttpServlet.service(HttpServlet.java:717) strong text

Please do help me as this is my Major Project and have very less Time in my hand .

Thanks and regards Rajarshi


Advertisement
View Answers

Related Tutorials/Questions & Answers:
Passing a 2 Dimentional Array From one Jsp to Another Jsp file and Retreving it
Passing a 2 Dimentional Array From one Jsp to Another Jsp file and Retreving... are dynamically stored into it in one jsp file .I passed this array into another Jsp File and when i tried to retrieve the data in the 2 Dimensional array
Problem passing a value from one jsp to another using href
Problem passing a value from one jsp to another using href  first page.jsp <a href="common.jsp?param=<%l.get(k).parentname%>"> common.jsp <%String attr=request.getAttribute("param"); out.print(attr
Advertisements
Problem passing a value from one jsp to another using href
Problem passing a value from one jsp to another using href  first page.jsp <a href="common.jsp?param=<%l.get(k).parentname%>"> common.jsp <%String attr=request.getAttribute("param"); out.print(attr
how to pass an array from one jsp to another jsp - JSP-Servlet
how to pass an array from one jsp to another jsp  hi friedns, can any One tell me how to send an array from one jsp to another jsp,pls any one send the code for this.also porvid the code how to retrive the arry in another jsp
passing from 1 jsp to another - JSP-Servlet
passing from 1 jsp to another  Hi Sir, What are the ways and means of passing from 1 jsp page to another page.what are the different types of methods?  Hi Friend, You can use tag,sedRedirect() method
calling one jsp from another jsp page
calling one jsp from another jsp page  need coding for calling one jsp from another jsp including the xml file.Its urgent
How to forward the control from one jsp to another?
How to forward the control from one jsp to another?  Hi! This is Prasad Jandrajupalli. I have the 3 JSP's, but I want communicate with each... is not communicate with the Third JSP. I want forward the control from first jsp to second
calling one jsp from another jsp - JSP-Servlet
calling one jsp from another jsp  Hi All, In my web application... in two.jsp by using jsp declarative tag. Now from one.jsp file I want to call... start from where we call this two.jsp files method. i.e. in one.jsp file at line
passing data from one jframe to another
passing data from one jframe to another  I have two JFrame,built by using the GUI Editor netbeans 6.9.i have to pass a data from a Jtextfield in the first Jframe to another JLabel in the other JFrame.Can you please help me,how
retrieving of data from one jsp to another jsp - JSP-Servlet
retrieving of data from one jsp to another jsp  using jsp i m... that is used for different jsp please help me sir... thanks in advance   Hi...; f.submit(); } " onclick="transfer();"> 2) main.jsp
Passing Parameter Values to another jsp in Query Strings
Passing Parameter Values to another jsp in Query Strings  HI ALL, I m trying to pass a variable value to another JSP using query string... even though some values* stored in the variable loginid. Can any one suggest
how to use one form out of multiple form from one jsp to another jsp
how to use one form out of multiple form from one jsp to another jsp  ... a .jsp( say abc.jsp) file which contains multiple Action form.I am required to add one form from abc.jsp as it is to another .jsp(say def.jsp).Your advise
passing value from javascript to jsp - JSP-Servlet
passing value from javascript to jsp  Hi... Is there any way to get the value from the javascript and print it on the current jsp page or print an array onto the current jsp page using javascript  Hi Friend, We
passing .properties file as a parameter to another function
passing .properties file as a parameter to another function  passing .properties file as a parameter to another function in an jsp file
passing .properties file as a parameter to another function
passing .properties file as a parameter to another function  passing .properties file as a parameter to another function in an jsp file
passing .properties file as a parameter to another function
passing .properties file as a parameter to another function  passing .properties file as a parameter to another function in an jsp file
passing .properties file as a parameter to another function
passing .properties file as a parameter to another function  passing .properties file as a parameter to another function in an jsp file
how to pass arraylist data from one jsp to another jsp - JSP-Servlet
how to pass arraylist data from one jsp to another jsp  hi to all iam... the following >XXX/ ? is required to send a value from one jsp to another... to receive all employee id's that are retrived from the database in the first jsp
Passing array to jsp - JSP-Interview Questions
Passing array to jsp   Hi, I've a page with multiple check boxes, i can select multiple boxes at a time. On submit, i wish those all records to be populated in next screen. Pls suggest how can i achieve this. Thanks
how to change password into one jsp to another jsp
how to change password into one jsp to another jsp  i have two jsps in one jsp i give one password and confirm password, in another jsp i want change my password compare with 1st jsp how to write code please give me answer?  
File copy from one directory to another in java
File copy from one directory to another in java  I am trying to find very good code example for copying a file from one directory to another...? Is there any size issue while copying the file from one directory to another
program to enter values from one jsp page and then do calculation on some formula and that results is displayed in another jsp
program to enter values from one jsp page and then do calculation on some formula and that results is displayed in another jsp  <%@ page language... solid #000000;"> <tr><td colspan=2 style="font-weight:bold;" align
passing textbox value from one page to another page using html n javascript
passing textbox value from one page to another page using html n...;/td> </tr> <tr> <td colspan=2><input type=submit value="Submit"> </td> </tr> </table> </form> </html> 2
Parameter passing from jsp page to jsp page - JSP-Servlet
Parameter passing from jsp page to jsp page  Hi I intends to pass the parameters that I received from previous page through query String. I get all... :  For more information on JSP visit to : http
Creating dynamic jsp file in java file to include another jsp file
Creating dynamic jsp file in java file to include another jsp file  I am able to create jsp file in java that includes ; table tr td and img tags..... Need to include jsp file in the same content. The below code doesn't help me
how to copy file from one directory to another in java with examples
how to copy file from one directory to another in java with examples  how to copy file from one directory to another in java with examples? I want... copy from one directory to another in java. Thanks
File copy from one drive to another. - Java Beginners
File copy from one drive to another.  I want to copy a .mp3 file from one drive(let d: drive)to another drive(let e: drive) in my Windows XP. How can I do
Passing Parameters to Another JSP Page
Passing Parameters to Another JSP Page      By using the include action we can pass the parameters to another jsp page... in the jsp post from the html form or the jsp page.   The code
Moving file or directory from one directory to another
Moving file or directory from one directory to another... directory is moved from one directory to another directory. This program... from one directory to another. In this section an example is given
how to set the tables one is left and another one is right - JSP-Servlet
how to set the tables one is left and another one is right  Here two tables are combined.i need to set the one table is left another one is right...")); document.open(); PdfPTable table=new PdfPTable(2); PdfPTable table1=new PdfPTable(1
Passing java variables from JSP to Servlet - return null values
Passing java variables from JSP to Servlet - return null values  I want to pass some variables from a JSP page to a servlet. These variables are from... from JSP to servlet gives null values. I got msg=null. Is there another way
how to get multiple hyperlink values from a table column to another jsp file?
how to get multiple hyperlink values from a table column to another jsp file... file named "dbtable" will get the parameter from "index" and search... if the user click on one of these hyperlinks the third file named "table2" should
Loading a jsp page (with record from database) from another jsp page
Loading a jsp page (with record from database) from another jsp page  Suppose I have two jsp pages Search.jsp and Getdata.jsp. There are two fields... with records from database(against Serial no and year).That is, as soon
uploading a file at another system in lan using jsp
uploading a file at another system in lan using jsp  Thanks for the code at "http://www.roseindia.net/jsp/fileupload/Sinleupload.xhtml.shtml... to save or upload the file at another system in lan at location "http
passing data between the jsp pages ?
passing data between the jsp pages ?  i developed a project... and displays the marks and i write another jsp which will calculate the percentage of the marks. from the previous jsp page the data needs to pass.i use for that.when
Passing Parameter - JSP-Servlet
Passing Parameter  I would like to ask how to pass a parameter from javascript section into the jsp section.It will be something like...; answer<%; <---I'm stuck here passing the var
Java - Copying one file to another
the contents from one specified file to another specified file. copyfile(String... to another specified file from the first one specified file. // For creating a byte... Java - Copying one file to another   
passing values between jsp file through hyperlink in div tag
passing values between jsp file through hyperlink in div tag  <... In searchproj.jsp values r retrieved from db as follows </p> <pre class...;script src="js/AdminHeader.js"&gt;&lt;/script&gt; &lt;jsp
passing parameters - JSP-Servlet
passing parameters  hi this is my jsp page...(); st=con.createStatement(); rs=st.executeQuery("select * from CHB...=rs.getString(2); String time1=rs.getString(3); String date1=rs.getString(4
Passing parameters in JSP using forward.
Passing parameters in JSP using forward.  If a page is forwarded to another page using jsp:forward, is it necessary that the page should be already created? Or will the compiler create one?   Hi, it necessary
Passing Parameter - JSP-Servlet
= ; } Use of Select Box in JSP Select items from select box >... Box in JSP Select items from select box...Passing Parameter  Hi, it'me again. Below is the set of code that I
passing values - JSP-Servlet
passing values  hi this is my jsp page... * from CHB_DataInsertion where Status='Reserved'"); while(rs.next()) { String hallno1=rs.getString(2); String time1=rs.getString(3); String date1
jsp one to one mapping
jsp one to one mapping  how to perform one to one mapping in jsp....code of one to one mapping with .xml file
Copy one file into another
;This string is copied from one file to another\n"); bf.close(); InputStream...Copy one file into another In this section, you will learn how to copy content of one file into another file. We will perform this operation by using
Passing Parameters - JSP-Servlet
Passing Parameters  Hi I have to pass parameter like such scenario. Please help me on emergent bases. I will be grateful. First Page... is For more information on JSP visit to : http://www.roseindia.net/jsp
converting one file format to another
converting one file format to another  Hi ser I need a code to export data from data grid to PDF and XL format plz help me out
how can we pass parameters from jsp href to another servlet
how can we pass parameters from jsp href to another servlet  how can we pass parameters from jsp href to another servlet
How to fetch entries/values from database to a jsp page one by one?
How to fetch entries/values from database to a jsp page one by one?  I have a table in Microsoft SQL server Management Studio with two columns title and data and each column has 10 enteries. I have a jsp page on which i want
to bring checked data from one page to another
to bring checked data from one page to another  thanks for your help... there is one jsp page , on it there is a link, on click of which it is opening second... fetching data from the database on second jsp page with checkbox corresponding each
Passing Parameter with <jsp: include>
Passing Parameter with <jsp: include>      In this example we are going to use <jsp:include>... a file in a jsp page. While using <jsp:param> we are adding
Advertisements
 

 

 

DMCA.com