Re: Multiple RequestFactory servlets for a single GWT application

2012-02-16 Thread Ashwin Desikan

Gilad,

You can have multiple RequestFactoryServlets. check out the example below.


If you look at it closely, I have a different url mapping. You will have 
to define individual  RequestTransports to be associated with the 
url-mapping in your client.



Also, you will have to controll operations exposed by each of the 
requestFactories in your client. You can always have a base factory 
where you can provide common functions and move only the secured ones to 
SecuredRequestFactory


What I would recommend with this approach is, before using the 
RequestFactories have a check in your code to determine if a user is 
loggedIn. If logged in use the secure servlet for all requests.


example ;

*web.xml *


AuthFilter
com.example.server.gae.GaeAuthFilter



AuthFilter
authRequestFactory



authRequestFactory
com.google.web.bindery.requestfactory.server.RequestFactoryServlet



unAuthRequestFactory
com.google.web.bindery.requestfactory.server.RequestFactoryServlet



unAuthRequestFactory
/unsignedRequest



authRequestFactory
/signedRequest



*client*

*//AuthenticatedRequestTransport*

public class AuthenticatedRequestTransport extends DefaultRequestTransport {

/**
 * default constructor.
 *
 */
public AuthenticatedRequestTransport() {
super();

//set the url
String requestURL = GWT.getHostPageBaseURL() + "signedRequest";
setRequestUrl(requestURL);
}
}

*//Un-Authenticated Request*
public class UnAuthenticatedRequestTransport extends 
DefaultRequestTransport {


public UnAuthenticatedRequestTransport() {
super();

//set the url
String requestURL = GWT.getHostPageBaseURL() + "unsignedRequest";
setRequestUrl(requestURL);
}
}


regards
Ashwin


On Thursday 16 February 2012 08:29:53 PM IST, Gilad Egozi wrote:


Is it possible to have this? And how can this be achieved?

The motivation - I want one secured (SSL) service for user-
provisioning (passwords...), and one non-secured.

Thanks,
Gilad.




--
You received this message because you are subscribed to the Google Groups "Google 
Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Multiple RequestFactory servlets for a single GWT application

2012-02-16 Thread Kanagaraj M
I dont think, this is something to do with RequestFactoryServlet.
This has to be done in your web server not in any servlet.
For example,

 You can have a login page accessed through https, after the successful 
authentication you can redirect to another page(accessed through http, this 
is your GWT application as well).

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/wsvPuWmcC0MJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Why is eclipse 3.6 suggested instead of 3.7?

2012-02-16 Thread Eric Clayberg (Google)
> Is there any thing on GWT broken when I use it with eclipse 3.7? 

No. Eclipse 3.5 and above are all supported...

http://code.google.com/eclipse/docs/download.html

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/Yl54i0HwHvgJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Why is eclipse 3.6 suggested instead of 3.7?

2012-02-16 Thread Massahud
Hi,

I was reading the documentation for GWT and after installing it on
eclipse 3.7 using the GPE update site I went to the page
http://code.google.com/webtoolkit/usingeclipse.html where it says 3.6
is suggested.
Is there any thing on GWT broken when I use it with eclipse 3.7?

Thanks

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Multiple RequestFactory servlets for a single GWT application

2012-02-16 Thread Gilad Egozi
Is it possible to have this? And how can this be achieved?

The motivation - I want one secured (SSL) service for user-
provisioning (passwords...), and one non-secured.

Thanks,
Gilad.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: RPC call fails on remote server

2012-02-16 Thread gerry
Thank you very much for your response and time. You are right, this is
a server issue, I tried to send a GET request to the same web service
through the browser and I got the same error.

