View | Details | Raw Unified | Return to bug 32272
Collapse All | Expand All

(-)ImageServlet.java.ori (-2 / +12 lines)
Lines 14-19 Link Here
14
14
15
import javax.servlet.ServletException;
15
import javax.servlet.ServletException;
16
import javax.servlet.http.HttpServlet;
16
import javax.servlet.http.HttpServlet;
17
import javax.servlet.http.HttpSession;
17
import javax.servlet.http.HttpServletRequest;
18
import javax.servlet.http.HttpServletRequest;
18
import javax.servlet.http.HttpServletResponse;
19
import javax.servlet.http.HttpServletResponse;
19
20
Lines 33-40 Link Here
33
                        "Image temp directory " + imageDir + " not found");
34
                        "Image temp directory " + imageDir + " not found");
34
                return;
35
                return;
35
        }
36
        }
36
        
37
37
        String imageName = req.getParameter("image");
38
				//maybe using getSession(false) would fit better
39
				HttpSession session = req.getSession();
40
41
				String useSession = req.getParameter("useSession");
42
43
				String imageName = req.getParameter("image");
44
45
        if(useSession != null && useSession.equalsIgnoreCase("true")) {
46
        	imageName = (String)session.getAttribute("org.apache.taglibs.image.ImageName");
47
        }
38
48
39
        File image = new File(imageDir, imageName);
49
        File image = new File(imageDir, imageName);
40
        if (image == null || !image.exists() || !image.isFile()) {
50
        if (image == null || !image.exists() || !image.isFile()) {

Return to bug 32272