91 questions
0
votes
0
answers
60
views
Adding specific bindings per RequestContext
Within a @RequestScoped, is it possible to add bindings that are only valid for that request? i.e, any injection of beans within that context get a request specific instance (say singleton)?
0
votes
0
answers
228
views
What happen to Context Object in Go?
first I want to specify our architecture.
Client -> Grpc Gateway -> Server
In our architecture, we use a gateway to process and authenticate requests and then pass it to the Server application.
...
1
vote
0
answers
167
views
Endless Loop in apollo federation API gateway context
Trying to add authentication to my appolo projects. I have the following structure
Class AuthenticatedDataSource extends RemoteGraphQLDataSource {
willSendRequest({request, context }) {
request....
1
vote
0
answers
717
views
Spring boot requestcontextholder with completableFuture.supplyAsync
I am developing an Api using spring boot. I need to call a dependent service asynchronously.
I have an interceptor which uses RequestContextHolder from spring to get the httpservletrequest. But as the ...
1
vote
1
answer
233
views
AWS API Gateway - Is there a way to append metadata to the connection session, so it propagates to disconnect when that is triggered?
So I need to build a WebSocket API for my org. The requirements from the business are pretty typical websocket pattern stuff except for one detail:
This websocket api will be used by different teams ...
0
votes
0
answers
512
views
Why is Spring JPA deleting the ServletRequestAttributes?
In order to copy the Spring RequestAttributes into an @Async thread, I have implemented a TaskDecorator bean, based on How to enable request scope in async task executor.
@Configuration
@EnableAsync
...
1
vote
1
answer
351
views
Accessing request context object in rails router
I need to create a few dynamic routes in my rails router in the following way:
Rails.application.routes.draw do
account = Account.find_by(
subdomain: request.subdomain,
domain: request....
0
votes
1
answer
150
views
RenderViewToString conflict
In MVC Project I dynamically render a view to string using the following code.
public string RenderViewToString(string viewName, object model, RequestContext requestContext){
ViewData....
1
vote
1
answer
3k
views
Java Spring Request becomes inactive before async method is finished
I have a Java Spring Service with a RestController that calls an async method:
@RestController
public class SomeController {
@Autowired
//this is the service that contains the async-method
...
1
vote
2
answers
4k
views
micronaut @RequestScope - not creating bean per incoming http-request
I have a class the following class as RequestScope bean:
@RequestScope
class RequestContext {
private String requestId;
private String traceId;
private String authorisedId;
private String ...
0
votes
0
answers
1k
views
how to i access the request.user nestjs microservice?
I have a microservice setup with an api gateway accepting http requests and passing them to miscroservices (media-service, payment-service, etc.) using message pattern.
I can access the request.user ...
3
votes
1
answer
3k
views
Getting Request Object in Spring Webflux elastic thread
I am facing one issue.
I am calling some API's in parallel using Spring Webflux. If any child thread faces any issue, it needs to log the request. Now the issue is , for logging a normal POJO class in ...
0
votes
1
answer
1k
views
Module "django.template.context_processors" does not define a "custom_proc" attribute/class
def custom_proc(request):
"A context processor that provides 'app', 'user' and 'ip_address'."
return {
'app': 'My app',
'user': request.user,
'ip_address': request.META['REMOTE_ADDR']
}
...
0
votes
1
answer
318
views
Access request context in async code of vertx without passing it to each function
I am developing an application in Vertx. I am attaching uniqueRequestId to each request and adds it to the requestContext object, so that while printing any logs I will associate uniqueRequestId to ...
2
votes
1
answer
759
views
Add metadata to WSGIRequest object
I have Django1.9 middleware class:
class MyMiddleware(object):
def process_request(self, request):
token = self._get_or_create_token(request)
#request.context['token'] = token
...
9
votes
2
answers
31k
views
How to resolve "Could not find a declaration file for module 'request-context'. "?
I am working on three files at the moment which are index.js , index.main.js and app.js. I'm using request-context to grab a variable from index.main.js and pass it to index.js.
In app.js (A file I ...
1
vote
1
answer
2k
views
How can I send server-side events from Flask while accessing the request context?
I am trying to use Flask to send a stream of events to a front-end client as documented in this question. This works fine if I don't access anything in the request context, but fails as soon as I do.
...
0
votes
1
answer
1k
views
Accessing StreamListener headers from RequestContext or similar
I have a service which calls a dozen other services. This reads from a Kafka topic using a @StreamListener in a controller class. For traceability purposes, the same headers(original request ID) from ...
0
votes
0
answers
148
views
Cefsharp : problem with the Reqest Context of the General Usage page
I have some problems, to change user profile with cefsharp 71.0.2.
All is working good with an user1.
To change users, the General Usage Wiki page gives me the solution.
But the 3rd line of this code
...
1
vote
1
answer
122
views
ServiceStack MQ: how to populate data in RequestContext
I'm developing a JWT-based multi-tenancy system using ServiceStack. The JWT token contains shard information, and I use JwtAuthProvider to translate the JWT token to session object following ...
3
votes
0
answers
1k
views
Cefsharp OffScreen set RequestContext
I want to define a new RequestContext when using CefSharp OffScreen to prevent multiple browser instances sharing the same information (e.g. cookies).
I can simply do that with CefSharp WinForms like ...
4
votes
3
answers
9k
views
Django 1.11 context processor error: TypeError: context must be a dict rather than RequestContext'
I cannot figure out why I'm encountering a problem with Django 1.11 and RenderContext. I really need help here. This is the code I've been playing with from the official documentation for 1.11:
from ...
0
votes
1
answer
1k
views
Which is the better way to access pageflowscope variable in ADF
As we know there are multiple ways to access the page flow scope variable but which one is the right one?
ex RequestContext.getCurrentInstance().getPageFlowScope();
AdfContext.getCurrent....
0
votes
0
answers
1k
views
Primefaces Dialog Framework: RequestContext.execute - Javascript called twice
I'd like to call a javascript from bean of a dialog window, but it is executed twice!
I use the RequestContext.getCurrentInstance().execute() method. This method works perfectly if the page is not "...
0
votes
2
answers
243
views
WildFly 10 | Undertow | Create Wildfly LoginModule with access to RequestContext
i'm trying to create a login module for wildfly 10 with access to the request context. I must identify the request url. Also I have to analyse the GET parameters to check if a token is set.
How can I ...
0
votes
0
answers
836
views
Mock OperationContext.Current.RequestContext in WCF Service Unit Test
Can anyone advise on how to go about Mocking the 'RequestContext' in a WCF service.
I'm currently working on a legacy WCF service that relies heavily upon headers being set in the request context.
...
0
votes
1
answer
27
views
Django: Certain aspects of context not passing properly in live environment vs. local
I'm having a strange issue where certain values in a context from my views are not passing to the template in a production environment only. Take the following view:
def products(request,cat_id=0):
...
0
votes
0
answers
2k
views
Spring mvc request scope context across threads
In a spring MVC web application, I wanna store user information at the request scope, in the filer or interceptor I will build the user information and store it and use it later within this request.I ...
0
votes
1
answer
2k
views
RequestContext.getCurrentInstance().update doesn't work
I have a JSF page with commandbutton to show dialog and show data from datatable, but the problem RequestContext.getCurrentInstance().update doesn't update the dialog, can anyone tell me what is wrong ...
1
vote
2
answers
4k
views
How to execute javascript function which uses the callback parameters on the server/client side?
I use a JSF 2.2, a Primefaces 6.0 and a CDI. One of my page includes a script which has got two javascript functions (one of them create a chart, second of them supply new data to the chart) and a ...
6
votes
3
answers
2k
views
Primefaces: RequestContext.execute - Javascript called twice
I'm using primefaces and have a problem executing JavaScript at the end of an ajax call. I add some action to the RequestContext, and it is executed twice!
RequestContext.getCurrentInstance()....
2
votes
0
answers
437
views
Threading with primefaces tree
I have a problem of loading large data set to a primefaces tree.
Background
I have a large data set, one big list of hashmaps to be specific. I need to loop over every element of the list to build ...
2
votes
0
answers
3k
views
RequestContext.getCurrentInstance().execute() not executing Javascript function
I've been fiddling with this for a while and have not been able to get this working. There is probably something I am not understanding correctly. I want to call into a Javascript function from my ...
0
votes
2
answers
809
views
RequestContext sends response but the page doesn't change
I have a JSF page, with some components rendered if a certain value is selected in SelectOneMenu. For that I change their rendered value and call RequestContext.getCurrentInstance().update("@form").
...
0
votes
1
answer
582
views
Synchronous dialog invocation from managed bean
Is there a way to use PrimeFaces RequestContext to call a dialog defined in the JSF from a managed bean, which has a form, but synchronously, meaning that the managed bean wait its thread execution ...
0
votes
0
answers
464
views
disable close button in a dialog opened from backingbean (primefaces)
there is a bug when opening dialog from ManagedBean with:
requestcontext.getcurrentInstance().opendialog("mydialog",map,null).
I set closable to false in the map as:
map.put(“closable”, false);
but ...
1
vote
2
answers
5k
views
Pass variable from bean to primefaces page [duplicate]
Another Primefaces Newbie here.
I want to pass data from a bean to XHTML page for use in javascript. Let me make it clear that the primefaces XHTML page does not have components so a normal binding ...
0
votes
0
answers
826
views
Not able to update "growl" in template from Backing bean [duplicate]
I have a template file which contains primefaces growl component. I am using this template in another index.xhtml file. Now I am trying to add a FacesMessage from backing bean in @postconstruct ...
0
votes
1
answer
772
views
requestContext update/execute... doesn't work when <h:head> is present
I have a portlet deployed in liferay 6.2 (Tomcat 7.0.42).
I use Primefaces 4 and liferay bridge 3.2.4-ga5.
I am aware of this post:
RequestContext won't work
But I have a strange problem here:
...
2
votes
0
answers
5k
views
RequestContext.getCurrentInstance().openDialog() not working in PrimeFaces 5.1
Iam trying to implement primefaces Dialog framework. But stuck with no dialog box. Iam using spring webflow 2.3.2 and JSF 2.1.3.
My code from host Xthml page :
<p:commandButton process="@this" ...
0
votes
2
answers
9k
views
RequestContext won't work
I am having trouble to update the view from the bean in the back using PrimeFaces's RequestContext. In the example below I have a button and 2 panels. When pressing the button, I want to update one ...
2
votes
1
answer
3k
views
Using an HttpModule in MVC to return new response if AJAX request content length exceeds maximum allowed
I'm trying to create an HttpModule for my MVC application that will intercept a file upload request.
The goal is to catch the request before it's sent in order to check the content length of the ...
1
vote
1
answer
3k
views
Accessing HttpServletRequest request in child thread
I have a web application, in which i am using ScheduledThreadPoolExecutor to schedule some logic to be executed later (maybe after original web request is over). Is it possible to access/use ...
0
votes
2
answers
5k
views
InvalidDataAccessApiUsageException: No thread-bound request found:
I am trying to run a function using @Scheduled annotation.
Which in turns, call a repository save. But saving is failing with InvalidDataAccessApiUsageException. Posting my stack trace.
org....
1
vote
1
answer
3k
views
How to setThreadContextInheritable(true) via xml on Spring's dispatcherportlet and dispatcherservlet
I want to make the current request available to child threads without passing on the original request as method parameters through several layers. The application runs both as a servlet and as a ...
0
votes
1
answer
3k
views
Primefaces: Ajax update with RequestContext running only once
I have a component on my view which i want to update from my bean.
It works only once. If i press the second button nothing happen, but the bean method in the actionlistener was called.
I checked ...
1
vote
2
answers
2k
views
Accessing variables in setting.py from templates with Django 1.4
I'd like to load the site name in a template using:
{{ SITE_NAME }}
In setting.py I have:
SITE_NAME = "MySite"
and
from django.conf.global_settings import TEMPLATE_CONTEXT_PROCESSORS as TCP
...
0
votes
3
answers
219
views
GWT RequestFactory: Send changes twice
I need your help with the gwt requestfactory
considering following scenario:
I get an existing entity (let's say a invoice) from the server:
InvoiceEntityProxy invoice = request1.getInvoice();
I ...
0
votes
0
answers
414
views
Django RequestContext not available
I can't get RequestContext to work:
Traceback:
File "/Users/Admin/myapp/lib/python2.7/site-packages/django/core/handlers/base.py" in get_response
111. response = callback(...
1
vote
1
answer
65
views
Semantics of gwt's requestfactory's RequestContext.edit()
I wonder if I am right about the semantics of the method RequestContext.edit() (GWT 2.5.1).
In my opinion, the alert in the following snippet should never happen. Am I right or just wrong about the ...