Hello Christopher, thanks, responses below.

On Tue, Mar 8, 2016 at 6:23 PM, Christopher Schultz <
ch...@christopherschultz.net> wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Yuval,
>
> On 3/8/16 3:14 AM, Yuval Schwartz wrote:
> > Tomcat version: 8.0.22 Jdk: 1.8.0_05 Server: Amazon Linux
> >
> > Hello,
> >
> > I want to map my servlet to a Hebrew url pattern.
>
> Hmm.
>
> > I tried placing the hebrew url pattern both in the "@webservlet"
> > annotation (urlpatterns attribute) and in the the web.xml file. In
> > both cases it doesn't work, it's as if there's nothing mapped to
> > the url specified.
> >
> > I though to specify the URIEncoding parameter of the connector but
> > saw that this defaults to "utf-8" in tomcat 8.
>
> Yes, it does.
>
> So you are trying to set the url-pattern for a servlet mapping?
>
> When you do it -- either using @WebServlet or <servlet-mapping> -- can
> you connect via JMX to observe the pattern that's been read into the
> configuration? First, I'd want to make sure that the Hebrew characters
> haven't been destroyed by the loading process of the XML file or by
> the compiler, or even by Tomcat.
>

Can you give me some direction on how I would do this? Maybe a little more
detail on jmx? There could be encoding/decoding going on in the browser
(firefox) and in all the elements you mentioned on the server side. Any way
to see the final String that the server is using to match the Url pattern?

I've done a lot of guessing and checking. For example, I used the
URLEncoder to get the encoded form of my urls and put that in the url
pattern. Therefore, the xml loading process/compiler/tomcat/netbeans
shouldn't do anything to change it (in the case where I encode the
pattern), but the servlet still isn't found.

Thanks.


> Can you confirm that the browser is sending the URL without ruining it
> as well?
>
> Tomcat's Mapper follows the spec-defined rules for mapping a URL to a
> servlet, so it's possible that another servlet will take-over the
> mapping, depending upon how it's defined. Remember, the spec says that
> an exact-match wins, followed by a prefix-match (/foo/bar/baz/*)
> (longest match wins), followed by an extension-match (*.img), followed
> by things like welcome-file resources, etc.
>
> - -chris
> -----BEGIN PGP SIGNATURE-----
> Comment: GPGTools - http://gpgtools.org
> Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
>
> iEYEARECAAYFAlbe/IMACgkQ9CaO5/Lv0PCupACbBDmQYb9WmxM6R0F+FpKK6bB5
> /DMAnAv7tv6nYOcfQDXFl1NltegV47lA
> =L+ec
> -----END PGP SIGNATURE-----
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>

Reply via email to