Problem with PAI (Process After Input) in JSPDynpage

Hi All,
I am implementing a file upload functionality through JSPDynpage. When I browse the excel file and try to upload it, it gives this error :
com.sapportals.htmlb.page.PageException: Eventhandler- "upload_file" or "onUpload_file" not found!
     at com.sapportals.htmlb.page.DynPage.doProcessCurrentEvent(DynPage.java:168)
     at com.sapportals.htmlb.page.PageProcessor.handleRequest(PageProcessor.java:115)
     at com.sapportals.portal.htmlb.page.PageProcessorComponent.doContent(PageProcessorComponent.java:134)
This is my component :
public class FileUploadUtility extends PageProcessorComponent {
  public DynPage getPage(){
    return new FileUploadUtilityDynPage();
  public static class FileUploadUtilityDynPage extends JSPDynPage{
    private fileUpload fileUploadBean = null;
     protected IPortalComponentRequest request;
     protected IPortalComponentResponse response;
     protected IPortalComponentSession session;
     protected IPortalComponentContext context;
     protected IPortalComponentProfile profile;
     protected String userId;
     private final static int INITIAL_STATE = 0;   
     private final static int OUTPUT_STATE = 1;
     private final static int ERROR_STATE = 2; 
     private int state = INITIAL_STATE;
    public void doInitialization(){
          request = (IPortalComponentRequest) this.getRequest();
          session = ((IPortalComponentRequest)getRequest()).getComponentSession();
          context = request.getComponentContext();
          profile = context.getProfile();
          IUserContext userContext = request.getUser();
          userId = userContext.getUserId();
          System.err.println("berry + Getting userID " + userId);               
          fileUploadBean = new fileUpload();
          session.putValue("fileUploadBean", fileUploadBean);
          //uploadUtility();
    public void uploadUtility(){
          String mimetype;
          String resourceName;
          String repository;
          FileInputStream sourceFileInput = null;
          IPortalComponentRequest request = (IPortalComponentRequest)this.getRequest();
     /*     IWDClientUser wdUser = WDClientUser.getCurrentUser();
          IUser user = wdUser.wdUser.getSAPUser(); */
          IUser epUser=(IUser)request.getUser().getUser();
          System.err.println("epUser - " + epUser);
          ResourceContext ctx = new ResourceContext(epUser);
          repository = "/Folder1/Folder2";
          RID rid=RID.getRID(repository);
          System.err.println("getting RID :- " + rid);
          IPageContext context = PageContextFactory.createPageContext(request,response);
     //     PageContext context = PageContextFactory.createPageContext(request, response);
          Event event=context.getCurrentEvent();
          if(null!=event)
               String event_name=event.getAction();
               if(null!=event_name && event_name.trim().equalsIgnoreCase("upload_file"))
                    //FileUpload fileUpload = (FileUpload)context.getComponentForId("fileupload");
                    FileUpload fileUpload = (FileUpload)context.getComponentForId("fileupload");
                         if(null !=fileUpload && null!=fileUpload.getFile())
                                   mimetype = fileUpload.getFile().getContentType();
                                   resourceName = fileUpload.getFile().getFileName();
                                   //sourceFileInput = new FileInputStream(fileUpload.getFile().getFile().getAbsolutePath());
                                   try {
                                        sourceFileInput = new FileInputStream(fileUpload.getFile().getFile().getAbsolutePath());
                                   } catch (FileNotFoundException fnf) {
                                        System.err.print("FileNotFoundException Occured " + fnf.toString());
                                   Content content = new Content(sourceFileInput, mimetype, -1L);
                                   //IResource resource = (ResourceFactory.getInstance().getResource(rid, ctx));
                                   IResource resource = null;
                                   try {
                                        resource =(IResource) (ResourceFactory.getInstance().getResource(rid, ctx));
                                   } catch (ResourceException resexp) {
                                        System.err.print("Resource Exception Occured for IResource" + resexp.toString());                          }
                                   ICollection aCollection=(ICollection)resource;
                                   //IResource newResource = aCollection.createResource(resourceName, null, content);
                                   try {
                                        IResource newResource = (IResource) aCollection.createResource(resourceName, null, content);
                                   } catch (NotSupportedException e2) {
                                        System.err.print("Not Supported Exception Occured" + e2.toString());
                                   } catch (AccessDeniedException e2) {
                                        System.err.print("Access Denied Exception Occured" + e2.toString());
                                   } catch (ResourceException e2) {
                                        System.err.print("Resource Exception Occured for ICollection" + e2.toString());      
                                   }//end of catch
                    }//end of innermost if
          }//end of 2nd if
     }//end of 1st If
}// end of uploadUtil
    public void doProcessAfterInput() throws PageException {
          uploadUtility();
    public void doProcessBeforeOutput() throws PageException {
      this.setJspName("File_Upload.jsp");
Kindly help with expert suggestions :

I put this
public void onUpload_file (Event event) {
          uploadUtility();
In my FileUploadUtilityDynPage.java and its still throwing the same error.
{0}#1#com.sapportals.htmlb.page.PageException: Eventhandler- "upload_file" or "onUpload_file" not found!
     at com.sapportals.htmlb.page.DynPage.doProcessCurrentEvent(DynPage.java:168)
     at com.sapportals.htmlb.page.PageProcessor.handleRequest(PageProcessor.java:115)
     at com.sapportals.portal.htmlb.page.PageProcessorComponent.doContent(PageProcessorComponent.java:134)
I've also imported import com.sapportals.htmlb.event.*;
No relief!!

Similar Messages

  • Problem with iWeb 09, after the publication in a local file.

    *Subject: problem with iWeb 09, after the publication in a local file, i can't see my blog, nor my photos, but before that all was working fine.*
    After the publication in the local file, I see all my pages, but there is a mistake on the page "Blog" where I just can see the top of my page, it's cut and I can't see it entirely, so I can't see the inputs while I should see 3 news or 3 inputs. And it's the same for the "Photos" page where the page is cut, I can't see the photos, and it's just written : "Put the slide show and subscribe".To finish, when I want to activate the comments, it doesn't work neither.
    Please help me.

    I want to activate the comments, it doesn't work neither.
    The comments feature is only available when you publish to the MobileMe server, so I don't think you can use it when you publish to a local file.

  • Problem with AND process in daily running process chain

    Dear Friends,
    I am currently I am facing problem with AND process. In my daily running process chain, daily the process chain is failing at AND process. Currently I am workaround and manually repairing the AND process and loading the data with below (link) steps.
    /people/siegfried.szameitat/blog/2006/02/26/restarting-processchains
    I need permanent solution for this reoccurring problem. Kindly share your thoughts and ideas to resolve this problem.

    Hi,
    The below are the job log. After this the batch job is failing.
    Job log overview for job:  BI_PROCESS_AND
    Job started
    Step 001 started (program RSPROCESS, variant &0000000190315, user ID MAESTRO)
    This AND process is not waiting for event RSPROCESS, parameter 475P4YTXTIIOA6IQ9GAZVEP24
    Job cancelled after system exception ERROR_MESSAGE

  • Problem with css processing in Firefox8 on Win7.

    Hi guys. I have a problem with css processing in Firefox8 on Win7. I need to make div which width and left css properties should be dynamically changed. Inside this div i have an swf object. When i change width and left css styles for my div, it jumps on the page, but other browsers render that well. What can you suggest to fix this problem? Thanks

    A good place to ask advice about web development is at the mozillaZine Web Development/Standards Evangelism forum.<br />
    The helpers at that forum are more knowledgeable about web development issues.<br />
    You need to register at the mozillaZine forum site in order to post at that forum.<br />
    See http://forums.mozillazine.org/viewforum.php?f=25

  • Reception / Battery problems with iPhone 3GS after upgrading to iOS 4.2.1

    There are major reception and battery problems with iPhone 3GS after upgrading to iOS 4.2.1.
    I can not believe that Apple did not test this for major bugs like this one is.
    I am a business user and can not effort to have bad reception. Apple wants to gain in the business clients... I never had this with my former BlackBerrys!
    I need a reliable phone not a play thing like this is right now, it just needs it to work propely. And if a major bug like this comes along, fix it immediately. After the iPhone4 story, now this...incredible! Going back to my reliable BlackBerry! It just ain't reliable and takes forever to fix a problem.

    I have the same issue after iOS 4.2.1 update. I am using iPhone 3GS officially unlocked by Apple. I tried using different SIM cards and both carriers show same problem when using phone in 3G mode. Phone falls back to EDGE mode showing 'E' from '3G' at start. I have reset the phone and rebooted several times and moved to different cell areas in the city just to verify the problem.
    I had no such issues earlier. I also have Nokia E71 which shows full signal and has no such issues.
    I have posted the bug on apple iphone feedback page. I hope they Apple will fix the problem and test the release properly on all models before releasing to public.

  • Problem with the workbook after upgrade

    Hi all,
    We are facing some problems with the workbooks after BW 3.5 Upgrade.e.g. some templates are disturbed, some variables have been affected. So I have few doubts --
    1. What could be the possible reason behind this?
    2. What exactly got changed in the system which reflected this problems?
    3. What other problems might have occurred which we may not have noticed?
    4. How can I find out the number of workbooks affected due to this?

    Dear ,
    This is known issue:
    Please implement the below mentioned note as this will solve your issue,
    Note 1609237 :  Subsequent correction to 1567679
    Regards,
    Arvind

  • Has anyone had a problem with CS3 crashing after downloading OS 10.8.1 on a imac?

    Has anyone had a problem with CS3 crashing after downloading OS 10.8.1 on a imac? 

    Peggy
    You are probably correct. I tried all different variations to test it. As long as I quit each document separately, i.e., red dot it, I seem to bring up only one document after that whether I click on the document itself or open it within pages. The same is true with numbers.
    Two more questions:
    1) can you turn off the "resume" feature? If so, how? I could not find a way to do it.
    2) why the "save a version" feature in pages? What happened to the old "save" and "save as" features?
    Thanks so much, you saved me a lot of frustration but I am still going to install MS Office for Mac.
    Daveben

  • Problems with Airport setup after buying Version 7 models, (older ones will not upgrade)

    Problems with Airport setup after buying Version 7 models, (older ones will not upgrade)
    I re set up my Airport network , having had 4 expresses for years doing a good job. I bought another and an express, but then a time capsule after my external drive died. .Problems with Airport setup after buying Version 7 models, (older ones will not upgrade)
    I moved house and have fibre network so 38mb/s - they all look ok on the utility, but its not till I saw the App version that they are not compatible as mac will not upgrade the version 6 ones, leaving me with 2 disjointed networks and 7 appliances, 4 of the old , 3 of the new.
    my new house is expansive so i wanted the extended range and airplay in each room.
    This is not told to customers, and utility doesnt show any issues.
    I do not seem to get any range from either network now, - and I'm quite experienced with airport (6 yrs of setting up & using & extending)
    Any advice ?
    LJx
    Message was edited by: LJLDN
    Message was edited by: LJLDN

    Sorry couldn't change the detonations to Airport and am new so cant delete!

  • I have a problem with my iphone,after upgrade software ios 6.0.1,  is not possible to use the wi-fi, used until now, because is not possible to have the login, i find this message " the requested URL  was not found

    I have a problem with my iphone,after upgrade software ios 6.0.1,  is not possible to use the wi-fi, used until now, because is not possible to have the login, i find this message " the requested URL  was not found

    You have to go to autherized iPhone agent.

  • Has anyone else had a problem with data? after updating my phone to the new update, i have all this data, and keep getting notifications that my data is getting high. i never had this problem before.

    has anyone else had a problem with data? after updating my phone to the new update, i have all this data, and keep getting notifications that my data is getting high. i never had this problem before.

    fair enough.  No need for any unnecessary posts either.  You issue had been addressed ad nauseum already in this forum had you bothered to search this forum (as forum etiquette would dictate) before posting.
    In any case, I hope that your problem was solved.

  • Problem with Maintenance Optimizer after first step

    Hi all,
    I have problem with Maintenance Optimizer after I choose system and save transaction, I click on Continue button, but nothing happens....
    Any ideas?
    Regards,
    Lazar Hristov

    I resolved my problem.
    I activate from spro -> Initial Configuration II, then activate BC Set for mopz and now everything works fine.
    Regards,
    Lazar Hristov

  • Problem with XSQLRequest.process

    Problem with XSQLRequest.process:
    I'm trying to run XSQL files using XSQLRequest.process. I'm working on the chapter 3 examples in Muench's book and got FAQXML.xsql running okay but have had problems with: FAQhtml.xsql BTW I am calling them from a different directory and am using 9iAS under win2K SP3.:
    I've fixed errors such as:
    End tag does not match start tag 'img'.
    by adding </img>
    and:
    End tag does not match start tag 'META'.
    by removing the <head> section from the xsl.
    But now i've got:
    XML parse error at line 2, char 1
    Expected 'EOF'.
    and don't have a clue.
    Some questions I have are:
    --Why don't I get these errors when I run the same files from Internet Explorer?
    --Where is the intermediate XML file?
    --How will I get HTML output?
    I'd appreciate any help you could suggest.
    Peter.
    Here is the .xsql and some of the .xsl:
    <?xml version="1.0"?>
    <!-- FAQHTML.xsql: Show FAQ.xsql in HTML Format for browsers -->
    <?xml-stylesheet type="text/xsl" href="http://localhost/ch03/FAQ-In-HTML.xsl"?>
    <xsql:include-xsql href="FAQ.xsql" xmlns:xsql="urn:oracle-xsql"/>
    <!-- FAQ-In-HTML.xsl: Transform ROWSET/ROW format into HTML Format -->
    <html xsl:version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    -->
    <body>
    <center>
    <table border="0">
    <tr>
    <th>Question</th>
    <th>Difficulty</th>
    </tr>
    <xsl:for-each select="ROWSET/ROW">
    <tr>
    <td>
    <table border="0" cellspacing="0">
    etc...

    XSQL version is 1.0.2.0.
    Well, in answer to your import question, yes. Xerces can import Xerces documents properly. Thus if we use Xerces importNode on a document parsed/created using Xerces' DOM implementation, the attribute values stay.
    We are using Xerces because it is the foundation of our infrastructure layer (which is partly because it's used in Catalina).
    Question. Is it possible that XSQLParserHelper which, as you say, uses an instance of oracle.xml.parser.v2.DOMParser to parse the document, is having trouble with different versions of DOM? I ask because we've noticed that to use Catalina and have its class loader to function successfully, we had strip all the DOM classes from xmlparserv2.jar
    importNode snippit ...
    public void service(CioServletRequest req, CioServletResponse resp) throws ServletException {
    DomResponse respm = resp.createDomResponse();
    Document dbdoc = respm.getDocument();
    XSQLRequest req = new XSQLRequest( pageUrl );
    ByteArrayOutputStream ostream = new ByteArrayOutputStream();
    req.process(params, ostream, new PrintWriter(System.err));
    String s = new String(ostream.toByteArray());
    Document retDoc = respm.parseDocument(s);
    dbdoc.appendChild(dbdoc.importNode(retDoc.getDocumentElement(), true));
    Hope this helps.
    Steve.
    null

  • Problem with a process chain transport

    Hi all,
      I have a problem with a process chain transport, I transport it but when I see the changes in testing environment I don’t see it, I did it four times but nothing happen and I don’t have errors.
      Can anybody tell me how to transport a process chain.
    Thanks.

    Hi Federico,
    When you tranport Process Chains, initially chains will be available under "Not Asigned" node in RSPC Transaction. The transported chains wont be get highlighted automatically. Manually need to open the chain in update mode and activate it on Quality.
    Hope it will help you to resolve the problem.
    Regards,
    Raji

  • I am having problem with my sound, after i updated to ios 6, apple please help

    i am having problem with my sound, after i updated to ios 6, i can hear music with headphone only, apple please help

    Try going into your settings and 'reset all settings'
    You will need to retweak your device but it's been said to help with sound issues.

  • Having problem with my camera after updating 8.1.3

    having problem with my camera after updating 8.1.3.. how will you fix this

    Try Resetting your phone: hold down the home and sleep buttons, wait for the Apple logo, let go of the buttons. If this does not work Restore your iPhone in iTunes.

Maybe you are looking for

  • Yammer: How to make an External Network the default network to where to join?

    Can I make an external Network the default Network which users join when the join Yammer. By default it's the Home Network (home domain) which they join when they register in Yammer.

  • ADSL2 - Will my profile be automatically reset?

    I've just noticed (according to BT.com) that my exchange has now been upgraded and I can expect service in the region of 10-17mb download. Speedtester.bt.com tells me my DSL Connection Rate is set at 8128.   Does anyone know if this will get re-set o

  • Allignment

    Dear(S) I want to populate a Hierarchical Tree to display results in a well alligned form (as results usually display in SQL Plus). I try much using LPAD() and RPAD() function but due to different size of Characters, i fail to allign results as appea

  • BW Hierarchy drill issues

    Hi all, I'm having issues in webi when drill down to the lowest level of a hierarchy and that level contains no data. The symptom is that I get an empty table with no hierarchy label and no way to drill back up to the previous level. The report has t

  • DMVPN behind an ASA5520

    I'm trying to create a mesh network using dmvpn, and everything works great until I put an ASA5520 in front of the hub router (2801). The ASA initially blocked all communication to the spokes, but after browsing the forms I found the following comman