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
Re: Difference between request.getParameter() and request.getAttribute()
Sorry but I don't see the thread there. Did you create a new one?
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
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
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.
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
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
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.
Re: Difference between request.getParameter() and request.getAttribute()
Byron Keep the good work and thanks for sharing knowledge.
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