Why my JSP page can't get the value of a hidden field

Hi, I got an interesting question here.
I use req.getParameter() method to get a hidden field in Servlet, it works just fine.
However, when I use the JSP to catch the value of that hidden field, JSP just can't, but if I change the type from hidden to text, it works fine again.
the code is as follows:
there are two jsp pages:game.jsp and GameMonitor.jsp.
In game page:
============================================================
<FORM action=GameMonitor.jsp method=post
webbot-action="--WEBBOT-SELF--">Display the names of all the players currently
connected to the server       <INPUT tabIndex=1 type=submit value=Lookup name=B1>
<INPUT TYPE=hidden,value=1 name=p1>
<P></P></FORM>
===========================================================
I want GameMonitor.jsp to catch the value of hidden field "p1" by calling request.getParameter()
the code catching it in the GameMonitor.jsp is:
============================================================
String option = request.getParameter("p1");
          out.println("option=["+option+"]");
          try{
               if(option.equals("1")){
===========================================================
supurisingly, the result is option=[], which means it didn't catch the value of the p1 submitted by POST method.
Does anybody here can tell what's wrong in the code?

Thank you so much, I also found this error, which makes JSP not able to catch the hidden field, however, if I change it to text type, even the comma exists, it still works. pretty interesting!
>
<INPUT TYPE=hidden,value=1 name=p1>Modify the above lline and write like this....
<INPUT TYPE="hidden" name="p1" value="1">
And ensure that you're submitting the form data.
Though nothing much has been changed, just try whether
these help!!!
fun_one

Similar Messages

  • I need to get the value of a text field that is located in another page JSP

    I need to get the value of a text field that is located in another page JSP. How do I do that?

    Well you see, I have a page at angelfire.com, which
    does not support JSP. I want to call a script located
    at mycgisever and then, when pressing a link on the
    former page, the JSP page is loaded, and the script
    get the value from the text field on the OTHER page.
    Is this possible?I know nothing about cgi. But that should not prevent me from understanding what can and cannot be done, assuming cgi is sort of comparable with jsps.
    I'm unable to understand your description clearly. Try to explain it better. Give precise steps that you intend to follow and I should be able to help you further.
    So you have a page1.
    You hit submit from page1.
    That goes to the cgiserver.
    From the cgiserver, programmatically load up the jsp.
    search this for the text field.
    Display it on your page2.
    Is that what you are trying to do?
    BTW, won't be able to help you with cgi scripting at all. Can help with Java and Jsp.

  • How can I get the value of "Warehose" column in a form

    How can I get the value of "Warehouse" column in the form below (I mean what table that contain this value):
    Production Supervisor >> Batches >> (Button) Material Details >> (Button) Line Allocations
    Well, for more clearly! My problem is I must have the Unit Cost of Items, so I've got it in the cm_cmpt_dtl (table), but if I want to, I must create a relation that require 2 filed, they're Item_ID and Whse_Code.
    There's no problem with Item_ID, but Whse_Code seem to be the Mission Impossible (hix, I hate that film!!!!)
    I wonder if It was right to post this topic here. But anyway I just post my question here, hope I could get some help.

    wow, many, many, many.... and many thanks!
    Just add a tiny modify to check out the Batch_type
    doc_id = (select batch_id from gme_batch_header where batch_no='&batch_number' and batch_type = 0)
    Because the batch_no can be duplicated as we also create Batch and Filrm Planned Order.
    Many thanks for your support!
    P/S: Sorry for my terrible English :P

  • How can we get the value of the key field in a custom data model using governance API?

    Dear Team,
    How can we get the value of the key field in a custom data model, to be used for manipulation of the change request fields using governance API?
    Any kind of help would be sincerely appreciated.
    Thanks & Regards,
    Tushar.

    Hi Michael,
    Thanks for direction. Let me give more context on this as I'm interested to get more details..One of the issue was to read cross entity field values on UI based on user action and set other entity field behaviour...It is similar to what is being posted here.
    For ex: Reading MTART from Basic Data UIBB in MM MDG UI and set the field properties in some other custom entities say ZZETEST. This cannot be done using UI BADI as it only supports single entity at a time and not cross entity. So alternatively we found a solution where we can enhance existing PLMB feederclass cl_mdg_bs_mat_feeder_form by reading the model and the entity as needed as it it proved that it supports cross entity UI field behaviours and so business requirements.
    This is a workaround for now.
    So the question is How do we achive it using governance API for cross entity field behiaviours.?or what is the right way doing this.
    Can we do that using governance API and its' methods?
    In the Governance API doc you provided below has referring to below external model as part of gevernance API.
    The active or inactive data (before or during the derivation or the check) can be read
    with the external data model interface IF_USMD_MODEL_EXT with the method READ_CHAR_VALUE and
    the corresponding READ_MODE parameter. To avoid unnecessary flushes (derivations), the NO_FLUSH
    parameter should b
    e set to ‘X’.
    Thanks
    Praveen

  • How can i get the value stored in the session object using its sessionid

    how can i get the value stored in the session object using its sessionid by running stand alone java application

    myforum wrote:
    how can i get the value stored in the session object using its sessionid by running stand alone java applicationThis does not seem to make sense! You need at least to give a lot more detail of what you are doing.

  • [MDX]can't get the value from two variables (@FromDimTimeFiscalYearMonthWeekLastDateDay &(@ToDimTimeFiscalYearMonthWeekLastDateDay

    can't get the value from two variables when execute MDX : Anyone who can help ?
    ================================
    with member [Measures].[APGC Replied Volume] as
     ([Measures].[Question],[Dim Replied By].[Replied By].&[APGC])
    member [Measures].[APGC Moderated Volume] as
     ([Measures].[DashBoard Thread Number],[Dim Moderated By].[Moderated By].&[APGC])
    member [Measures].[APGC Answered Volume] as
     ([Measures].[Question],[Dim Answered By].[Answered By].&[APGC])
     SELECT
     NON EMPTY
     [Measures].[Forum Thread Number],
     [Measures].[Reply In24 Hour],
     [Measures].[Question],
     [Measures].[Deliverale Minute],
     [Measures].[Working minutes],
     [Measures].[Answered],
     [Measures].[1D Answer],
     [Measures].[2D Answer],
     [Measures].[7D Answer],
     [Measures].[APGC Replied Volume],
     [Measures].[APGC Moderated Volume],
     [Measures].[APGC Answered Volume],
    [Measures].[Avg HTR],
    [Measures].[Avg HTA],
     [Measures].[Total Labor]
     } ON COLUMNS, 
     NON EMPTY { ([Dim Engineer].[SubGroup-Alias].[Alias].ALLMEMBERS ) } DIMENSION PROPERTIES MEMBER_CAPTION, MEMBER_UNIQUE_NAME ON ROWS
    FROM (
     SELECT ( STRTOMEMBER(@FromDimTimeFiscalYearMonthWeekLastDateDay, CONSTRAINED) : STRTOMEMBER(@ToDimTimeFiscalYearMonthWeekLastDateDay,
    CONSTRAINED) ) ON COLUMNS
    FROM [O365]) CELL PROPERTIES VALUE, BACK_COLOR, FORE_COLOR, FORMATTED_VALUE, FORMAT_STRING, FONT_NAME, FONT_SIZE, FONT_FLAGS

    Hi Ada,
    According to your description, you can't get the member when using the strtomember() function in your MDX. Right?
    In Analysis Services, while the member name string provided contains a valid MDX member expression that resolves to a qualified member name, the CONSTRAINED flag requires qualified or unqualified member names in the member name string. Please check if the
    variable is a Multidimensional Expressions (MDX)–formatted string.
    Reference:
    StrToMember (MDX)
    If you have any question, please feel free to ask.
    Simon Hou
    TechNet Community Support

  • How can i get the value of an jcombobox in a japplet into my html/jsp page

    hii
    i hav a japplet which contains an editable jcombobox
    which i have embedded into my jsp page .Now i want to get the value of jcombobox in my japplet into a taxt box in my .jsp page which will change as the value of jcombobox changes .Now in doing this i guess i will have to writer some public event in my japplet which will return the value into my web page .
    Now in doing so my first problem is to refer the japplet from my jsp page .In case of ordinary applets which does nt use swing i hav used id attribute in my applet tag and the document recognize it as its object just like any other html controls.
    but here although my japplet is running after installing plug -in the document is not regognizing the japplet .I hav tried with both <object > and <applet> tag .
    The name attribute in object tag is only changing the name of the class into that name given in the name attribute in the browser .
    I need to solve this out .Any help will be greatly appreciated

    Please help me .Its very urgent

  • How can I get the value for static content of 1 jsp into another jsp

    Hi, I have a jsp which have a header ,now i want this header value in another jsp dynamically.Can u tell me how I can do it?

    What I want to know is that , is it possible to get the value of a static content of one jsp into another jsp,something like getParameter() method that we use to get the value of a field in the jsp to a servlet,or to another jsp,the only difference here is I do not have a field here but a static jsp content .

  • How can i get the value when the field name is user defined

    Hi,
    I have a one java method:
    public ResultSet countUserDb(String id) {
    ResultSet rs = null;
    con = dbcon.connect();
    String queryString = ("select count(*) as count from
    db_allocation where user_id='"+id+"'");
    Statement stmt = con.createStatement();
    rs = stmt.executeQuery(queryString);
    When i call it in a jsp file.
    ResultSet counter =db.countUserDb(request.getParameter("id"));
    if(counter.next())
    int x=rs.getInt("count");
    Tomcat said incorrect column name.How can i get the result set when the field name is user's defined.
    Best regards
    Ricky

    Hi Ricky
    To access pseudo columns you can specify an alias or use the index on the column (e.g. getInt(1)).
    Chris
    NB: you should use bind variables instead of concatenating the id to the SQL statement.

  • How can we get the values from the view?

    Hi All,
    my scenario is i have two fields in my view .one is parameter.and another on is select-options.how can i get the user entered values into my selection screen.?
    for the select options i get the values into field-symbol.for parameter i get the value using get_attribute.
    can i use like this in select statement.
    WHERE SERVICE_ID  = ZSD_DD_AUFNRS
                       AND CRE_DT IN <FS_DATE>.
    Regards,
    Ravi.

    Hi Sravan,
    when i am using the below code to generate self defined functions i m getting a error .
    *Generate an object for self defined functions
      DATA: lo_self_functions TYPE REF TO if_salv_wd_function_settings,
    *Generate an object for button 'Confirm'
           lr_button TYPE REF TO cl_salv_wd_fe_button,
           lo_self_function TYPE REF TO cl_salv_wd_function,
                  l_text type string.
    *Set Self-defined functions
    *'Confirm' Button
      lo_self_functions ?= l_value..
      lo_self_function = lo_self_functions->create_function( 'CONFIRM'  ).
      CREATE OBJECT lr_button.
      CLEAR l_text.
      l_text = 'Confirm'.
      lr_button->set_text( l_text ).
      lr_button->set_image_source( '' ).
      lr_button->set_image_first( 'X' ).
      lo_self_function->set_editor( lr_button ).
    Error when processing your request
    What has happened?
    The URL http://cgslsvr3.cgsl.com:8020/sap/bc/webdynpro/sap/zsdr_cash_work_list/ was not called due to an error.
    Note
    The following error text was processed in the system CGD : WebDynpro Exception: IDs Can Only Contain Characters of Syntactical Character Set
    The error occurred on the application server cgslsvr3_CGD_20 and in the work process 0 .
    The termination type was: RABAX_STATE
    The ABAP call stack was:
    Method: RAISE of program CX_WD_GENERAL=================CP
    Method: CONSTRUCTOR of program CL_WDR_VIEW_ELEMENT===========CP
    Method: CONSTRUCTOR of program CL_WD_TOOLBAR_BUTTON==========CP
    Method: NEW_TOOLBAR_BUTTON of program CL_WD_TOOLBAR_BUTTON==========CP
    Method: IF_SALV_WD_COMP_TABLE_UI~CREATE_TOOLBAR_ITEM of program CL_SALV_WD_C_TABLE_V_TABLE====CP
    Method: IF_SALV_WD_COMP_TABLE_UI~CREATE_TOOLBAR_ITEMS of program CL_SALV_WD_C_TABLE_V_TABLE====CP
    Method: IF_SALV_WD_COMP_TABLE_UI~UPDATE_TOOLBAR_ITEMS of program CL_SALV_WD_C_TABLE_V_TABLE====CP
    Method: IF_SALV_WD_COMP_TABLE_UI~UPDATE_TOOLBAR of program CL_SALV_WD_C_TABLE_V_TABLE====CP
    Method: IF_SALV_WD_COMP_TABLE_UI~UPDATE of program CL_SALV_WD_C_TABLE_V_TABLE====CP
    Method: IF_SALV_WD_VIEW~MODIFY of program CL_SALV_WD_C_TABLE_V_TABLE====CP
    What can I do?
    If the termination type was RABAX_STATE, then you can find more information on the cause of the termination in the system CGD in transaction ST22.
    If the termination type was ABORT_MESSAGE_STATE, then you can find more information on the cause of the termination on the application server cgslsvr3_CGD_20 in transaction SM21.
    If the termination type was ERROR_MESSAGE_STATE, then you can search for more information in the trace file for the work process 0 in transaction ST11 on the application server cgslsvr3_CGD_20 . In some situations, you may also need to analyze the trace files of other work processes.
    If you do not yet have a user ID, contact your system administrator.
    Error code: ICF-IE-http -c: 110 -u: CT-0024 -l: E -s: CGD -i: cgslsvr3_CGD_20 -w: 0 -d: 20080414 -t: 105835 -v: RABAX_STATE -e: UNCAUGHT_EXCEPTION
    HTTP 500 - Internal Server Error
    Your SAP Internet Communication Framework Team
    How can i resolve it?
    Regards,
    Ravi

  • How Can I get the value of a variable name stored in another variable?

    I have a scenario wherein i get a record as %rowtype as input parameter into my function and i generate a dynamic sql to check the validity of a particular value in one of the columns of the input parameter record.
    I have a variable that stores the column name of input parameter record whose value is to be validated.
    The dynamic SQL looks like this:
    'Select empno from emp where empname = input_rec.'||v_colname
    While using Execute Immediate I get the error - Invalid Identifiier -'input_rec'.'ename'
    On Googling I found that the input parameter is out of the scope of the SQL that's being executed in the Execute Immediate.
    Is there any way I can get the value of ('input_rec.'||v_colname) so that I can pass it into the Execute Immediate with 'Using' clause?

    karthyk wrote:
    I have a scenario wherein i get a record as %rowtype as input parameter into my function and i generate a dynamic sql to check the validity of a particular value in one of the columns of the input parameter record.
    I have a variable that stores the column name of input parameter record whose value is to be validated.
    The dynamic SQL looks like this:
    'Select empno from emp where empname = input_rec.'||v_colname
    While using Execute Immediate I get the error - Invalid Identifiier -'input_rec'.'ename'
    On Googling I found that the input parameter is out of the scope of the SQL that's being executed in the Execute Immediate.
    Is there any way I can get the value of ('input_rec.'||v_colname) so that I can pass it into the Execute Immediate with 'Using' clause?compose the SELECT in a single VARCHAR2 variable before passing variable to EXECUTE IMMEDIATE

  • How can I get the value before a checkbox if it's selected

    Please refer the below screenshot. I want to get the values before a checkbox if the checkbox is slected. And I want to add those values. How can I do this?
    So according to the screenshot, I want to take 1500+1500+1000 value. Can I achieve this?
    +100

    Hi phantom,
    Row 1 is a Header Row. Row 10 is a Footer Row.
    Formula in Footer Cell B10
    =SUMIF(C,TRUE,B).
    SUMIF will sum the values in B where there is a tick (TRUE) in C.
    Regards,
    Ian.

  • How can I get the values on Xaxis and Yaxis?

    Hi, I would like to get the values that are on the axis X and Y or to get the base value and the ticks interval for calculating the values.

    You can get the base values and intervals via the following properties:
    XAxis.MajorDivisions.Base
    XAxis.MajorDivisions.Interval
    XAxis.MinorDivisions.Base
    XAxis.MinorDivisions.Interval
    YAxis.MajorDivisions.Base
    YAxis.MajorDivisions.Interval
    YAxis.MinorDivisions.Base
    YAxis.MinorDivisions.Interval
    Note that calculating the values from these properties will only work if the axis AutoSpacing property is false. Otherwise, the ticks and labels are automatically determined by the graph depending on the available space to present something that always looks nice.
    - Elton

  • Can't get the value of publicdelegatesbl in a variable

    Hello,
    When a mailbox is disabled if the user was as a delegate in another mailbox and that the user didn't remove him from his delegate, he'll see a unknown SID in his delegate. In order to prevent this I would like to run a script that will remove delegatebl
    of that the user who would be disabled.
    Servers are on Exchange 2007 SP3 RU6. No powershell V2 is installed... only V1. That's my main problem. I have the Quest cmdlet installed. I can only used them.
    I wrote a script but my problem right now is only to get the value publicdelegatebl in a variable... I have a blank return...
    $QADUser = (Get-QADUser "$User" -IncludedProperties publicdelegates,publicdelegatesbl).publicDelegatesbl
    Write-Host $QADUser
    Any help please?

    Thanks it worked... but now when I am trying to remove the publicdelegatesbl I have a constraint violation error. I understand what you've told me about the fact we cannot clean up the message without using outlook. But is there any other solution except
    Outlook? I meant even with the EWS it's not possible? 
    Currently I have to be able to remove the delegate added by outlook and by scritpt...
    $resFile="C:\Scripts\leavers.txt"
    $allLeavers = Get-Content $resFile
    ForEach($leaver in $allLeavers) {
    $valeurs = $leaver.split(";")
    $aliasTH = $valeurs[0]
    $smtpTH = $valeurs[1]
    $User = Get-Mailbox | Where-Object { $_.Alias -match $aliasTH -and $_.EmailAddresses.ToStringArray() -match $smtpTH }
    $userCN = $User.DistinguishedName
    $Error.Clear()
    $userPath = "LDAP://$userCN"
    $user=[adsi]$userPath
    $publicDelegates = $user.properties.publicDelegates
    $publicDelegatesbl = $user.properties.publicDelegatesbl
    Write-Host "$publicDelegates,$publicDelegatesbl"
    $publicDelegatesbl.Remove("$userCN")
    $user.CommitChanges()

  • Can I get the value of DisplayObject?

    Hi Friends,
    I am using a VBox. In my VBox, there are some componetns like
    TextInput, ComboBox, etc. Now I don't know how many children it
    has.
    I need to get the values of these components. But the
    getChildren() method of VBox returns DisplayObject. How can i use
    text, selectedItem properties from this display object.
    Thanks in advance...

    If I understand your question correctly, the fact that you
    are using a vbox does not inhibit you from references your controls
    directly.
    ie;
    textboxname.text
    cobmoboxname.selectedLabel
    etc...

Maybe you are looking for

  • Wi-Fi Proxy settings work in Safari, but not recognised by other apps?

    Hi all, At home, my iPod Touch (gen two, Firmware 2.2.1) connects fine to our wireless router and all applications (e.g. Safari, Tap Tap Revenge 2 etc) can access the internet. We have no proxy setting at home.. Then, at uni we use special "manual ht

  • IPhoto book: Can I use less than 20 pages? and other questions...

    Is 20 pages the minimum? I have just eleven photos. Is there a workaround for this? Also, the iPhoto preview looks fine, but I'm wondering what the file specs need to be. My original files are approx. 15 MB TIFF. Should they be jpeg? Resized? Does iP

  • Wlan and ACS

    I need create in our campus network wlan network using cisco AP 350 i need authenticate all our users on aur ACS server. Is it possible??? Do you have experience with this????

  • SAP PLM change management

    Hello All, Have two questions to understand latest trends in PLM. 1. What is the recommended tool we need to use for Engineering change management as per latest trends in PLM.  Is ECR/ECO CC31/CC32 still considered part of best practice or has been O

  • Adobe Photoshop Elements 12 Download page

    I'm trying to download my program into my Mac without a CD.  I've tried the download page for Elements 12, but it shows an empty page saying "413 The header is too large to fit."