The absolute uri: http://java.sun.com/jsf/html cannot be resolved when running JSF 1.0 application on Wildfly 8.1 - jsf

I'm working on upgrading one of my applications from JSF 1.0 to 2.0. It runs on JBoss 4.0.3SP1 and I'm trying to make it run on WildFly 8.1 final. After some struggles, I was able to get the application compiled and deployed to WildFly but got this error, when accessing the .jsp file.
2015-07-09 07:40:08,600 ERROR [io.undertow.request] (default task-2) UT005022: Exception generating error page /errorpages/error.faces: org.apache.jasper.Jasper
Exception: JBWEB004113: **The absolute uri: http://java.sun.com/jsf/html cannot be resolved in either web.xml or the jar files deployed with this application** at org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:53) [jastow-1.0.0.Final.jar:1.0.0.Final]
at org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:147) [jastow-1.0.0.Final.jar:1.0.0.Final]
I've read the following articles but still cannot fix the problem.
JSF 1.2 on Wildfly 8 Final - weld-core-jsf is still referencing JSF 2.2 API
Can not find the tag library descriptor for http://java.sun.com/jsf/facelets
https://developer.jboss.org/wiki/StepsToAddAnyNewJSFImplementationOrVersionToWildFly
https://developer.jboss.org/wiki/DesignOfWildFlyMulti-JSFFeature
I also enabled org.jboss.jbossfaces.WAR_BUNDLES_JSF_IMPL in web.xml and disabled "weld" in WildFly and I put the following libs/files in <EAR>/lib, <WAR>/WEB-INF/lib.
jsf-api.jar
jsf-impl.jar
jstl.jar
standard.jar
html_basic.tld, jsf_core.tld
And, for JSTL, I tried different URLs, like:
<%# taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
or
<%# taglib uri="http://java.sun.com/jsp/jstl/html" prefix="h"%>
or put the URL into <html> instead of using <%#taglib>.
However, the problem cannot be resolved by the above steps.
Is there anyone had the same problem can share some experience? I'd like to see if there is a possibility I can run the JSF 1.0 code on WildFly?
Thanks in advance!

Related

spring-boot + JSF. Views *.jsf working properly but *.xhtml not

I'm using spring boot with jsf (primefaces). here you can find sample of my application. When I invoke this application using mvn spring-boot:run and access application with jsf or with xhtml everything works ok. But when I deploy this application to tomcat, xhtml page is not rendered properly. I can see page source (xhtml source, not html), but this is not wanted. I want to be able to display the same with .jsf and .xhtml.
Can anybody tell me what am I missing?
Edit:
as I reviewd this issue and it was not helpfull (I also have *.xhtml mapping for faces servlet and as I wrote before, this is working on spring-boot embedded tomcat but not on classic tomcat), I think the problem will be more related to the spring configuration, but I'm not sure what and where to change.
Thanks
Problem in spring config. Add this to file Application.java:
#Bean
public ViewResolver getViewResolver() {
InternalResourceViewResolver resolver = new InternalResourceViewResolver();
resolver.setPrefix("/view/");
resolver.setSuffix(".xhtml");
return resolver;
}

mojarra is not defined

I'm developing JSF application with mojarra.
I'm getting javascript error "mojarra is not defined".
After deploy everything is ok, ajax call works properly.
But after refreshing page, error appears.
There is lack of javascript include in head tag after refreshing.
It seems to be working very moody.
Same behavior I have on Tomcat and Glassfish, Mojarra is in version 2.0.3.
One of the reason this error can appear is by using <head>..</head> and <body>...</body> tags instead of <h:head>...</h:head> and <h:body>...</h:body>.
Namespace - xmlns:h="http://java.sun.com/jsf/html"

JSF 1.2 migration to Facelets

My all application is written with jsf 1.2
I want to use from this moment on facelets where xhtml files are .
So I have some main questions:
1.I want to
face one:upgrade to jsf 1.2 with servlets
face two:from there to upgrade to 2.0
would this two changes break my application ?
2.how to do this ? can some one explain to me ? I have been trying all day long to do it i had :
changed a file to xhtml amd changed his taglibs to xmlns such as :
<%# taglib prefix="a4j" uri="http://richfaces.org/a4j" %> will be converted to : xmlns:a4j="http://richfaces.org/a4j"
adding
<view-handler>
com.sun.facelets.FaceletViewHandler
</view-handler>
inside application in the faces config
changing file name from xxx.jsp to xxx.xhtml
adding
<context-param>
<param-name>javax.faces.DEFAULT_SUFFIX</param-name>
<param-value>.xhtml</param-value>
</context-param>
to web xml
inserting
f:view tag above all
the problem i am facing now
when *.jsf page is called the server says no page like this exists in the system...
when *.xhtml is called the page itself is blank and the server asks me to download it meaning a pop up with open and save options popes.

JSF html component on WebSphere 7.0

