Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

JSP and UrlConnection  RSS feed

 
Geeta Ramasami
Ranch Hand
Posts: 72
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
If i want to read the request object of a JSP from some java class is it possible to use UrlConnection?From java class i can establish a urlConnection to JSP which will execute that JSP..In the JSP i ahve set some request objects using request.setAttribute().Is there any methods availabe in UrlConnection which enables me to read the request objects of JSP from java class.
Cheers
Geeta
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Opening a URLConnection would create a new request so what you suggest is impossible.
Your program flow seems backwards - are you trying to do all this in the context of a single user's request? If so, then it is the JSP that has control, it can call your other Java objects with whatever it wants to pass to them.
Bill
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!