|
-
February 21st, 2006, 06:42 AM
#16
Re: Difference between request.getParameter() and request.getAttribute()
Byron i posted with Title "Sort data of excel file through core java"
plz tell me
Thanks vaibhav
-
February 21st, 2006, 06:46 AM
#17
Re: Difference between request.getParameter() and request.getAttribute()
Sorry but I don't see the thread there. Did you create a new one?
-
February 21st, 2006, 11:45 PM
#18
Re: Difference between request.getParameter() and request.getAttribute()
Hello byron,
Thanks a lot , i posted new thread with title "Sort data of excel file through core java ".
Please provide me solu. as soon as possible.
Yours admiring friend
Vaibhav
-
January 22nd, 2007, 01:21 AM
#19
Re: Difference between request.getParameter() and request.getAttribute()
hi
can u help me.........
wats the error in this
String id = request.getParameter("email");
System.out.println("value"+id);
its showing "unreachable code"
thank you
jittu
-
January 22nd, 2007, 01:45 AM
#20
Re: Difference between request.getParameter() and request.getAttribute()
Hi,
Firstly, please could you start a new thread for a new question.
Secondly, please post more code, it's hard to see what code is unreachable whith only those 2 lines of code.
Byron Tymvios
Please use [ CODE ] and [/ CODE ] tags when posting code! See THIS on how to use code tags.
-
December 19th, 2007, 03:01 AM
#21
Re: Difference between request.getParameter() and request.getAttribute()
hi,
i have a question regarding getting/setting parameters at html/jsp.
Code:
<input type="hidden" id="mode" name="mode">
its value is set thru javascript depending on case and then retrieved in servlet like:
Code:
String mode = request.getParameter("mode");
now i need to reset its value to blank wen it goes back to jsp but m not able to do it. m using following at onload event of <body>
Code:
document.getElementById('mode').value = '';
i assume as an alternate, using getAttribute/setAttribute is not a ryt approach. so how to reset its value once the page loads?
in need of some kind guidance!
regards,
rabs
-
December 19th, 2007, 04:58 AM
#22
Re: Difference between request.getParameter() and request.getAttribute()
You'd probably be better off posting a new thread instead of replying to a post that's a year old...
A prudent question is one-half of wisdom...
F. Bacon
Please use [CODE]...your code here...[/CODE] tags when posting code. If you get an error, please post the full error message and stack trace, if present.
-
December 27th, 2007, 10:11 PM
#23
Re: Difference between request.getParameter() and request.getAttribute()
getAttribute() is used to access values in the HTTP header. You can do setAttribute and this value is set into the HTTP header when transmitting to the server. However , there is no setParameter as these parameter are expected to come from the form only.
-
April 5th, 2012, 02:30 AM
#24
Re: Difference between request.getParameter() and request.getAttribute()
Byron Keep the good work and thanks for sharing knowledge.
-
April 10th, 2012, 06:34 AM
#25
Re: Difference between request.getParameter() and request.getAttribute()
Always do a request.getParameter() to extract request parameters (i.e. data sent by posting a html form ). The request.getParameter() always returns String value and the data come from client.
For example, we have first.jsp page
//First Page : first.jsp
<%@ page import="java.util.*" import="java.io.*"%>
<% request.setAttribute("PAGE", "first.jsp");%>
<jsp:forward page="/second.jsp"/>
and second.jsp
<%@ page import="java.util.*" import="java.io.*"%>
From Which Page : <%=request.getAttribute("PAGE")%><br>
Data From Client : <%=request.getParameter("CLIENT")%>
java development
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|