JSF with Simple Captcha

I am using JSF 1.2 with RichFaces.
I want to implement SimpleCaptcha in the application.
On my loginpage I am able to add a captcha image.
Here is the exception that I get. This I get after when my jsp page(on which this image is) loads.
*StandardWrapperValve[StickyCaptcha]: PWC1406: Servlet.service() for servlet StickyCaptcha threw exception*
java.lang.IllegalStateException: PWC3999: Cannot create a session after the response has been committed
at org.apache.coyote.tomcat5.CoyoteRequest.doGetSession(CoyoteRequest.java:2709)
at org.apache.coyote.tomcat5.CoyoteRequest.getSession(CoyoteRequest.java:2482)
at org.apache.coyote.tomcat5.CoyoteRequestFacade.getSession(CoyoteRequestFacade.java:871)
at org.apache.coyote.tomcat5.CoyoteRequestFacade.getSession(CoyoteRequestFacade.java:882)
at javax.servlet.http.HttpServletRequestWrapper.getSession(HttpServletRequestWrapper.java:248)
at nl.captcha.servlet.SimpleCaptchaServlet.doGet(Unknown Source)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:718)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
What could be the reason?
Edited by: rajeev2009 on Mar 1, 2009 6:13 AM

I included
*<rich:paint2D id="painter" width="300" height="120"*
*data="#{PaintData}" format="png" paint="#{PaintBean.paint}" />*
in my Login Page.
I also included PaintData & PaintBean in the source package.
When the login *page loads for first time* I get this exception:-
StandardWrapperValve[Faces Servlet]: PWC1406: Servlet.service() for servlet Faces Servlet threw exception
javax.faces.FacesException: Error send image
at org.richfaces.renderkit.html.Paint2DResource.send(Paint2DResource.java:192)
at org.ajax4jsf.resource.ResourceLifecycle.sendResource(ResourceLifecycle.java:221)
at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:265)
at com.sun.enterprise.web.connector.grizzly.ssl.SSLWorkerThread.run(SSLWorkerThread.java:106)
Caused by: javax.faces.el.EvaluationException: /jsp/loginPage.xhtml @54,75 paint="#{PaintBean.paint}": java.lang.NullPointerException
at com.sun.facelets.el.LegacyMethodBinding.invoke(LegacyMethodBinding.java:73)
at org.richfaces.renderkit.html.Paint2DResource.send(Paint2DResource.java:182)
... 36 more
Caused by: java.lang.NullPointerException
at PaintBean.paint(PaintBean.java:23)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
Edited by: rajeev2009 on Mar 7, 2009 7:24 AM

