Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 05-24-2006, 07:46 PM   #1
Registered User
Join Date: Jun 2005
Posts: 3
Default Flash Remoting with Java: Problems

Hi! I was checking out an example I found on the web. I installed the application as they instructed. I'm using Tomcat server (v5.5.15) on port 8085. My Flash version is 8 and I installed the remoting components for version 8 AS2.0. But I'm getting the following error after I run the app:

Error opening URL "http://localhost:8085/helloworld/gateway"

Here's the codes:

Code on layer 1:
// ON TIMELINE VERSION //////////////////////////////////////////////
import mx.remoting.Service;
import mx.services.Log;
import mx.rpc.RelayResponder;
import mx.rpc.FaultEvent;
import mx.rpc.ResultEvent;
import mx.remoting.PendingCall;  

mx.remoting.debug.NetDebug.initialize(); // initialize the NetConnection Debugger
var myLogger:Log = new Log( Log.DEBUG, "logger1" );

// override the default log handler
myLogger.onLog = function( message:String ):Void {
 trace( "myLogger-->>>"+message );
//Create the service ->based on back-end used, comment/uncoment following arguments
myService = new Service(
//Handler for results
function onEchoData(msg: ResultEvent){
	mx.remoting.debug.NetDebug.trace({level:"Debug", message:"onEchoData" });
	show.text = msg.result
//Handler for errors
function onEchoFault(rs: FaultEvent ){
	mx.remoting.debug.NetDebug.trace({level:"None", message:"There was a problem: " + fault.fault.faultstring });
//Buttons handlers
callButton.onPress = function(){
   var pc:PendingCall = myService.makeEcho("Hello World!");
   pc.responder = new RelayResponder(this._parent, "onEchoData", "onEchoFault" );
clearButton.onPress = function(){
	show.text = "";
Here's the java code:
package com.flashdb.services;

public class HelloWorld {
	public String makeEcho(String msg){
		return msg;
and Here's the web.xml:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE web-app
    PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"
			<description>Location of the OpenAMF config file.</description>
I have openamf.jar residing at WEB-INF\lib

Please tell me what's wrong here.
thegreendove is offline   Reply With Quote
Old 05-25-2006, 08:52 PM   #2
Senior Member
hobbis's Avatar
Join Date: May 2002
Location: Faversham, Kent
Posts: 286

From your error, I'd say it just cannot find the gateway. What happens when you put this url into the browser directly?
hobbis is offline   Reply With Quote
Old 05-26-2006, 06:42 AM   #3
Registered User
Join Date: Jun 2005
Posts: 3

Originally Posted by hobbis
From your error, I'd say it just cannot find the gateway. What happens when you put this url into the browser directly?
No use. It still can't find the gateway servlet.

The requested resource (Servlet DefaultGateway is not available) is not available.

But my other servlets are running fine on my Tomcat server.

Anybody who can come up with a solution, please let me know. This thing is eating my head!
thegreendove is offline   Reply With Quote

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Optimizing Flash Web Sites for Search Engines rockcoastmedia General Chat 19 03-29-2009 09:31 PM
Some Flash Video Converter Tools Compare terry117 Detention 7 05-18-2006 02:08 AM
flash Remoting mayur_vnit Flash Remoting 5 02-24-2006 08:24 AM
flash remoting, Coldfusion, and apostrophes fou99004 Flash Remoting 3 02-07-2006 07:17 PM
java and Flash arun67 ActionScript 1.0 (and below) 0 07-25-2003 10:04 AM

All times are GMT. The time now is 09:07 AM.

Follow actionscriptorg on Twitter


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.