添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接

How to pass special characters in the URL ?
Example : http://mytest.cfm?var=règle (character è)
This gives an error :
Un caractère invalide a été trouvé dans la cible de la requête
from Apache Tomcat/9.0.24

Is there something to set in the Tomcat conf to allow spec char in URLs ?
in server.xml

Thanks for help
Pierre.

Don’t forget to tell us about your stack!
Linux debian 10
apache 2.4
Lucee 5.3.7.47
Tomcat 9

Hi @Pierre_Larde

My suggestion is instead of allowing a page to query a variable, set the variable as a post vs a url query parameter.

The second issue is your request isnt UTF8 compliant so you search engines, browsers and tomcat may not like what you are trying to do.

What you could try, and is to look at ASCII mapping for that character and then encode character value and then decode the request

Take a look at
https://docs.lucee.org/reference/functions/decodefromurl.html
asciitable.com

I avoid passing spec chars in URLs.
But, sometimes this exist in applications, I wrote or written by someone else.
Under WindowsXP/Coldfusion 8, there is no error. (old application).
I still have this on a local server. (it works fine)

There should be a way to make it work, without Forms or CF functions in that new environment.

I try to find it, It seems it comes from Tomcat ?

Thanks for others ideas.
Pierre.

With this new environment, It seems it depends on browser used ?
Old browser gives error,
New browser , no error. (spec char pass in URL, without doing anything)

I am lost.

Pierre.

É or other special characters in the url might work, but its not compliant. You should/must urlencode that.

What is URL Encoding and How does it work? | URLEncoder ).

Old versions of ACF before 10 ran JRUN, which to say is insecure and different is a an understatement.

As for forms, You still define a form in html using what ever framework you want. You wrap what ever application logic around it and post it to do something.

form method = post action = some_cf_page.cfm or php, or whatever.