File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSF and the fly likes Stuck making JSF 2.0 work with MyFaces Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » JSF
Reply Bookmark "Stuck making JSF 2.0 work with MyFaces" Watch "Stuck making JSF 2.0 work with MyFaces" New topic
Author

Stuck making JSF 2.0 work with MyFaces

Cristian Jujea
Greenhorn

Joined: Feb 20, 2010
Posts: 3
Hi everybody,

I'm trying to solve the file upload lack in JSF 2.0 using MyFaces. I'm trying with a very simple example:


<?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"
xmlns:t="http://myfaces.apache.org/tomahawk">

<body>
<h:form enctype="multipart/form-data" id="myForm">
firstName : <h:inputText value="#{user.firstName}" /><br />
lastName : <h:inputText value="#{user.lastName}" /><br />
pic : <t:inputFileUpload id="file" storage="file" accept="image/*" styleClass="myStyle" value="#{user.file}"/><br />
<h:commandButton action="#{user.createUser}" value="Create user"/>
</h:form>
</body>
</html>


The problem is that the page does not get transformed. In the browser I get the exact same code above, not the XHTML code expected.
Please tell me, how can I solve this?
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Stuck making JSF 2.0 work with MyFaces
 
Similar Threads
Facelets Problem
<h:commandLink> is not working in JSF 2.0
Bug in chrome
JSF with Ajax question (apache myFaces Tomahawk)
First Cup: Java EE Tutorial