r204 - in trunk/src/main: java/org/nuiton/scmwebeditor/actions webapp/WEB-INF/content
Author: kcardineaud Date: 2011-08-04 12:24:51 +0200 (Thu, 04 Aug 2011) New Revision: 204 Url: http://nuiton.org/repositories/revision/scmwebeditor/204 Log: Remove the creation of the session in Main Action Modified: trunk/src/main/java/org/nuiton/scmwebeditor/actions/ScmWebEditorMainAction.java trunk/src/main/webapp/WEB-INF/content/modificationViewer.jsp Modified: trunk/src/main/java/org/nuiton/scmwebeditor/actions/ScmWebEditorMainAction.java =================================================================== --- trunk/src/main/java/org/nuiton/scmwebeditor/actions/ScmWebEditorMainAction.java 2011-08-04 10:06:54 UTC (rev 203) +++ trunk/src/main/java/org/nuiton/scmwebeditor/actions/ScmWebEditorMainAction.java 2011-08-04 10:24:51 UTC (rev 204) @@ -11,7 +11,6 @@ import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpSession; import org.apache.commons.lang.StringEscapeUtils; @@ -135,13 +134,14 @@ // return "noParameter"; // } + + projectUrl=request.getHeader("referer"); + if(log.isDebugEnabled()) { - log.debug("ProjectUrl= "+request.getHeader("referer")); + log.debug("ProjectUrl= "+projectUrl); } - projectUrl=request.getHeader("referer"); - HttpSession httpSession = request.getSession(true); Map<?,?> map =(Map<?,?>) request.getParameterMap(); @@ -182,12 +182,9 @@ } - - //SvnSession object creation if doesn't already exist - SvnSession svnSess = getSvnSession(httpSession); + + SvnSession svnSess = null; - - try { svnSess = new SvnSession(address); @@ -359,9 +356,7 @@ request.setAttribute(ATTRIBUTE_ORIG_TEXT, StringEscapeUtils.escapeHtml(originalText)); - request.setAttribute(ATTRIBUTE_INVALIDATE_MAX_TIME, (httpSession.getMaxInactiveInterval() / 60)); request.setAttribute(ATTRIBUTE_PROJECT_URL, projectUrl); - request.setAttribute(ATTRIBUTE_SCM_EDITOR_URI, request.getRequestURI()); if(log.isInfoEnabled()) { log.info("IP client : "+request.getRemoteAddr() + " , get file : "+address+ ". File's mimetype : "+mimeType); Modified: trunk/src/main/webapp/WEB-INF/content/modificationViewer.jsp =================================================================== --- trunk/src/main/webapp/WEB-INF/content/modificationViewer.jsp 2011-08-04 10:06:54 UTC (rev 203) +++ trunk/src/main/webapp/WEB-INF/content/modificationViewer.jsp 2011-08-04 10:24:51 UTC (rev 204) @@ -48,7 +48,7 @@ </head> -<body onload="geresession(<%=request.getAttribute("InvalidateMaxTime")%>, 5);"> +<body> <a title="ScmWebEditor Project Website" target="_blank" href="http://maven-site.nuiton.org/scmwebeditor/"><img src="img/ScmWebEditor_main.png" alt="ScmWebEditor logo"/></a> <center>
participants (1)
-
kcardineaud@users.nuiton.org