Skip to main content

Home/ Google AppEngine/ Group items tagged xml

Rss Feed Group items tagged

Esfand S

Jeremy's Blog: JSTL on Google App Engine - 0 views

  • 01<%@ page contentType="text/html" pageEncoding="UTF-8" %>02<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>03 04<!DOCTYPE html>05<html>06 <head>07  <title>Maintenance</title>08 </head>09<body>10 <p>Hello from Spring ${user}</p>11 <p>AuthDomain = ${user.authDomain}</p>12 <p>Nickname = ${user.nickname}</p>13 <p>Email = ${user.email}</p>14 <p>UserId = ${user.userId}</p>15</body>16</html>
Esfand S

Google App Engine in Maven + IntelliJ « Nelz's Blog - 0 views

  • build-time substitution. Here’s our appengine-web.xml: <?xml version="1.0" encoding="utf-8"?> <appengine-web-app xmlns="http://appengine.google.com/ns/1.0"> <application>${gae.app.name}</application> <version>${friendlyversion}</version> <system-properties> <property name="java.util.logging.config.file" value="WEB-INF/logging.properties"/> </system-properties> </appengine-web-app>
  • At build time, I use the AntRun plugin (lines 97-118) to create a small file under the target directory that holds a ‘sanitized’ version of the standard Maven version. (I.e. “1.0-SNAPSHOT” becomes GAE-friendly “1-0-snapshot”.) I then use the Maven filter functionality available in the WAR plugin (lines 80-96) to copy the appengine-web.xml into its proper directory with the version substituted in.
Esfand S

Task Queue Java API Overview - Google App Engine - Google Code - 0 views

  • A Java app sets up queues using a configuration file named queue.xml, in the WEB-INF/ directory inside the WAR. See Java Task Queue Configuration. If an app does not have a queue.xml file, it has a queue named default with some default settings. To enqueue a task, you get a Queue using the QueueFactory, then call its add() method. You can get a named queue specified in the queue.xml file using the getQueue() method of the factory, or you can get the default queue using getDefaultQueue(). You can call the Queue's add() method with a TaskOptions instance (produced by TaskOptions.Builder), or you can call it with no arguments to create a task with the default options for the queue.
  • Although a queue defines a general FIFO ordering, tasks are not executed entirely serially. Multiple tasks from a single queue may be executed simultaneously by the scheduler, so the usual locking and transaction semantics need to be observed for any work performed by a task.
Esfand S

Works fine on App Engine locally but get (session-related?) error after deploying to pr... - 0 views

  • the necessary changes to appengine-web.xml to get Sitebricks to run in development mode:         <sessions-enabled>true</sessions-enabled>         <system-properties>                 <property name="java.util.logging.config.file" value="WEB-INF/logging.properties"/>                 <property name="mvel2.disable.jit" value="true"/>         </system-properties>
  • the necessary changes to appengine-web.xml to get Sitebricks to run in development mode:         <sessions-enabled>true</sessions-enabled>         <system-properties>                 <property name="java.util.logging.config.file" value="WEB-INF/logging.properties"/>                 <property name="mvel2.disable.jit" value="true"/>         </system-properties>
  • We had a GaeFlashCache built specifically for appengine. Try doing: bind(FlashCache.class).to(GaeFlashCache.class).in(Singleton.class);
Esfand S

Gaelyk - a lightweight Groovy toolkit for Google App Engine Java - 0 views

  • The easiest way to get setup rapidly is to download the template project from the download section. It provides a ready-to-go project with the right configuration files pre-filled and an appropriate directory layout: web.xml preconfigured with the Gaelyk servlets appengine-web.xml with the right settings predefined (static file directive) a sample Groovlet and template the needed JARs (Groovy, Gaelyk and Google App Engine SDK)
  • Running your application locally Google App Engine provides a local servlet container, powered by Jetty, which lets you run your applications locally. If you're using the Gaelyk template, when you're at the root of your project — and we assume you have installed the App Engine SDK on your machine — you can run your application with the following command-line: dev_appserver.sh war
  • Deploying your application in the cloud Once you're at the root of your application, simply run the usual deployment command: appcfg.sh update war
Esfand S

Tips for Getting Google App Engine to Operate in a Maven Environment - 0 views

  • To get the development environment working the plugin also requires access to the unzipped SDK as packaged by Google. The plugin tries to help you set this up (“gae:unpack”) but that failed for me. I was able to get stuff working by manually unzipping the SDK artifact downloaded directly from Google to the following directory: ~/.m2/repository/com/google/appengine/appengine-java-sdk/1.3.0/appengine-java-sdk-1.3.0
  • You’ll also notice in our appengine-web.xml that we substitute in our application name. By default this comes from the properties section of the pom.xml file (line 11).
Esfand S

