myfaces

java.lang.ClassNotFoundException: org.apache.myfaces.webapp.StartupServletContextListener

…衆ロ難τιáo~ 提交于 2019-12-06 01:48:30
问题 I get the following exception on startup of my JSF web application: SEVERE: Error configuring application listener of class org.apache.myfaces.webapp.StartupServletContextListener java.lang.ClassNotFoundException: org.apache.myfaces.webapp.StartupServletContextListener at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1387) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1233) at org.apache.catalina.core.StandardContext

Buffering response in heap space cause problems for large files

眉间皱痕 提交于 2019-12-06 01:20:18
I have a web server project, i get an exception while trying to download large files. The file is read and written to ServletOutputStream via streams. Sample code : private void readFromInput(BufferedInputStream fis, ServletOutputStream sout) throws IOException { byte[] buf = new byte[4096]; int c = 0; while ((c = fis.read(buf)) != -1) { sout.write(buf, 0, c); } fis.close(); } When i look at the backtrace, i see some filters are executed. Here is the some parts of the exception : javax.servlet.ServletException: #{DownloaderBean.actionDownload}: java.lang.OutOfMemoryError: Java heap space javax

ViewExpiredException on every navigation after migrating from JSF 1.2 to JSF 2.0

安稳与你 提交于 2019-12-05 12:43:23
I'm attempting to migrate an existing JSF application from JSF 1.2 to JSF 2.0. I was using MyFaces 1.2.8 and want to use MyFaces 2.0.5. What I'm experiencing with MyFaces 2.0.5 is that the initially requested page will render properly, but any attempt to navigate to another page will result in a ViewExpiredException . The message is: No saved view state could be found for the view identifier: /SomePageName.jsf (where "SomePageName" is the name of the page that I am navigating away from) If I manually type the Faces-friendly URL of the page I wanted to navigate to, such as http://localhost:8080

@SessionScoped bean injected as @ManagedProperty of a @ViewScoped acts like @RequestScoped in MyFaces, works fine in Mojarra

心已入冬 提交于 2019-12-05 02:11:24
问题 Here is my simple example: Index.xhtml in root: <?xml version='1.0' encoding='UTF-8' ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html"> <h:head> <title>Title</title> </h:head> <h:body> <h:form> <h:inputText value="#{index.variable}"></h:inputText> <h:commandButton action="#{index.submit()}" type="submit"></h:commandButton> </h:form> </h

java.lang.ClassNotFoundException: org.apache.myfaces.webapp.StartupServletContextListener

一笑奈何 提交于 2019-12-04 05:16:27
I get the following exception on startup of my JSF web application: SEVERE: Error configuring application listener of class org.apache.myfaces.webapp.StartupServletContextListener java.lang.ClassNotFoundException: org.apache.myfaces.webapp.StartupServletContextListener at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1387) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1233) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3786) at org.apache.catalina.core.StandardContext.start(StandardContext.java

Can MyFaces + CDI be used on WebLogic 12c?

旧街凉风 提交于 2019-12-04 00:33:07
I've been trying to get this setup running for a couple of days now but still no luck. Here's the test application i've been using: @Named @RequestScoped public class Test { private String test = "test"; public String getTest() { return test; } public void setTest(String test) { this.test = test; } } And in the jsf page: <h:outputText value="#{test.test}"/> Running this sample without MyFaces works fine (renders "test" like it should), but when i deploy MyFaces in the WAR file and do the necessary configuration within weblogic.xml CDI seems to stop working (or at least, the integration bewteen

dynamic ui:include with ui:fragment: component with rendered false still make inside component tree

▼魔方 西西 提交于 2019-12-03 21:36:34
I am force to use a very old version of MyFaces 2.0.5 I think, and dynamic include with EL cause so much problem, so I switch to static include with ui:fragment <ui:fragment rendered="#{filtersPopup.filterFileName == 'checkBoxFilters'}"> checkBoxFilters <ui:include src="/analytics/checkBoxFilters.xhtml" rendered="#{filtersPopup.filter != null}"/> </ui:fragment> <ui:fragment rendered="#{filtersPopup.filterFileName == 'DateRelativeFilter'}"> DateRelativeFilter <ui:include src="/analytics/DateRelativeFilter.xhtml" rendered="#{filtersPopup.filter != null}"/> </ui:fragment> <ui:fragment rendered="#

How to reference Facelets taglib in JAR from Facelets and web.xml?

落花浮王杯 提交于 2019-12-03 14:36:18
I am using the Apache MyFaces Commons Validator TagLib. How should i add this to my web.xml? The commons JAR is downloaded and resolved through Maven. XHTML (I think this is correct): <html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core" xmlns:p="http://primefaces.prime.com.tr/ui" **xmlns:mcv="http://myfaces.apache.org/commons/validators"**> web.xml: <context-param> <!-- To add additional tab libs --> <param-name>facelets.LIBRARIES</param-name> <param-value>??.xml</param-value> </context-param> EDIT : The reason why i got to

Passing action method names as arguments to facelets componenets

十年热恋 提交于 2019-12-03 06:44:31
问题 I am calling a template and am passing in parameters like below: <ui:include src="WEB-INF/Subviews/ProductEdit.xhtml"> <ui:param name="items" value="#{produtList}"></ui:param> <ui:param name="itemToEdit" value="#{productToEdit}"></ui:param> </ui:include> and in the ProductEdit.xhtml, I have something like <ui:repeat value="#{items}" var="item"> <tr> ... ... <td style="text-align: center"> <h:commandLink style="cssGenericColumn" action="#{productEditAction}"> <f:setPropertyActionListener

JSF 2.1 ViewScopedBean @PreDestroy method is not called

£可爱£侵袭症+ 提交于 2019-12-02 23:48:46
I have a method in a view Scoped Bean with the @PreDestroy annotation and another one with the @PostConstruct annotation. The @PostConstruct method is properly called every time I navigate to the page that uses this view scoped bean. However, when I navigate to a new page (which doesn't use this view scope bean) by <h:link/> , the @PreDestroy method is never called. I am not talking about changing manually the url or the end of the session , just of a navigation case. What I am missing? Thanks in advance This is by design. It will only be destoyed immediately when a POST action results in a