At 12:25 PM 9/3/99 +0300, you wrote:
>>Why not just put the parameters into the URL?
>
>>
>
>> <do type="accept" label="Send">
>
>>     <go method="get" href="http://welcome2?name=$(fname)"/>
>
>></do>
>
>>
>>This way you CAN get the parameters with "getParameter("name")".
>>
>>Joona Palaste
>
>I tried it and it doesn't make a difference...
>getParameter("name") still returns null.
>
>Here is the code from servlet welcome2:
>
>public void doGet (HttpServletRequest req, HttpServletResponse res) throws
ServletException, IOException
>{
>  res.setContentType("text/vnd.wap.wml");
>  PrintWriter out = res.getWriter();
>  String name = req.getParameter("name");          // get user's name
>  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=\"main\" title=\"Welcome\">");
>  out.println("<p align=\"center\">");
>  out.println("&nbsp;<br/>");
>  out.println("<small>");
>  out.println("Hello, " + name + ".");
>  out.println("</small>");
>  out.println("</p>");
>  out.println("</card>");
>  out.println("</wml>");
>  out.close();
>}
>
>This code displays
>     Hello, null.
>instead of, for example,
>     Hello, Mike.
>on the screen.
>
>Ali Yildirim

This is weird. I have developed a simple WML servlet myself, it works
mostly like yours, and displays variable values OK.
I'm guessing here, but there could be a difference in the content type,
because I use "text/x-wap.wml" and you use "text/vnd.wap.wml". But I see no
reason why content type would matter.
Are you sure the variable name in the WML deck which generates the request is
spelled right? Remember, the names are case-sensitive.

Joona Palaste

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to