How to set email notification using struts.Plz give the
example code?

Answers were Sorted based on User's Feedback



How to set email notification using struts.Plz give the example code? ..

Answer / vijay satlawar

There is no seperate mechanism in struts to send mail.

To send mails you need to use mail API by downloadimg mail.jar.

This needs SMTP port to be enabled in the system which needs
to send mail alerts.

Is This Answer Correct ?    4 Yes 0 No

How to set email notification using struts.Plz give the example code? ..

Answer / nagi

Hi Guys...Please post relevant posts to the questions.
Sorry to say that, Anas posted some data for That is Logging, not for email notifiation.

Is This Answer Correct ?    0 Yes 0 No

How to set email notification using struts.Plz give the example code? ..

Answer / kirti t

Can anyone tell me correct answers....

Is This Answer Correct ?    0 Yes 1 No

How to set email notification using struts.Plz give the example code? ..

Answer / achappan

It is not a correct solution for Email-notification

Is This Answer Correct ?    0 Yes 3 No

How to set email notification using struts.Plz give the example code? ..

Answer / anas

Solution is to implement an email notification system. The
notification system will generate an email message whenever
the application detects an error. If you are already using
a standard logging framework like log4j.

import java.util.logging.*;
public class JDKLoggingExample
{
private static final Logger log =
Logger.getLogger(JDKLoggingExample.class.getName());
public static void main(String[] args)
{
try
{
log.fine("This is a fine message.");
int i = Integer.parseInt("Hello world");
}
catch (java.lang.Exception ex)
{
log.log(Level.SEVERE, "Caught an exception",
ex);
}
}

---------------------------------------------------------

import org.apache.log4j.*;

public class Log4jExample
{

private static final Logger log =
Logger.getLogger(Log4jExample.class);

public static void main(String[] args)
{
try
{
log.debug("This is a debug message.");
int i = Integer.parseInt("Hello world");
}
catch (java.lang.Exception ex)
{
log.error("Caught an exception", ex);
}
}
}

Is This Answer Correct ?    3 Yes 11 No

Post New Answer

More Struts Interview Questions

What is the default suffix for Struts2 action URI and how can we change it?

0 Answers  


What are Struts2 core components?

0 Answers  


What are struts in java?

0 Answers  


project architechture in java

3 Answers   AC, IBM, INDUS, Satyam,


How duplicate form submission can be controlled in struts?

0 Answers  






Hi i am murali.i need a excellent answer for the question Tell me about project and project flow ? i mean it is use full to any project,it is on STRUTS

2 Answers  


Explain struts.devmode?

0 Answers  


What’s the difference between validation.xml and validator-rules.xml files in struts validation framework?

0 Answers  


What are the two types of validations supported by validator framework?

0 Answers  


What is struts2 framework?

0 Answers  


Which model components are supported by Struts?

0 Answers  


What are pull and push mvc architecture and which architecture does struts2 follow?

0 Answers  


Categories