[Q/A][Java SDK (Component)]Dubbo version 2.7.13 how to get context in dubbo #14008
Unanswered
Guo-Chenxu
asked this question in
Question
Replies: 2 comments 1 reply
-
@suncairong163 @oxsean PTAL |
Beta Was this translation helpful? Give feedback.
0 replies
-
I would recommand you to try on 3.3.x |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Pre-check
Apache Dubbo Component
Java SDK (apache/dubbo)
Details
i want to use
sse
with dubbo, and now i want to get theHttpServletResponse
in from dubbo, and i have got a method from the docmy code is the same as the above.
my code:
But unfortunately, in practical operation, i failed.
Firstly, i run with the following config:
But i get
null
fromRpcContext.getContext().getResponse()
.Then, i find the protocol in doc is
rest
, so i changed my config, but it run failed:(server=servlet has the same error)
the errors are as follows:
it seems that it needs a
HttpServletDispatcher
, but i dont know how to config that (in the doc, there seem to be aweb.xml
config, but i dont know how to write that), can anyone help me? or is there any other method to usesse
with dubbo?THANKS!
Code of Conduct
Beta Was this translation helpful? Give feedback.
All reactions