Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
solo
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
solo
Commits
10a9bbeb
Commit
10a9bbeb
authored
May 31, 2012
by
Liang Ding
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复加入 context path 后首页分页问题。
parent
4c678cf1
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
2 deletions
+5
-2
core/src/main/java/org/b3log/solo/processor/IndexProcessor.java
...rc/main/java/org/b3log/solo/processor/IndexProcessor.java
+2
-1
war/src/main/resources/latke.properties
war/src/main/resources/latke.properties
+3
-1
No files found.
core/src/main/java/org/b3log/solo/processor/IndexProcessor.java
View file @
10a9bbeb
...
@@ -35,6 +35,7 @@ import java.util.logging.Level;
...
@@ -35,6 +35,7 @@ import java.util.logging.Level;
import
java.util.logging.Logger
;
import
java.util.logging.Logger
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
import
javax.servlet.http.HttpServletResponse
;
import
org.apache.commons.lang.StringUtils
;
import
org.b3log.latke.annotation.RequestProcessing
;
import
org.b3log.latke.annotation.RequestProcessing
;
import
org.b3log.latke.annotation.RequestProcessor
;
import
org.b3log.latke.annotation.RequestProcessor
;
import
org.b3log.latke.model.Pagination
;
import
org.b3log.latke.model.Pagination
;
...
@@ -192,7 +193,7 @@ public final class IndexProcessor {
...
@@ -192,7 +193,7 @@ public final class IndexProcessor {
* can not convert to an number
* can not convert to an number
*/
*/
private
static
int
getCurrentPageNum
(
final
String
requestURI
)
{
private
static
int
getCurrentPageNum
(
final
String
requestURI
)
{
final
String
pageNumString
=
requestURI
.
substring
((
Latkes
.
getContextPath
()
+
'/'
).
length
()
);
final
String
pageNumString
=
StringUtils
.
substringAfter
(
requestURI
,
"/"
);
return
Requests
.
getCurrentPageNum
(
pageNumString
);
return
Requests
.
getCurrentPageNum
(
pageNumString
);
}
}
...
...
war/src/main/resources/latke.properties
View file @
10a9bbeb
...
@@ -16,7 +16,7 @@
...
@@ -16,7 +16,7 @@
#
#
# Description: B3log Latke configurations. Configures the section "Server" carefully.
# Description: B3log Latke configurations. Configures the section "Server" carefully.
# Version: 1.0.0.
4, May 3
, 2012
# Version: 1.0.0.
5, May 31
, 2012
# Author: Liang Ding
# Author: Liang Ding
#
#
...
@@ -36,10 +36,12 @@ staticPath=
...
@@ -36,10 +36,12 @@ staticPath=
#### Runtime Environment ####
#### Runtime Environment ####
#runtimeEnv=LOCAL
#runtimeEnv=LOCAL
runtimeEnv
=
GAE
runtimeEnv
=
GAE
#### Cache Implementation ####
#### Cache Implementation ####
# Note: If the runtime environment is LOCAL, the cache will be LOCAL always
# Note: If the runtime environment is LOCAL, the cache will be LOCAL always
#cache=LOCAL
#cache=LOCAL
cache
=
GAE
cache
=
GAE
#### User Service Implementation ####
#### User Service Implementation ####
# userService=GAE
# userService=GAE
userService
=
LOCAL
userService
=
LOCAL
...
...
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