Revision 51139
Added by Sofia Baltzi about 6 years ago
RemindUsernameServlet.java | ||
---|---|---|
3 | 3 |
import com.unboundid.ldap.sdk.LDAPException; |
4 | 4 |
import eu.dnetlib.openaire.user.utils.EmailSender; |
5 | 5 |
import eu.dnetlib.openaire.user.utils.LDAPActions; |
6 |
import eu.dnetlib.openaire.usermanagement.utils.UrlConstructor; |
|
6 | 7 |
import org.apache.log4j.Logger; |
7 | 8 |
import org.springframework.beans.factory.annotation.Autowired; |
8 | 9 |
import org.springframework.stereotype.Component; |
... | ... | |
67 | 68 |
|
68 | 69 |
} catch (LDAPException ldape) { |
69 | 70 |
logger.error("Could not find user with email " + formEmail, ldape); |
70 |
response.sendRedirect("./error.jsp"); |
|
71 |
response.sendRedirect(UrlConstructor.getRedirectUrl(request, "error.jsp")); |
|
72 |
//response.sendRedirect("./error.jsp"); |
|
71 | 73 |
|
72 | 74 |
} catch (MessagingException e) { |
73 | 75 |
logger.error("Error in sending email", e); |
74 |
response.sendRedirect("./error.jsp"); |
|
76 |
response.sendRedirect(UrlConstructor.getRedirectUrl(request, "error.jsp")); |
|
77 |
//response.sendRedirect("./error.jsp"); |
|
75 | 78 |
} |
76 | 79 |
|
77 | 80 |
} |
Also available in: Unified diff
Add session check to redirect pages