Similar Messages

  • What is the usual way of accessing Oracle by JSF with connection pooling?

    I am writing to access Oracle by JSF with connection pooling.
    EJB is too difficult for me.
    What is the simple way of doing it?
    thanks

    Leung,
    I believe there should be some sample code available via the JavaServer Pages Samples Web page.
    Good Luck,
    Avi.

  • Error while configuring jsf with ajax using rich faces.

    hi all
    i am trying to configure jsf with ajax. i am using rich faces for it.
    but when to trying to configure some simple program i am unable to start the application i am getting the following error.
    SEVERE: Parse Error at line 5 column 17: Document root element "faces-config", must match DOCTYPE ro
    ot "null".
    org.xml.sax.SAXParseException: Document root element "faces-config", must match DOCTYPE root "null".
    and
    SEVERE: Can't instantiate class: 'org.ajax4jsf.application.AjaxStateManager'.:org.ajax4jsf.applicati
    on.AjaxStateManager:exception:null
    Apr 29, 2008 11:48:15 AM org.apache.catalina.core.StandardContext start
    SEVERE: Error listenerStart
    my sample code is
    <h:inputText value="#{Page1.zip}">
                          <a4j:support event="onkeyup"  reRender="zip"/>                  
      </h:inputText>
      <h:outputText  id="zip" value="#{Page1.zip}"/>
    java code is page bean is
    private String zip = null;
        public String getZip() { return zip; }
        public void setZip(String zip)
           this.zip = zip;
        }the jar i am using is richfaces-api-3.2.0.SR1.jar, richfaces-impl-3.2.0.SR1.jar, richfaces-impl-3.2.0.SR1.jar
    in web.xml i have included following code.
    <filter>
    <display-name>RichFaces Filter</display-name>
    <filter-name>richfaces</filter-name>
    <filter-class>org.ajax4jsf.Filter</filter-class>
    </filter>
    <filter-mapping>
    <filter-name>richfaces</filter-name>
    <servlet-name>Faces Servlet</servlet-name>
    <dispatcher>REQUEST</dispatcher>
    <dispatcher>FORWARD</dispatcher>
    <dispatcher>INCLUDE</dispatcher>
    </filter-mapping>

    Sounds like a problem with faces-config.xml (something to do with the faces-config element). Here's an example that works:
    <?xml version='1.0' encoding='UTF-8'?>
    <!-- =========== FULL CONFIGURATION FILE ================================== -->
    <faces-config version="1.2"
                  xmlns="http://java.sun.com/xml/ns/javaee"
                  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                  xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd">
      <application>
        <locale-config>
          <default-locale>en_GB</default-locale>
          <supported-locale>en_GB</supported-locale>     
        </locale-config>
      </application>
      <managed-bean>
        <managed-bean-name>bean</managed-bean-name>
        <managed-bean-class>com.test.Bean</managed-bean-class>
        <managed-bean-scope>session</managed-bean-scope>
      </managed-bean>
    </faces-config>

  • How to create a Shuttle box in Apex with simple copy and move option..

    I want to create a shuttle box in Apex with simple copy option. the demo application I downloaded from oracle had a two level selection query option which I dont need and was not even compatible with my version. All I need is a way to shuttle single query values between two multiple select lists. I could not find any demo.
    My Apex version 2.1 with XE
    query : select distinct fieldid d, fieldid r from field order by 1
    What kind of buttons do I need.. ? submitting or url redirecting ?

    Hello,
    >>
    The demo is not working in my apex 2.1 as I mentioned in the post.
    >>
    Not working is not enough of a description to help you out. I assume that what you mean is it won't install into XE since the demo was built in 2.2 and uses some 2.2 specific technology for the install.
    The way to get around that issue like I said was to get a free workspace on apex.oracle.com install the demo application there and then using some cutting and pasting recreate the demo app in your XE instance.
    Carl

  • How Can i use Html frames with  simple JSP???

    How Can i use Html frames with simple JSP???
    Actually i am creating an application in which i have used Index.html as frame.
    Noew i am trying that if i click on a link of one frame(say menu frame) the \result shoul come to some other frame(say frame named mainwindow).
    Hoe can i do like this???
    Anand Pritam

    Well i am using..
    < Base target="mainwindow">
    But it is no working is there some other way??

  • Tiles / JSF with single tiles-defs.xml file, no templating JSPs?

    All the examples I've seen for using JSF with Tiles use many JSP files for the templating information, resulting in twice as many JSP files as you would have in, say, a typical Struts project.
    When coding in Struts you can forward to a tiles definition, meaning that if all your page layouts are defined in tiles-defs.xml, then you only need to provide the JSPs for the non-standard parts of each page.
    With JSF it seems that you need to provide a JSP for the template for each file (which might end up being a single <tiles:insert... />, and the JSP for the non-standard bits for that page.
    Is there a way to either a) combine those two JSP files into one (by maby using a <tiles:put ... type="string"/> - tried this, couldn't get it to work), or b) get something similar to the way Struts + Tiles works?

    It does not work by default. It is a fact.
    Source for Struts, Tiles and even JSF are open now. I.e. everybody who has interest can research this question.
    I got this reply from another forum for this question and I am currently working on it. Lets see if we get somewhere.

  • Jsf with weblogic server 6.1

    Hi, Any help would be appreciated. I am trying to use jsf with weblogic server 6.1 and wlintegration 2.1 I tried to deploy the samples provided with jwsdp-1.2 When I start the guess number sample I get the following error message:
    Duke's number: 3
    <25-Jun-03 16:03:40 BST> <Error> <HTTP> <[WebAppServletConte
    xt(57758238,examplesWebApp,/examplesWebApp)] Root cause of S
    ervletException
    javax.servlet.jsp.JspException: Cannot find FacesContext
    at javax.faces.webapp.UIComponentTag.doStartTag(UICo
    mponentTag.java:269)
    at jsp_servlet._jsf_45_guessnumber._faces.__greeting
    ._jspService(__greeting.java:123)
    at weblogic.servlet.jsp.JspBase.service(JspBase.java
    :27), etc.
    I updated the web.xml file, created the faces directory under my examplesWebApp active domain with the jsp files, it finds the UserNumberBean class but it still crashes with the above.
    One problem I was having while deploying it that Weblogic Server did not allow me to copy jsf-api.jar, jstl.jar,etc under web-inf/lib.
    So I added all required jar files under bea root/config/samples/lib and updated startWeblogic.cmd
    Please help with how to deploy correctly the samples:
    Botond

    Thanks bill.
    I checked my weblogic server 6.1,it limited to j2ee1.2 features only.So I changed it supporting j2ee1.3 features.Now my JSF example is working normally.
    But I found a new question soon.
    I writed some letter in Chinese in jsp page .And I got some errors in weblogic.
    <2003-10-14 01:47:57> <Error> <HTTP> <101019> <[ServletContext(id=6480502,name=jaction,conte
    xt-path=/jaction)] Servlet failed with IOException
    java.io.IOException: javax.servlet.jsp.JspException: The taglib validator rejected the page: "org.xm
    l.sax.SAXParseException: An invalid XML character (Unicode: 0xb8) was found in the CDATA section., "
    at weblogic.servlet.jsp.Jsp2Java.outputs(Jsp2Java.java:124)
    at weblogic.utils.compiler.CodeGenerator.generate(CodeGenerator.java:258)
    at weblogic.servlet.jsp.JspStub.compilePage(JspStub.java:356)
    at weblogic.servlet.jsp.JspStub.prepareServlet(JspStub.java:214)
    at weblogic.servlet.jsp.JspStub.checkForReload(JspStub.java:149)
    at weblogic.servlet.internal.ServletStubImpl.getServlet(ServletStubImpl.java:538)
    at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:364)
    at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:306)
    at weblogic.servlet.internal.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:312)
    at com.sun.faces.context.ExternalContextImpl.dispatchMessage(ExternalContextImpl.java:298)
    at com.sun.faces.lifecycle.ViewHandlerImpl.renderView(ViewHandlerImpl.java:53)
    at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:89)
    at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:185)
    at javax.faces.webapp.FacesServlet.service(FacesServlet.java:169)
    at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:1075)
    at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:418)
    at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:306)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletC
    ontext.java:5517)
    at weblogic.security.service.SecurityServiceManager.runAs(SecurityServiceManager.java:685)
    at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:31
    56)
    at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2506)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:234)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:210)
    I donnot know what is the matter.And how to correct?
    thanks again.
    Yanger

  • Working on JSF with Frames

    Hi All,
    I am currently working on JSF with Frames. I was able to have the frames implemented in JSF. I have 4 frames with the following layout
    Frame1
    Frame2 | Frame3
    ------------------------------------------

    Sorry, the question is
    I have a commandNavigationItem (list) in frame2 and when I click on one of the component of the navigation list, I want to the JSF page loaded in Frame3.
    Currently it is getting loaded in Frame2 itself. i did set the targetFrame parameter of commandNavigationItem but still it loads in Frame2 itself.
    Please help
    KVDY

  • Dynamic tooltips for charts (BusinessGraphics) with simple series

    Hello,
    I was wondering wheter the tooltip for charts with simple series can set dynamically. I cannot bind it to the context within the properties of the BusinessGraphics control but maybe it can be set in the code?
    This way I want to show the value of the column for instance as tooltip in a chart, or is there a better solution?
    thx,
    jeroen

    I got it!
    This thread helped me.
    [http://forums.sdn.sap.com/thread.jspa?threadID=1343796|http://forums.sdn.sap.com/thread.jspa?threadID=1343796]

  • Steps of Integrating JSF with struts

    Can anybody tell me the steps of intrgrate JSF with Struts
    Regds
    Amit Verma

    It's a better idea to upgrade your memory amount up to at least 1GB.

  • Ever seen this error message? You tried to use HTML or other restricted code. We, currently, do not allow HTML or other types of code in our message board posts or signatures. Try again with simple text only.

    Trying to load this site
    http://southcarolina.247sports.com/
    and it redirects me to this address
    http://media.247sports.com/Oops.html?aspxerrorpath=/
    and gives me the error message. "You tried to use HTML or other restricted code. We, currently, do not allow HTML or other types of code in our message board posts or signatures. Try again with simple text only. "
    Thanks for your help

    Clear the cache and the cookies from sites that cause problems.
    * "Clear the Cache": Tools > Options > Advanced > Network > Offline Storage (Cache): "Clear Now"
    * "Remove the Cookies" from sites causing problems: Tools > Options > Privacy > Cookies: "Show Cookies"
    Start Firefox in [[Safe Mode]] to check if one of the add-ons is causing the problem (switch to the DEFAULT theme: Tools > Add-ons > Themes).
    * Don't make any changes on the Safe mode start window.
    See:
    * [[Troubleshooting extensions and themes]]

  • Plz tell me BDC  CALL TRANSACTION steps with simple example

    hi,
    plz tell me the steps
    BDC  CALL TRANSACTION steps with simple example

    Hi,
    BATCH DATA COMMUNICATION
    About Data Transfer In R/3 System
    When a company decides to implement the SAP R/3 to manage business-critical data, it usually does not start from a no-data situation. Normally, a SAP R/3 project comes into replace or complement existing application.
    In the process of replacing current applications and transferring application data, two situations might occur:
    ? The first is when application data to be replaced is transferred at once, and only once.
    ? The second situation is to transfer data periodically from external systems to SAP and vice versa.
    ? There is a period of time when information has to be transferred from existing application, to SAP R/3, and often this process will be repetitive.
    The SAP system offers two primary methods for transferring data into SAP systems. From non-SAP systems or legacy system. These two methods are collectively called ?batch input? or ?batch data communication?.
    1. SESSION METHOD
    2. CALL TRANSACTION
    3. DIRECT INPUT
    Advantages offered by BATCH INPUT method:
    1. Can process large data volumes in batch.
    2. Can be planned and submitted in the background.
    3. No manual interaction is required when data is transferred.
    4. Data integrity is maintained as whatever data is transferred to the table is through transaction. Hence batch input data is submitted to all the checks and validations.
    To implement one of the supported data transfers, you must often write the program that exports the data from your non-SAP system. This program, known as a ?data transfer? program must map the data from the external system into the data structure required by the SAP batch input program.
    The batch input program must build all of the input to execute the SAP transaction.
    Two main steps are required:
    ? To build an internal table containing every screen and every field to be filled in during the execution of an SAP transaction.
    ? To pass the table to SAP for processing.
    Prerequisite for Data Transfer Program
    Writing a Data Transfer Program involves following prerequisites:
    Analyzing data from local file
    Analyzing transaction
    Analyzing transaction involves following steps:
    ? The transaction code, if you do not already know it.
    ? Which fields require input i.e., mandatory.
    ? Which fields can you allow to default to standard values.
    ? The names, types, and lengths of the fields that are used by a transaction.
    ? Screen number and Name of module pool program behind a particular transaction.
    To analyze a transaction::
    ? Start the transaction by menu or by entering the transaction code in the command box.
    (You can determine the transaction name by choosing System ? Status.)
    ? Step through the transaction, entering the data will be required for processing your batch input data.
    ? On each screen, note the program name and screen (dynpro) number.
    (dynpro = dyn + pro. Dyn = screen, pro = number)
    ? Display these by choosing System ? Status. The relevant fields are Program (dynpro) and Dynpro number. If pop-up windows occur during execution, you can get the program name and screen number by pressing F1 on any field or button on the screen.
    The technical info pop-up shows not only the field information but also the program and screen.
    ? For each field, check box, and radio button on each screen, press F1 (help) and then choose Technical Info.
    Note the following information:
    - The field name for batch input, which you?ll find in its own box.
    - The length and data type of the field. You can display this information by double clicking on the Data Element field.
    ? Find out the identification code for each function (button or menu) that you must execute to process the batch-input data (or to go to new screen).
    Place the cursor on the button or menu entry while holding down the left mouse button. Then press F1.
    In the pop-up window that follows, choose Technical info and note the code that is shown in the Function field.
    You can also run any function that is assigned to a function key by way of the function key number. To display the list of available function keys, click on the right mouse button. Note the key number that is assigned to the functions you want to run.
    Once you have program name, screen number, field name (screen field name), you can start writing.
    DATA TRANSFER program.
    Declaring internal table
    First Integral Table similar to structure like local file.
    Declaring internal table like BDCDATA
    The data from internal table is not transferred directly to database table, it has to go through transaction. You need to pass data to particular screen and to particular screen-field. Data is passed to transaction in particular format, hence there is a need for batch input structure.
    The batch input structure stores the data that is to be entered into SAP system and the actions that are necessary to process the data. The batch input structure is used by all of the batch input methods. You can use the same structure for all types of batch input, regardless of whether you are creating a session in the batch input queue or using CALL TRANSACTION.
    This structure is BDCDATA, which can contain the batch input data for only a single run of a transaction. The typical processing loop in a program is as follows:
    ? Create a BDCDATA structure
    ? Write the structure out to a session or process it with CALL TRANSACTION USING; and then
    ? Create a BDCDATA structure for the next transaction that is to be processed.
    Within a BDCDATA structure, organize the data of screens in a transaction. Each screen that is processed in the course of a transaction must be identified with a BDCDATA record. This record uses the Program, Dynpro, and Dynbegin fields of the structure.
    The screen identifier record is followed by a separate BDCDATA record for each value, to be entered into a field. These records use the FNAM and FVAL fields of the BDCDATA structure. Values to be entered in a field can be any of the following:
    ? Data that is entered into screen fields.
    ? Function codes that are entered into the command field. Such function codes execute functions in a transaction, such as Save or Enter.
    The BDCDATA structure contains the following fields:
    ? PROGRAM: Name of module pool program associated with the screen. Set this field only for the first record for the screen.
    ? DYNPRO: Screen Number. Set this field only in the first record for the screen.
    ? DYNBEGIN: Indicates the first record for the screen. Set this field to X, only for the first record for the screen. (Reset to ? ? (blank) for all other records.)
    ? FNAM: Field Name. The FNAM field is not case-sensitive.
    ? FVAL: Value for the field named in FNAM. The FVAL field is case-sensitive. Values assigned to this field are always padded on the right, if they are less than 132 characters. Values must be in character format.
    Transferring data from local file to internal table
    Data is uploaded to internal table by UPLOAD of WS_UPLOAD function.
    Population of BDCDATA
    For each record of internal table, you need to populate Internal table, which is similar to BDCDATA structure.
    All these five initial steps are necessary for any type of BDC interface.
    DATA TRANSFER program can call SESSION METHOD or CALL TRANSACTION. The initial steps for both the methods are same.
    First step for both the methods is to upload the data to internal table. From Internal Table, the data is transferred to database table by two ways i.e., Session method and Call transaction.
    SESSION METHOD
    About Session method
    In this method you transfer data from internal table to database table through sessions.
    In this method, an ABAP/4 program reads the external data that is to be entered in the SAP System and stores the data in session. A session stores the actions that are required to enter your data using normal SAP transaction i.e., Data is transferred to session which in turn transfers data to database table.
    Session is intermediate step between internal table and database table. Data along with its action is stored in session i.e., data for screen fields, to which screen it is passed, the program name behind it, and how the next screen is processed.
    When the program has finished generating the session, you can run the session to execute the SAP transactions in it. You can either explicitly start and monitor a session or have the session run in the background processing system.
    Unless session is processed, the data is not transferred to database table.
    BDC_OPEN_GROUP
    You create the session through program by BDC_OPEN_GROUP function.
    Parameters to this function are:
    ? User Name: User name
    ? Group: Name of the session
    ? Lock Date: The date on which you want to process the session.
    ? Keep: This parameter is passed as ?X? when you want to retain session after
    processing it or ? ? to delete it after processing.
    BDC_INSERT
    This function creates the session & data is transferred to Session.
    Parameters to this function are:
    ? Tcode: Transaction Name
    ? Dynprotab: BDC Data
    BDC_CLOSE_GROUP
    This function closes the BDC Group. No Parameters.
    Some additional information for session processing
    When the session is generated using the KEEP option within the BDC_OPEN_GROUP, the system always keeps the sessions in the queue, whether it has been processed successfully or not.
    However, if the session is processed, you have to delete it manually. When session processing is completed successfully while KEEP option was not set, it will be removed automatically from the session queue. Log is not removed for that session.
    If the batch-input session is terminated with errors, then it appears in the list of INCORRECT session and it can be processed again. To correct incorrect session, you can analyze the session. The Analysis function allows to determine which screen and value has produced the error. If you find small errors in data, you can correct them interactively, otherwise you need to modify batch input program, which has generated the session or many times even the data file.
    CALL TRANSACTION
    About CALL TRANSACTION
    A technique similar to SESSION method, while batch input is a two-step procedure, Call Transaction does both steps online, one after the other. In this method, you call a transaction from your program by
    Call transaction <tcode> using <BDCTAB>
    Mode <A/N/E>
    Update <S/A>
    Messages into <MSGTAB>.
    Parameter ? 1 is transaction code.
    Parameter ? 2 is name of BDCTAB table.
    Parameter ? 3 here you are specifying mode in which you execute transaction
    A is all screen mode. All the screen of transaction are displayed.
    N is no screen mode. No screen is displayed when you execute the transaction.
    E is error screen. Only those screens are displayed wherein you have error record.
    Parameter ? 4 here you are specifying update type by which database table is updated.
    S is for Synchronous update in which if you change data of one table then all the related Tables gets updated. And sy-subrc is returned i.e., sy-subrc is returned for once and all.
    A is for Asynchronous update. When you change data of one table, the sy-subrc is returned. And then updating of other affected tables takes place. So if system fails to update other tables, still sy-subrc returned is 0 (i.e., when first table gets updated).
    Parameter ? 5 when you update database table, operation is either successful or unsuccessful or operation is successful with some warning. These messages are stored in internal table, which you specify along with MESSAGE statement. This internal table should be declared like BDCMSGCOLL, a structure available in ABAP/4. It contains the following fields:
    1. Tcode: Transaction code
    2. Dyname: Batch point module name
    3. Dynumb: Batch input Dyn number
    4. Msgtyp: Batch input message type (A/E/W/I/S)
    5. Msgspra: Batch input Lang, id of message
    6. Msgid: Message id
    7. MsgvN: Message variables (N = 1 - 4)
    For each entry, which is updated in database, table message is available in BDCMSGCOLL. As BDCMSGCOLL is structure, you need to declare a internal table which can contain multiple records (unlike structure).
    Steps for CALL TRANSACTION method
    1. Internal table for the data (structure similar to your local file)
    2. BDCTAB like BDCDATA
    3. UPLOAD or WS_UPLOAD function to upload the data from local file to itab. (Considering file is local file)
    4. Loop at itab.
    Populate BDCTAB table.
    Call transaction <tcode> using <BDCTAB>
    Mode <A/N/E>
    Update <S/A>.
    Refresh BDCTAB.
    Endloop.
    (To populate BDCTAB, You need to transfer each and every field)
    The major differences between Session method and Call transaction are as follows:
    SESSION METHOD CALL TRANSACTION
    1. Data is not updated in database table unless Session is processed. Immediate updation in database table.
    2. No sy-subrc is returned. Sy-subrc is returned.
    3. Error log is created for error records. Errors need to be handled explicitly
    4. Updation in database table is always synchronous Updation in database table can be synchronous Or Asynchronous.
    Error Handling in CALL TRANSACTION
    When Session Method updates the records in database table, error records are stored in the log file. In Call transaction there is no such log file available and error record is lost unless handled. Usually you need to give report of all the error records i.e., records which are not inserted or updated in the database table. This can be done by the following method:
    Steps for the error handling in CALL TRANSACTION
    1. Internal table for the data (structure similar to your local file)
    2. BDCTAB like BDCDATA
    3. Internal table BDCMSG like BDCMSGCOLL
    4. Internal table similar to Ist internal table
    (Third and fourth steps are for error handling)
    5. UPLOAD or WS_UPLOAD function to upload the data from the local file to itab. (Considering file is local file)
    6. Loop at itab.
    Populate BDCTAB table.
    Call transaction <tr.code> using <Bdctab>
    Mode <A/N/E>
    Update <S/A>
    Messages <BDCMSG>.
    Perform check.
    Refresh BDCTAB.
    Endloop.
    7 Form check.
    IF sy-subrc <> 0. (Call transaction returns the sy-subrc if updating is not successful).
    Call function Format_message.
    (This function is called to store the message given by system and to display it along with record)
    Append itab2.
    Display the record and message.
    DIRECT INPUT
    Thanks &regards,
    Sravani

  • How to invoke JSF With Standard Urls and parameters

    Hi,
    Could some one please help me how to invoke JSF with standard Urls and parameters?
    My requirement is:
    http://localhost:8080/myapp/faces/jsf_page.jsp?trackerID=11&viewPage="products"
    then i want to save the tracker details into database and redirect the user to "products" page.
    Would some one suggest me where can i get some example?

    Hi BalusC,
    It didn't solve my proble.....Your solutions are fantastic for most of the issues. But mine problem is unclear where JSF page tags.
    If possible, Could you please provide me how to invoke the method from JSF page....
    same code works if the user click on command button but my requirement is as soon as the user click on the link from 3rd party website, then he need to come to our web application and invoke the JSF page along with ManagedBean for saving details and redirect to disganted webpage.
    I will provide the following link to 3rd party websites. the URL is :: http://somedomain.com/myApp/Tracker.JSF?trackerID=111
    Could you please provide me the code i need to write in JSF ....just for invoking ManagedBean class...? how i code for page on load call the managedBean for specific method?

  • Issues with Simple Lists in service requests

    We are using Service Manager 2012 and have run into a problem with simple lists within the service requests we created.  We believe the issues started after we upgraded to Service Manager SP1 and Silverlight 5.1.  What happens is you can select
    one of the options in the simple list, but if you decide to change back to the original option, the system won't allow it.  In the case where there might be three options in the simple list (i.e. New, Change, Delete), you can select each one once, but
    if we try to change it back to any of the other options the system won't allow it.  We tested all of this before going live and everything was working, but just before we went live SP1 came out and so we elected to upgrade to it first.  We then needed
    to upgrade to Silverlight SP1 to work with Service Manager SP1.  We retested all of our service requests again just before going live, but didn't think we needed to go through every simple list so we didn't retest this.  Since then the simple lists
    are problematic.  Has anyone else experienced this and if so is there a fix that will correct this issue?

    Yes!
    We submitted a business impact statement back in February and after pushing them on a weekly basis, we finally received word that we will be receiving a hot fix next week.  Until we actually receive the hot fix and confirm that it works, I will wait
    to post another update on this.
    With that said, they came up with a temporary workaround about 2-3 weeks ago.  This is the message regarding the temporary fix that we received from the engineer that has been working on the issue:
    After doing code review I identified the regression was introduced in the binaries that are included as part of this Silverlight XAP file:
    RequestOfferingSilverlightModule.xap. As we discussed on the phone going back to the pre SP1 version means you will lose any enhancements/fixes that were introduced in SP1. Looking at the Change history for this module I only see two changes
    that were introduced in SP1 and those changes are as follows:
    The text field control only shows the first three lines.
    Hierarchical support for List Items in Portal
    To confirm my findings I replaced this XAP file with a pre SP1 version and I couldn’t repro the issue in my lab. I also confirmed implementing this module I lose the
    above fixes that were introduced in Sp1.
    To implement the workaround, please follow the below steps:
    Connect to the Web Content Server,  locate the following directory:
    C:\inetpub\wwwroot\System Center Service Manager Portal\ContentHost\Clientbin
    Rename the following file RequestOfferingSilverlightModule.xap
    to RequestOfferingSilverlightModule.xap.org
    Copy the attached file RequestOfferingSilverlightModule.xap to the folder:
    C:\inetpub\wwwroot\System Center Service Manager Portal\ContentHost\Clientbin
    Restart IIS by issuing the following command at the command prompt:
    iisreset
    Clear the client side cache and see if you can reproduce the issue.
    Once confirmed the issue doesn’t reproduce, please proceed with testing all scenarios that make use of the Self Service Portal.
    If you don't have the pre SP1 version of the file I'm sure you can get it from Microsoft.  We are not using hierarchical lists so the temporary fix is currently working for us without any issues.

  • Explain User exit concept with simple example

    Hi friends
    I am new member of this forum & i am learning ABAP.
    Kindly send me user exit concept with simple example to my mail ID so i can able to use it.
    mail ID  [email protected]
    thanks in advance
    Thanks & Regards

    Code SE18 is used to Identify the BADI available.
    Look for the string 'CL_EXITHANDLER' in the standard program. This is a class which has a method 'GET_INSTANCE' which is used to trigger BADI's from the Standard Program. The interface parameter for this static method 'EXIT_NAME' is used to pass the BADI to the method.
    Open Standard Program and do a global search 'CL_EXITHANDLER'.
    SE18 > give the BADI name found through above search.
    CUSTOMER_ADD_DATA > which has a method SAVE_DATA.
    T.Code SE19 is used to Implement BADI.
    SE19 > give the implementation name > Give the Definition name as CUSTOMER_ADD_DATA and the Short Text.
    Intro.....
    http://help.sap.com/saphelp_nw04/helpdata/en/e6/d54d3c596f0b26e10000000a11402f/content.htm
    Check these links for info about badi..
    BADI's
    http://support.sas.com/rnd/papers/sugi30/SAP.ppt
    BADI's
    http://help.sap.com/saphelp_erp2005/helpdata/en/73/7e7941601b1d09e10000000a155106/frameset.htm
    http://support.sas.com/rnd/papers/sugi30/SAP.ppt
    http://www.sts.tu-harburg.de/teaching/sap_r3/ABAP4/abapindx.htm
    http://members.aol.com/_ht_a/skarkada/sap/
    http://www.ct-software.com/reportpool_frame.htm
    http://www.saphelp.com/SAP_Technical.htm
    http://www.kabai.com/abaps/q.htm
    http://www.guidancetech.com/people/holland/sap/abap/
    http://www.planetsap.com/download_abap_programs.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/c8/1975cc43b111d1896f0000e8322d00/content.htm
    /people/thomas.weiss/blog/2006/04/03/how-to-define-a-new-badi-within-the-enhancement-framework--part-3-of-the-series
    /people/thomas.weiss/blog/2006/04/18/how-to-implement-a-badi-and-how-to-use-a-filter--part-4-of-the-series-on-the-new-enhancement-framework
    http://www.esnips.com/web/BAdI
    http://www.allsaplinks.com/badi.html
    New to Badi
    check any fo the below links. this will def help u.
    http://www.allsaplinks.com/badi.html
    And also download this file....
    http://www.savefile.com/files.php?fid=8913854
    There are other tutorials on this site...
    http://sapbrain.com/Tutorials/tuto_download.html
    What are BAdIs?
    -> is an anticipated point of extension – these points act like sockets and exist in the original source code
    -> based on ABAP Objects. BAdI defines an interface that can be implemented by BAdI-implementations that are transport objects of their own
    ->Important! There are 2 roles: Enhancement Option-provider & Implementer.
    -> In the above context, Enhancement Implementation can be done only if option (hook) is provided by the Option-provider. In simple words there are no implicit BAdIs.
    Note: In the following slides, Definitions are created so as to understand the method of BAdI definition & for example purpose. As stated above this is the role of Enhancement Option-Provider.
    Classic BAdIs already exist since SAP Release 4.6
    BAdIs have been Re-implemented in ECC7.0 under the new Enhancement Framework & Switch Framework
    Classic BAdIs
    To understand what a powerful pattern a BAdI is, we will now define & then implement a BAdI
    BADI Class is created automatically.
    The various options are described below in detail:
    1. Enhanceable: Enhanceability of filter types can only be specified for filter-dependent BADI definitions under very special conditions. For example, the domain belonging to the filter type must be linked with a value table that is of the type E or G. A BADI implementation can then be created in one step by creating a new filter value that is automatically entered into the value table at save and also copied into the transport order of the BADI implementation. In addition, it is also possible to create a new filter value and, at the same time, a BADI implementation with the same name. Naturally, you can also specify existing filter values.
    You should select this feature if there is a prerequisite that a new filter value is created together with a new BADI implementation - that is, that BADI implementations are not created solely with existing filter values, although this, too, is possible.
    2. Multiple-Use
    3. Filter-Dependent
    Instance Methods can access all of the attributes of a class and can trigger all events of a class. Static Methods can only access static attributes and static events.
    Exceptions:
    Events:
    Events can be defined in classes or in interfaces. Corresponding methods can trigger these events with the RAISE EVENT statement. Each class (or interface) that is going to handle the corresponding event must implement a relevant handler method, and register it using the SET HANDLER statement. When an event occurs, the system calls all of the handler methods registered for that event.
    Like method definitions, events have a parameter interface. The only difference is that events may only have EXPORTING parameters.
    BADI : Businees Add IN's
    Business Add-Ins are SAP enhancement technique based on ABAP Objects.
    Where the SAP standard program is not going to fullfill the client requirement , we are going to add our own program to SAP standard program, without changing the standard prog.
    Each Business Add-In has
    – at least one Business Add-In definition
    – a Business Add-In interface
    – a Business Add-In class that implements the interface
    Each BADI has two different Views.
    1.Definition view
    2.Implementation view
    T.C for BADI Definition is SE18.
    T.C for BADI Implementation is SE19.
    There are multiple ways of searching for BADI.
    • Finding BADI Using CL_EXITHANDLER=>GET_INSTANCE
    • Finding BADI Using SQL Trace (TCODE-ST05).
    • Finding BADI Using Repository Information System (TCODE- SE84).
    1. Go to the Transaction, for which we want to find the BADI, take the example of Transaction VD02. Click on System->Status. Double click on the program name. Once inside the program search for ‘CL_EXITHANDLER=>GET_INSTANCE’.
    Make sure the radio button “In main program” is checked. A list of all the programs with call to the BADI’s will be listed.
    The export parameter ‘EXIT_NAME’ for the method GET_INSTANCE of class CL_EXITHANDLER will have the user exit assigned to it. The changing parameter ‘INSTANCE’ will have the interface assigned to it. Double click on the method to enter the source code.Definition of Instance would give you the Interface name.
    2. Start transaction ST05 (Performance Analysis).
    Set flag field "Buffer trace"
    Remark: We need to trace also the buffer calls, because BADI database tables are buffered. (Especially view V_EXT_IMP and V_EXT_ACT)
    Push the button "Activate Trace". Start transaction VA02 in a new GUI session. Go back to the Performance trace session.
    Push the button "Deactivate Trace".
    Push the button "Display Trace".
    The popup screen "Set Restrictions for Displaying Trace" appears.
    Now, filter the trace on Objects:
    • V_EXT_IMP
    • V_EXT_ACT
    Push button "Multiple selections" button behind field Objects
    Fill: V_EXT_IMP and V_EXT_ACT
    All the interface class names of view V_EXT_IMP start with IF_EX_. This is the standard SAP prefix for BADI class interfaces. The BADI name is after the IF_EX_.
    So the BADI name of IF_EX_CUSTOMER_ADD_DATA is CUSTOMER_ADD_DATA
    3. Go to “Maintain Transaction” (TCODE- SE93).
    Enter the Transaction VD02 for which you want to find BADI.
    Click on the Display push buttons.
    Get the Package Name. (Package VS in this case)
    Go to TCode: SE84->Enhancements->Business Add-inns->Definition
    Enter the Package Name and Execute.
    Here you get a list of all the Enhancement BADI’s for the given package MB.
    Have a look at http://help.sap.com/saphelp_nw04/helpdata/en/04/f3683c05ea4464e10000000a114084/content.htm
    http://help.sap.com/saphelp_erp2005/helpdata/en/73/7e7941601b1d09e10000000a155106/frameset.htm
    http://support.sas.com/rnd/papers/sugi30/SAP.ppt
    http://www.sts.tu-harburg.de/teaching/sap_r3/ABAP4/abapindx.htm
    http://members.aol.com/_ht_a/skarkada/sap/
    http://www.ct-software.com/reportpool_frame.htm
    http://www.saphelp.com/SAP_Technical.htm
    http://www.kabai.com/abaps/q.htm
    http://www.guidancetech.com/people/holland/sap/abap/
    http://www.planetsap.com/download_abap_programs.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/c8/1975cc43b111d1896f0000e8322d00/content.htm
    /people/thomas.weiss/blog/2006/04/03/how-to-define-a-new-badi-within-the-enhancement-framework--part-3-of-the-series
    /people/thomas.weiss/blog/2006/04/18/how-to-implement-a-badi-and-how-to-use-a-filter--part-4-of-the-series-on-the-new-enhancement-framework
    How to develop BADI
    Rewards if useful.

Maybe you are looking for

  • Set PO item rejection indicator via IDoc ORDRSP?

    Dear experts, is it possible to set the rejection indicator in the purchase order item (EKPO-ABSKZ) via processing an order confirmation IDoc ORDRSP? I found nothing but SAP note 890812 where SAP proposes a workaround with manual setting of the rejec

  • Dynamic Actions with Multiple Actions Capability

    Dynamic Actions with Multiple Actions Capability How can I get Dynamic Actions to work on Actions that are stored solely on IT0302 due to the multiple relationship to a previous Action that is stored on both IT0302 and IT0000? When multiple actions o

  • User for recruiter in E- Rec

    Hi all How do i create a user to a new recruiter in order to let him enter the Recruiter URL in E- Recruiting? (This user has of course R/3 user) Thanks Sharona

  • Error with stored procedure block datasource

    Hi all, I tried to base a datablock on a stored procedure in order to get better runtime performance. I work with Forms Builder 6i with patch 17 , and our database is oracle 8.1.7.1.4 But when compiling I got errors. Here are what I did : create or r

  • How to properly write a CSV through Servlet?

    hi all i am writing an application which will write selected database records to a csv text file not getting how to start with a servlet? any help in this regard is appreciated. thanx