How to test input  JSF2

Hi,
Am looking for a way to test and varify the input form JSF/Faces components from the Web Tier, as adding system.out in the backing beans returns no screen output, as thing this has something to do with Server Side and Client Side execution etc. but no sure as only new to JSF and Web Development, anyways was wondering what the best and easiest way to check and validate the input types etc. from the Web Tier?
Many Regards

Its unclear what you exactly want.
Q: Do you want to check things from a development perspective, such as knowing that a certain field is correctly submitted and stored in a backing bean.
A: Using an IDE with a debugger can help here; you could use for example Eclipse and put a break point in the action method that is called upon pressing a button or whatever, then you can see what the state of the backing bean is. In this case you'll have to develop and deploy your application from Eclipse to be able to link the debugger to the running application server instance.
Also, any System.out/System.err output will be captured in the console of the IDE so you can see it.
Q: Or are you talking about doing actual validations on values, and report back to the user when something is wrong?
A: in that case, JSF has a built in validation model that you'll just have to learn how to use. A google search for "JSF validation" will get you plenty of results.

Similar Messages

  • How to attach input file in the Test Script in SECATT in ECC6 ?

    Hi ,
    How to attach input file in the Test Script in ECC6  in Tcode SECATT ?
    For Testing in SECATT in ECC6, how to attach input file which contains multiple records ?
    Best Regards,
    Padhy

    Hi and Welcome to the Community!
    Since you have balance, and the issue is in your Work domain, you need to work with your server admins, as it's possible they are forbidding (via IT Policy) the ability to do as you desire.
    Good luck!
    Occam's Razor nearly always applies when troubleshooting technology issues!
    If anyone has been helpful to you, please show your appreciation by clicking the button inside of their post. Please click here and read, along with the threads to which it links, for helpful information to guide you as you proceed. I always recommend that you treat your BlackBerry like any other computing device, including using a regular backup schedule...click here for an article with instructions.
    Join our BBM Channels
    BSCF General Channel
    PIN: C0001B7B4   Display/Scan Bar Code
    Knowledge Base Updates
    PIN: C0005A9AA   Display/Scan Bar Code

  • How to test a simple PL SQL function from another PL SQL script

    Hi,
    I have created a function. Now i need to test that whether it is returning the correct values or not.
    For that, i have written anothe pl sql script and trying to call this function. Im passing all the IN parameters in that function. I assume here that OUT parameters will provide me the result. Im trying to display the OUT parameter one by one to see my result.
    I'm using toad as sql client here connected with oracle.
    pl sql script:-
    DECLARE
    BEGIN
         DBMS_OUTPUT.PUT_LINE('$$$$$$$ VINOD KUMAR NAIR $$$$$$$');
         FETCH_ORDER_PRODUCT_DATA(320171302, 1006, 6999,
    ODNumber OUT VARCHAR2, Line_Number OUT VARCHAR2,
    ServiceID OUT VARCHAR2, BilltoNumber OUT VARCHAR2,
    AnnualPrice OUT NUMBER, CoverageCode OUT VARCHAR2)
    DBMS_OUTPUT.PUT_LINE('HERE IS THE RESULT ' | ODNumber );
    DBMS_OUTPUT.PUT_LINE('HERE IS THE RESULT ' | Line_Number );
    DBMS_OUTPUT.PUT_LINE('HERE IS THE RESULT ' | ServiceID );
    DBMS_OUTPUT.PUT_LINE('HERE IS THE RESULT ' | BilltoNumber );
    DBMS_OUTPUT.PUT_LINE('HERE IS THE RESULT ' | AnnualPrice );
    DBMS_OUTPUT.PUT_LINE('HERE IS THE RESULT ' | CoverageCode );
    END;
    Function:-
    Program Name : SPOT_Order_Product_Data_For_CFS.sql
    Description : Function to Validate parameters from CFS
    By : Vinod Kumar
    Date : 08/19/2011
    Modification History
    By When TAR Description
    CREATE OR REPLACE FUNCTION FETCH_ORDER_PRODUCT_DATA(orderNumber IN VARCHAR2, customerNumber IN VARCHAR2,
    productLine IN VARCHAR2, ODNumber OUT VARCHAR2,
    Line_Number OUT VARCHAR2, ServiceID OUT VARCHAR2,
    BilltoNumber OUT VARCHAR2, AnnualPrice OUT NUMBER,
    CoverageCode OUT VARCHAR2)
    RETURN VARCHAR2 IS
    lv_err_msg VARCHAR2(100) := '';
    lv_bucket_id VARCHAR2(14);
    lv_bill_number VARCHAR2(30);
    lv_anual_price NUMBER;
    lv_coverage_code VARCHAR2(8);
    lv_quote_num NUMBER(10) := NULL;
    lv_line_num NUMBER(5) := 0;
    lv_customer_number VARCHAR2(30) := customerNumber;
    lv_product_id VARCHAR2(14) := productLine;
    lv_count_quote NUMBER := 0;
    lv_quote_status VARCHAR2(5);
    lv_quote_version NUMBER(2):=0;
    BEGIN
    IF INSTR(orderNumber, '-') = 0 THEN
    lv_quote_num := orderNumber;
    ELSE
    lv_quote_num := SPT_Delimiter(orderNumber, 1, '-');
    lv_line_num := SPT_Delimiter(orderNumber, 2, '-');
    END IF;
    --Check status of the quote COM, APP
    SELECT COUNT(*) INTO lv_count_quote FROM sot_order_header WHERE ORDER_NUMBER=lv_quote_num
    AND ORDER_STATUS IN ('APP', 'COM') AND CUSTOMER_NUMBER = lv_customer_number;
    IF lv_count_quote = 0 THEN
    lv_err_msg := 'Invalid Order number';
    RETURN lv_err_msg;
    END IF;
    -- Fetch the latest version on SPOT quote
    SELECT MAX(VERSION_NUMBER) INTO lv_quote_version FROM SPT_QUOTE_HEADER WHERE QUOTE_NUMBER = lv_quote_num
    AND CUSTOMER_NUMBER = lv_customer_number;
    -- If quote is valid fetch the data in OUT parameters
    IF lv_line_num = 0 THEN
    BEGIN
    SELECT a.CUSTOMER_BILLTO_NUMBER,
    b.LINE_NUMBER, b.BUCKET_ID,
    b.ANNUAL_REF_RATE_USD, b.COVERAGE_CODE
    INTO lv_bill_number,lv_line_num,lv_bucket_id,lv_anual_price,lv_coverage_code
    FROM SPT_QUOTE_HEADER a, SPT_QUOTE_LINE b
    WHERE a.QUOTE_NUMBER = lv_quote_num
    AND a.CUSTOMER_NUMBER = lv_customer_number
    AND a.VERSION_NUMBER = lv_quote_version
    AND a.QUOTE_NUMBER = b.QUOTE_NUMBER
    AND a.VERSION_NUMBER = b.VERSION_NUMBER
    AND b.PRODUCT_ID = lv_product_id;
    ODNumber := lv_quote_num;
    BilltoNumber := lv_bill_number;
    Line_Number := lv_line_num;
    ServiceID := lv_bucket_id;
    AnnualPrice := lv_anual_price;
    CoverageCode := lv_coverage_code;
    RETURN '';
    EXCEPTION WHEN OTHERS THEN
    lv_err_msg := 'Multiple PIDs existing in the SPOT order, please provide the SPOT order + line number as input data';
    RETURN lv_err_msg;
    END;
    ELSE
    BEGIN
    SELECT a.CUSTOMER_BILLTO_NUMBER,
    b.BUCKET_ID, b.ANNUAL_REF_RATE_USD,
    b.COVERAGE_CODE
    INTO lv_bill_number,lv_bucket_id,lv_anual_price,lv_coverage_code
    FROM SPT_QUOTE_HEADER a, SPT_QUOTE_LINE b
    WHERE a.QUOTE_NUMBER = lv_quote_num
    AND a.CUSTOMER_NUMBER = lv_customer_number
    AND a.VERSION_NUMBER = lv_quote_version
    AND a.QUOTE_NUMBER = b.QUOTE_NUMBER
    AND a.VERSION_NUMBER = b.VERSION_NUMBER
    AND b.PRODUCT_ID = lv_product_id
    AND b.LINE_NUMBER = lv_line_num;
    ODNumber := lv_quote_num;
    BilltoNumber := lv_bill_number;
    Line_Number := lv_line_num;
    ServiceID := lv_bucket_id;
    AnnualPrice := lv_anual_price;
    CoverageCode := lv_coverage_code;
    RETURN '';
    EXCEPTION WHEN OTHERS THEN
              lv_err_msg := 'Multiple SPOT lines exist with same parameter';
              RETURN lv_err_msg;
    END;
    END IF;
    EXCEPTION
    WHEN OTHERS THEN
    lv_err_msg := '@@@ EXCEPTION THROWN @@@ '|| SUBSTR(SQLERRM,1,120);
    RETURN lv_err_msg ;
    END;
    Don't look at the function, it might have errors but my primary concern is how to test this function. Once I start doing its testing then only i can understand any bugs(if any).
    My pl sql is not so good. Im still learning. I don't understand IN and OUT parameters are.
    I just know that IN parameters r those whick we pass in to the function wen we call it and OUT parameters are those through which we get the result.
    Thanks in advance
    Vinod Kumar Nair

    20100511 wrote:
    I wondered how I could test the output of the function from within TOAD?I usually create the following function in my developer schema:
    create or replace function BoolToChar( b boolean ) return varchar2 is
    begin
      if b then
        return( 'TRUE' );
      else
        return( 'FALSE' );
      end if;
    end;To test a function like yours, the following will do in SQL*Plus/TOAD/etc:
    begin
      DBMS_OUTPUT.put_line(
        BoolToChar( XCCC_PO_APPROVALLIST_S1.does_cpa_exist(1017934)  )
    end;
    I'm probably doing 101 things wrong here, but thought I'd ask anyway and risk being shouted at.Shout at? You reckon? I thought people risked being beaten with a lead pipe, or pelted with beer cans and stale pretzels - which makes being shouted at a really safe and viable alternative. {noformat};-){noformat}

  • How to test domain controller on upgraded Win Server 2008 R2

    The windows team recently upgraded the development environment for the domain controller from 2003 to Windows 2008 R2 and I am to test the Idm functionality on this upgraded version. Our current configuration is that the DC and Idm gateway runs on different machines. To test this new DC, i want to install the idm gateway on that server and run some onboarding and termination test cases just to make sure if the AD connection is working on the upgraded DC. But i am getting ’Input/output error’ when i try to install the service and from the documentation it says 'The most common cause of this is that you do not have rights to work with this service.'. The server admin tried installing the gateway with his id as well and it failed. He tested installing in on the 2003 version of DC and it worked, so its not a matter of permission (i think..)...
    Does anyone have any better idea on how to test an upgrade of a DC from version 2003 to 2008 R2? Any help in this matter is appreciated. We are running Idm 8.1 on a Windows platform and an upgrade to OW 8.1.1. Patch 2 is also in the works..
    Thanks in advance.

    I may have found a workaround. Can you try to change the "compatibility mode" in 2008 R2 to "Windows XP SP3" and see if it will install?
    Admittedly I have not done this myself so I'm not entirely sure where or how it's done, but I have confirmation it resolves the issue from others who have faced it.

  • How to test the rule if multiline container is passing to the task?

    Hi Experts,
                      I am working on leave workflow. I have to get the approvers based on no of days of leave and leave type. I am getting these details in ITEMS_TAB internal table. I am passing this table to a rule. Now my problem is when I tried to simulate the rule I am not getting any input screen to enter the data.
    ITEMS_TAB is an internal table type of   "PTREQ_ITEMS_WF_TAB_FLAT".
    In the rule I have created a container by selecting the radiobutton "ABAP Dict. Data Type" and entered the above reference parameter is it right way?
    Is it possible to test the rule independently if I use multiline container as import parameter in my rule?  If so can anybody please tell me how to test the rule?
    Thank You.
    Srija.

    Hi Pavan,
                     Thank you.
                     To copy the values I am not getting any input screen to input the values. I observed one thing that the type that I am referring in the Rule is a deep structure. Is this is the reason that I am not getting the input screen to enter the values?
    I tested by creating aother rule by taking a field for that rule I am getting the input screen to simulate the Rule.
    Can you please suggest if the rule will not work then what I have to do? without the rule how can I get the agents?
    Thank you.
    Srija

  • How to test the interfaces in XI ?

    Hi ,
    Our Xi system is being upgraded from 3.0 to 7.0. I was asked to test the interfaces once the upgradation is done. I am not sure how this testing is to be done and will there be aby test plan for this??
    Can some one help me on this ??
    Thanks in Advance,
    Hemanthika

    To test, you must have imported all your scenarios in to your new system.then couple of general tips,
    1.testing can be done only after understanding the scenario.
    For this, u refer to the integration scenario in ur design. so this shall give u an idea about all the systems involved in integration and how the data flowing is between them and what kind of systems they are?
    2. For testdata, you might need of business or functional team as you cannot have any info on the file formats etc(depending on different scenarios invloved like R3, SOAP Databse etc)
    these are only general tips. but u can refer to many of the trouble shooting guides already available blogs in sdn for any sought of inputs.But then, SDN is always there.
    you can test/monitor ur results in RWB->component monitoring
    also in sxmb_moni
    thanks
    kiran
    Edited by: kiran dasari on Mar 17, 2008 4:44 PM

  • How to test server proxy in ECC 6.0 ?

    Hi,
    Please tell me how to test server proxy created in SPROXY of ECC 6.0  .
    I am following this blog XI: Debug your inbound ABAP Proxy implementation .
    When i am executing the test service provider i am getting an error with " program terminated " message  creating a dump .
    How to test it through this method ? Is there any other way to test in ECC6.0
    Thanks,
    Laawanya D

    Hi,
    I have put a breakpoint in my proxy code and when i am trying to execute only, i am getting the error "Program terminated" .
    I am using ECC6.0 , so when i am clicking on Test Interface, i am not  getting  "Application Data Entry" parameters  as given in  Stefan's blog , but I am getting something like:
    Input:
    1.Generate template Data
    2.Enforce Stylesheet generation
    (I have checked both 1 & 2 .)
    Error Handling:
    1.Don't catch Application faults
    if i check this and execute , my program gets terminated , leaving a dump and if i dont set it also My program gets terminated .
    So what to do now ?

  • How to test BLOB Table Column in BCBrowser??

    Hi,
    My requirement is to upload a file(pdf,doc,jpg, txt) into DB using ADF.
    I use, Jdev 11.1.1.6, Oracle 10g XE.
    For this, I created the following
    1. A table as MyFilesTab(ID Number, FileName Varchar2(80), File BLOB)
    2. An Entity Object MyFilesEO on MyFilesTab.
    3. Generated a default view object: MyFilesVO
    4. Application Module : TestAM with view instance "MyFiles"
    But When I run TestAM, I see MyFiles as an Input textbox. So I cannot able to add a file that will be stored in my Table.
    Please help me out.

    Just to clarify, my previous post is related to title of this thread("How to test BLOB Table Column in BCBrowser??"),
    and not to "My requirement is to upload a file(pdf,doc,jpg, txt) into DB using ADF" 
    Dario

  • How to test the PCI/PXI 4461

    when i receive a new card, how to test it?
    when i click the "self-test" in the Measurement & Automation Explorer,it shows that "the device has passed the self-test."
    is that means the card is ok?
    or i should make other test to confirm?what test should i do?

    You can also use the test panels in MAX to test each channel of input or output after they are terminated. This is a good verification that your signal conditioning, wiring, etc is working as expected before getting LV involved.
    Mike...
    Certified Professional Instructor
    Certified LabVIEW Architect
    LabVIEW Champion
    "... after all, He's not a tame lion..."
    Be thinking ahead and mark your dance card for NI Week 2015 now: TS 6139 - Object Oriented First Steps

  • How to test if particular character is empty in a row

    Hi All ,
    Requirement : To split the input file into two files .
    If the length of the row is 93 characters and the condition is If characters from 28 to 32 are empty then create a file with the name PCO1 .txt else create a file with the name PCO2 .txt
    Please let me know how to test in a row if particular character has certain value or from 28 to 32 are empty .
    Thanks for your help

    hi Sharma,
    IF line+27(5) EQ space.
    ==> positions 28-32 have no value (i. e. all characters are spaces)
    ELSE.
    ==> positions 28-32 have some value
    ENDIF.
    some explanation:
    line+27(5) ==> this means: 5 characters after position 27
    hope this helps
    ec

  • How to test an scenario

    Hi,
    After completing a scenario(eg:file to filr),how to test it...whether it is working fine or not..
    Thanks in advance.

    Hi,
    In order to test you file to file scenario,
    First test whether your mapping is working fine in the integration repository(Design) by going into your message mapping test tab, then provide the necessary values there and test it.
    If it is correct it will display the output, if not it will throw some errors.
    Next to test the interface with configuration go to test configuration in Integration directory and provide the necessary values of sender and receiver details along with payload and test it.
    To do an end to end testing, you need to place the input file in the source directory.
    For the input file, go to message mapping and go to test tab and provide the details and select the src(xml) file and place it in source directory along with the file name and extension you have provided in the integration directory sender communication channel.
    If the file is not picked up the goto RWB and check the communication channel monitoring for your sender channel.
    If file is picked and it has error it will display when you enter the tcode sxmb_moni.
    If file is processed successfully and file has not reached target directory then check your receiver cc in rwb.
    I hope it clears your query.
    Regards,
    Nithiyanandam

  • How to Test IDOC WPUUMS01

    Hi All,
    I've created a sample idoc file of type WPUUMS01 to upload to IS Retail. I just don't know where to test. I was using WE19, test tool for IDOC processing but Im having a hard time figuring out the errors in my IDOC since it automatically overwrites my file.
    Any suggestions on how to test or how to use WE19?
    thanks so much.
    Kenny

    Hi Kenny,
    In WE19:-
    1.     Select the radio button Basic Typ and enter ‘WPUUMS01’
    2.     Execute
    3.     You will get a template Idoc.
    4.     Read the file and input the data manually to the Idoc. Double click the segment name, the fields will be displayed and you can enter the data. Be carefully and enter the data in the correct segments and in correct order. The values which are not present should not be entered. Enter data relevant for one Idoc only.
    This way you will populate one Idoc and then you can test.
    Hope this is helpful.
    Regards,
    Sameena

  • Help!!!How to test Servlet?

    how to test servlet with the code below.
    in method doPost or doGet,
    doPost(HttpServletRequest req,HttpServletResponse resp)
    DataInputStream dis =null;
    String data="";
    dis = new DataInputStream(req.getInputStream());
    data=dis.readUTF();// readInt(),readBoolean() ,etc may applied
    System.out.println("data:"+data);
    if i code req.getParameter("param"); then i wrote test programm like this request.setParameter("param","something");the servlet can get the value.
    my question is ,how can i test the code above?how to set the input value so that the HttpServletRequest object can read the data?

    1) Do yoiu mean how to "run" your servlet code with sample parameter? This call manual testing with a sample run of you code. You need a web server(eg Tomcat), create a webapp with your servlet then deploy it there in order to run it.
    2) httpunit and junit are framework to write test case code that can be automated and repeatable. Plz read their doc.
    3) Your sample code me a very wrong way to retrieve and convert servlet parameters.
    Get a java toturial and servlet tutorial book and read it over the weekend. You need to get at least the basic.

  • HT4437 Trying to use airplay from my iPad to my TV.........when airplay code comes on screen how do I input the number on my iPad?

    I am trying to use my iPad with Airplay on my TV.  When I attempt to link up with TV a code appears on the screen.  Where and how do I input the code?

    Setup Apple TV with iPad
    1. Setup Apple TV
    (a) Connect cables and power cord
    (b) Turn on TV and select Input
    (c) Configure Apple TV
    2. Setup Home Sharing on iPad
    Settings>Music/Video>Home Sharing
    3. Setup Home Sharing on Apple TV
    Settings>Computer>Turn on Home Sharing. Enter Apple ID and Password
    4. Pair Apple TV with Remote Control
    General>Remotes>Pair Apple Remote

  • How can I input read a line from a file and output it into the screen?

    How can I input read a line from a file and output it into the screen?
    If I have a file contains html code and I only want the URL, for example, www24.brinkster.com how can I read that into the buffer and write the output into the screen that using Java?
    Any help will be appreciate!
    ======START FILE default.html ========
    <html>
    <body>
    <br><br>
    <center>
    <font size=4 face=arial color=#336699>
    <b>Welcome to a DerekTran's Website!</b><br>
    Underconstructions.... <br>
    </font> </center>
    <font size=3 face=arial color=black> <br>
    Hello,<br>
    <br>
    I've been using the PWS to run the website on NT workstation 4.0. It was working
    fine. <br>
    The URL should be as below: <br>
    http://127.0.0.1/index.htm or http://localhost/index.htm
    <p>And suddently, it stops working, it can't find the connection. I tried to figure
    out what's going on, but still <font color="#FF0000">NO CLUES</font>. Does anyone
    know what's going on? Please see the link for more.... I believe that I setup
    everything correctly and the bugs still flying in the server.... <br>
    Thank you for your help.</P>
    </font>
    <p><font size=3 face=arial color=black>PeerWebServer.doc
    <br>
    <p><font size=3 face=arial color=black>CannotFindServer.doc
    <br>
    <p><font size=3 face=arial color=black>HOSTS file is not found
    <br>
    <p><font size=3 face=arial color=black>LMHOSTS file
    <br>
    <p><font size=3 face=arial color=black>How to Setup PWS on NT
    <BR>
    <p><font size=3 face=arial color=black>Issdmin doc</BR>
    Please be patient while the document is download....</font>
    <font size=3 face=arial color=black><br>If you have any ideas please drop me a
    few words at [email protected] </font><br>
    <br>
    <br>
    </p>
    <p><!--#include file="Hits.asp"--> </p>
    </body>
    </html>
    ========= END OF FILE ===============

    Hi!
    This is a possible solution to your problem.
    import java.io.*;
    class AddressExtractor {
         public static void main(String args[]) throws IOException{
              //retrieve the commandline parameters
              String fileName = "default.html";
              if (args.length != 0)      fileName =args[0];
               else {
                   System.out.println("Usage : java AddressExtractor <htmlfile>");
                   System.exit(0);
              BufferedReader in = new BufferedReader(new FileReader(new File(fileName)));
              StreamTokenizer st = new StreamTokenizer(in);
              st.lowerCaseMode(true);
              st.wordChars('/','/'); //include '/' chars as part of token
              st.wordChars(':',':'); //include ':' chars as part of token
              st.quoteChar('\"'); //set the " quote char
              int i;
              while (st.ttype != StreamTokenizer.TT_EOF) {
                   i = st.nextToken();
                   if (st.ttype == StreamTokenizer.TT_WORD) {          
                        if (st.sval.equals("href")) {               
                             i = st.nextToken(); //the next token (assumed) is the  '=' sign
                             i = st.nextToken(); //then after it is the href value.               
                             getURL(st.sval); //retrieve address
              in.close();
         static void getURL(String s) {     
              //Check string if it has http:// and truncate if it does
              if (s.indexOf("http://") >  -1) {
                   s = s.substring(s.indexOf("http://") + 7, s.length());
              //check if not mailto: do not print otherwise
              if (s.indexOf("mailto:") != -1) return;
              //printout anything after http:// and the next '/'
              //if no '/' then print all
                   if (s.indexOf('/') > -1) {
                        System.out.println(s.substring(0, s.indexOf('/')));
                   } else System.out.println(s);
    }Hope this helps. I used static methods instead of encapsulating everyting into a class.

Maybe you are looking for

  • How to print an attachment of an e-mail double sided?

    HP Photosmart 6510. When I print a document from my computer, it will be printed double sided. However, when I send the same document by e-mail to my printer, it will be printed only single sided. How to solve this problem?

  • Urgent: When is the XDK for C  on HP-UX in Version 9.0.2.0.2 available?

    We like to use the validating xmlparser provided by the xdk for c. Unfortunatly the XDK for C has the Version 9.0.1.0.1. Two questions: 1) When do you port the Version 9.0.2.0.2 to HP-UX ? 2) Can i use the version with an oracle database version 8.1.

  • Creative Cloud "Download Error" message

    When I go to the App section on the creative cloud manager I get the message "Download Error. Please Contact Customer Support." Could somebody please help me fix this? I have tried restarting my computer, signing in and out of creative cloud, and cle

  • R/3 to xMII

    Hi All; I am new to xMII .I want to send data from R/3 system to xMII and represent the data in a dashboard. I have configured the connection from R/3 system to xMII system and am able to send the IDocs successfully. I want to know that what needs to

  • Mass change of Production Orders status from TECO to CLSD

    Hi All, I want to do mass change of Production Orders status from TECO to CLSD. could you tell me is there any t-code by which i can mass change Production orders status from TECO to CLSD. I want Production Orders to be closed, so that further confir