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 No Way to Put the init() Method Inside the ActionForward Execute() Method 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 "No Way to Put the init() Method Inside the ActionForward Execute() Method" Watch "No Way to Put the init() Method Inside the ActionForward Execute() Method" New topic
Author

No Way to Put the init() Method Inside the ActionForward Execute() Method

JiaPei Jen
Ranch Hand

Joined: Nov 19, 2000
Posts: 1309
We cannot put a method inside another method.

When using the Struts, we start with:


I have a void init( ...) { ... } method shown below. Of course, I cannot put this init( ... ) inside the ActionForward Execute( ... ) { ... }

What am I supposed to do? Do I put this void init( ... ) { ... } method before the ActionForward Execute( ... ) { ... } begins?

Marc Peabody
pie sneak
Sheriff

Joined: Feb 05, 2003
Posts: 4727

Why are you trying to do this???


A good workman is known by his tools.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: No Way to Put the init() Method Inside the ActionForward Execute() Method