Nitin Belaram wrote: itis not working
Mohamed Inayath wrote:When you submit the page, what is the value for checkbox - request.getParameter("checkbox"); are you getting?
If you have got the empid then it will be enough to display the details in the next page.
Nitin Belaram wrote:
I am not getting value for the checkbox,please check if my code is correct for getting value ,i am getting null value.
I am getting display.jsp only with header
Mohamed Inayath wrote:
Nitin Belaram wrote:
I am not getting value for the checkbox,please check if my code is correct for getting value ,i am getting null value.
I am getting display.jsp only with header
Does Display.jsp exist?
You are retrieving the the selected checkbox values in the same JSP why are you doing that?
Nitin Belaram wrote:
Display.jsp is the same page in which i had defined code ,
And i am not getting
String str=request.getParameter("value");
System.out.println(" Str" + str);
it is giving null value.
Do i need to have new jsp for selected record
Mohamed Inayath wrote:
Nitin Belaram wrote:
Display.jsp is the same page in which i had defined code ,
And i am not getting
String str=request.getParameter("value");
System.out.println(" Str" + str);
it is giving null value.
Do i need to have new jsp for selected record
String str=request.getParameter("value");
From where did you get value parameter.
I believe you need to do something like String[] empValues = request.getParameter("Empid");
If you are expecting only one user selection then why are you using checkbox.
Try using radio button.
Mohamed Inayath wrote:Sorry; It should be request.getParameterValues("Empid");
Albareto McKenzie wrote:You mean the other attributes of user?
Albareto McKenzie wrote:That's because when you submit the value of your checkbox is user.getEmpid(), you should put user in the value, so all the user goes to the next page, then you have to cast it and so on...
Albareto McKenzie wrote:Let's see, now you are setting a String as the value of the field "Empid" by doing
but you don't want the id but all the object, so you can use it in the next page, so you can do:
and then in the next page:
I think this will work.
Albareto McKenzie wrote:Well, you have to use your own class, that is New_USER, I put just User for answering you faster :P
Albareto McKenzie wrote:But do you receive the New_USER?
Albareto McKenzie wrote:Edit: Please close the code tag in your message
Let's see...
If you want to use the same page you should know that the information has been sent, so you can use the given information, I would do something like that:
So you have the users, and then you just iterate the array to print in the screen...
Albareto McKenzie wrote:I think you should have a look to jsp and servlets tutorial
jsp tutorial > http://www.jsptut.com/
servlet tutorial > http://www.jsptube.com/
Albareto McKenzie wrote:Of course! You have to delete this:
ArrayList p = new ArrayList ();
ArrayList rows = new ArrayList (p);
and implement the other solution.
I repeat:
Albareto McKenzie wrote:I think you should have a look to jsp and servlets tutorial
jsp tutorial > http://www.jsptut.com/
servlet tutorial > http://www.jsptube.com/
Albareto McKenzie wrote:Let me see if I have understood... you want to have the table of users from the db and then in the same page the users that have been selected before?
Did you see how Paul cut 87% off of his electric heat bill with 82 watts of micro heaters? |