• 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

getting all values in form

 
Ranch Hand
Posts: 1325
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
there is a form in my jsp page.it gets user data (name ,address,age.........).
i need to send that data to other jsp page and get them to the varibles.
i used request.geaParameter() method.but i could only get the first value.why os that
 
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

request.geaParameter()



There is no such method. I realize that you meant getParameter, but this is the sort of red herring that wastes people's time. There are a bunch more spelling errors in your post. If you want people to take the time to answer your questions, please take the time to make sure that they are clear and error free.
 
Bear Bibeault
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
You should not be submitting to a JSP, but to a servlet. On the request you will find the method getParameterMap() which will give you a Map instance of all submitted request parameters.
 
Rancher
Posts: 4803
7
Mac OS X VI Editor Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Bear Bibeault wrote:You should not be submitting to a JSP, but to a servlet.


Interesting. Got a cite for that? Or better, why is it bad?

I thought posting a form to a JSP was why they have the setProperty with name *



I think I've been doing this for years. Have I been lost?
 
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Why *would* you post to a JSP? Any useful form processing shouldn't happen in a JSP. JSPs are the view layer and should be doing only viewful things.The only possible usecase I could see for this is your wizard example if all validation is done on the client side (which is risky, and the data would have to be validated on the server side anyway).

It also introduces two different ways of addressing application pages: servlets and JSPs, which just seems like a recipe for trouble down the road when a URL has to change.
 
Bear Bibeault
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

Pat Farrell wrote:

Bear Bibeault wrote:You should not be submitting to a JSP, but to a servlet.


Interesting. Got a cite for that? Or better, why is it bad?


Very old-fashioned and Model 1.

Here's my article on the subject.

And yeah, what David said.

 
Pat Farrell
Rancher
Posts: 4803
7
Mac OS X VI Editor Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

David Newton wrote: JSPs are the view layer and should be doing only viewful things.


Well, this is a bit of a value laden statement. JSPs can be just a view, but then you need something else to control dispatching. Pretty soon you are in the "too many servlets" problem, which leads to a framework.

I've just spent several months beating my head against Stripes, based on Fred's visit to the framwork section. I bought the book, wrote up all the examples, and tried to do my application. I gave up. Its too much magic.

At the time, I also downloaded, but did not implement Bear's Frontman.

Its been a couple of years since I did a lot of forms, wizards, etc. stuff with JSP/servlets, and it seems that all of my experience has fallen out of my brain. This stuff used to be easy.
 
Ranch Hand
Posts: 166
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Aruna,
Regarding this check your other post for solution. All the best.
 
David Newton
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

I've just spent several months beating my head against Stripes


Hmm, I always found Stripes pretty straight-forward, especially considering some of the alternatives.

What about it threw you off? It's about as lightweight as they get and produces very maintainable apps.
 
Pat Farrell
Rancher
Posts: 4803
7
Mac OS X VI Editor Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

David Newton wrote:What about it (Stripes) threw you off? It's about as lightweight as they get and produces very maintainable apps.


I just don't get it. Too much magic. I keep getting null pointer exceptions because the key object is instantiated or not by magic or not.

I see the examples, worked them, but when I try to do things that I think are similar, it blows up and I don't see any way to debug what's wrong.
 
David Newton
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well, if you have any questions, ask away (I guess in the frameworks forum?) -- compared to a JSP/servlet mechanism it's much, much nicer (IMO). Of course, I prefer just about anything to a JSP/servlet mechanism, although I refuse to write another Struts 1 application.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic