Upload 5 files on action of a Button

HI Friends,
   Requirement:  I need to upload master for 5 tables using 5 upload UI elements, on action of a button i should upload legacy data to tables. I am capable of uploading one file but not 5.
                               Can someone help me. it is high priority.
Thanks in Advance,
Sankar

Hi Kissnas,
           I am able to upload one file on action of a button.  kindly can you edit my logic, i.e how to upload file 1  in table 1 and file2 to table 2.
  TYPES :
       BEGIN OF str_itab,
       name(10) TYPE c,
       age(10) TYPE c,
       gender(10) TYPE c,
       END OF str_itab.
       DATA : t_table1 TYPE STANDARD TABLE OF str_itab,
         i_data TYPE STANDARD TABLE OF string,
         lo_nd_sflight TYPE REF TO if_wd_context_node,
         lo_el_sflight TYPE REF TO if_wd_context_element,
         l_string TYPE string,
         fs_table TYPE str_itab,
         upload   TYPE STANDARD TABLE OF ysg_upload,
         l_xstring TYPE xstring,
         fields TYPE string_table,
         lv_field TYPE string.
*       DATA : t_table TYPE if_upload=>elements_data_tab,
*              data_table TYPE if_upload=>elements_data_tab.
* get single attribute
        wd_context->get_attribute(    EXPORTING      name =  `UPLOAD`
                                        IMPORTING      value = l_xstring ).
  CALL FUNCTION 'HR_KR_XSTRING_TO_STRING'
    EXPORTING
      in_xstring = l_xstring
    IMPORTING
      out_string = l_string.
        SPLIT l_string  AT cl_abap_char_utilities=>newline INTO TABLE i_data.
* bind with table element.
        LOOP AT i_data INTO l_string.
    SPLIT l_string AT cl_abap_char_utilities=>horizontal_tab INTO TABLE fields.
     READ TABLE fields INTO lv_field INDEX 1.
    fs_table-name = lv_field.
     READ TABLE fields INTO lv_field INDEX 2.
    fs_table-age = lv_field.
    READ TABLE fields INTO lv_field INDEX 3.
    fs_table-gender = lv_field.
     APPEND fs_table TO t_table1.
*     APPEND fs_table TO upload.
     APPEND fs_table TO upload.
  ENDLOOP.
  lo_nd_sflight = wd_context->get_child_node( 'DATA_TAB' ).
  lo_nd_sflight->bind_table( t_table1 ).
Thanks in Advance
Sankar

