Hi,
So as my http basic setup continues to befuddle me I decided to use a
login form instead.
So I wrote an Authentication filter that basically looks for a session
id if it isn't found or the associated session is stale it redirects
to a login resource which is basically "/login".
That resource's representation is a login form which is submitted with
a Post to the same resource ("/login").
Now I am having trouble getting to the username password.
Here is the debug code ..
protected void handlePost(Call call) {
String output ="";
Form form = call.getInputAsForm();
output += "<hr/><br/>input Parameters: <br/>";
output += "<table><tr><td>Key</td><td>Value</td></tr>";
for(Parameter param: form) {
output += String.format("<tr><td>%s</td><td>%s</td></tr>",
param.getName(), param.getValue());
}
output += "</table>";
call.setOutput(new StringRepresentation(output, MediaType.TEXT_HTML));
}
This gets me an output like
input Parameters:
Key Value
-----------------------------266432908916052-- null
First question of course is am i on the right track?
Second if yes then what am I missing here?
Cheers
Piyush