Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within Struts
Search Coderanch
Advance search
Google search
Register / Login
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Jeanne Boyarsky
Ron McLeod
Paul Clapham
Liutauras Vilda
Sheriffs:
paul wheaton
Rob Spoor
Devaka Cooray
Saloon Keepers:
Stephan van Hulst
Tim Holloway
Carey Brown
Frits Walraven
Tim Moores
Bartenders:
Mikalai Zaikin
Forum:
Struts
getServlet().getServletContext();
Nitin Kharbade
Greenhorn
Posts: 25
posted 13 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
When to use ServletContext con=getServlet().getServletContext();
And
ServletContext con=getServletContext();
Lester Burnham
Rancher
Posts: 1337
posted 13 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
You never call getServlet(). Where did you see that method used?
Nitin Kharbade
Greenhorn
Posts: 25
posted 13 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
In the Action class of
struts
1.2.9 of sun's notes of NIIT, from where I am studying.
Lester Burnham
Rancher
Posts: 1337
posted 13 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
The Struts Action class does not have a getServletContext() method - so it's not like you have a choice.
André Asantos
Ranch Hand
Posts: 234
posted 13 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Hi all,
I have tried to search on this web forum but this failed...
I try over and over again to generate thumbnails into WebContent the context of the application by using ServletContext, look at below please:
//attribute ServletContext appContext = ServletActionContext.getServletContext(); //method saveImage(img, .9f, "../WebContent/galeriaDeFotoThumbs/thumb_" + UploadImagemAction.idDaImagemPopulado + ".jpg"); // Estam sendo passados de argumento: // InputStream (foto), qualidade da imagem e o diretório temp do SO
This shows on console the following message:
..\WebContent\galeriaDeFotoThumbs\thumb_121.jpg (The system could not found the path)
The harder I work, the luckier I get. -Sam Goldwyn So tiny. - this ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
how to mannually free the servletContext variable to free memory?
accessing ServletContext in a Action file
How to get ServletConfig and ServletContexts in Action class of struts
ActionForm
Problem accessing a servlet context attribute from an action servlet.
More...