A few things I would look at...
1. Check that you have the crossdomain.xml file available and that it
has the correct settings.
2. Add your bin-debug folder to the Global Security Settings panel
(Use
http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager04.html)
Your Flex program does not appear correct (I know nothing about JSP so
don't know about that part of it).
public function res():void{
params.sid = user.text;
params.spwd= pwd.text;
std.send(params);
}
public function res1(itm:ResultEvent):void{
Alert.show(itm.result.toString();
}
--- In [email protected], madhu kumar <[EMAIL PROTECTED]> wrote:
>
> Hi Friends
>
> Am trying to integrate flex with jsp using
> Httpservices . just a login application . Here i want to connect to
> database through my jsp
> but it is not working properly show an error
>
> [RPC Fault faultString="HTTP request error"
faultCode="Server.Error.Request"
> faultDetail="Error: [IOErrorEvent type="ioError" bubbles=false
> cancelable=false eventPhase=2 text="Error #2032: Stream Error. URL:
http://localhost:8000/jspapp/svalid.jsp"]. URL:
http://localhost:8000/jspapp/svalid.jsp"]
>
>
>
> Plz check my code once
>
>
> <?xml version="1.0" encoding="utf-8"?>
> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
>
> Â Â Â layout="vertical" >
>
> Â Â Â <mx:Script>
>
> Â Â Â Â Â Â <![CDATA[
> Â Â Â Â Â Â Â Â Â import mx.rpc.events.FaultEvent;
>
> Â Â Â Â Â Â Â Â Â import mx.controls.Alert;
> Â Â Â Â Â Â Â Â Â import mx.rpc.events.ResultEvent;
>
> Â Â Â Â Â Â Â Â Â public var params:Object =new Object();
> Â Â Â Â Â Â Â Â Â Â public function res():void{
>
> Â Â Â Â Â Â Â Â Â Â Â Â Â
> Â Â Â Â Â Â Â Â Â Â Â Â Â
> Â Â Â Â Â Â Â Â Â Â Â Â Â std.send();
>
> Â Â Â Â Â Â Â Â Â Â Â Â
> Â Â Â Â Â Â Â Â Â } Â Â Â Â Â Â
> Â Â Â Â Â Â Â Â Â Â public function res1(itm:ResultEvent):void{
>
> Â Â Â Â Â Â Â Â Â Â Â Â params.sid = user.text;
> Â Â Â Â Â Â Â Â Â Â Â Â params.spwd= pwd.text;
>
> Â Â Â Â Â Â Â Â Â Â Â Â params = {"sid": user.text,"spwd":
pwd.text};
> Â Â Â Â Â Â Â Â Â }
>
> Â Â Â Â Â Â Â Â Â Â public function res2(e:FaultEvent):void{
> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Alert.show(e.fault.toString());
>
> Â Â Â Â Â Â Â Â Â Â Â Â
> Â Â Â Â Â Â Â Â Â Â Â Â
> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â }
>
> Â Â Â Â Â Â ]]>
> Â Â Â </mx:Script>
> Â Â Â
>
> Â Â Â <mx:HTTPService
> Â Â Â Â Â Â Â id="std"
> Â Â Â Â Â Â Â url="http://localhost:8000/jspapp/svalid.jsp"
>
> Â Â Â Â Â Â Â Â Â Â Â showBusyCursor="true"Â result="res1(event)"
fault="res2(event)">
> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â
>
> Â Â Â Â Â Â Â Â Â <!--<mx:request>
> Â Â Â Â Â Â Â Â Â Â <sid>{user.text}</sid>
>
> Â Â Â Â Â Â Â Â Â Â <spwd>{pwd.text}</spwd>
> Â Â Â Â Â Â Â Â Â Â </mx:request>-->
>
> Â Â Â Â Â Â Â
> Â Â Â </mx:HTTPService>
> Â Â Â Â Â Â <mx:PanelÂ
>
> Â Â Â width="280" height="252" title="Login Form"
> Â Â Â Â Â Â layout="absolute" verticalScrollPolicy="off"Â
>
> Â Â Â Â Â Â horizontalScrollPolicy="off" right="0" y="0" alpha=".5">
> Â Â Â Â Â Â <mx:Form id="frm1" width="260" height="180">
>
> Â Â Â Â Â Â
> Â Â Â Â Â Â <mx:Text width="100%" color="blue"
>
> Â Â Â Â Â Â Â Â Â Â Â Â text="Click the 'Need to Register? to
Register"/>
> Â Â Â Â Â Â Â Â Â
>
> Â Â Â Â Â Â Â Â Â <mx:FormHeading label="LoginForm"
fontFamily="Times New Roman"/>
> Â Â Â Â Â Â Â Â Â <mx:FormItem label="Username" fontWeight="bold"
color="#F20420" required="true">
>
> Â Â Â Â Â Â Â Â Â Â Â Â <mx:TextInput width="131" id="user" />
> Â Â Â Â Â Â Â Â Â </mx:FormItem>
>
> Â Â Â Â Â Â Â Â Â <mx:FormItem label="Password"Â
fontWeight="bold" color="#F20420" required="true">
> Â Â Â Â Â Â Â Â Â <mx:TextInput width="130" id="pwd"
displayAsPassword="true"/>
>
> Â Â Â Â Â Â Â Â Â </mx:FormItem>Â Â Â Â Â Â
> Â Â Â Â Â Â </mx:Form>
>
> Â Â Â Â Â Â
> Â Â Â Â Â Â <mx:ControlBar height="40" y="126">
>
> Â Â Â Â Â Â <mx:LinkButton id="registerLink" label="Need to
Register?" width="122"
> Â Â Â Â Â Â Â Â Â height="24" fontWeight="bold" color="#101212" />
>
> Â Â Â Â Â Â <mx:Spacer width="66" height="10"/>
> Â Â Â Â Â Â Â Â Â <mx:Button id="cbb1" label="Login" click="res()"
>
> Â Â Â Â Â Â Â Â Â Â Â Â color="#151718"Â borderColor="#B7B7BC"/>
> Â Â Â Â Â Â </mx:ControlBar>
>
> Â Â Â Â Â Â <!--<mx:TextArea id="txt" />-->
> Â Â Â Â Â Â </mx:Panel>
>
> Â Â Â Â Â Â
> Â Â Â Â Â Â
> </mx:Application>
>
>
> JspCode
>
>
> <%@ page import="java.sql.*" %>
> <%@ page import="javax.servlet.http.*" %>
>
> <%!
> Â Â Â Â int i=10;
> Â Â Â Â String name,pwd;
>
> Â Â Â Â Connection con;
> Â Â Â Â Statement st;
> Â Â Â Â ResultSet rs;
>
> %>
>
> <%
> Â Â Â Â HttpSession ses=request.getSession(true);Â Â Â
>
>
> Â Â Â Â name=request.getParameter("sid");
> Â Â Â Â pwd=request.getParameter("spwd");
>
>
> Â Â Â Â ses.setAttribute("user",name);
> Â Â Â Â ses.setAttribute("pass",pwd);
>
>
> Â Â Â Â Class.forName("oracle.jdbc.driver.OracleDriver");
> Â Â Â Â
con=DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:xe",
>
> Â Â Â Â "system","tiger");
> Â Â Â Â st=con.createStatement();
>
> Â Â Â Â rs=st.executeQuery("select * from ppstudent");
>
> Â Â Â while(rs.next())
>
> Â Â {
> Â Â Â Â Â Â Â Â Â if( name.equals(rs.getString(1))Â Â Â &&Â
pwd.equals(rs.getString(2)) )Â Â Â Â Â Â Â Â
>
> Â Â Â Â {
> Â Â Â Â Â Â Â
> %>
>
> Â Â Â Â Â <jsp:forward page="sinf.html"/>
> <%
> Â Â Â Â Â Â i=0;
>
> Â Â Â Â }
> Â }
> %>
>
> Â
> <%
> Â Â
>
> Â Â Â if(i!=0)
> Â {
> %>
>
> Â Â Â <br>
> Â Â Â <br>
> Â Â Â Â <font size=5 color=blue>
>
> Â Â Â Â Â Invalid username/password</font>
> Â Â Â <jsp:include page="lstudent.html"/>
>
> <%
> Â }
> %>
>
>
>
> Plz Help me
>
>
>
> Bye now.....
>
> MAdHu BaNdAri
>
>
> Connect with friends all over the world. Get Yahoo! India
Messenger at http://in.messenger.yahoo.com/?wm=n/
>