ASF Bugzilla – Attachment 13479 Details for
Bug 32272
enhancement for ImageTaglib
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
ImageServlet patch
ImageServlet.patch (text/plain), 1.04 KB, created by
Daniel C. Amadei
on 2004-11-17 13:49:19 UTC
(
hide
)
Description:
ImageServlet patch
Filename:
MIME Type:
Creator:
Daniel C. Amadei
Created:
2004-11-17 13:49:19 UTC
Size:
1.04 KB
patch
obsolete
>--- ImageServlet.java.ori 2004-11-16 04:04:36.000000000 -0300 >+++ ImageServlet.java 2004-11-17 10:11:47.125000000 -0300 >@@ -14,6 +14,7 @@ > > import javax.servlet.ServletException; > import javax.servlet.http.HttpServlet; >+import javax.servlet.http.HttpSession; > import javax.servlet.http.HttpServletRequest; > import javax.servlet.http.HttpServletResponse; > >@@ -33,8 +34,17 @@ > "Image temp directory " + imageDir + " not found"); > return; > } >- >- String imageName = req.getParameter("image"); >+ >+ //maybe using getSession(false) would fit better >+ HttpSession session = req.getSession(); >+ >+ String useSession = req.getParameter("useSession"); >+ >+ String imageName = req.getParameter("image"); >+ >+ if(useSession != null && useSession.equalsIgnoreCase("true")) { >+ imageName = (String)session.getAttribute("org.apache.taglibs.image.ImageName"); >+ } > > File image = new File(imageDir, imageName); > if (image == null || !image.exists() || !image.isFile()) {
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 32272
: 13479 |
13480
|
13481