How I can to know in JSP if one page has been called by other page

Hi,
I have a JSP portlet with one form to submit some information about clients.
When the visitor click one image the form is submitted correctly and the information is stored into database.
The problem is that I can't clean the values of the strings after the insert and when I call the page again, the code insert again the last information in the form.
My JSP code is supported in the feedback code of JPDK, but I can't ask for the value of submit button because the submit is done by the click over the image, with the next code:
<img height=16 alt=Submit src="/pictures/stacksite/form_send.gif"
width=99 border=0>
I ask for one input box required, if is null run the insert code, if don't I display the form page.
How I can clean this variables or how I know if the page has been submitted immediatly before. What variable I can request in JSP to know that or what I can do?
Regards,
FABIAN

I'm not sure that any javascript is necessary. You just need to turn the image into a 'proper' submit button, using the <BUTTON> element. This will cause the form and all its data to be POSTED, rather than to be sent as a query in a GET request. Note that it is important that the form passes on the value of the PortletRendererUtil.PAGE_LINK parameter using a hidden field, so that the jsp remembers the portal 'context' it is running in. E.g.
<%
// Derive a portlet-specific name for the submit parameter
String submitParam = HttpPortletRendererUtil.portletParameter(request, "submit");
if (request.getParameter(submitParam) != null )
... handle the data ...
%>
<form name="contactinfo" method="POST" action="<%= HttpPortletRendererUtil.htmlFormActionLink(request,PortletRendererUtil.PAGE_LINK) %>" >
<%= HttpPortletRendererUtil.htmlFormHiddenFields(request,PortletRendererUtil.PAGE_LINK) %>
<BUTTON name="<%= submitParam %>" value="submit" type="submit"><IMG src="/pictures/stacksite/form_send.gif" alt="submit"></BUTTON>
</FORM>
null

