[JBoss Portal] - Re: JSF 1.2 + Woodstock
by viggo.navarsete
I've done some research:
1. Downloaded source for ajax4jsf and richfaces and built it according to http://labs.jboss.com/wiki/HowToBuildRichFacesSnapshotManually
2. Created a JSF portlet where I
- bundled with the JSF Portletbridge from Sun, the richfaces-ui, richfaces-impl, richfaces-api. Also had to bundle the commons-digester and commons-beanutils for some reason.
- My web.xml look like this:
<?xml version="1.0" encoding="UTF-8"?>
| <web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
| <context-param>
| <param-name>com.sun.faces.verifyObjects</param-name>
| <param-value>false</param-value>
| </context-param>
| <context-param>
| <param-name>com.sun.faces.validateXml</param-name>
| <param-value>true</param-value>
| </context-param>
| <context-param>
| <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
| <param-value>client</param-value>
| </context-param>
|
| <!-- RichFaces and ajax4jsf settings -->
| <context-param>
| <param-name>org.ajax4jsf.SKIN</param-name>
| <param-value>blueSky</param-value>
| </context-param>
| <filter>
| <display-name>Ajax4jsf Filter</display-name>
| <filter-name>ajax4jsf</filter-name>
| <filter-class>org.ajax4jsf.Filter</filter-class>
| </filter>
| <filter-mapping>
| <filter-name>ajax4jsf</filter-name>
| <servlet-name>Faces Servlet</servlet-name>
| <dispatcher>REQUEST</dispatcher>
| <dispatcher>FORWARD</dispatcher>
| <dispatcher>INCLUDE</dispatcher>
| </filter-mapping>
|
| <servlet>
| <servlet-name>Faces Servlet</servlet-name>
| <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
| <load-on-startup>1</load-on-startup>
| </servlet>
| <servlet-mapping>
| <servlet-name>Faces Servlet</servlet-name>
| <url-pattern>/faces/*</url-pattern>
| </servlet-mapping>
| <session-config>
| <session-timeout>
| 30
| </session-timeout>
| </session-config>
| <welcome-file-list>
| <welcome-file>faces/welcomeJSF.jsp</welcome-file>
| </welcome-file-list>
| </web-app>
-my portlet.xml looks like this:
<?xml version="1.0" encoding="UTF-8"?>
| <portlet-app xmlns="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd"
| xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
| xsi:schemaLocation="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd"
| version="1.0">
|
| <portlet>
| <description>Search</description>
| <portlet-name>Search</portlet-name>
| <display-name>Search</display-name>
| <portlet-class>com.sun.faces.portlet.FacesPortlet</portlet-class>
| <!-- This is a required parameter and must point to the first page of the JSF Application -->
| <init-param>
| <description>Portlet init view page</description>
| <name>com.sun.faces.portlet.INIT_VIEW</name>
| <value>/WEB-INF/jsp/Search.jsp</value>
| </init-param>
| <expiration-cache>0</expiration-cache>
| <supports>
| <mime-type>text/html</mime-type>
| <portlet-mode>VIEW</portlet-mode>
| </supports>
| <portlet-info>
| <title>Search</title>
| <short-title>Search</short-title>
| </portlet-info>
| </portlet>
| </portlet-app>
- my jsp looks like this:
<%@page contentType="text/html"%>
| <%@page pageEncoding="UTF-8"%>
|
| <%-- RichFaces taglibs --%>
| <%@ taglib uri="http://richfaces.ajax4jsf.org/rich" prefix="rich"%>
|
| <%-- JSF taglibs --%>
| <%@taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
| <%@taglib prefix="h" uri="http://java.sun.com/jsf/html"%>
|
| <%-- portlet taglibs --%>
| <%@ page import="javax.portlet.*"%>
| <%@ taglib uri="http://java.sun.com/portlet" prefix="portlet"%>
|
|
| <portlet:defineObjects />
| <%PortletPreferences prefs = renderRequest.getPreferences();%>
|
| <f:view>
| <rich:panel>
| <f:facet name="header">
| <h:outputText value="Olympus EVOLT E-500"/>
| </f:facet>
| </rich:panel>
| </f:view>
|
When I create a portlet instance in JBoss Portal 2.6.0.GA (running on JBoss AS 4.2.0GA) and try to access the portlet I get this stacktrace:
13:06:48,011 WARN [SkinFactoryImpl] Init parameter for a skin name changed to org.richfaces.SKIN
| 13:06:54,827 ERROR [[Faces Servlet]] Servlet.service() for servlet Faces Servlet threw exception
| java.lang.ClassCastException: org.apache.catalina.core.ApplicationContextFacade
| at com.sun.faces.portlet.FacesContextFactoryImpl.getFacesContext(FacesContextFactoryImpl.java:64)
| at org.jboss.portal.faces.portlet.JSFMetaBridgeFacesContextFactoryImpl.getFacesContext(JSFMetaBridgeFacesContextFactoryImpl.java:47)
| at org.ajax4jsf.resource.InternetResourceService.getFacesContext(InternetResourceService.java:317)
| at org.ajax4jsf.resource.InternetResourceService.getResourceContext(InternetResourceService.java:251)
| at org.ajax4jsf.resource.InternetResourceService.serviceResource(InternetResourceService.java:162)
| at org.ajax4jsf.resource.InternetResourceService.serviceResource(InternetResourceService.java:144)
| at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:259)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
| at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
| at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
| at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
| at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
| at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
| at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
| at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
| at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
| at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
| at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:241)
| at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
| at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:580)
| at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
| at java.lang.Thread.run(Thread.java:595)
|
Anyone knows what is wrong?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4071953#4071953
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4071953
18Â years, 8Â months
[JBoss Seam] - Seam2 examples - Hibernate2 Example on Tomcat 6.0.13
by muralikri_bng
Hi All
I am trying to migrate a application from seam 1.2 to Seam 2. Also from tomcat 5.5 to 6.0.13.
I was able to deploy the hibernate2 example on tomcat 5.5. But when i try to run the same application on 6.0.13 it fails to deploy.
below is the tomcat log file which gives a linkageError. Should i change anything else other than the server.xml where i have specified the datasource. Any pointers as to where to look would be appreciated.
Thx in advance.
Murali
Aug 8, 2007 2:00:14 PM org.apache.catalina.core.StandardContext listenerStart
SEVERE: Exception sending context initialized event to listener instance of class com.sun.faces.config.ConfigureListener
java.lang.LinkageError: loader constraints violated when linking javax/el/ExpressionFactory class
at com.sun.faces.config.ConfigureListener.registerELResolverAndListenerWithJsp(ConfigureListener.java:1595)
at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:419)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3827)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4334)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
at org.apache.catalina.core.StandardService.start(StandardService.java:516)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
at org.apache.catalina.startup.Catalina.start(Catalina.java:566)
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.catalina.startup.Bootstrap.start(Bootstrap.java:288)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
Aug 8, 2007 2:00:19 PM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: contextInitialized()
Aug 8, 2007 2:00:19 PM org.apache.catalina.core.ApplicationContext log
INFO: SessionListener: contextInitialized()
Aug 8, 2007 2:00:46 PM org.apache.catalina.core.ApplicationContext log
INFO: SessionListener: contextDestroyed()
Aug 8, 2007 2:00:46 PM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: contextDestroyed()
Aug 8, 2007 2:00:52 PM org.apache.catalina.core.StandardContext listenerStart
SEVERE: Exception sending context initialized event to listener instance of class com.sun.faces.config.ConfigureListener
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4071950#4071950
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4071950
18Â years, 8Â months
[Tomcat, HTTPD, Servlets & JSP] - Rendering issues with TC6 in JBossAS 4.2.1
by baz
We have some rendering issues with JBoss AS4.2.1 and all of our browsers (opera,tomcat,ie).
The css is not applied correctly, so the pages do not show up as expected. With Opera and IE the pages are readable, but with Firefox it gets towards unreadability.
We are using JSF, Facelets,Seam, Richfaces.
Our pages worked well with jboss AS 4.0.5 (and the included Tomcat5.5).
Found this qoute here:
anonymous wrote : The most web servers send as type for HTML and XHTML files ?text/html?. But Tomcat 6 sends per default as type for XHTML files the type ?application/xhtml+xml?. Firefox seems to have trouble with this type
Is there a configurationb option to obtain the same behaviour as with tc5.5?
Ciao,
baz
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4071949#4071949
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4071949
18Â years, 8Â months
[JBoss AOP] - Re: Maven 2 plugin?
by stale.pedersenï¼ jboss.org
ok, so ive made a few changes and added the latest version to the http://snapshots.jboss.org/maven2 repository.
ive added support for multiple jboss-aop.xml files with the syntax described in the post above.
a updated example of the pom.xml file:
<project ....>
| ...
| <dependencies>
| <dependency>
| <groupId>org.jboss.maven.plugins</groupId>
| <artifactId>maven-jbossaop-plugin</artifactId>
| <version>1.0-SNAPSHOT</version>
| </dependency>
| ..
| </dependencies>
| ...
| <repositories>
| <repository>
| <id>snapshots.jboss.org</id>
| <name>JBoss Maven Snapshot Repository</name>
| <url>http://snapshots.jboss.org/maven2</url>
| </repository>
| </repositories>
| ...
| <plugins>
| <plugin>
| <groupId>org.jboss.maven.plugins</groupId>
| <artifactId>maven-jbossaop-plugin</artifactId>
| <version>1.0-SNAPSHOT</version>
| <executions>
| <execution>
| <id>compile</id>
| <configuration>
| <aoppaths>
| <aoppath>src/main/resources/jboss-aop.xml</aoppath>
| <aoppath>src/main/resources/jboss-aop2.xml</aoppath>
| </aoppaths>
| <!--
| <includes>
| <include>Test.class</include>
| </includes>
| -->
| </configuration>
| <goals>
| <goal>compile</goal>
| </goals>
| </execution>
| </executions>
| </plugin>
| <plugins>
| ...
| </project>
i just tested this locally on a test project and the only problem i had was that i had to comment out the plugin the first time i ran maven. if not the plugin would fail to download (if anyone have any tips, let me know). otherwise everything should work.
test it and let me know if there are other issues.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4071946#4071946
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4071946
18Â years, 8Â months