Hi,
Make sure "LOGINVALIDATE.JSP" has XHTML rather than HTML i.e. make sure all
tags have end tags or closed properly.
You can return a xml string from LOGINVALIDATE.JSP. It's better to create a
separate LOGINVALIDATE.JSP for flex only, I mean if you are using
LOGINVALIDATE.JSP for a html front-end also then it might not work with
HTTPService. HTTPService expects result in form of XML or LoadVars(if you
specify that option).
For example:
##LOGINVALIDATE.JSP##
<%
//process uid and password
//set userID and bLoginSucceeded
%>
<LOGIN_RESULT>
<USER_ID><%=userID%></USER_ID>
<VALID><%=bLoginSucceeded%></VALID>
</LOGIN_RESULT>
In flex app, you can access response in following way, suppose "hs" id of
HTTPService tag:
hs.result.LOGIN_RESULT.USER_ID
hs.result.LOGIN_RESULT.VALID
-abdul
-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of gaurav verma
Sent: Tuesday, May 17, 2005 11:48 AM
To: [email protected]
Subject: [flexcoders] help on HTTP service
not able to send data from the mxml to the jsp page
i want create a page which takes the values like "LOGIN ID"
and "PASSWORD" to the another JSP page( this pages validates the
loginid from my database) im using the following code :
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.macromedia.com/2003/mxml">
<mx:HTTPService id="foo" method="POST"
url="http://pjainserver:8101/login/loginvalidate.jsp" >
<mx:request>
<pi_user_id>{username.text}</pi_user_id>
<pi_passwd>{password.text}</pi_passwd>
</mx:request>
</mx:HTTPService>
<mx:Form defaultButton="mySubmitButton" >
<mx:FormItem label="Username">
<mx:TextInput id="username" width="100"/>
</mx:FormItem>
<mx:FormItem label="Password">
<mx:TextInput id="password" width="100" password="true"/>
</mx:FormItem>
<mx:FormItem>
<mx:Button id="mySumitButton" label="Login" click="foo.send
()" />
</mx:FormItem>
</mx:Form>
</mx:Application>
this is returning a error " HTTP SERVICE FAULT. A start tag had
nocorresponding end tag"
note : my LOGINVALIDATE.JSP also contain html tags.
wht to do now
Yahoo! Groups Links
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/