We are in the process of upgrading to WebSphere 7.0 on Windows 2008 R2. Our applications currently run on WebSphere 6.1 on Windows 2003.
We use custom controls we wrote using JSF 1.1 in our applications. Our controls seem to render and interact fine, however whenever we use a JSF HTML component such as:
<%# taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
...
<h:graphicImage url="#{MenuBean.bannerImagePath}" />
We get the following error:
com.ibm.ws.jsp.JspCoreException: Unable to convert string '#{MenuBean.bannerImagePath}' to class javax.el.ValueExpression for attribute url: java.lang.IllegalArgumentException: Property Editor not registered with the PropertyEditorManager
com.ibm.ws.jsp.JspCoreException: Unable to convert string '#{MenuBean.bannerImagePath}' to class javax.el.ValueExpression for attribute url: java.lang.IllegalArgumentException: Property Editor not registered with the PropertyEditorManager
at org.apache.jasper.runtime.JspRuntimeLibrary.getValueFromPropertyEditorManager(JspRuntimeLibrary.java:939)
at com.ibm._jsp._dashboard._jspx_meth_h_graphicImage_0(_dashboard.java:136)
at com.ibm._jsp._dashboard._jspx_meth_f_view_0(_dashboard.java:436)
at com.ibm._jsp._dashboard._jspService(_dashboard.java:109)
at com.ibm.ws.jsp.runtime.HttpJspBase.service(HttpJspBase.java:98)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1583)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1523)
I have found an article on IBM's website giving a possible fix:
http://www-01.ibm.com/support/docview.wss?uid=swg21318801
However I have removed the specified jars and am still receiving the error message. Again our custom controls seem to work fine under WebSphere 7's JSF 1.2.
Thanks for any help you can provide.
Mike
Listing of WEB-INF\lib
activation.jar
commons-beanutils-1.8.0.jar
commons-collections-3.2.1.jar
commons-dbcp-1.2.2.jar
commons-digester-1.8.1.jar
commons-fileupload-1.2.1.jar
commons-io-1.4.jar
commons-logging-1.1.1.jar
commons-pool-1.4.jar
concurrent.jar
dib-2.0.3.jar
ibatis-2.3.4.726.jar
ifc-3.1.0.jar
imgipt-3.0.0.7.jar
ironeyesql.jar
iText-2.1.5.jar
jasperreports-3.5.0.jar
jaxen-full.jar
jcommon-1.0.12.jar
jdom.jar
jdt-compiler-3.1.1.jar
jfreechart-1.0.9.jar
localization-3.1.0.jar
log4j-1.2.15.jar
mail.jar
mflutil-3.1.0.jar
mmwfoundation-3.1.0.jar
RapidSpellWeb.jar
saxpath.jar
Stedmans.dict
tcr-3.1.0.jar
xalan.jar
xercesImpl-2.4.0.jar
xml-apis.jar
After recompiling against JSF 1.2, rebuilding config files, and updating tld files in the WEB-INF folder, I'm happy to report our problem is fixed. Not exactly sure which fixed the problem. Thanks for your time.
Mike

javax.servlet.ServletContainerInitializer: Provider org.apache.myfaces.ee6.MyFacesContainerInitializer not a subtype

I'm trying to migrate a JSF (MyFaces, Trinidad) project from 1.2 to 2.0. I've followed this link. Below is what I've did.
1. Updated the XMLNS of faces-config.xml, web.xml, facelets.xml
2. Updated the Jar files (MyFaces 2.0.16, Trinidad 2.0.1)
3. Removed the facelets
3. Removed the ALTERNATE_VIEW_HANDLER tag from web.xml
4. Changed the classloaderMode to PARENT_LAST in WAS 8.5
We are using jspx alone and not xhtml pages. el-api 2.2 and el-ri 1.1.11 are also in our lib folder
When I start the server, I'm getting the below exception. Please help me to resolve the problem.
ContainerHelp E WSVR0501E: Error creating component com.ibm.ws.runtime.component.CompositionUnitMgrImpl#8d7ccd79
com.ibm.ws.exception.RuntimeWarning: com.ibm.ws.webcontainer.exception.WebAppNotLoadedException: Failed to load webapp: <b>Failed to load webapp: javax.servlet.ServletContainerInitializer: Provider org.apache.myfaces.ee6.MyFacesContainerInitializer not a subtype </b>
at com.ibm.ws.webcontainer.component.WebContainerImpl.install(WebContainerImpl.java:432)
at com.ibm.ws.webcontainer.component.WebContainerImpl.start(WebContainerImpl.java:718)
.......
.......
Caused by: java.util.ServiceConfigurationError: javax.servlet.ServletContainerInitializer: Provider org.apache.myfaces.ee6.MyFacesContainerInitializer not a subtype
at java.util.ServiceLoader$ServiceIterator.next(ServiceLoader.java:212)
at com.ibm.ws.webcontainer.webapp.WebAppImpl.initializeServletContainerInitializers(WebAppImpl.java:535)
at com.ibm.ws.webcontainer.webapp.WebAppImpl.initialize(WebAppImpl.java:409)

Resources