On 16 Φεβ, 13:38, Nitheesh Chandran 
wrote:
> Hi ,
>       I have faced similar problem before. Nothing to do with GWT in
> this. Contact the remote server people where you deployed your
> application. Probably they are using Apache server only. Tell them to
> integrate Tomcat with Apache.
>
> On Feb 15, 2:23 pm, gerry  wrote:
>
>
>
>
>
>
>
> > Hi all,
>
> > I have a very strange problem I have not been able to debug the last 3
> > days. I am using GWT 2.4, and the problem happens only on the remote
> > server. Not in development mode, nor on a Tomcat I have installed on
> > my PC.
>
> > My application needs to contact a web service that runs on an external
> > server. So I created a servlet that calls this web service using GET,
> > like this:
> >         HttpsURLConnection connection = (HttpsURLConnection)
> > url.openConnection();
> >         connection.setHostnameVerifier(new CustomizedHostnameVerifier());
> > and then I read the response in an input stream.
> > CustomizedHostnameVerifier is a hostname verifier I created to verify
> > the self-signed certificate we are using. In the client's "onSuccess"
> > I read this input stream as a string.
>
> > It used to work perfectly, but the last days, every rpc call fails
> > with this message:
>
> > com.google.gwt.user.client.rpc.StatusCodeException: 501
> > Apache Tomcat/6.0.28 - Rapport d'erreur > title>  > head>Etat HTTP 501 - Le méthode OST n'est pas définie dans
> > la RFC 2068 et n'est pas supportée par l'API Servlet > noshade="noshade">type Rapport d'étatmessage
> > Le méthode OST n'est pas définie dans la RFC 2068 et n'est pas
> > supportée par l'API Servletdescription Le serveur
> > ne supporte pas la fonctionnalité demandée pour satisfaire cette
> > requête (Le méthode OST n'est pas définie dans la RFC 2068 et n'est
> > pas supportée par l'API Servlet). > noshade="noshade">Apache Tomcat/6.0.28
>
> > Sorry for the french, it's because the remote server is in french. The
> > bottom line is that "the method OST is not defined for the HTTP
> > protocol", and that causes a 501 error. But where does this OST come
> > from? As I said, I am using the default GET of servlet's
> > "openConnection()".
>
> > Even if I use POST, like this
> >                         HttpsURLConnection connection = (HttpsURLConnection)
> > url.openConnection();
> >                         connection.setHostnameVerifier(new 
> > CustomizedHostnameVerifier());
> >                         connection.setRequestMethod("POST");
> > the same happens. And if I misspell and write
> > "connection.setRequestMethod("OST"); ", the servlet throws as expected
> > another exception, different than the above described.
>
> > Please help, I am really stuck here. Thanks.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Private versus Protected definitions

2012-02-16 Thread Bob Lacatena
I invariably find that GWT doesn't do exactly what I need.  Too often,
however, I'm frustrated in my efforts to extend a class because too
many elements or methods are private (rather than protected) and such
private fields are not even exposed by getters and setters.

Please go through all of your code and change "private" to
"protected".  In the rare case where you really don't want someone
touching something (e.g. deprecated methods) that's fine, but think
ten times about having a private field without a getter/setter, or a
private method of any sort.  Such a situation should be very, very
rare in a toolkit that's meant to be extensible, and is obviously
limited in functionality and absolutely will require that the
programmer roll up his sleeves.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Using capturing groups in GWT regexp

2012-02-16 Thread Dominic Hudon
I have some code using Oracle regex that I want to port to GWT.

public static void main( String[] args )
{
String expression = "(abc)|(def)";
String source = "abcdef";

Pattern pattern = Pattern.compile(expression);
Matcher matcher = pattern.matcher(source);

while (matcher.find())
{
if (matcher.start(1) != -1)
{
// it's an "abc" match
}
else if (matcher.start(2) != -1)
{
// it's a "def" match
}
else
{
// error
continue;
}

int start = matcher.start();
int end = matcher.end();

String substring = source.substring(start, end);
System.out.println(substring);
}
}

I’ve tried porting it to the GWT regexp library, but it uses capturing 
groups through the start(int) method, which doesn’t seem to be supported in 
GWT regexp.

Is there a way to simulate this behaviour?

Oracle regex:
http://docs.oracle.com/javase/1.5.0/docs/api/java/util/regex/package-summary.html

GWT regexp:
http://google-web-toolkit.googlecode.com/svn/javadoc/2.1/com/google/gwt/regexp/shared/package-summary.html

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/OMSfQW17EvcJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Casting from raw JS to GWT class

2012-02-16 Thread Allyn
You know, I actually tend to agree with you on this in general Thomas. The 
reason I'm looking for the kind of solution I am is that due to the design 
and the requirements from the customer, this is never expected to be run 
outside this configurations/environment (it will actually depend on it for 
other reasons). So, because of that, a way to cast the raw JavaScriptObject 
back to a "GWT known class" would provide a much simpler way for my 
developers to pass data between the apps.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/D9_EY6qbAVYJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: help with overlaying panels

2012-02-16 Thread Srikanth Jandhyala
I have solved my problem. I am using an absolute panel as the
container for all the other panels and overlaying one over the other.


thanks
Srikanth

On Feb 15, 7:39 am, "Srikanth \"Jandy\" Jandhyala"
 wrote:
> Hi All,
>
> I want to overlay two panels one over the other and order them. Is
> there any mechanism in GWT to do so.
>
> thanks
> Srikanth

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Error on JettyLogger?

2012-02-16 Thread Lothar Kimmeringer
Am 16.02.2012 16:51, schrieb MagusDrk:
> java.lang.ClassCastException:
> com.google.appengine.tools.development.ApiProxyLocalImpl cannot be
> cast to com.google.appengine.tools.development.ApiProxyLocal

Sounds a bit like multiple gwt-Jars loaded by different ClassLoaders.


Regards, Lothar

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Error on JettyLogger?

2012-02-16 Thread MagusDrk
Hi everybody. Just two days ago, My GWT app suddenly stop compiling
after I applied an update. Now, I'm not being able to figure out what
is the cause and even less how to solve it and make my app run again.
I'm completly disoriented on how to get it work, I've thought there is
an error on the updated plugin (Google Plugin for Eclipse) or that
something is corrupt on my GWT SDK installation.

I hope somebody can help me, because to make my app to run again is my
priority.

When I use Google > GWT Compile there is no wanrning at all. (Just a
"Ignored 1 unit with compilation errors in first pass.", but it have
being present before app stop running)

When I Run or Debug my app, It lloks like the app is well compiled,
but in console I find the below stack.

After it, the Development Console shows me the url to run my app:
"http://127.0.0.1:/MyApp.html?gwt.codesvr=127.0.0.1:9997";

But when i open the url, page says service is unavailable (below, next
to console stack)


All help, someone can give me, is absolutely welcome. I've searched
for all the web with no sucess. I hope a quick response.

Thansk a lot.


= CONSOLE STACK
=
Initializing App Engine server
16/02/2012 03:26:51 PM com.google.apphosting.utils.jetty.JettyLogger
info
INFO: Logging to JettyLogger(null) via
com.google.apphosting.utils.jetty.JettyLogger
16/02/2012 03:26:52 PM
com.google.apphosting.utils.config.AppEngineWebXmlReader
readAppEngineWebXml
INFO: Successfully processed C:\\war\WEB-INF/appengine-
web.xml
16/02/2012 03:26:52 PM
com.google.apphosting.utils.config.AbstractConfigXmlReader
readConfigXml
INFO: Successfully processed C:\\war\WEB-INF/web.xml
16/02/2012 03:26:54 PM com.google.apphosting.utils.jetty.JettyLogger
warn
ADVERTENCIA: failed _ah_ServeBlobFilter: java.lang.ClassCastException:
com.google.appengine.tools.development.ApiProxyLocalImpl cannot be
cast to com.google.appengine.tools.development.ApiProxyLocal
16/02/2012 03:26:54 PM com.google.apphosting.utils.jetty.JettyLogger
warn
ADVERTENCIA: Failed startup of context
com.google.appengine.tools.development.DevAppEngineWebAppContext@5cd40c6e{/,C:
\\war}
java.lang.ClassCastException:
com.google.appengine.tools.development.ApiProxyLocalImpl cannot be
cast to com.google.appengine.tools.development.ApiProxyLocal
at
com.google.appengine.api.blobstore.dev.ServeBlobFilter.init(ServeBlobFilter.java:
53)
at org.mortbay.jetty.servlet.FilterHolder.doStart(FilterHolder.java:
97)
at
org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:
50)
at
org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.java:
662)
at org.mortbay.jetty.servlet.Context.startContext(Context.java:140)
at
org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:
1250)
at
org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:
517)
at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:
467)
at
org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:
50)
at
org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:
130)
at
org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:
50)
at
org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:
130)
at org.mortbay.jetty.Server.doStart(Server.java:224)
at
org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:
50)
at
com.google.appengine.tools.development.JettyContainerService.startContainer(JettyContainerService.java:
191)
at
com.google.appengine.tools.development.AbstractContainerService.startup(AbstractContainerService.java:
239)
at
com.google.appengine.tools.development.DevAppServerImpl.start(DevAppServerImpl.java:
146)
at
com.google.appengine.tools.development.gwt.AppEngineLauncher.start(AppEngineLauncher.java:
97)
at com.google.gwt.dev.DevMode.doStartUpServer(DevMode.java:509)
at com.google.gwt.dev.DevModeBase.startUp(DevModeBase.java:1068)
at com.google.gwt.dev.DevModeBase.run(DevModeBase.java:811)
at com.google.gwt.dev.DevMode.main(DevMode.java:311)
16/02/2012 03:26:54 PM
com.google.appengine.tools.development.DevAppServerImpl start
INFO: The server is running at http://localhost:/
16/02/2012 03:26:54 PM
com.google.appengine.tools.development.DevAppServerImpl start
INFO: The admin console is running at http://localhost:/_ah/admin

