Deploying a Jersey webapp on Jboss AS 7

it has already been mentioned in this post : https://community.jboss.org/message/744530#744530 , you can just ask the resteasy module to not scan for other JAX RS implementations in your webapp; just add this to your web.xml : <context-param> <param-name>resteasy.scan</param-name> <param-value>false</param-value> </context-param> <context-param> <param-name>resteasy.scan.providers</param-name> <param-value>false</param-value> </context-param> <context-param> <param-name>resteasy.scan.resources</param-name> <param-value>false</param-value> </context-param> worked fine for me

java.lang.AbstractMethodError: org.apache.xerces.dom.ElementImpl.getTextContent()Ljava/lang/String

java.lang.AbstractMethodError: org.apache.xerces.dom.ElementImpl.getTextContent()Ljava/lang/String; This will happen when there are Xerces JAR files in your WAR’s /WEB-INF/lib (or even JRE’s /lib) which is of an older version than the one internally used by the servletcontainer. The older version, which apparently implements JAXP of Java 1.4.2 or older, is missing the mentioned method which was introduced in JAXP … Read more

Character encoding JSP -displayed wrong in JSP but not in URL: “á » á é » é”

Try to set URIEncoding in {jboss.server}/deploy/jboss-web.deployer/server.xml. Ex: <Connector port=”8080″ address=”${jboss.bind.address}” maxThreads=”250″ maxHttpHeaderSize=”8192″ emptySessionPath=”true” protocol=”HTTP/1.1″ enableLookups=”false” redirectPort=”8443″ acceptCount=”100″ connectionTimeout=”20000″ disableUploadTimeout=”true” URIEncoding=”UTF-8″ />

Error starting jboss server

Looks like a bug that occurs with certain specific combinations of JRE and OS versions (see https://jira.jboss.org/jira/browse/JBAS-6981). Basically, the JBoss config is relying on reflection to return constructors in a certain order, and in some cases this order is different, causing the exception. Did you change your JRE version when you reinstalled, say from 1.6.0_17 … Read more

JBoss vs Tomcat again [closed]

First the facts, neither is better. As you already mentioned, Tomcat provides a servlet container that supports the Servlet specification (Tomcat 7 supports Servlet 3.0). JBoss AS, a ‘complete’ application server supports Java EE 6 (including Servlet 3.0) in its current version. Tomcat is fairly lightweight and in case you need certain Java EE features … Read more

How to include values from .properties file into web.xml?

You can add this class, that add all properties from your file to JVM. And add this class like context-listener to web.xml public class InitVariables implements ServletContextListener { @Override public void contextDestroyed(final ServletContextEvent event) { } @Override public void contextInitialized(final ServletContextEvent event) { final String props = “/file.properties”; final Properties propsFromFile = new Properties(); try … Read more