jijo-paulose / gwtupload

Automatically exported from code.google.com/p/gwtupload
Other
0 stars 0 forks source link

Use ServletConfig getInitParameter() instead of ServletContext #117

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

1. Define an maxSize and slowUploads init-params in the servlet.

What is the expected output? What do you see instead?

I would expect to see these parameters be effective, but they are ignored, it 
only works if I define parameter as a context-param.

What version of the product are you using? On what operating system?

0.6.4-SNAPSHOT

Please provide any additional information below.

I cannot define a servlet init-param, it only works if I define a context 
param.  

Original issue reported on code.google.com by jasonmp...@gmail.com on 18 Aug 2011 at 1:38

GoogleCodeExporter commented 9 years ago
If you add the following method to UploadServlet 

@Override
    public String getInitParameter(String name) {
        String value = getServletContext().getInitParameter(name);
        if (value == null) {
            value = super.getInitParameter(name);
        }
        return value;
    }

And then change all ctx.getInitParameter("...") to getInitParameter("..."), the 
issue can be solved without backwards compatibility issues.

Original comment by jasonmp...@gmail.com on 18 Aug 2011 at 1:59

GoogleCodeExporter commented 9 years ago
This issue was closed by revision r938.

Original comment by manuel.carrasco.m on 9 Nov 2011 at 7:39