aspose file tools*
The moose likes Struts and the fly likes Getting Undefined in Action Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Getting Undefined in Action" Watch "Getting Undefined in Action" New topic
Author

Getting Undefined in Action

manoj parida
Greenhorn

Joined: Feb 08, 2010
Posts: 5
Hi,

I have written code like below in jsp and Action class.


i also tried this

Action class, i am just doing this.



In the logs I am getting:

Delete User Id undefined

Could someone let me know what is happening. I tried few more options but not working.

Thanks
Joe Ess
Bartender

Joined: Oct 29, 2001
Posts: 8927
    
    9

I split up your code tags to make your post easier to read.
Your first code snippet obviously will not work because you are not setting a value for "id".
Did you check the HTML in the browser to see if your code is correctly getting the ID from the action?
Why are you checking the request for the parameter rather than using an action attribute? Also, why are you calling the attribute "userId" in one request then "id" in the next?


"blabbing like a narcissistic fool with a superiority complex" ~ N.A.
[How To Ask Questions On JavaRanch]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Getting Undefined in Action