• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 679
  • Last Modified:

WAP & Oracle database

So here's the problem, I'm on a project where we're about to create a Java application which is going to use a Oracle database. We also want the database to be accessible through WAP.

We've been able to make ourselves a Login page.
<?xml version="1.0"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml">

<wml>
<card title="Login">

<p>
Username: <input name="Username" size="15"/><br/>
Password:  <input name="Password" size="15"/><br/>
</p>

</card>
</wml>

Now we want this is where the database comes in. Checking username and password up against previously added records.
How do we do that?

Any help appreciated,
eX.
0
Gaute Rønningen
Asked:
Gaute Rønningen
1 Solution
 
Gaute RønningenOwner, DeveloperAuthor Commented:
Did a little research. We gotta use WMLScript, but neither of us know the WMLScript language and how it operates. Any tutorials on how one is to check input values up against an oracle database?
0
 
rama_krishna580Commented:
Hi,

look at here..
http://doug.burns.tripod.com/wap.html
http://nds1.forum.nokia.com/nnds/ ForumDownloadServlet?id=4016&name=Oracle_mobile_WP_en.pdf

i hope it may help you//

R.K
0
Improved Protection from Phishing Attacks

WatchGuard DNSWatch reduces malware infections by detecting and blocking malicious DNS requests, improving your ability to protect employees from phishing attacks. Learn more about our newest service included in Total Security Suite today!

 
virtue79Commented:
> Did a little research. We gotta use WMLScript, but neither of us know the WMLScript language and how it operates.

Some WMLScript tutorials can be found at:
http://www.developershome.com/wap/wmlscript/
http://www.w3schools.com/wmlscript/default.asp


It should be noted that WMLScript is a client-side scripting language. To check the username and password against the records in a database, I think you need to send the data back to the server first (Have a look here http://www.developershome.com/wap/wml/wmlSendingData.asp). Then use a server-side language like JSP to retrieve the record in the database and compare it with the user data.
0
 
tomgalloCommented:
WAP is like ordinary HTML

Here you got a Login example using JSP and WML:

<%
      response.setContentType("text/vnd.wap.wml");
      response.setIntHeader("Expire",-1);
      response.setHeader("Pragma","no-cache");
      response.setHeader("CacheControl","no-cache, must-revalidate");
%>
<%String sUrl=(String)request.getAttribute("wmsUrl");%>
<?xml version="1.0"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml">
<wml>
      <head>
            <meta forua="true" http-equiv="Cache-Control" content="max-age=0"/>
      </head>

      <card id="UserLogin">
            <onevent type="onenterforward">
                  <refresh>
                        <setvar name="user" value=""/>
                        <setvar name="password" value=""/>
                  </refresh>
            </onevent>
            
            <do type="accept" label="Sgte.">
                  <go href="#PasswordLogin"/>
            </do>
            <p align="left">
                  User: <input type="text" name="user" value="" format="N*" maxlength="10" emptyok="false"/>
            </p>
      </card>

      <card id="PasswordLogin">
            <do type="accept" label="Sgte.">
                  <go href="<%=sUrl%>" method="post">
                        <postfield name="event" value="makelogin"/>
                        <postfield name="user" value="$(user)"/>
                        <postfield name="password" value="$(password)"/>
                  </go>
            </do>

            <p align="left">
                  Password: <input name="password" type="password" value="" format="N*" maxlength="10" emptyok="false"/>
            </p>
      </card>
</wml>
0
 
tomgalloCommented:
Another example here using only the cellphone number to login (always using JSP and WAP):

<%
      response.setContentType("text/vnd.wap.wml");
      response.setIntHeader("Expire",-1);
      response.setHeader("Pragma","no-cache");
      response.setHeader("CacheControl","no-cache, must-revalidate");
%>
<%String sUrl=(String)request.getAttribute("wmsUrl");%>
<?xml version="1.0"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml">
<wml>
      <head>
            <meta forua="true" http-equiv="Cache-Control" content="max-age=0"/>
      </head>
      <card id="PhoneLogin">
            <do type="accept" label="Sgte.">
                  <go href="<%=sUrl%>" method="post">
                        <postfield name="event" value="makeloginphone"/>
                        <postfield name="phone" value="$(phone)"/>
                  </go>
            </do>
            <p align="left">
                  Telefono: <input type="text" name="phone" value="" format="N*" maxlength="15" emptyok="false"/>
            </p>
      </card>
</wml>

Hope it helps.
-tom
0
 
tomgalloCommented:
Sorry a correction on my first answer...
When I said: WAP is like ordinary HTML
I mean: WML is like ordinary HTML

WAP is a protocol (wireless application protocol).

-tom
0
 
tomgalloCommented:
Vernabili,

I do not think that all answers have the same value this time...
I don't see that a split as the correct closing method in this question.

My answers are more specific and to the point that the others.

That is my point of view,
-tom

0
 
Gaute RønningenOwner, DeveloperAuthor Commented:
Sorry, didn't check EE for awhile...
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Improved Protection from Phishing Attacks

WatchGuard DNSWatch reduces malware infections by detecting and blocking malicious DNS requests, improving your ability to protect employees from phishing attacks. Learn more about our newest service included in Total Security Suite today!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now