[Beginner's Corner] - read file (resource) from archive (WAR)
by Alex Ander
Alex Ander [https://community.jboss.org/people/figwam] created the discussion
"read file (resource) from archive (WAR)"
To view the discussion, visit: https://community.jboss.org/message/796740#796740
--------------------------------------------------------------
Hi @ll,
i have a development problem, that sounds pretty simple:
Following file structure:
application.war
|- css
|-style.css
|- index.xhtml (refers to css/style.css)
|-WEB-INF
|-classes
x.y.z.ResourceReaderBean.class
Now I try to read the style.css in ResourceReaderBean bean. That seems to be not that
easy in Jboss 7.
This tries didn't work:
InputStream is = ResourceReaderBean.class.getResourceAsStream("/css/style.css");
InputStream is = Thread.currentThread().getContextClassLoader().getResourceAsStream("/css/style.css").getPath();
I tried much more, and googeled at least for 4 hours. But now I gave up. I dont have any idea how
to read the Resource in the bean.
It works perfect from outside the WAR. But i dont want to duplicate the style.css (DRY Principle). It
should be possible to read the file from WAR.
Do some of you have any idea?
Thanks
reagrds
Alex
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/796740#796740]
Start a new discussion in Beginner's Corner at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
11 years, 3 months
[JBoss Portal] - JBoss Portal in iPad?¿
by Aníbal Alonso Rodríguez-Suárez
Aníbal Alonso Rodríguez-Suárez [https://community.jboss.org/people/zaratustraelimpio] created the discussion
"JBoss Portal in iPad?¿"
To view the discussion, visit: https://community.jboss.org/message/796731#796731
--------------------------------------------------------------
Hi all, I have a portal project in which I want set the width and height for when opening an ipad. I have a folder inside the +WebContent - Css+, a +stylesheet.css+, with the following code:
+#searchString {+
+ border-radius: 3px 3px 3px 3px;+
+ font-size: 13px;+
+ line-height: 18px;+
+ padding: 4px;+
+ position: relative;+
+ z-index: 100;+
+ border-color: rgba(0, 0, 0, 0.1) rgba(225, 225, 225, 0.1) rgba(225, 225, 225, 0.1) rgba(0, 0, 0, 0.1);+
+ border-style: solid;+
+ border-width: 1px;+
+ box-shadow: 0 0 3px rgba(0, 0, 0, 0.1) inset;+
+ color: #333333;+
+ background-color: #e9eaec;+
+}+
+#webSearch {+
+ background-color: #979797;+
+ margin-top:-29px;+
+ float:right;+
+}+
Could someone help me to do this? I have little knowledge of javascript, sorry for my poor English, regards.
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/796731#796731]
Start a new discussion in JBoss Portal at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
11 years, 3 months
[EJB3] - jboss 5.1 remoting client exception from osgi ejb client app
by kaustuv.maji
kaustuv.maji [https://community.jboss.org/people/kaustuv.maji] created the discussion
"jboss 5.1 remoting client exception from osgi ejb client app"
To view the discussion, visit: https://community.jboss.org/message/796718#796718
--------------------------------------------------------------
Hi All,
Am facing problem during remote calling ejb service deployed in jboss 5.1.2 from my osgi client app following is a log stracktrace . I'm able to remote call my ejb service from standalone
+*Caused by: java.lang.reflect.UndeclaredThrowableException*+
at $Proxy52.create(Unknown Source)
*Ca+used by: java.lang.Exception: Can not make remoting client invocation due to not being connected to server.+*
+ at org.jboss.remoting.Client.invoke(Client.java:2075)+
+ at org.jboss.remoting.Client.invoke(Client.java:879)+
+ at org.jboss.invocation.unified.interfaces.UnifiedInvokerHAProxy.invoke(UnifiedInvokerHAProxy.java:220)+
+ at org.jboss.invocation.InvokerInterceptor.invokeInvoker(InvokerInterceptor.java:416)+
+ at org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:248)+
+ at org.jboss.proxy.TransactionStickyInterceptor.invoke(TransactionStickyInterceptor.java:40)+
+ at org.jboss.proxy.ejb.RetryInterceptor.invoke(RetryInterceptor.java:177)+
+ at org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:61)+
+ at org.jboss.proxy.ejb.SecurityContextInterceptor.invoke(SecurityContextInterceptor.java:64)+
+ at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:68)+
+ at org.jboss.proxy.ejb.HomeInterceptor.invoke(HomeInterceptor.java:184)+
+ at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:101)+
+ ... 20 more+
osgi client app contains following jboss 5.1.2 client jars in it's classpath
jboss-security-spi.jar
jbosssx-client.jar
jboss-javaee.jar
jboss-logging-spi.jar
concurrent.jar
jboss-aop-client.jar
jboss-ha-legacy-client.jar
jboss-ha-client.jar
jboss-client.jar
jboss-common-core.jar
jboss-integration.jar
jboss-logging-log4j.jar
jboss-serialization.jar
jboss-remoting.jar
jnp-client.jar
javassist.jar
jboss-aspect-jdk50-client.jar
trove.jar
and enviroment variables are
{java.naming.provider.url=jnp://localhost:1099, java.naming.factory.initial=org.jboss.naming.NamingContextFactory, jnp.disableDiscovery=true, java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces}
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/796718#796718]
Start a new discussion in EJB3 at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
11 years, 3 months