• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Possible to get Form name from request object?

 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi, after looking for ages on google, i was wondering whether or not i can do this.

I want to get the form name from a posted form, i.e.

<form name="THEFORMNAME" ......

if there was a function it would return "THEFORMNAME".

I tried going through the .getParameterNames() method, but did not see it in there.

Thanks
 
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Dude, fix your name.
Nobody here appreciates that.
 
Craig Bull
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
.................
done just for you.....
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you.
The current one still doesn't comply with the naming policy but it's an improvement.

The browser never sends the form name to the server so it' can't be retrieved from your servlet/jsp.

A simple alternative is a hidden form field inside your form.
 
Craig Bull
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ah boo
Thank you for your help.
 
Bartender
Posts: 4121
IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
"Underworld/Deuce Bigelow" -

Welcome to the JavaRanch! Please adjust your displayed name to meet the
JavaRanch Naming Policy. User names cannot be obviously fake (which, unfortunately, both of your choices are) and must consist of a first name and a last name (which, unfortunately, "Underworld" does not).

BTW, we strongly prefer people to use their real names, but if you are uncomfortable using your real name online - please at least choose a name that at least appears to be a real name. Another corollary to this is please do not use the name of a famous celebrity, politician, sports star, or historical figure. As much as we'd really like to believe your name *really is* "Deuce Bigelow"( or "George W. Bush", or "Adolph Hitler", or "Sherlock Holmes") we'll classify these names as "obviously fake" - unless they're *really, really* obscure - or unless you provide us with a passable argument that your name *really is* "Deuce Bigelow".

You can change your user name here.

Thanks! and welcome to the JavaRanch!
[ September 22, 2005: Message edited by: Nathan Pruett ]
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Moved to the HTML forum.
reply
    Bookmark Topic Watch Topic
  • New Topic