Pulling a form name as a parameter

Let's say I have the following HTML form:

<form name="createnewuser" action="verifyInfo.jsp"> ... Contents of form here ... </form>

In verifyInfo.jsp, is there a way to call the form's name (ideally as some kind of ${param} variable)?

-------------Problems Reply------------

To identify the submitted form, you can use:

  • A hidden input field.
  • The name or value of the submit button.

The name of the form is not sent to the server as part of the POST data.

<form id="form1">
<input type="submit" name="form1" value="Submit Form"/>
<form id="form2">
<input type="submit" name="form2" value="Submit Form"/>

Now either form1 or form2 will be sent as POST data containing the value text of the button.

Here is some code. Im not familiar with JSP but I think this is what you do O_O

if ( request.getParameter("form1") != null ) {
//Do stuff with form1
else if ( request.getParameter("form2") != null ) {
//Do stuff with form2

Category:java Views:0 Time:2011-06-24
Tags: html forms java jsp

Related post

  • PHP Function pulling an array that matches the parameter 2012-01-10

    $youtubes = array("lNT4H39G2rw","pF2_qvdm8DQ","_8ytwhhJwco","K16ZRFWR2Mc","9WuPxe7zc6Q","rXZIIclPnd0","J8ZwyN6E3_Q","OEWJbsh0z-4","o62-X0stdFM","aIIiww2Neq0","5TJc-VbNYg0","MYQa1Tgw_z8","alxzFm-bqug","UmI7oyllrlY","RGKFXDHFmn4"); function randomFromA

  • Dynamic url for dojo combobox source 2008-11-07

    I'm trying to use a dojo combobox with an Ajax data source. What I have is <div dojoType="dojo.data.ItemFileReadStore" jsId="tags" url="<%=ResolveClientUrl("~/Tag/TagMatches")%>" > </div> <select dojoType="dijit.form.ComboBox" st

  • Play embedded f4v file in flash? 2009-04-01

    Hi is it possible to play an embedded f4v file in flash? --------------Solutions------------- Yes, there's a wizard for adding a video to a swf you find it under File|Import|Import Video.... But it's not really recomendable. You often get out of sync

  • How to exit a child process and return its status from execvp()? 2009-05-24

    In my simple custom shell I'm reading commands from the standard input and execute them with execvp(). Before this, I create a fork of the current process and I call the execvp() in that child process, right after that, I call exit(0). Something like

  • C memory management for Cross-platform VM 2009-10-23

    I asked a question about C-type sizes which I get a pretty good answer but I realized that I may not formulate the question very well to be useful for my purpose. My background was from Computer Engineer before moves to Software Engineer so I like co

  • Problem with using Jquery.ajax over .load on Zend 2010-02-12

    Right now, what i'm trying to do is to replace a label on the front page with a block of html. Right now, the page basically has: <label id="replace"></label> the js currently has: $(document).ready(function(){ $("#replace").load('/test')

  • URL Rewrite - Destination Page not getting Query String Values 2010-10-14

    I'm trying to implement URL Rewriting into my existing application and have managed to get the page and links working except that my destination page does not get the query string values. My code is based on the example below: http://dotnetguts.blogs

  • Selecting the last value of a column 2010-11-12

    I have a spreadsheet with some values in column G. Some cells are empty in between, and I need to get the last value from that column into another cell. Something like: =LAST(G2:G9999) except that LAST isn't a function :-) --------------Solutions----

  • Get 2nd Value in Dataset in Reporting Services 2011-01-04

    This seems to be a very simple question, but I am trying to get the 2nd value in a dataset to display as a matrix's header value. In this report, lets say that I have 2 datasets. In Dataset1, I have a query that pulls down 3 values for a parameter dr

  • Numeric.AD and typing problem 2011-05-09

    I'm trying to work with Numeric.AD and a custom Expr type. I wish to calculate the symbolic gradient of user inputted expression. The first trial with a constant expression works nicely: calcGrad0 :: [Expr Double] calcGrad0 = grad df vars where df [x

  • Highcharts separate datalabels per series 2012-03-01

    I have the following high charts: chart = new Highcharts.Chart({ chart: { renderTo: 'container', defaultSeriesType: 'scatter', zoomType: 'xy' }, title: { text: 'Report' }, xAxis: { title: { enabled: true, text: 'Score' }, startOnTick: true, endOnTick

  • Practice Task in the MOS Study Guide for Access 2010 2014-07-29

    Thanks for any suggestions as to what I am doing wrong in the following scenario. The MOS Study Guide for Access 2010 includes one practice task that is throwing me. Section 4.5 deals with generating calculated fields. The downloaded practice databas

  • Dynamic parameter not pulling list of values out of field 2011-02-04

    I have two kinds of parameters in a specific Crystal Report I am making -- two dates that I use directly in the SQL query, and a parameter that will filter the report based on sales reps within the query. I defined the two dates (date1 and date2, if

  • I'm trying to pull a control parameter for a sql datasource from a dropdown but it's not being recognized 2011-12-16

    I have 2 sql datasources. What's supposed to happen is the following: On page load, the first sql datasource pulls a list of 'desknames' and populates a dropdown. It should default to the first deskname but I added some c# code behind to select the f

  • mysql_fetch_array() expects parameter 1 to be resource- pulling out individual id 2012-04-18

    Possible Duplicate: mysql_fetch_array() expects parameter 1 to be resource, boolean given in select I'm using this code to pull out the status of an applicant in the database so their status appears when they login, based on the user ID but I am gett

  • Date Parameter in Query - Pulling incorrect results (Access 2010) 2012-01-07

    I want to pull results based on beginning and end dates, as entered in as ask query. My date criteria is as follows: Between [Start date (dd/mm/yyyy)] And [End Date (dd/mm/yyyy)] The query runs fine, but the results are not restricted to the specifie

  • NSURL pull out a single value for a key in a parameter string 2010-02-09

    I have an NSURL: serverCall?x=a&y=b&z=c What is the quickest and most efficient way to get the value of y? Thanks --------------Solutions------------- Well I know you said "the quickest way" but after I started doing a test with NSScanner I j

  • Change Attribute's parameter at runtime 2008-09-09

    I am not sure whether is it possible to change attribute's parameter during runtime? For example, inside an assembly I have the following class public class UserInfo { [Category("change me!")] public int Age { get; set; } [Category("change me!")] pub

  • ActionLink fails with ViewData parameter in ASP.NET MVC Beta 2008-10-19

    I have ran into an odd problem with the ActionLink method in ASP.NET MVC Beta. When using the Lambda overload from the MVC futures I cannot seem to specify a parameter pulled from ViewData. When I try this: <%= Html.ActionLink<PhotoController

Copyright (C) dskims.com, All Rights Reserved.

processed in 0.208 (s). 11 q(s)