FileUpload in jsf fragement

The file upload is working fine without jsf fragement using the ManageBean and af:inputFile component.
But its working working in the jsff page. i.e., jsf fragement. When I hit the submit button the control is not passed to the managed bean.
How to upload a file using the JSF fragement.

I'm using the following form in a page fragement:
<af:form id="myf1" usesUpload="true">
<af:separator id="s4"/>
<af:spacer width="10" height="10" id="s1"/>
<af:inputFile label="Cartridge" id="if1"
value="#{IESDelegateMBean.file}"/>
<af:spacer width="10" height="10" id="s3"/>
<af:commandButton text="Install>>" id="cb1"
action="#{IESDelegateMBean.install}"/>
<af:separator id="s5"/>
</af:form>
When I click the commandButton the file is not uploaded and even the action is not invoked.

Similar Messages

  • Can't use Jakarta FileUpload in JSF?

    I am trying to use Jakarta FileUpload for uploading a file to server database. It works fine in JSP. However, when I migrate the system to JSF, it does not work again. I can find that the request type seems that is different. In JSP, the request received by Servlet is SRTServletRequest. In JSF, it is MultiPartExternalContextImpl$MultiPartServletRequestWrapper.
    When I trace the fileupload class in JSF, the jakarta fileupload cannot parse the request to List object and finally, fail to get the file(s).
    My question is, can I parse the "JSF request" to get the file(s)? If not, how can I change the request type?
    I know that there is a fileupload package in JSF, however, can it upload the file by inputstream (memory in server) only, rather than need to upload the file at a server (second storage in server) first?
    Thanks for any reply.

    I use file upload of myFaces extensions with Sun JSF RI.
    I did the following steps:
    1) Added: Tomahawk.jar to "lib" folder.
    2) Added myFaces apache filter to "web.xml". Take a look here: http://myfaces.apache.org/tomahawk/extensionsFilter.html.
    3) Added upload field to the form:
    for example:
    <t:inputFileUpload
    id="themeFile"
    value="#{themeBean.themeFile}"
    storage="file"
    required="true"
    validator="#{themeBean.validateThemeFileName}"
    style="width:100%" />
    4) Add to your Bean the following member (with setter and getter):
    private UploadedFile themeFile;
    5) On the "save" action of the form add the following code in order to extract the uploaded file:
    InputStream in = new BufferedInputStream(
    themeFile.getInputStream()); // This is the uploaded file
    BufferedOutputStream os =
    new BufferedOutputStream(new FileOutputStream(newFile)); // newFile is the file you would like to store on the server
    byte[] data = new byte[BUFFER_SIZE];
    int readSize;
    while ((readSize = in.read(data, 0, BUFFER_SIZE)) != -1)
    os.write(data, 0, readSize);
    in.close();
    os.close();
    Hope it helps . . .

  • JSF 1.2 and  

    Hello!
    I used MyFaces + Facelets and have no problems with After switching to JSF 1.2_01 I getting this strange error:
    XML Parsing Error: undefined entity
    Location: http://boris.nikom.ru:8080/test.jsf
    Line Number 16, Column 14: <tr><td> </td></tr>
    The original file looks like (please note I use &#160; not   directly):
    <!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:ui="http://java.sun.com/jsf/facelets"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:t="http://myfaces.apache.org/tomahawk">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <head>
    <link rel="STYLESHEET" type="text/css" href="/css/style.css"/>
    </head>
    </head>
    <body>
    <table>
    <tr><td>&#160;</td></tr>
    </table>
    </body>
    </html>
    My enviroment is: Resin 3.0.20, JSF 1.2_01, Facelets 1.1.11
    WEB-INF/lib context:
    commons-beanutils-1.7.0.jar commons-logging-1.0.4.jar
    commons-codec-1.3.jar el-api.jar
    commons-collections-3.1.jar el-ri.jar
    commons-digester-1.6.jar jsf-api.jar
    commons-el-1.0.jar jsf-facelets.jar
    commons-fileupload.jar jsf-impl.jar
    commons-lang-2.1.jar

    Hello!
    Detailed explanation of problem:
    1) FireFox send HTTP Accept header with text/xml,application/xml,application/xhtml+xml ... etc
    2) JSF 1.2 returns Content-Type: application/xhtml+xml
    3) Based on the return type FireFox tries to validate XML and fails.
    MyFaces always returns content-type text/html. So, question to gurus - is this correct behavior of JSF 1.2 or should be reported as bug?
    With respect,
    Boris

  • Document.ready() in jQuery

    Hi,
    On jsf fragement page, I want to do something when the is loaded. So, in jQuery, I do this.
    <af:resource xmlns:af="http://xmlns.oracle.com/adf/faces/rich type="javascript">
    $(document).ready(function() {
    // Handler for .ready() called.
    alert('load');
    $("input[name='" + "T:prof:businessS:viewbusiness:oliit4" + "']").attr("readonly", true);
    </af:resource>
    The ready() is called only when the page is just loaded. If I go to another page, and come back to the page, ready() is not invoked. If I hit “F5” to refresh the page, I got the alert. Is it supposed to fire the alert every time a page is loaded or “clicked”?
    Thank you.

    can you try having a pageTemplate and use the template in all your page..
    and inside the pageTemplate you can have the following code
    <af:clientListener method="loadJquery()" type="load"/>and at the top you can have as
    function loadJquery() {
          $(document).load().scrollTop(0); // or any other code
         }

  • JDev hangs when opening a file in customization role

    Using JDev PS5.
    when I open JDev in default role, everything works fine.
    When i open JDev in customization role everything seems to work fine at first but when I double click on a file to open it, JDev just hangs. It mostly happens when I try to open a taskflow definition. JSF fragements sometimes work, sometimes don't...
    It's quite difficult for me to work because I work a lot with WebCenter and I have to customize a lot of taskflows...
    I tried uninstalling JDev and installing it again... Didn't work.
    I don't have a clue how to solve this...
    Edited by: Yannick Ongena on Sep 3, 2012 11:15 AM

    Just as a reference...
    This is a known bug in JDev with the WebCenter extensions and has been resolved in patch 13948973.

  • How to get file input stream from the client machine by JSF Fileupload API?

    Dear Friends,
    How to get the file input stream from the client machine by JSF HtmlFileupload or fileupload API. At present, if i execute the file upload code in the client machine, it is able to get the local path of the file and looking for the file in server machine. So i am getting FileNotFoundException.
    E.g., If a file is located at client machine at following location means "C:\Test\Test.txt",
    uploadClass.getFileuploadComponent().getFilename().toString() returns "C:\Test\Test.txt". But it is looking for that file in server and throwing FileNotFoundException.
    Please post your replies soon.
    Thanks,
    JP

    Depends on which version of JSF you're using. If JSF 1.2, I wouldn't even bother trying to hack this into JSF itself unless you can use something like Seam 2 or richfaces.
    http://docs.jboss.org/richfaces/latest_3_3_X/en/devguide/html/rich_fileUpload.html
    http://docs.jboss.org/seam/2.2.1.CR3/reference/en-US/html/controls.html#d0e29259 (look for s:fileUpload)
    But if I were you, a simple non-jsf form with a servlet works best for taking file uploads.
    As for JSF 2.0, there are other ways of getting it done.
    http://balusc.blogspot.com/2009/12/uploading-files-with-jsf-20-and-servlet.html

  • JSF 2.0 FileUpload - form-data Issues

    Maestros,
    I am going to be a little lengthy here, but before I continue I would like to beg for your indulgence. I am currently working on a web application using a combination of JSF/Spring and have managed to get myself in a tight corner and need some assistance from you pros out there.
    I am trying to custom implement a file uploadTag in JSF 2.0, as many of you already know, JSF 2.0 does not support form-data. Primefaces and Icesfaces and any other framework that supported form-data does not work too well with JSF 2.0. Now I am sure many of you would want to direct me to the beautiful link by Balusc http://balusc.blogspot.com/2009/12/uploading-files-with-jsf-20-and-servlet.html and or this other one by http://forums.sun.com/thread.jspa?threadID=5421845 Benjmaz. These gentle men were thourough in their explanation of how to solve this problem but I am having some issues with using their approach, and sure I'll explain.
    A brief intro to my framework,
    JSF 2.0 (jsf-api.jar, jsf-impl.jar)
    JSTL 1.2 (jstl-api.jar, jstl-impl.jar)
    Common Fileupload (commons-fileupload-1.2.1.jar)
    Common IO (commons-io-1.4.jar)
    Spring 3.0 (IOC container, I am just comfortable with this and have used it for a while)
    Tomcat 6 (Does not support Servlet 3.0)
    The example provided by Balusc does not work for me because it requires a servlet 3.0 container like GlassFish but since I am using tomcat as my servlet container I cannot use that. Now I know tomcat 7 supports servlet 3.0 but it is not production ready yet. Benjmaz on the hand provided a detailed tutorial on how this is done and I would like to use this opportunity to commend him for the good work. My system seems to be identical to what he used but for some reason, one of the classes don't want to validate.
    The code bellow just does not want to work with me. The inheritance of the UIComponentELTag does not work. It is complaining about not finding javax.servlet.jsp.tagext.Tag; in my classPath. I looked into JSTL 1.2 library and could not see it myself. The only place I could find one is in JSTL 2.1 but that also conflicted with EL foctory. It seems as if I am missing something, can someone please help? Or is there a better way to do this?
    @author Ben Mazyopa email: [email protected]
    DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
    Copyright 2009, Ben Mazyopa. All rights reserved.
    The contents of this file are subject to the terms of either the GNU
    *General Public License Version 2 only ("GPL") or the Common Development*
    and Distribution License("CDDL") (collectively, the "License"). You
    *may not use this file except in compliance with the License*
    *package org.idc.upload;*
    *import javax.el.ValueExpression;*
    *import javax.faces.component.UIComponent;*
    *import javax.faces.webapp.UIComponentELTag;*
    *public class UploadTag extends *UIComponentELTag* {
    private ValueExpression value;
    private ValueExpression target;
    public String getRendererType() { return "org.idc.upload.Upload"; }
    public String getComponentType() { return "org.idc.upload.Upload"; }
    public void setValue(ValueExpression newValue) { value = newValue; }
    public void setTarget(ValueExpression newValue) { target = newValue; }
    public void setProperties(UIComponent component) {
    super.setProperties(component);
    component.setValueExpression("target", target);
    component.setValueExpression("value", value);
    public void release() {
    super.release();
    value = null;
    target = null;
    }

    javax.servlet.ServletException: Expression Error: Named Object: fileUpload not found.
         javax.faces.webapp.FacesServlet.service(FacesServlet.java:321)
         com.ocpsoft.pretty.PrettyFilter.doFilter(PrettyFilter.java:116)
         org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:343)
         org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:99)
         org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83)
         org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355)
         org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:97)
         org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355)
         org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:60)
         org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355)
         org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:78)
         org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355)
         org.springframework.security.web.authentication.rememberme.RememberMeAuthenticationFilter.doFilter(RememberMeAuthenticationFilter.java:119)
         org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355)
         org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:54)
         org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355)
         org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:35)
         org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355)
         org.springframework.security.web.authentication.www.BasicAuthenticationFilter.doFilter(BasicAuthenticationFilter.java:177)
         org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355)
         org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:188)
         org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355)
         org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:105)
         org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355)
         org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:57)
         org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355)
         org.springframework.security.web.session.ConcurrentSessionFilter.doFilter(ConcurrentSessionFilter.java:109)
         org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355)
         org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:149)
         org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:237)
         org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:167)
         com.ocpsoft.pretty.PrettyFilter.doFilter(PrettyFilter.java:108)
         org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:343)
         org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:109)
         org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83)
         org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355)
         org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:97)
         org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355)
         org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:100)
         org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355)
         org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:78)
         org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355)
         org.springframework.security.web.authentication.rememberme.RememberMeAuthenticationFilter.doFilter(RememberMeAuthenticationFilter.java:119)
         org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355)
         org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:54)
         org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355)
         org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:35)
         org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355)
         org.springframework.security.web.authentication.www.BasicAuthenticationFilter.doFilter(BasicAuthenticationFilter.java:177)
         org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355)
         org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:188)
         org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355)
         org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:105)
         org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355)
         org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:79)
         org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355)
         org.springframework.security.web.session.ConcurrentSessionFilter.doFilter(ConcurrentSessionFilter.java:109)
         org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355)
         org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:149)
         org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:237)
         org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:167)

  • FileUpload component for jsf 1.1 RI

    I have a serious problem with finding working component for file upload
    i can't upgrade to jsf 1.2 i must use 1.1 RI
    I tired tomahawk comonent same as here: http://www.onjava.com/pub/a/onjava/2005/07/13/jsfupload.html?page=last
    but i doesn't work because uploaded file is always null because of enctype="multipart/form-data" in form element, same problem as somebody in comments.
    Then I tried ADF faces such as here: http://www.oracle.com/technology/products/jdev/htdocs/partners/addins/exchange/jsf/doc/installation.html#Dependencies
    and here
    http://www.oracle.com/technology/products/jdev/htdocs/partners/addins/exchange/jsf/doc/devguide/fileUpload.html
    but i didn't managed to get throught configuration because i can't find adfshare.jar anywhere, it is not included in adf-faces-10_1_3_0_4.zip and I need oracle.adf.view.faces.webapp.AdfFacesFilter whitch is propably in the missing jar. This result as 404 error for all jsf pages :(
    Does anyone managed to get somehow working file upload component with netbeans 5.5, tomcat 5.5 jsf 1.1 RI.
    Pleas help.

    It might be bad form to push your own library, but. :P
    You might check out the RI Sandbox, which has a calendar component. It should work in 1.1, but, if it doesn't, let me know and I'll make sure it does. :)
    http://blogs.steeplesoft.com/2007/02/23/sandbox-demo-and-nightlies-available/

  • Reg. JSF fileUpload | issue with t:inputFileUpload tag

    Hi,
    i am new to JSF and i am trying a simple file upload function using the <t:inputFileUpload> tag. But iam always getting the error in JSP compilation. Please help in resolving this issue.
    My project require to use to the Spring/JSF and i am using the following jar file in the WEB-INF/lib
    aopalliance-1.0.jar
    aopalliance-alpha1.jar
    aspectjweaver-1.5.0.jar
    cglib-nodep-2.2.jar
    commons-beanutils-1.8.3.jar
    commons-collections-2.0.20020914.020746.jar
    commons-dbcp-1.2.2.jar
    commons-digester-2.0.jar
    commons-el.jar
    commons-fileupload-1.1.1.jar
    commons-lang-2.5.jar
    commons-logging.jar
    commons-pool-1.4.jar
    javaee.jar
    jsf-api.jar
    jsf-impl.jar
    jstl.jar
    myfaces-extensions-1.0.9.jar
    ojdbc14.jar
    org.springframework.aop-3.0.2.RELEASE.jar
    org.springframework.asm-3.0.2.RELEASE.jar
    org.springframework.aspects-3.0.2.RELEASE.jar
    org.springframework.beans-3.0.2.RELEASE.jar
    org.springframework.context.support-3.0.2.RELEASE.jar
    org.springframework.context-3.0.2.RELEASE.jar
    org.springframework.core-3.0.2.RELEASE.jar
    org.springframework.expression-3.0.2.RELEASE.jar
    org.springframework.instrument.tomcat-3.0.2.RELEASE.jar
    org.springframework.instrument-3.0.2.RELEASE.jar
    org.springframework.jdbc-3.0.2.RELEASE.jar
    org.springframework.jms-3.0.2.RELEASE.jar
    org.springframework.orm-3.0.2.RELEASE.jar
    org.springframework.oxm-3.0.2.RELEASE.jar
    org.springframework.test-3.0.2.RELEASE.jar
    org.springframework.transaction-3.0.2.RELEASE.jar
    org.springframework.web.portlet-3.0.2.RELEASE.jar
    org.springframework.web.servlet-3.0.2.RELEASE.jar
    org.springframework.web.struts-3.0.2.RELEASE.jar
    org.springframework.web-3.0.2.RELEASE.jar
    spring-dao-2.0-rc1.jar
    standard.jar
    tiles-api-2.1.4.jar
    tiles-core-2.1.4.jar
    tiles-jsp-2.1.4.jar
    tomahawk12-1.1.9.jar
    Logs:
    ====
    org.apache.jasper.JasperException: Unable to compile class for JSP:
    An error occurred at line: 15 in the jsp file: /pages/dataupload/fileUpload.jsp
    The method setValue(String) in the type UIComponentTagBase is not applicable for the arguments (JspValueExpression)
    12: <body>
    13: <f:view>
    14: <h:form id="welcomeForm" enctype="multipart/form-data">
    15: <t:inputFileUpload id="fileupload" value="#{fileUploadForm.upFile}"
    16:                size="20" /><p/>
    17: <h:commandButton value="Load the file" action="#{fileUploadForm.upload}" />
    18: <t:outputText value="File Uploaded Successfully."
    An error occurred at line: 15 in the jsp file: /pages/dataupload/fileUpload.jsp
    The method setSize(String) in the type HtmlInputFileUploadTag is not applicable for the arguments (JspValueExpression)
    12: <body>
    13: <f:view>
    14: <h:form id="welcomeForm" enctype="multipart/form-data">
    15: <t:inputFileUpload id="fileupload" value="#{fileUploadForm.upFile}"
    16:                size="20" /><p/>
    17: <h:commandButton value="Load the file" action="#{fileUploadForm.upload}" />
    18: <t:outputText value="File Uploaded Successfully."
    Stacktrace:
         org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:92)
         org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:330)
         org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:439)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:349)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:327)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:314)
         org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:589)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:317)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
         com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:542)
         org.apache.myfaces.application.jsp.JspViewHandlerImpl.buildView(JspViewHandlerImpl.java:486)
         org.apache.myfaces.application.jsp.JspViewHandlerImpl.renderView(JspViewHandlerImpl.java:337)
         com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:127)
         com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
         com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
         javax.faces.webapp.FacesServlet.service(FacesServlet.java:313)
         org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:341)

    Hi,
    But i have defined my upFile as a org.apache.myfaces.custom.fileupload.UploadedFile. So that i can use this object for retieving the uploaded file contents.
    i am using JSF and tomahawk here to aceive that...but i am ending with the same error. please help.
    Code for the File Upload:
    ===================
    import java.io.IOException;
    import java.io.InputStream;
    import org.apache.myfaces.custom.fileupload.UploadedFile;
    public class FileUploadForm {
         private UploadedFile upFile;
    boolean rendSuccess=false;
    boolean rendFailure=false;
    public FileUploadForm(){
    public UploadedFile getUpFile(){
    return upFile;
    public void setUpFile(UploadedFile upFile){
    this.upFile = upFile;
    public boolean getRendSuccess(){
    return rendSuccess;
    public void setRendSuccess(boolean rendSuccess){
    this.rendSuccess = rendSuccess;
    public boolean getRendFailure(){
    return rendFailure;
    public void setRendFailure(boolean rendFailure){
    this.rendFailure = rendFailure;
    public String upload() throws IOException{
    try {
    InputStream stream = upFile.getInputStream();
    long size = upFile.getSize();
    byte [] buffer = new byte[(int)size];
    stream.read(buffer, 0, (int)size);
    stream.close();
    rendSuccess=true;
    rendFailure=false;
    System.out.println("File Upload Successful.");
    return "ok";
    catch (Exception ioe) {
    System.out.println("File Upload Unsuccessful.");
    rendSuccess=false;
    rendFailure=true;
    return "no";
    }

  • JSf's FileUpload Button

    Hi, I am using JSF for my application development using Net Beans IDE and Visual Web pack when i am trying to use File Upload object at the runtime it is showing some warning like this
    com.sun.rave.web.ui.renderer.UploadRenderer::decode()
    com.sun.rave.web.ui.renderer.UploadRenderer::     Looking for id form1:fileUpload1_com.sun.rave.web.ui.upload
    com.sun.rave.web.ui.renderer.UploadRenderer::     Found id form1:fileUpload1_com.sun.rave.web.ui.upload
    what is this i don't unde stand. Can any body help me.
    Thanks,
    Rajesh.

    I don't know exactly why i was telling as warnings means i have one checkBox group component in the same page for which i have selected auto submit on change option so as and when i select any of the check box it is not giving any error other than that on tomcat console and one more thing what is happening is i am not able to select more than one check box by saying this message the previously selected check box is getting deselected.
    Thanks,
    Rajesh.

  • T:fileupload(JSF)

    I have a problem in aligning a component in JSF.I have Two buttons,there is no space between them.for one button,they have used file upload component,so giving space between them do i need to override tht in built component.
    Can anyone help me solving this.

    JSF questions are to be posted in the JSF forum: http://forum.java.sun.com/forum.jspa?forumID=427
    Back to the actual problem: you should use CSS to style the content.

  • Can not upload image of larger size in jsf

    i had some issues in file uploading. File uploading is working fine in my local machine and when i am using the www.mywebsite.com:8080/fileUpload.jsf
    but i can not upload images by using the following www.mywebsite.com/fileUpload.jsf
    Ie: without the port. I am using windows server and tomcat 5.5.27
    When i am trying to upload a bigger size image i am getting the following error
    I am using jsf(tomahawk)
    09:10:47,315 ERROR MultipartRequestWrapper:? - Exception while uploading file.
    org.apache.commons.fileupload.FileUploadException: Processing of multipart/form-data request failed. Socket read failed
    at org.apache.commons.fileupload.FileUploadBase.parseRequest(FileUploadBase.java:384)
    at org.apache.commons.fileupload.FileUploadBase.parseRequest(FileUploadBase.java:268)
    at org.apache.myfaces.webapp.filter.MultipartRequestWrapper.parseRequest(MultipartRequestWrapper.java:85)
    at org.apache.myfaces.webapp.filter.MultipartRequestWrapper.getParameter(MultipartRequestWrapper.java:181)
    at org.apache.myfaces.context.servlet.RequestParameterMap.getAttribute(RequestParameterMap.java:42)
    at org.apache.myfaces.context.servlet.AbstractAttributeMap.get(AbstractAttributeMap.java:91)
    at org.apache.myfaces.renderkit.html.HtmlResponseStateManager.getTreeStructureToRestore(HtmlResponseStateManager.java:159)
    at org.apache.myfaces.application.jsp.JspStateManagerImpl.getSequenceString(JspStateManagerImpl.java:260)
    at org.apache.myfaces.application.jsp.JspStateManagerImpl.restoreTreeStructure(JspStateManagerImpl.java:230)
    at org.apache.myfaces.application.jsp.JspStateManagerImpl.restoreView(JspStateManagerImpl.java:267)
    at org.apache.myfaces.application.jsp.JspViewHandlerImpl.restoreView(JspViewHandlerImpl.java:231)
    at org.apache.myfaces.lifecycle.RestoreViewExecutor.execute(RestoreViewExecutor.java:81)
    at org.apache.myfaces.lifecycle.LifecycleImpl.executePhase(LifecycleImpl.java:95)
    at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:70)
    at javax.faces.webapp.FacesServlet.service(FacesServlet.java:139)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
    at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:100)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
    at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:147)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
    at com.zerone.rrs.authentication.AuthenticationFilter.doFilter(AuthenticationFilter.java:100)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:172)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)
    at org.apache.coyote.ajp.AjpAprProcessor.process(AjpAprProcessor.java:444)
    at org.apache.coyote.ajp.AjpAprProtocol$AjpConnectionHandler.process(AjpAprProtocol.java:472)
    at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1286)
    at java.lang.Thread.run(Unknown Source)

    Never mind . problem solved after i restarted

  • Problem to set the path of browser button in a textbox in JSF

    Hai guys I have a page which has a textbox and a command button. When I click the command button, a save dialogue box opens through which I can navigate to only DIRECTORIES and save my content. Therefore in the backend bean I have used a JFileChooser to invoke, I get the folder path, now my problem is to place this path into the textbox. How can I do that?
    I have used the fileUpload tag but in this it select only the files but not the folder? Can anyone suggest me the solution?

    AsishAnandAsha wrote:
    Hai guys I have a page which has a textbox and a command button. When I click the command button, a save dialogue box opens through which I can navigate to only DIRECTORIES and save my content. Not possible with HTML and thus also not with JSF.
    Therefore in the backend bean I have used a JFileChooser to invoke, I get the folder path, now my problem is to place this path into the textbox. How can I do that? Java runs at the server side, so also Swing components. The client will only see the JFileChooser if it runs at the same machine as where the server runs. Which wouldn't occur in real world.
    I have used the fileUpload tag but in this it select only the files but not the folder? Can anyone suggest me the solution?This is not possible with HTML or any other client side code. As JSF just wraps and renders HTML, it can also do nothing for you. Best what you can do is to write a signed applet or Web Start application which can select directories and send it to the server side.

  • Problem in weblogic 8.1, servicepack sp5_142_08,while deploying JSF applica

    Hi ,
    i depolyed one JSF tiles application in weblogic 8.1, servicepack sp5_142_08 under windows OS enviroment .
    the problem is , when i request page it allways show display error in explore screen
    java.lang.NoClassDefFoundError: org/apache/commons/digester/Digester
         at org.apache.struts.tiles.xmlDefinition.XmlParser.()V(XmlParser.java:109)
         at org.apache.struts.tiles.xmlDefinition.I18nFactorySet.parseXmlFile(Ljavax/servlet/ServletContext;Ljava/lang/String;Lorg/apache/struts/tiles/xmlDefinition/XmlDefinitionsSet;)Lorg/apache/struts/tiles/xmlDefinition/XmlDefinitionsSet;(I18nFactorySet.java:530)
         at org.apache.struts.tiles.xmlDefinition.I18nFactorySet.parseXmlFiles(Ljavax/servlet/ServletContext;Ljava/lang/String;Lorg/apache/struts/tiles/xmlDefinition/XmlDefinitionsSet;)Lorg/apache/struts/tiles/xmlDefinition/XmlDefinitionsSet;(I18nFactorySet.java:479)
         at org.apache.struts.tiles.xmlDefinition.I18nFactorySet.createDefaultFactory(Ljavax/servlet/ServletContext;)Lorg/apache/struts/tiles/xmlDefinition/DefinitionsFactory;(I18nFactorySet.java:295)
         at org.apache.struts.tiles.xmlDefinition.I18nFactorySet.initFactory(Ljavax/servlet/ServletContext;Ljava/lang/String;)V(I18nFactorySet.java:269)
         at org.apache.struts.tiles.xmlDefinition.I18nFactorySet.initFactory(Ljavax/servlet/ServletContext;Ljava/util/Map;)V(I18nFactorySet.java:217)
         at org.apache.struts.tiles.definition.ComponentDefinitionsFactoryWrapper.init(Lorg/apache/struts/tiles/DefinitionsFactoryConfig;Ljavax/servlet/ServletContext;)V(ComponentDefinitionsFactoryWrapper.java:139)
         at org.apache.struts.tiles.TilesUtilImpl.createDefinitionsFactory(Ljavax/servlet/ServletContext;Lorg/apache/struts/tiles/DefinitionsFactoryConfig;)Lorg/apache/struts/tiles/DefinitionsFactory;(TilesUtilImpl.java:168)
         at org.apache.struts.tiles.TilesUtil.createDefinitionsFactory(Ljavax/servlet/ServletContext;Lorg/apache/struts/tiles/DefinitionsFactoryConfig;)Lorg/apache/struts/tiles/DefinitionsFactory;(TilesUtil.java:205)
         at org.apache.myfaces.tomahawk.application.jsp.JspTilesViewHandlerImpl.getDefinitionsFactory()Lorg/apache/struts/tiles/DefinitionsFactory;(JspTilesViewHandlerImpl.java:100)
         at org.apache.myfaces.tomahawk.application.jsp.JspTilesViewHandlerImpl.renderView(Ljavax/faces/context/FacesContext;Ljavax/faces/component/UIViewRoot;)V(JspTilesViewHandlerImpl.java:168)
         at org.apache.myfaces.lifecycle.RenderResponseExecutor.execute(Ljavax/faces/context/FacesContext;)Z(RenderResponseExecutor.java:41)
         at org.apache.myfaces.lifecycle.LifecycleImpl.render(Ljavax/faces/context/FacesContext;)V(LifecycleImpl.java:132)
         at javax.faces.webapp.FacesServlet.service(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V(FacesServlet.java:140)
         at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run()Ljava/lang/Object;(ServletStubImpl.java:1072)
         at weblogic.servlet.internal.ServletStubImpl.invokeServlet(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;Lweblogic/servlet/internal/FilterChainImpl;)V(ServletStubImpl.java:465)
         at weblogic.servlet.internal.TailFilter.doFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;Ljavax/servlet/FilterChain;)V(TailFilter.java:28)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V(FilterChainImpl.java:27)
         at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;Ljavax/servlet/FilterChain;)V(ExtensionsFilter.java:147)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V(FilterChainImpl.java:27)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run()Ljava/lang/Object;(WebAppServletContext.java:6987)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(Lweblogic/security/subject/AbstractSubject;Ljava/security/PrivilegedAction;)Ljava/lang/Object;(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(Lweblogic/security/acl/internal/AuthenticatedSubject;Lweblogic/security/acl/internal/AuthenticatedSubject;Ljava/security/PrivilegedAction;)Ljava/lang/Object;(SecurityManager.java:121)
         at weblogic.servlet.internal.WebAppServletContext.invokeServlet(Lweblogic/servlet/internal/ServletRequestImpl;Lweblogic/servlet/internal/ServletResponseImpl;)V(WebAppServletContext.java:3892)
         at weblogic.servlet.internal.ServletRequestImpl.execute(Lweblogic/kernel/ExecuteThread;)V(ServletRequestImpl.java:2766)
         at weblogic.kernel.ExecuteThread.execute(Lweblogic/kernel/ExecuteRequest;)V(ExecuteThread.java:224)
         at weblogic.kernel.ExecuteThread.run()V(ExecuteThread.java:183)
         at java.lang.Thread.startThreadFromVM(Ljava/lang/Thread;)V(Unknown Source)
    the same application working fine weblogic8.1 servicepack 4
    my WEB-INF\lib contain following jar file
    commons-beanutils-1.7.0.jar
    commons-codec-1.3.jar
    commons-collections-3.1.jar
    commons-digester-1.6.jar
    commons-el-1.0.jar
    commons-fileupload-1.0.jar
    commons-lang-2.1.jar
    commons-logging-1.0.4.jar
    commons-validator-1.3.1.jar
    demo-components.jar
    jasper-runtime.jar
    jsp-api.jar
    jstl-1.1.0.jar
    log4j-1.2.8.jar
    myfaces-api-1.1.5.jar
    myfaces-impl-1.1.5.jar
    oro-2.0.8.jar
    servlet-api.jar
    standard.jar
    struts-1.1.jar
    tomahawk-1.1.6.jar
    tomahawk-sandbox-1.1.6.jar
    Can any body help me , how to resolve this problem
    Thanks in Advances....

    I don't know about that, but I am using MyFaces and tomahawk with WLS8.1 sp5 jdk1.4.2_05 and it works fine.
    I do remember getting such an error when I moved from Sun RI to MyFaces and all I can recall is that it was a commons library mismatch problem or some classpath problem...

  • Problem in Tiles2 intrigation with jsf when we keep jsp in folder location

    I have download “myfaces-example-tiles-1.1.10” from official apache web site. As it is code and I hvae create new one application it is working fine with java 1.5 and tomcat 6 in my eclipse.
    This example keep jsp file page1.jsp in root folder when we move this file in any other folder it geives error.
    When I put the home.jsp file in any folder it is given the error below are details what I have done and what I want and wht is the error.
    Error message which I got:
    An Error Occurred:
    javax.faces.FacesException
    Caused by:
    java.io.IOException - Error including path '/template/template.jsp'. java.lang.NullPointerException: context
    +- Stack Trace
    javax.faces.FacesException
    at org.apache.myfaces.tomahawk.application.jsp.JspTilesTwoViewHandlerImpl.renderTilesView(JspTilesTwoViewHandlerImpl.java:126)
    at org.apache.myfaces.tomahawk.application.jsp.JspTilesTwoViewHandlerImpl.renderView(JspTilesTwoViewHandlerImpl.java:110)
    at org.apache.myfaces.lifecycle.RenderResponseExecutor.execute(RenderResponseExecutor.java:41)
    at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:146)
    at javax.faces.webapp.FacesServlet.service(FacesServlet.java:147)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:646)
    at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:436)
    at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:374)
    at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:302)
    at org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(ServletExternalContextImpl.java:426)
    at org.apache.myfaces.application.jsp.JspViewHandlerImpl.renderView(JspViewHandlerImpl.java:255)
    at org.apache.myfaces.tomahawk.application.jsp.JspTilesTwoViewHandlerImpl.renderView(JspTilesTwoViewHandlerImpl.java:92)
    at org.apache.myfaces.lifecycle.RenderResponseExecutor.execute(RenderResponseExecutor.java:41)
    at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:146)
    at javax.faces.webapp.FacesServlet.service(FacesServlet.java:147)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:349)
    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:233)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:849)
    at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
    at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:454)
    at java.lang.Thread.run(Unknown Source)
    Caused by: org.apache.tiles.TilesException: Error including path '/template/template.jsp'. java.lang.NullPointerException: context
    at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:427)
    at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:370)
    at org.apache.myfaces.tomahawk.application.jsp.JspTilesTwoViewHandlerImpl.renderTilesView(JspTilesTwoViewHandlerImpl.java:124)
    ... 31 more
    Caused by: java.io.IOException: Error including path '/template/template.jsp'. java.lang.NullPointerException: context
    at org.apache.tiles.servlet.context.ServletTilesRequestContext.forward(ServletTilesRequestContext.java:201)
    at org.apache.tiles.servlet.context.ServletTilesRequestContext.dispatch(ServletTilesRequestContext.java:185)
    at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:419)
    ... 33 more
    This is the project struture:::----
    /MCMS/WebContent
    /MCMS/WebContent/common
    /MCMS/WebContent/common/footer.jsp
    /MCMS/WebContent/common/header.jsp
    /MCMS/WebContent/common/menu.jsp
    /MCMS/WebContent/css
    /MCMS/WebContent/css/tiles.css
    /MCMS/WebContent/images
    /MCMS/WebContent/images/logo.jpg
    /MCMS/WebContent/jsp
    /MCMS/WebContent/jsp/home.jsp
    /MCMS/WebContent/META-INF
    /MCMS/WebContent/template
    /MCMS/WebContent/template/template.jsp
    /MCMS/WebContent/WEB-INF
    /MCMS/WebContent/WEB-INF/lib
    /MCMS/WebContent/WEB-INF/tlds
    /MCMS/WebContent/WEB-INF/faces-config.xml
    /MCMS/WebContent/WEB-INF/struts-tiles.tld
    /MCMS/WebContent/WEB-INF/tiles.xml
    /MCMS/WebContent/WEB-INF/tiles-config_1_1.dtd
    /MCMS/WebContent/WEB-INF/web.xml
    /MCMS/WebContent/index.jsp
    This is the jar file which I am using in my proect:
    batik-awt-util-1.6-1.jar
    batik-ext-1.6-1.jar
    batik-gui-util-1.6-1.jar
    batik-util-1.6-1.jar
    commons-beanutils-1.7.0.jar
    commons-codec-1.3.jar
    commons-collections-3.2.1.jar
    commons-digester-1.8.jar
    commons-el-1.0.jar
    commons-fileupload-1.2.1.jar
    commons-io-1.3.2.jar
    commons-lang-2.4.jar
    commons-logging-1.1.1.jar
    commons-logging-api-1.1.jar
    commons-validator-1.3.1.jar
    jstl-1.2.jar
    myfaces-api-1.1.8.jar
    myfaces-impl-1.1.8.jar
    oro-2.0.8.jar
    standard-1.1.2.jar
    tiles-api-2.0.5.jar
    tiles-core-2.0.5.jar
    tiles-jsp-2.0.5.jar
    tomahawk-1.1.10.jar
    xmlParserAPIs-2.0.2.jar
    Web.xml:------
    <?xml version="1.0" encoding="UTF-8"?>
    <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID" version="2.5">
    <display-name>MCMS</display-name>
    <!-- Tiles ViewHandler config file -->      
    <context-param>      
    <description>Tiles configuration      
    definition files and a listener need to be defined.      
    the listener will initialize JspTilesViewHandlerImpl with tiles definitions.      
    </description>
    <param-name>tiles-definitions</param-name>      
    <param-value>/WEB-INF/tiles.xml</param-value>      
    </context-param>
    <filter>
    <filter-name>extensionsFilter</filter-name>
    <filter-class>org.apache.myfaces.webapp.filter.ExtensionsFilter</filter-class>
    <init-param>
    <description>Set the size limit for uploaded files.
    Format: 10 - 10 bytes
    10k - 10 KB
    10m - 10 MB
    1g - 1 GB</description>
    <param-name>uploadMaxFileSize</param-name>
    <param-value>100m</param-value>
    </init-param>
    <init-param>
    <description>Set the threshold size - files
    below this limit are stored in memory, files above
    this limit are stored on disk.
    Format: 10 - 10 bytes
    10k - 10 KB
    10m - 10 MB
    1g - 1 GB</description>
    <param-name>uploadThresholdSize</param-name>
    <param-value>100k</param-value>
    </init-param>
    </filter>
    <filter-mapping>
    <filter-name>extensionsFilter</filter-name>
    <url-pattern>*.jsf</url-pattern>
    </filter-mapping>
    <filter-mapping>
    <filter-name>extensionsFilter</filter-name>
    <url-pattern>/faces/*</url-pattern>
    </filter-mapping>
    <welcome-file-list>
    <welcome-file>index.jsp</welcome-file>
    </welcome-file-list>
    <servlet>
    <servlet-name>Faces Servlet</servlet-name>
    <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
    <load-on-startup>1</load-on-startup>
    </servlet>
    <servlet>
    <servlet-name>SourceCodeServlet</servlet-name>
    <servlet-class>org.apache.myfaces.shared_tomahawk.util.servlet.SourceCodeServlet</servlet-class>
    </servlet>
    <servlet-mapping>
    <servlet-name>Faces Servlet</servlet-name>
    <url-pattern>*.jsf</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
    <servlet-name>Faces Servlet</servlet-name>
    <url-pattern>/jsp/*</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
    <servlet-name>SourceCodeServlet</servlet-name>
    <url-pattern>*.source</url-pattern>
    </servlet-mapping>
    </web-app>
    faces-config.xml:---
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE faces-config PUBLIC
    "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN"
    "http://java.sun.com/dtd/web-facesconfig_1_1.dtd">
    <faces-config>
    <application>
    <view-handler>org.apache.myfaces.tomahawk.application.jsp.JspTilesTwoViewHandlerImpl</view-handler>
    </application>
         <navigation-rule>
    <from-view-id>*</from-view-id>
    <navigation-case>
    <from-outcome>nav_page1</from-outcome>
    <to-view-id>/jsp/home.jsp</to-view-id>
    </navigation-case>
    </navigation-rule>
    </faces-config>
    tiles.xml:---
    <!DOCTYPE tiles-definitions
    <!ENTITY % Boolean "(true|false)">
    <!ENTITY % ContentType "(string|template|definition|object)">
    <!ENTITY % ClassName "CDATA">
    <!ENTITY % RequestPath "CDATA">
    <!ENTITY % DefinitionName "CDATA">
    <!ENTITY % BeanName "CDATA">
    <!ENTITY % PropName "CDATA">
    <!ENTITY % Location "#PCDATA">
    <!ELEMENT tiles-definitions (definition+)>
    <!ELEMENT definition (icon?, display-name?, description?, put-attribute*, put-list-attribute*)>
    <!ATTLIST definition id ID #IMPLIED>
    <!ATTLIST definition preparer CDATA #IMPLIED>
    <!ATTLIST definition extends CDATA #IMPLIED>
    <!ATTLIST definition name CDATA #REQUIRED>
    <!ATTLIST definition role CDATA #IMPLIED>
    <!ATTLIST definition template CDATA #IMPLIED>
    <!ELEMENT put-attribute (#PCDATA)>
    <!ATTLIST put-attribute id ID #IMPLIED>
    <!ATTLIST put-attribute name CDATA #REQUIRED>
    <!ATTLIST put-attribute type (string|template|definition|object) #IMPLIED>
    <!ATTLIST put-attribute value CDATA #IMPLIED>
    <!ATTLIST put-attribute role CDATA #IMPLIED>
    <!ELEMENT put-list-attribute ( (add-attribute* | item* | bean* | add-list-attribute*)+) >
    <!ATTLIST put-list-attribute id ID #IMPLIED>
    <!ATTLIST put-list-attribute name CDATA #REQUIRED>
    <!ATTLIST put-list-attribute role CDATA #IMPLIED>
    <!ELEMENT add-attribute (#PCDATA)>
    <!ATTLIST add-attribute id ID #IMPLIED>
    <!ATTLIST add-attribute type (string|template|definition|object) #IMPLIED>
    <!ATTLIST add-attribute value CDATA #IMPLIED>
    <!ATTLIST add-attribute role CDATA #IMPLIED>
    <!ELEMENT add-list-attribute ( (add-attribute* | item* | bean* | add-list-attribute*)+) >
    <!ATTLIST add-list-attribute id ID #IMPLIED>
    <!ATTLIST add-list-attribute role CDATA #IMPLIED>
    <!ELEMENT bean (set-property*)>
    <!ATTLIST bean id ID #IMPLIED>
    <!ATTLIST bean classtype CDATA #REQUIRED>
    <!ELEMENT set-property EMPTY>
    <!ATTLIST set-property id ID #IMPLIED>
    <!ATTLIST set-property property CDATA #REQUIRED>
    <!ATTLIST set-property value CDATA #REQUIRED>
    <!ELEMENT item (#PCDATA)>
    <!ATTLIST item id ID #IMPLIED>
    <!ATTLIST item classtype CDATA #IMPLIED>
    <!ATTLIST item icon CDATA #IMPLIED>
    <!ATTLIST item link CDATA #REQUIRED>
    <!ATTLIST item tooltip CDATA #IMPLIED>
    <!ATTLIST item value CDATA #REQUIRED>
    <!ELEMENT description (#PCDATA)>
    <!ATTLIST description id ID #IMPLIED>
    <!ELEMENT display-name (#PCDATA)>
    <!ATTLIST display-name id ID #IMPLIED>
    <!ELEMENT icon (small-icon?, large-icon?)>
    <!ATTLIST icon id ID #IMPLIED>
    <!ELEMENT large-icon (#PCDATA)>
    <!ATTLIST large-icon id ID #IMPLIED>
    <!ELEMENT small-icon (#PCDATA)>
    <!ATTLIST small-icon id ID #IMPLIED>
    ]>
    <tiles-definitions>
    <definition name="layout.example" template="/template/template.jsp" >
    <put-attribute name="header" value="/common/header.jsp" />
    <put-attribute name="menu" value="/common/menu.jsp" />
    </definition>
    <definition name="/home.tiles" extends="layout.example" >
    <put-attribute name="body" value="/jsp/home.jsp" />
    </definition>
    </tiles-definitions>
    template.jsp:--
    <%@ page contentType="text/html;charset=UTF-8" language="java" %>
    <%@ taglib prefix="f" uri="http://java.sun.com/jsf/core" %>
    <%@ taglib prefix="h" uri="http://java.sun.com/jsf/html" %>
    <%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles"
    %><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <head>
    <meta http-equiv="Content-Type" content="text/html;CHARSET=iso-8859-1" />
    <title>Myfaces - Tiles</title>
    <link rel="stylesheet" type="text/css" href="css/tiles.css" />
    </head>
    <f:view>
    <body>
    <div id="lftBar">
    <f:subview id="menu">
    <tiles:insertAttribute name="menu" flush="false" />
    </f:subview>
    </div>
    <div id="level0">
    <div id="level1">
    <div id="topBar">
    <f:subview id="header">
    <tiles:insertAttribute name="header" flush="false"/>
    </f:subview>
    </div>
    <div id="level2">
    <f:subview id="content">
    <tiles:insertAttribute name="body" flush="false"/>
    </f:subview>
    </div>
    </div>
    </div>
    </body>
    </f:view>
    header.jsp:---
    <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"
    %><h:graphicImage id="logo" url="/images/logo.jpg" />
    menu.jsp:--
    <%@ taglib uri="http://myfaces.apache.org/tomahawk" prefix="t"%>
    <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
    <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
    <h:form>
    <h:panelGrid columns="1" >
    <h:commandLink action="nav_page1">
    <h:outputText value="Page1" />
    </h:commandLink>
    </h:panelGrid>
    </h:form>
    ----------------------------------------

    Despite the fact that in preferences it says the folder is located in "C:\itunes
    Setting iTunes prefs -> Advanced simply sets the locaion of the iTunes Music/Media folder. It does not set the location of the iTunes folder, which the default location is \My Music\iTunes\. This contains the library files, which tells iTunes where/what everything is.
    We have drive space for 'personal' use on the C Drive. This is where I keep my itunes folder,
    Is this the \iTunes\ folder an in it is the iTunes library.itl file, iTunes music library.xml, iTunes media folder, Artwork folder, Previous iTunes libraries folder and a few other files?
    If so, hold Shift and launch iTunes. Select *Choose library* and select the *iTunes library.itl* file in this folder.
    iTunes will not create an iTunes folder in \My Music\.

Maybe you are looking for