00:49:01.879 [ERROR] [testing] Uncaught exception escaped
com.google.gwt.core.client.JavaScriptException:
(NS_ERROR_NOT_AVAILABLE): Component returned failure code: 0x80040111
(NS_ERROR_NOT_AVAILABLE) [nsIXMLHttpRequest.statusText]
QueryInterface: function QueryInterface() {
[native code]
}
result: 2147746065
filename: http://127.0.0.1
lineNumber: 92
columnNumber: 0
inner: null
data: null
initialize: function initialize() {
[native code]
}
at
com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:
195)
at
com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:
120)
at
com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:
507)
at
com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:
264)
at
com.google.gwt.dev.shell.JavaScriptHost.invokeNativeObject(JavaScriptHost.java:
91)
at com.google.gwt.core.client.impl.Impl.apply(Impl.java)
at com.google.gwt.core.client.impl.Impl.entry0(Impl.java:188)
at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at
com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103)
at
com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71)
at
com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:
157)
at
com.google.gwt.dev.shell.BrowserChannel.reactToMessages(BrowserChannel.java:
1668)
at
com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:
401)
at
com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:
222)
at java.lang.Thread.run(Unknown Source)
can someone please help me out? (either help me install GWT developer
plugin on IE or show me some way to integrate GWT with php in
develoment mode)
thanx in advance
Sarvpriye
are you using eclipse or netbeans?
gwt php in eclipse:
suppose your apache's webroot is "c:\www"
and you created your project in "c:\www\apps\"
and your project name is "mytest"
so your project is gonna have these directories:
c:\www\apps\mytest\src
c:\www\apps\mytest\test
c:\www\apps\mytest\war
you place your php files in the war folder
test.php:
<?php
echo "hello";
?>
and in your java code, let's say you have this method to test:
public void testphp(){
try
{
RequestBuilder builder = new
RequestBuilder(RequestBuilder.POST, GWT.getHostPageBaseURL()
+"test.php");
builder.setHeader("Content-Type", "application/x-www-form-
urlencoded");
builder.sendRequest("", new RequestCallback()
{
@Override
public void onError(Request request, Throwable ex)
{
Window.alert(ex.toString());
}
@Override
public void onResponseReceived(Request request, Response
response)
{
Window.alert("PHP output: " +
response.getText());
}
});
}
catch (RequestException e)
{
Window.alert(e.toString());
}
}
in the project explorer of eclipse, right click your project and
choose properties.
click Run/Debug Settings.
choose your project and click edit.
remove the check in run built-in server and change the port to 80.
run the project. copy the link in the "development mode" window and
paste it in the browser's address bar.
when you open the link, it will display a page not found error.
because you really don't have a mytest.html in
the root of your www folder.
the link looks like this:
http://127.0.0.1/mytest.html?gwt.codesvr=127.0.0.1:9997
copy "?gwt.codesvr=127.0.0.1:9997" from the link
mytest.html is really in:
http://localhost/apps/mytest/war/mytest.html
paste the end of the previous link to the new link so it looks like
this:
http://localhost/apps/mytest/war/mytest.html?gwt.codesvr=127.0.0.1:9997
now you can simply refresh the page to view any changes made to your
java and php code.
no need to compile or run.
Here's how I do it:
1) install "Eclipse for PHP Developers" from http://www.eclipse.org/downloads/
2) install "Google Plugin for Eclipse" adding to eclipse the update
site http://dl.google.com/eclipse/plugin/3.5
3) create a "New Web Application Project"
4) edit war/WEB-INF/web.xml of newly created project and add the
following snippet (let's hope to get nice formatting... :-).
IMPORTANT NOTE: this is assuming you have php5-cgi executable
installed (in Ubuntu install php5-cgi package). Change it to suite
your setup.
<code>
<pre>
<servlet>
<servlet-name>PHP Servlet</servlet-name>
<servlet-class>org.mortbay.servlet.CGI</servlet-class>
<init-param>
<param-name>commandPrefix</param-name>
<param-value>php5-cgi</param-value>
</init-param>
</servlet>
<servlet-mapping>
<servlet-name>PHP Servlet</servlet-name>
<url-pattern>*.php</url-pattern>
</servlet-mapping>
</pre>
</code>
5) create a new PHP file in project's war folder (e.g. phpinfo.php)
6) run the project as "Web Application"
7) browse to http://127.0.0.1:8888/phpinfo.php
bye,
Marcello Nuccio
On 6 Mar, 19:29, mibtar <bim.pangili...@gmail.com> wrote:
> maybe you should just use firefox?
>
> are you using eclipse or netbeans?
>
> gwtphpin eclipse:
>
> suppose your apache's webroot is "c:\www"
> and you created your project in "c:\www\apps\"
> and your project name is "mytest"
>
> so your project is gonna have these directories:
> c:\www\apps\mytest\src
> c:\www\apps\mytest\test
> c:\www\apps\mytest\war
>
> you place yourphpfiles in the war folder
>
> test.php:
>
> <?php
> echo "hello";
> ?>
>
> and in your java code, let's say you have this method to test:
>
> public void testphp(){
> try
> {
> RequestBuilder builder = new
> RequestBuilder(RequestBuilder.POST, GWT.getHostPageBaseURL()
> +"test.php");
> builder.setHeader("Content-Type", "application/x-www-form-
> urlencoded");
> builder.sendRequest("", new RequestCallback()
> {
> @Override
> public void onError(Request request, Throwable ex)
> {
> Window.alert(ex.toString());
> }
>
> @Override
> public void onResponseReceived(Request request, Response
> response)
> {
> Window.alert("PHPoutput: " +