Skip to content
Snippets Groups Projects
Commit 9f835d7b authored by tudtianus's avatar tudtianus
Browse files

fix: redirection in createJournal

parent 2afd02ec
No related branches found
No related tags found
No related merge requests found
......@@ -10,6 +10,8 @@ import unipotsdam.gf.modules.journal.service.JournalService;
import javax.ws.rs.*;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
import java.net.URI;
import java.net.URISyntaxException;
import java.util.ArrayList;
/**
......@@ -108,6 +110,18 @@ public class JournalView {
journalService.saveJournal(id, student, project, text, visibility, category);
//TODO token
URI location = null;
try {
location = new URI("../pages/eportfolio.jsp?token=test");
log.debug("<<< saveJournal: redirect to " +location.toString());
return Response.temporaryRedirect(location).build();
} catch (URISyntaxException e) {
e.printStackTrace();
log.debug("saveJournal: redirect failed" );
}
log.debug("<<< saveJournal");
return Response.ok().build();
......
......@@ -42,7 +42,7 @@
<td id="yourContent">
<h1> Tagebucheintrag erstellen </h1>
<form id="journalform" class="form-journal" method="POST" action="../rest/journal/save">
<form id="journalform" class="form-journal" method="POST" action="../rest/journal/save" >
<input type="hidden" name="student" value="0">
<input type="hidden" name="project" value="0">
......@@ -75,7 +75,7 @@
<div class="journal-form-buttons">
<input type="submit">
<button> Zur&uuml;ck </button>
<a href="eportfolio.jsp"><button> Zur&uuml;ck </button></a>
</div>
</div>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment