Upload file - filter problem

Hi all,
I have a problem with upload file using JSF RI 1.1 + tomahawk.
I think that the problem is in the web.inf filter definition because I get these warns:
17:11:51,875 WARN Digester:127 - [ConverterRule]{faces-config/converter} Merge(null,java.math.BigDecimal)
17:11:51,890 WARN Digester:127 - [ConverterRule]{faces-config/converter} Merge(null,java.math.BigInteger)
17:11:52,578 WARN ExtensionsFilter:34 - Please adjust your web.xml to use org.apache.myfaces.webapp.filter.ExtensionsFilter
And also this error when I click in a button to go to the upload page:
16:47:47,250 WARN ReducedHTMLParser:468 - Invalid HTML; bare lessthan sign found at line 127
When I click in the button to go to the upload pages the first time i get this error ad with the second click I get the right page.
It seems like he go to the filter the first time and then to the faces servlet the second, it is possible?
this is the code of the web.xml:
<filter>
        <filter-name>MyFacesExtensionsFilter</filter-name>
        <filter-class>
            org.apache.myfaces.component.html.util.ExtensionsFilter
        </filter-class>
        <init-param>
            <param-name>uploadMaxFileSize</param-name>
            <param-value>10m</param-value>
        </init-param>
        <init-param>
            <param-name>uploadThresholdSize</param-name>
            <param-value>100k</param-value>
        </init-param>
    </filter>
    <filter-mapping>
        <filter-name>MyFacesExtensionsFilter</filter-name>
        <servlet-name>Faces Servlet</servlet-name>
    </filter-mapping>
    And this is the code of the page with upload:
<h:form id="upload" enctype="multipart/form-data" >
                <h:outputText value="Gimme an image: "/>
                <t:inputFileUpload id="fileupload"
                value="#{fileUploadBean.myFile}"
                storage="file"
                required="true"/>
                <h:commandButton value="load it up" action="#{fileUploadBean.upload}" />
            </h:form>Anyone can help?
Thanx very much!
Message was edited by:
-Frizzi-

I don't have org.apache.myfaces.webapp.filter.ExtensionsFilter in my libraries, I only have org.apache.myfaces.component.html.util.ExtensionsFilter. I also tried to change it, but it still don't work...
I tried to redo all the process, and now I can't even access the action method in my backing bean....
I repost the the file that I use:
This is the error that I get when I try to use the action method:
16:24:11,203  WARN ReducedHTMLParser:468 - Invalid HTML; bare lessthan sign found at line 135
16:24:11,203  WARN ReducedHTMLParser:468 - Invalid HTML; bare lessthan sign found at line 180 web.inf snippet:
<filter>
        <filter-name>extensionsFilter</filter-name>
        <filter-class>org.apache.myfaces.component.html.util.ExtensionsFilter</filter-class>
        <init-param>
            <param-name>uploadMaxFileSize</param-name>
            <param-value>100m</param-value>
            <description>Set the size limit for uploaded files.
                Format: 10 - 10 bytes
                        10k - 10 KB
                        10m - 10 MB
                        1g - 1 GB
            </description>
        </init-param>
    </filter>
    <filter-mapping>
        <filter-name>extensionsFilter</filter-name>
        <url-pattern>*.shtml</url-pattern>
    </filter-mapping>
    <filter-mapping>
        <filter-name>extensionsFilter</filter-name>
        <servlet-name>Faces Servlet</servlet-name>
    </filter-mapping>JSF page:
<h:form id="upload" enctype="multipart/form-data" >
                <h:outputText value="Gimme an image: "/>
                <t:inputFileUpload id="fileupload"
                value="#{fileUploadBean.myFile}"
                storage="file"
                required="true"/>
                <h:commandButton value="load it up" action="#{fileUploadBean.upload}" />
            </h:form>BackingBean:
