Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Genesys Backend
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
45
Issues
45
List
Boards
Labels
Service Desk
Milestones
Operations
Operations
Incidents
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Genesys PGR
Genesys Backend
Commits
5d41db5a
Commit
5d41db5a
authored
Sep 02, 2013
by
Matija Obreza
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Handle UTF8
parent
2459bd72
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
46 additions
and
9 deletions
+46
-9
.settings/org.eclipse.core.resources.prefs
.settings/org.eclipse.core.resources.prefs
+2
-0
pom.xml
pom.xml
+1
-0
src/main/java/org/crophub/spring/AddStuffInterceptor.java
src/main/java/org/crophub/spring/AddStuffInterceptor.java
+7
-3
src/main/resources/content/language.properties
src/main/resources/content/language.properties
+1
-0
src/main/webapp/WEB-INF/decorator/main.jsp
src/main/webapp/WEB-INF/decorator/main.jsp
+6
-0
src/main/webapp/WEB-INF/jsp/index.jsp
src/main/webapp/WEB-INF/jsp/index.jsp
+2
-2
src/main/webapp/WEB-INF/jsp/init.jsp
src/main/webapp/WEB-INF/jsp/init.jsp
+1
-1
src/main/webapp/WEB-INF/jsp/login.jsp
src/main/webapp/WEB-INF/jsp/login.jsp
+0
-1
src/main/webapp/WEB-INF/jsp/wiews/index.jsp
src/main/webapp/WEB-INF/jsp/wiews/index.jsp
+3
-2
src/main/webapp/WEB-INF/web.xml
src/main/webapp/WEB-INF/web.xml
+23
-0
No files found.
.settings/org.eclipse.core.resources.prefs
View file @
5d41db5a
eclipse.preferences.version=1
encoding//src/main/resources=UTF-8
encoding//src/main/webapp/WEB-INF/jsp/login.jsp=UTF-8
encoding//src/main/webapp/WEB-INF/jsp/wiews/index.jsp=UTF-8
encoding//src/test/resources=UTF-8
encoding/<project>=UTF-8
pom.xml
View file @
5d41db5a
...
...
@@ -12,6 +12,7 @@
<packaging>
war
</packaging>
<properties>
<project.build.sourceEncoding>
UTF-8
</project.build.sourceEncoding>
<jdk.target>
1.7
</jdk.target>
<jdk.source>
1.7
</jdk.source>
<show.deprecations>
false
</show.deprecations>
...
...
src/main/java/org/crophub/spring/AddStuffInterceptor.java
View file @
5d41db5a
...
...
@@ -15,13 +15,17 @@ public class AddStuffInterceptor implements HandlerInterceptor {
@Override
public
void
postHandle
(
HttpServletRequest
arg0
,
HttpServletResponse
arg1
,
Object
arg2
,
ModelAndView
modelAndView
)
throws
Exception
{
// Authentication auth = SecurityContextHolder.getContext().getAuthentication();
// if (auth.isAuthenticated())
// modelAndView.addObject("userPrincipal", auth.getPrincipal());
long
startTime
=
(
Long
)
arg0
.
getAttribute
(
"springStartTime"
);
long
endTime
=
System
.
currentTimeMillis
();
long
executeTime
=
endTime
-
startTime
;
arg0
.
setAttribute
(
"springExecuteTime"
,
executeTime
);
}
@Override
public
boolean
preHandle
(
HttpServletRequest
arg0
,
HttpServletResponse
arg1
,
Object
arg2
)
throws
Exception
{
long
startTime
=
System
.
currentTimeMillis
();
arg0
.
setAttribute
(
"springStartTime"
,
startTime
);
return
true
;
}
...
...
src/main/resources/content/language.properties
View file @
5d41db5a
...
...
@@ -69,6 +69,7 @@ sample.message.invite.organizations = Invite Organizations
sample.message.invite.to.network
=
Invite to Network
data.error.404
=
The data you requested was not found in the system.
page.rendertime
=
Processing this page took {0}ms.
user.pulldown.logout
=
Logout
user.pulldown.profile
=
View profile
...
...
src/main/webapp/WEB-INF/decorator/main.jsp
View file @
5d41db5a
...
...
@@ -93,7 +93,13 @@
<div
id=
"dialog"
></div>
<sitemesh:write
property=
"body"
/>
<!-- Processing time:
<div class="footer clearfix" style="font-size: 80%">
<spring:message
code=
"page.rendertime"
arguments=
"
${
springExecuteTime
}
"
/>
</div>
-->
</div>
</div>
</body>
</html>
src/main/webapp/WEB-INF/jsp/index.jsp
View file @
5d41db5a
...
...
@@ -9,7 +9,7 @@
<body>
<c:if
test=
"
${
cropList
ne
null
and
cropList
.
size
()
gt
0
}
"
>
<div
class=
"pull-left"
style=
"margin-right: 5%;"
>
<div
class=
"pull-left"
style=
"
width: 20%;
margin-right: 5%;"
>
<h3><spring:message
code=
"crop.croplist"
/></h3>
<ul>
<c:forEach
items=
"
${
cropList
}
"
var=
"crop"
varStatus=
"status"
>
...
...
@@ -20,7 +20,7 @@
</c:if>
<c:if
test=
"
${
lastNews
ne
null
}
"
>
<div
class=
"pull-left"
style=
"width:
6
0%; margin-left: 5%"
>
<div
class=
"pull-left"
style=
"width:
7
0%; margin-left: 5%"
>
<h3><spring:message
code=
"activity.recent-activity"
/></h3>
<c:forEach
items=
"
${
lastNews
}
"
var=
"activityPost"
varStatus=
"status"
>
<div
class=
"activity-post"
>
...
...
src/main/webapp/WEB-INF/jsp/init.jsp
View file @
5d41db5a
<%@ page
contentType=
"text/html;charset=UTF-8"
language=
"java"
%>
<%@ page
contentType=
"text/html;charset=UTF-8"
pageEncoding=
"UTF-8"
language=
"java"
%>
<%@ taglib
prefix=
"c"
uri=
"http://java.sun.com/jsp/jstl/core"
%>
<%@ taglib
prefix=
"security"
uri=
"http://www.springframework.org/security/tags"
%>
<%@ taglib
prefix=
"spring"
uri=
"http://www.springframework.org/tags"
%>
...
...
src/main/webapp/WEB-INF/jsp/login.jsp
View file @
5d41db5a
...
...
@@ -7,7 +7,6 @@
<title><spring:message
code=
"sample.message.index.title"
/></title>
</head>
<body>
<c:if
test=
"
${
param
[
'error'
]
ne
null
}
"
>
<div
class=
"alert alert-error"
><spring:message
code=
"sample.error.wrong.credentials"
/></div>
</c:if>
...
...
src/main/webapp/WEB-INF/jsp/wiews/index.jsp
View file @
5d41db5a
...
...
@@ -11,13 +11,14 @@
<spring:message
code=
"faoInstitutes.page.list.title"
/>
</h1>
<div
class=
"nav-header"
><a
href=
"?page=${faoInstitutes.number}"
>
⇇ Previous
</a>
<a
href=
"?page=${faoInstitutes.number + 2}"
>
Next ⇉
</a></div>
<ul>
<c:forEach
items=
"
${
faoInstitutes
.
content
}
"
var=
"faoInstitute"
varStatus=
"status"
>
<li><a
href=
"
<c:url
value=
"/wiews/${faoInstitute.code.toLowerCase()}"
/>
"
><b><c:out
value=
"
${
faoInstitute
.
code
}
"
/></b>
<c:out
value=
"
${
faoInstitute
.
fullName
}
"
/></a></li>
</c:forEach>
</ul>
<a
href=
"?page=${faoInstitutes.number}"
>
Previous
</a>
<a
href=
"?page=${faoInstitutes.number + 2}"
>
Next
</a>
<div
class=
"nav-header"
><a
href=
"?page=${faoInstitutes.number}"
>
⇇ Previous
</a>
<a
href=
"?page=${faoInstitutes.number + 2}"
>
Next ⇉
</a></div>
</body>
</html>
\ No newline at end of file
src/main/webapp/WEB-INF/web.xml
View file @
5d41db5a
...
...
@@ -17,6 +17,23 @@
<listener-class>
org.springframework.web.context.request.RequestContextListener
</listener-class>
</listener>
<filter>
<filter-name>
encodingFilter
</filter-name>
<filter-class>
org.springframework.web.filter.CharacterEncodingFilter
</filter-class>
<init-param>
<param-name>
encoding
</param-name>
<param-value>
UTF-8
</param-value>
</init-param>
<init-param>
<param-name>
forceEncoding
</param-name>
<param-value>
true
</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>
encodingFilter
</filter-name>
<url-pattern>
/*
</url-pattern>
</filter-mapping>
<filter>
<filter-name>
org.springframework.security.filterChainProxy
</filter-name>
<filter-class>
org.springframework.web.filter.DelegatingFilterProxy
</filter-class>
...
...
@@ -64,4 +81,10 @@
<session-timeout>
30
</session-timeout>
</session-config>
<jsp-config>
<jsp-property-group>
<url-pattern>
*.jsp
</url-pattern>
<page-encoding>
UTF-8
</page-encoding>
</jsp-property-group>
</jsp-config>
</web-app>
\ No newline at end of file
Write
Preview
Markdown
is supported
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