Changement divers
This commit is contained in:
@@ -124,7 +124,7 @@ public class EvaluationController extends SimpleFormController {
|
||||
int idd=Integer.parseInt(id);
|
||||
|
||||
Report rpt= evaluationManager.addReport(idd, commentPCMember, commentAuthor, listeRating, current.getLogin());
|
||||
request.getSession().setAttribute("report", rpt);
|
||||
//request.getSession().setAttribute("report", rpt);
|
||||
//persister ratings dans la base apres avoir le id report.
|
||||
System.out.println("lengthe is :"+listeRating.size());
|
||||
for (Rating rt : listeRating)
|
||||
@@ -136,7 +136,7 @@ public class EvaluationController extends SimpleFormController {
|
||||
}
|
||||
|
||||
|
||||
return new ModelAndView(new RedirectView("createReport.htm"));
|
||||
return new ModelAndView(new RedirectView("createReport.htm"), "report", rpt);
|
||||
}
|
||||
|
||||
public IArticleManager getArticleManager() {
|
||||
|
||||
@@ -10,6 +10,7 @@ import javax.servlet.http.HttpServletResponse;
|
||||
import org.springframework.util.FileCopyUtils;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
import org.springframework.web.servlet.mvc.Controller;
|
||||
import org.springframework.web.servlet.view.RedirectView;
|
||||
import org.yacos.core.article.Article;
|
||||
import org.yacos.core.article.IArticleManager;
|
||||
|
||||
@@ -39,6 +40,10 @@ public class ArticleDownloadController implements Controller {
|
||||
Integer articleId = Integer.parseInt(request.getParameter("articleId"));
|
||||
Article article = articleManager.getArticle(articleId);
|
||||
|
||||
if(article == null){
|
||||
return new ModelAndView(new RedirectView("404error.htm"));
|
||||
}
|
||||
|
||||
File file = new File(downloadDirPath+article.getURL_article());
|
||||
|
||||
long llength = file.length();
|
||||
|
||||
Reference in New Issue
Block a user