Similar Messages

  • How to "Add" Button to upload file in Notification PG?

    I have a question on Extending/Customizing notfn to have "Add" attachment button to upload a document (some stnd template that Our business has) on either NotifDetailsPG or /oracle/apps/fnd/wf/worklist/webui/MoreInfoPG when a Approver opens notification to APPROVE/Reject
    I'm wondering why Oracle didn't provide this feature of Uploading a file (along with Response input text area that they provided already) in NotifDetailsPG?
    Business Reason: Our Business wants to upload a doc when an approver Rejects the notification (our case: iExpense module filing Exp Report) telling employee to follow some protocals
    Question on OAF:
    Is it possible to extend NotifDetailsPG or MoreInfoPG to upload a file. So, that when it goes to requestor they can open this file back and read thru. I know we need to insert a record in fnd_documents and fnd_attached_documents and /or fnd_lobs...but i don't know how to retrieve it back....Any hints....
    Thanks
    Raghu Kulkarni

    to clarify again....
    In the WF notification during the time of "Reject"ion or "Approv"al, we want to upload a file and then perform Reject/Approve action. Can we extend the page to have Add button to upload file? Is that a lot of work?
    Please any one give some suggestions...Thanks
    Raghu Kulkarni

  • 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.

  • Safari Upload file dialog box lets me click links and buttons on parent window.

    Safari Upload file dialog box lets me click links and buttons on parent window. I can even click Choose file button and open multiple Upload File dialog boxes. How can I show Upload file dialog box as modal?
    Operating system: Windows 7 and Windows XP.

    Safari Upload file dialog box lets me click links and buttons on parent window. I can even click Choose file button and open multiple Upload File dialog boxes. How can I show Upload file dialog box as modal?
    Operating system: Windows 7 and Windows XP.

  • How Upload File To Custom Action

    We have requirement of uploading file from page to our action class where the file will be processed. We have created a action class using, GSF,
    public class MyAction extends RenderPage
    I want to send file from web page. In java we use apache commons file upload jar. This jar needs HTTPRequest object. However in my action I have ics variable which contains the request parameters.
    Is there any way to do file upload using webcenter sites api? OR
    Is there any way I can get the HTTPRequest object in action? OR
    Any other thought?

    Hi,
    You need to use
    create iXOS doc:
    ARCHIV_CREATE_TABLE
    delete iXOS doc:
    First ARCHIV_GET_CONNECTIONS and then ALINK_DELETE or better CALL METHOD CL_ALINK_CONNECTION=>DELETE_BY_KEY
    It's best to create an FM for this
    view iXOS doc:
    ARCHIV_GET_CONNECTIONS
    All these FMs are available on your iXOS system. Check doc for detailed info
    Eddy
    PS. Reward useful answers and earn points yourself

  • Upload file button

    Hi there,
    What is the best way for me to add an "upload file" button to my Muse and BC e-commerce shop? I am selling personalised products where I want the user to be able to upload a photo.
    Do I need a custom web app? If so are there any which already exist?
    Or am I better off using a secondary provider and adding the HTML code to my muse site?
    Thanks a lot,
    Leo

    Hello,
    Please refer to the forum thread below, I hope tat will help you achive what you are trying to do.
    https://forums.adobe.com/thread/1213492?start=0&tstart=0
    Regards
    Vivek

  • Trying to print a book with Aperture 2.1.4, everything went well until the final step "uploading files to server" -- it's been spinning for an hour, "status" still reads 0%, "pause task" and "cancel task" buttons are grayed out in Activity window.

    everything went well until the final step "uploading files to server" -- it's been spinning for an hour, "status" still reads 0%, "pause task" and "cancel task" buttons are grayed out in Activity window. Any ideas?

    everything went well until the final step "uploading files to server" -- it's been spinning for an hour, "status" still reads 0%, "pause task" and "cancel task" buttons are grayed out in Activity window. Any ideas?

  • Can only choose attachments one at a time for webmail and for entries to an art organization website.  And the site's "Upload File" button will not respond, so I can't even upload the one jpg I have chosen.

    I am the only one who can't upload to the submissions page. Javascript is turned on, not java, with Safari 5.0.6 and Leopard. Thanks for helping.

    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.

  • THERE IS NO SEND BUTTON APPEARING - ONLY A CANCEL BUTTON AFTER I'VE UPLOADED FILES.  WHAT GIVES???

    I have followed all of the instructions repeatedly and there is no SEND button that appears on the screen where i've entered the email address and subject and where the uploaded files appear.
    This is the basic thing one needs, is a SEND button so one can use AdobeSEND
    Very disappointed.

    Are you running AdBlock (or something like that) on the browser that you’re not seeing the Send button on? That might explain it, especially if you have opted to Disable Social Media Buttons.
    If you do a web search for "adblock share-button" you will see a number of postings about this issue with buttons missing from other sites.

  • Upload file without user action.

    Hi,
    Here is my requirement: I need to upload file ( text / excel file ) from local PC without user interaction.
    I try using file_upload element and I set visible property as none ( so user doesn't see this element ) but I don't know how to get the file data. I only can set the file_name and mime_type property.
    Please help me how to get this file data. Or how to upload file from local PC without file_upload element.
    Regards,

    Hi Jatra.
    I guess there are several function modules you can use. Try this : UPLOAD_FILES.
    Maybe you can solve your issue with it. Otherwise search the Abap Forum on how to upload files from PC to WAS.
    Cheers,
    Sascha

  • We can use JSR-168 JPS portlet upload file,

    We can use JSR-168 JPS portlet upload file,
    here is the source for you referrence:
    upload file can use JSR168 portlet,
    1,CustomizablePortlet.java File
    import java.io.IOException;
    import java.io.PrintWriter;
    import java.util.ResourceBundle;
    import javax.portlet.*;
    import oracle.webdb.utils.SimpleStringBuffer;
    public class CustomizablePortlet extends GenericPortlet {
    private static final String TITLE_KEY = "title";
    protected static final String OK_ACTION = "ok_action";
    protected static final String APPLY_ACTION = "apply_action";
    protected static final PortletMode PREVIEW_MODE = new PortletMode("preview");
    protected static final PortletMode EDIT_DEFAULTS_MODE = new PortletMode("EDIT_DEFAULTS");
    protected static final PortletMode ABOUT_MODE = new PortletMode("ABOUT");
    public CustomizablePortlet() {
    public String getTitle(RenderRequest request) {
    return request.getPreferences().getValue("title", getPortletConfig().getResourceBundle(request.getLocale()).getString("javax.portlet.title"));
    public void doEdit(RenderRequest request, RenderResponse response) throws PortletException, IOException {
    response.setContentType("text/html");
    PrintWriter out = response.getWriter();
    out.print("<FORM ACTION=\"");
    out.print(getEditFormSubmitURL(request, response));
    out.println("\" METHOD=\"POST\">");
    out.println("<TABLE BORDER=\"0\">");
    out.println("<TR>");
    out.println("<TD WIDTH=\"20%\">");
    out.println("<P CLASS=\"portlet-form-field\" ALIGN=\"RIGHT\">Title:");
    out.println("</TD>");
    out.println("<TD WIDTH=\"80%\">");
    out.print("<INPUT CLASS=\"portlet-form-input-field\" TYPE=\"TEXT\" NAME=\"");
    out.print("title");
    out.print("\" VALUE=\"");
    out.print(getTitle(request));
    out.println("\" SIZE=\"20\">");
    out.println("</TD>");
    out.println("</TR>");
    out.println("<TR>");
    out.println("<TD COLSPAN=\"2\" ALIGN=\"CENTER\">");
    out.print("<INPUT CLASS=\"portlet-form-button\" TYPE=\"SUBMIT\" NAME=\"");
    out.print("ok_action");
    out.print("\" VALUE=\"OK\">");
    out.print("<INPUT CLASS=\"portlet-form-button\" TYPE=\"SUBMIT\" NAME=\"");
    out.print("apply_action");
    out.print("\" VALUE=\"Apply\">");
    out.println("</TD>");
    out.println("</TR>");
    out.println("</TABLE>");
    out.println("</FORM>");
    protected String getEditFormSubmitURL(RenderRequest request, RenderResponse response) {
    return response.createActionURL().toString();
    public void doHelp(RenderRequest request, RenderResponse response) throws PortletException, IOException {
    response.setContentType("text/html");
    PrintWriter out = response.getWriter();
    out.print("Help for <i><b>");
    out.print(getTitle(request));
    out.println("</b></i>.");
    public void doAbout(RenderRequest request, RenderResponse response) throws PortletException, IOException {
    String aboutHTML = (new SimpleStringBuffer(30)).append("/about_").append(getPortletName()).append(".html").toString();
    PortletRequestDispatcher rd = getPortletContext().getRequestDispatcher(aboutHTML);
    response.setContentType("text/html");
    if(rd != null) {
    rd.include(request, response);
    } else {
    PrintWriter out = response.getWriter();
    out.print("<p class=\"portlet-font\">This is the about page for ");
    out.print(getTitle(request));
    out.print(".</p><p class=\"portlet-font\">");
    out.print("To customize the contents of this page, create a file named '");
    out.print(aboutHTML.substring(1));
    out.print("' in the Portlet web application's root directory containing HTML ");
    out.print("to appear here. ");
    out.print("Alternatively, override the <code>CustomizablePortlet</code> ");
    out.println("class's <code>doAbout()</code> method.</p>");
    public void doDispatch(RenderRequest request, RenderResponse response) throws PortletException, IOException {
    WindowState state = request.getWindowState();
    if(!state.equals(WindowState.MINIMIZED)) {
    PortletMode mode = request.getPortletMode();
    if(mode.equals(PREVIEW_MODE))
    doView(request, response);
    else
    if(mode.equals(EDIT_DEFAULTS_MODE))
    doEdit(request, response);
    else
    if(mode.equals(ABOUT_MODE))
    doAbout(request, response);
    else
    super.doDispatch(request, response);
    } else {
    super.doDispatch(request, response);
    public void processAction(ActionRequest request, ActionResponse actionResponse) throws PortletException, IOException {
    String newTitle = request.getParameter("title");
    PortletPreferences prefs = request.getPreferences();
    prefs.setValue("title", newTitle);
    prefs.store();
    if(request.getParameter("ok_action") != null) {
    actionResponse.setPortletMode(PortletMode.VIEW);
    actionResponse.setWindowState(WindowState.NORMAL);
    2,FileUploadPortlet.java file
    import java.io.*;
    import javax.activation.DataHandler;
    import javax.mail.MessagingException;
    import javax.mail.internet.MimeBodyPart;
    import javax.portlet.*;
    import oracle.portal.portlet.sample.CustomizablePortlet;
    public class FileUploadPortlet extends CustomizablePortlet
    private static final String FILE_PARAM = "file";
    private static final String SUBMIT_PARAM = "submit";
    private static final String DEFAULT_CHARSET = "ISO-8859-1";
    private static final String uploadRoot = "";
    public FileUploadPortlet()
    public void doView(RenderRequest request, RenderResponse response) throws PortletException, IOException {
    response.setContentType("text/html");
    PrintWriter out = response.getWriter();
    out.print("<form action=\"");
    out.print(response.createActionURL().toString());
    out.println("\" enctype=\"multipart/form-data\" method=\"post\">");
    out.println("<center><table border=\"0\">");
    out.println("<tr>");
    out.print("<td class=\"portlet-form-field\" align=\"right\">");
    out.print("Please browse to an HTML file:");
    out.println("</td>");
    out.print("<td>");
    out.print("<input class=\"portlet-form-input-field\" type=\"file\" name=\"");
    out.print("file");
    out.print("\">");
    out.println("</td>");
    out.println("</tr>");
    out.println("<tr>");
    out.println("<td colspan=\"2\" align=\"center\">");
    out.print("<input type=\"submit\" class=\"portlet-form-button\" name=\"");
    out.print("submit");
    out.print("\" value=\"Display\">");
    out.println("</td>");
    out.println("</tr>");
    out.println("</table>");
    out.println("</form>");
    String lastFile = request.getPreferences().getValue("file", null);
    if(lastFile != null) {
    out.println("<hr width=\"100%\"><br>");
    out.print(lastFile);
    public void processAction(ActionRequest request, ActionResponse actionResponse) throws PortletException, IOException {
    FormDataParser parsedRequest = new FormDataParser(request);
    MimeBodyPart mbp = parsedRequest.getMimeBodyPart("file");
    if(mbp == null)
    super.processAction(request, actionResponse);
    else
    try {
    String fileName= mbp.getFileName();
    int splash = fileName.lastIndexOf("\\");
    if(splash != -1)
    fileName = fileName.substring(splash +1, fileName.length()).trim();
    String contentType = mbp.getContentType();
    String charSet = getCharsetFromContentType(contentType);
    int sepIndex = contentType.indexOf(';');
    if(sepIndex != -1)
    contentType = contentType.substring(0, sepIndex).trim();
    ByteArrayOutputStream bos = new ByteArrayOutputStream();
    mbp.getDataHandler().writeTo(bos);
    bos.close();
    String content = new String(bos.toByteArray(), charSet);
    FileOutputStream fos = new FileOutputStream(fileName);
    fos.write(bos.toByteArray());
    fos.close();
    PortletPreferences prefs = request.getPreferences();
    prefs.setValue("file", fileName + "upload ok");
    prefs.store();
    catch(MessagingException me) {
    throw new PortletException(me);
    public static String getCharsetFromContentType(String contentType) {
    int lastPos;
    if((lastPos = contentType.indexOf(';')) == -1)
    return "ISO-8859-1";
    lastPos++;
    String lowerContentType = contentType.toLowerCase();
    int nextPos;
    do {
    nextPos = lowerContentType.indexOf(';', lastPos);
    String param;
    if(nextPos == -1)
    param = lowerContentType.substring(lastPos).trim();
    else
    param = lowerContentType.substring(lastPos, nextPos).trim();
    if(param.startsWith("charset=") && param.length() > 8)
    return param.substring(8);
    lastPos = nextPos + 1;
    } while(nextPos != -1);
    return "ISO-8859-1";
    3,FormDataParser.java file
    import java.io.*;
    import java.util.*;
    import javax.activation.DataSource;
    import javax.mail.MessagingException;
    import javax.mail.internet.MimeBodyPart;
    import javax.mail.internet.MimeMultipart;
    import javax.portlet.ActionRequest;
    import javax.portlet.PortletException;
    public class FormDataParser {
    private static final String MULTIPART_PREFIX = "multipart/";
    private static final String MULTIPART_FORM_DATA = "multipart/form-data";
    private static final String PLAIN_TEXT = "text/plain";
    private ActionRequest mWrappedRequest;
    private Map mParams;
    private Map mBodyParts;
    private boolean mIsInitialized;
    private boolean mHasMultipart;
    public FormDataParser(ActionRequest request) {
    mWrappedRequest = request;
    public String getParameter(String name) throws PortletException {
    String value = mWrappedRequest.getParameter(name);
    if(value != null)
    return value;
    initParameters();
    if(!mHasMultipart)
    return null;
    List paramList = (List)mParams.get(name);
    if(paramList != null)
    return (String)paramList.get(0);
    else
    return null;
    public String[] getParameterValues(String name) throws PortletException {
    String values[] = mWrappedRequest.getParameterValues(name);
    if(!mHasMultipart)
    return values;
    initParameters();
    List valueList = (List)mParams.get(name);
    if(valueList == null)
    return values;
    int size = valueList.size();
    if(values != null) {
    List newValueList = new ArrayList(values.length + size);
    newValueList.addAll(Arrays.asList(values));
    newValueList.addAll(valueList);
    valueList = newValueList;
    values = new String[size];
    valueList.toArray(values);
    return values;
    public MimeBodyPart getMimeBodyPart(String name) throws PortletException {
    initParameters();
    if(!mHasMultipart) {
    return null;
    } else {
    List parts = (List)mBodyParts.get(name);
    return parts != null ? (MimeBodyPart)parts.get(0) : null;
    public MimeBodyPart[] getMimeBodyParts(String name) throws PortletException {
    initParameters();
    if(!mHasMultipart)
    return null;
    List parts = (List)mBodyParts.get(name);
    if(parts == null) {
    return null;
    } else {
    MimeBodyPart mimeBodyParts[] = new MimeBodyPart[parts.size()];
    parts.toArray(mimeBodyParts);
    return mimeBodyParts;
    private void initParameters() throws PortletException {
    if(mIsInitialized)
    return;
    String contentType = mWrappedRequest.getContentType();
    if(contentType == null) {
    mIsInitialized = true;
    return;
    int sepIndex = contentType.indexOf(';');
    if(sepIndex != -1)
    contentType = contentType.substring(0, sepIndex).trim();
    if(contentType.equalsIgnoreCase("multipart/form-data")) {
    mParams = new HashMap(20);
    mBodyParts = new HashMap(20);
    DataSource ds = new DataSource() {
    public InputStream getInputStream() throws IOException {
    return mWrappedRequest.getPortletInputStream();
    public OutputStream getOutputStream() throws IOException {
    throw new IOException("OutputStream not available");
    public String getContentType() {
    return mWrappedRequest.getContentType();
    public String getName() {
    return getClass().getName();
    try {
    MimeMultipart multipartMessage = new MimeMultipart(ds);
    parseMultiPart(multipartMessage, null);
    catch(MessagingException me) {
    throw new PortletException(me);
    catch(IOException ioe) {
    throw new PortletException(ioe);
    mHasMultipart = true;
    mIsInitialized = true;
    private void parseMultiPart(MimeMultipart multipartMessage, String parentFieldName) throws MessagingException, IOException {
    int partCount = multipartMessage.getCount();
    for(int i = 0; i < partCount; i++) {
    javax.mail.BodyPart part = multipartMessage.getBodyPart(i);
    if(part instanceof MimeBodyPart) {
    MimeBodyPart mimePart = (MimeBodyPart)part;
    String disps[] = mimePart.getHeader("Content-Disposition");
    if(disps != null && disps.length != 0) {
    String disp = disps[0];
    String lcDisp = disp.toLowerCase();
    int nameStart;
    int nameEnd;
    if((nameStart = lcDisp.indexOf("name=\"")) != -1 && (nameEnd = lcDisp.indexOf("\"", nameStart + 6)) != -1)
    parentFieldName = disp.substring(nameStart + 6, nameEnd);
    if(parentFieldName != null)
    if(mimePart.getContentType().toLowerCase().startsWith("multipart/")) {
    Object content = mimePart.getContent();
    if(content instanceof MimeMultipart)
    parseMultiPart((MimeMultipart)content, parentFieldName);
    } else
    if((nameStart = lcDisp.indexOf("filename=\"")) != -1 && (nameEnd = lcDisp.indexOf("\"", nameStart + 10)) != -1) {
    List values = (List)mBodyParts.get(parentFieldName);
    if(values == null) {
    values = new ArrayList(1);
    mBodyParts.put(parentFieldName, values);
    values.add(mimePart);
    } else
    if(mimePart.getContentType().toLowerCase().startsWith("text/plain")) {
    Object content = mimePart.getContent();
    if(content instanceof String) {
    List values = (List)mParams.get(parentFieldName);
    if(values == null) {
    values = new ArrayList(1);
    mParams.put(parentFieldName, values);
    values.add((String)content);
    4.web.xml file
    <?xml version = '1.0' encoding = 'ISO-8859-1'?>
    <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
    <web-app>
    <display-name>hanhuiwen OracleSamplePortlets</display-name>
    <description>hanhuiwen Oracle Sample Portlet Application</description>
    <servlet>
    <servlet-name>portletdeploy</servlet-name>
    <servlet-class>oracle.webdb.wsrp.server.deploy.PortletDeployServlet</servlet-class>
    <load-on-startup>1</load-on-startup>
    </servlet>
    <servlet>
    <servlet-name>portletjaxrpc</servlet-name>
    <servlet-class>com.sun.xml.rpc.server.http.JAXRPCServlet</servlet-class>
    <init-param>
    <param-name>configuration.file</param-name>
    <param-value>/WEB-INF/WSRPService_Config.properties</param-value>
    </init-param>
    </servlet>
    <servlet>
    <servlet-name>portletresource</servlet-name>
    <servlet-class>oracle.webdb.wsrp.server.ResourceServlet</servlet-class>
    </servlet>
    <servlet>
    <servlet-name>ChartServlet</servlet-name>
    <display-name>Chart Servlet</display-name>
    <description>Demo image-generating servlet</description>
    <servlet-class>oracle.portal.portlet.sample.chart.ChartServlet</servlet-class>
    <load-on-startup>1</load-on-startup>
    </servlet>
    <servlet>
    <servlet-name>uix</servlet-name>
    <servlet-class>oracle.cabo.servlet.UIXServlet</servlet-class>
    <init-param>
    <param-name>oracle.cabo.servlet.pageBroker</param-name>
    <param-value>oracle.cabo.servlet.xml.UIXPageBroker</param-value>
    </init-param>
    <load-on-startup>1</load-on-startup>
    </servlet>
    <servlet-mapping>
    <servlet-name>ChartServlet</servlet-name>
    <url-pattern>/chart*</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
    <servlet-name>portletjaxrpc</servlet-name>
    <url-pattern>/portlets*</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
    <servlet-name>portletresource</servlet-name>
    <url-pattern>/portletresource*</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
    <servlet-name>uix</servlet-name>
    <url-pattern>*.uix</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
    <servlet-name>uix</servlet-name>
    <url-pattern>/uix/*</url-pattern>
    </servlet-mapping>
    <session-config>
    <session-timeout>60</session-timeout>
    </session-config>
    <welcome-file-list>
    <welcome-file>index.uix</welcome-file>
    </welcome-file-list>
    <!--
    LogLevel controls the amount of information logged. There are 7 log levels:
    0 - logging disabled
    1 - configuration
    2 - severe error
    3 - warning
    4 - throwing exception
    5 - performance
    6 - information
    7 - debug
    The oracle.portal.log.Logger interface defines methods that map to these 7
    log levels. However, there are also 2 methods that do not map to log
    levels. These methods are included for backwards compatibility and data
    logged using these methods will always be logged regardless of the log level.
    -->
    <env-entry>
    <env-entry-name>oracle/portal/log/logLevel</env-entry-name>
    <env-entry-type>java.lang.Integer</env-entry-type>
    <env-entry-value>7</env-entry-value>
    </env-entry>
    </web-app>
    5.portlet.xml
    <?xml version = '1.0' encoding = 'UTF-8'?>
    <portlet-app xmlns="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd" version="1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd">
    <portlet>
    <description xml:lang="en">A portlet that demonstrates the file upload features of the Java Portlet Specification.</description>
    <portlet-name>FileUpload</portlet-name>
    <portlet-class>FileUploadPortlet</portlet-class>
    <expiration-cache>0</expiration-cache>
    <supports>
    <mime-type>text/html</mime-type>
    <portlet-mode>help</portlet-mode>
    <portlet-mode>about</portlet-mode>
    <portlet-mode>edit_defaults</portlet-mode>
    </supports>
    <supported-locale>en</supported-locale>
    <portlet-info>
    <title>File Upload Portlet</title>
    <short-title>File Upload</short-title>
    <keywords>File,Upload, Portlet</keywords>
    </portlet-info>
    </portlet>
    <custom-portlet-mode>
    <description xml:lang="en">This mode should be used by the portlet to display information on the portlet's purpose, origin, version, etc.</description>
    <portlet-mode>about</portlet-mode>
    </custom-portlet-mode>
    <custom-portlet-mode>
    <description xml:lang="en">This mode signifies that the portlet should render a screen to set the default values for the modifiable preferences that are typically changed in the EDIT screen. Calling this mode requires that the user must have administrator rights.</description>
    <portlet-mode>edit_defaults</portlet-mode>
    </custom-portlet-mode>
    <custom-portlet-mode>
    <description xml:lang="en">This mode should be used by the portlet to render output without the need of having back-end connections or user specific data available.</description>
    <portlet-mode>preview</portlet-mode>
    </custom-portlet-mode>
    <user-attribute>
    <name>user.name.given</name>
    </user-attribute>
    <user-attribute>
    <name>user.name.family</name>
    </user-attribute>
    <user-attribute>
    <name>user.name.middle</name>
    </user-attribute>
    <user-attribute>
    <name>user.name.nickname</name>
    </user-attribute>
    <user-attribute>
    <name>user.bdate</name>
    </user-attribute>
    <user-attribute>
    <name>user.business-info.online.email</name>
    </user-attribute>
    </portlet-app>

    Hello i had exactly the same error, but not with file upload.
    I'm sure you have in your application lib directory to jars which aren't compatible to each other.
    And the problem occured between my myfaces and tomahawk jars .
    See this page:
    http://wiki.apache.org/myfaces/CompatibilityMatrix
    It tells you which myfaces and tomahawk jars you can use together.
    Hope it can help.
    bye

  • Fileaccess.httpUploadBean doesn't upload file in Jdevelper 9.0.3

    Hi,
    I am using Jdevelper 9.0.3 to develop a jsp Based File Upload Utility.
    I have attached Liberary "JSP RUNTIME" which reffers to "ojsp.jar","ojsputil.jar","oc4j.jar","servlet.jar","ojc.jar".
    while running the code for file upload, file doesn't get uploaded. I am not getting any exceptions too.
    But the same pease of code with same liberary "JSP RUNTIME" is working absolutly fine(Uploading File), when i am running it using Jdeveloper10.1.2, and This is Strange to me.Actualy i need to use Jdeveloper9.0.3 only.Please let me know if any patch is required to apply in Jdeveloper9.0.3.
    Please find the code below and help.
    fileaccess.properties
    fileaccess.basedir = C:/
    fileUpload.jsp
    <html><body>
    <form name = "formname" action="beanUploadExample.jsp" method=POST ENCTYPE="multipart/form-data" />
    <br>MailID: <INPUT TYPE="text" NAME="strMailId" />
    <br> File to upload: <INPUT TYPE="FILE" NAME="File" SIZE="50" MAXLENGTH="120" >
    <br><INPUT TYPE="Submit" NAME="Submit" VALUE="Send" >
    <INPUT type="reset" name="reset" value = "Cancel">
    </form>
    </body></html>
    beanUploadExample.jsp
    <%@ page contentType="text/html;charset=windows-1252"%>
    <%@ page language="java"
    import="java.util.*,java.io.*, oracle.jsp.webutil.fileaccess.*" %>
    <html><body>
    <SCRIPT language="JavaScript">
    function formAction()
    if (document.upForm.forward.value == "true")
    {//tOMORROW PASS THE FILE NAME WITH ACTION PARAM
    //alert("Submit");
    document.upForm.action = "uploadco"
    document.upForm.submit();
    </SCRIPT>
    <Form name="upForm" method ="post" > <!--action ="beanUploadExample.jsp" >-->
    <%
    String userdir = "Test";
    String strFlag = "";
    String strFileName ="";
    String strDirName ="";
    String strAbsoluteName ="";
    %>
    <jsp:useBean id="upbean"
    class="oracle.jsp.webutil.fileaccess.HttpUploadBean" >
    <jsp:setProperty name="upbean" property="destination" value="<%=userdir%"/>
    </jsp:useBean>
    <%
    try{
    upbean.setBaseDir(application, request);
    String str = upbean.getDestination();
    // application.getServletContextName();
    //out.println("The Servlet Context is "+strContext) ;
    out.println("The value of Destination is "+str) ;
    upbean.upload(request);
    String name = upbean.getParameter("strMailId");
    out.println("name-----:::::: "+name) ;
    String strDestType = upbean.getDestinationType();
    out.println("strDestType-----:::::: "+strDestType) ;
    Enumeration fileNames = upbean.getFileNames();
    while (fileNames.hasMoreElements()) {
    strFlag = "true";
    strFileName = (String)fileNames.nextElement();
    out.println("strFileName File Name Is:::::"+strFileName);
    strAbsoluteName = strFileName.substring(4,strFileName.length());
    catch(IOException ex)
    out.println("IOException is =="+ex.toString());
    catch(Exception ex)
    out.println("IOException is =="+ex.toString());
    %>
    <table width = 50% align="center" >
    <tr>
    <td align ="center"><input type = "Button" name ="Submit" value="Ok" onclick="formAction()" ></td></tr></table>
    </Form>
    </body></html>

    Hi,
    I am using Jdevelper 9.0.3 to develop a jsp Based File Upload Utility.
    I have attached Liberary "JSP RUNTIME" which reffers to "ojsp.jar","ojsputil.jar","oc4j.jar","servlet.jar","ojc.jar".
    while running the code for file upload, file doesn't get uploaded. I am not getting any exceptions too.
    But the same pease of code with same liberary "JSP RUNTIME" is working absolutly fine(Uploading File), when i am running it using Jdeveloper10.1.2, and This is Strange to me.Actualy i need to use Jdeveloper9.0.3 only.Please let me know if any patch is required to apply in Jdeveloper9.0.3.
    Please find the code below and help.
    fileaccess.properties
    fileaccess.basedir = C:/
    fileUpload.jsp
    <html><body>
    <form name = "formname" action="beanUploadExample.jsp" method=POST ENCTYPE="multipart/form-data" />
    <br>MailID: <INPUT TYPE="text" NAME="strMailId" />
    <br> File to upload: <INPUT TYPE="FILE" NAME="File" SIZE="50" MAXLENGTH="120" >
    <br><INPUT TYPE="Submit" NAME="Submit" VALUE="Send" >
    <INPUT type="reset" name="reset" value = "Cancel">
    </form>
    </body></html>
    beanUploadExample.jsp
    <%@ page contentType="text/html;charset=windows-1252"%>
    <%@ page language="java"
    import="java.util.*,java.io.*, oracle.jsp.webutil.fileaccess.*" %>
    <html><body>
    <SCRIPT language="JavaScript">
    function formAction()
    if (document.upForm.forward.value == "true")
    {//tOMORROW PASS THE FILE NAME WITH ACTION PARAM
    //alert("Submit");
    document.upForm.action = "uploadco"
    document.upForm.submit();
    </SCRIPT>
    <Form name="upForm" method ="post" > <!--action ="beanUploadExample.jsp" >-->
    <%
    String userdir = "Test";
    String strFlag = "";
    String strFileName ="";
    String strDirName ="";
    String strAbsoluteName ="";
    %>
    <jsp:useBean id="upbean"
    class="oracle.jsp.webutil.fileaccess.HttpUploadBean" >
    <jsp:setProperty name="upbean" property="destination" value="<%=userdir%"/>
    </jsp:useBean>
    <%
    try{
    upbean.setBaseDir(application, request);
    String str = upbean.getDestination();
    // application.getServletContextName();
    //out.println("The Servlet Context is "+strContext) ;
    out.println("The value of Destination is "+str) ;
    upbean.upload(request);
    String name = upbean.getParameter("strMailId");
    out.println("name-----:::::: "+name) ;
    String strDestType = upbean.getDestinationType();
    out.println("strDestType-----:::::: "+strDestType) ;
    Enumeration fileNames = upbean.getFileNames();
    while (fileNames.hasMoreElements()) {
    strFlag = "true";
    strFileName = (String)fileNames.nextElement();
    out.println("strFileName File Name Is:::::"+strFileName);
    strAbsoluteName = strFileName.substring(4,strFileName.length());
    catch(IOException ex)
    out.println("IOException is =="+ex.toString());
    catch(Exception ex)
    out.println("IOException is =="+ex.toString());
    %>
    <table width = 50% align="center" >
    <tr>
    <td align ="center"><input type = "Button" name ="Submit" value="Ok" onclick="formAction()" ></td></tr></table>
    </Form>
    </body></html>

  • Help with Upload file to Server Examples

    I have been working with the examples for how to upload a file to the server. Though i got the example to work. there is one more thing i need to do. i need to allow the user to be able to select multiple files.  In the example when you click on Upload, it opens a MS window to allow you to select a file. This example does not allow you to select more then one file though. I found another example for selecting multiple files but this one differs very much in that the person who make it "Ryan Favro" created a whole new GUI window to select multiple files. those his example works great, i dont want a special window to select files, i want the MS window to do it.
    Is there a way to make the original example that uses the MS window to allow the user to select multiple files ?
    I have attached the example that uses the MS window.

    Hi,
    Use this code. May be it helps u.
    fileuploadapp.mxml
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" xmlns:com="test.*" layout="absolute"
        creationComplete="initApp()" viewSourceURL="srcview/index.html">
        <mx:Script>
            <![CDATA[
                import mx.controls.Alert;
                private const _strDomain:String = new String("http://localhost:8400/");
                private const _strUploadScript:String = new String(_strDomain + "ProcessFileUp/UploadFile");
                // Initalize
                private function initApp():void {
                    Security.allowDomain(_strDomain);
            ]]>
        </mx:Script>
        <mx:Canvas width="400" height="300" horizontalCenter="0" verticalCenter="0">
            <com:FileUpload
                width="100%" height="100%"
                uploadUrl="{_strUploadScript}"
                uploadComplete="Alert.show('File(s) have been uploaded.', 'Upload successful')"
                uploadIOError="Alert.show('IO Error in uploading file.', 'Error')"
                uploadSecurityError="Alert.show('Security Error in uploading file.', 'Error')"/>
        </mx:Canvas>
    </mx:Application>
    fileuoload.mxml
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Panel xmlns:mx="http://www.adobe.com/2006/mxml" xmlns:com="*"
        layout="vertical" width="100%" minWidth="400" height="100%" minHeight="200"
        title="Upload Files" creationComplete="initCom()">
        <mx:Metadata>
            [Event(name="uploadComplete", type="flash.events.Event")]
            [Event(name="uploadProgress", type="flash.events.ProgressEvent")]
            [Event(name="uploadCancel", type="flash.events.Event")]
            [Event(name="uploadIOError", type="flash.events.IOErrorEvent")]
            [Event(name="uploadSecurityError", type="flash.events.SecurityErrorEvent")]
        </mx:Metadata>
        <mx:Script>
            <![CDATA[
                import mx.controls.*;
                import mx.managers.*;
                import mx.events.*;
                import flash.events.*;
                import flash.net.*;
                private var _strUploadUrl:String;
                private var _refAddFiles:FileReferenceList;   
                private var _refUploadFile:FileReference;
                private var _arrUploadFiles:Array;
                private var _numCurrentUpload:Number = 0;           
                // Set uploadUrl
                public function set uploadUrl(strUploadUrl:String):void {
                    _strUploadUrl = strUploadUrl;
                // Initalize
                private function initCom():void {
                    _arrUploadFiles = new Array();               
                    enableUI();
                    uploadCheck();
                // Called to add file(s) for upload
                private function addFiles():void {
                    _refAddFiles = new FileReferenceList();
                    _refAddFiles.addEventListener(Event.SELECT, onSelectFile);
                    _refAddFiles.browse();
                // Called when a file is selected
                private function onSelectFile(event:Event):void {
                    var arrFoundList:Array = new Array();
                    // Get list of files from fileList, make list of files already on upload list
                    for (var i:Number = 0; i < _arrUploadFiles.length; i++) {
                        for (var j:Number = 0; j < _refAddFiles.fileList.length; j++) {
                            if (_arrUploadFiles[i].name == _refAddFiles.fileList[j].name) {
                                arrFoundList.push(_refAddFiles.fileList[j].name);
                                _refAddFiles.fileList.splice(j, 1);
                                j--;
                    if (_refAddFiles.fileList.length >= 1) {               
                        for (var k:Number = 0; k < _refAddFiles.fileList.length; k++) {
                            _arrUploadFiles.push({
                                name:_refAddFiles.fileList[k].name,
                                size:formatFileSize(_refAddFiles.fileList[k].size),
                                file:_refAddFiles.fileList[k]});
                        listFiles.dataProvider = _arrUploadFiles;
                        listFiles.selectedIndex = _arrUploadFiles.length - 1;
                    if (arrFoundList.length >= 1) {
                        Alert.show("The file(s): \n\n• " + arrFoundList.join("\n• ") + "\n\n...are already on the upload list. Please change the filename(s) or pick a different file.", "File(s) already on list");
                    updateProgBar();
                    scrollFiles();
                    uploadCheck();
                // Called to format number to file size
                private function formatFileSize(numSize:Number):String {
                    var strReturn:String;
                    numSize = Number(numSize / 1000);
                    strReturn = String(numSize.toFixed(1) + " KB");
                    if (numSize > 1000) {
                        numSize = numSize / 1000;
                        strReturn = String(numSize.toFixed(1) + " MB");
                        if (numSize > 1000) {
                            numSize = numSize / 1000;
                            strReturn = String(numSize.toFixed(1) + " GB");
                    return strReturn;
                // Called to remove selected file(s) for upload
                private function removeFiles():void {
                    var arrSelected:Array = listFiles.selectedIndices;
                    if (arrSelected.length >= 1) {
                        for (var i:Number = 0; i < arrSelected.length; i++) {
                            _arrUploadFiles[Number(arrSelected[i])] = null;
                        for (var j:Number = 0; j < _arrUploadFiles.length; j++) {
                            if (_arrUploadFiles[j] == null) {
                                _arrUploadFiles.splice(j, 1);
                                j--;
                        listFiles.dataProvider = _arrUploadFiles;
                        listFiles.selectedIndex = 0;                   
                    updateProgBar();
                    scrollFiles();
                    uploadCheck();
                // Called to check if there is at least one file to upload
                private function uploadCheck():void {
                    if (_arrUploadFiles.length == 0) {
                        btnUpload.enabled = false;
                        listFiles.verticalScrollPolicy = "off";
                    } else {
                        btnUpload.enabled = true;
                        listFiles.verticalScrollPolicy = "on";
                // Disable UI control
                private function disableUI():void {
                    btnAdd.enabled = false;
                    btnRemove.enabled = false;
                    btnUpload.enabled = false;
                    btnCancel.enabled = true;
                    listFiles.enabled = false;
                    listFiles.verticalScrollPolicy = "off";
                // Enable UI control
                private function enableUI():void {
                    btnAdd.enabled = true;
                    btnRemove.enabled = true;
                    btnUpload.enabled = true;
                    btnCancel.enabled = false;
                    listFiles.enabled = true;
                    listFiles.verticalScrollPolicy = "on";
                // Scroll listFiles to selected row
                private function scrollFiles():void {
                    listFiles.verticalScrollPosition = listFiles.selectedIndex;
                    listFiles.validateNow();
                // Called to upload file based on current upload number
                private function startUpload():void {
                    if (_arrUploadFiles.length > 0) {
                        disableUI();
                        listFiles.selectedIndex = _numCurrentUpload;
                        scrollFiles();
                        // Variables to send along with upload
                        var sendVars:URLVariables = new URLVariables();
                        sendVars.action = "upload";
                        var request:URLRequest = new URLRequest();
                        request.data = sendVars;
                        request.url = _strUploadUrl;
                        request.method = URLRequestMethod.POST;
                        _refUploadFile = new FileReference();
                        _refUploadFile = listFiles.selectedItem.file;
                        _refUploadFile.addEventListener(ProgressEvent.PROGRESS, onUploadProgress);
                           _refUploadFile.addEventListener(Event.COMPLETE, onUploadComplete);
                        _refUploadFile.addEventListener(IOErrorEvent.IO_ERROR, onUploadIoError);
                          _refUploadFile.addEventListener(SecurityErrorEvent.SECURITY_ERROR, onUploadSecurityError);
                        _refUploadFile.upload(request, "file", false);
                // Cancel and clear eventlisteners on last upload
                private function clearUpload():void {
                    _refUploadFile.removeEventListener(ProgressEvent.PROGRESS, onUploadProgress);
                    _refUploadFile.removeEventListener(Event.COMPLETE, onUploadComplete);
                    _refUploadFile.removeEventListener(IOErrorEvent.IO_ERROR, onUploadIoError);
                    _refUploadFile.removeEventListener(SecurityErrorEvent.SECURITY_ERROR, onUploadSecurityError);
                    _refUploadFile.cancel();
                    _numCurrentUpload = 0;
                    updateProgBar();
                    enableUI();
                // Called on upload cancel
                private function onUploadCanceled():void {
                    clearUpload();
                    dispatchEvent(new Event("uploadCancel"));
                // Get upload progress
                private function onUploadProgress(event:ProgressEvent):void {
                    var numPerc:Number = Math.round((event.bytesLoaded / event.bytesTotal) * 100);
                    updateProgBar(numPerc);
                    var evt:ProgressEvent = new ProgressEvent("uploadProgress", false, false, event.bytesLoaded, event.bytesTotal);
                    dispatchEvent(evt);
                // Update progBar
                private function updateProgBar(numPerc:Number = 0):void {
                    var strLabel:String = (_numCurrentUpload + 1) + "/" + _arrUploadFiles.length;
                    strLabel = (_numCurrentUpload + 1 <= _arrUploadFiles.length && numPerc > 0 && numPerc < 100) ? numPerc + "% - " + strLabel : strLabel;
                    strLabel = (_numCurrentUpload + 1 == _arrUploadFiles.length && numPerc == 100) ? "Upload Complete - " + strLabel : strLabel;
                    strLabel = (_arrUploadFiles.length == 0) ? "" : strLabel;
                    progBar.label = strLabel;
                    progBar.setProgress(numPerc, 100);
                    progBar.validateNow();
                // Called on upload complete
                private function onUploadComplete(event:Event):void {
                    _numCurrentUpload++;               
                    if (_numCurrentUpload < _arrUploadFiles.length) {
                        startUpload();
                    } else {
                        enableUI();
                        clearUpload();
                        dispatchEvent(new Event("uploadComplete"));
                // Called on upload io error
                private function onUploadIoError(event:IOErrorEvent):void {
                    clearUpload();
                    var evt:IOErrorEvent = new IOErrorEvent("uploadIoError", false, false, event.text);
                    dispatchEvent(evt);
                // Called on upload security error
                private function onUploadSecurityError(event:SecurityErrorEvent):void {
                    clearUpload();
                    var evt:SecurityErrorEvent = new SecurityErrorEvent("uploadSecurityError", false, false, event.text);
                    dispatchEvent(evt);
                // Change view state
                private function changeView():void {
                    currentState = (currentState == "mini") ? "" : "mini";
            ]]>
        </mx:Script>
        <mx:states>
            <mx:State name="mini">
                <mx:SetProperty name="height" value="60"/>
                <mx:SetProperty name="minHeight" value="60"/>
                <mx:SetStyle target="{btnView}" name="icon" value="@Embed('assets/application_put.png')"/>
            </mx:State>
        </mx:states>
        <mx:transitions>
            <mx:Transition fromState="*" toState="*">
                <mx:Resize target="{this}" duration="1000"/>
            </mx:Transition>
        </mx:transitions>
        <mx:Canvas width="100%" height="100%">
            <mx:DataGrid id="listFiles" left="0" top="0" bottom="0" right="0"
                allowMultipleSelection="true" verticalScrollPolicy="on"
                draggableColumns="false" resizableColumns="false" sortableColumns="false">
                <mx:columns>
                    <mx:DataGridColumn headerText="File" dataField="name" wordWrap="true"/>
                    <mx:DataGridColumn headerText="Size" dataField="size" width="75" textAlign="right"/>
                </mx:columns>
            </mx:DataGrid>
        </mx:Canvas>
        <mx:ControlBar horizontalAlign="center" verticalAlign="middle">
            <mx:Button id="btnAdd" toolTip="Add file(s)" click="addFiles()" icon="@Embed('assets/add.png')" width="26"/>
            <mx:Button id="btnRemove" toolTip="Remove file(s)" click="removeFiles()" icon="@Embed('assets/delete.png')" width="26"/>
            <mx:ProgressBar id="progBar" mode="manual" label="" labelPlacement="center" width="100%"/>
            <mx:Button id="btnCancel" toolTip="Cancel upload" icon="@Embed('assets/cancel2.png')" width="26" click="onUploadCanceled()"/>
            <mx:Button label="Upload" toolTip="Upload file(s)" id="btnUpload" click="startUpload()" icon="@Embed('assets/bullet_go.png')"/>
            <mx:Button id="btnView" toolTip="Show/Hide file(s)" icon="@Embed('assets/application_get.png')" width="26" click="changeView()"/>
        </mx:ControlBar>   
    </mx:Panel>
    Regards,
         Shivang

  • 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.

  • 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!!

Maybe you are looking for

  • Error installing PI 7.1 on MSCS Windows

    Hi, When I try to install ASCS instance, sapinst is stopped with following error message: An error occurred while processing service SAP NetWeaver Process Integration 7.1 > Installation Options > SAP Systems with Oracle > High-Availability System > B

  • Can't uninstall or reinstall oracle 10g express edition in windows server 2

    Hi, I need help from all of you, i already install oracle 10g express edition in windows server 2003 in D drive. but i can't remove because the oracle not in the add remove program so i download the windows install clean up to remove but after remove

  • Snapshot control file

    Hi, I am interested in time of snapshot control file creation. I have read that snapshot control file is created before the backup take the place. I have tried to take the simple rman>backup database command, but I have seen that snapshot control fil

  • How to add log details for marketing attributes

    Hi, when user is changing marketing attributes in bp transaction we need to show the log details in log file.how to capture the change log details in to log file ? is there any way to show change log files. rose

  • How to create a background job without a variant ?

    How to create a background job without a variant ?