nash avin

Ranch Hand
+ Follow
since Nov 18, 2004
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by nash avin

Hi,

Thanks a lot for the reply.I will work on what you have just stated and will get back with more questions.Thanks a lot again for the suggestion.

AS
19 years ago
JSP
Hi All,
I have a jsp page that has series of checkboxes for course and questions.

I have a servlet that takes the checked values from the jsp and gets the required answer for that particular course checked(from the database).This is done using System.out.println()'s, it is done on the console.I have used a for loop pertaining to each course, there is a select query that would select the answers to the questions checked, loops around for each course that is checked, hope what has been done is clearly explained.

I would like to do the same on the browser using a .jsp page, i.e., the servlet calls the .jsp page.For each course that is checked the answers are to be displayed .Help as to how I can proceed doing this would be greatly appreciated.

i.e.,

RequestDispatcher dispatcher = request.getRequestDispatcher("question_answer.jsp");
dispatcher.include(request, response);




I hope I have conveyed the question in detail.

TIA
AS
19 years ago
JSP
Hi,

Thanks for the suggestion.I will see what best can be done regarding what you have told.Will post for further enquires.

Thanks again
AS
19 years ago
JSP
Hi All,

I would like to thank everyone for their advice to me in these forums.I have another situation here.Hopefully this is the right forum to post this message.

I have a .jsp page which contains checkboxes.The jsp is arranged into
COURSES SECTION and QUESTIONS.

Under each one of them there are check boxes.Under the COURSES and SECTION column, the checkboxes have associated values obtained from an Access database.

The QUESTIONS column has checkboxes, that have hard coded values(questions), written in html.The answers to these questions lie in a MS Access database.

I would like to know how I can check some checkboxes(checkbox value is already obtained from the Access database as told) in COURSES, some in SECTION(value already obtained from the database) and some in QUESTIONS , so that I can get the answer to that specific question I have checked pertaining to the COURSE and SECTION.Hopefully I have explained my problem correctly.

Any help would be greatly appreciated once again.Some leads as to how it could be done, along which lines.

TIA
AS
19 years ago
JSP
Hello All,

Thanks for the friendly suggestion.I did manage to clear the error and I am on my way to tackle the next hurdle.

Declaring a variable and calling it 2 times did the trick.

Thanks again.

AS
19 years ago
Hi,

Thanks a lot guys for your help.



This code is in a DataBaseBean.java



This code is in the courses.jsp file.

As was told to me, I am trying to put rs.getString("course") into a variable and call it twice.

Will see what happens.

Thanks a lot for your suggestions/ help.Let me know if you try and figure out what best can be done.

AS
19 years ago
Hi,

Thanks for the reply.This is my code for database access with MS access



Let me know if you require any further information from my side.

Help would be greatly appreciated.

Thanks
AS
19 years ago
Hi ,

Thanks for the replies.

I did change the syntax, to this...



ok....

But I get this error message.....



Kindly let me know what the problem could be..

Thanking you
AS
19 years ago
Hi all,

Firstly I would like t o thank this very helpful forum.I have one more question regarding checkboxes.

/*courses.jsp*/

In my courses.jsp which connects to an MS Access database I have something like this...

<INPUT TYPE=CHECKBOX NAME="COURSES" VALUE="rs.getString("course")"><%out.print(rs.getString("course"));%></td>

/*courses.jsp*/

This is coming from the database.

In my servlet code i have this in the doPost method.

/*CheckBoxServlet*/ PS : This servlet is not connected to the database..


/*CheckBoxServlet*/


/* OUTPUT */

I have checked 5 check boxes

Checkbox values rs.getString(
Checkbox values rs.getString(
Checkbox values rs.getString(
Checkbox values rs.getString(
Checkbox values rs.getString(

/*OUTPUT*/


My question is why is it not printing out the value in rs.getString()???.

It would be great if this forum helps me in the right direction.Let me know how i can go about doing this.

I hope i have explained my question correctly.If you have any further questions kindly ask.

Thanking every one in adavance

AS
19 years ago
Hi,

Thanks for the reply and suggestion.I will definately look into the pdf file and develop from there on.

Hopefully will be easier when I progress.

Thanking you again
AS
19 years ago
JSP
Hi,
Thanks for the response. I wanted to ask the forum if people can explain to me how it could be done.

I can get values from the database table, corresponding to the column name, how do I make each value correspond to the database entry.I hope you are getting my point here.

It would be great if I am told what are the possibilities that I need to explore.

TIA
AS
19 years ago
JSP
Hello All,

I must thank this forum for being friendly and very helpful.I have another question here.I hope that this is the right forum for this post.

I have a MS Access database, which has a table with attributes.I am using Java 1.4.2 and Tomcat 5.0.28.

I want to display on a .jsp page the values present in the "courses" attribute of the database table.

The displayed courses should have "check boxes" associated with them, so that any of them can be checked and on submit must give the other entries associated with that checkbox(course).I hope my problem statement is clear.

It would be great if people could spend some time to read this message and guide me in the right direction.

Any help would be greatly appreciated

TIA

AS
[ February 21, 2005: Message edited by: Bear Bibeault ]
19 years ago
JSP
Hi ,

Thanks a lot for the replies.I did print it out in a SQL utility and the statement is al right.

Regarding whether I can do the inserts, I can , I did a select * from <tablename> and it workds fine.

But Why is it with the insert....

It would be great if any one can direct me in the right direction.

Thanking you
AS
Hi,

Thanks for the reply.Sorry to have not included the error message .The error message I get is as follows



Thank you again for your time.

Help would be greatly appreciated.

AS
Hello All,

I posted this message some time back, but dont know why nobody is answering it.It would be nice if somebody takes the time to help me out with this.I did look into the forums , but could not get a suitable error correction.

It would be great if someone helps me out in this very helpful forum.I am giving you the code I have so far written

/*** DatabaseConnection.java****/


/*** DatabaseConnection.java****/


Any help would be greatly appreciated.

Thanking you all in advance
AS