• Post Reply Bookmark Topic Watch Topic
  • New Topic

How to access JSP variable in java class  RSS feed

 
sachin katarki
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

How to access JSP variable in java class other than putting them in request.

Regards,
Sachin.G.K
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66207
151
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
None.
 
sachin katarki
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
best way is to put them request so used request
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66207
151
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The point is that once the response is sent to the browser, the only way to communicate back to the server is via another HTTP request.
 
surya naidu
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think Cant we do this .....give a variable on JSP

<input type ="hidden" name ="urvariable">

and Just before you submit your JSP

document.urform.urvariable.value=valuetosend;


and access it in servlet using request.getParameter();



 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66207
151
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That is exactly what the original post is talking about. What's your point?
 
surya naidu
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bear Bibeault wrote:That is exactly what the original post is talking about. What's your point?


My Bad.........missed the last part....!!!
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!