Have you tried browsing to the URL directly? What does it
return?
What is the URL used to launch your SWF that accesses the
JSP page?
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of sreedhar reddy
Sent: Saturday, May 20, 2006 10:16 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] HTTP Service Error
Hi,
I am working with the Flex 2 Beta 3 builder, and I am trying to execute a
database application using Flex and jsp for retrieving data from database and
displaying it in datagrid. The moment I click "GetData" button it is
showing the following 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:8080/connectdb.jsp"].
URL: http://localhost:8080/connectdb.jsp"]
at mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/internal::faultHandler()
at mx.rpc::Responder/fault()
at mx.rpc::AsyncRequest/fault()
at ::DirectHTTPMessageResponder/errorHandler()
at flash.events::EventDispatcher/dispatchEvent()
at flash.net::URLLoader/flash.net:URLLoader::redirectEvent()
at mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/internal::faultHandler()
at mx.rpc::Responder/fault()
at mx.rpc::AsyncRequest/fault()
at ::DirectHTTPMessageResponder/errorHandler()
at flash.events::EventDispatcher/dispatchEvent()
at flash.net::URLLoader/flash.net:URLLoader::redirectEvent()
The code which i used for this application is:
users.mxml
/*
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
<mx:HTTPService id="cn" url=""/'>http://localhost:8080/connectdb.jsp"/>
<mx:Button label="Get Data" click="cn.send();"/>
/*
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
<mx:HTTPService id="cn" url=""/'>http://localhost:8080/connectdb.jsp"/>
<mx:Button label="Get Data" click="cn.send();"/>
<mx:DataGrid id="dg2" dataProvider="{cn.lastResult.datalist}"
width="700" height="350"
y="26">
<mx:columns>
<mx:Array>
<mx:DataGridColumn dataField="rdtime" headerText="Read Time"/>
<mx:DataGridColumn dataField="tagno" headerText="Tag Number"/>
<mx:DataGridColumn dataField="readno" headerText="Number of Reads"/>
</mx:Array>
</mx:columns>
</mx:DataGrid>
</mx:Application>
*/
<mx:columns>
<mx:Array>
<mx:DataGridColumn dataField="rdtime" headerText="Read Time"/>
<mx:DataGridColumn dataField="tagno" headerText="Tag Number"/>
<mx:DataGridColumn dataField="readno" headerText="Number of Reads"/>
</mx:Array>
</mx:columns>
</mx:DataGrid>
</mx:Application>
*/
connectdb.jsp
/*
<%@ page import="java.util.*"%>
<%
String connectionURL = "jdbc:mysql://localhost:3306/sample?user=root;password=dpro";
Connection connection = null;
Statement statement = null;
Class.forName("com.mysql.jdbc.Driver").newInstance();
c = DriverManager.getConnection(connectionURL, "root", "dpro");
Statement s=c.createStatement();
ResultSet rs=s.executeQuery("select *from users");
while(rs.next()) {
%>
<datalist>
<rdtime><%=rs.getString("userid")%></rdtime>
<tagno><%=rs.getString("username")%></tagno>
<readno><%=rs.getString("emailaddress")%></readno>
</datalist>
<%
}
<%@ page import="java.util.*"%>
<%
String connectionURL = "jdbc:mysql://localhost:3306/sample?user=root;password=dpro";
Connection connection = null;
Statement statement = null;
Class.forName("com.mysql.jdbc.Driver").newInstance();
c = DriverManager.getConnection(connectionURL, "root", "dpro");
Statement s=c.createStatement();
ResultSet rs=s.executeQuery("select *from users");
while(rs.next()) {
%>
<datalist>
<rdtime><%=rs.getString("userid")%></rdtime>
<tagno><%=rs.getString("username")%></tagno>
<readno><%=rs.getString("emailaddress")%></readno>
</datalist>
<%
}
s.close();
c.close();
%>
*/
c.close();
%>
*/
Thanks & Regards,
Sreedhar
Sreedhar
Thanks & Regards,
Sreedhar
Do you have a question on a topic you cant find an Answer to. Try Yahoo! Answers India
Get the all new Yahoo! Messenger Beta Now
--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
SPONSORED LINKS
Web site design development | Computer software development | Software design and development |
Macromedia flex | Software development best practice |
YAHOO! GROUPS LINKS
- Visit your group "flexcoders" on the web.
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.