[JBoss Seam] - Re: trying to display a .doc file
by jazir1979
I serve files out of the DB using a custom FileServlet, with code similar to the following:
| response.setHeader("Content-Disposition", "attachment; filename=" + file.getFilename());
| response.setContentType(file.getContentType());
| response.setContentLength(file.getData().length);
| response.getOutputStream().write(file.getData());
| response.flushBuffer();
|
It sounds like you want to load yours from the filesystem, but it should be similar. The "Content-Disposition" header with value "attachment" makes it open the file in a new window.
"mikeeprice" wrote : Trying to display a an MS Word .doc file with
|
| <s:link view="/CamdenPlanVSN-1.2-1-2-08.doc" styleClass="footerLink">
| <h:outputText value="Camden Emergency Plan"/>
| </s:link>
|
| but get
|
| description The requested resource (/cwe/CamdenPlanVSN-1.2-1-2-08.seam) is not available.
|
| I can not find documentation telling how to display .doc files and other file types under Seam. For some reason it changes .doc to .seam on the file name.
|
| I would also like to bring it up in a new window such as target="_blank".
|
| Any suggestions, Thanks
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4117433#4117433
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4117433
18 years, 3 months
[EJB 3.0] - Re: Can I access ejb3.0 via corba?
by ragavgomatam
I have the snippet attached for accessing ejb via Corba. I had done it with ejb 2.0 in a distributed environment. using the undermentioned snippet For jboss I think you will have to run the "all" configuration that supports iiop. So you might want to start server with run -c all. Also deploy to the "all" configuration & check it out.
import javax.naming.Context;
| import javax.naming.InitialContext;
| import org.omg.CORBA.ORB;
| import org.omg.CosNaming.NamingContextExt;
| import org.omg.CosNaming.NamingContextExtHelper;
| ...
|
| // Obtaining a reference to the server ORB
|
| Context initialContext = new InitialContext();
| ORB orb = (ORB) initialContext.lookup("java:comp/ORB");
|
| //Invoking resolve_initial_references
| // Obtain ORB reference as shown in examples earlier in this section
| ...
| org.omg.CORBA.Object obj = orb.resolve_initial_references("NameService");
| NamingContextExt initCtx = NamingContextExtHelper.narrow(obj);
|
| ...
| //Steps above illustrate getting Initial Context with CosNaming
| // Look up the home interface using the name under which the EJB home is //bound (assuming AccountEjb)
| org.omg.CORBA.Object ejbHome = orb.string_to_object(
| "corbaname:iiop:myHost:2809/NameServiceServerRoot#mycompany/accounting");
| accountHome =
| (AccountHome)javax.rmi.PortableRemoteObject.narrow(ejbHome, AccountHome.class);
|
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4117429#4117429
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4117429
18 years, 3 months
[Security & JAAS/JBoss] - Re: Custom Authenticator class not found
by barramundi
Actually I tried that after posting this topic, but got the same error.
I edited the run.bat to include the jar file
-classpath "%JBOSS_CLASSPATH%;C:\jbosscustauth.jar"
error as below:
2008-01-07 11:02:38,796 ERROR [org.jboss.web.tomcat.security.config.JBossContextConfig] Failed to customize authenticators::
java.lang.ClassNotFoundException: TestAuthenticator
at java.net.URLClassLoader$1.run(URLClassLoader.java:199)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
at java.net.FactoryURLClassLoader.loadClass(URLClassLoader.java:575)
at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
at org.jboss.web.tomcat.security.config.JBossContextConfig.getAuthenticators(JBossContextConfig.java:108)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4117426#4117426
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4117426
18 years, 3 months