This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes Struts and the fly likes Can i use constructor in Action Class?If yes how? Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Frameworks » Struts
Reply Bookmark "Can i use constructor in Action Class?If yes how?" Watch "Can i use constructor in Action Class?If yes how?" New topic
Author

Can i use constructor in Action Class?If yes how?

p hasini
Ranch Hand

Joined: Oct 24, 2009
Posts: 92
Can i use constructor in Action Class?If yes how?
Ankit Garg
Saloon Keeper

Joined: Aug 03, 2008
Posts: 9189
    
    2

Did you try to create a constructor in an Action class?? Do you think there will be any problems if you create a constructor. Try to create a constructor in your action class and then see what happens (whichever version of struts you are talking about)...


SCJP 6 | SCWCD 5 | Javaranch SCJP FAQ | SCWCD Links
p hasini
Ranch Hand

Joined: Oct 24, 2009
Posts: 92
Struts1.2
Ankit Garg
Saloon Keeper

Joined: Aug 03, 2008
Posts: 9189
    
    2

Ankit Garg wrote:Did you try to create a constructor in an Action class?? Do you think there will be any problems if you create a constructor. Try to create a constructor in your action class and then see what happens.

Did you try any of this or do you not want to write some code and want others to tell you the answer and you'll memorize it??
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Please read the ShowSomeEffort and SearchFirst FAQ entries.

Also, unless your first name is actually the single letter "p", the JavaRanch naming policy may be mentioned to you by those with more power than myself.
Ankit Garg
Saloon Keeper

Joined: Aug 03, 2008
Posts: 9189
    
    2

Well isn't initial allowed for first name according to the policy
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Oh, yeah, looks like it is.
Ankit Garg
Saloon Keeper

Joined: Aug 03, 2008
Posts: 9189
    
    2

David Newton wrote:the JavaRanch naming policy may be mentioned to you by those with more power than myself.

Oh, yeah, looks like it is.

Maybe that's why there are others with more powers than you (of course I'm not one of them)...
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Man, I sure *hope* there's people with more power, and especially more knowledge, than me--otherwise we're doomed! ;)
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Can i use constructor in Action Class?If yes how?
 
Similar Threads
need some critics
constructor and exceptions
private constructor in abstract classes
Can i use java class in action attribute in form tag of jsp page?
urgent Please help