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 flexcoders@yahoogroups.com, 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/
>


Reply via email to