Ver Mensaje Individual
  #11 (permalink)  
Antiguo 18/07/2013, 11:57
Avatar de JDEM
JDEM
 
Fecha de Ingreso: octubre-2008
Ubicación: www....
Mensajes: 154
Antigüedad: 16 años, 3 meses
Puntos: 8
Respuesta: Configurar envió de correos con javamail en tomcat 6

Q va man!, nada que sale ahora el servidor boto:

Cita:
org.apache.jasper.JasperException: Unable to compile class for JSP:

An error occurred at line: 10 in the jsp file: /mail.jsp
Syntax error on token(s), misplaced construct(s)
7:
8: String smtpHost = "mail.dominio.com";
9: Properties props = System.getProperties();
10: props.put("mail.smtp.host",smtpHost);
11:
12: Session sesion = Session.getDefaultInstance(props,null);
13: try {


An error occurred at line: 10 in the jsp file: /mail.jsp
Syntax error on token ""mail.smtp.host"", invalid FormalParameterList
7:
8: String smtpHost = "mail.dominio.com";
9: Properties props = System.getProperties();
10: props.put("mail.smtp.host",smtpHost);
11:
12: Session sesion = Session.getDefaultInstance(props,null);
13: try {


An error occurred at line: 10 in the jsp file: /mail.jsp
Syntax error on token "smtpHost", VariableDeclaratorId expected after this token
7:
8: String smtpHost = "mail.dominio.com";
9: Properties props = System.getProperties();
10: props.put("mail.smtp.host",smtpHost);
11:
12: Session sesion = Session.getDefaultInstance(props,null);
13: try {


An error occurred at line: 12 in the jsp file: /mail.jsp
Session cannot be resolved to a type
9: Properties props = System.getProperties();
10: props.put("mail.smtp.host",smtpHost);
11:
12: Session sesion = Session.getDefaultInstance(props,null);
13: try {
14: Message mensaje = new MimeMessage(sesion);
15: mensaje.setSubject("Hola Mundo");


An error occurred at line: 12 in the jsp file: /mail.jsp
Session cannot be resolved
9: Properties props = System.getProperties();
10: props.put("mail.smtp.host",smtpHost);
11:
12: Session sesion = Session.getDefaultInstance(props,null);
13: try {
14: Message mensaje = new MimeMessage(sesion);
15: mensaje.setSubject("Hola Mundo");


An error occurred at line: 12 in the jsp file: /mail.jsp
Syntax error on token ";", { expected after this token
9: Properties props = System.getProperties();
10: props.put("mail.smtp.host",smtpHost);
11:
12: Session sesion = Session.getDefaultInstance(props,null);
13: try {
14: Message mensaje = new MimeMessage(sesion);
15: mensaje.setSubject("Hola Mundo");
__________________
Visitanos http://www.nestsystems.com.ve, mucho mas que solo paginas web.