red5 和 servlet:如何获取 HttpServerRequest 和 HttpServerResponse?
我正在尝试为 red5 编写一个应用程序,它使用一些 servlet 类来打包 facebook 的请求。
客户端是 Adobe Flash Builder 应用程序。
是否可以从flex应用程序发送会话信息,以便red5客户端创建正确的HttpServletRequest和HttpServletResponse对象?
在 tomcat 中,代码为:
public void doGet (HttpServletRequest req,
HttpServletResponse res)
throws ServletException, IOException
{
HttpServletRequest request = (HttpServletRequest)req;
HttpServletResponse response = (HttpServletResponse)res;
...
}
I'm trying to write an application for red5 that uses some servlet classes in order to package a requestion for facebook.
the client side is a Adobe flash builder application.
is it possible to send session information from the flex application in order for the red5 client side to create proper HttpServletRequest and HttpServletResponse objects?
in tomcat the code would be:
public void doGet (HttpServletRequest req,
HttpServletResponse res)
throws ServletException, IOException
{
HttpServletRequest request = (HttpServletRequest)req;
HttpServletResponse response = (HttpServletResponse)res;
...
}
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
快速回答是肯定的,但我认为您可能实际上希望通过 Java EE 访问服务器的“闪存”部分。在这种情况下,您将需要通过 servlet 访问应用程序上下文,如下所示:
有了上下文,您就可以访问所有 bean 等。
有用的链接:
http://wiki.red5.org/wiki/Documentation/Tutorials/Red5DeveloperTips/FiveWaysToApplicationAdapter
Quick answer is yes, but I think you may be actually wanting access to the "flash" part of the server via Java EE. In that case you will need to access your applications context via the servlet like so:
With the context in-hand, you can access all your beans etc..
Helpful link:
http://wiki.red5.org/wiki/Documentation/Tutorials/Red5DeveloperTips/FiveWaysToApplicationAdapter