• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

xml and base64 encode help

 
Ranch Hand
Posts: 112
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I have a question here. Please help.
// login jsp page generate a wml file and get the user name(already known)/password(user type in) to re-submit to server and doing the basic authentication
// the username and password need to be encode with base64 to submit this query
// the encode mechaism needs to be done in the client side. (so, I won't be able to write a servlet to encoding it)
// the simulator won't be able to use <meta> tag (so, I can't use this way to set the header)
How can I submit the username and password with base64 encode?? Does it look like this? <?xml version="1.0" encoding="base64"?>
I've been check with some rfc file, can I use UTF-16 to instead(still fail this way)?
Thanks.
<%@ page contentType="text/vnd.wap.wml"%>
<?xml version="1.0" encoding="base64"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http:///www.wapforum.org/DTD/wml_1.1.xml">
<wml>
<card id="login" title="Login Screen">
<p align="left">
authentication test in jsp/wml<br/>
Login name:<input name="LogonName" type="text" emptyok="false" value="<%= request.getRemoteUser() %>" />
Password:<input name="LogonWord" type="text" emptyok="false" value="" />

</p>
<do type="accept" label="Next">
<go href="http://localhost/Services_app/login3.jsp" method="get">
<postfield name="username" value="$(LogonName)" />
<postfield name="password" value="$(LogonWord)" />
</go>
</do>
</card>
</wml>
 
Zoe Peng
Ranch Hand
Posts: 112
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I found the solution. Thanks.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic