prashant chindhade wrote:you can put this in jsp
<form>
<input type="hidden" name="insert" value="insert">
</form>
and put this in servlet
String insert=req.getAttribute("insert");
regs
prashant
OCPJP 6, OCEWCD Java EE 6
Alexander Sales wrote:
prashant chindhade wrote:you can put this in jsp
<form>
<input type="hidden" name="insert" value="insert">
</form>
and put this in servlet
String insert=req.getAttribute("insert");
regs
prashant
Please put your code in the code bracket.
ashley Jug wrote:Thanks a lot Prashant it did resolved my problem. Last question, when do we use request.setAttribute?
.
OCPJP 6, OCEWCD Java EE 6
Stoian Azarov wrote:
Alexander Sales wrote:
prashant chindhade wrote:you can put this in jsp
<form>
<input type="hidden" name="insert" value="insert">
</form>
and put this in servlet
String insert=req.getAttribute("insert");
regs
prashant
Please put your code in the code bracket.
Alexander, are you sure that you can access post request parameter "insert" using req.getAttribute() method?
I thought that only req.getParameter() will work, but maybe I am missing something.
Please confirm, so I can check in the specification.
Regards
OCPJP 6, OCEWCD Java EE 6
Let me tell you a story about a man named Jed. He made this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
|