Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Struts2 doubt regarding method

 
Dilip Mallik
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All

I am learning struts2.

I want to know that when I am submitting the form we are mentioning action

but not method (like we used to mention in servlet doGet or doPost)

so my doubt is what is the default method to take data from form ?

and one more doubt.

which version of struts2 needs to be followed while learning.

currently I am learning in 2.0.6 but in the struts site I found the latest version is 2.0.14....

I am confused...

Please help

Thanks
 
Liju Samuel
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
in struts the default method is post...for security reason...its not necessary to specify the action...it will take the default method post
 
Jesper de Jong
Java Cowboy
Saloon Keeper
Posts: 15214
36
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
lijusamuel, please check your private messages again. You can see them by clicking My Private Messages.
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In general you should use the latest released version, which as you said is 2.0.14. There are enough changes between 2.0.6 and 2.0.14 to cause problems.

I suspect we're quite close to a 2.1.3 release as well.
 
Nishan Patel
Ranch Hand
Posts: 689
Eclipse IDE Java Scala
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Default method called is "get" method.

And it is better to read latest Struts version.

So, you get update of Struts and again you not need to learn when user Struts 2.0.
 
Dilip Mallik
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks everybody

But I still didn't get my answer that what is the default method...

As Nishan said the default method is get


and lijusamuel said the default method is post..

If the default method is get then why don't we see the data in url while submitting the form?

and about following struts version....


what exactly is changed in the 2.0.6 to 2.0.14 so that I have to learn only those thing and not the whole of struts 2.0.14..

how to find that?

Kindly Reply
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Look on the S2 wiki for the changelists.

http://struts.apache.org/2.x/docs/migration-guide.html

The S2 form tag sets method="post".
[ December 10, 2008: Message edited by: David Newton ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic