| Author |
Help me in send redirct
|
mallikarjun dontamsetti
Ranch Hand
Joined: Mar 18, 2011
Posts: 236
|
|
Hi,
I am designing some sample project which should connect to database, and get data and display it in jsp using JSTL.It is working well The worst part is to edit,view,delete (fields at end of each row) they are links and i have to send it to servlet and get data for particular field and display back in jsp(MVC Archetecture).
Please help me to Redirect the link to Servlet
It display like
Empnumber First Name Last Name Gender Age Address Options
1 Ramya Swati FeMale 26 somelocationl Edit Add Delete
2 Raj Kumar Male 23 somelocationl Edit Add Delete
3 Kalpana Fe Male 25 somelocationl Edit Add Delete
4 Raja Pintu Male 19 somelocationl Edit Add Delete
When i click the link it should redirect to servlet and get data of the row from servlet and display it in JSP
|
 |
Vic Hood
Ranch Hand
Joined: Jan 05, 2011
Posts: 477
|
|
Hi
You could use something like
|
Learning and Learning!-- Java all the way!
|
 |
mallikarjun dontamsetti
Ranch Hand
Joined: Mar 18, 2011
Posts: 236
|
|
|
I want to redirect to servlet
|
 |
Vic Hood
Ranch Hand
Joined: Jan 05, 2011
Posts: 477
|
|
|
Well you could submit to the same jsp and have a form in the jsp that submits to your servlet?
|
 |
mallikarjun dontamsetti
Ranch Hand
Joined: Mar 18, 2011
Posts: 236
|
|
|
I am restricted to use any kind of buttons
|
 |
Vic Hood
Ranch Hand
Joined: Jan 05, 2011
Posts: 477
|
|
|
thats a weird restriction , maybe you try just specifying your servlet instead of the jsp file in my snippet . Not sure though
|
 |
mallikarjun dontamsetti
Ranch Hand
Joined: Mar 18, 2011
Posts: 236
|
|
|
What is id in your snippet
|
 |
Vic Hood
Ranch Hand
Joined: Jan 05, 2011
Posts: 477
|
|
|
Id is something i put in for your reference for say you want to uniquely identify a row in your table and then do DB operations with that particular row.
|
 |
mallikarjun dontamsetti
Ranch Hand
Joined: Mar 18, 2011
Posts: 236
|
|
|
Thanks it is working
|
 |
mallikarjun dontamsetti
Ranch Hand
Joined: Mar 18, 2011
Posts: 236
|
|
|
How to get the ID in Sevlet
|
 |
mallikarjun dontamsetti
Ranch Hand
Joined: Mar 18, 2011
Posts: 236
|
|
Hy can any one tell me how to get value from id in Servlet
I Used request.getParameter("emp_id");
But it's prints null value and i used
It is also showing null value.
Please Help me Please Urgent
|
 |
Mike Zal
Ranch Hand
Joined: May 04, 2011
Posts: 144
|
|
You should use the url tag in JSTL core library to create your URLs. It should look something like the following
This will send a request to the Servlet specified by the URL in the value attribute with two request parameters named empId and action.
|
OCJP6, OCWCD5
|
 |
 |
|
|
subject: Help me in send redirct
|
|
|