Similar Messages

  • How can I know if malicious spyware or malware has been downloaded to my iphone 4?

    How can I know if malicious spyware or malware has been downloaded to my iPhone 4? And if so, how do I remove it?

    If your device has not been jailbroken, there can't be viruses or malware on the phone.

  • How can we know in classic scenario, whether confirmation has been done in

    Hi ,
    In Self service procurement with classic scenario:
    I believe that we can do confirmation in EBP or in R/3.
    How can we know in classic scenario after confirmation, whether confirmation has been done in EBP or in R/3.
    Also please give an idea is there any configuration difference for confirmation need to do in EBP.
    thanks
    RESHMA

    Hello Reshma,
    >
    Reshmab wrote:
    > How can we know in classic scenario after confirmation, whether confirmation has been done in EBP or in R/3.
    > (...)
    Using Web GUI (ITS or Portal), if you look at the SC history (or PO history) in table mode, if column where you find SC number as no value for confirmation (confirmation with SRM number range), this means PO was confirmed directly in R/3 with a Goods Receipt.
    Using SAP GUI, if confirmation was done in SRM purchasing document exists in CRMD_ORDERADM_H for PROCESS_TYPE = 'CONF',
    >
    Reshmab wrote:
    > Also please give an idea is there any configuration difference for confirmation need to do in EBP.
    > (...)
    There is no specific customizing to allow SRM confirmation: just give correct role to users in order access to confirmation transactions (authorization object BBP_PD_CNF ). Check with roles EMPLOYEE* or PURCHASER*.
    Regards.
    Laurent.

  • How do i count the number of times a cell has been referenced by other cells' formulae?

    Hello,
    I have a spreadsheet of recipes and ingredients that use checkboxes to let me know which recipes I can make based on the ingredients I have on-hand, using a formula like this one: =IF(AND('Spirits' :: A42,Mixers :: A18,Mixers :: A41,'Spirits' :: A25 ),Table 3 :: $A$2,Table 3 :: $A$3). If I've checked all of the boxes for ingredients that are required for any one of my recipes, the cell that the formula is in returns something like "YES"; otherwise, it returns a blank. It works well enough, but I'd like to include a cell next to each ingredient with a formula that will look through the hundreds of recipes, which all use a formula like the one above, and return a count of the number of times the ingredient's cell is referenced in those formulas. That way, I'll know which ingredients are the most commonly used in my eclectic collection of recipes. I thought something like =COUNTIF('Recipes' :: A2:A343, "=A2") would work, but it doesn't look at the cell references in the formulas, so no, it doesn't work. Any ideas? I'm using Numbers 2.3

    Hello
    There's no formula to inspect other formula in Numbers. So what you asked cannot be achived in such a way you described.
    A simple alternative method would be to build recipe-ingredient matrix as follows.
    E.g.
    Table definitions:
    Recipes
    A1    Recipe \ Ingredient
    A2    A
    A3    B
    A4    C
    A5    D
    A6    E
    A7    F
    A8    # recipes / ingredient
    B1    X1
    B2    TRUE
    B3    FALSE
    B4    TRUE
    B5    FALSE
    B6    TRUE
    B7    FALSE
    B8    =COUNTIF(B,TRUE)
    C1    X2
    C2    TRUE
    C3    TRUE
    C4    FALSE
    C5    TRUE
    C6    TRUE
    C7    TRUE
    C8    =COUNTIF(C,TRUE)
    D1    X3
    D2    FALSE
    D3    TRUE
    D4    FALSE
    D5    TRUE
    D6    FALSE
    D7    TRUE
    D8    =COUNTIF(D,TRUE)
    E1    X4
    E2    FALSE
    E3    FALSE
    E4    FALSE
    E5    FALSE
    E6    FALSE
    E7    TRUE
    E8    =COUNTIF(E,TRUE)
    F1    Y1
    F2    TRUE
    F3    FALSE
    F4    TRUE
    F5    TRUE
    F6    TRUE
    F7    FALSE
    F8    =COUNTIF(F,TRUE)
    G1    Y2
    G2    FALSE
    G3    TRUE
    G4    TRUE
    G5    FALSE
    G6    FALSE
    G7    TRUE
    G8    =COUNTIF(G,TRUE)
    H1    Y3
    H2    TRUE
    H3    TRUE
    H4    FALSE
    H5    TRUE
    H6    TRUE
    H7    FALSE
    H8    =COUNTIF(H,TRUE)
    I1    Y4
    I2    FALSE
    I3    FALSE
    I4    FALSE
    I5    FALSE
    I6    FALSE
    I7    TRUE
    I8    =COUNTIF(I,TRUE)
    J1    in-stock?
    J2    =SUMIF(B2:E2,TRUE,TRANSPOSE(X::$C$2:$C$5))+SUMIF(F2:I2,TRUE,TRANSPOSE(Y::$C$2:$C$5))=COUNTIF(B2:I2,TRUE)
    J3    =SUMIF(B3:E3,TRUE,TRANSPOSE(X::$C$2:$C$5))+SUMIF(F3:I3,TRUE,TRANSPOSE(Y::$C$2:$C$5))=COUNTIF(B3:I3,TRUE)
    J4    =SUMIF(B4:E4,TRUE,TRANSPOSE(X::$C$2:$C$5))+SUMIF(F4:I4,TRUE,TRANSPOSE(Y::$C$2:$C$5))=COUNTIF(B4:I4,TRUE)
    J5    =SUMIF(B5:E5,TRUE,TRANSPOSE(X::$C$2:$C$5))+SUMIF(F5:I5,TRUE,TRANSPOSE(Y::$C$2:$C$5))=COUNTIF(B5:I5,TRUE)
    J6    =SUMIF(B6:E6,TRUE,TRANSPOSE(X::$C$2:$C$5))+SUMIF(F6:I6,TRUE,TRANSPOSE(Y::$C$2:$C$5))=COUNTIF(B6:I6,TRUE)
    J7    =SUMIF(B7:E7,TRUE,TRANSPOSE(X::$C$2:$C$5))+SUMIF(F7:I7,TRUE,TRANSPOSE(Y::$C$2:$C$5))=COUNTIF(B7:I7,TRUE)
    J8   
    X
    A1    Ingredient
    A2    X1
    A3    X2
    A4    X3
    A5    X4
    B1    in-stock?
    B2    TRUE
    B3    TRUE
    B4    TRUE
    B5    FALSE
    C1    code
    C2    =IF(B2,1,0)
    C3    =IF(B3,1,0)
    C4    =IF(B4,1,0)
    C5    =IF(B5,1,0)
    Y
    A1    Ingredient
    A2    Y1
    A3    Y2
    A4    Y3
    A5    Y4
    B1    in-stock?
    B2    TRUE
    B3    FALSE
    B4    TRUE
    B5    FALSE
    C1    code
    C2    =IF(B2,1,0)
    C3    =IF(B3,1,0)
    C4    =IF(B4,1,0)
    C5    =IF(B5,1,0)
    In "Recipe" table, the first row is header row and the last row is footer row.
    Hope this may help,
    H

  • How can i know if my Apple tv still has warranty

    How can i know if my Apple tv still has warranty

    If AppleTV 1 (silver), when did you buy it?
    If AppleTV 2 they came out in September 2010 in US later in other places, so still under 1year warranty.
    If you took out Applecare you can go to support, enter the product's number and check the warranty.
    AC

  • My macbook pro got so many scratches and dents, i just want to know that how i can replace it with the new one?

    my macbook pro got so many scratches and dents, i just want to know that how i can replace it with the new one?

    Sell the Old one... Buy a New one...

  • I would like to know if you have to back up a macbook hard drive, can I use a external hard drive that has been previously used to back up several pc 's, or is it best to have a separate external drive for the Mac?

    I would like to know if you have to back up a macbook hard drive, can I use a external hard drive that has been previously used to back up several pc 's, or is it best to have a separate external drive for the Mac?

    In the Mac side of things, backups usually come in two flavors: clones or incrementals.
    A bootable clone is a bit-for-bit copy of all essential files in the startup volume. If using the Lions, clones can be made using CarbonCopyCloner or just plain old Disk Utility. These backups represent the safest protection of your info, but take the longest to do. Recovery is an inverse process: you copy the clone back into the internal drive.
    Incremental backups start with a complete backup of the startup volume and only copy whatever changed from the previous run. OS X includes the fully integrated Time Machine backup utility to do this. It is extremely easy to do and takes the least amount of time. Recovery is another matter altogether since you have to start with a freshly installed instance of the OS and have to apply all intervening backups to bring the result to the latest saved version.
    As for where the backup takes place, the recommended media is an external dedicated drive or drives connected via the fastest interface available on your Mac: Thunderbolt, USB3, Firewire, or USB2. Network-based backups, wired or wireless, are attractive but may not offer the same performance and hence take longer. Also important to note that the entire drive need not be completely dedicated to a single backup. The Mac's EFI firmware infrastructure allows for an unlimited number of partitions on a hard drive and each can be used for either type of backups.
    Holler if you need specifics on how to do each. This was just an executive summary.

  • How to repair my macbook pro when i had delete the app store file and know it telling that appstore file has been damage or incomplete and i had the version 10.6.8

    how to repair my macbook pro when i had delete the app store file and know it telling that appstore file has been damage or incomplete and i had the version 10.6.8

    so is their is any way that i can solve this matter

  • How to know that a method has been called and returning value of a method

    Hi, everyone! I have two questions. One is about making judgment about whether a method has been called or not; another one is about how to return "String value+newline character+String value" with a return statement.
    Here are the two original problems that I tried to solve.
    Write a class definition of a class named 'Value' with the following:
    a boolean instance variable named 'modified', initialized to false
    an integer instance variable named 'val'
    a constructor accepting a single paramter whose value is assigned to the instance variable 'val'
    a method 'getVal' that returns the current value of the instance variable 'val'
    a method 'setVal' that accepts a single parameter, assigns its value to 'val', and sets the 'modified' instance variable to true, and
    a boolean method, 'wasModified' that returns true if setVal was ever called.
    And I wrote my code this way:
    public class Value
    boolean modified=false;
    int val;
    public Value(int x)
    {val=x;}
      public int getVal()
      {return val;}
       public void setVal(int y)
        val = y;
        modified = true;
         public boolean wasModified()
          if(val==y&&modified==true)
          return true;
    }I tried to let the "wasModified" method know that the "setVal" has been called by writing:
    if(val==y&&modified==true)
    or
    if(x.setVal(y))
    I supposed that only when the "setVal" is called, the "modified" variable will be true(it's false by default) and val=y, don't either of this two conditions can prove that the method "setVal" has been called?
    I also have some questions about the feedback I got
    class Value is public, should be declared in a file named Value.java
    public class Value
    cannot find symbol
    symbol  : variable y
    location: class Value
    if(val==y&&modified==true)
    *^*
    *2 errors*
    I gave the class a name Value, doesn't that mean the class has been declared in a file named Value.java*?
    I have declared the variable y, why the compiler cann't find it? is it because y has been out of scale?
    The other problem is:
    Write a class named  Book containing:
    Two instance variables named  title and  author of type String.
    A constructor that accepts two String parameters. The value of the first is used to initialize the value of  title and the value of the second is used to initialize  author .
    A method named  toString that accepts no parameters.  toString returns a String consisting of the value of  title , followed by a newline character, followed by the value of  author .
    And this is my response:
    public class Book
    String title;
    String author;
      public Book(String x, String y)
       { title=x; author=y; }
       public String toString()
       {return title;
        return author;
    }I want to know that is it ok to have two return statements in a single method? Because when I add the return author; to the method toString, the compiler returns a complain which says it's an unreachable statement.
    Thank you very much!

    Lets take this slow and easy. First of all, you need to learn how to format your code for readability. Read and take to heart
    {color:0000ff}http://java.sun.com/docs/codeconv/html/CodeConvTOC.doc.html{color}
    Now as to your first exercise, most of it is OK but not this:   public boolean wasModified()
          if (val == y && modified == true)
                return true;
    y being a parmeter to the setValue method exists only within the scope of that method. And why would you want to test that anyways? If modified evaluates to true, that's all you need to know that the value has been modified. So you could have   public boolean wasModified()
          if (modified == true)
                return true;
       }But even that is unnecessarily verbose, as the if condition evaluates to true, and the same is returned. So in the final analysis, all you need is   public boolean wasModified()
          return modified;
       }And a public class has to be declared in a file named for the class, yes.
    As for your second assignment, NO you cannot "return" two variables fom a method. return means just that: when the return statement is encountered, control returns to the calling routine. That's why the compiler is complaining that the statement following the (first) return statement is unreachable.
    Do you know how to string Strings together? (it's called concatenation.) And how to represent a newline in a String literal?
    db

  • How do I know if the Maverick software update has been installed on my mac?

    How do I know if the Maverick software update has been installed on my mac?

    It will not download if you already have it.
    Just to be 100% clear …
    Look in /Applications for "Install OS X Mavericks"
    Use the Finders Go menu > Applications. To open it.
    You may have an Applications folder in your Home directory too, it shouldn't be in there but it is possible.
    Also try Spotlight to see if it can find that filename.
    Can you also tell us what system you have?
    Apple menu > About this Mac > more info button… What is the Model (under the Overview tab).
    10.9 doesn't install on all systems, so it could explain why you can't get it, however it usually displays a dialog stating that fact.

  • How we can import an IDOC structure from one SAP system to another

    Hi Gurus,
    How we can import an IDOC structure from one SAP system to another? If we're using ALE, how can we do that? Please can someone give me the process and necessary t codes.
    Any response will be awarded!
    Thanks a lot.
    Samson

    hi!
    Define the logical system names in both the systems.
    Logical system names :SAP001
    SAP002
    SAP001 FOR 001 CLIENT
    SAP002 FOR 002 CLIENT
    These two logical system definitions should be present in both the systems.
    Assign the logical systems to the client. (in both the systems)
    Assign SAP001 to 001 CLIENT
    Assign SAP002 to 002 CLIENT
    you can See these in transaction SALE.
    After this define the rfc DESTINATION IN sm59. (in both the systems)
    In 001 client create the RFC destination name SAP002
    In the tab log on security, give the user name and password and client of the 002 client and save it.
    Similarly do the reverse in the 002 Client.
    In 001 client create the port.(Transaction WE21)
    Specify the RFC destination name as SAP002.
    Now you can define the ports, (both the systems)
    Create the partner profile for partner(ie gve logical system name of partner) , so give as SAP002.
    partner profile in both the systems.
    Now create the distribution model in BD64 and goto edit>model view>distribute.
    The same model view will be visible n distributed to the partner system also..which in this case is sap002.
    U may trigger the idoc from we19 and chk its status in we05.
    Please let me know if you need further info on this.

  • HT2500 I want to know if an email I sent has been opened.  How do I do this

    I want to know how to get a notification that an email I sent has been opened.  How do I do this

    Short answer, you don't.
    There's a pseudo-standard for read receipts that purports to tell you, but it's easily circumvented, either by the recipient using a mail client that doesn't support the 'standard' (hint: most don't), or by the recipient turning off read reciepts. In short, not getting a read reciept does not mean the message wasn't read, and therefore the whole concept is junk.
    There are some other options that might get you further along... for example, if the message includes images or other HTML content then you could check the web server logs and track back who requested the image content. This does, of course, require that the user has their mail client set to display images and 'rich content' - if they don't download the image you can't know.
    If the recipient is in your domain (or in a domain you control) then you could query the mail server logs - you'll see the message saved to the user's mailbox and can be pretty sure it's downloaded to their mail client the next time they POP or IMAP in. However this only implies it was delivered, not read, and is only valid for mail domains you control (you don't have this level of visibility into other mail servers).
    At the end of the day, the only foolproof answer is: ask.

  • How i can combine multiple pdf files in one file using a macbook air

    how i can combine multiple pdf files in one file

    The application Preview.
    Preview Help.
    Save combined PDFs
    Open the PDFs you want to combine.
    In each open PDF, choose View > Thumbnails to display the pages of the PDF in the sidebar.
    Drag the thumbnails you want to add (Command-click to select noncontiguous pages) to the thumbnail sidebar in the other PDF.You can add pages to the end of the document or between pages in a document. Drag thumbnails to reorder them. You can also add a PDF file before or after another PDF document.
    Choose File > Export to save a new PDF containing all of the combined pages, or choose File > Save to replace the original version of the destination PDF with the version containing the combined pages.

  • How can I email a video in iPhoto that has been uploaded from my iPad?

    How can I email a video in iPhoto that has been uploaded from my iPad?

    It is so compliv=cated. U had yo find in troubleshootung sime ways. Then i found so many files in the profile menu that have been filed .I had to open every one to choose the right one that never found Then nothing could be done No way to revert.I had decide to uninstall the firefox Then i ttried the restore system way and it worked.
    In any case these add ons of persona are comletely silly.So many unfitting colors and no way to revert.Only to choose a different stupi d icon.Too silly for my sense of style

  • How or can I insert a picture to an exsisting photo album in between other pictures?

    How or can I insert a picture to an exsisting photo album in between other pictures?

    The easiest is to use 3rd party apps like Photo Manager Pro; you can drag pictures to any position.
    Before
    http://i1224.photobucket.com/albums/ee374/Diavonex/5cd4653fb07b9aa0ef10642dc01c3 26a.jpg
    After
    http://i1224.photobucket.com/albums/ee374/Diavonex/c276e25c9f93f43081b79db6d309d c6d.jpg

Maybe you are looking for