[Tomcat, HTTPD, Servlets & JSP] - JBOSS & MP3 Streaming
by pander
Hi,
Has anyone out there come across this problem before? I have a secure site running on port 8443 which I am trying to stream MP3 audio from but Windows Media Player continually tells me that a network problem occurred and that I should check my proxy settings. The proxy settings are standard from installation. I have a servlet to byte stream the data from the site, the code is as follows:
DataInputStream dis = new DataInputStream(new FileInputStream(Constants.voicemailStore+"/"+msg));
|
| byte[] buffer = {};
| dis.read(buffer);
| dis.close();
|
| response.setContentType("audio/mpeg");
| response.setContentLength(buffer.length);
|
| ServletOutputStream out = response.getOutputStream();
| out.write(buffer);
| out.flush();
| out.close();
|
I also have another secure site running on standard secure port 443. This site runs Apache 2 and has a cgi script in place with code logically identical to the code above. Links clicked on this site work!!! Windows Media Player has no issues whatsoever with the stream.
What is going on? Why won't my servlet method work? I have scoured the internet trying to find answers to this but have not managed to find anything. Clutching at straws now I finally thought I'd better check here to see if anyone has had similar problems.
Could it be down to the port number i'm using?
Could it be a difference with JBOSS and Apache?
Please Help !!
Regards,
Paul.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3965926#3965926
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3965926
19 years, 8 months
[JBoss Seam] - @LoggedIn kills injection in beans
by bfo81
I have an abstract bean that encapsulates common functions (store, delete, etc.). It also contains some properties like the EntityManager or the Logger, which are injected. (If you wonder why I want abstract classes, then look at the DRY thread: http://www.jboss.org/index.html?module=bb&op=viewtopic&t=86529)
Concrete classes inherited all that stuff from that abstract superclass and were able to access those injected properties... until now. I added a @LoggedIn interceptor (from booking example) to the concrete class and now Seam injection does not work anymore. The injected properties from the abstract superclass as well as those from the concrete subclass are all null now. Only the EntityManager exists, but this one gets injected by EJB3, not by Seam.
If I remove @LoggedIn everything is fine again.
@Experts: Could you please have a look at the LoggedInInterceptor (from booking example) and tell me why it prevents injection in subclasses? I have absolutely no clue :(.
btw: Even when inheriting from non-abstract superclasses Seam injection also doesn't work at all anymore.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3965923#3965923
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3965923
19 years, 8 months
[JBoss Portal] - Re: NPE using JSTL format
by PeterJ
Thanks Roy: JBPORTAL-984.
To everyone else following this saga, looks like the i18n tag isn't a good alternative. Apparently the class that implements it expects an HttpRequest object to be in thread local storage, but when called from my portlet code, there is no HttpRequest object so I get an NPE:
2006-08-17 14:48:12,851 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/image].[jsp]] Servlet.service() for servlet jsp threw exception
| java.lang.NullPointerException
| at org.jboss.portal.core.servlet.jsp.taglib.PortalLib.getMessage(PortalLib.java:53)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.apache.commons.el.FunctionInvocation.evaluate(FunctionInvocation.java:172)
| at org.apache.commons.el.ExpressionEvaluatorImpl.evaluate(ExpressionEvaluatorImpl.java:263)
| at org.apache.commons.el.ExpressionEvaluatorImpl.evaluate(ExpressionEvaluatorImpl.java:190)
| at org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate(PageContextImpl.java:932)
| at org.apache.jsp.WEB_002dINF.jsp.edit_jsp._jspService(edit_jsp.java:98)
| at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
| etc.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3965919#3965919
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3965919
19 years, 8 months