We cannot put a method inside another method.
When using the Struts, we start with:
public final class MyClass extends Action
{
public ActionForward execute( ActionMapping
mapping,
ActionForm form,
HttpServletRequest request,
HttpServletResponse response )
throws java.lang.Exception
{
.......
.......
}
}
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?
Code:
=================================================
String smtpServer;
public void init(ServletConfig config) throws
ServletException
{
super.init(config);
smtpServer =
config.getInitParameter("smtpServer");
}
=================================================
__________________________________
Do you Yahoo!?
New and Improved Yahoo! Mail - 100MB free storage!
http://promotions.yahoo.com/new_mail
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]