Feed your site with RSS and Atom - 0 views

  • This article studies the proxy technique first and then turns to the Google AJAX Feed API method, giving you a chance to intermix Java™and JavaScript coding.
  • You need a service that, when given a feed URL, connects to that site, downloads its contents, and sends them back to the caller. (For a shell-line parallel, consider the wget or curl command.) You can do this many ways, and Listing 2 shows a simple way to accomplish the task. Because I decided to call my remote proxy RemoteProxy, the server-side class had to be called RemoteProxyImpl; Impl stands for "Implementation."
  • The SOP won't let your code get data from another site, but there's an exception: You can download and execute JavaScript code using the <script ... /> tag. If the code you download happens to include data and calls a function of yours that puts the data to good use, then you have managed to bypass the SOP. Here's the idea behind the Google AJAX Feed API: It uses the <script ... /> tag to call a Google site that works as a proxy. The remote site gets the feed data and returns it in the form of JavaScript code. The downloaded JavaScript code calls your function so you can process the incoming XML
  • ...1 more annotation...
  • Because the Google AJAX Feed API is written in JavaScript code, you have to use GWT's JavaScript Native Interface (JSNI).
Esfand S

Content-Encoding in Google App Engine « A software developers journal - 0 views

  • It turns out that the Content-Type is also affecting the servers decision to compress the response. We were using applicaton/xml as Content-Type and when changing this to text/xml, the compression was enabled.
Esfand S

GAE load data into datastore without using CSV - Stack Overflow - 0 views

  • Basically, all you have to do is create a subclass of bulkloader.Loader and implement (at a minimum) the generate_records method, which should yield lists of strings. This same strategy would work for loading data from XML files or ROT13-encrypted files or whatever. Note that the list of strings yielded by the generate_records method must match up (in length and order) with the "properties" list you provide when you initialize the loader (ie, the second argument to the AlbumLoader.__init__ method in this example). This approach actually provides a lot of flexibility: We're overriding the __init__ method on our JSONLoader implementation and automatically determining the kind of model we're loading and its list of properties to provide to the bulkloader.Loader parent class.
Esfand S

Looking for Bulk Loader beta testers - Google App Engine | Google Groups - 0 views

  • for Java developers, there is a remote API handler available; adding following to your web xml file should work (disclaimer: I have not yet personally tested this.) <servlet>   <servlet-name>remoteapi</servlet-name>   <servlet-class>com.google.apphosting.utils.remoteapi.RemoteApiServlet</servlet-class> </servlet> <servlet-mapping>   <servlet-name>remoteapi</servlet-name>   <url-pattern>/remote_api</url-pattern> </servlet-mapping> <security-constraint>   <web-resource-collection>     <web-resource-name>remoteapi</web-resource-name>     <url-pattern>/remote_api</url-pattern>   </web-resource-collection>   <auth-constraint>     <role-name>admin</role-name>   </auth-constraint> </security-constraint>
Esfand S

Works fine on App Engine locally but get (session-related?) error after deploying to pr... - 0 views

  • the necessary changes to appengine-web.xml to get Sitebricks to run in development mode:         <sessions-enabled>true</sessions-enabled>         <system-properties>                 <property name="java.util.logging.config.file" value="WEB-INF/logging.properties"/>                 <property name="mvel2.disable.jit" value="true"/>         </system-properties>
Esfand S

Gridshore » Serving static files in Google app engine development edition - 0 views

  • Google app engine uses the concept of static files. This is a performance optimization. Using the file appengine-web.xml you can configure the way google handles static files. You can include and exclude certain files using their extension or name. More information can be found here at google. This all works nice in the online version, however there seems to be a problem with the development server. Some solutions try to configure the local version as well, still that did not work for me. I decided to look for a servlet that serves static files.
  • That is it, now you can test your stuff locally and all your scripts, images, styles are loaded by your application. Of course you have to remove this servlet before uploading your application. Hope it helps people with their local debugging of jquery scripts or other javascript things.
Esfand S

false and JSESSIONID - Google App Engine for Java | Google Groups - 0 views

  • disabling session id in code will not stop the cookie from saving session id. When you enable session in app engine xml file than you are telling the framework that you don't want to save sessions in cookies (client side), instead you want to save them on server i.e. using _ah_session. Cookies JSession id is default behavior of Java session mgmt. And it is nothing to do with APP engine framework.*
Esfand S

Using OpenID authentication on App Engine - Nick's Blog - 0 views

  • Once you've enabled OpenID authentication for your app, a few things change: URLs generated by create_login_url without a federated_identity parameter specified will redirect to the OpenID login page for Google Accounts. URLs that are protected by "login: required" in app.yaml or web.xml will result in a redirect to the path "/_ah/login_required", with a "continue" parameter of the page originally fetched. This allows you to provide your own openid login page. URLs generated by create_login_url with a federated_identity provider will redirect to the specified provider.
  • many users, when asked for their "openid URL" will simply look at you in puzzlement. What we need is a solution that avoids the need for most users to enter their URL themselves, while still allowing savvy users to do just that. Fortunately, there are a number of such solutions. One of them is clickpass. After signing in there and setting up an entry for your site, they'll provide you with code for a button that you can embed in your login page, and which allows users to choose from a number of well-known identity providers, including Hotmail, Yahoo!, Google, and Facebook, as well as entering their own URL.
Esfand S

Security and Authentication - in web.xml annoying error - Google App Engine for Java |... - 0 views

  • Add a <web-resource-name> element.  App Engine does not pay attention to it, but I believe it is technically required.
1 - 18 of 18
Showing 20 items per page