Skip to main content

Home/ Google AppEngine/ Contents contributed and discussions participated by Esfand S

Contents contributed and discussions participated by Esfand S

Esfand S

What is the best way to handle one to many relationships in the low level datastore api... - 0 views

  • Have you considered doing both? Then you could quickly get a list of computers a student owns by key OR use a query which returns results in some sorted order. I don't think maintaining a list of keys on the student model is as intimidating as you think.
Esfand S

Google App Engine for Java Questions - Google App Engine - Google Code - 0 views

  • How do I handle multipart form data? or How do I handle file uploads to my app? You can obtain the uploaded file data from a multipart form post using classes from the Apache Commons FileUpload package. Specifically you may want to use FileItemStream, FileItermIterator and ServletFileUpload as illustrated below. If you see a java.lang.NoClassDefFoundError after starting your application, make sure that the Apache Commons FileUpload JAR file has been copied to your war/WEB-INF/lib directory and added to your build path. import org.apache.commons.fileupload.FileItemStream;import org.apache.commons.fileupload.FileItemIterator;import org.apache.commons.fileupload.servlet.ServletFileUpload;import java.io.InputStream;import java.io.IOException;import java.util.logging.Logger;import javax.servlet.ServletException;import javax.servlet.http.HttpServlet;import javax.servlet.http.HttpServletRequest;import javax.servlet.http.HttpServletResponse;public class FileUpload extends HttpServlet {  private static final Logger log =      Logger.getLogger(FileUpload.class.getName());  public void doPost(HttpServletRequest req, HttpServletResponse res)      throws ServletException, IOException {    try {      ServletFileUpload upload = new ServletFileUpload();      res.setContentType("text/plain");      FileItemIterator iterator = upload.getItemIterator(req);      while (iterator.hasNext()) {        FileItemStream item = iterator.next();        InputStream stream = item.openStream();        if (item.isFormField()) {          log.warning("Got a form field: " + item.getFieldName());        } else {          log.warning("Got an uploaded file: " + item.getFieldName() +                      ", name = " + item.getName());          // You now have the filename (item.getName() and the          // contents (which you can read from stream).  Here we just          // print them back out to the servlet output stream, but you          // will probably want to do something more interesting (for          // example, wrap them in a Blob and commit them to the          // datastore).          int len;          byte[] buffer = new
Esfand S

Is it possible to create references in Google App Engine? - Stack Overflow - 0 views

  • A reference property simply stores the unique key of the entity it references. So the mother and father entities could each contain a copy of the key corresponding to their child
Esfand S

Datastore design question - Google App Engine | Google Groups - 0 views

  • It sounds like the list property can't be appended to without a transaction?  If so, it seems it'll be better to create two tables, one for Users and one for Items.
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

Using Asynchronous URLFetch on Java App Engine « Ikai Lan says - 0 views

  • Developers building applications on top of Java App Engine can use the familiar java.net interface for making off-network calls. For simple requests, this should be more than sufficient. The low-level API, however, provides one feature not available in java.net: asynchronous URLFetch.
  • The one killer feature of App Engine’s low-level API that isn’t present in java.net is asynchronous URLFetch. What is asynchronous fetch? Let’s make an analogy:
Esfand S

Reference ID in GAE - Stack Overflow - 0 views

  • IDs aren't even unique within a kind; they're unique within a kind and entity group. The reason they're not sequential is that an instance is allocated a large block of IDs, and unused ones aren't assigned to later instances
Esfand S

Extending Entity to provide real POGO like qualities with names attributes - Gaelyk | G... - 0 views

  • a plugin is just a bunch of files as is accurately described in the docs and these files go in certain places in your application's folders in order to be used as is also accurately described in the docs.
Esfand S

Extending Entity to provide real POGO like qualities with names attributes - Gaelyk | G... - 0 views

  • 1) Show the plugins.groovy and routes.groovy files in the WEB-INF folder in the Gaelyk project diagram. They are currently absent from the diagram. 2 Put a star or some other icon next to the mandatory plugins folder and the 2 mandatory plugin files (plugins.groovy and the plugin descriptor file) in the diagram. This will help show that one just needs to mix in in these files with the rest of their own project's files.
« First ‹ Previous 481 - 500 of 592 Next › Last »
Showing 20 items per page