File Uploading API in weblogic?

          Hi
          We are working on weblogic 8.1.Is there any File uploading API in weblogic API
          Thanks
          Sougata
          

          Have you consider jakarta commons file upload.
          "sougata" <[email protected]> wrote:
          >
          >Hi
          >We are working on weblogic 8.1.Is there any File uploading API in weblogic
          >API
          >Thanks
          >Sougata
          >
          

Similar Messages

  • Question about File upload functionality in Weblogic

    Hi,
        We're currently trying to deploy a web application on the weblogic 12c server (via war file). And the app needs to upload a text file onto the a temperary directory within weblogic server. And on the web page side, we use JQuery File upload plugin.
        My question is, on the file receiver side, does weblogic provide any tools to receive the uploaded file and store it?
    Thanks very much in advance.

    Hi,
    Before setting the string or xstring to server->response->set_cdata (string) or server->response->set_data (xstring) try this:
    CONCATENATE 'attachment;filename=' lv_filename '.xml'  INTO lv_string.
    * Setting the filename by default
      server->response->set_header_field( name  = 'Content-Disposition'
                                          value = lv_string ).
    Hope this helps.
    Regards,
    Abhinav

  • File upload api

    Hi!
    I am looking for an api that handles file upload though jsp/servlet. I'm currently using the JspSmart smartUpload component but they looks like they have stop develop it so I'm am looking for an alternative.
    Thanks in advance
    Roland Carlsson

    Hi
    O'reilly is deloping som classe for file uploading.
    http://www.servlets.com/cos/index.html
    Cyrill

  • Multiple Image File Upload for Creating Weblogs

    Maybe I just like pretty pictures more than most webloggers; but it seems like I spend a heck of a lot of time uploading images for my weblogs to SDN.  It would great if there was an easier way to do this.  Perhaps something as simple as uploading more than one image at a time.

    Hi Thomas,
    We will look into it. May be via a .zip file.
    Best, Mark.

  • HELP! File Upload Servlet and Internet Explorer

    Hello people. I hope this is an easy problem to solve...
    I have a servlet upload program that works using Mozilla browser (www.mozilla.org), but for some reason it doesn't work using Microsoft IE. The servlet is also using the servlet upload API from Apache (commons).
    I'm using IE version 6.0.2800.1106 in a Win98SE host computer. I get a cannot find path specified error message (see below). At work, I also get the same error message using IE, but don't know what version. The OS is XP. Unfortunately, at work, I can't install Mozilla browser (or any software-company policy) to see if Mozilla works there too. I would've like to have tested to see if the upload program worked on Mozilla on a truly remote computer.
    So I figured, it must be a IE configuration issue, but darn it!! I began by resetting IE to default settings, but still have the problem, I played around with several different combinations of settings in "Tools"-->"Internet Options...", and I still get the error message. Someone PLEASE HELP ME!!!
    Dunno, if it will help, I've also pasted the upload servlet source code below and the html file that's calling the upload servlet, but you still need the Apache commons file upload API.
    Trust me on this one folks, for some reason it works for Mozilla, but not for IE. With IE, I can at least access web server, and therefore, the html file that calls the upload servlet , so I don't think it's a Tomcat configuration issue (version 5.0). I actually got the code for the file upload servlet from a book relatively new in the market (printed in 2003), and it didn't mention any limitations as far as what browser to use or any browser configuration requirements. I have e-mailed the authors, but they probably get a ton of e-mails...
    Anyone suggestions?
    Meanwhile, I will try to install other free browsers and see if the file upload program works for them too.
    ERROR MESSAGE:
    "HTTP Status 500 -
    type Exception report
    message
    description The server encountered an internal error () that prevented it from fulfilling this request.
    exception
    javax.servlet.ServletException: C:\TOMCAT\webapps\MyWebApps\files\C:\WINDOWS\Desktop\myfile.zip (The system cannot find the path specified)
         com.jspbook.FileUploadCommons.doPost(FileUploadCommons.java:43)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
    root cause
    java.io.FileNotFoundException: C:\TOMCAT\webapps\MyWebApp\files\C:\WINDOWS\Desktop\myfile.zip (The system cannot find the path specified)
         java.io.FileOutputStream.open(Native Method)
         java.io.FileOutputStream.(FileOutputStream.java:176)
         java.io.FileOutputStream.(FileOutputStream.java:131)
         org.apache.commons.fileupload.DefaultFileItem.write(DefaultFileItem.java:392)
         com.jspbook.FileUploadCommons.doPost(FileUploadCommons.java:36)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
    note The full stack trace of the root cause is available in the Tomcat logs.
    Apache Tomcat 5.0.16"
    FILE UPLOAD SERVLET source code:
    import java.io.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import org.apache.commons.fileupload.*;
    import java.util.*;
    public class FileUploadCommons extends HttpServlet {
    public void doPost(HttpServletRequest request,
    HttpServletResponse response)
    throws IOException, ServletException {
    response.setContentType("text/html");
    PrintWriter out = response.getWriter();
    out.println("<html>");
    out.print("File upload success. <a href=\"/MyWebApp/files/");
    out.print("\">Click here to browse through all uploaded ");
    out.println("files.</a><br>");
    ServletContext sc = getServletContext();
    String path = sc.getRealPath("/files");
    org.apache.commons.fileupload.DiskFileUpload fu = new
    org.apache.commons.fileupload.DiskFileUpload();
    fu.setSizeMax(-1);
    fu.setRepositoryPath(path);
    try {
    List l = fu.parseRequest(request);
    Iterator i = l.iterator();
    while (i.hasNext()) {
    FileItem fi = (FileItem)i.next();
    fi.write(new File(path, fi.getName()));
    catch (Exception e) {
    throw new ServletException(e);
    out.println("</html>");
    public void doGet(HttpServletRequest request,
    HttpServletResponse response)
    throws IOException, ServletException {
    doPost(request, response);
    HTML PAGE that calls the upload servlet:
    <html>
    <head>
    <title>Example HTML Form</title>
    </head>
    <body>
    <p>Select a file to upload or browse
    currently uploaded files.</p>
    <form action="http://##.##.##.####/MyWebApp/FileUploadCommons"
    method="post" enctype="multipart/form-data">
    File: <input type="file" name="file"><br>
    <input value="Upload File" type="submit">
    </form>
    </body>
    </html>
    Thanks in advance for any assistance.
    -Dan

    I'm guessing what is happening is that Mozilla tells the servlet "here comes the file myfile.zip". The servlet builds a file name for it:
        String path = sc.getRealPath("/files");
        // path is now C:\TOMCAT\webapps\MyWebApps\files\
        fi.write(new File(path, fi.getName()));
        // append myfile.zip to "path", making it C:\TOMCAT\webapps\MyWebApps\files\myfile.zipIE, however, tells "here comes the file C:\WINDOWS\Desktop\myfile.zip". Now imagine what the path+filename ends up being...
    So what you want to do is something along the lines of (assuming Windoze):
    public static String basename(String filename)
        int slash = filename.lastIndexOf("\\");
        if (slash != -1)
            filename = filename.substring(slash + 1);
        // I think Windows doesn't like /'s either
        int slash = filename.lastIndexOf("/");
        if (slash != -1)
            filename = filename.substring(slash + 1);
        // In case the name is C:foo.txt
        int slash = filename.lastIndexOf(":");
        if (slash != -1)
            filename = filename.substring(slash + 1);
        return filename;
        fi.write(new File(path, basename(fi.getName()));
        ....You can make the file name check more bomb proof if security is an issue. Long file names trying to overflow something in the OS, NUL characters, Unicode, forbidden names in Windos (con, nul, ...), missing file name, ...

  • File Upload using PRC API's

    Guys,
    I am trying to upload a new document using PRC API's. Below is required code snippet that i am using.
    IRemoteDocument remoteDoc = documentManager.createRemoteDocument(folderID,dataSourceID,document.getPath()); remoteDoc.setOverrideName(document.getName()); remoteDoc.setOverrideDescription(document.getDescription()); remoteDoc.setType("http://www.plumtree.com/dtm/mime", document.getFileType());int docID = -1;docID = remoteDoc.save();
    dataSourceID - ID of my file upload datasource , document - is my java object which has all the document related properties such as , name , description , MIME type of document etc..Below is different document path's(scenarios) that I have triedc:\work\sample.txt\\servername\work\sample.txthttp:\\appserver:7001\appName\uploadfiles\sample.txt
    When I execute this code from my application i get a below error.
    com.plumtree.remote.prc.PortalException: null; nested exception is: java.rmi.RemoteException: Error in function PTDataSource.ImportDocument(vDocumentLocationBagAsXML == '<?xml version="1.0" encoding="ucs-2"?><PTBAG V="1.1" xml:space="preserve"><I N="PTC_DTM_SECT">1001</I><S N="PTC_DOC_ID">application/msword</S><S N="PTC_UNIQUE">\\PHUSEH-L33664.NA.novartis.net\work\sample.doc</S></PTBAG>', lDocumentTypeID == 100, pCard == com.plumtree.server.impl.directory.PTCard@c27b6f, bSummarize == false, pProvider == null): Error in function PTDataSource.ImportDocument (vDocumentLocationBagAsXML == <?xml version="1.0" encoding="ucs-2"?><PTBAG V="1.1" xml:space="preserve"><S N="PTC_DOC_ID">application/msword</S><I N="PTC_DTM_SECT">1001</I><S N="PTC_UNIQUE">\\PHUSEH-L33664.NA.novartis.net\work\sample.doc</S></PTBAG>, lDocumentTypeID == 100, pCard == com.plumtree.server.impl.directory.PTCard@c27b6f, bSummarize == false, pProvider == null): SOAP fault: faultcode='soapenv:Server.userException' faultstring='java.lang.NullPointerException' at com.plumtree.remote.prc.DocumentWrapper.save()
    Below is my environment.Plumtree is running on Weblogic 8.1 (Solaris OS) , ptupload webservice is running on weblogic8.1 solaris,My upload document portlet is running on weblogic 8.1 (Windows OS)
    If anyone has any working sample code please send it to my ID [email protected] or else please upload it here.Thank You ,
    Dan.

    make sure your modjk logs don't have any errors.
    Here's a peice out of my httpd.conf
    #ADDed Oct 15,2003, seemed to remove modjk error
    AddType multipart/form-data .gif .png  .jpg .peg .jpeg .jpeI used to get strange modjk logged errors.
    Also did you compile jk2 from source???
    com.oreilly.servlet --- cos
    http://www.servlets.com/cos/index.html
    http://www.servlets.com/cos/cos-05Nov2002.zip
    But if my bit shift is correct wouldn't my regular textfile upload be distored?From what I remember, the problem is something to do with logical AND or OR, with the bits. Apache receives it fine, passess it through jk, and and either the most sig or least gets lost. Image data is critical as every bit counts, text file, you may not notice it(white space), or every nTH file upload might fail.
    here are the version numbers of software I use, and have compiled all from source.
    apache-httpd-2.0.47
    tomcat-4.1.27
    jk2-connectors-2.0.2

  • My file upload java application working fine in tomcat 7  but not working in weblogic 11

    Hi All,
    My  file upload  java application  successfully run in tomcat 7 . But  I could not run it in Weblogic 11.   Getting following error message   . Please help.
    Please contact your administrator.org.springframework.beans.NullValueInNestedPathException: Invalid property &#039;fileData[0]&#039; of bean class [com.techm.util.UploadItem]: Cannot access indexed value in property referenced in indexed property path &#039;fileData[0]&#039;: returned null
      at org.springframework.beans.BeanWrapperImpl.setPropertyValue(BeanWrapperImpl.java:681)
      at org.springframework.beans.BeanWrapperImpl.setPropertyValue(BeanWrapperImpl.java:651)
      at org.springframework.beans.AbstractPropertyAccessor.setPropertyValues(AbstractPropertyAccessor.java:78)
      at org.springframework.validation.DataBinder.applyPropertyValues(DataBinder.java:587)
      at org.springframework.validation.DataBinder.doBind(DataBinder.java:489)
      at org.springframework.web.bind.WebDataBinder.doBind(WebDataBinder.java:149)
      at org.springframework.web.bind.ServletRequestDataBinder.bind(ServletRequestDataBinder.java:110)
      at org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter$ServletHandlerMethodInvoker.doBind(AnnotationMethodHandlerAdapter.java:566)
      at org.springframework.web.bind.annotation.support.HandlerMethodInvoker.resolveHandlerArguments(HandlerMethodInvoker.java:213)
      at org.springframework.web.bind.annotation.support.HandlerMethodInvoker.invokeHandlerMethod(HandlerMethodInvoker.java:132)
      at org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.invokeHandlerMethod(AnnotationMethodHandlerAdapter.java:326)
      at org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.handle(AnnotationMethodHandlerAdapter.java:313)
      at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:875)
      at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:807)
      at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:571)
      at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:511)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
      at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
      at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
      at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:301)
      at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
      at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
      at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:119)
      at java.security.AccessController.doPrivileged(Native Method)
      at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:324)
      at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:460)
      at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:103)
      at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:171)
      at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
      at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
      at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:163)
      at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
      at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3730)
      at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3696)
      at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
      at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
      at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2273)
      at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2179)
      at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1490)
      at weblogic.work.ExecuteThread.execute(ExecuteThread.java:256)
      at weblogic.work.ExecuteThread.run(ExecuteThread.java:221)

    What version of spring are you using in tomcat?
    What version of WLS are you using.
    What JDK are you using in both environments?
    Is the issue random? or can you reproduce it at will?
    Thanks
    Luz

  • File Upload weblogic 8.1 Struts 1.1

    I am getting this error while file uploading in struts Could not
    deserialize session data CommonsMultipartRequestHandler
    I read this bug is solved in struts 1.1 i am working on weblogic 81. with
    struts 1.1
    Can anybody help
    Thanks
    Shail
    <Jul 17, 2004 1:36:16 PM GMT+05:30> <Warning> <HTTP> <BEA-101138>
    <ServletContext(id=28000914,name=DefaultWebApp,context-path=) One of the
    getParameter family of methods called after reading from the
    ServletInputStream. Not merging post parameters.>
    Jul 17, 2004 1:38:35 PM org.apache.struts.util.PropertyMessageResources
    <init>
    INFO: Initializing, config='org.apache.struts.util.LocalStrings',
    returnNull=true
    Jul 17, 2004 1:38:35 PM org.apache.struts.util.PropertyMessageResources
    <init>
    INFO: Initializing, config='org.apache.struts.action.ActionResources',
    returnNull=true
    Jul 17, 2004 1:38:36 PM org.apache.struts.util.PropertyMessageResources
    <init>
    INFO: Initializing, config='ApplicationResources', returnNull=true
    <Jul 17, 2004 1:38:36 PM GMT+05:30> <Error> <HTTP> <BEA-101309>
    <[ServletContext(id=28000914,name=DefaultWebApp,context-path=)] could not
    deserialize the context attribute
    "org.apache.struts.action.REQUEST_PROCESSOR"
    java.io.NotSerializableException: org.apache.struts.action.RequestProcessor
    at
    java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1054)
    at
    java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:278)
    at
    weblogic.servlet.internal.AttributeWrapper.getObject(AttributeWrapper.java:9
    1)
    at
    weblogic.servlet.internal.AttributeWrapper.getObject(AttributeWrapper.java:6
    6)
    at
    weblogic.servlet.internal.WebAppServletContext.getAttribute(WebAppServletCon
    text.java:633)
    at
    org.apache.struts.action.ActionServlet.getRequestProcessor(ActionServlet.jav
    a:855)
    at
    org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
    at
    org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at
    weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(Servle
    tStubImpl.java:1053)
    at
    weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
    :387)
    at
    weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
    :305)
    at
    weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(W
    ebAppServletContext.java:6291)
    at
    weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubjec
    t.java:317)
    at
    weblogic.security.service.SecurityManager.runAs(SecurityManager.java:97)
    at
    weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletCo
    ntext.java:3575)
    at
    weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java
    :2573)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:178)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:151)
    >
    <Jul 17, 2004 1:38:36 PM GMT+05:30> <Error> <HTTP Session> <BEA-100028>
    <Could not deserialize session data.
    java.io.NotSerializableException:
    org.apache.struts.upload.CommonsMultipartRequestHandler$CommonsFormFile
    at
    java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1054)
    at
    java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1330)
    at
    java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1302)
    at
    java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1245)
    at
    java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1052)
    at
    java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:278)
    at
    weblogic.servlet.internal.AttributeWrapper.getObject(AttributeWrapper.java:9
    1)
    at
    weblogic.servlet.internal.AttributeWrapper.getObject(AttributeWrapper.java:6
    6)
    at
    weblogic.servlet.internal.session.SessionData.getAttribute(SessionData.java:
    419)
    at
    org.apache.struts.util.RequestUtils.createActionForm(RequestUtils.java:777)
    at
    org.apache.struts.action.RequestProcessor.processActionForm(RequestProcessor
    .java:364)
    at
    org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:253)
    at
    org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
    at
    org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at
    weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(Servle
    tStubImpl.java:1053)
    at
    weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
    :387)
    at
    weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
    :305)
    at
    weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(W
    ebAppServletContext.java:6291)
    at
    weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubjec
    t.java:317)
    at
    weblogic.security.service.SecurityManager.runAs(SecurityManager.java:97)
    at
    weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletCo
    ntext.java:3575)
    at
    weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java
    :2573)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:178)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:151)
    >
    <Jul 17, 2004 1:38:37 PM GMT+05:30> <Warning> <HTTP> <BEA-101138>
    <ServletContext(id=28000914,name=DefaultWebApp,context-path=) One of the
    getParameter family of methods called after reading from the
    ServletInputStream. Not merging post parameters.>

    In my application i have some java user defined objects that contains a list and on that list I have some other objects and those objects contains again a java object and those objects containing again some simple java beans that contains data fetched from database.
    It is basically a scenario for report generation
    And I am getting the following error
    ####<Dec 5, 2006 8:41:04 PM CST> <Error> <Cluster> <MDS0JEAPPIP01> <mps_prod_iprice_1> <ExecuteThread: '7' for queue: 'weblogic.kernel.Default'> <<WLS Kernel>> <> <BEA-000126> <All session objects should be serializable to replicate. Check the objects in your session. Failed to replicate non-serializable object.>
    But if the data is empty then I am not getting this error at that time also the object was in session scope but with null value as there is no data.

  • How to upload and download any file from plsql through weblogic server

    hi all,
    how to upload and download any file from plsql through weblogic server? i am using oracle 10g express edition and jboss.
    Thanks and Regards,
    MSORA

    hi bala ,
    for a windown server u can use VNC (virtual network connection) which opens a session on u r desktop later u can drag and drop form there vice versa and for a linux box you can use Win SCP which helps to open a session with interface to u r desktop in both cases you can upload and down load files very easiy just as we drag and drop items in a simple pc .. we use the same technique...
    bye
    vamshi

  • File upload is not perform by weblogic 10

    Hello,
    I'm working a project my root folder name is "tcap1" in that folder "test" is another folder inside that folder I place "image" folder and develop a image file upload program in JSP. when user upload his/her photo that photo should be store in image folder. I'm tested that jsp file in tomcat7.0 i.e working good and image will store in image folder.
    Other hand side I'm using Weblogic10g. I crate a war file my project and deployed in weblogic10g and run my application it is working but my fileupload.jsp is not working.how is it possible to work my code working in Tomcat7.0 but not working in Weblogic10g.
    WebLogic10g exception come on console:_
    Releasing conn back to pool
    <May 26, 2012 10:46:28 AM IST> <Error> <HTTP> <BEA-101020> <[weblogic.ser
    ternal.WebAppServletContext@1cb1d37 - appName: 'tcap1', name: 'tcap1.war'
    xt-path: '/tcap1', spec-version: '2.5'] Servlet failed with Exception
    java.lang.NullPointerException
    at java.io.File.<init>(File.java:222)
    at com.braahmam.tcap1.test.AddImageServlet.doPost(AddImageServlet
    01)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
    at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAct
    (StubSecurityHelper.java:227)
    Truncated. see log file for complete stacktrace
    >
    In JSP page error comes_
    Error 500--Internal Server Error
    java.lang.NullPointerException
         at java.io.File.(File.java:222)
         at com.braahmam.tcap1.test.AddImageServlet.doPost(AddImageServlet.java:401)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
         at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
         at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:292)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:175)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3498)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(Unknown Source)
         at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2180)
         at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2086)
         at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1406)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
    Edited by: 936878 on May 25, 2012 11:34 PM
    Edited by: 936878 on May 25, 2012 11:35 PM
    Edited by: 936878 on May 26, 2012 12:04 AM

    I figured out the problem.
    I kept jce.jar file under bea\jdk131_06\lib\ext.
    Plus changed java.policy,java.security to look like jre1.4 poicies.
    Added local_policy.jar, US_export_policy.jar
    I found these suggestions from web for a search of "install sun JCE"
    Thanks

  • Office 365 Files REST API and chunked upload

    Hello,
    I am currently working on integration with OneDrive for Business and I need to upload large files in chunks. I need to do something like  this but using
    the O365 Files REST API. As far as I understand this is currently not supported.
    Are there any plans to support
    uploading in chunks? If yes, can you please provide some (rough) estimate?
    Thanks
    Andrey

    Thank you for the quick answer!
    We are trying to upload the files using javascript and we are currently working with this API:
    https://msdn.microsoft.com/en-us/office/office365/api/files-rest-operations
    We have also noticed that the roadmap for Office 365
    http://roadmap.office.com/en-us contains SharePoint API Partial File Upload Support. 
    Does the update pointed in the roadmap refer to the API we are using? Or if you are saying we can already do chunked upload using it, can you please point us to a working sample?
    Thanks
    Andrey

  • File upload using Servlets and Weblogic

    Hi,
    I need to write a servlet that can upload a .doc file to a folder on the server. Can someone please let me know abot the code i need to write, as i am a novice in servlets.
    Thanks in advance
    buddy0303

    Another, simpler (we think), such package is Jenkov HTTP Multipart File Upload. It's a servlet filter which can work in front of both servlets and JSP's. The servlet filter parses the uploaded file and stores it temporarily on the servers disk. When the servlet or JSP executes afterwards, it can obtain all the information about the file, from the request attributes. There is a decent manual for HTTP Multipart File Upload on the website.
    Just search for "Jenkov HTTP Multipart" on Google and you'll find it. HTTP Multipart is free, open source, Apache Licsense.

  • WSRP and File Uploads

    Hello,
    I am using BEA 8.1 SP4.
    I am trying to find out the status of being able to do file uploads in portlets being displayed remotely. I have a JSR-168 portlet which simply does a file upload to the server. The JSP page that renders the content contains:
    <form name="ont_mainform" method="post" action="<%=portletURI%>" enctype="multipart/form-data">
    When I have the same portlet running remotely in another portal via WSRP, I get the error:
    java.lang.Exception: The request does not contain a multipart/form-data or multipart/mixed stream. Content type = null
    Does anyone know whether WSRP is not able to handle file uploads in the web service call just yet or is there something I need to do to get it to work? Or is this a container issue?
    Thanks for any thoughts - Peter Len

    Hi Peter,
    By default, the consumer reads the MIME message, sends it to the
    producer over SOAP, and the producer then recreates the stream for the
    portlet. So, the boundary strings and the headers may not be the same.
    WLP8.1SP4 also supports a mode wherein the uploaded data is transported
    as a MIME attachment. For this enable accepts-mime to "true" and
    transport="attachment" on the producer side in wsrp-producer-config.xml.
    Here is a sample snippet.
    <markup secure="false" rewrite-urls="true"
    transport="string" accepts-mime="false"/>
    Can you try this configuration and see if it works differently.
    Subbu
    Peter Len wrote:
    Subbu,
    This is a re-copy of my last reply as it looks like the line breaks did not take.
    Okay, I have run across something else which is another oddity. In the code that deals with the commons-fileupload.
    I have the following code:
    int boundaryIndex = contentType.indexOf("boundary="); byte[] boundary = contentType.substring(boundaryIndex +
    9).getBytes();
    InputStream input = req.getPortletInputStream(); MultipartStream multi = new MultipartStream(input,
    boundary);
    boolean nextPart = multi.skipPreamble();
    // some print statements
    When running the portlet locally I get:
    Boundary Index: 21
    Boundary Array: [B@1cccea2
    InputStream: weblogic.servlet.internal.ServletInputStreamImpl@111fae9 MultipartStream: boundary='[B@17002a1' bufSize=4096 skipPreamble?: true
    When running it remotely I get:
    Boundary Index: 21
    Boundary Array: [B@737d8a
    InputStream: com.bea.wsrp.producer.container.MultipartInputStream@3708e6 MultipartStream: boundary='[B@12952ec' bufSize=4096 skipPreamble?: false
    There seems to be a difference in what the InputStream object is. The key here is that the skipPreamble boolean is false for the remote portlet and that essentially keeps the code from downloading anything. Not sure if this is a commons-fileupload thing or not. Do you know of another fileupload API that you know works with remote portlets?
    Thanks - Peter                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • File upload....How to find the user entered any file or not

    Hi Team,
    I am working on with file upload UI.
    Some times without clicking on browse button, I mean without entering any file they are cliking on upload button, which is giving the exception.
    I know there is no action for UI element, Then how to resolve this?
    I just control the user, not to press the upload button without entering any file name there?
    How to resolve this?
    regards,
    Bala

    Hi,
    This code will solve ur problem.
    public void onActionUploadFile(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
        //@@begin onActionUploadFile(ServerEvent)
        IWDAttributeInfo attributeInfo = wdContext.getNodeInfo().getAttribute(IPrivateFileUploadDownloadView.IContextElement.FILE_RESOURCE);
        IWDModifiableBinaryType binaryType = (IWDModifiableBinaryType)attributeInfo.getModifiableSimpleType();
        IPrivateFileUploadDownloadView.IContextElement element = wdContext.currentContextElement();
        if(element.getFileResource() !=null)
             try
                  String mimeType = binaryType.getMimeType().toString();
                  byte[] file = element.getFileResource();
                  //element.s
                  wdComponentAPI.getMessageManager().reportMessage(IMessageFileUploadDownloadComp.SF__UPLOAD,new Object[] {binaryType.getFileName()},false);
             catch(Exception e)
                  throw new WDRuntimeException(e);
        else
              wdComponentAPI.getMessageManager().reportMessage(IMessageFileUploadDownloadComp.NO__FILE,new Object[] {" "},true);
        //@@end
    Here "fileresource" is context attribute name
    Regards,
    Sunaina Reddy T

  • Problem using File upload in portlets

    hello there
    I'm trying to use file upload component in one of my portlets. I searched a lot about a working component to be used in portlets since the standard one that comes with JSC doesn't work in portlets. I managed to get commons file upload and tomahawk to run in my portlet, but when I choose a file and try to get selected file's details it throughs a NullPointerException reporting that the file object is null.
    so please can anyone guide me to a working portlet example, I tried to find one but I couldn't. if that's hard to find, what should I do ?
    thank you in advance

    I added file upload component in JSF from portlets in Sun Java Portal server.
    Take a look...
    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>SFTB Anonymous Mail Portlet</description>
    <portlet-name>SFTBAnonymousMailPortlet</portlet-name>
    <display-name>SFTBAnonymousMailPortlet</display-name>
    <portlet-class>org.apache.portals.bridges.portletfilter.FilterPortlet</portlet-class>
    <init-param>
    <name>portlet-class</name>
    <value>com.sun.faces.portlet.FacesPortlet</value>
    </init-param>
    <!-- Filter for MyFaces Tomahawk extension. -->
    <init-param>
    <name>portlet-filters</name>
    <value>jp.sf.pal.tomahawk.filter.ExtensionsPortletFilter</value>
    </init-param>
    <init-param>
    <description>Portlet init page</description>
    <name>com.sun.faces.portlet.INIT_VIEW</name>
    <value>/jsp/index.jsp</value>
    </init-param>
    <supports>
    <mime-type>text/html</mime-type>
    <portlet-mode>VIEW</portlet-mode>
    <portlet-mode>EDIT</portlet-mode>
    <portlet-mode>HELP</portlet-mode>
    </supports>
    <portlet-info>
    <title>&#1054;&#1090;&#1087;&#1088;&#1072;&#1074;&#1082;&#1072; &#1087;&#1088;&#1077;&#1076;&#1083;&#1086;&#1078;&#1077;&#1085;&#1080;&#1081;</title>
    <short-title>&#1054;&#1090;&#1087;&#1088;&#1072;&#1074;&#1082;&#1072; &#1087;&#1088;&#1077;&#1076;&#1083;&#1086;&#1078;&#1077;&#1085;&#1080;&#1081;</short-title>
    </portlet-info>
    </portlet>
    </portlet-app>
    web.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <!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>SFTBAnonymousMailComment</display-name>
    <context-param>
    <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
    <param-value>server</param-value>
    </context-param>
    <context-param>
    <param-name>javax.faces.CONFIG_FILES</param-name>
    <param-value>/WEB-INF/faces-config.xml</param-value>
    </context-param>
    <!--
    Extensions filter from Apache MyFaces Tomahawk used for uploads files.
    -->
    <filter>
    <filter-name>ExtensionsFilter</filter-name>
    <filter-class>org.apache.myfaces.webapp.filter.ExtensionsFilter</filter-class>
    <init-param>
    <param-name>uploadMaxFileSize</param-name>
    <param-value>10m</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>
    <init-param>
    <param-name>uploadThresholdSize</param-name>
    <param-value>100k</param-value>
    <description>Set the threshold size - files
    below this limit are stored in memory, files above
    this limit are stored on disk.
    Format: 10 - 10 bytes
    10k - 10 KB
    10m - 10 MB
    1g - 1 GB
    </description>
    </init-param>
    </filter>
    <filter-mapping>
    <filter-name>ExtensionsFilter</filter-name>
    <servlet-name>FacesServlet</servlet-name>
    </filter-mapping>
    <servlet>
    <servlet-name>FacesServlet</servlet-name>
    <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
    <load-on-startup>1</load-on-startup>
    </servlet>
    <servlet-mapping>
    <servlet-name>FacesServlet</servlet-name>
    <url-pattern>*.faces</url-pattern>
    </servlet-mapping>
    </web-app>
    Files in WEB-INF/lib
    commons-beanutils-1.7.0.jar
    commons-collections-3.2.jar
    commons-digester-1.8.jar
    commons-fileupload-1.2.1.jar
    commons-io-1.2.jar
    commons-logging-1.1.1.jar
    faces-response-filter-0.2.jar
    jsf-api-1.1_02.jar
    jsf-impl-1.1_02.jar
    jsf-portlet-1.1.5.jar
    jstl-1.1.0-D13.jar
    log4j-1.2.9.jar
    portals-bridges-portletfilter-1.0.jar
    standard-1.1.0-D13.jar
    tomahawk-1.1.6.jar
    tomahawk-bridge-0.9.1.jar
    Files tomahawk-bridge-0.9.1.jar, faces-response-filter-0.2.jar may be found there http://sourceforge.jp/projects/pal/
    In JSF beans I'm using org.apache.myfaces.custom.fileupload.UploadedFile
    Hope this helps.
    Bests,
    Alex Magdenko

Maybe you are looking for

  • Passing form data to a PDF for printing

    I have found a few articles online about setting this up, but having no luck on getting the data to pass and display within the pdf file.. Can anyone offer suggestions or some good tutorial sites i can continue to read about? thanks... ASP, SQL2005,

  • Attributes in Layout

    Hi Case: We have costcenter in the Cube but the costcenter manager responsible for that costcenter is not there in the cube but it is the attribute to Costcenter. When I design the Layout, Can I use the person responsible to costcenter attribute in t

  • Installing WRT54G on Windows 7 - Error - Settings wizard - MFC Application stopped.

    Trying to add/configure a WRT54G through a Win 7 PC. Running setup wizard fails even in Windows compatibility mode. Setup wizard only worked on Win XP (SP3). Anybody else seen this? 

  • Jsp:useBean no type with name

    On a jsp page, why is it displying: no type with this name could be found around <jsp:useBean..? Could any body help me out?

  • Sun Cluster Application Development

    Hi, I am trying to create a sun cluster application using the GUI version of the Agent builder, "rtwiz". I successfully execute the create and configuration steps. I install the package. When I start the cluster application from the /opt/SUNWsample/u