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

Access table fields - JSP

Hi

I have a JSP that builds a table and shows the values in fields according to what has been passed to it through a request.setAttribute of a servlet.

For example the two dimensional array "test" has this data:

Col1 Col2 Col3
Row1 a b c
Row2 d e f



and JSP will read this from request variable and display it.

These values (a,d) are displayed as hyper links to a page testpage.jsp.

What I need to do is, when user clicks a , I need to set b and c in a variable array and pass it to the next page , or when user clicks d I need to pass e and f to next page.

1. Could you please tell me how to do that ?

2. Do I need Javascript ? or it can be done in Java? I prefer to have all the code in Java.

3. How is it possible to access and change a request variable from JavaScript ?


Appreciate your help in advance
Evrim
Aug 18 '07 #1
3 2009
r035198x
13,262 8TB
Hi

I have a JSP that builds a table and shows the values in fields according to what has been passed to it through a request.setAttribute of a servlet.

For example the two dimensional array "test" has this data:

Col1 Col2 Col3
Row1 a b c
Row2 d e f



and JSP will read this from request variable and display it.

These values (a,d) are displayed as hyper links to a page testpage.jsp.

What I need to do is, when user clicks a , I need to set b and c in a variable array and pass it to the next page , or when user clicks d I need to pass e and f to next page.

1. Could you please tell me how to do that ?

2. Do I need Javascript ? or it can be done in Java? I prefer to have all the code in Java.

3. How is it possible to access and change a request variable from JavaScript ?


Appreciate your help in advance
Evrim
Clicking a link is a Javascript event not a Java event so you handle that event with Javascript. The form fields in one page become the request parameters in the next page.
Aug 18 '07 #2
Clicking a link is a Javascript event not a Java event so you handle that event with Javascript. The form fields in one page become the request parameters in the next page.

Thanks for your answer .....

Would it be possible to provide an example about how to construct these parameters (since they are fields in a table , not text boxes and such).
Aug 18 '07 #3
madhoriya22
252 100+
Hi

I have a JSP that builds a table and shows the values in fields according to what has been passed to it through a request.setAttribute of a servlet.

For example the two dimensional array "test" has this data:

Col1 Col2 Col3
Row1 a b c
Row2 d e f



and JSP will read this from request variable and display it.

These values (a,d) are displayed as hyper links to a page testpage.jsp.

What I need to do is, when user clicks a , I need to set b and c in a variable array and pass it to the next page , or when user clicks d I need to pass e and f to next page.

1. Could you please tell me how to do that ?

2. Do I need Javascript ? or it can be done in Java? I prefer to have all the code in Java.

3. How is it possible to access and change a request variable from JavaScript ?


Appreciate your help in advance
Evrim
Hi,
Try to do it this way:-
1. Set a parameter in ur url, like
Expand|Select|Wrap|Line Numbers
  1.  
  2. href = http://ur/url?RowId = someValue(this valued should be unique so that later u can identify the row through it)
  3.  
2. In the next page get this RowId using getParameter
Expand|Select|Wrap|Line Numbers
  1.  
  2. String str = request.getParameter("RowId");
  3.  
3. Based upon this RowId fetch the data from ur getAttribute List.

thanks and regards,
madhoriya
Aug 18 '07 #4

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

Similar topics

1
by: mark | last post by:
In Access 2000 and 2002, I have created an import specification to import the fixed-width recordset below into an existing table. I am having strange problems with the import of the date and time...
6
by: Paul | last post by:
I was wondering if anyone has had an issue where using vba code to read an excel file and import the data into an access table some records are not imported from the excel file. It seems looking at...
1
by: Andrew Arace | last post by:
I scoured the groups for some hands on code to perform the menial task of exporting table data from an Access 2000 database to Oracle database (in this case, it was oracle 8i but i'm assuming this...
8
by: doomx | last post by:
I'm using SQL scripts to create and alter tables in my DB I want to know if it's possible to fill the description(like in the Create table UI) using these scripts. EX: CREATE TABLE(...
4
by: alexandre.brisebois | last post by:
Hi, I am using access 2003, I would like to know if there is an option to reorganize the tables in a maner that is readable, as we can do in sql sever 2000 or 2005. I have been given a database...
2
by: steph | last post by:
I have a table with 250 fields. Of course you are wondering why 250 fields... what could I possibly be storing in so many fields? I am using this table as a general import table for files that...
2
by: bandkindy | last post by:
To preface, I am pretty green on the whole sql thing, but am learning quickly so please bear with me. I have an excel file that is copied to 5 users directories so they have their own working...
1
by: bandkindy | last post by:
To preface, I am pretty green on the whole sql thing, but am learning quickly so please bear with me. I have an excel file that is copied to 5 users directories so they have their own working...
2
by: Steve | last post by:
I have zero experience with ODBC. If I have an Access frontend connected to a SQL Database using ODBC, are the tables connected like a frontend/backend Access database where the the tables you see...
12
by: tekctrl | last post by:
Environment; Win2K PC with 1Gb of RAM and plenty of HD space running Access 2002 Issue; Access presents a blank data entry form in the Forms view when the New Record icon is used. However, it...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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
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
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,...
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.