url-pattern

Servlet URL pattern to match a URL that ends with a slash ("/")

I'd like to specify a Servlet URL pattern to match a URL that ends with a slash ("/") and only a slash. I understand that the pattern /example/path/* will match a URL of http://example.com/example/path/ and that this appears to work. However, that same pattern would also match URLs of http://example.com/example/path/a/ ...

multiple sites with Java App Engine

I'm trying to create a series of sites that all run as one application, but have different designs (to localise them). My idea is to map separate domain names to the one site. E.g: www.mysite1.com maps to www.mysite.appspot.com/mysite1 and www.mysite2.com maps to www.mysite.appspot.com/mysite2 I'm guessing that there must be a url p...

web.xml URL pattern matching question for Tomcat

I'd like to use this kind of a pattern for my Java web app: <url-pattern>/*/test.html</url-pattern> and then parse the URL in the servlet to get what the value of the star is, and use that value to query a different table in the database. However this seems to be an illegal pattern for Tomcat. Is there any way I can achieve this with...

Spring MVC REST : static files unaccessible because of url-pattern

Hi, My Spring Dispatcher servlet url-pattern is /* (as spring MVC REST suggests) Now all the request are resolved by this Servlet. even CSS/JS/Images also get resolved and handled by servlet.. So, Spring MVC tries to find controller.. :( How to bypass this? Is there any standard way out of this problem?? & Don't want to change url-...

python urlpattern newbie question

I'm trying this pattern: (r'^jobs/(?P<job_id>\d+)/$', job_handler) To work with jobs/ and jobs/{job_id}, but the above expression doesn't cover the first case(jobs/), it only work if I do something like: (r'^jobs/$', job_handler), (r'^jobs/(?P<job_id>\d+)/$', job_handler) ...

Variable 'app' in url-pattern for servlet mapping

I'm learning Spring MVC (and servlets in general) and following springsource's mvc-ajax example, which uses annotated controller methods. It appears that there is only one url-pattern (in web.xml) mapped to a servlet in that example: /app/* I've deployed the app as a WAR file, and the actual, ugly URL I'm requesting is http://127.0.0.1...

Mapping to a JSON method with url-pattern

I'm creating a Spring MVC application that will have a controller with 'RequestMapping'-annotated methods, including a JSON method. It currently has static content that resides in webapps/static, and the app itself resides in webapps/myapp. I assume that Catalina's default servlet is handling the static content, and my *.htm url-pattern ...

Servlet mapping url patterns

I have the following urls that need mapping to two different servlets. Can anyone suggest a working url-pattern please? vehlocsearch-ws: /ws/vehlocsearch/vehlocsearch /ws/vehavailrate/vehavailratevehlocsearch /ws/vehavailrate/vehavailratevehlocsearch.wsdl vehavailrate-ws: /ws/vehavailrate/vehavailrate /ws/vehavailrate/vehavail...

Need a software load balancer that can match URL patterns for traffic routing.

I need to balance traffic to several HTTP listeners. They are in two groups for two different purposes. To illustrate... 10.0.0.1 10.0.1.1 10.0.1.2 10.0.2.1 10.0.2.2 -------+-----------+--------+--------+--------+--- | | | | | +--+--+ +-+-+ +-+-+ +-+-+ +-+-+ | LB1...

How do I use wild cards (*) in url-pattern with MVC correctly

I am trying to get a servlet to respond to every request with a url-pattern of "/test/*". so this controller should respond to : myApp/test/ myApp/test/whatever myApp/somehting?other=stuff using the following mapping: <servlet-mapping> <servlet-name>test</servlet-name> <url-pattern>/test/</url-pattern> </servlet-mapping> Th...

How to make spring4gwt export more than 1 service ?

I successfully follow GWT and spring4gwt's tutorials and transform the StockWatcher's demo into a Spring(3.0) enabled service , by the following configurations : web.xml : <servlet-mapping> <servlet-name>springGwtRemoteServiceServlet</servlet-name> <!-- stockWatcher module is rename-to="stock" --> <url-pattern>/stock/spri...

Servlet filter url mapping

How can a filter be mapped to the root of a URL? I'm using Tomcat 7.0.2 and deploying an application as ROOT.war. The welcome page is sign_in.xhtml. I would like to run a filter whenever the client sends a request for the root of the site (i.e. the domain name only), or when the the client requests sign_in.xhtml. Here is what I have s...

REST API with web application(JSP,Servlets)

I have one normal servlet and one jersey specific REST related servlet i.e.ServletContainer configured in web.xml. Case 1 - Url pattern for normal servlet is "/login" Url pattern for other REST servlet is "/" In this case all request will got REST servlet. Request for login also goes to tht Servlet only. Case 2 - If Url pattern for RES...

Shorten path of REST service in JBoss Seam application still wrong

I got a similar question as: http://stackoverflow.com/questions/3248814/shorten-path-of-rest-service-in-jboss-seam-application/3248902#3248902 But couldn't comment on the shipmaster answer because of my initial rep. His comment Jul 19 at 18:10 misunderstood the situation: Faces servlet is mapped by url-pattern *.xhtml and Seam Resource ...