Forms with JSP

I want to use the return values of an HTML form with a post method to a .jsp file:
<input type="text" name="xxx">...
In my .jsp that submit the information, how could i define the requested parameters from the form and how could i manage to use them to insert or compare the informations to the database ??
Maybe they are special classes ?
Thanks for all the help you could bring me.
NICO

Nico,
I would also recommend posting this to the JSP discussion forum since it is a 'generic' JSP question.
WEbsites to try for more JSP info include:
http://htmlguru.com http://www.insidedhtml.com
Good luck.
Laura

Similar Messages

  • How to create a form with jsp

    I want to create an HTML form using jsp.
    It has a couple of selection boxes. The options for the selection box needs to be read from a file.
    As I understand it can create the form in HTML. And somhow uses jsp to read a file on the server get, the data and create selection box. I can have a class on the server side that does the actual read - forexample
    SelData.class.
    Would appreciate it if some one can outline how this is done.
    - thanks

    * Pass the data used to populate the select options to the JSP page in the form of a bean.
    * In the JSP page, iterate through the bean, using the data to "fill in" the attributes and body of the option tag.
    This tutorial should help a great deal with these concepts: http://java.sun.com/webservices/docs/1.1/tutorial/doc/JSPIntro.html#wp69778

  • Conflict sending booking form with jsp and fmt:message key=

    I have developed my new web page using jsp and together with this i am using jBoss 4.0.5.GA!
    The web page has 6 different languages so i have used the <fmt:message key=" " /> tag system for each language.
    On the web page there are a booking form who has two pages, bookings.jsp and booking_sent.jsp.
    The problem i have is when i send the form it opens a page where you only see all the tags, no text at all. For more information follow this link and try out the form; http://www.neptunediving.com/neptune/general/bookings.jsp/
    bookings.jsp and booking_sent.jsp looks exactly the same, except the header text. There most be some sort of conflict here, either with the <fmt:message key=" " /> tag system or maybe with the String message i use to retrieve the information from the form. Both <fmt:message key=" " /> tag system and the String message use the word message so i have tried to change the String message to String msg instead but i still get the same result.
    I have tried everything but i cannot solve this problem. So i wonder if there is anybody out there who can help me with this?

    Nope, can't delete posts on this forum,
    I have developed my new web page using jsp. I have done a booking form,
    There are two pages, bookings.jsp and booking_sent.jsp.
    The page has 6 different languages so i have also used the <fmt:message key=" " /> tag system for each language.
    The problem i have is when i send the form it opens a page where you only see all the tags, no text at all.
    For more information follow this link and try out the form; http://www.neptunediving.com/neptune/general/bookings.jsp/
    When you fill out the form and click send you should come to booking_sent and you do but the page is only full of tags, no text. Booking_sent looks exactly the same as bookings, except the header so why should not this work. I have tried everything but i cannot solve this problem. So i wonder if there is anybody out there who can help me with this?
    Tried going to that URL and got an error page served by Apache Webserver
    Maybe you haven't got the correct connector going between the webserver and the application server?

  • Handling multiple submits in single form with JSP

    HI,
    I need to handle multiple submits in single form in a JSP.
    <html>
    <body>
    <form action="/Compute" method="post">
    <input type = "Submit" value="Find"/>
    <input type = "Submit" value="Add"/>
    <input type = "Submit" value="Delete"/>
    </form>
    <body>
    <html>
    /Compute wld take the control to a servlet named ComputeController.java .
    In this servlet how should I distinguish which Submit has been clicked(Find or add or Delete).
    TIA

    Give the submit button a name. It will be sent as well, so you can see it in the request variables.

  • Submitting a form with an anchor tag

    How could I do this? I'm using a self submitting html form with JSP. I want an anchor tag to send some parameters to update the content of the page.

    Hi,
    You can use query string to pass the parameter values to the page.
    Ex:
    firstname and secondname are the two parameter values which you can pass it to the page.
    <ahref=http://website2.com/action?val1=' firstname' & val2='secondname'> Page2</a>
    if you click on the 'Page2' then those values are pass to the corresponding page
    Regards
    Reegan

  • CMSDK jsps hang on forms with large content

    Hi
    I am running Apache Oracle http server 1.3.22 for CMSDK in Oracle 9i and I have written several jsps for batch file uploading where metadata for the files are automatically added to the files.
    However, I have a problem: the size of the information sent in a form with the POST procedure can sometimes be quite large: long description fields together with a long list of pathnames of files. The POST event sends of this information to another jsp where file uploading is done.
    The problem is that when the description and/or the list of pathnames long, the jsp window just hangs (there isn't even an hourglass to tell the user it is busy processing).
    I have independently tested uploading very large files not using the browser to my Oracle CMSDK area and there seems to be no limit to that.
    I suspect the problem is with the size of the strings that are posted to the next jsp, before the upload is done.
    I know this sounds like a question about <FORM> tags but I am working within the CMSDK environment and I think it is a CMSDK environment limitation.
    Is there a limit to the size of the information that can be sent via a POST event in the CMSDK environment?
    I have tried manually setting the contentlength with the build-in http response/request functions i.e.
    response.setContentLength(5000);
    But this does not help at all - and if you check the contentlength with
    int contentlength = request.getContentLength()
    the size of the content is automatically adjusted for the amount of information in the page. However, over contentlength around 1500 the page always just hangs forever.
    Is there a place in CMSDK where this can be changed?
    I increased the size of the buffers from 2048 to four times that in Server Properties under OC4J in the web-based Enterprise manager interface. However that makes no difference.
    Any help or information will be greatly appreciated.
    Thanks
    Hugo

    that's a problem for support.
    I hope you know, that support has ended years ago and only the extended support is available for the next 10 months...

  • Hide Ajax enabled portlet with jsp form  loading

    Hi All,
    I seriously struck with this problem and any help is appreciated.
    Functionality:-
    I have 2 portlet in a page portletA(non ajax) and PortalB(ajax enabled and it will just handle the portletA events). For checkbox event on portletA i am submitting PortletB JSP Form through PortletA JavaScript.
    PortletB jsp Form consists of only hidden variables, which will be set by PortletA JavaScript. All this is working fine.
    Problem:-
    My problem is I have to hide PortletB.For this i am using BackingFile preRender method. If I hide portletB then JSP Form is not loading and from PortletA iam unable to get the Form object of portletB to submit.
    Even setVisible is not working.
    Here is my PortletB jsp Form
    <netui:form tagId="ajaxEnabledForm" action="deleteRSAandCMFProfile">
    <netui:hidden dataSource="actionForm.userName" tagId="userName"></netui:hidden>
    </netui:form>
    How to make PortletB invisible with jsp form loading?
    Thanks in advance.

    hi, i don't have the exact solution to your problem, but can suggest you work around.
    in portlet b jsp, add <div> tag at the top, and use its style properties to hidden/visible as per your need. from the backing file you can set a request attribute which determines the hiding and showing in the div tag.
    you may not be able to control the visibility of title bar. for this, there are two options.
    1. you can try to use portlet backing context tile bar and hide title bar from backing file.
    2. if this does not work, then define id attribute to div tag in title bar skeleton jsp, and access that div by using id from the portlet jsp and then hide that div tag.
    thanks
    sampath

  • Invoke-WebRequest with JSP forms

    Hi everyone,
    I am a newbie with PowerShell struggling to write a script that posts information to a JSP Web application.
    My script should be divided in two parts : 
    ########### The first should authenticate to the admin page (the form bellow)
    <form name="loginoath" id="loginoath" action="../servlet/UserRequestServlet" method="post" autocomplete="off">
    <input type="hidden" name="action"
        value="auth">
    <input type="hidden" name="authtype" id="authtype"
        value="oath">
    <input type="hidden" name="authformat"
        value="pwd">
    <input type="hidden" name="opensess"
        value="true">
    <input type="hidden" name="version"
        value="3.0">
    <input type="hidden" name="forwardtype"
        value="relativeurl">
    <input type="hidden" name="successurl" value="/adminportal/index.jsp">
    <input type="hidden" name="errorurl" value="/adminportal/login_oath.jsp">
        <tr valign="middle" class="display_row" id='authoption'>
            <td class="form_label">
                <span class="help_spot" onMouseOver="loadHelp('Select\x20\x3Cb\x3EPassword\x3C\x2Fb\x3E\x20to\x20log\x20in\x20with\x20your\x20user\x20ID\x20and\x20password\x20only.\x3Cbr\x3E\x3Cbr\x3ESelect\x20\x3Cb\x3EOTP\x3C\x2Fb\x3E\x20to\x20log\x20in\x20with\x20your\x20user\x20ID,\x20password,\x20and\x20a\x20one\x2Dtime\x20password\x20\x28OTP\x29\x20generated\x20from\x20your\x20device.')">
                    Authenticate by:
                </span>
            </td>
            <td class="form_field_cell">
                <input type="radio" name="authByOTP" id="authByOTP" value="yes" checked onclick="onChangeAuth()"> OTP&nbsp;
                <input type="radio" name="authByOTP" id="authByOTP" value="no"  onclick="onChangeAuth()" > Password&nbsp;
            </td>
        </tr>
        <tr valign="middle">
            <td class="form_label">
            <span class="help_spot" onMouseOver="loadHelp('Enter\x20the\x20user\x20ID\x20that\x20you\x20want\x20to\x20log\x20in\x20with.\x3Cbr\x3E\x3Cbr\x3EThe\x20user\x20ID\x20is\x20a\x20unique\x20alphanumeric\x20string\x20that\x20identifies\x20a\x20user.\x20It\x20is\x20assigned\x20when\x20the\x20user\x20record\x20is\x20created.')">
            User ID:</span>
            </td>
            <td>
                <input type="text" name="j_username" id="j_username" size="20" maxlength="50" tabindex="1" class="form_field">
            </td>
        </tr>
        <tr valign="middle">
            <td class="form_label">
            <span class="help_spot" onMouseOver="loadHelp('Enter\x20the\x20password\x20for\x20your\x20login\x20user\x20ID.\x3Cbr\x3E\x3Cbr\x3EThe\x20password\x20is\x20a\x20private\x20character\x20string\x20that\x20verifies\x20the\x20user\x20ID.\x20After\x20login,\x20this\x20password\x20can\x20be\x20changed.')">
            Password:</span>
            </td>
            <td>
                <input type="password" name="j_pin" id="j_pin" size="20" maxlength="50" tabindex="2" class="form_field">
            </td>
        </tr>
        <tr valign="middle" id="otp_section">
            <td class="form_label">
            <span class="help_spot" onMouseOver="loadHelp('Generate\x20a\x20one\x2Dtime\x20password\x20\x28OTP\x29\x20with\x20the\x20device\x20you\x20are\x20using\x20for\x20login,\x20and\x20enter\x20the\x20value\x20in\x20the\x20field.\x20Connected\x20devices\x20generate\x20and\x20enter\x20the\x20OTP\x20value\x20automatically\x20when\x20you\x20click\x20\x3Cb\x3EGet\x20OTP\x3C\x2Fb\x3E.\x3Cbr\x3E\x3Cbr\x3EConsult\x20your\x20device\x20documentation\x20for\x20instructions\x20on\x20how\x20to\x20generate\x20an\x20OTP.')">
            OTP:</span>
            </td>
            <td>
                <input type="text" name="j_password" id="j_password" size="20" maxlength="50" tabindex="3" class="form_field">
                <a href="javascript:gemalto.otpplugin.getOTPsAndPANForCustomButton();" class="form_button" onMouseOver="loadHelp('Click\x20this\x20button\x20to\x20generate\x20and\x20enter\x20the\x20one\x2Dtime\x20password\x20\x28OTP\x29\x20value\x20automatically\x20with\x20your\x20connected\x20device.\x3Cbr\x3E\x3Cbr\x3EBe\x20sure\x20that\x20your\x20device\x20is\x20plugged\x20in\x20and\x20connected\x20to\x20your\x20computer\x20before\x20trying\x20to\x20generate\x20the\x20OTP.')"/>Get
    OTP</a>
            </td>
        </tr>
        <tr>
            <td colspan="2">
                <div class="form_separator"><img src="../img/spacer.gif"
                width="1" height="1"></div>
            </td>
        </tr>
        <tr valign="middle">
            <td colspan="2" align="center">
            <input type="submit" tabindex="4" id="login_button" name="submit" value="LOGIN" class="form_button" onMouseOver="loadHelp('When\x20you\x20have\x20entered\x20information\x20in\x20all\x20fields,\x20click\x20this\x20button\x20to\x20authenticate\x20your\x20user\x20ID\x20and\x20log\x20in\x20to\x20the\x20Customer\x20Care\x20Portal.')"
    onClick="return checkFields();">
            </td>
        </tr>
      </form>
    ########### The second should fill the form with new information and validate them (the form bellow)
    <form name="userform" action="user_migrate.jsp" method="POST" autocomplete="off">
        <tr>
            <td colspan="2" class="form_text" align="left">
                Fields marked with an asterisk <font color='red'><big>*</big></font> are required.
            </td>
        </tr>
        <tr valign="middle">
            <td class="form_label"><font color="red"><big>*</big></font>
            <span class="help_spot" onMouseOver="loadHelp('User\x20ID\x20field.\x20The\x20User\x20ID\x20is\x20a\x20unique\x20alphanumeric\x20string\x20chosen\x20to\x20identify\x20a\x20user.')">
            User ID:</span>
            </td>
            <td>
                <input type="text" name="userid" value="" size="26" class="form_field">
            </td>
        </tr>
           <tr id="pwdguideline">
                <td class="form_label"> &nbsp;</td>
            <td class="form_text" align="left">
                A valid password is case-sensitive and must: <br>&nbsp;-&nbsp; consists of 6 characters or more<br>&nbsp;-&nbsp; include at least 1 alphabetic character<br>&nbsp;-&nbsp;
    include at least 1 numeric character<br>&nbsp;-&nbsp; not include white space<br>
            </td>
        </tr>
            <input type="hidden" name="password" value=""/>
        <tr>
            <td class="form_label"><font color="red"><big>*</big></font>
            <span class="help_spot" onMouseOver="loadHelp('First\x20security\x20answer\x20field.\x20The\x20security\x20answers\x20are\x20answers\x20to\x20personal\x20questions\x20used\x20to\x20validate\x20a\x20user\x5C\x27s\x20identity\x20in\x20case\x20the\x20user\x20loses\x20his\x20or\x20her\x20password.')">
            What is your mother's maiden name?:</span>
            </td>
             <td>
                <input type="text" name="answer1" value="" size="26" class="form_field">
            </td>        
        </tr>
        <tr>
        <td class="form_label"><font color="red"><big>*</big></font>
            <span class="help_spot" onMouseOver="loadHelp('Second\x20security\x20answer\x20field.\x20The\x20security\x20answers\x20are\x20answers\x20to\x20personal\x20questions\x20used\x20to\x20validate\x20a\x20user\x5C\x27s\x20identity\x20in\x20case\x20the\x20user\x20loses\x20his\x20or\x20her\x20password.')">
            What is your date of birth?:<br>(yyyy-mm-dd)</span>
            </td>
             <td>
                <input type="text" name="answer2" value="" size="26" class="form_field">
            </td>  
        </tr>   
        <tr>
        <td class="form_label"><font color="red"><big>*</big></font>
            <span class="help_spot" onMouseOver="loadHelp('Role\x20field.\x20Refers\x20to\x20the\x20role\x20associated\x20with\x20the\x20user.\x20A\x20role\x20is\x20identified\x20by\x20its\x20unique\x20role\x20name\x20and\x20defines\x20what\x20functions\x20are\x20available\x20to\x20its\x20associated\x20users.')">
            Role:</span>
            </td>
              <td class="form_text">
                <select name="rolename" class="form_select" single>
                   <option value="Admin" >Admin</option>
                   <option value="Agent" >Agent</option>
                   <option value="Default" selected>Default</option>
                   <option value="Support" >Support</option>
                 </select>
                </td>
             </tr>
        <tr>
            <td class="form_label">
            <span class="help_spot"
                  onMouseOver="loadHelp('Sends\x20the\x20user\x20an\x20email\x20with\x20a\x20link\x20to\x20download\x20the\x20selected\x20application.\x20Email\x20must\x20be\x20filled\x20and\x20a\x20separate\x20mail\x20will\x20be\x20sent\x20per\x20application\x20selected.')">
            Initiate Token registration:</span>
            </td>
            <td class="form_field_cell">
                &nbsp;&nbsp;
                <input type="checkbox" name="initMobileapptokenReg" value="true" class="form_field_cell" >
                IDProve 300 Mobile
                &nbsp;&nbsp;
            </td>
        </tr>
        <tr>
            <td colspan="2">
                <div class="form_separator"><img src="../img/spacer.gif"
                width="1" height="1"></div>
            </td>
        </tr>
        <tr valign="middle">
            <td colspan="2" align="center">
            <input type="submit" name="submituserform" value="MIGRATE" class="form_button" onMouseOver="loadHelp('Create\x20a\x20new\x20record.')" onClick="return validateForm()"
    >
            <input type="Reset" name="resetuserform" value="START OVER" class="form_button" onMouseOver="loadHelp('Reset\x20the\x20form.')">   
            </td>
        </tr>
        <input type="hidden" name="posting" value="true">
    </form>
    ############ Here is my Powershell Script
    [System.Net.ServicePointManager]::CheckCertificateRevocationList = $false;
    [System.Net.ServicePointManager]::ServerCertificateValidationCallback = { $true; };
    Add-Type @"
      using System.Net;
      using System.Security.Cryptography.X509Certificates;
      public class TrustAllCertsPolicy : ICertificatePolicy {
         public bool CheckValidationResult(
          ServicePoint srvPoint, X509Certificate certificate,
          WebRequest request, int certificateProblem) {
          return true;
    [System.Net.ServicePointManager]::CertificatePolicy = New-Object TrustAllCertsPolicy
    [System.Net.ServicePointManager]::CheckCertificateRevocationList = $false;
    [System.Net.ServicePointManager]::ServerCertificateValidationCallback = { $true; };
    # Authentication
    $url1 = 'https://localhost/login.jsp'
    $param1 = @{ authByOTP='no'; j_username='test'; j_pin='test' }
    Invoke-WebRequest -Uri $url1 -SessionVariable CurrentSession -Method Post -Body $param1 -ContentType "text/xml"
    # Registration
    $AccountName ="test2"
    $Reponse1 ="replyOne"
    $Reponse2 = "replyTwo"
    $Role ="Default"
    $IDProve ="False"
    $Post = "MIGRATE"
    $url2 = 'https://localhost/registration.jsp'
    $parametre2 = @{ userid=$AccountName; answer1=$Reponse1; answer2=$Reponse2; rolename=$Role;               'initMobileapptokenReg'=$IDProve; submituserform=$Post; }
    Invoke-WebRequest -Uri $url2 -SessionVariable CurrentSession -Method Post -Body $parametre2 -ContentType "text/xml"
    When I run it, I get this status
    StatusCode        : 200
    StatusDescription : OK
    Content           :
    But nothing happens when I check the result.
    I will be grateful if someone can help. Thanks in advance.
    Regards,
    Louban.

    Hi Louban,
    To run the cmdlet "Invoke-WebRequest" with .jsp file, the script is for your reference:
    # variables for the script
    $YellowLevel = 14
    $RedLevel = 7
    $SleepHours = 1
    # change window title
    $Host.UI.RawUI.WindowTitle = "QAS DB Expiry Checker"
    # loop indefinitely
    while($true){
    #get web page
    $Page = (Invoke-WebRequest "http://qaswebserver.rcmtech.co.uk:8080/proweb/test.jsp").Content # look for text on web page using regular expression
    if($Page -match "[0-9]+ days"){
    # get matching text string from full web page text
    $FullText = (Select-String -InputObject $Page -Pattern "[0-9]+ days").Matches.Value
    Write-Host (get-date),"QAS remaining: $FullText - " -NoNewline
    # get just the number of days
    $DaysString = (Select-String -InputObject $FullText -Pattern "[0-9]+").Matches.Value
    # convert number of days to integer to allow numeric matching operations, e.g. "greater than"
    $DaysInteger = [convert]::ToInt16($DaysString)
    # interrogate the number of days and set status based on what its value is
    switch($DaysInteger){
    {$_ -gt $YellowLevel} {
    Write-Host "Green" -ForegroundColor Green
    {($_ -le $YellowLevel) -and ($_ -gt $RedLevel)} {
    Write-Host "Yellow" -ForegroundColor Yellow
    {$_ -le $RedLevel} {
    Write-Host "Red" -ForegroundColor Red
    } else {
    # page did not contain expected text
    Write-Host "Error with page" -ForegroundColor Yellow
    # wait for specified time
    Start-Sleep -Seconds ($SleepHours * 60 * 60)
    Refer to:
    PowerShell: QuickAddress Pro data expiry checker
    If there is anything else regarding this matter, please feel free to post back.
    Best Regards,
    Anna Wang

  • JSP FORMS WITH MULTIPLE INPUT ROWS

    HI,
    I NEED USE A FORM IN JSP WITH MULTIPLE INPUT ROWS TO IMPLEMENT A SALES ITEM PROGRAM.
    I HAVE TRIED WITH INSTRUCTIONS -- WHILE AND DO.. WHILE -- BUT TOMCAT 4.0 DOES NOT PROCESS THEM CORRECTLY BECAUSE IS IN A DEAD LOCK.
    ANY BODY CAN HELP ME?

    Thank you. But i don?t use caps lock. My program look like this:
    <form method="pos" action="echo.jsp">
    <table align="center" cellpadding="0" cellspacing="0" border="1" width="100%" bgcolor="#ffffff">
    <tr>
    <th class="titulo3">C?digo</th>
    <th class="titulo3">Descripci?n</th>
    <th class="titulo3">Nivel seguridad</th>
    <th class="titulo3">Moldes</th>
    <th class="titulo3">j</th>
    </tr>
    <%
    do {                    
    %>                                   
    <tr>
    <td class="titulo3">
    <input name="codigo" type="text" size="10" maxlength="10">               
    </td>
    <td class="titulo3">
    <input name="nombre" type="text" size="30" maxlength="100">               
    </td>          
    <td class="titulo3">
    <SELECT NAME="codopc" >                         
         <OPTION VALUE="nivel1"> Nivel 1                
         <OPTION VALUE="nivel2"> Nivel 2      
         <OPTION VALUE="nivel3"> Nivel 3
         <OPTION VALUE="nivel4"> Nivel 4
         <OPTION VALUE="nivel5"> Nivel 5           
    </SELECT>                                    
    </td>     
    <td class="titulo3">
    <input name="moldes" type="checkbox" size="30" maxlength="20">          
    </td>     
    <td class="titulo3">
    <input name="moldes" type="text" size="10" maxlength="20" value="<%= j %>">     
    </td>                                   
    </tr>               
    <%
    } while ( newlines );
    %>                                        
    </table>
    ....... more code about submit and clear buttons...
    </form>

  • How to submit a form with checkboxes in a page flow?

    I'm having some trouble with a form that contains several checkboxes, and
    how to submit this form within a page flow...
    I have a JSP page containing a form with N checkboxes. The value and
    checked/unchecked status of each checkbox is generated from parsing an XML
    document. Here is the (simplified) code:
    <%@ taglib uri="http://java.sun.com/jstl/xml" prefix="x" %>
    <netui:form action="doUpdate">
    <x:forEach select="...">
    <input type="checkbox" name="id"
    <x:if ...>checked</x:if> value="<x:out ... />">
    </x:forEach>
    <netui:anchor formSubmit="true" action="doUpdate">Submit</netui:anchor>
    <netui:anchor action="doCancel">Cancel</netui:anchor>
    </netui:form>
    When this form is submitted, the checkbox values are lost -- the following
    code (in the action) produces an empty array:
    String[] prefs = this.getRequest().getParameterValues("id");
    I looked at the <netui:checkbox> tag, but it does not appear to give me a
    way to set the state and value (unless I've missed something).
    Can I submit a form without using a form bean? If I do use a form bean, can
    I set the state and value from my JSP?
    Any suggestions on how to do this (or insights into what I'm doing wrong)
    are welcome...
    -- Craig

    I am new to this, but I think this may solve your problem:
    I am not sure if this is what you are looking for, but you can create a LinkedHashMap
    with the req key/value pairs in the page-calling action in the pageflow and then
    pass that via a getRequest().setAttribute("myCheckboxes",myCheckboxHashMap);
    You can then access it in code using the optionsDataSource portion of the netui:checkBoxGroup
    - ie
    <netui:checkBoxGroup dataSource="{actionForm.thisCheckbox}" optionsDataSource="{request.myCheckboxes}">
    Hope this helps!
    m
    "Craig Coffin" <craig+1268fbec@nfld-dot-com> wrote:
    I'm having some trouble with a form that contains several checkboxes,
    and
    how to submit this form within a page flow...
    I have a JSP page containing a form with N checkboxes. The value and
    checked/unchecked status of each checkbox is generated from parsing an
    XML
    document. Here is the (simplified) code:
    <%@ taglib uri="http://java.sun.com/jstl/xml" prefix="x" %>
    <netui:form action="doUpdate">
    <x:forEach select="...">
    <input type="checkbox" name="id"
    <x:if ...>checked</x:if> value="<x:out ... />">
    </x:forEach>
    <netui:anchor formSubmit="true" action="doUpdate">Submit</netui:anchor>
    <netui:anchor action="doCancel">Cancel</netui:anchor>
    </netui:form>
    When this form is submitted, the checkbox values are lost -- the following
    code (in the action) produces an empty array:
    String[] prefs = this.getRequest().getParameterValues("id");
    I looked at the <netui:checkbox> tag, but it does not appear to give
    me a
    way to set the state and value (unless I've missed something).
    Can I submit a form without using a form bean? If I do use a form bean,
    can
    I set the state and value from my JSP?
    Any suggestions on how to do this (or insights into what I'm doing wrong)
    are welcome...
    -- Craig

  • A problem in RMI with JSP..pls help

    RMI with Java is working fine,but...
    1. I am facing a problem when i use RMI with JSP..its throwing an exception during "Naming.lookup"..here is my code snippet:
    // i have stored the ServerInf and other classes in a package and i have imported it in the jsp code....object ref is getting created but lookup is throwing an exception...thoguh RMI registry is working(started)
    <%
    try {
    ServerInf ref = (ServerInf)Naming.lookup("rmi://localhost:1098/Server_bind");
    catch (Exception ex) {
    ex.printStackTrace();
    %>
    Pls tel me the cause.
    2. If i try to use RMI with Servlet and JSP, then wen the JSP runs then, it simply calls the servlet file and displayes a lonk to it instead of executing the servlet class. pls help me with this too...below is the invoking statement:
    <form method=post action='http://localhost:8080/servlet/MyRMIservlet'>
    hello <input type=submit value=submit>

    And the exception and error message is.....

  • Two select box in a form in JSP...Save me...Please

    Hi,
    My jsp page has one form with two different select/option. One select is fbox and another is tbox. tbox contains master values from db and fbox contanis some/few/no values from db.(It might be empty.) Now, I want to add a value from tbox to fbox. If that value is already in fbox then ALERT otherwise add in that value in fbox. Following is the code for that.
    Would somebody help me out ? I don't know what's wrong with this code. It's not working............It's kind of serious and urgent.
    function add(fbox,tbox) {
    var i = 0;
    if(fbox.value != "") {
    var no = new Option();
    for(var i=0; i < tbox.options.length; i++)
    if((fbox.value == tbox.options.value) || (fbox.value == tbox.options[i].text))
    alert("Value is already added. Select another item.");
    break;
    else
    no.value = fbox.value;
    no.text = fbox.value;
    tbox.options[tbox.options.length] = no;
    fbox.value = "";
    else
    alert("Please enter an item.");

    Hi Srinath or anybody,
    Would u pl. tell me what's wrong with following code ? Javascript prompt is not invoking....U can see/find javascript function addservice(service) in my code which is called by JSP code inside in my form...
    I am using Tomcat 3.3, Jdeveloper 3.2, IE 6.0 and Netscape 7.0.
    I am badly working on this but Javascript prompt is not working....
    Thanks for ur time and help...
    Waiting for ur reply.
    David
    <%@ page contentType="text/html;charset=WINDOWS-1252"%>
    <%@page language= "java" import= "java.sql.*,sun.jdbc.rowset.*,javax.servlet.http.*,java.lang.reflect.*,java.io.*,java.util.*,javax.servlet.*"
    errorPage="error.jsp" %>
    <jsp:useBean id="conn" class="package1.connectionBean" scope="session"/>
    <HEAD>
    <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=WINDOWS-1252">
    <META NAME="GENERATOR" CONTENT="Oracle JDeveloper">
    </HEAD><center>
    <BODY>
    <script language="javascript" SRC="FormChek.js"></script>
    <script language="javascript">
    function CheckFstock(ftock) {
    var Gooddigit = "0123456789";
         if (document.formtest.ftock.value.length > 3 )
              alert('Invalid Stock ! Please re-enter with less than equal to 3 digits.');
              return false;
         }// if ends
    function CheckPostal(postal) {
         var valid = 1;
         var GoodChars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
         var Gooddigit = "0123456789";
         var Goodextrs = "- ";
         var i = 0;
         if (document.formtest.postal.value == "")
              // Return false if number is empty or length is not 7 length is not 6
              alert('Invalid Postal Code ! Please re-enter now.');
              valid = 0;
    document.formtest.postal.focus();
              return false;
         }//if ends
         else if(document.formtest.postal.value.length == 7)
              //alert (GoodChars.indexOf(document.formtest.postal.value.charAt(0)));
              for (i =0; i <= document.formtest.postal.value.length; i++)
                   //alert( i + "->"+ document.formtest.postal.value.charAt(0))
                   if ((GoodChars.indexOf(document.formtest.postal.value.charAt(0)) == -1) || (GoodChars.indexOf(document.formtest.postal.value.charAt(2)) == -1) || (GoodChars.indexOf(document.formtest.postal.value.charAt(5)) == -1))
                        alert("Not Valid Chacters in entered Postal Code! Please re-enter now.");
                        valid = 0;
    document.formtest.postal.focus();
                        return false;
                   } // if ends
                   if ((Gooddigit.indexOf(document.formtest.postal.value.charAt(1)) == -1) || (Gooddigit.indexOf(document.formtest.postal.value.charAt(4)) == -1) || (Gooddigit.indexOf(document.formtest.postal.value.charAt(6)) == -1))
                        alert("Not Valid digits in entered Postal Code! Please re-enter now.");
                        valid = 0;
    document.formtest.postal.focus();
                        return false;
                   } // if ends
                   if (Goodextrs.indexOf(document.formtest.postal.value.charAt(3)) == -1)
                        alert("Not Valid extras in entered Postal Code! Please re-enter now.");
                        valid = 0;
    document.formtest.postal.focus();
                        return false;
                   } // if ends
              } // for ends
         }// else if ends
         else if(document.formtest.postal.value.length == 6)
              for (i =0; i <= document.formtest.postal.value.length; i++)
                   if ((GoodChars.indexOf(document.formtest.postal.value.charAt(0)) == -1) || (GoodChars.indexOf(document.formtest.postal.value.charAt(2)) == -1) || (GoodChars.indexOf(document.formtest.postal.value.charAt(4)) == -1))
                        alert("Not Valid Chacters in entered Postal Code! Please re-enter now.");
                        valid = 0;
    document.formtest.postal.focus();
                        return false;
                   } // if ends
                   if ((Gooddigit.indexOf(document.formtest.postal.value.charAt(1)) == -1) && (Gooddigit.indexOf(document.formtest.postal.value.charAt(3)) == -1) && (Gooddigit.indexOf(document.formtest.postal.value.charAt(5)) == -1))
                        alert("Not Valid digits in entered Postal Code! Please re-enter now.");
                        valid = 0;
    document.formtest.postal.focus();
                        return false;
                   } // if ends
              } // for ends
         }// else if ends
         else { alert('Postalcode is not 7 or 6 charactres long ! Please  re-enter now.');
    document.formtest.postal.focus();
    }//else ends
         return valid
    }//this function ends
    function goback() {
    history.go(-1);
    function addItem(fbox,tbox)
    var boxLength = tbox.length;
    var selectedItem = document.formtest.list1.selectedIndex;
    var selectedText = fbox.options[selectedItem].text;
    var selectedValue =fbox.options[selectedItem].value;
    var j;
    var isNew = true;
    //alert('BOx Length is : ' + boxLength);
    if (boxLength != 0)
    for (j = 0; j < boxLength; j++)
    thisitem = tbox.options[j].text;
    if (thisitem == selectedText)
    isNew = false;
    alert("Selected value is already available. Please select a different item");
    break;
    if (isNew)
    newoption = new Option(selectedText, selectedValue, false, false);
    tbox.options[boxLength] = newoption;
    fbox.selectedIndex=-1;
    function remove(box) {
    if (confirm("Are you sure you want to delete. Continue?")) {
    for(var i=0; i<box.options.length; i++) {
    if(box.options.selected && box.options[i] != "") {
    box.options[i].value = "";
    box.options[i].text = "";
    BumpUp(box);
    function BumpUp(abox) {
    for(var i = 0; i < abox.options.length; i++) {
    if(abox.options[i].value == "") {
    for(var j = i; j < abox.options.length - 1; j++) {
    abox.options[j].value = abox.options[j + 1].value;
    abox.options[j].text = abox.options[j + 1].text;
    var ln = i;
    break;
    if(ln < abox.options.length) {
    abox.options.length -= 1;
    BumpUp(abox);
    function Moveup(dbox) {
    for(var i = 0; i < dbox.options.length; i++) {
    if (dbox.options[i].selected && dbox.options[i] != "" && dbox.options[i] != dbox.options[0]) {
    var tmpval = dbox.options[i].value;
    var tmpval2 = dbox.options[i].text;
    dbox.options[i].value = dbox.options[i - 1].value;
    dbox.options[i].text = dbox.options[i - 1].text
    dbox.options[i-1].value = tmpval;
    dbox.options[i-1].text = tmpval2;
    function Movedown(ebox) {
    for(var i = 0; i < ebox.options.length; i++) {
    if (ebox.options[i].selected && ebox.options[i] != "" && ebox.options[i+1] != ebox.options[ebox.options.length]) {
    var tmpval = ebox.options[i].value;
    var tmpval2 = ebox.options[i].text;
    ebox.options[i].value = ebox.options[i+1].value;
    ebox.options[i].text = ebox.options[i+1].text
    ebox.options[i+1].value = tmpval;
    ebox.options[i+1].text = tmpval2;
    function dosubmit() {
    for ( var i = 0; i < document.formtest.list2.length; i++ )
    document.formtest.list2.item(i).selected = true;
    for ( var i = 0; i < document.formtest.service.length; i++ )
    document.formtest.service.item(i).selected = true;
    function addservice(service) {
    var defaultSelected = true;
    var selected = true;
    //alert('Here');
    var input_box = prompt("Enter some text","");
    //alert(input_box);
    if(input_box != "")
    var optionName = new Option(input_box,input_box,false,false);
    var length = service.length;
    service.options[length] = optionName;
    else
    alert("Service should not be empty ! Write Something.");
    </script>
    <form name="formtest" METHOD="POST" onSubmit="dosubmit()">
    <% String sql;
    sql = "SELECT LINEID, DESCRIP from PURCHVENDOR.AUTOLINE";
    ResultSet results = conn.executeQuery(sql);
    %>
    <TABLE BORDER="1">
    <TR>
    <TD>Code/Type</TD>
    <TD><INPUT TYPE="TEXT" NAME="vcode" SIZE="38">
    <select name="tp">
    <option value="S">Standard</option>
    <option value="A">Aftermarket</option>
    </select>
    </TD>
    </TR>
    <TR>
    <TD>Vendor Name</TD>
    <TD><INPUT TYPE="TEXT" name="vname" SIZE="54"></TD>
    </TR>
    <TR>
    <TD>Contact Name</TD>
    <TD><INPUT TYPE="TEXT" name="cname" SIZE="54"></TD>
    </TR>
    <TR>
    <TD>Address</TD>
    <TD><INPUT TYPE="TEXT" name="address" SIZE="54"></TD>
    </TR>
    <TR>
    <TD>P.O.Box</TD>
    <TD><INPUT TYPE="TEXT" name="POBox" SIZE="54"></TD>
    </TR>
    <TR>
    <TD>City</TD>
    <TD><INPUT TYPE="TEXT" name="city" SIZE="54"></TD>
    </TR>
    <TR>
    <TD>Province/Postal</TD>
    <TD>
    <INPUT TYPE="TEXT" name="province" SIZE="25" onChange="checkStateCode(this)">
    <INPUT TYPE="TEXT" name="postal" SIZE="25" onChange="CheckPostal(this)"></TD>
    </TR>
    <TR>
    <TD>Phone Number</TD>
    <TD><INPUT TYPE="TEXT" NAME="pnumber" SIZE="54" onChange="checkUSPhone(this)"></TD>
    </TR>
    <TR>
    <TD>Fax Number</TD>
    <TD><INPUT TYPE="TEXT" name="fnumber" SIZE="54" onChange="checkUSPhone(this)"></TD>
    </TR>
    <TR>
    <TD>Fee Stock/Factory</TD>
    <TD><INPUT TYPE="TEXT" name="ftock" SIZE="25">
    <INPUT TYPE="TEXT" name="ffactory" SIZE="25">
    </TD>
    </TR>
    <TR>
    <TD>Prefered Vendor</TD>
    <TD><input type="radio" value="1" name="choice" Checked>Yes
    <input type="radio" value="2" name="choice">No
    </TD>
    </TR>
    <TR>
    <TD>Line Carried</TD>
    <TD><select multiple size="5" name="list1" >
    <%
    while(results.next())
    %>
    <OPTION value = "<%= results.getString("lineid")%>"><%= results.getString("lineid")%></OPTION>
    <%
    %>
    </select>
    <input type=button value="Add" onclick = "javascript:addItem(this.form.list1,this.form.list2);"</input>
    <select multiple size="5" name="list2"></select>
    <input type=button value="Delete" onclick = "javascript:remove(this.form.list2);"</input>
    </TD>
    </TR>
    <TR>
    <TD>Service</TD>
    <TD>
    <select multiple size="5" name="service"></select>
    <input type=button value="Add Service" onclick = "addservice(formtest.service);"</input>
    <input type=button value="Delete Service" onclick = "javascript:remove(this.form.service);"</input>
    </TD>
    </TR>
    </TABLE>
    <P><INPUT TYPE="SUBMIT" VALUE="Add" onClick="document.formtest.action='addvpdb.jsp';"</input>
    <INPUT TYPE="SUBMIT" VALUE="Cancel" onClick="document.formtest.action='vendormain.jsp';"</input>
    <!-- <INPUT TYPE="SUBMIT" VALUE="Cancel" onClick= "goback()"</input> -->
    </P>
    </center>
    </form>
    </BODY>
    </HTML>

  • Fill in form with records from a database

    hi using adobe live cycle desginer could some one guide me or tell me what to look for so i can:
    populate my pdf form with records from a ms access database
    my site is in asp
    thanks

    This [url http://forum.java.sun.com/thread.jsp?forum=57&thread=497641]thread should get you started.

  • Forms to JSP conversion

    Hi all,
    I have some forms developed in Oracle 9i forms builder.
    I want to convert them in JSP.
    Can I do this by using JHeadStart?
    I have downloaded JHeadStart 10G.
    But I can not use it with JDeveloper 9i
    What else can I use for converting 9i forms to JSP???
    Thanks in advance.
    Reagards,
    MK

    I should read http://www.oracle.com/technology/products/forms/htdocs/10g/FormsJavaSOD.html first of all.
    Regards
    Grant Ronald
    Forms Product Management

  • SOAP XML Response in the form of JSP

    Hi,
    I am using a command in Websphere Commerce(WC) as "WebServices Provider " .For new users command is WC specific java program which takes input and throws back the result to the calling program.
    when a client sends a SOAP xml request to WC WebService Command,it sends back the SOAP XML response in the form of JSP to client.The Client is in Microsoft .Net language.
    My Question is:
    1)How the client is interpreting the SOAP XML response in JSP.
    2)Since the client being a .Net provider,to understand this response,he has to make any extra
    configuration ???
    Can somebody in the forum can help me in this regard.
    Thanks
    Mike

    Hi Mike1999 ,
    I am assigned with one project that is based on SOAP,I dont know abc of this technology.How the events are handled by SOAP....Etc Etc....
    Just eloberate What is ment by SOAP.Why it is used.

Maybe you are looking for

  • All folders I create are read only to everyone but me

    This is a problem which has plagued us over several operating systems. We create a folder on an shared drive and only the creator can write to it. If the folder is created on the desktop, the permissions can be changed and then copied to the shared d

  • File adaptor and variable substitution

    i have used variable substitution in the reciever comm channel to dynamically alter the folder ...Question is ..is there a way to do this from the sender comm channel.. I know, i know we can write a custom module..etc..etc.. I mean besides that ..is

  • Are the Canon 70-300mm f/4-5.6 IS EF Telephoto Zoom Lens USM

    Are the Canon 70-300mm f/4-5.6 IS EF Telephoto Zoom Lens USM 0345B006AA and 0345B002AA the same lens?

  • De vuelta de SubFlash '06

    Antes de que os lo cuenten otros (como Paco): Me he reido como hacía tiempo que no lo hacía: Hemos tenido charlas de expertos (si, expertos de verdad), hemos pasado un par de días entretenidos y nos hemos conocido en persona (lo que no tiene precio).

  • How to remove pop up blocker on a desktop mac osx and hp notebook?

    Trying stop pop ups. My tools doesn't show how, on the Old mac desktop, and my HP notebook also doesn't allow me to complete a resume building site on the web because of these pop ups????