public class FileUploadBean {
    private UploadedFile myFile;
    private static Logger log =Logger.getLogger(FileUploadBean.class);
   public String upload() {
        log.info("FileUploadBean.upload");
        try {
        log.info("fileupload_isfile?"+ getMyFile().getBytes());
        log.info("fileupload_path"+ getMyFile().getSize());
        log.info("fileupload_name" + getMyFile().getName());
        System.out.println("myFilename" +getMyFile().getName());
        catch (Exception e){
            log.info("Errore nell'upload");
        return "ok";
    }Please help... I don't know how to solve it. Coul anyone post me a simple WORKING example?
Thanx a lot!!

Similar Messages

  • Upload file form problem in JSP portlet !!!

    Hi!
    I use "OrdHttpUploadFile" class for upload file in JSP portlet to database!
    Problem is that this class must use FORM ENCTYPE="multipart/form-data" whis I suppose dont work in portlet!?
    Which FORM ENCTYPE should I use in portlet! Or there is some other solution for upload file in JSP portlet!?
    Thanks!
    Kristjan

    Thanks for u r reply Mr.Prasad.
    Sorry for the delay for reply.
    My scenario is in 2 phases
    Phase 1. I am taking input from the front end using jsp and writing the contents in to a file and then downloading that file on to my desktop.(Now let us say this one as file downloading)
    Phase 2. Now I had designed a page,which locates the downloaded file by using the following tag.
                        <td><input type ="file" name ="xmlFileName"></td>
        In the downloaded xml file I am having applicationid. I am checking whether the application id already xists in the database (or)not.
    If already exists in the database , the end user will get one confirmation msg,saying application already exists in the database.
    If the user clicks ok again the request has to go to the servlet.
    Now the actual problems are
    1. When I locate the file on the desktop let us say c:\desktop\krish and click on submit button, it is locating to the file that is present in the server(this is the case for the first time means before checking the application id in the database).
    2. when the end user clicks "ok" on the confirmation box , I am not getting the file name,that has to be submitted to the servlet.
    Can u plz help me how to resolve this issue.
    regards,
    Krish

  • Obiee upload file filter

    Hi,
    In Obiee 11g, i'am using the new functionnality of file uploading. However, i would kniw if it's possible to do add a file filter? I want only .doc files to uploaded.
    Thanks.

    OK,
    Using firebird, i found the right JS file. I didn't finished the filter yet because i have also to check that i am in the right folder but i think i am in the right way.
    Thanks.
    However, if a new patch is installed, there is a risk to have my customizations delete. There is way to prenvent this ?

  • Image Upload - File Size Problem

    Hi,
    I have created an asp image upload page using the toolbox - everything works perfectly unless the image size is over 200KB. If an image is uploaded that exceeds 200KB then the page just empties all of the fields with no error message. I have set the limit within the image upload transaction to 3000KB. Is there something I have to do on IIS to allow larger file size uploads?
    Many thanks in advance
    Scott

    hello friend.
    a simple solution to this..
    are u using win2k3 ?
    i mean whats ur IIS version..
    if its IIS 6 then
    1.> first go to IIS server for the MMC
    2.> then right click and select the box which says allow metabase to be edited while IIS is running..
    3.>go to just go fire ur dreamweaver and browse open this folder.
    c:\windows\system32\inetsrv\metabase.xml
    is also called systempath on system drive
    changed this value
    of AspMaxRequestEntityAllowed
    to
    ="1073741824"
    it should look like this.
    AspMaxRequestEntityAllowed="1073741824"
    if there are mutiple enteries in the XML file u can safely change all these to the same value.
    Enjoy
    Moh!
    http://www.mohitech.com
    Sorry if there are spelling /grammar mistakes.. i dont bother to correct them :)

  • Problem with blocking upload file TMG 2010

    I'm using TMG 2010. I have 3 rules : 
    1/Allow Internet Access : 
    protocols : dns, http, https
    from: loclahost, internal to: External
    2/Allow Protocols :
    protocols : all traffics
    from: localhost, internal to: localhost, internal
    3/Defaul Rule : Block all.
    The problem is : i want to block upload file from internal to external so i've made HTTP filter in Allow Internet Access like this : Config HTTP --> Signature : Search in: Request Header 
     Http header: Content-Type:
     Signature: mutipart/form-data
    Methods : Block method POST
    Unfortunately, it's not work and i dont know why. If i create a rule block web, it's work. Plesase help me. Thanks !

    Hi,
    You could check the following blog to see whether you missed anything.
    How to block Attachment Uploads using Microsoft TMG
    http://www.kuwaitgeekz.com/?p=2248
    (Note: Microsoft provides third-party contact information to help you find technical support. This contact
    information may change without notice. Microsoft does not guarantee the accuracy of this third-party contact information.)
    Best Regards,
    Joyce
    We
    are trying to better understand customer views on social support experience, so your participation in this
    interview project would be greatly appreciated if you have time.
    Thanks for helping make community forums a great place.

  • Again JSF upload file problem.

    I am using My Faces to upload files. There is a way to limit the size of uploaded files.
    <filter>
            <filter-name>ExtensionsFilter</filter-name>
            <filter-class>org.apache.myfaces.component.html.util.ExtensionsFilter</filter-class>
            <init-param>
                <param-name>uploadMaxFileSize</param-name>
                <param-value>7m</param-value>
            </init-param>
            <init-param>
                <param-name>uploadThresholdSize</param-name>
                <param-value>100k</param-value>
            </init-param>
        </filter>When I try to upload bigger than 7 MB file, I receive the following log.
    2007-05-23 13:58:20,796 [http-8080-Processor24] INFO org.apache.myfaces.component.html.util.MultipartRequestWrapper - user tried to upload a file that exceeded file-size limitations.
    org.apache.commons.fileupload.FileUploadBase$SizeLimitExceededException: the request was rejected because it's size exceeds allowed range
         at org.apache.commons.fileupload.FileUploadBase.parseRequest(FileUploadBase.java:317)
         at org.apache.myfaces.component.html.util.MultipartRequestWrapper.parseRequest(MultipartRequestWrapper.java:70)
         at org.apache.myfaces.component.html.util.MultipartRequestWrapper.getParameter(MultipartRequestWrapper.java:151)
         at org.apache.myfaces.context.servlet.RequestParameterMap.getAttribute(RequestParameterMap.java:39)
         at org.apache.myfaces.context.servlet.AbstractAttributeMap.get(AbstractAttributeMap.java:87)
         at org.apache.myfaces.renderkit.html.HtmlResponseStateManager.getTreeStructureToRestore(HtmlResponseStateManager.java:181)
         at org.apache.myfaces.application.jsp.JspStateManagerImpl.restoreTreeStructure(JspStateManagerImpl.java:142)
         at org.apache.myfaces.application.jsp.JspStateManagerImpl.restoreView(JspStateManagerImpl.java:181)
         at org.apache.myfaces.application.jsp.JspViewHandlerImpl.restoreView(JspViewHandlerImpl.java:255)
         at org.apache.myfaces.lifecycle.LifecycleImpl.restoreView(LifecycleImpl.java:113)
         at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:66)
         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:94)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
         at org.apache.myfaces.component.html.util.ExtensionsFilter.doFilter(ExtensionsFilter.java:122)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
         at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
         at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
         at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
         at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
         at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
         at java.lang.Thread.run(Thread.java:595)
    By now, OK. Here comes the problem: The behavior of application is correct after this, which I can see from the rest of my log, BUT my browser continue to say that the request is being processed and that the page continues to load, which is not true, and I can not find where is the reason.
    Do you have any idea?

    Check this code if it is useful
    REPORT  ZSRK_046                                .
    DATA : FIR_FILE(512) VALUE '
    iltlvp01.t.st.corp\DE_Development\EP 6\Port\dept\Program Office\TEST.json'.
    TYPES: BEGIN OF TP_DATA_TAB,
           TEXT(512),
           END OF TP_DATA_TAB.
    DATA : DATA_TAB TYPE STANDARD TABLE OF TP_DATA_TAB,
           WA_DATA_TAB LIKE LINE OF DATA_TAB .
    DATA : WA(512).
    OPEN DATASET FIR_FILE FOR INPUT IN TEXT MODE ENCODING DEFAULT.
    IF SY-SUBRC EQ 0.
      DO.
        READ DATASET FIR_FILE INTO WA.
        IF SY-SUBRC NE 0.
          EXIT.
        ENDIF.
        WA_DATA_TAB-TEXT = WA.
        APPEND WA_DATA_TAB TO DATA_TAB.
        CLEAR : WA_DATA_TAB, WA.
      ENDDO.
    ENDIF.
    LOOP AT DATA_TAB INTO WA_DATA_TAB.
      WRITE : / WA_DATA_TAB-TEXT.
    ENDLOOP.

  • File Filter on Flex Uploader

    Hi,
    I would just like to ask for some help regarding my flex
    uploader. My problem is I can't filter the file types when i am
    uploading. For example I only wanted to see image files (.jpg,
    .png, .gif) when browsing files to upload but instead I always get
    All file types. Here's my code just in case you need it.
    thanks a lot. any feedback would be very much appreciated.

    I'm thinking you can file the following under "obvious", so
    excuse if it is...
    if you only want to see the image file types you mentioned,
    you'd have to remove the other file types (*.swf, *.bmp) passed to
    the FileFilter constructor. Also, you want to pass an Array to the
    browse() function, so use the following in your addFiles()
    function:
    _refAddFiles.browse(filesToFilter);
    and not
    _refAddFiles.browse(imageTypes);
    On Windows you'll get only the file types listed in the
    dialog box and on a Mac you'll see all files, but only the file
    types listed will be selectable, the others are grayed out. Don't
    know what it looks like on Linux.
    TS

  • Itunes Producer Problems Uploading - File not saving - file does not Exist.

    Can someone please help me out, this problem is killing me. I've uploaded over 200 UPC Albums using Old G3 and Elderly ITunes Producer, but apple asked me to upgrade, so new machine to me Macmini maverics 10.9.? ITunes Producer 3.1.
    So I click open ITunes producer 3.1. Click on make project from Audio
    Files. Name and Save the project in Music-ITunes Producer-Playlists.
    Plug in my external Flash drive and import the 40 Audio files for the
    project. I am using an external flash drive as I can’t get ITunes Producer to
    see my internal hard disk, I do not know if this is normal??
    Go through the process of saving the project to Music – ITunes Producer –
    Playlists – in this case 5060101121313
    I then go through name all Tracks and make sure that all Data is correct.
    Then when I finally go to either save the document or send it to you I get the
    first Screen shot saying
    "The Document "5060101121313" COULD NOT BE SAVED. The File does not exist".
    As I say I have delivered 200 UPC’s to you with the old software and never
    had any problems, I am in urgent need of making significant delivery to you so
    would appreciate you help ASAP.
    Paul

    I have been victorious. Now I am going to post my solution for all those that may have the same problem in the future. I'll even throw in a few key words so it will be more easily found by the search engine.
    Connection conn = null;
            try{
                //connect to database
                DAOManager dao = new DAOManager();
                conn = dao.connectToDB();
                String query = "update ASSIGNMENT set file_object = ?, filename = ?, filetype = ? where a_key = 1"; //sql query
                PreparedStatement pstmt = conn.prepareStatement(query);
                ByteArrayOutputStream baostream = new ByteArrayOutputStream();
                //write to output stream
                byte[] buffer = new byte[1024];
                int len = -1;
                while ((len = instream.read(buffer)) >= 0 )
                    baostream.write(buffer, 0, len);
                baostream.flush();
                byte[] filebytes = baostream.toByteArray();
                baostream.close();
                pstmt.setBytes(1,filebytes); //set blob
                pstmt.setString(2,filename);
                pstmt.setString(3,filetype);
                pstmt.executeUpdate();
                pstmt.close();
            catch (SQLException e) {
                System.out.println(Tools.getLoggingDate() + " upload() Error uploading file -- " + e);
                e.printStackTrace();
            catch (Exception e) {
                System.out.println(Tools.getLoggingDate() + " upload() Error: " + e);
            finally {
                try{
                    conn.close();
                }catch (SQLException e) {}
            }Keywords: setBinaryStream(), setBytes(), MySQL, upload file, InputStream, Blob

  • Problem with uploading files to SharePoint 2013 in cloud using web services. Keep getting error message and don't know why.

    Hello everyone. I am having trouble writing a utility that uses SharePoint web services to upload a file and metatag it. It keeps throwing the following error message:
    "The request failed with the error message: -- <html><head><title>Object moved</title></head><body> <h2>Object moved to <a href="/_forms/default.aspx?ReturnUrl=%2fsites%2fgk%2f_vti_bin%2fcopy.asmx">here</a>.</h2>
    </body></html> --."
    Not sure why. I pass the file that I am going to upload to the subroutine and it is suppose to upload it to the appropriate library. I have burned several days on this problem and I am not sure what is going on. I would appreciate anyone that can point me in
    the right direction. Below is the subroutine that I have that is causing the problem. Obviously, I have stripped the name from the example.
    Thanks
    Mike
    ******** <Begin snip of code> **********************
    Public Shared Sub CreateNewDocumentWithCopyService(ByVal fileName As String)
    Dim c As New copyservice.Copy
    c.PreAuthenticate = True
    c.Credentials = New System.Net.NetworkCredential("[email protected]", "mypassword")
    c.Url = "https://x.sharepoint.com/sites/gk/_vti_bin/copy.asmx"
    Dim myBinary As Byte() = System.IO.File.ReadAllBytes(fileName)
    Dim destination As String = "https://x.sharepoint.com/sites/gk/Gatekeeper%20Reference/" & System.IO.Path.GetFileName(fileName)
    Dim destinationUrl As String() = {destination}
    Dim info1 As New copyservice.FieldInformation
    info1.DisplayName = "Title"
    info1.InternalName = "Title"
    info1.Type = copyservice.FieldType.Text
    info1.Value = "new title"
    Dim info2 As New copyservice.FieldInformation
    info2.DisplayName = "Modified By"
    info2.InternalName = "Editor"
    info2.Type = copyservice.FieldType.User
    info2.Value = "-1;#servername\\testmoss"
    Dim info As copyservice.FieldInformation() = {info1, info2}
    Dim resultTest As New copyservice.CopyResult
    Dim result As copyservice.CopyResult() = {resultTest}
    Try
    ' When creating new content use the same URL in the SourceURI as in the Destination URL argument
    c.CopyIntoItems(destination, destinationUrl, info, myBinary, result)
    Catch ex As Exception
    MsgBox(ex.Message)
    End Try
    End Sub
    ******** <End snip of code> **********************

    Hi,
    If you want to upload a file to a library in SharePoint 2013 online, I suggest you use Client Object Model or REST API.
    The code snippets in the two threads below will be helpful:
    http://social.technet.microsoft.com/Forums/sharepoint/en-US/deac7cb7-c677-47b0-acdc-c56b32dfaac8/uploading-bigger-files-using-csom
    http://stackoverflow.com/questions/17057074/how-to-download-upload-files-from-to-sharepoint-2013-using-csom
    Uploading Files Using the REST API
    http://blogs.msdn.com/b/uksharepoint/archive/2013/04/20/uploading-files-using-the-rest-api-and-client-side-techniques.aspx
    You can handle the authentication with
    SharePointOnlineCredentials object:
    http://www.vrdmn.com/2013/01/authenticating-net-client-object-model.html
    Best regards
    Patrick Liang
    TechNet Community Support

  • After choosing a jpg for upload, the "Upload File" button on the organization's receiving site of does not respond. The second problem: it's impossible to highlight more that one file at a time.

    Clicking the first file, holding down shift and clicking the last file doesn't work. I've tried all manner of command, control, shift combos without success.  This one-at-a-time attachment problem also happens in web mail.  Are these two issues related?  Thanks for non-techie solutions for both issues.  I have Safari 5.0.6 (5533.22.3) and Leopard.

    Thanks for your response.  I do have javascript turned on (not java).  To answer your question,
    I was trying to upload 3 jpgs to the submissions page of a visual arts website. I could only highlight one jpg at a time in the "Choose File" option, and then the "Upload File" button of the submissions page would not respond.
    It's an ongoing problem with this site (I'm the only one with this issue and there are a lot of submissions). I have to send the images as email attachements to the administrator of the site.  When doing this via webmail, I still the one attachment at a time problem, but the images get to the administrator.  Thanks for helping.

  • Problems uploading files to various web browsers

    I'm having huge problems with uploading files to various browsers on my MacBook Pro (running Mac Lion OS X 10.7.5)
    My default web browser is Google Chrome but I have tried Firefox, Safari and Mail, too, and they're all presenting the same problem.
    The problem is that whenever I try to attach a document to an email in Gmail or upload a photo/file to any website - it just doesn't play ball. The web browser then becomes totally unresponsive (not loading new tabs etc.) and I have to Force Quit and start the application running again. When I tried this in Mail, the application actually crashed.
    I've figured out a way to get round the problem in Gmail - creating documents in Google Drive or simply dragging documents into the email - but I'm starting an online course soon and I really need to be able to upload documents, files, images etc.
    So far I have tried:
    Updating the software on my Mac
    Updating Google Chrome
    Uninstalling and reinstalling Google Chrome
    Signing in and out of Google Chrome
    Deleting all browser history on Google Chrome
    I've also figured out that it's not my firewall as I had an unrelated problem with that and it was taken down for around 24 hours to be fixed - I tried again to upload files in this 24 hour window and encountered the same problems.
    I'm also having problems with my Windows for Mac - whenever I try to Save or Save As in Word - the programme becomes completely unresponsive, parts of the toolbars at the top white out and I have to Force Quit - hence, why I started using Google Drive to create documents. When I try and Save or Save As in Excel or Powerpoint, these programmes crash too.
    I don't know if these problems are related, but I thought it best to bring it up just in case.
    Can anyone help me?!

    In answer to my own question, in case anyone has the same issue, the problem turned out to be that my hard drive is failing.
    If anyone has the same problem, back up all your data to an external device immediately (trying to run a computer on a failing hard drive is like trying to run on a broken leg, so I'm told) and take your mac to get a new hard drive - should cost around £100.

  • Problem in getting the parameters from teh form html with upload file

    I have used the jspsmartupload package:
    the html file:
    <HTML>
    <BODY BGCOLOR="white">
    <H1>jspSmartUpload : Sample 5</H1>
    <HR>
    <form METHOD="POST" ACTION="sample5.jsp"
    NAME="PW" ENCTYPE="multipart/form-data">
    <table CELLSPACING="0" CELLPADDING="3" BORDER="1" WIDTH="474">
    <!-- FILE -->
    <!-- TEXT -->
    <tr>
    <td width="150">
    <div align="left">
    <p><small><font face="Verdana">Text :  </font></small>
    </div>
    </td>
    <td width="324"><small><font face="Verdana">
    <input TYPE="TEXT" name="myText" value="">
    <br>
    </font></small></td>
    </tr>
    <!-- TEXTAREA -->
    <tr>
    <td width="150">
    <div align="left">
    <p><small><font face="Verdana">Text Area :  </font></small>
    </div>
    </td>
    <td width="324"><small><font face="Verdana">
    <textarea name="myTextArea" rows="4" value=""></textarea>
    <br>
    </font></small></td>
    </tr>
    <!-- PASSWORD -->
    <tr>
    <td>
    <div align="left">
    <p><small><font face="Verdana">PassWord :  </font></small>
    </div>
    </td>
    <td><small><font face="Verdana">
    <input TYPE="PASSWORD" name="myPASSWORD" value="">
    <br>
    </font></small></td>
    </tr>
    <!-- HIDDEN -->
    <tr>
    <td>
    <div align="left">
    <p><small><font face="Verdana">Hidden :  </font></small>
    </div>
    </td>
    <td><small><font face="Verdana">
    <input TYPE="hidden" name="myHidden" value="hidden">
    <br>
    </font></small></td>
    </tr>
    <tr>
    <td><small><font face="Verdana">Select a first file : 
    </font></small></td>
    <td><small><font face="Verdana">
    <input type="file" name="FILE1">
    </font></small></td>
    </tr>
    <tr>
    <td><small><font face="Verdana">Select a second file : </font></small></td>
    <td><small><font face="Verdana">
    <input type="file" name="FILE2">
    </font></small></td>
    </tr>
    <!-- CHECKBOX -->
    <tr>
    <td>
    <div align="left">
    <p><small><font face="Verdana">CheckBox :  </font></small>
    </div>
    </td>
    <td><small><font face="Verdana">
    <input TYPE="CHECKBOX" name="myCheckBox" value="Value 1">
    Value 1<br>
    <input TYPE="CHECKBOX" name="myCheckBox" value="Value 2">
    Value 2<br>
    <input TYPE="CHECKBOX" name="myCheckBox" value="Value 3">
    Value 3<br>
    </font></small></td>
    </tr>
    <!-- RADIO -->
    <tr>
    <td>
    <div align="left">
    <p><small><font face="Verdana">Radio :  </font></small>
    </div>
    </td>
    <td><small><font face="Verdana">
    <input TYPE="radio" name="radio" value="Value 1">
    Value 1<br>
    <input TYPE="radio" name="radio" value="Value 2">
    Value 2<br>
    <input TYPE="radio" name="radio" value="Value 3">
    Value 3<br>
    </font></small></td>
    </tr>
    <!-- SELECT -->
    <tr>
    <td>
    <div align="left">
    <p><small><font face="Verdana">Simple Select :  </font></small>
    </div>
    </td>
    <td><small><font face="Verdana">
    <SELECT name="mySimpleSelect" >
    <OPTION value="Value 1">Value 1</OPTION>
    <OPTION value="Value 2">Value 2</OPTION>
    <OPTION value="Value 3">Value 3</OPTION>
    </SELECT>
    <br>
    </font></small></td>
    </tr>
    <!-- SELECT MULTIPLE -->
    <tr>
    <td>
    <div align="left">
    <p><small><font face="Verdana">Multiple Select :  </font></small>
    </div>
    </td>
    <td><small><font face="Verdana">
    <SELECT multiple name="myMultSelect" >
    <OPTION value="Value 1">Value 1</OPTION>
    <OPTION value="Value 2">Value 2</OPTION>
    <OPTION value="Value 3">Value 3</OPTION>
    </SELECT>
    <br>
    </font></small></td>
    </tr>
    <!-- SUBMIT -->
    <tr>
    <td colspan="2" width="474">
    <div align="center">
    <center>
    <p><small><font face="Verdana">
    <input
    TYPE="Submit">
    </font></small>
    </center>
    </div>
    </td>
    </tr>
    </table>
    </form>
    </BODY>
    </HTML>
    the jsp file :
    <%@page language="java" import="com.jspsmart.upload.*"%>
    <%@page import="java.util.*"%>
    <jsp:useBean id="myUpload" scope="page" class="com.jspsmart.upload.SmartUpload" />
    <HTML>
    <BODY BGCOLOR="white">
    <H1>jspSmartUpload : Sample 5</H1>
    <HR>
    <%
         // Initialization
         myUpload.initialize(pageContext);
         // Upload
         myUpload.upload();          
         // Files
         out.println("<BR><STRONG>Display information about Files</STRONG><BR>");
         out.println("Number of files = " + myUpload.getFiles().getCount() + "<BR>");
         //out.println("Total size (bytes) = " + myUpload.getFiles().getSize() +"<BR>");
         for (int i=0;i<myUpload.getFiles().getCount();i++){
              out.print(myUpload.getFiles().getFile(i).getFieldName());
              if (!myUpload.getFiles().getFile(i).isMissing())
                   out.print(" = " + myUpload.getFiles().getFile(i).getFileName() + " (" + myUpload.getFiles().getFile(i).getSize() + ")");
                   myUpload.getFiles().getFile(i).saveAs("/upload/" + myUpload.getFiles().getFile(i).getFileName());
              else
                   out.print(" = vide");          
              out.println("<BR>");
         // Request
         out.println("<BR><BR><STRONG>Display information about Requests</STRONG><BR>");
         // Retreive Requests' names
         java.util.Enumeration e = myUpload.getRequest().getParameterNames();
         // Retreive parameters
         while (e.hasMoreElements()) {
              String key = (String)e.nextElement();
              String[] values = myUpload.getRequest().getParameterValues(key);               
              // Browse the current parameter values
              for(int i = 0; i < values.length; i++) {
              out.print(key + " = ");
              out.print(values[i] + "<BR>");
    %>
    </BODY>
    </HTML>
    The result shown is:
    jspSmartUpload : Sample 5
    Display information about Files
    Number of files = 2
    FILE1 = path.txt (240)
    FILE2 = WS_FTP.LOG (146)
    Display information about Requests
    radio = Value 2
    mySimpleSelect = Value 1
    myTextArea = test
    myPASSWORD =
    myMultSelect = Value 3
    myHidden = hidden
    myText = test
    myCheckBox = Value 1
    myCheckBox = Value 2
    myCheckBox = Value 3
    I would like to know if i want to get back the parameters from the form ,
    is that i must use Enumeration.
    Because i have tried request.getParameter() to get the value of radio button, textbox, checkbox and select menu, but it get the null values.
    Also, the function of Enumeration does not get the values of parameter in sequence as html form. e.g.In the html file, the first parameters should be textbox,but it displays the radio button's values first.
    How to solve the problem .
    Thanks

    This sounds like a bug in the smart upload code. I have used this stuff before, but it's probably an older version, so maybe they broke something. Enumerations aren't usually guaranteed to keep things in any particular order. I would say for now, make a method to take the enumeration and a param name to find the value. And write to the JSPSmart people.

  • Can't upload files--"Acrobat has encountered a problem"

    I'm experimenting with Acrobat. com as a way to collaborate with peers across the country. Seems like an ideal answer. I'm testing the "free," 2-person version at the moment, and can't seem to upload files to My Workspace. I'm trying to upload two files individually--the first a small MS Word file, the second a 1mb PowerPoint. Each attempt produces an "Acrobat has encountered a problem" error message. I can't even upload a photo of myself for my profile. At first, I thought it might be a firewall/proxy problem, but I ran all the Adobe diagnostics. Everything tested fine. I'm even able to establish video connection in the ConnectNow workspace. I'm working off a T3 pipeline, so I don't think its a volume problem. Help.

    Hi, can you tell exactly what requirements exist?
    I am having the same problem when I try to upload a file. My Admin has opened the site Acrobat.com for me and I can access Acrobat.com via browser, but not upload PDFs. I also cannot upload files for review from other Adobe products (RoboHelp or Acrobat).
    This whole issue seems rather strange to me - an online reviewing process should be designed for professional users and these user are typically behind a firewall. Therefore it would be most important to pinpoint exactly which access rights are required, rather then let the user try and stumble around themselves.

  • My firefox crashed when upload file on our web based application. This happen on two PC, even during firefox safe mode the problem still exist. But the problem

    Dear All,
    My firefox (version 23 on win 7) crashed when upload file on our internal web based application. This happen on two PC, even in firefox safe mode the problem still exist. So, my first conclusion the problem nothing to do with extension. here the crash ID https://crash-stats.mozilla.com/report/index/81220865-36c0-4e10-a484-6d27e2131023 and https://crash-stats.mozilla.com/report/index/86d2b779-9730-4d2c-b276-a86d42131023. I wonder if this happen because jquery modul in our web based application. But when I tried on my laptop, the problem dissapear. I tried to replicate same situation on different server, I mean I put the exact same application source to other server, never meet the same problem. Thus, I suspect may be it related to antivirus that installed in our network which is kaspersky. I am googling, never meet the clue.
    If you meet the same problem, please help me.
    I am so sorry for my poor english.
    Him Him

    The crashes are a problem with the winhadnt.dll file (OCular Agent from TEC Solutions Limited) as you can see in the crash reports.
    *http://www.freefixer.com/library/file/winhadnt.dll-52397/

  • Problem using "UPLOAD FILE" behavior, in localhost Works fine, in my production server doesnt

    Hi
    I have been working with a form that uses a "upload file", in my localhost computer works very well BUT in my production server doesnt, the thing is that there is no error messager .. so i cant guess the problem, i already check permissions in my folder that contains the files and all is with Write permissions.
    Can you help me pleasE??
    thanks in advance

    Most likely a permissions issue. Check your production server to see if both the IUSR_[Machine Name] and ASPNET users have read/write/delete permissions on 1. the folder you'll be uploading images to AND 2. the includes\common\lib\file_upload\temp folder (if this doesn't exist, create it manually).
    These settings are necessary in order for the ADDT file upload server behavior to function properly.

Maybe you are looking for

  • Agile - When should we adopt agile methodology?

    If some one asked you in interview that, in case client has no choice then as a decision maker whether a tech lead should automatically choose for Agile as methodology? What situations favor to go ahead with agile? Need some idea on this in a short m

  • Hierarchy maintain and load

    hi , i am new to SAP -Bi , Can any one explain me how to maintain Hierarchy and load data into it .i have sandbox system for practice. Thanks Ganesh.

  • Lightroom 4.3 import issues - hangs

    Anybody got a clue why this behaves so badly?? Very consistent and very annoying bug....have about 20,000+ images on my laptop HD. Desire to use LR to catalog and organize, etc. On some folders import runs fine. On others it just hangs, with no error

  • The powerpoint import in Captivate 5 cannot be normally processed

    I just installed Adobe Captivate 5 with Adobe elearing Suite 2, Since I've already installed Adobe CS5 Master Collection, The installation only added Captivate 5 in my computer(for I use office 2010, which version of office has no compatibility with

  • Path to downlad Solman. 7.0 SR4

    Hi All, Could any please provide us the link or the path to download the Sol. Manager 7.0 SR4. I could able to find only SR3 in the market place, but we need SR4. Thanks & Regards, DVRK