summaryrefslogtreecommitdiffstats
path: root/java
diff options
context:
space:
mode:
authorslaws <slaws@13f79535-47bb-0310-9956-ffa450edef68>2008-06-29 18:43:35 +0000
committerslaws <slaws@13f79535-47bb-0310-9956-ffa450edef68>2008-06-29 18:43:35 +0000
commitc40a2f25b1200fa3a25f6affb5844de5f598ff6c (patch)
tree48f2649dd79f8fc6338719fed127bf7c5c42806b /java
parentf394abe6a74b4c2b0ffb904e585f8066f6456835 (diff)
TUSCANY-2430, fix the algorithm used to work out the feed URL.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@672659 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to '')
-rw-r--r--java/sca/modules/binding-atom-abdera/src/main/java/org/apache/tuscany/sca/binding/atom/provider/AtomBindingListenerServlet.java5
-rw-r--r--java/sca/samples/feed-aggregator-webapp/src/main/resources/FeedAggregator.composite2
-rw-r--r--java/sca/samples/feed-aggregator/src/main/resources/FeedAggregator.composite2
3 files changed, 5 insertions, 4 deletions
diff --git a/java/sca/modules/binding-atom-abdera/src/main/java/org/apache/tuscany/sca/binding/atom/provider/AtomBindingListenerServlet.java b/java/sca/modules/binding-atom-abdera/src/main/java/org/apache/tuscany/sca/binding/atom/provider/AtomBindingListenerServlet.java
index 31976ec260..8244a2495f 100644
--- a/java/sca/modules/binding-atom-abdera/src/main/java/org/apache/tuscany/sca/binding/atom/provider/AtomBindingListenerServlet.java
+++ b/java/sca/modules/binding-atom-abdera/src/main/java/org/apache/tuscany/sca/binding/atom/provider/AtomBindingListenerServlet.java
@@ -147,9 +147,10 @@ class AtomBindingListenerServlet extends HttpServlet {
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
// No authentication required for a get request
-
+
// Get the request path
- String path = URLDecoder.decode(request.getRequestURI().substring(request.getServletPath().length()), "UTF-8");
+ int servletPathLength = request.getContextPath().length() + request.getServletPath().length();
+ String path = URLDecoder.decode(request.getRequestURI().substring(servletPathLength), "UTF-8");
logger.fine("get " + request.getRequestURI());
diff --git a/java/sca/samples/feed-aggregator-webapp/src/main/resources/FeedAggregator.composite b/java/sca/samples/feed-aggregator-webapp/src/main/resources/FeedAggregator.composite
index e3f20e9eed..d41fe3e4a0 100644
--- a/java/sca/samples/feed-aggregator-webapp/src/main/resources/FeedAggregator.composite
+++ b/java/sca/samples/feed-aggregator-webapp/src/main/resources/FeedAggregator.composite
@@ -31,7 +31,7 @@
<component name="RssAggregator">
<implementation.java class="feed.AggregatorImpl"/>
- <reference name="rssfeed1">
+ <reference name="rssFeed1">
<tuscany:binding.rss uri="http://newsrss.bbc.co.uk/rss/newsonline_uk_edition/world/rss.xml"/>
</reference>
<reference name="rssFeed2">
diff --git a/java/sca/samples/feed-aggregator/src/main/resources/FeedAggregator.composite b/java/sca/samples/feed-aggregator/src/main/resources/FeedAggregator.composite
index 836499e58f..34f313672e 100644
--- a/java/sca/samples/feed-aggregator/src/main/resources/FeedAggregator.composite
+++ b/java/sca/samples/feed-aggregator/src/main/resources/FeedAggregator.composite
@@ -31,7 +31,7 @@
<component name="RssAggregator">
<implementation.java class="feed.AggregatorImpl"/>
- <reference name="rssfeed1">
+ <reference name="rssFeed1">
<tuscany:binding.rss uri="http://newsrss.bbc.co.uk/rss/newsonline_uk_edition/world/rss.xml"/>
</reference>
<reference name="rssFeed2">