Don't know if this is an option, but you can use Jersey:
https://jersey.dev.java.net/
and something like:
@Path("/users/{username}")
public class UserResource {
@GET
@Produces("text/xml")
public String getUser(@PathParam("username") String userName) {
...
}
}
On Aug 5, 2009, at 8:30 AM, Paul Taylor wrote:
Caldarale, Charles R wrote:
From: Paul Taylor [mailto:paul_t...@fastmail.fm]
Subject: Re: How do you handle 'rewrite queries' ?
<servlet-mapping>
<servlet-name>SearchServerServlet</servlet-name>
<url-pattern>/</url-pattern>
</servlet-mapping>
The above causes the SearchServerServlet to be invoked when there's
no path specified in the URI. You want to add a mapping for /ws/
type/ to target the same servlet.
<servlet-mapping>
<servlet-name>SearchServerServlet</servlet-name>
<url-pattern>/ws/type</url-pattern>
</servlet-mapping>
Note that you can use a wildcard character ("*") if you have
multiple patterns to match. In fact, you may be able to simply
modify the original mapping to have a <url-pattern> of /*, but I
haven't tried it.
- Chuck
Thanks actually the default is not picking up the root case, I've
got a simpler related issue by war get deployed as searchserver in
webapps, is there a way I can leave it then and get it to pick up
from root
i.e
http://localhost:8080?query=%22R.E.S%22&type=artist&fmt=xml
instead of
http://localhost:8080/searchserver?query=%22R.E.S%22&type=artist&fmt=xml
and how do i get it maps to port 80 so this will work
http://localhost/searchserver?query=%22R.E.S%22&type=artist&fmt=xml
I know these are basic questions but every time I use Tomcat ( I
last used it three years ago) I have real problems getting these
things working
thanks Paul
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org