=

BROWSER CONTENT 
HTTP ERROR: 503
Problem accessing /MyApp.html. Reason:
SERVICE_UNAVAILABLE
Powered by Jetty://
=

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubs

how to auto set the width of a widget in VerticalPanel

2012-02-16 Thread vaibhav jain
Hi All,

 how to auto set the width of a widget in VerticalPanel??

I used:

setCellWidth(Mywidget,"100%");

but its not working,i also tried below:

setCellWidth(Mywidget, Window.getClientWidth()+"");
but its not giving proper result.


Regards,
VJ

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: How to save a file in server

2012-02-16 Thread Thad
Upload your file(s) via with the GWT FormPanel and the FileUpload
widget.

For your target servlet, look at the Apache Commons FileUpload package
(http://commons.apache.org/fileupload/).

On Feb 16, 1:47 am, yashujn  wrote:
> I am using tomcat server to for my GWT based project..
>
> I have to create a folder in the server and save .xml files in that
> folder.
>
> Need help regarding saving the file.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: GWT Designer + MGWT library = Runtime exception

2012-02-16 Thread Konstantin Scheglov
Fixed in GWT Designer trunk.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/Mg4HXrd3izUJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: RPC call fails on remote server

2012-02-16 Thread gerry
Hi,

Thanks a lot for the response and time. You are right, it's a server
issue. I tried to send a GET request to the same web service through
the browser and I had the same error.

Thanks again.

On 16 Φεβ, 13:38, Nitheesh Chandran 
wrote:
> Hi ,
>       I have faced similar problem before. Nothing to do with GWT in
> this. Contact the remote server people where you deployed your
> application. Probably they are using Apache server only. Tell them to
> integrate Tomcat with Apache.
>
> On Feb 15, 2:23 pm, gerry  wrote:
>
>
>
>
>
>
>
> > Hi all,
>
> > I have a very strange problem I have not been able to debug the last 3
> > days. I am using GWT 2.4, and the problem happens only on the remote
> > server. Not in development mode, nor on a Tomcat I have installed on
> > my PC.
>
> > My application needs to contact a web service that runs on an external
> > server. So I created a servlet that calls this web service using GET,
> > like this:
> >         HttpsURLConnection connection = (HttpsURLConnection)
> > url.openConnection();
> >         connection.setHostnameVerifier(new CustomizedHostnameVerifier());
> > and then I read the response in an input stream.
> > CustomizedHostnameVerifier is a hostname verifier I created to verify
> > the self-signed certificate we are using. In the client's "onSuccess"
> > I read this input stream as a string.
>
> > It used to work perfectly, but the last days, every rpc call fails
> > with this message:
>
> > com.google.gwt.user.client.rpc.StatusCodeException: 501
> > Apache Tomcat/6.0.28 - Rapport d'erreur > title>  > head>Etat HTTP 501 - Le méthode OST n'est pas définie dans
> > la RFC 2068 et n'est pas supportée par l'API Servlet > noshade="noshade">type Rapport d'étatmessage
> > Le méthode OST n'est pas définie dans la RFC 2068 et n'est pas
> > supportée par l'API Servletdescription Le serveur
> > ne supporte pas la fonctionnalité demandée pour satisfaire cette
> > requête (Le méthode OST n'est pas définie dans la RFC 2068 et n'est
> > pas supportée par l'API Servlet). > noshade="noshade">Apache Tomcat/6.0.28
>
> > Sorry for the french, it's because the remote server is in french. The
> > bottom line is that "the method OST is not defined for the HTTP
> > protocol", and that causes a 501 error. But where does this OST come
> > from? As I said, I am using the default GET of servlet's
> > "openConnection()".
>
> > Even if I use POST, like this
> >                         HttpsURLConnection connection = (HttpsURLConnection)
> > url.openConnection();
> >                         connection.setHostnameVerifier(new 
> > CustomizedHostnameVerifier());
> >                         connection.setRequestMethod("POST");
> > the same happens. And if I misspell and write
> > "connection.setRequestMethod("OST"); ", the servlet throws as expected
> > another exception, different than the above described.
>
> > Please help, I am really stuck here. Thanks.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: RPC call fails on remote server

2012-02-16 Thread Nitheesh Chandran
Hi ,
  I have faced similar problem before. Nothing to do with GWT in
this. Contact the remote server people where you deployed your
application. Probably they are using Apache server only. Tell them to
integrate Tomcat with Apache.




On Feb 15, 2:23 pm, gerry  wrote:
> Hi all,
>
> I have a very strange problem I have not been able to debug the last 3
> days. I am using GWT 2.4, and the problem happens only on the remote
> server. Not in development mode, nor on a Tomcat I have installed on
> my PC.
>
> My application needs to contact a web service that runs on an external
> server. So I created a servlet that calls this web service using GET,
> like this:
>         HttpsURLConnection connection = (HttpsURLConnection)
> url.openConnection();
>         connection.setHostnameVerifier(new CustomizedHostnameVerifier());
> and then I read the response in an input stream.
> CustomizedHostnameVerifier is a hostname verifier I created to verify
> the self-signed certificate we are using. In the client's "onSuccess"
> I read this input stream as a string.
>
> It used to work perfectly, but the last days, every rpc call fails
> with this message:
>
> com.google.gwt.user.client.rpc.StatusCodeException: 501
> Apache Tomcat/6.0.28 - Rapport d'erreur title>  head>Etat HTTP 501 - Le méthode OST n'est pas définie dans
> la RFC 2068 et n'est pas supportée par l'API Servlet noshade="noshade">type Rapport d'étatmessage
> Le méthode OST n'est pas définie dans la RFC 2068 et n'est pas
> supportée par l'API Servletdescription Le serveur
> ne supporte pas la fonctionnalité demandée pour satisfaire cette
> requête (Le méthode OST n'est pas définie dans la RFC 2068 et n'est
> pas supportée par l'API Servlet). noshade="noshade">Apache Tomcat/6.0.28
>
> Sorry for the french, it's because the remote server is in french. The
> bottom line is that "the method OST is not defined for the HTTP
> protocol", and that causes a 501 error. But where does this OST come
> from? As I said, I am using the default GET of servlet's
> "openConnection()".
>
> Even if I use POST, like this
>                         HttpsURLConnection connection = (HttpsURLConnection)
> url.openConnection();
>                         connection.setHostnameVerifier(new 
> CustomizedHostnameVerifier());
>                         connection.setRequestMethod("POST");
> the same happens. And if I misspell and write
> "connection.setRequestMethod("OST"); ", the servlet throws as expected
> another exception, different than the above described.
>
> Please help, I am really stuck here. Thanks.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Google Product Forums for GWT

2012-02-16 Thread Yaya @ Work
Hi !

It works fine but is pointing to the old classic interface:
> http://groups.google.com/group/google-web-toolkit
>
Strange :  this URL seems to properly redirect to the nice GWT app at
https://groups.google.com/forum/?fromgroups#!forum/google-web-toolkit...

Best regards,
  Yannis

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: How to save a file in server

2012-02-16 Thread karim duran
Hi Yashujn,

Suppose you have a directory "myWebFiles" under the root of your Web
aplication, in your servlet code you can do that :

*1) INSIDE THE WEB APPLICATION PATH*
*
*
/* byteTowrite is type of byte[] */
try
{
String myWebFilesPath = getServletContext().getRealPath("/myWebFiles");
String fileName = "dataFile.xml";
FileOutPutStream localFile = new FileOutPutStrema(myWebFilesPath
+ fileName);
localFile.write(byteTowrite);
localFile.flush();
localFile.close();
}
catch { .../...}

*2) ANYWHERE ON THE SERVER WITH PARAMETER PATH*
*
*
*) in web.xml when you register your servlet, add a init parameter for your
servlet, call it "folderPath"
and give it the value you want (e.g "/var/www/myWebFiles/")


