Please check the code why it is not working

I am a new java servlets and jsp learner. I am running below example of session in Tomcat and "AccessCount" supposed to be increased by one value whenever servelet is refereshed. But I am always getting 0 value even after refereshing it.
I will appreciate your help.
=======================================================
import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;
import java.net.*;
import java.util.*;
/** Simple example of session tracking. See the shopping
* cart example for a more detailed one.
public class ShowSession extends HttpServlet {
public void doGet(HttpServletRequest request,HttpServletResponse response) throws ServletException, IOException {
response.setContentType("text/html");
PrintWriter out = response.getWriter();
String title = "Session Tracking Example";
String heading;
HttpSession session = request.getSession(true);
// Use getAttribute instead of getValue in version 2.2.
Integer accessCount = (Integer)session.getAttribute("accessCount");
if (accessCount == null) {
accessCount = new Integer(0);
heading = "Welcome, Newcomer";
} else {
heading = "Welcome Back";
accessCount = new Integer(accessCount.intValue() + 1);
// Use setAttribute instead of putValue in version 2.2.
session.setAttribute("accessCount", accessCount);
out.println("<html><h1>" + title + "</h1>" +
"<BODY BGCOLOR=\"#FDF5E6\">\n" +
"<H1 ALIGN=\"CENTER\">" + heading + "</H1>\n" +
"<H2>Information on Your Session:</H2>\n" +
"<TABLE BORDER=1 ALIGN=\"CENTER\">\n" +
"<TR BGCOLOR=\"#FFAD00\">\n" +
" <TH>Info Type<TH>Value\n" +
"<TR>\n" +
" <TD>ID\n" +
" <TD>" + session.getId() + "\n" +
"<TR>\n" +
" <TD>Creation Time\n" +
" <TD>" +
new Date(session.getCreationTime()) + "\n" +
"<TR>\n" +
" <TD>Time of Last Access\n" +
" <TD>" +
new Date(session.getLastAccessedTime()) + "\n" +
"<TR>\n" +
" <TD>Number of Previous Accesses\n" +
" <TD>" + accessCount + "\n" +
"</TABLE>\n" +
"</BODY></HTML>");
/** Handle GET and POST requests identically. */
public void doPost(HttpServletRequest request,
HttpServletResponse response)
throws ServletException, IOException {
doGet(request, response);
========================================================

Change the code
HttpSession session =
request.getSession(true);AS
HttpSession session =
request.getSession(false);If you pass "false", then the Session is not created.
If you pass "true" the session is always created
new.
Thanks and regards,
Pazhanikanthan. PI dont think that's correct -
1. request.getSession(false) returns a Session object if one exists.
2. request.getSession(true) creates a new Session object if it doesnt exist or returns the reference to the existing object if the request is part of an valid session.
OP, check with default session-timeout values in web.xml
Ram.

Similar Messages

  • Please check the code

    I AM TRYING TO REPLICATE THE ADDRESS OF EQUIPMENT FROM ECC TO CRM.
    I AM ABLE TO REPLICATE THE IDENTIFICATION NUMBER.
    WHILE USING THE SAME FUNCTION MODULE FOR ADDRESS, THE ADDRESS IS NOT GETTING REPLICATED.
    PLEASE CHECK THE CODE AND TELL ME WHAT PRE-REQUISITES MUST BE TAKEN INTO CONSIDERATION AND IS THERE ANY MISTAKE FROM ME.
    FULL POINTS WILL BE REWARDED.
    ITS VERY VERY URGENT.
    METHOD IF_EX_CRM_EQUI_LOAD~ENLARGE_COMPONENT_DATA.
    **Data declarations
    DATA:
        ls_equi          type crmt_equi_mess,
        ls_comp          type ibap_dat1,
        ls_comp_det1     TYPE IBAP_COMP3,
        ls_address_data  type ADDR1_DATA,
        ls_object      type comt_product_maintain_api,
        ls_object1     type comt_product,
        lv_object_id   type IB_DEVICEID,
        lv_object_guid type IB_OBJNR_GUID16.
    **Map Sort field from ECC to CRM
    Read table it_equi_dmbdoc-equi into ls_equi index 1.
    lv_object_id  = ls_equi-equnr.
    move is_object to ls_object.
    move ls_object-com_product to ls_object1.
    lv_object_guid = ls_object1-product_guid.
    move is_component to ls_comp.
    ls_comp_det1-deviceid    = lv_object_id.
    ls_comp_det1-object_guid = lv_object_guid.
    ls_comp_det1-EXTOBJTYP   = 'CRM_OBJECT'.
    ls_comp_det1-ibase       = ls_comp-ibase.
    ls_address_data-roomnumber = '1000'.
    ls_address_data-floor = '10'.
    ls_address_data-country = 'US'.
    CALL FUNCTION 'CRM_IBASE_COMP_CHANGE'
      EXPORTING
       i_comp                       = ls_comp
       I_COMP_DET             = ls_comp_det1
       I_ADDRESS_DATA     = ls_address_data
      I_ADDRESS_ADMIN           =
      I_PARTNER                 =
      I_DATE                    =
      I_TIME                    =
    EXCEPTIONS
      DATA_NOT_CONSISTENT       = 1
      IBASE_LOCKED              = 2
      NOT_SUCCESFUL             = 3
      OTHERS                    = 4
    *IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    *ENDIF.
    ENDMETHOD.

    Hi S B,
    May I the procedure for the replication of serialnumber into device ID that is Identification field In Ibase.
    And one more thing need this to be codded in the standard badi or needed an copy of the implementation .
    plz help me as u already have done the requirement.
    u will be twice rewarded.
    Thanking u in advance for the reply.
    Sree.

  • Please check the Code snippet and detail the difference

    Please go through the two code snippets given below...
    Can some one please let me know if using generics is a better way to denote the signature and if yes, why is it so?
    Thank you
    Two classes:
    class SimpleStr {
         String name = "SimpleStr";
         public SimpleStr(String name) {
              this.name = name;
         public String getName() {
              return this.name;
         public String toString() {
              return getName();
    class MySimpleStr extends SimpleStr {
         String name = "MySimpleStr";
         public MySimpleStr(String name) {
              super(name);
              this.name = name;
         public String getName() {
              return this.name;
         public String toString() {
              return getName();
    Code Snippet 1:
    class AnotherSimpleStr {
         public <S extends SimpleStr>S getInfo() {
              return (S)new MySimpleStr("val3");
    Code Snippet 2:
    class AnotherSimpleStr {
         public SimpleStr getInfo() {
              return new MySimpleStr("val3");
    }

    Also, please see the code below, the getInfo() method is not taking care of Type safety right??!!!!
    class AnotherSimpleStr {
         public <S extends SimpleStr>S getInfo() {
              return (S)new Object();
         public <S extends SimpleStr>S getInfoAgain(Class<S> cls) {
              return (S)new MySimpleStr("Val");
    }

  • Please check the code reg mail implementation and give guide lines to me

    Hi experts
    I written some code for implementing the mail in webdynpro using java mail API,i did not get the out put ,Is any configuration i have to do in webdynpro or WAS
    Can any body review my code and tell me where i mistaken in the implementation .Is there any thing i want to configure .Here with i am sending my code in the action of Send button
    public void onActionSendMail(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
        //@@begin onActionSendMail(ServerEvent)
        // get the values entered by the user  in the form
        try{
        String toAddress=wdContext.currentContextElement().getTo();
        String ccAddress=wdContext.currentContextElement().getCC();
        String bccAddress=wdContext.currentContextElement().getBCC();
        String subject=wdContext.currentContextElement().getSubject();
        String messageBody=wdContext.currentContextElement().getMessage();
        //set the properties of host and port no
        Properties p = new Properties();
        p.put("mail.transport.protocol","smtp");
        p.put("mail.smtp.host","12.38.145.108");
         p.put("mail.smtp.port","25");
         //get the session object or connection to the mail server or host
         Session sess=Session.getDefaultInstance(p,null);
         //create a MimeMessage and add recipients
         MimeMessage message = new MimeMessage(sess);
         if(toAddress !=null && toAddress.length()>0){
              message.addRecipient(Message.RecipientType.TO, new InternetAddress(toAddress));
         }else
              wdComponentAPI.getMessageManager().reportSuccess("Please Enter the To Address");
         if(bccAddress !=null && bccAddress.length()>0)
         message.addRecipient(Message.RecipientType.BCC, new InternetAddress(bccAddress));
         if(ccAddress !=null && ccAddress.length()>0)
         message.addRecipient(Message.RecipientType.CC, new InternetAddress(ccAddress));
        if(subject!=null && subject.length()>0)
         message.setSubject(subject);
         message.setFrom(new InternetAddress("[email protected]"));
         if((messageBody!=null) && (messageBody.length()>0))
              message.setContent(messageBody,"text/plain");
         }else
              message.setContent("","text/plain"); 
         Transport.send(message);
        catch(Exception e)
             e.printStackTrace();
    Please mail to :  [email protected]
    Thanks and regards
    kalyan

    Hi Venkat,
       The code seems ok to me. you don't need to configure WAS to use JavaMail APIs. However, if this code doesnot work then check with the code given below as this is working fine.
    Properties prop = new Properties();
              prop.put("mail.smtp.host", host);
              prop.put("mail.smtp.auth", "false");
              Session session = Session.getInstance(prop, null);
              session.setDebug(true);
              try {
                   MimeMessage msg = new MimeMessage(session);
                   msg.setFrom(new InternetAddress(from));
                   InternetAddress[] address =
                        { new InternetAddress(to1)};
                   msg.setRecipients(Message.RecipientType.TO, address);
                   msg.setSubject(subject);
                   msg.setSentDate(new Date());
                   MimeBodyPart msg1Body = new MimeBodyPart();
                   msg1Body.setText(msg1);
                   MimeBodyPart msg2Body = new MimeBodyPart();
                   msg2Body.setText(msg2);
                   Multipart mp = new MimeMultipart();
                   mp.addBodyPart(msg1Body);
                   mp.addBodyPart(msg2Body);
                   msg.setContent(mp);
                   Transport.send(msg);
              } catch (AddressException e) {
                   // TODO Auto-generated catch block
                   e.printStackTrace();
                   System.out.print("AddressException : " + e.getMessage());
              } catch (MessagingException e) {
                   // TODO Auto-generated catch block
                   e.printStackTrace();
                   System.out.print("MessagingException : " + e.getMessage());
              } catch (Exception e) {
                   System.out.print("Exception : " + e.getMessage());
    where host is 12.38.145.108 in your case. May be you chk if your mail server  is using another port. 25 is the default port for the smtp. This may be the case that your code is not working.
    Regards:
    Abhinav Sharma
    PS : Do reward points if it helps

  • Can we get Arraylist from String.Please check the code

    Hi all,
    I have just pasted my code over here.Can anyone of you find the solution for obtaining the Array list from the String.
    For Example :
    ArrayList al = new ArrayList();
    al.add(new byte[2]);
    al.add("2");
    String stringVar = "" + (ArrayList) al;
    Here I can convert the arraylist into string.But can we do he vice versa like obtaining the above arraylist from the string?If please advice me.
    URGENT!!!!

    cudIf you run the code you posted you will observe that the string form of the list does not contain all the information of the list: in particular the array elements are missing. It follows that the "vice versa" conversion you seek is simply not possible.
    A variation on this theme is the following:import java.util.ArrayList;
    public class ListEg {
        public static void main(String[] args) {
            ArrayList al = new ArrayList();
            al.add("foo");
            al.add("bar, baz");
            String stringVar = "" + (ArrayList) al;     
            System.out.println(stringVar);
    }If you think about the output you should be able to conclude that lists with different contents can easily have the same string form.
    Just something to chew on.

  • Urgent-Please check the code

    Hi There,
    Could you please have a look at the code below and suggest whether I am using If else in good manner or not?
    User will enter Start date and end date at begbalance level and account value is also calculated at begbalance then we need to copy that value to months starting from the Start date month so I need to convert the integer value of month to string month.but it is giving error.
    var monthsdiff,endyear,startyear,startmonth,endmonth;
    fix("budget","begbalance",..........)
    Fix("hsp_inputvalue")
    "Account1"
    startmonth=@INT(@MOD("Date-start",10000)/100);
    Monthsidff=..........;
    if(startmonth=1)
    &startmon= "JAN";
    elseif(startmonth=2)
    &startmon= "FEB";
    elseif(startmonth=3)
    &startmon= "MAR";.........till dec
    endif
    if(endmonth=1)
    &endmon= "JAN";
    elseif(endmonth=2)
    &endmon= "FEB";
    elseif(endmonth=3)
    &endmon= "MAR"...till dec
    endif
    fix(&startmon)
    if(startyear==&CurrYear and endyear==&CurrYear)
    "Account1"=("Account1"/12) *monthsdiff;
    endfix
    else
    "Account1"->"may"=("Account1"/12) * monthsdiff;
    endfix
    endif
    endfix
    endfix
    here Curryear is 2011.
    Thanks
    Edited by: user10760185 on Sep 20, 2011 2:19 AM

    It looks like you are trying to assign a value to a substitution variable in your calc, you can't do that. ^^^Until quite recently, yes, but now if you read Robb Salzmann's blog and grab his CDF: http://codingwithhyperion.blogspot.com/2011/08/create-and-update-substitution.html
    Btw, beyond Robb's code being a cool hack, I'm not entirely sure I'd want to change sub var values on the fly but it at least appears to be possible.
    Regards,
    Cameron Lackpour

  • Centering a page on the screen, why's it not working??

    Hi,
    I'm trying to centre my whole site so that it appears in the centre of the screen, no matter what size of screen it's being viewed on.
    I've had a look at other messages about this, and thought I'd done what they said but it's not working.
    I'm using Dreamweaver, and in the CSS rule definition for the DIV tag called #ContainerArea I've set Type = absolute, Height = Auto, Left & Right Placements = auto and Top & Bottom Placements = 0
    When I also change the text alignment to centre, this then centres all the text within the 'container area' but the actual area itself is still left aligned on my screen.
    It's not live, still just on my hard drive, so I can't include any links.
    Can anyone help - please?
    Thanks very much,
    Nicola

    Centered Fixed-width layout
    http://alt-web.com/TEMPLATES/CSS2-Centered-Page.shtml
    Centered Liquid-width layout
    http://alt-web.com/TEMPLATES/CSS2-Liquid-Page.shtml
    View Page Source to see the underlying code.
    Nancy O.
    Alt-Web Design & Publishing
    http://alt-web.com

  • Please check the code for me

    DATA :Begin of itab_reqid occurs 0,
          objid like hrp1001-objid,
           end of itab_reqid,
          Begin of itab_postid occurs 0,
           postid like hrp1001-objid,
           end of itab_postid.
    Select distinct objid from hrp5125 into table itab_reqid
                                     where aedtm BETWEEN '20060107' and '20073108'.
    Select OBJID from hrp1001 into table itab_postid where objid IN itab_reqid
                                                           AND SCLAS = 'NC'.
    The above code gives an error called "line type for itab_reqid is incorrect".
    Please advise,
    Thanks

    Hi Reena,
    I am not sure if your approach works for ranges. I think the problem in your code is that itab_reqid is not a range and yet you have used it like a range in your SQL SELECT where clause.
    You could try this approach instead:
    DATA :Begin of itab_reqid occurs 0,
                 objid like hrp1001-objid,
               end of itab_reqid,
               Begin of itab_postid occurs 0,
                 postid like hrp1001-objid,
               end of itab_postid.
    RANGES: r_reqid for hrp1001-objid.
    Select distinct objid from hrp5125 into table itab_reqid
    where aedtm BETWEEN '20060107' and '20073108'.
    if not itab_reqid[] is initial.
      r_reqid-option = 'EQ'.
      r_reqid-sign = 'I'.
      LOOP AT itab_reqid.
         r_reqid-low = itab_reqid-objid.
         append r_reqid.
      ENDLOOP.
      Select OBJID from hrp1001 into table itab_postid where objid IN itab_reqid
         AND SCLAS = 'NC'.
    endif.
    Kind Regards,
    Darwin

  • Please check the code ALV

    i dnt know y fieldcat is not getting populated i haave rtied out almost everything i c'nt find the error
    If somebody got a vaulabe suggestion?
    Thnkx
                   TYPES DECLARTIONS
    TYPE-POOLS:slis.
    TYPES:BEGIN OF str_bsid,
        blart TYPE blart,
        bukrs TYPE bukrs,
        buzei TYPE bsid-buzei,
        bschl TYPE bsid-bschl,
        hkont TYPE bsid-hkont,
        ktopl TYPE t001-ktopl,
        bilkt TYPE ska1-bilkt,
        saknr TYPE ska1-saknr,
        fstag TYPE skb1-fstag,
    END OF str_bsid.
    TYPES:BEGIN OF str_t001,
      bukrs TYPE bukrs,
      ktopl TYPE ktopl,
    END OF str_t001.
    TYPES:BEGIN OF str_ska1,
      bilkt TYPE bilkt,
      ktopl TYPE ktopl,
      saknr TYPE saknr,
    END OF str_ska1.
    TYPES:BEGIN OF str_skb1,
    fstag TYPE fstag,
    bukrs TYPE bukrs,
    saknr TYPE saknr,
    END OF str_skb1.
    TYPES:BEGIN OF str_ss,
    bkrs TYPE bukrs,
    blart TYPE blart,
    budat TYPE budat,
    bschl TYPE bschl,
    hkont TYPE hkont,
    END OF str_ss.
    TABLES: sscrfields,bsid,t001,ska1,skb1,bkpf,bseg.
                   DATA  DECLARATIONS
    DATA: it_bsid TYPE TABLE OF str_bsid. "WITH HEADER LINE,
    DATA: wa_bsid TYPE str_bsid ,"WITH HEADER LINE,
         it_t001 TYPE TABLE OF str_t001 WITH HEADER LINE,
         it_ska1 TYPE TABLE OF str_ska1 WITH HEADER LINE,
         it_skb1 TYPE TABLE OF str_skb1 WITH HEADER LINE.
    DATA:w_index TYPE sy-tabix.
    INITIALIZATION.
      sscrfields-functxt_02 = 'ZEEST'.
      SELECTION-SCREEN FUNCTION KEY 2.
      SELECT-OPTIONS:s_bukrs FOR bkpf-bukrs,
                     s_blart FOR bkpf-blart,
                     s_budat FOR bkpf-budat,
                     s_bschl FOR bseg-bschl,
                     s_hkont FOR bseg-hkont.
    AT SELECTION-SCREEN.
      IF sscrfields-ucomm = 'FC02'.
      ENDIF.
    *field-symbols:<f1> type str_bsid.
                   SELECT STATEMENTS
    START-OF-SELECTION.
      SELECT blart      "Document type
             bukrs      "Company Code
             buzei      "Number of Line Item Within Accounting Document
             bschl      "Posting Key
             hkont      "General Ledger Account
             FROM bsid
             INTO CORRESPONDING FIELDS OF  TABLE it_bsid
             WHERE bukrs IN s_bukrs
             AND   blart IN s_blart
             AND   budat IN s_budat
             AND bschl  IN s_bschl
             AND hkont IN s_hkont.
      IF it_bsid[] IS NOT INITIAL.
        SORT it_bsid.
        REFRESH it_t001.
        SELECT bukrs              "Company Code
               ktopl              "Chart of Accounts
               FROM t001
               INTO TABLE it_t001
               FOR ALL ENTRIES IN it_bsid
               WHERE bukrs = it_bsid-bukrs.
        IF NOT it_t001[] IS INITIAL.
          SORT it_t001.
          REFRESH it_ska1.
          SELECT bilkt           "Group Account Number
                 ktopl           "Chart of Accounts
                 saknr           "G/L account number
                 FROM ska1
                 INTO TABLE it_ska1
                 FOR ALL ENTRIES IN it_t001
                 WHERE ktopl = it_t001-ktopl.
          IF NOT it_ska1[] IS INITIAL.
            SORT it_ska1.
            REFRESH it_skb1.
            SELECT fstag  "Field status group
                   saknr
                   FROM skb1 INTO TABLE it_skb1
                   FOR ALL ENTRIES IN it_bsid
                   WHERE bukrs = it_bsid-bukrs.
          ENDIF.
        ENDIF.
      ENDIF.
      LOOP AT it_bsid INTO wa_bsid.
        w_index = sy-tabix.
        READ TABLE it_t001 WITH KEY bukrs = wa_bsid-bukrs.
        IF sy-subrc = 0.
          wa_bsid-ktopl = it_t001-ktopl.
          IF sy-subrc = 0.
            READ TABLE it_ska1 WITH KEY ktopl = wa_bsid-ktopl.
            wa_bsid-saknr = it_ska1-saknr.
            wa_bsid-bilkt = it_ska1-bilkt.
            IF sy-subrc = 0.
              READ TABLE it_skb1 WITH KEY bukrs = wa_bsid-bukrs.
              wa_bsid-fstag = it_skb1-fstag.
              MODIFY it_bsid FROM wa_bsid INDEX w_index
              TRANSPORTING ktopl bilkt
                      saknr fstag.
            ENDIF.
          ENDIF.
        ENDIF.
      ENDLOOP.
      DATA:slis_tab TYPE slis_tabname,
      ft_cat TYPE slis_t_fieldcat_alv.
      DATA : incl TYPE trdir-name.
      incl = sy-repid.
      slis_tab = 'IT_BSID'.
      CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
       EXPORTING
         i_program_name               = sy-repid
         i_internal_tabname           = slis_tab
        I_STRUCTURE_NAME             =
         i_client_never_display       = 'X'
        i_inclname                   = incl
        I_BYPASSING_BUFFER           =
        I_BUFFER_ACTIVE              =
        CHANGING
          ct_fieldcat                  = ft_cat[]
       EXCEPTIONS
         inconsistent_interface       = 1
         program_error                = 2
         OTHERS                       = 3
      IF sy-subrc <> 0.
        WRITE:'field cat not found'.
      ENDIF.

    hi,
    DATA:tb_fieldcat TYPE slis_t_fieldcat_alv.
    try like this
    CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
        EXPORTING
          i_structure_name       = tb_structure
          i_client_never_display = 'X'
        CHANGING
          ct_fieldcat            = tb_fieldcat
        EXCEPTIONS
           inconsistent_interface = 1
          program_error          = 2
          OTHERS                 = 3.
      IF sy-subrc <> 0.
    endif
    reward if helpful
    Edited by: Padmasri on Mar 5, 2008 2:17 PM

  • I cannot get my @ button to work on the iMac why is this not working?

    Cant get the @ button on my iMac to wwork is there another way to get it to work other than the usual way of shift up and @

    If you have access to another keyboard, you could see if the issue is really in that,
    or if the problem could have some other cause... Even a PC keyboard may help
    to troubleshoot this one aspect. I try to always have a spare USB keyboard/mouse.
    Not sure if you could re-assign other keys, such as the F_ keys across the top, to
    have a different one for the @ symbol. There is a code for each one of those items
    and you could use it, or have a text document handy to copy-paste that one item.
    And if you have an antique iMac, or a newer intel-based one, they have different
    operating systems; and troubleshooting may take on different dimensions, too.
    So advice and results may vary depending on hardware & software in use.
    Good luck & happy computing!

  • Why itunes is not working after update?

    After the last update, itunes is not working in my mac, is totally frozen. I have no backup and I'm affraid of loosing everything that I have if I need to reinstall the OS. What can I do? Help, please.

    After the last update, itunes is not working in my mac, is totally frozen. I have no backup and I'm affraid of loosing everything that I have if I need to reinstall the OS. What can I do? Help, please.

  • Why does it say my coupon code is "Invalid coupon code. Please check the coupon code and re-enter."

    When I enter my coupon code to get my serial number it says "Invalid coupon code. Please check the coupon code and re-enter." It is the correct coupon code. And I have just deactivated my lisence on my old computer.

    If you had not deactivated it on the old computer and it is a Windows machine there would have been a chance of getting it using Belarc Advisor
    (http://www.belarc.com/free_download.html).  I do not know if you can still do so.
    You can try contacting Adobe support via chat and see if they can help.
    Serial number and activation chat support (non-CC)
    http://helpx.adobe.com/x-productkb/global/service1.html ( http://adobe.ly/1aYjbSC )

  • I didnt konw how to make a new account for my iTues card so i did it with a diffrent email but that email doesnt exist and when i tried to make it on a real email i just sai invalid code check the code and try again and can u please help me

    please help me it is a card of 25 dollars and i dont want it to go to waist i by mistake thought you used a frake email so i made one up i thought i was going to have a new one but then it said it was going to send a verifaction to my email so then i tried to use a real email and put in the code but it just kept on saying invalid code. check the code and try again. and i dont know what to do can u please please help me it was a gift and i really dont want it to go to waist please i need help

    for #1
    Frequently asked questions about Apple ID - Apple Support
    I have multiple Apple IDs. Is there a way for me to merge them into a single Apple ID?
    Apple IDs cannot be merged. You should use your preferred Apple ID from now on, but you can still access your purchased items such as music, movies, or software using your other Apple IDs.
    If you are wondering how using multiple Apple IDs relate to iCloud, see Apple IDs and iCloud.
    for #2
    Apple does not accept unsolicited ideas see Apple - Legal - Unsolicited Idea Submission Policy

  • Please check the below Cursor Procedure and correct that code Please

    Hai Every One.
    Please check the below code I have two issues in that code
    1. Invalid cursor
    2. Record must be enter
    Please correct this code and send me pls its urgent.I cont understand where i done mistake
    PROCEDURE fetch_detail_PROC IS
    cursor c1 is select * from quota_mast where quota_mast.divn=:quota_mast.divn and quota_mast.QUOT_tyPE=:quota_mast.QUOT_tyPE and quota_mast.INQNO=:quota_mast.INQNO;
    cursor c6 is select * from quota_det
    where quota_det.divn=:quota_mast.divn AND quota_det.QUOT_TYPE=:quota_mast.QUOT_tyPE and quota_det.enq_num=:quota_mast.INQNO
    ORDER BY quota_det.quot_no;
    --cursor c5 is select * from acc_mst where cdp=:quota_mast.ccdp and divn=:quota_mast.divn;
    --vn acc_mst%rowtype;
    i quota_mast%rowtype;
    detail1 quota_det%rowtype;
    BEGIN
         GO_BLOCK('quota_mast');
    for i in c1 LOOP
              :quota_mast.INQNO:=i.INQNO;
                        :quota_mast.DIVN:=i.DIVN;
                   :quota_mast.QUOT_NO:=i.QUOT_NO;
                        :quota_mast.quot_type:=i.quot_type;
                        :quota_mast.CCDP:=i.CCDP;
                        select nm into :QUOTA_MAST.PARTY_NAME from acc_mst where acc_mst.DIVN=:QUOTA_MAST.DIVN AND acc_mst.cdp=:ccdp;
                        :quota_mast.pak_for:=i.pack_for_PER;
                        :quota_mast.exc_duty:=i.exc_duty_PER;
                        :quota_mast.vat:=i.vat_PER;
                        :quota_mast.cst:=i.cst_PER;
                        :quota_mast.wct:=i.wct_PER;
                        :quota_mast.ser_tax:=i.ser_tax_PER;
                        :quota_mast.insu:=i.insu_PER;
                        :quota_mast.tot_tax:=i.tot_tax;
                        :quota_mast.tot_val:=i.tot_val;
                   :quota_mast.value:=i.value;
                                  next_record;
    end loop;
         first_record;
    GO_BLOCK('quota_det');
                   for detail1 in c6
              loop
                        :quota_det.quot_no:=detail1.quot_no;
              :quota_det.ENQ_NUM:=detail1.enq_num;
              :quota_det.item_code:=detail1.item_code;
              SELECT ITNM into :NM FROM itm_MST WHERE DIVN=:quota_mast.DIVN AND iCDP=:ITEM_CODE;
              :quota_det.price:=detail1.price;
              :quota_det.qty:=detail1.qty;
              :quota_det.DISC_PER:=detail1.DISC_PER;
                   next_record;
    END LOOP;
         first_record;
    close c6;
    --close c1;
    exception
    when others then
    message(sqlerrm);
    message(' ');
    END;
    Thank you..

    Oracle Forms is closely tied to the database meaning you can base your data blocks on your tables and Forms will handle fetching the data. I agree with Christian, your tables lend themselves to using a master - detail configuration and if you need to filter your block then you can use the Data Block WHERE Clause property.
    Please correct this code and send me pls its urgent.As to the urgency of your request, the forum is a community of "Volunteers." Enough said.
    Regarding your code, I see a several potential problems.
    First, how are your QUOTA_MAST and QUOTA_DET blocks synchronized? Are you using a block relationship? Are you using a combination of triggers to synchonize the QUOTA_DET block when you user navigates to a different record in the QUOTA_MAST block?
    Second, your Procedure name is "Fetch_Detail_Proc" but you are also fetching Master data as well. What is the purpose of your procedure and where do you call this procedure?
    Third, you're using SELECT * in your cursor queries. You should always explicitly name each column. What happens when your table changes and you need to search your code for a column that was dropped?
    Fourth, your cursor queries are referencing the same data blocks you are fetching data to populate. This gives the impression that you already have data in your block. This doesn't make sense - could you explain what you are trying to accomplish?
    Fifth, with respects to your code, the "Invalid Cursor" error (is this really the error you're getting?) is most likely caused by your explicit call to close the C1 cursor. As Andreas stated, when using a CURSOR FOR LOOP, the cursor is automatically opened, fetched and closed using this construct. There is no need to explicitly close the cursor, in fact - doing so will result in an invalid cursor error.
    As to the "Record must be entered" error, is sounds like you have required items in your block or your QUOTA_MAST block is not synchronized with your QUOTA_DET block, so when you attempt to navigate to a different block or record within your the same block the navigation cursor can't move because you haven't entered data that is required.
    Please tell us what you are attempting to do with this code so we can tell you if you are using the correct method.
    Craig...

  • Help-Task not found - Please check the Task Type, Name and Location are cor

    HI all,
    i have upgraded my owb from version 11gr1 to 11gr2. the installation is complete and all my mappings and objects are imported successfully.
    i was able to execute the mappings using the sql code:
    @/oracle/product/11.2.0/owb/rtp/sql/sqlplus_exec_template.sql
    by logging into sqlplus as the user in whose schema mappings are deployed.
    hOwever, suddenly i am getting the error since sometime back - not sure what might have happened or what might have gone wrong. can someone please help me understand what might be wrong - how to decode this?
    Here is my error:
    @/oracle/product/11.2.0/owb/rtp/sql/sqlplus_exec_template.sql
    Role set.
    Enter value for 1: WSODS
    Call completed.
    Enter value for 2: ODS_SCHEMA
    Enter value for 3: PLSQLMAP
    Enter value for 4: MAPPING_1
    Enter value for 6: ","
    Enter value for 5: ","
    Stage 1: Decoding Parameters
    |  location_name=ODS_SCHEMA
    |  task_type=PLSQLMAP
    |  task_name=MAPPING_1
    Stage 2: Opening Task
    begin
    ERROR at line 1:
    ORA-20001: Task not found - Please check the Task Type, Name and Location are
    correct.
    ORA-06512: at "OWBSYS.WB_RT_API_EXEC", line 759
    ORA-06512: at "OWBSYS.WB_RT_SCRIPT_UTIL", line 910
    ORA-06512: at line 2When i execute this: i get the result as follows:
    SELECT warehouse_object_id, store_id, object_type_id, object_type_name, object_name FROM owb$wb_rt_warehouse_objects
    where object_name = 'MAPPING_1';
    WAREHOUSE_OBJECT_ID     STORE_ID                OBJECT_TYPE_ID          OBJECT_TYPE_NAME                                                 OBJECT_NAME                                                     
    15947                   15325                   769                     PLSQLMap                                                         MAPPING_1                                                       
    1 rows selectedEdited by: Chaitanya on Mar 5, 2012 3:33 AM

    Hi Chaitanya,
    Did you get any resolution for this error? I'm facing the same error while trying to execute OWB mapping through this command.
    Any help would be much appreciated. Thanks.
    Regards,
    Jagari

Maybe you are looking for

  • Firefox with URL doesn't open url

    On a Citrix environment I installed Firefox (next to the default IE). I want FireFox to open a specific URL so I create a shortcut that looks like this: ""C:\Program Files\Mozilla Firefox\firefox.exe" <servername>:<port>/cid/Application.do" But every

  • Should I create a partition on external drive for iTunes music?

    ...or will it create it's own space outwith my backup stuff? (Secondary question: would moving my iTunes music from internal to external drive noticably improve performance of my Mac? I'm using about 135GB of a 250GB drive, 60GB of which is in iTunes

  • While initializing CUE , i get following error "kdb: Debugger re-entered on cpu 0, new reason = 5"

    HI all, I have  AIM-CUE(v 3.2)  on 2851 Router with IOS image Version 12.4(22)T4 (c2800nm-advipservicesk9-mz.124-22.T4.bin) with CCME version 7.0(1). I have been trying to make the Aim-Cue run and come up for initialization with every method I know o

  • Gah! Another Mac -- PC Video Chat question

    Diagnosing the following: A = AIM 6.8, Windows XP B = iChat 4.0.5 (608) C = iChat 4.0.7 A <--> B no problems video chat B <--> C " " A <--> C argh! No connection can be established between A & C. As a quick work-around, C downloaded AIM 6.8 for PC on

  • Itunes sync problems (and wish list)

    No doubt the iPhone is the most beautiful mobile phone with the greatest (and most consistent user experience). Unfortunately, the same cannot be said for iTunes! This tool (and being forced to use it) is the single greatest frustration in the iPhone