Passing Unknown Field in URL

Hi,
How to check the table field which i have given in the Browser URL.
I have a jsp page i want to call another page by passing database condition. Suppose if i give unknown field . i want to get user friendly messgae like "Filed Not Found "
Please give me any solution to this problem.
Here i give the Sample url
jspfileName=AHf267d943bc224522fd28a0eca8e1ec25.jsp&ocx=t&condition=eo=100
i tested with unknow field like "eo" instead of "eno"
Now i want to check if the given condtion field is correct or not. and show the user friendly message.
Please help me..
Thanks,
Merlin Rosina

hi,
so u have no problem in jsp side. Fine.
now receive the value from query string in servlet program,
on that program check the value with database and define th result based on your condition.
for example, in your table
no | Name
105 | Java
106 | JSP
aa.jsp?no=107
in your servlet,
String no = request.getParameter("no");
int number  = Integer.parseInt(no);
PreparedStatement ps ;
ResulSet rs;
String query = "select * from tablename where no = ?";
ps = java.SQl.Connection.DriverManager.getConnection(" "," "," ");
ps.setInt(1,number);
rs = ps.executeQuery(query);
if(rs.first()) {
     System.out.println(rs.getString("Name");
else {
    System.out.println("Field Not Found ");
}Bala

Similar Messages

  • Passing Hidden varable in URL

    Hi,
    I am trying to pass hidden variable as URL parameter.
    Please could someone correct me what is wrong here as I always get null value though there is a value in folderId:
    <input type=hidden id="folderId" value='<c:out value="${bean.folderId}"/>'/>
    //passing hidden variable in URL:
    <form method="POST" name="frmWorkFlow" id="frmWorkFlow" action="../../jsp/actions/workFlow.do?folderId=${folderId}">Thanks

    Which do you want to do?
    As a hidden field on the page and submit the form (which will then pass it as a parameter)
    Or building it up on the URL - where you don't need the hidden field at all.
    Personally I prefer using a hidden field.
    A form only submits the input fields nested within it.
    Solution: Put your <input type="hidden"> between the <form> </form> tags.
    Oh, and the reason its not working right now is that ${folderId} is null where ${bean.folderId} probably isn't.
    EL variables can not access the hidden field values directly - they're for use on the client end only.

  • Passing a field from one page to another

    Page 1 has fields that can have information entered or left blank. I need to pass these fields to page 2 were they can be used in the SQL to select rows from the oracle table. below is my sql. I can hard code the account no and it works.
    select
    "LOAD_ID",
    "ACCOUNT_NO",
    "PERMIT_NO",
    "PERMIT_YEAR",
    "PAYMENT_TYPE",
    "PERMIT_VOIDED",
    "NO_OF_AXLES",
    "AXLE_1_FEET",
    "AXLE_1_INCHES",
    "AXLE_2_FEET",
    "AXLE_2_INCHES",
    "AXLE_3_FEET",
    "AXLE_3_INCHES",
    "AXLE_4_FEET",
    "AXLE_4_INCHES",
    "AXLE_5_FEET",
    "AXLE_5_INCHES",
    "AXLE_6_FEET",
    "AXLE_6_INCHES",
    "AXLE_7_FEET",
    "AXLE_7_INCHES",
    "AXLE_8_FEET",
    "AXLE_8_INCHES",
    "PERMIT_COST",
    "PERMIT_TYPE",
    "LOAD_TYPE",
    "TRUCK_TOTAL_WEIGHT",
    "TRUCK_TOTAL_WEIGHT_DESC",
    "TRUCK_WIDTH_FEET",
    "TRUCK_WIDTH_INCHES",
    "TRUCK_WIDTH_DESC",
    "TRUCK_LENGTH_FEET",
    "TRUCK_LENGTH_INCHES",
    "TRUCK_LENGTH_DESC",
    "TRUCK_HEIGHT_FEET",
    "TRUCK_HEIGHT_INCHES",
    "TRUCK_HEIGHT_DESC",
    "TRAILER_LOAD_FEET",
    "TRAILER_LOAD_INCHES",
    "TRAILER_LOAD_DESC",
    "COMPANY_INFORMATION1",
    "COMPANY_INFORMATION2",
    "TRUCK_MAKE",
    "TRUCK_LICENSE_NO",
    "TRUCK_LICENSE_ST",
    "TRAILER_MAKE",
    "TRAILER_LICENSE_NO",
    "TRAILER_LICENSE_ST",
    "ORIGIN",
    "DESTINATION",
    "ROUTING1",
    "ROUTING2",
    "CMNT1",
    "CMNT2",
    "CMNT3",
    "CMNT4",
    "CMNT5",
    "CMNT6",
    "CMNT7",
    "CMNT8",
    "CMNT9",
    "CMNT10",
    "CMNT11",
    "COMMODITY_DESC1",
    "COMMODITY_DESC2",
    "PERMIT_BEGIN_DATE",
    "PERMIT_END_DATE",
    "PERMIT_ISSUE_DATE",
    "PERMIT_VOID_DATE",
    "OVERRIDE_SINGLE_AXEL_WEIGHT",
    "OVERRIDE_DOUBLE_AXEL_WEIGHT",
    "OVERRIDE_TRIPLE_AXEL_WEIGHT",
    "DELETE_AXLE",
    "CHECK_NO",
    "FRONT_AXLE_WEIGHT",
    "MIDDLE_AXLE_WEIGHT",
    "REAR_AXLE_WEIGHT",
    "TRUCK_TOTAL_FEET",
    "TRUCK_TOTAL_INCHES",
    "AXLE_SPACING",
    "PERMIT_FEES",
    "HOLIDAY_MSG",
    "GOVERNMENT_PERMIT",
    "OVERRIDE_AXEL_ALL",
    "MULTI_ST_TAG",
    "PERMIT_AGENT_ID",
    "PERMIT_SPECIFICATIONS1",
    "PERMIT_SPECIFICATIONS2",
    "SUPER_LOAD_AXEL_NO",
    "AXEL_BOOSTER_WEIGHT",
    "MULTISTATE_PERMIT",
    "MODIFICATION_COUNT",
    "USDOT_NO"
    from "LEGACY_ODOW_PERMITS"
    where
    (upper(nvl(:P1_SELECT_PERMIT,"ACCOUNT_NO")) is null)
    or((upper("ACCOUNT_NO")) = (upper(nvl(:P1_SELECT_PERMIT,"ACCOUNT_NO"))))
    )

    Your query on page 2 should be able to use the values submitted for page 1. I guess I'm assuming that your page 1 is a form wherein you're submitting the data for insertion/update to the database.
    The query on page 2 would be something like:
    select * from my_table where load_id = :P1_LOAD_ID, etc...
    This will probably get very complex very fast if you're going to allow nulls for very many of those fields.
    What exactly is your question/problem?
    Earl

  • Passing Parameters in a URL to Reports - Need Help Urgently !

    I have created Image Maps (content area) where I pass parameters in the URL as follows :
    <area shape="rect" coords="335,66,528,83" href="http://townland:7778/pls/portal30/PORTAL30.RPT_SUMKWH.show_parms?meter=PMS 11BBA01">
    <area shape="rect" coords="400,55,600,90" href="http://townland:7778/pls/portal30/PORTAL30.RPT_SUMKWH.show_parms?meter=PMS 11BBA02">
    I am having a problem passing this meter parameter to the report [I am generating this report (RPT_SUMKWH) using SQL Query] :
    I have tried the following :
    1) I tried referencing this parameter in the 'Additional PL/SQL code, before displaying page' section of my Report as :- wwpro_api_parameters.get_value('meter', 'RPT_SUMKWH')
    but this did not work (this made the package body invalid).
    2) I then tried using the meter parameter as a bind variable in my SELECT Query of the Report, then, in the 'Customisation Form' section, I place :- wwpro_api_parameters.get_value('meter', 'RPT_SUMKWH') under Default Value, however, when I go back to my Image Map content area & ty to click on the URL, I get an error "Page does not display" .
    How do I then pass this parameter to my report, where do I place the code to make the call for the parameter being passed from the Image Map URL in the content area??
    AVD

    Hi,
    You will have to encode your parameter value. The problem is because of the spaces in the value. Whenever there any special
    characters in the value it should be encoded.
    example
    select '<area shape="rect" coords="335,66,528,83" href="http://townland:7778/pls/portal30/PORTAL30.RPT_SUMKWH.show_parms?meter='||
    <portal_schema>.wwutl_htf.url_encode('PMS 11BBA01')||'">pams</a>' url
    from meters
    The above is just an example. Please change the names to suit your requirements.
    Thanks,
    Sharmila

  • Passing multiple fields as addition to  "end at " statement

    Hi All
    I dont think I can pass multiple fields to END AT statement.
    I need to sum at end of few field values in table .what is the best method of acheving this.
    Thanks in Advance
    Regards
    Vinay Kolla

    have different control blocks, and make sure you sort on all of the fields which you are using the control statements.

  • Want to pass STRS2 field into sales order and contract.

    Hi Friends.
    I am creating Sales order using function module IDOC_INPUT_ORDERS and Contract using SD_SALESDOCUMENT_CREATE.
    Now I want to pass STRS2(House number field into Sales Order/Contract). In IDOC I tried to pass E1EDKA1-STRS2, but its not coming into Sales order output.But SD_SALESDOCUMENT_CREATE dont have an option to pass the field value.
    So in that case how can I achieve the desired functionality, Is there any user exit or let me know the suitable method to achieve the functionality.
    Thanks
    Gowrishankar

    Yes I tried that also.I passed the value from program to user exit MV45AFZZ and updated the structure XVBADR in USEREXIT_SAVE_DOCUMENT_PREPARE, but its not getting reflected in Sales Order/Contract.
    Anyone have suggestion..plz let me know.
    Thanks
    Gowrishankar

  • Can I pass variables in the URL string?

    I am trying to get some variables into a loaded swf at
    runtime. The variables will carry information so the swf can load
    the correct xml file. I thought we could pass them through the URL
    string like so:
    new URLRequest("testing.swf?myVar=varOne
    but it just throws an URL cannot be found error. How can I
    get variables into my swf at runtime?

    What you are doing is fine. But you will always get that
    error when testing
    the movie (Ctrl+Enter). Try it in a browser and it should
    work.
    BTW, another way of doing the same is to use a URLVariables
    object, like so:
    var req:URLRequest = new URLRequest("testing.swf");
    var vars:URLVariables = new
    URLVariables("myVar=varOne&myVar2=varTwo");
    req.data = vars;

  • Unable to pass flashvars in application url in Flex 4.5.

    I am creating an application in which I have to pass variable in application URL like http://localhost/Test/test.html?name=testUser
    It works fine in flex 3.5 and can be read using Application.application.parameters['name']. But with flex 4.5 it is not detected unless declared in html wrapper.
    Problem is, since requirement changes dynamically so somehow its not possible to determine all parameters user want to use so can't be declared in html wrapper.
    Is there any work around for reading flashVars directly from application URL ? how about using browserManager's fragments for solving this problem??

    I am creating an application in which I have to pass variable in application URL like http://localhost/Test/test.html?name=testUser
    It works fine in flex 3.5 and can be read using Application.application.parameters['name']. But with flex 4.5 it is not detected unless declared in html wrapper.
    Problem is, since requirement changes dynamically so somehow its not possible to determine all parameters user want to use so can't be declared in html wrapper.
    Is there any work around for reading flashVars directly from application URL ? how about using browserManager's fragments for solving this problem??

  • Pass data parameter from URL to Forms

    Hi
    Is it possible to pass a data parameter from asp to Forms?.
    In my asp I have a url to call a form (eg. http://servername:port/forms90/f90servlet/form=testform.fmx). In my testform.fmx I accept 'account no' as a parameter for querying the records. Since I am calling this form from asp, I already have the account no in my asp. I would like to pass this account no to the form automatically.
    Is it possible to pass this data parameter from url to forms?.
    If possible, what changes to be made in the form. Please help.
    sreekumar

    Create a parameter in your form, there's a node for it in the Navigator window. Imagine it is called myParam.
    Pass it on the URL like this:
    http://host/forms90/f90servlet?config=myApp&otherParams=myParam=somevalue
    Regards,
    Robin Zimmermann
    Forms Product Management

  • Is it possible to pass a field symbol as parameter from any method of view?

    Hi
    Is it possible to pass a field symbol as an importing parameter to teh globally declared attribute??

    While it is true that you can pass field symbols, they must be fully typed at the time you pass them  and they will be passed by value, not by reference. If you want to pass generically typed variables use a data reference (TYPE REF TO) instead.

  • Passing parameters from an URL to a WAD Web Template 7.0

    Hi guys, I need to pass parameters from an URL to a web template created with WAD 7.0. We need to open a template with certain filters starting from a link button located on an Xcelsius Dashboard. Our customer wants a web template to be opened with the filters defined within the Xcelsius
    The idea is to run the template with the filters defined in the URL. I know this was incredibly easy with WAD 3.x, but I didn't find any suitable solutions to use with WAD 7.0.
    What is the easiest way to do this with WAD 7.0?
    Thanks in advance and regards.
    Fabio Cristi

    Hi,
    It is possible in 7.0, but unfortunately it is a lot more complicated than i 3.x. There are quite a few examples here:
    http://help.sap.com/saphelp_nw70/helpdata/en/43/ef05462480025ae10000000a1553f7/content.htm
    I used it in a case where I wanted to embed a Web template in a BPS application and pass characteristic filters from the BPS application to the web template - similar to your requirements. Basically you need the following just to restrict one characteristic :o(
    &BI_COMMAND_1-BI_COMMAND_TYPE=SET_SELECTION_STATE
    &BI_COMMAND_1-TARGET_DATA_PROVIDER_REF_LIST-TARGET_DATA_PROVIDER_REF_1=DP_1
    &BI_COMMAND_1-CHARACTERISTICS_SELECTIONS-CHARACTERISTIC_SELECTIONS_1-SELECTIONS-SELECTION_1=SELECTION_INPUT_STRING
    &BI_COMMAND_1-CHARACTERISTICS_SELECTIONS-CHARACTERISTIC_SELECTIONS_1-SELECTIONS-SELECTION_1-SELECTION_INPUT_STRING=PDS06
    &BI_COMMAND_1-CHARACTERISTICS_SELECTIONS-CHARACTERISTIC_SELECTIONS_1-CHARACTERISTIC=0D_PH2
    I could only get it to work with one characteristic and I suspect, that the reason is that the URL simply gets to long (very quickly). You have to repeat the above for every characterstic you want to use :o(
    Hth,
    Jacob

  • Passing Parameters in a URL

    Hi,
    Does anybody know how/if it's possible to pass parameters into a URL from LOV/comboboxes/tick-boxes etc...
    I know this is possible through External Applications for the username and password, but what if the user wants to select multiple departments of a given report?
    The idea being, that we are going to be passing parameters into Sales Analyser to fire off a specific report with given values.
    These values are restricted, depending on which user you are and your level of access to the portal. This URL will then be used to open an SA report with the details required.
    Thanks, Matt.

    Hi,
    You will have to encode your parameter value. The problem is because of the spaces in the value. Whenever there any special
    characters in the value it should be encoded.
    example
    select '<area shape="rect" coords="335,66,528,83" href="http://townland:7778/pls/portal30/PORTAL30.RPT_SUMKWH.show_parms?meter='||
    <portal_schema>.wwutl_htf.url_encode('PMS 11BBA01')||'">pams</a>' url
    from meters
    The above is just an example. Please change the names to suit your requirements.
    Thanks,
    Sharmila

  • How to pass enhanced fields in BAPI_PO_CREATE

    Dear Memebers,
    I have a requirement to pass the Enhanced fileds in Module Function BAPI_PI_CREATE using VB.NET can anyone send me sample.
    Thanks,
    Nasir

    Dear Nasir,
    In order to pass enhanced fields to the BAPI_PO_CREATE function module, populate a table of type BAPIPAREX and pass it to the EXTENSIONIN tables parameter of the FM.
    (Sample Code): Suppose you enhanced Purchasing Document Item Table EKPO with Append structure ZEKPO with the fields ZNAME1 and ZDATA1.
    DATA: GT_EXTENSION TYPE TABLE OF BAPIPAREX,
               WA_EXTENSION TYPE BAPIPAREX.
    CLEAR WA_EXTENSION.
    WA_EXTENSION-STRUCTURE = 'ZEKPO'. " 'Name of the Append Structure for Standard PO header/item table'
    CONCATENATE WA_EKPO-ZNAME1 WA_EKPO-ZDATA1 INTO WA_EXTENSION-VALUEPART1. (Ensure that the total character length of these fields is less than 240)
    APPEND WA_EXTENSION TO GT_EXTENSION.
    Similarly, you need to pass the ZEKPOX structure with the relevant check boxes. For this, you need to refer to the documentation for Function Module but generally, Passing Enhanced Fields work this way.
    Regards,
    Amit Sharma

  • Need Help in Field Symbol for Dynamically passing  table field value

    Hi All,
    In my internal table I am having data.
    I am dynamically forming table field name and substitute for the another table field name to pass DATA.
    but I am getting the Variable name insted of Value ie Data.
    I am using Field Symbol for this.
    data:
    Field-symbols <TS> type any.
    field1 type string.
    LOOP AT TABLEFIELDS INTO WA_TABLEFIELDS.
                READ TABLE  TEST  WITH KEY NAME = WA_TABLEFIELDS-FIELDNAME.
                IF SY-SUBRC = 0.
                  CONCATENATE 'WA_' WA_TABLEFIELDS-TABNAME '-' WA_TABLEFIELDS-FIELDNAME INTO  Field1.
                  Assign Field1 to <TS>.
                    ALL_VAL-VALUE = <TS>
    "After substituting the <TS>  into ALL_VAL-VALUE  field I need a DATA to be passed but the variable name is appending"*    
             APPEND ALL_VAL.
                ENDIF.
              ENDLOOP.
    kindly how to pass the value into the table.
    Thanks in advance.
    San

    Hi,
    pls assign a break point in
    CONCATENATE 'WA_' WA_TABLEFIELDS-TABNAME '-' WA_TABLEFIELDS-FIELDNAME INTO Field1.
    Assign Field1 to <TS>.
    ALL_VAL-VALUE = <TS>
       " Put a break point here and check for the value in <TS>.
    if <TS> contains value then create a work area for ALL_VAL AND PASS the Field-Symbol to that and then  append thw wa into the table...
    Hope this works out!!
    thanks

  • Page 404 Error when passing Session values through URL

    The current application I'm working on is a 'Targeted Email Communications' application. Bascially, employees at the school at which I'm employed can go in and select services to recieve outage notification emails on.
    The problem I'm discussing in this post has to do with our so called 'Notification Summary Screen.' This screen is basically a report region which displays all outage notifications issued by this application. In the left-most column of this report, I have an edit button that when clicked, redirects the user to the 'Create / Update / Send Screen' with the primary key values passed through the URL. When this happens, all other page items query their values based on the NOTIF_ID passed in through the URL. All of this works fine.
    The problem is, on the Notification Summary Screen, I also have a button labeled 'Create a new notification.' This button redirects the user to the same page as before, except now all of the values are NULL because this outage notification has not yet been created. The problem is, when I try and do this - I get a page 404 not found error. I'm pretty sure it's because my application is getting confused because earlier all of the values were passed in through a URL. For the 'Create New' button, I clear the page cache for this page - and it still does nothing. I am at a loss for what to do here because I keep getting the error.
    Here's the code for the URL button found in the report query in the 'Notification Summary Screen' :
    ('<a href='
              || 'f?p=&APP_ID.:2:&SESSION.::&DEBUG.::'
              || 'P2_NOTIF_ID,P2_NOTIF_SEQ,P2_INFO_TYPE:'
              || a.notif_id ||','|| b.notif_seq || ',' || 'Update'
              || '>'
              || '<img src="#APP_IMAGES#EditButton.gif" />'
              || '</a>') as "edit",** NOTE, I took out the double quotes after href and before the closing right karat brackets because for some reason the code in the URL wouldn't display...weird.... **
    The NOTIF_ID value is the primary key identifier for each outage notification. Additionally, the NOTIF_SEQ value is the sequence number for each (because each notification could have multiple updates). The INFO_TYPE value just references whether this is 'Initial', 'Updated', or 'Closing' information.
    Any suggestions would be much appreciated.
    Eric
    Edited by: user11685190 on Nov 6, 2009 1:12 PM
    Edited by: user11685190 on Nov 6, 2009 1:13 PM
    Edited by: user11685190 on Nov 6, 2009 1:14 PM

    Hey you guys,
    Thanks for your responses. I actually just started working for this academic institution, and have to finish a probationary period before I have access to their VPN (5 Months). Therefore, I cannot access my workspace, nor will they allow me to export my application because it's considered their intellectual property. I believe it may be the &DEBUG portion of it.
    Though I cannot state the exact URL the error states, I can tell you that if I go into application builder to the page in question and try and run it before the page that links to it, I get the error. However, when I use the link everything works fine. When I use the 'Create New' button to link to the page with no values passed, I get the error again. I work again on Monday and will have more information then.
    Thanks again!
    Eric

Maybe you are looking for