Win a copy of Head First Agile this week in the Agile forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

WebRequest.setAttribute??  RSS feed

 
Arundhathi Menon
Ranch Hand
Posts: 113
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Am trying to make a call to HttpUnit from withtin the application . My problem layout is as follows

Layout of the Flow

1. Servlet which normally invokes the JSP

2. Call is made from the servlet to the HttpUnit class and passess the request object in the process

3. The HttpUnit class makes a call to the jsp by specifying the URL directly in the WebRequest.

The Issue:

The target JSP has 5 objects - 3 in the session scope (which will be available as call is amde from within the application)


The remaining two objects are in the request scope .

To append these objects to the WebRequest would require some method like WebRequest.set Attribute
whcich is not available.

Hence , how can the objects in the request scope be accessed or rather be forwrded as a part of the WebRequest???

regards
Menon
 
Ken Loh
Ranch Hand
Posts: 190
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sounds like you need Cactus more than you need HttpUnit. I'm not too sure if HttpUnit wraps around Cactus which if yes, then you could use getSession() or getRequest() to set your objects to the scopes.

I'm using both Cactus and HttpUnit, so I don't know if HttpUnit allows you to access the scopes. I'm only sure that from Cactus, I can.

Originally posted by Arundhathi Menon:
Hi,

Am trying to make a call to HttpUnit from withtin the application . My problem layout is as follows

Layout of the Flow

1. Servlet which normally invokes the JSP

2. Call is made from the servlet to the HttpUnit class and passess the request object in the process

3. The HttpUnit class makes a call to the jsp by specifying the URL directly in the WebRequest.

The Issue:

The target JSP has 5 objects - 3 in the session scope (which will be available as call is amde from within the application)


The remaining two objects are in the request scope .

To append these objects to the WebRequest would require some method like WebRequest.set Attribute
whcich is not available.

Hence , how can the objects in the request scope be accessed or rather be forwrded as a part of the WebRequest???

regards
Menon
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!