It is likely that my problem has to do with how I am defining my application
in Tomcat. I'm not using a war file and in my server.xml file, i specify
the default context
Context path= docBase=myApplication debug=5
So, there is probably something that Tomcat is doing with a typical uri
reference like http://127.0.0.1:9006/myResource/buildings/indiana
btw, if i specify the typical mapping (url-pattern/*/url-pattern), then
i get a nice xml rep of the indiana data -- but the rest of my application
is broken since other servlets cannot be referenced.
TKM wrote:
I've spent several hours reading this nabble and online documentation and
still can't get a simple variation of firstResources for Restlet 2.0 to
work.
In my case, i have a web app running on Tomcat 6.0.14 that i want to
retrofit to include restlets. I have several servlets defined, so using
/* as my servlet-mapping isn't possible. Everyone says you can specify a
mapping that the Restlet API will recognize, but mine fails with a The
server has not found anything matching the request URI message. I
specified the URI via restlet.xml and as shown below. Access to the other
servlets in the application are not affected, i.e. they work.
my mapping in web.xml:
servlet-mapping
servlet-nameRestletServlet/servlet-name
url-pattern/myResource/*/url-pattern
/servlet-mapping
the body of my applications createRoot() includes:
router.attach(/myResource/buildings, BuildingsResource.class);
router.attach(/myResource/buildings/{buildingName},
BuildingResource.class);
//
myLog.info(myResources:+router.get(/myResource/buildings).getEntityAsText());
//
myLog.info(myResource:+router.get(/myResource/buildings/Indiana).getEntityAsText());
Output from catalina.log is good, so i know that the request is being
passed to my restlet:
Jul 31, 2009 10:09:25 AM org.restlet.engine.log.LogFilter afterHandle
INFO: 2009-07-31 10:09:25127.0.0.1 - 127.0.0.1
9006GET
/myResource/buildings - 404 330 - 1
http://127.0.0.1:9006 Mozilla/5.0
(Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.0.12)
if i uncomment the getEntityAsText() calls in createRoot(), I get good
results so I know my implementation of BuildingsResource and
BuildingResource are working.
does anyone see what i'm doing wrong?
--
View this message in context:
http://n2.nabble.com/A-simple-URI-problem-tp3363341p3364583.html
Sent from the Restlet Discuss mailing list archive at Nabble.com.
--
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=2377528