uploadedFilesFolderPath
/var/www/myWebFiles/


*) use it to write your file

/* byteTowrite is type of byte[] */
try
{
String myWebFilesPath
= getServletConfig().getInitParameter("uploadedFilesFolderPath");
String fileName = "dataFile.xml";
FileOutPutStream localFile = new FileOutPutStrem(myWebFilesPath + fileName);
localFile.write(byteTowrite);
localFile.flush();
localFile.close();
}
catch{.../...}

Of course, in this case, you have to config web.xml before deploying your
application, and tomcat runtime *must have write permission for the
folder /var/www/uploadedFiles/* in this exemple.

I hope it helps.

Look at the Servlet API javadoc for more details. It doesn't depends upon
GWT.

Regards.

Karim Duran

2012/2/16 yashujn 

> I am using tomcat server to for my GWT based project..
>
> I have to create a folder in the server and save .xml files in that
> folder.
>
> Need help regarding saving the file.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google Web Toolkit" group.
> To post to this group, send email to google-web-toolkit@googlegroups.com.
> To unsubscribe from this group, send email to
> google-web-toolkit+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/google-web-toolkit?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Permission denied to access property 'document' in firefox

2012-02-16 Thread Thomas Broyer
The error happens in loadModule, so your code hasn't yet been called 
(except possibly the onModuleLoad), or at least the error is not about $doc 
in JSNI, because the exception comes from displayErrorGlassPanel. This 
method tries to access the outer-most window object [1], and it's failing 
here most probably because of a Same-Origin Policy violation.
There are two possible causes to this:

   - your GWT app runs in a frame within a document from a different origin 
   (e.g. GWT app loaded from server1.com in a frame of a document loaded from 
   server2.net; it could also be as small a difference as www.server.com vs. 
   server.com)
   - you're loading the HTML host page out of the file-system rather than 
   served through HTTP (would be really strange for a DevMode session though)


[1] 
http://code.google.com/p/google-web-toolkit/source/browse/trunk/dev/core/src/com/google/gwt/core/ext/linker/impl/hosted.html#170

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/bzkc5Z4fAjQJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Casting from raw JS to GWT class

2012-02-16 Thread Thomas Broyer
IMO, you should pass JavaScriptObjects around, that way you totally control 
how they look like, so they can be safely exchanged.

>From one of the GWT apps, you shouldn't see your other app as another *GWT* 
app, it's just another *JS* app.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/CIfVLTMBRpcJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: How to save a file in server

2012-02-16 Thread Vasi , Sándor
Correct me, if i am mistaken, but i guess, it is not really a GWT question,
but a normal HTTPServlet issue and it depends on your container-s settings,
isn't it?

Sandor

On Thu, Feb 16, 2012 at 10:00 AM, yashujn  wrote:

> Actually i am not sure how to access the root directory in the server,
> where file is to be saved.
>
> On Feb 16, 1:52 pm, Harpal Grover  wrote:
> > Use a servlet to write out the file on the server.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google Web Toolkit" group.
> To post to this group, send email to google-web-toolkit@googlegroups.com.
> To unsubscribe from this group, send email to
> google-web-toolkit+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/google-web-toolkit?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: How to save a file in server

2012-02-16 Thread yashujn
Actually i am not sure how to access the root directory in the server,
where file is to be saved.

On Feb 16, 1:52 pm, Harpal Grover  wrote:
> Use a servlet to write out the file on the server.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: How to save a file in server

2012-02-16 Thread Harpal Grover
Use a servlet to write out the file on the server.
On Feb 16, 2012 1:48 AM, "yashujn"  wrote:

> I am using tomcat server to for my GWT based project..
>
> I have to create a folder in the server and save .xml files in that
> folder.
>
> Need help regarding saving the file.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google Web Toolkit" group.
> To post to this group, send email to google-web-toolkit@googlegroups.com.
> To unsubscribe from this group, send email to
> google-web-toolkit+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/google-web-toolkit?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.