Okay, this is for anyone who searches for a solution with this same problem : Apache server with Railo & Tomcat on a linux box which displays empty cgi variables on a custom 404 error page. Here is what I did (reference to this post, all credit due to the author, but I'm posting it here too with simplified instructions
Added the followings to my httpd.conf file, in the <IfModule mod_jk.c> section :
JkEnvVar REDIRECT_URL ""
JkEnvVar REDIRECT_REMOTE_HOST ""
JkEnvVar REDIRECT_PATH ""
JkEnvVar REDIRECT_QUERY_STRING ""
JkEnvVar REDIRECT_HTTP_ACCEPT ""
JkEnvVar REDIRECT_HTTP_USER_AGENT ""
JkEnvVar REDIRECT_REMOTE_ADDR ""
JkEnvVar REDIRECT_SERVER_NAME ""
JkEnvVar REDIRECT_SERVER_PORT ""
JkEnvVar REDIRECT_SERVER_SOFTWARE ""
Restarted my server, then set a variable via CFML using this :
<cfset checkName = getPageContext().getRequest().getOriginalRequest().getAttribute('REDIRECT_URL')>
This worked perfectly for, and I hope someday someone pulling their hair out for hours finds this post and it helps them too. Thank you fo ryour help feherke and to the author of the link I posted. Finally I can have custom urls for user profiles.