Salve a tutti. Devo creare un form mail in jsp (e per farlo ho trovato questa guida a mio parere anche poco chiara: http://www.mrwebmaster.it/jsp/svilup...-jsp_7683.html). Proprio nel compilare la prima pagina eclipse mi da questo errore: "properties cannot be resolved to a type in jsp".
vi posto il codice:
codice:
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
</head>
<body>
<%
Properties props = new Properties();
props.put("mail.smtp.port", "25");
props.put("mail.smtp.host", "smpt.example.com");
Session session = Session.getDefaultInstance(props);
Message message = new MimeMessage(session);
InternetAddress from = new InternetAddress("mittente@example.com");
InternetAddress to = new InternetAddress("destinatario@example.com");
message.setFrom(from);
message.addRecipient(Message.RecipientType.TO, to);
message.setSubject("Oggetto del messaggio");
message.setSentDate(new Date());
message.setText("Corpo del messaggio");
%>
</body>
</html>
grazie per l'aiuto