Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Genesys PGR
Genesys Backend
Commits
bd16738e
Commit
bd16738e
authored
Mar 07, 2014
by
Matija Obreza
Browse files
Resolved
#13
DwCA download uses POST method
parent
d38ed06b
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/main/java/org/genesys2/server/servlet/controller/WiewsController.java
View file @
bd16738e
...
...
@@ -40,6 +40,7 @@ import org.springframework.stereotype.Controller;
import
org.springframework.ui.ModelMap
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RequestParam
;
@Controller
...
...
@@ -196,7 +197,7 @@ public class WiewsController extends BaseController {
return
"/accession/data"
;
}
@RequestMapping
(
"/{wiewsCode}/dwca"
)
@RequestMapping
(
value
=
"/{wiewsCode}/dwca"
,
method
=
RequestMethod
.
POST
)
public
void
viewData
(
ModelMap
model
,
@PathVariable
(
value
=
"wiewsCode"
)
String
wiewsCode
,
HttpServletResponse
response
)
throws
IOException
{
_logger
.
debug
(
"Viewing country "
+
wiewsCode
);
FaoInstitute
faoInstitute
=
instituteService
.
getInstitute
(
wiewsCode
);
...
...
src/main/webapp/WEB-INF/jsp/wiews/details.jsp
View file @
bd16738e
...
...
@@ -140,11 +140,14 @@
</div>
<form
class=
"form-horizontal"
method=
"post"
action=
"/wiews/${faoInstitute.code.toLowerCase()}/dwca"
>
<input
type=
"hidden"
name=
"${_csrf.parameterName}"
value=
"${_csrf.token}"
/>
<div
class=
"row"
style=
"margin-top: 2em;"
>
<div
class=
"col-sm-4"
>
<
a
href=
"
<c:url
value=
"/wiews/${faoInstitute.code.toLowerCase()}/dwca"
/>
"
><spring:message
code=
"metadata.download-dwca"
/></
a
>
<
button
class=
"btn btn-primary"
type=
"submit
"
><spring:message
code=
"metadata.download-dwca"
/></
button
>
</div>
</div>
</form>
<content
tag=
"javascript"
>
<c:if
test=
"
${
faoInstitute
.
latitude
ne
null
}
"
>
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment