Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Tags Active Topics RSS Search Mark Forums Read

Reply
 
Thread Tools Search this Thread
  #1  
Old 24-11-2009
Member
 
Join Date: Aug 2009
Posts: 58
HTTP request attributes

The HttpServletRequest object sent to the Servlet contains attributes specific to the HTTP request. We can manipulate these attributes, add, remove.

I wish I could claim this query context throughout the execution thereof, that is to say being able to feed, read, modify, over the descent to my various objects and subobjects.

However, I feel it is not possible to access the context of a static query, and the only way to access and disseminate the HttpServletRequest object received at the servlet in my various objects and subobjects (too heavy for me to implement it).

Someone would have any idea on the issue, or another way to have a query context usable anywhere, anytime?
Reply With Quote
  #2  
Old 24-11-2009
Member
 
Join Date: Apr 2008
Posts: 1,948
Re: HTTP request attributes

I do not really understand why you would need this object out of your controller. Basically for a receipt of the request you should extract the data necessary for your treatment and delegate to your logic layers the only information they need. After that maybe we passed the code can be better understood.
Reply With Quote
  #3  
Old 24-11-2009
Member
 
Join Date: Aug 2009
Posts: 58
Re: HTTP request attributes

In fact I try to set up a cache level of the request. This is because I have data that is updated in real time, and my average requests access to a hierarchy of at least 10 different objects. However, the time of a request, keep the same data from beginning to end is tolerable. This gives a sequence like:
- Initialization of Servlet
- Call 1 object hierarchy
- Request object hierarchy 2
- ...
- ...
- Call no object hierarchy
=> Demand access to real-time object X
=> Object missing from the query context, access to the object
=> Backup of the object in the query context
- ...
- ...
- ...
- ...
- Request object hierarchy m
=> Demand access to real-time object X
=> Object already present in the query context, no new access to the object
- ...
- ...
Reply With Quote
  #4  
Old 24-11-2009
Member
 
Join Date: Apr 2008
Posts: 1,948
Re: HTTP request attributes

In fact, for the moment I move into a static object that will handle a hashmap with id as key to the current thread. This will simulate the cache "request", since a different thread for each request. Of course, he may need some method to synchronize and manage errors.
Reply With Quote
Reply

  TechArena Community > Software > Software Development
Tags: , , , ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "HTTP request attributes"
Thread Thread Starter Forum Replies Last Post
SMS from Python using HTTP request thomasqueen Software Development 1 12-02-2013 10:46 AM
Send Http Request In Java ramsun Software Development 5 26-02-2010 09:55 PM
How to set attributes into request object in PHP? Luz Software Development 5 25-02-2010 10:36 PM
How to fix http 400 bad request Beans Technology & Internet 3 22-08-2009 05:32 PM
HTTP 400 Bad Request adyf Vista Help 2 04-11-2008 02:33 AM


All times are GMT +5.5. The time now is 11:01 PM.