Expand my Community achievements bar.

Learn about Edge Delivery Services in upcoming GEM session

java authentication example jsp

Avatar

Former Community Member
1) season variable is builtin jsp context object, so jsp does
not compile; season variable name needs to be renamed at lines: 31
, 45, 52

for my jsp I named it coco_season :)



2) String select(String r) {// takes String

return r.equals(role) ? "selected" : "";

}



select(100) // passes int. need to pas select("100")



6 Replies

Avatar

Employee
Sigh! I swear I tested this at some point :(

(I bet I got the version hosted in my servlet container
working fine... and then I forgot to copy it back in the SDK
repository ):



Thanks for pointing it out. Fixed for next SDK drop (and if
somebody wants the working version I can post it here or send it
privately)



Avatar

Level 1
Line 70 in index.jsp, 'Flexternal.html?roomURL=<?=
$roomURL ?>&authToken=<%= token %>', does not look
right either. "<?= $roomURL ?> " is more like php
syntax.

Avatar

Former Community Member
it should be :




quote:



win = window.open(

'Flexternal.html?roomURL=<%= roomURL
%>&authToken=<%= token %>',

'_blank',


'left=20,top=20,width=800,height=600,toolbar=1,resizable=1');

Avatar

Employee
yes, I already fixed that one too (and yes, it was more like
php syntax: guess where I started from ? :))



Avatar

Former Community Member

Hi, when I try to run the php authentication example I get the error

"You don't have permission to access /cnx/Flexternal.html on this server."  cnx is my folder name at http://cardcrackers.com/cnx/

I checked the unix permissions and set them to 777 and still this message. I remember reading something about adding some entries to htaccess but not sure if it was related to running this example app or not.

Thanks, Kevin

Avatar

Employee

For some reason it doesn't complain if I access just the HTML file, but it does when all the parameters are on the URL.

Something strange with your server configuration ?

One thing you can try is to escape the parameters (i.e. escape the value of roomURL, that is a full URL, and the authentication token that contains an = sign)