It's not a secret anymore!*
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 OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP 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: 8935
    
    9

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]
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Action class is not POJO object in Struts2 as tutorials say