aspose file tools*
The moose likes Servlets and the fly likes Simple Question ??? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of JavaScript Promises Essentials this week in the JavaScript forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Simple Question ???" Watch "Simple Question ???" New topic
Author

Simple Question ???

Manohar Karamballi
Ranch Hand

Joined: Jul 17, 2001
Posts: 227
Hai All!
What i am trying is very simple and i am not getting it.

here is my problem:
I have to servlets A & B and i am doing following things.
1) dispatching request from A to B using include method
2) Storing some dummy attribute in a session Object (Using setAttribute) in Servlet B
3) When i tried to retrieve that attribute from A using getAttribute method (After dispatching request) i am getting a null val
Also i donn have any clue whether B is getting invoked or not as
print statements (in B )are also not reflecting.

Any help in this regard is apreciable.
TIA
Rgds
Manohar
praveen_i
Greenhorn

Joined: Jul 24, 2001
Posts: 3
I don't think servlet A can retrieve the attributes set in servlet B.u said the servlet B is included in servlet A ,then the control will go to servlet B,then how can retrieve the attributes set in B.No wonder, u r getting null values.
Manohar Karamballi
Ranch Hand

Joined: Jul 17, 2001
Posts: 227
Praveen!
Thanks for ur reply. But i disagree with what u told. Actually i got through my problem using NamedDispatcher API.
Rgds
Manohar
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Simple Question ???