Calling a link and navigating. (The link is created in a dynamic WML card using a servlet)
Hi,
The normal dynamic cards that r created in a servlet r working fine.(text
prints ok)Problem comes with the link.Seems like the server can't load it.Pls
help me.
I have a problem in running a dynamically created wml in a servlet when i
want to call a link in it.
A wml card passes some parameters to a particular Servlet in my application.After
verifying those parameters the servlet has got to move to another card.I
have dynamically created this card in the servlet.
It has a <go ref='client.wml#incident'/> to tell to go to that particular
deck and card.But this doesn't happen at all.I get an error telling that
card can't be loaded.
I am using the JavaWebServer2.0.I did add the 3 relevant MIME types also
to the MIME type section of the JAVAWEBSERVER2.0.
I added like this
wml=text/vnd.wap.wml
wmls=text/vnd.wap.wmlscript
wbmp=images/vnd.wap.wbmp
I also went and pasted all the relevant wml files also in the folder where
the classes have got to be there in order to run a servlet in the JAVAWEBSERVER2.0.But
nothing works.
Can u help me to figure out what has to be done in order to display this
relavant wml file through that link.
Can u pls tell me how to make this working as i'm in urgent need of help.How
to make the servlet go to that link.
This is my code
-----------------------------
out.println("<?xml version='1.0'?> ");
out.println("<!DOCTYPE wml PUBLIC '-//WAPFORUM//DTD WML 1.1//EN' 'http://www.wapforum.org/DTD/wml_1.1.xml'>");
out.println("<wml> ");
out.println("<card id='card1' title='Error'> ");
out.println("<do type='accept' label='Ok'>");
out.println("<go href='trialtest.wml#Login'/>");
out.println("</do>");
out.println("<p>");
out.println("<strong><b>Incorrect User Login.</b></strong><br/>");
out.println("Please! do try again.<br/> ");
out.println("<br/>");
out.println("</p> ");
out.println("</card> ");
out.println("</wml> ");
out.close();
-----------------------------
Thanks
Kaushi
Re: Calling a link and navigating. (The link is created in a dynamic WML card using a servlet)
hi Kaush,
well the problem seems that the link which u want to go when selected is not
loaded in the wml desk
what u could do is create the card #incident and send along with the desk so
that when link is clicked it goes on the incident card in the same desk.
the browser tries to find the card in the same desk and gives error when it
does not find it.
Umesh Sonavane
Verchaska Infotech
umesh@verchaska.com
www.verchaska.com
"kaush" <kaushali_m@yahoo.com> wrote in message
news:3af08de1$1@news.devx.com...
>
> Hi,
>
> The normal dynamic cards that r created in a servlet r working fine.(text
> prints ok)Problem comes with the link.Seems like the server can't load
it.Pls
> help me.
>
> I have a problem in running a dynamically created wml in a servlet when i
> want to call a link in it.
>
> A wml card passes some parameters to a particular Servlet in my
application.After
> verifying those parameters the servlet has got to move to another card.I
> have dynamically created this card in the servlet.
>
> It has a <go ref='client.wml#incident'/> to tell to go to that particular
> deck and card.But this doesn't happen at all.I get an error telling that
> card can't be loaded.
>
> I am using the JavaWebServer2.0.I did add the 3 relevant MIME types also
> to the MIME type section of the JAVAWEBSERVER2.0.
>
> I added like this
>
> wml=text/vnd.wap.wml
> wmls=text/vnd.wap.wmlscript
> wbmp=images/vnd.wap.wbmp
>
> I also went and pasted all the relevant wml files also in the folder where
> the classes have got to be there in order to run a servlet in the
JAVAWEBSERVER2.0.But
> nothing works.
>
> Can u help me to figure out what has to be done in order to display this
> relavant wml file through that link.
>
> Can u pls tell me how to make this working as i'm in urgent need of
help.How
> to make the servlet go to that link.
>
>
> This is my code
>
> -----------------------------
>
> out.println("<?xml version='1.0'?> ");
> out.println("<!DOCTYPE wml PUBLIC '-//WAPFORUM//DTD WML 1.1//EN'
'http://www.wapforum.org/DTD/wml_1.1.xml'>");
> out.println("<wml> ");
> out.println("<card id='card1' title='Error'> ");
> out.println("<do type='accept' label='Ok'>");
> out.println("<go href='trialtest.wml#Login'/>");
> out.println("</do>");
> out.println("<p>");
> out.println("<strong><b>Incorrect User Login.</b></strong><br/>");
> out.println("Please! do try again.<br/> ");
> out.println("<br/>");
> out.println("</p> ");
> out.println("</card> ");
> out.println("</wml> ");
> out.close();
>
> -----------------------------
>
> Thanks
> Kaushi