BlackBerry Forums Support Community
              

Closed Thread
 
Thread Tools
Old 04-20-2005, 06:29 PM   #1
sacramentojoe
Knows Where the Search Button Is
 
Join Date: Apr 2005
Model: 7230
Posts: 30
Default JSP & WML & WAP

Please Login to Remove!

I'm trying to write a small app for my company. I want to use some WML / WAP mixed in with some JSP's.

I open up my simulator and type in my url http://localhost/index.wml
This asks for my username and password. I enter it as required and hit "Submit".
I have
<do type="accept" label="Answer">
<go href="/loginPage.jsp"/>
</do>

When I click on this and go to my loginPage.jsp it's not reading the request.getParameter("username");

How can I get parameters from the wml card to be seen on my jsp?

Thanks.
Offline  
Old 04-20-2005, 07:42 PM   #2
sacramentojoe
Knows Where the Search Button Is
 
Join Date: Apr 2005
Model: 7230
Posts: 30
Default

Nevermind. I found my own answer.

Thanks though.

Code:
Username: <input name="userName" size="15" /><br/>
Password: <input name="password" size="15" /></br/>

<do type="accept" label="Log In">
<go href="/loginPage.jsp">
<postfield name="username" value="$(userName)"/>
<postfield name="password" value="$(password)"/>
</go>
</do>

Last edited by sacramentojoe; 04-20-2005 at 07:45 PM.. Reason: Added code snippet
Offline  
Old 04-21-2005, 09:13 AM   #3
tfly
Thumbs Must Hurt
 
Join Date: Feb 2005
Model: 8310
Carrier: AT&T
Posts: 53
Default

what do you have to do?
Offline  
Old 04-21-2005, 01:38 PM   #4
sacramentojoe
Knows Where the Search Button Is
 
Join Date: Apr 2005
Model: 7230
Posts: 30
Default

Quote:
Originally Posted by tfly
what do you have to do?
Look at my code snippet.

You have to add this:
<postfield name="username" value="$(userName)"/>
<postfield name="password" value="$(password)"/>

otherwise it doesn't get sent in the request object.

Also, the request.getMethod() doesn't work either.
So to make sure it was posting I had to add
<postfield name="method" value="post">
and then on my JSP I had to look for request.getParameter("method").equals("post")

Seems like a hack to me but It seems thats how it works.
Offline  
Closed Thread


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


Lot of NOS Carbon Composition Resistors 2 watt 10% Vintage IRC TRW 2w picture

Lot of NOS Carbon Composition Resistors 2 watt 10% Vintage IRC TRW 2w

$29.99



Vintage Leather bound Journal Antique Handmade Paper Notebook Diary Sketchbook picture

Vintage Leather bound Journal Antique Handmade Paper Notebook Diary Sketchbook

$59.00



US Vintage Thick Blank Paper Notebook Notepad Leather Journal Diary Sketchbook picture

US Vintage Thick Blank Paper Notebook Notepad Leather Journal Diary Sketchbook

$16.19



Boho Print Poly Mailers Plastic Envelopes Shipping Bags Custom #SmileMail® picture

Boho Print Poly Mailers Plastic Envelopes Shipping Bags Custom #SmileMail®

$86.95



Vintage M. Klein & Sons Tools no. 1628-5 8000lb Cable Puller Wire Pulling Tool picture

Vintage M. Klein & Sons Tools no. 1628-5 8000lb Cable Puller Wire Pulling Tool

$48.99



Vintage Leather Bound Journal Notebook with Handmade Antique Deckle Edges Paper picture

Vintage Leather Bound Journal Notebook with Handmade Antique Deckle Edges Paper

$59.99







Copyright 2004-2016 BlackBerryForums.com.
The names RIM and BlackBerry are registered Trademarks of BlackBerry Inc.