This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes JSP and the fly likes Enumeration is not returning any data Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » JSP
Reply locked New topic
Author

Enumeration is not returning any data

Steve Dyke
Ranch Hand

Joined: Nov 16, 2004
Posts: 1541
    
    1
From the following JSP:



Calls this servlet:


My Servlet is called but it only returns the output string here at servlet. How do I read the values of the parameters on the form?
Ankit Garg
Sheriff

Joined: Aug 03, 2008
Posts: 9400
    
  20

My Servlet is called but it only returns the output string here at servlet. How do I read the values of the parameters on the form?

The question is not very clear to me, but getParameterNames as the name suggests, returns parameter names not values. If you want the values, you'll have to get the parameter values while iterating over the enumeration i.e.


SCJP 6 | SCWCD 5 | Javaranch SCJP FAQ | SCWCD Links
Steve Dyke
Ranch Hand

Joined: Nov 16, 2004
Posts: 1541
    
    1
Ankit Garg wrote:
My Servlet is called but it only returns the output string here at servlet. How do I read the values of the parameters on the form?

The question is not very clear to me, but getParameterNames as the name suggests, returns parameter names not values. If you want the values, you'll have to get the parameter values while iterating over the enumeration i.e.


My post got slightly ahead if itself. I do want the values but I have not got it to return the parameters yet.
Ankit Garg
Sheriff

Joined: Aug 03, 2008
Posts: 9400
    
  20


Why have you used enctype="multipart/form-data" ?? There's no file upload box in your form...
Steve Dyke
Ranch Hand

Joined: Nov 16, 2004
Posts: 1541
    
    1
Ankit Garg wrote:
Why have you used enctype="multipart/form-data" ?? There's no file upload box in your form...


I have taken that out. I have gotten this to work now however, I am getting a double hit on the servlet(two calls) from my JSP.
Ankit Garg
Sheriff

Joined: Aug 03, 2008
Posts: 9400
    
  20

Lets continue the discussion about the double submit in this topic...
 
Have you checked out Aspose?
 
subject: Enumeration is not returning any data
 
It's not a secret anymore!