This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Struts and the fly likes Action class is not POJO object in Struts2 as tutorials say Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Action class is not POJO object in Struts2 as tutorials say" Watch "Action class is not POJO object in Struts2 as tutorials say" New topic
Author

Action class is not POJO object in Struts2 as tutorials say

Jaime Stuardo
Greenhorn

Joined: Apr 05, 2013
Posts: 6
Hello....

I am following tutorials to start coding in Struts2.

In all of them, action classes are POJO objects, so that, it does not extend anything.

I am using NetBeans to code. When I start a Struts2 project, action class is like the following:



If I remove the extends, page throws an exception.

Why is that?

Regards.
Jaime
Joe Ess
Bartender

Joined: Oct 29, 2001
Posts: 8874
    
    8

Jaime Stuardo wrote:
If I remove the extends, page throws an exception.

Why is that?


I have no idea. Actions can be POJO's. I can see you getting a compile error because SUCCESS is inherited through ActionSupport. What exception are you getting?


"blabbing like a narcissistic fool with a superiority complex" ~ N.A.
[How To Ask Questions On JavaRanch]
 
Don't get me started about those stupid light bulbs.
 
subject: Action class is not POJO object in Struts2 as tutorials say