myfaces

MyFaces 1.2.8 causes Tomcat 6 to crash on deployment

a 夏天 提交于 2019-12-08 09:54:15
问题 I've got a JSF app built with MyFaces 1.2.8, Facelets 1.1.14 and building it with Tomcat 6 through it's plugin in Eclipse Ganymede. I've just installed the latest versions of the above libs and on build, the app deploys ok and the server goes to start and immediately I get this: javax.servlet.ServletException: javax.crypto.BadPaddingException: Given final block not properly padded Googling this one points me towards this page the result of which is to disable the error handling of MyFaces and

Why doesn't FacesServlet find .xhtml Facelet?

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-08 07:50:37
问题 I've created an JSF Project from my Eclipse with JBoss Tools. Now I have the structure: MyProjectFolder ⌊ WebContent ⌊ WEB-INF | ⌊ lib | ⌊ faces-config.xml | ⌊ web.xml ⌊ META-INF ⌊ index.xhtml My web.xml maps the following extensions to the FacesServlet: /faces/* , *.jsf , *.faces When I now try to access /faces/index.xhtml , index.jsf and index.faces I get a 404 not found error. Only when I access index.xhtml directly I get a page but without jsf-content (what is clear for me). So my

Getting same instance of `componentType` in composite component on every use

这一生的挚爱 提交于 2019-12-07 18:35:17
问题 Hi Have this Wierd Issue in which I am using a Composite Component which I wrote and I get values from the previous use of the backing bean of the CC (the componentType bean) I don't know how to describe this better than just show the code. I'll try to be brief about it and cut the redundant parts: This is the Composite Component definition: <cc:interface componentType="dynamicFieldGroupList"> <cc:attribute name="coupletClass" /> <cc:attribute name="form" default="@form"/> <cc:attribute name=

Buffering response in heap space cause problems for large files

白昼怎懂夜的黑 提交于 2019-12-07 15:38:10
问题 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

Troubles Iterating Over A HashMap with JSF, MyFaces & Facelets

被刻印的时光 ゝ 提交于 2019-12-07 14:20:05
问题 I'm having some trouble looping over a HashMap to print out it's values to the screen. Could someone double check my code to see what I'm doing wrong. I can't seem to find anything wrong but there must be something. In a servlet, I am adding the following to the request: Map<String, String> facetValues = new HashMap<String, String>(); // Filling the map req.setAttribute(facetField.getName(), facetValues); In one case "facetField.getName()" evaluates to "discipline". So in my page I have the

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

时光毁灭记忆、已成空白 提交于 2019-12-07 10:39:06
问题 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

Getting same instance of `componentType` in composite component on every use

[亡魂溺海] 提交于 2019-12-06 12:56:41
Hi Have this Wierd Issue in which I am using a Composite Component which I wrote and I get values from the previous use of the backing bean of the CC (the componentType bean) I don't know how to describe this better than just show the code. I'll try to be brief about it and cut the redundant parts: This is the Composite Component definition: <cc:interface componentType="dynamicFieldGroupList"> <cc:attribute name="coupletClass" /> <cc:attribute name="form" default="@form"/> <cc:attribute name="list" type="java.util.List" required="true"/> <cc:attribute name="fieldNames" type="java.util.List"

f:param doesn't work with h:commandButton

倖福魔咒の 提交于 2019-12-06 09:46:55
i'm using eclipse 3.6.2 (Helios) , Tomcat 7 , MyFaces 1.2.9 i have no problem when i use f:param into the h:commandLink but when i put f:param into h:commandButton it doesn't work . what's the problem ? this sample work fine : <h:commandLink value="Click here" action="#{myBean.action}"> <f:param name="parameterName1" value="parameterValue1" /> <f:param name="parameterName2" value="parameterValue2" /> </h:commandLink> but it doesn't <h:commandButton value="Click here" action="#{myBean.action}"> <f:param name="parameterName1" value="parameterValue1" /> <f:param name="parameterName2" value=

How can a custom-validator know which commandButton was clicked

浪尽此生 提交于 2019-12-06 08:13:53
my form has several "submit" buttons, and the validation of some of the fields depends on which was pressed. How can I find that out in my custom validator? The button's client ID get also generated as name of the <input type="submit"> . The name=value of the pressed <input type="submit"> get also sent as request parameters. So you could just check for that in the request parameter map. E.g. <h:form id="formId"> ... <h:commandButton id="button1" ... /> <h:commandButton id="button2" ... /> </h:form> with the following in validate() implementation: Map<String, String> params = context

“could not initialize proxy - no session” with an open session available

余生长醉 提交于 2019-12-06 03:39:32
I work with JSF 2 (MyFaces 2.1.7 and Primefaces 3.4.2), CDI (Weld-servlet 1.1.10), JPA 2 (Hibernate 4.1.7) and Lombok 0.11.2. All this runs on Tomcat 6 and 7. I use the OpenSessionInView pattern, implemented through a Filter . @Advanced @Data @Slf4j public class TransactionalFilter implements Filter, Serializable { private static final long serialVersionUID = 999173590695648899L; @Inject private EntityManager em; @Override public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { boolean newTransaction = false;