[appengine-java] Re: Problem with Channel API
Oops forgot the stack trace: (this is from the google appengine log viewer): Uncaught exception from servlet com.google.appengine.api.channel.ChannelFailureException: An unexpected error occurred. at com.google.appengine.api.channel.ChannelServiceImpl.getExceptionForError(ChannelServiceImpl.java:112) at com.google.appengine.api.channel.ChannelServiceImpl.sendMessage(ChannelServiceImpl.java:68) at com.webstersmalley.chessweb.web.ChannelTestController.sendMessage(ChannelTestController.java:74) at com.webstersmalley.chessweb.web.ChannelTestController.getChannelTestMessage(ChannelTestController.java:68) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:43) at org.springframework.web.bind.annotation.support.HandlerMethodInvoker.invokeHandlerMethod(HandlerMethodInvoker.java:176) at org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.invokeHandlerMethod(AnnotationMethodHandlerAdapter.java:426) at org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.handle(AnnotationMethodHandlerAdapter.java:414) at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:790) at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:719) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:644) at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:560) at javax.servlet.http.HttpServlet.service(HttpServlet.java:637) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1166) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:388) at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216) at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182) at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765) at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:418) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152) at org.mortbay.jetty.Server.handle(Server.java:326) at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542) at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:923) at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404) at com.google.net.rpc.impl.RpcUtil.runRpcInApplication(RpcUtil.java:439) at com.google.net.rpc.impl.Server$RpcTask.runInContext(Server.java:573) at com.google.tracing.TraceContext$TraceContextRunnable$1.run(TraceContext.java:448) at com.google.tracing.TraceContext.runInContext(TraceContext.java:688) at com.google.tracing.TraceContext$AbstractTraceContextCallback.runInInheritedContextNoUnref(TraceContext.java:326) at com.google.tracing.TraceContext$AbstractTraceContextCallback.runInInheritedContext(TraceContext.java:318) at com.google.tracing.TraceContext$TraceContextRunnable.run(TraceContext.java:446) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) at java.lang.Thread.run(Thread.java:636) Caused by: com.google.apphosting.api.ApiProxy$ApplicationException: ApplicationError: 2: Unknown at com.google.net.rpc.RpcStub$RpcCallbackDispatcher$1.runInContext(RpcStub.java:1050) at com.google.tracing.TraceContext$TraceContextRunnable$1.run(TraceContext.java:448) at com.google.tracing.TraceContext.runInContext(TraceContext.java:688) at com.google.tracing.TraceContext$AbstractTraceContextCallback.runInInheritedContextNoUnref(TraceContext.java:326) at com.google.tracing.TraceContext$AbstractTraceContextCallback.runInInheritedContext(TraceContext.java:318) at com.google.tracing.TraceContext$TraceContextRunnable.run(TraceContext.java:446) at com.google.net.rpc.RpcStub$RpcCallbackDispatcher.rpcFinished(RpcStub.java:1071) at com.google.net.rpc.RPC.internalFinish(RPC.java:2184)
[appengine-java] Re: Setting Namespace for an entire Request
According to the docs, the namespace is set globally within the app, but you can use it On a per-User Basis for users that are logged in as an example and that user is the tenant. The docs aren't clear, but the namespace must be globally just for that tenant, yes? If that's the case, then you wouldn't need to worry about concurrent access. You could make a quick test with 2 users and different namespaces... On May 13, 11:55 pm, Aswath Satrasala aswath.satras...@gmail.com wrote: Namespace-api is set normally in a Servlet Filter, which is normally the beginning point for most application HttpRequests. This means, there is a request coming in, it is serviced by a single-thread. Namespace-api is threadsafe and the namespace is put in the threadlocal, and hence, the same namespace is available during the complete HttpRequest serviced by that thread. -Aswath On Fri, May 13, 2011 at 9:13 PM, mpire sebastian.wennin...@googlemail.comwrote: Hi! I'm trying to use the Namespace-API to build a multi-tenant app. Therefore i have defined a filter that sets the Namespace for each request regarding to the User making the request. However, if there's a new Request before the current request finishes its datastore-operation, the namespace would be overwritten by the new request and the current operation would have an incorrect namespace. I could also set the namespace before each datastore operation, but the problem would be the same.If another request overwrites the namespace before the operation is finished, the data in the database will be messed. Is there a way to set the namespace for an entire request? Or should i try to build some kind of Mutex around the NamespaceManager? Any suggestions to solve this problem are welcome :) Thx in advance -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] Re: How To: Persist an entity, if and only if, another successfully persists
I like Jeff's solution as it's failsafe, but one more pattern I often use is to set a couple of flags, and complete the 2nd action in a finally clause if needed. The timeout for the 30 sec limit does allow for a very quick transaction to still succeed, so I use that time to persist any state needed for the service I'm running, for example. On May 14, 4:09 pm, Jeff Schnitzer j...@infohazard.org wrote: Depending on your application, you may be able to perform the 2nd entity write in a task. Enqueue the task transactionally with the first operation. You'll be guaranteed that if the first entity commits, the 2nd will *eventually* be written as well. It's not a perfect solution for all apps but it does cover a lot of practical use cases. Jeff On Sat, May 14, 2011 at 7:52 AM, mscwd01 mscw...@gmail.com wrote: Hey I have two entities I update and which to persist. These are in two different entity groups so I cannot update and persist them within a Transaction. I am using JDO pm.makePersistentAll and must ensure each entity only saves to the datastore if both can be written. What's the best way to do this? Thanks -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group athttp://groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] Re: App engine SDK jars in WEB-INF/lib. Why???
On May 13, 2:29 am, Nichole nichole.k...@gmail.com wrote: Just a quick summary, the servlet spec requires that a servlet container such as appengine provider an implementation for a service. Those jars such as servlet- api-2.4.jar are needed at compile time. That's why there's provided scope in Maven. They are sometimes provided by the servlet container/ engines at run time in a global directory that is found by the container/engine classloader. They have to always be provided by the container. E.g. the HttpServletRequest interface that the container classes implement and that you program against have to be the same class defined by the same classloader otherwise you get a LinkageError. appengine provides the servlet, jsp implementations for us at runtime. The appengine specific service implementations are also needed at runtime and compile time and are present in the appengine-api-1.0-sdk-ver.jar. They've chosen not to add the latest sdk to the container global classpath, so yes, the application must provide it. But that's silly. That means you deploy the local simulation implementations into production. Cheers Philipe -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] how to transfer request to a different servlet ?
hi, i want to use a common servlet (say MainServlet) to handle all the requests and based on url requested i want to transfer request to a different servlet. for example: if requested url is www.mydomain.com/* i want to send request to HomeServlet and if requested url is test.mydomain.com/* i want to send request to TestServlet. is it possible to transfer request from one servlet to another servlet ? will calling new HomeServlet().doGet() from MainServlet be same as MainServlet (or any other servlet configured in web.xml) invocation by GAE ? any GAE specific solution to this ? thanks in advance :) -- Prashant -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] Re: Vs: Re: Stripes + UrlBinding + Google App Engine
sorry you're having problems. dont think this is an app engine issue since many folks use stripes on gae. here are the stripe parts from my web XML ?xml version=1.0 encoding=utf-8? web-app xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xmlns=http://java.sun.com/xml/ns/javaee; xmlns:web=http:// java.sun.com/xml/ns/javaee/web-app_2_4.xsd xsi:schemaLocation=http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_4.xsd; version=2.4 filter filter-nameStripesFilter/filter-name filter-classnet.sourceforge.stripes.controller.StripesFilter /filter-class init-param param-nameMultipartWrapperFactory.Class /param-name param-valuecom.wordpong.app.stripes.EmptyMultipartWrapper /param-value /init-param /filter filter-mapping filter-nameStripesFilter/filter-name servlet-nameDispatcherServlet/servlet-name !-- add jsps for layout support -- url-pattern*.jsp/url-pattern dispatcherREQUEST/dispatcher dispatcherFORWARD/dispatcher /filter-mapping !-- Stripes Config -- servlet servlet-nameDispatcherServlet/servlet-name servlet-classnet.sourceforge.stripes.controller.DispatcherServlet /servlet-class load-on-startup1/load-on-startup /servlet servlet-mapping servlet-nameDispatcherServlet/servlet-name url-pattern*.action/url-pattern /servlet-mapping filter filter-nameDynamicMappingFilter/filter-name filter- classnet.sourceforge.stripes.controller.DynamicMappingFilter /filter-class /filter filter-mapping filter-nameDynamicMappingFilter/filter-name url-pattern/*/url-pattern dispatcherREQUEST/dispatcher dispatcherFORWARD/dispatcher /filter-mapping On May 14, 11:05 am, Pauli Savolainen savolainen.pa...@gmail.com wrote: Hello I had some time to try this again, but I still have no success. I have an ActionBean with @UrlBinding(/home). The @DefaultHandler method ForwardResolutions to index.jsp which only prints Hello: @DefaultHandler public Resolution home() { return new ForwardResolution(index.jsp); // Also tried /index.jsp } In dev environment I access my app viahttp://localhost:/index.jspandhttp://localhost:/home. Both print Hello. That is, it works perfectly. After I have deployed my app on appengine I access the application via http://myapp.appspot.com/index.jsp. This prints Hello, but when I access my app via http://myapp.appspot.com/home I get an infinite redirect loop. I checked the app engine logs: /home/index.jsp/index.jsp/index.jsp/index.jsp/index.jsp/index.jsp/index.jsp /index.jsp/index.jsp/index.jsp/index.jsp/index.jsp/index.jsp/index.jsp/inde x.jsp /home/index.jsp/index.jsp/index.jsp/index.jsp/index.jsp/index.jsp/index.jsp /index.jsp/index.jsp/index.jsp/index.jsp/index.jsp/index.jsp/index.jsp /home/index.jsp/index.jsp/index.jsp/index.jsp/index.jsp/index.jsp/index.jsp /index.jsp/index.jsp/index.jsp/index.jsp/index.jsp/index.jsp /home/index.jsp/index.jsp/index.jsp/index.jsp/index.jsp/index.jsp/index.jsp /index.jsp/index.jsp/index.jsp/index.jsp/index.jsp /home/index.jsp/index.jsp/index.jsp/index.jsp/index.jsp/index.jsp/index.jsp /index.jsp/index.jsp/index.jsp/index.jsp /home/index.jsp/index.jsp/index.jsp/index.jsp/index.jsp/index.jsp/index.jsp /index.jsp/index.jsp/index.jsp /home/index.jsp/index.jsp/index.jsp/index.jsp/index.jsp/index.jsp/index.jsp /index.jsp/index.jsp /home/index.jsp/index.jsp/index.jsp/index.jsp/index.jsp/index.jsp/index.jsp /index.jsp /home/index.jsp/index.jsp/index.jsp/index.jsp/index.jsp/index.jsp/index.jsp /home/index.jsp/index.jsp/index.jsp/index.jsp/index.jsp/index.jsp /home/index.jsp/index.jsp/index.jsp/index.jsp/index.jsp /home/index.jsp/index.jsp/index.jsp/index.jsp /home/index.jsp/index.jsp/index.jsp /home/index.jsp/index.jsp /home/index.jsp /home/ I consider this more an app engine issue than Stripes issue because everything works locally but not in app engine. Stripes uses a servlet filter to handle the UrlBindings. The filter javadocs states: This filter takes the following approach to determining when to dispatch an ActionBeanhttp://stripes.sourceforge.net/docs/current/javadoc/net/sourceforge/s...: 1. Allow the request to process normally, trapping any HTTP errors that are returned. 2. If no error was returned then do nothing, allowing the request to complete successfully. If any error other than 404 was returned then send the error through.
[appengine-java] Re: Vs: Re: Stripes + UrlBinding + Google App Engine
there is no file system in gae so the multipart wrapper could be your problem. it probably would work locally by not in prod On May 15, 8:30 am, Mike Lawrence m...@systemsplanet.com wrote: sorry you're having problems. dont think this is an app engine issue since many folks use stripes on gae. here are the stripe parts from my web XML ?xml version=1.0 encoding=utf-8? web-app xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xmlns=http://java.sun.com/xml/ns/javaee; xmlns:web=http:// java.sun.com/xml/ns/javaee/web-app_2_4.xsd xsi:schemaLocation=http://java.sun.com/xml/ns/javaeehttp://java.sun.com/xml/ns/javaee/web-app_2_4.xsd; version=2.4 filter filter-nameStripesFilter/filter-name filter-classnet.sourceforge.stripes.controller.StripesFilter /filter-class init-param param-nameMultipartWrapperFactory.Class /param-name param-valuecom.wordpong.app.stripes.EmptyMultipartWrapper /param-value /init-param /filter filter-mapping filter-nameStripesFilter/filter-name servlet-nameDispatcherServlet/servlet-name !-- add jsps for layout support -- url-pattern*.jsp/url-pattern dispatcherREQUEST/dispatcher dispatcherFORWARD/dispatcher /filter-mapping !-- Stripes Config -- servlet servlet-nameDispatcherServlet/servlet-name servlet-classnet.sourceforge.stripes.controller.DispatcherServlet /servlet-class load-on-startup1/load-on-startup /servlet servlet-mapping servlet-nameDispatcherServlet/servlet-name url-pattern*.action/url-pattern /servlet-mapping filter filter-nameDynamicMappingFilter/filter-name filter- classnet.sourceforge.stripes.controller.DynamicMappingFilter /filter-class /filter filter-mapping filter-nameDynamicMappingFilter/filter-name url-pattern/*/url-pattern dispatcherREQUEST/dispatcher dispatcherFORWARD/dispatcher /filter-mapping On May 14, 11:05 am, Pauli Savolainen savolainen.pa...@gmail.com wrote: Hello I had some time to try this again, but I still have no success. I have an ActionBean with @UrlBinding(/home). The @DefaultHandler method ForwardResolutions to index.jsp which only prints Hello: @DefaultHandler public Resolution home() { return new ForwardResolution(index.jsp); // Also tried /index.jsp } In dev environment I access my app viahttp://localhost:/index.jspandhttp://localhost:/home. Both print Hello. That is, it works perfectly. After I have deployed my app on appengine I access the application via http://myapp.appspot.com/index.jsp. This prints Hello, but when I access my app via http://myapp.appspot.com/home I get an infinite redirect loop. I checked the app engine logs: /home/index.jsp/index.jsp/index.jsp/index.jsp/index.jsp/index.jsp/index.jsp /index.jsp/index.jsp/index.jsp/index.jsp/index.jsp/index.jsp/index.jsp/inde x.jsp /home/index.jsp/index.jsp/index.jsp/index.jsp/index.jsp/index.jsp/index.jsp /index.jsp/index.jsp/index.jsp/index.jsp/index.jsp/index.jsp/index.jsp /home/index.jsp/index.jsp/index.jsp/index.jsp/index.jsp/index.jsp/index.jsp /index.jsp/index.jsp/index.jsp/index.jsp/index.jsp/index.jsp /home/index.jsp/index.jsp/index.jsp/index.jsp/index.jsp/index.jsp/index.jsp /index.jsp/index.jsp/index.jsp/index.jsp/index.jsp /home/index.jsp/index.jsp/index.jsp/index.jsp/index.jsp/index.jsp/index.jsp /index.jsp/index.jsp/index.jsp/index.jsp /home/index.jsp/index.jsp/index.jsp/index.jsp/index.jsp/index.jsp/index.jsp /index.jsp/index.jsp/index.jsp /home/index.jsp/index.jsp/index.jsp/index.jsp/index.jsp/index.jsp/index.jsp /index.jsp/index.jsp /home/index.jsp/index.jsp/index.jsp/index.jsp/index.jsp/index.jsp/index.jsp /index.jsp /home/index.jsp/index.jsp/index.jsp/index.jsp/index.jsp/index.jsp/index.jsp /home/index.jsp/index.jsp/index.jsp/index.jsp/index.jsp/index.jsp /home/index.jsp/index.jsp/index.jsp/index.jsp/index.jsp /home/index.jsp/index.jsp/index.jsp/index.jsp /home/index.jsp/index.jsp/index.jsp /home/index.jsp/index.jsp /home/index.jsp /home/ I consider this more an app engine issue than Stripes issue because everything works locally but not in app engine. Stripes uses a servlet filter to handle the UrlBindings. The filter javadocs states: This filter takes the following approach to determining when to dispatch an ActionBeanhttp://stripes.sourceforge.net/docs/current/javadoc/net/sourceforge/s...:
[appengine-java] Re: Backends.xml ERROR when deploying
I think you need to use a uppercase B for the classes. When I tried deploying using a lowercase b1 eclipse was complating about a volidation with the backends.xsd. Try this: backends backend name=tastBackend classB1/class instances1/instances /backend /backends However, I can get it to deploy. But it still says: You have not created any backends for this application. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] Re: how to transfer request to a different servlet ?
Do you mean: response.sendRedirect(url); Brandon Donnelson http://gwt-examples.googlecode.com -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] Re: UserService.getCurrentUser() returning null sometimes
Dev or Production side? I've had this happen on the dev side at times. I haven't seen it recently in my app. Brandon Donnelson http://gwt-examples.googlecode.com -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
Re: [appengine-java] Re: open source pdf engine for GAE
Hie Just a little question. I am using this pdfJet thing. The requirement for us is to create a pdf and then mail it to a user. So i am done with pdf creation part and at then end i have the code like: OutputStream out = resp.getOutputStream(); PDF pdf = new PDF(out); some actual writing. pdf.flush(); out.close(); Now the question i have is after this step how do i actually get handle to the created pdf above and attach it to an email ? Thankx and Regards Vik Founder http://www.sakshum.org http://blog.sakshum.org On Tue, Apr 20, 2010 at 1:52 PM, Patou patou.de.saint.ste...@gmail.comwrote: Hello In App Engine, You can't write a file to the file system. Otherwise the save method can't be used in GAE. Use this code to send the pdf to the navigator : pdf.wrap(); String fileName = Example_03.pdf; resp.setContentType(application/pdf); resp.setHeader(Content-Disposition, attachment; filename=\ + fileName + \); ServletOutputStream outs = resp.getOutputStream(); pdf.getData().writeTo(outs); Or to save to the datastore : new Blob(pdf.getData().toByteArray()); Bests Regards Patrice On Apr 20, 4:18 am, jeno jeno...@gmail.com wrote: Hi François , Thanks for your help. I have used PDFjet (PDFJet.jar version 2.72) PDF class missing save method So i cant call pdf.save(d.pdf) method. Cheers jeno On Apr 19, 6:48 pm, François Masurel fm2...@mably.com wrote: Hi Jeno, You can try the PDFjet Open Source Edition : http://pdfjet.com/os/edition.html François On 19 avr, 01:55, jeno jeno...@gmail.com wrote: Hi Guys, Anyone know open source java pdf engine for GAE. Thanks Jeno -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group athttp:// groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group athttp:// groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group athttp:// groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
Re: [appengine-java] Re: how to transfer request to a different servlet ?
no, sorry :( . i want (kind of) server side redirect. you can think of a scenario where multiple applications are hosted in a single google appengine app but each app has to respond to its own unique domain. all the applications are handled by a master application. master application will accept all incoming requests, check the domain in the request and pass the request to the application the request is mapped to. for example: www.mydomain.com is mapped to MyHomeApp gallery.mydomain.com is mapped to MyGalleryApp test.mydomain.com is mapped to MyTestApp etc. all the apps have a main servlet (which you will map to /* in web.xml if you are not doing what i am trying to do), say HomeServlet, GalleryServlet and TestServlet. now if MasterServlet (mapped in web.xml to /*) receives a request which matches www.mydomain.com/*, it will pass that request to HomeSevlet; if it receives a request of type test.mydomain.com/*, it will pass the request to TestServlet. now here are my doubts : is it possible to transfer request from one servlet to another servlet ? MasterServlet to HomeServlet for example. is calling new HomeServlet().doGet() from MainServlet just fine (same as mapping HomeServlet to /* in web.xml) ? thanks. On Sun, May 15, 2011 at 7:13 PM, Brandon Donnelson branflake2...@gmail.comwrote: Do you mean: response.sendRedirect(url); Brandon Donnelson http://gwt-examples.googlecode.com -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
Re: [appengine-java] Re: how to transfer request to a different servlet ?
Using Spring MVC you could use it to solve the problem. Basically you want different Controller for http://www.mainsite.com and http://test.mainsite.com I have used it in one of my application. I write all the steps in a blog here. I hope it will helpfull http://techsravi.blogspot.com/2011/05/managing-multiple-domain-and-sub-domain.html thanks, Ravi. On Sun, May 15, 2011 at 2:43 PM, Brandon Donnelson branflake2...@gmail.comwrote: Do you mean: response.sendRedirect(url); Brandon Donnelson http://gwt-examples.googlecode.com -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
Re: [appengine-java] Re: how to transfer request to a different servlet ?
thanks a lot Ravi. i will read your article and give it a try On Sun, May 15, 2011 at 8:20 PM, Ravi Sharma ping2r...@gmail.com wrote: Using Spring MVC you could use it to solve the problem. Basically you want different Controller for http://www.mainsite.com and http://test.mainsite.com I have used it in one of my application. I write all the steps in a blog here. I hope it will helpfull http://techsravi.blogspot.com/2011/05/managing-multiple-domain-and-sub-domain.html thanks, Ravi. On Sun, May 15, 2011 at 2:43 PM, Brandon Donnelson branflake2...@gmail.com wrote: Do you mean: response.sendRedirect(url); Brandon Donnelson http://gwt-examples.googlecode.com -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
Re: [appengine-java] Re: open source pdf engine for GAE
You're writing the PDF as your web page output. Use a ByteArrayOutputStream instead. On Sun, May 15, 2011 at 7:16 AM, Vik vik@gmail.com wrote: Hie Just a little question. I am using this pdfJet thing. The requirement for us is to create a pdf and then mail it to a user. So i am done with pdf creation part and at then end i have the code like: OutputStream out = resp.getOutputStream(); PDF pdf = new PDF(out); some actual writing. pdf.flush(); out.close(); Now the question i have is after this step how do i actually get handle to the created pdf above and attach it to an email ? Thankx and Regards Vik Founder http://www.sakshum.org http://blog.sakshum.org On Tue, Apr 20, 2010 at 1:52 PM, Patou patou.de.saint.ste...@gmail.comwrote: Hello In App Engine, You can't write a file to the file system. Otherwise the save method can't be used in GAE. Use this code to send the pdf to the navigator : pdf.wrap(); String fileName = Example_03.pdf; resp.setContentType(application/pdf); resp.setHeader(Content-Disposition, attachment; filename=\ + fileName + \); ServletOutputStream outs = resp.getOutputStream(); pdf.getData().writeTo(outs); Or to save to the datastore : new Blob(pdf.getData().toByteArray()); Bests Regards Patrice On Apr 20, 4:18 am, jeno jeno...@gmail.com wrote: Hi François , Thanks for your help. I have used PDFjet (PDFJet.jar version 2.72) PDF class missing save method So i cant call pdf.save(d.pdf) method. Cheers jeno On Apr 19, 6:48 pm, François Masurel fm2...@mably.com wrote: Hi Jeno, You can try the PDFjet Open Source Edition : http://pdfjet.com/os/edition.html François On 19 avr, 01:55, jeno jeno...@gmail.com wrote: Hi Guys, Anyone know open source java pdf engine for GAE. Thanks Jeno -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group athttp:// groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group athttp:// groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group athttp:// groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
Re: [appengine-java] Re: open source pdf engine for GAE
Hie Stephon Still I am not sure on the part that ultimately how will i use this stream to attach the generated pdf as an attachment in the email. Please advise Thankx and Regards Vik Founder http://www.sakshum.org http://blog.sakshum.org On Sun, May 15, 2011 at 9:56 PM, Stephen Johnson onepagewo...@gmail.comwrote: You're writing the PDF as your web page output. Use a ByteArrayOutputStream instead. On Sun, May 15, 2011 at 7:16 AM, Vik vik@gmail.com wrote: Hie Just a little question. I am using this pdfJet thing. The requirement for us is to create a pdf and then mail it to a user. So i am done with pdf creation part and at then end i have the code like: OutputStream out = resp.getOutputStream(); PDF pdf = new PDF(out); some actual writing. pdf.flush(); out.close(); Now the question i have is after this step how do i actually get handle to the created pdf above and attach it to an email ? Thankx and Regards Vik Founder http://www.sakshum.org http://blog.sakshum.org On Tue, Apr 20, 2010 at 1:52 PM, Patou patou.de.saint.ste...@gmail.comwrote: Hello In App Engine, You can't write a file to the file system. Otherwise the save method can't be used in GAE. Use this code to send the pdf to the navigator : pdf.wrap(); String fileName = Example_03.pdf; resp.setContentType(application/pdf); resp.setHeader(Content-Disposition, attachment; filename=\ + fileName + \); ServletOutputStream outs = resp.getOutputStream(); pdf.getData().writeTo(outs); Or to save to the datastore : new Blob(pdf.getData().toByteArray()); Bests Regards Patrice On Apr 20, 4:18 am, jeno jeno...@gmail.com wrote: Hi François , Thanks for your help. I have used PDFjet (PDFJet.jar version 2.72) PDF class missing save method So i cant call pdf.save(d.pdf) method. Cheers jeno On Apr 19, 6:48 pm, François Masurel fm2...@mably.com wrote: Hi Jeno, You can try the PDFjet Open Source Edition : http://pdfjet.com/os/edition.html François On 19 avr, 01:55, jeno jeno...@gmail.com wrote: Hi Guys, Anyone know open source java pdf engine for GAE. Thanks Jeno -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group athttp:// groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group athttp:// groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group athttp:// groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
Re: [appengine-java] Re: how to transfer request to a different servlet ?
You should be able to use the RequestDispatcher object to do what you want but you'll have to have mappings in web.xml for each of the servlets your forwarding to for instance MyGalleryApp would have mappings that all start with /MyGalleryApp/ (or something similar) so GalleryServlet would map to something like /MyGalleryApp/GalleryServlet (or something similar) On Sun, May 15, 2011 at 7:51 AM, Prashant antsh...@gmail.com wrote:web thanks a lot Ravi. i will read your article and give it a try On Sun, May 15, 2011 at 8:20 PM, Ravi Sharma ping2r...@gmail.com wrote: Using Spring MVC you could use it to solve the problem. Basically you want different Controller for http://www.mainsite.com and http://test.mainsite.com I have used it in one of my application. I write all the steps in a blog here. I hope it will helpfull http://techsravi.blogspot.com/2011/05/managing-multiple-domain-and-sub-domain.html thanks, Ravi. On Sun, May 15, 2011 at 2:43 PM, Brandon Donnelson branflake2...@gmail.com wrote: Do you mean: response.sendRedirect(url); Brandon Donnelson http://gwt-examples.googlecode.com -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
Re: [appengine-java] Re: open source pdf engine for GAE
Hi Vik, Call toByteArray() method on ByteArrayOutputStream when finished with creating PDF and then MimeBodyPart attachment = new MimeBodyPart(); attachment.setFileName(whatever.pdf); attachment.setContent(attachmentData, application/pdf); mp.addBodyPart(attachment); See http://code.google.com/appengine/docs/java/mail/usingjavamail.html Stephen On Sun, May 15, 2011 at 9:34 AM, Vik vik@gmail.com wrote: Hie Stephon Still I am not sure on the part that ultimately how will i use this stream to attach the generated pdf as an attachment in the email. Please advise Thankx and Regards Vik Founder http://www.sakshum.org http://blog.sakshum.org On Sun, May 15, 2011 at 9:56 PM, Stephen Johnson onepagewo...@gmail.comwrote: You're writing the PDF as your web page output. Use a ByteArrayOutputStream instead. On Sun, May 15, 2011 at 7:16 AM, Vik vik@gmail.com wrote: Hie Just a little question. I am using this pdfJet thing. The requirement for us is to create a pdf and then mail it to a user. So i am done with pdf creation part and at then end i have the code like: OutputStream out = resp.getOutputStream(); PDF pdf = new PDF(out); some actual writing. pdf.flush(); out.close(); Now the question i have is after this step how do i actually get handle to the created pdf above and attach it to an email ? Thankx and Regards Vik Founder http://www.sakshum.org http://blog.sakshum.org On Tue, Apr 20, 2010 at 1:52 PM, Patou patou.de.saint.ste...@gmail.comwrote: Hello In App Engine, You can't write a file to the file system. Otherwise the save method can't be used in GAE. Use this code to send the pdf to the navigator : pdf.wrap(); String fileName = Example_03.pdf; resp.setContentType(application/pdf); resp.setHeader(Content-Disposition, attachment; filename=\ + fileName + \); ServletOutputStream outs = resp.getOutputStream(); pdf.getData().writeTo(outs); Or to save to the datastore : new Blob(pdf.getData().toByteArray()); Bests Regards Patrice On Apr 20, 4:18 am, jeno jeno...@gmail.com wrote: Hi François , Thanks for your help. I have used PDFjet (PDFJet.jar version 2.72) PDF class missing save method So i cant call pdf.save(d.pdf) method. Cheers jeno On Apr 19, 6:48 pm, François Masurel fm2...@mably.com wrote: Hi Jeno, You can try the PDFjet Open Source Edition : http://pdfjet.com/os/edition.html François On 19 avr, 01:55, jeno jeno...@gmail.com wrote: Hi Guys, Anyone know open source java pdf engine for GAE. Thanks Jeno -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group athttp:// groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group athttp:// groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group athttp:// groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at
Re: [appengine-java] Re: open source pdf engine for GAE
Thanks 2 futher things 1. What is the link between toByteArray() and attachment part of the code? I mean i do not see the byteArray being used anywhere in the code you provided. 2. Servlet response is giving ServletResponseOutputStream and on googling i did not find a way to convert it to ByteArrayOutStream, Any idea on this part? Please advise Thankx and Regards Vik Founder http://www.sakshum.org http://blog.sakshum.org On Sun, May 15, 2011 at 10:16 PM, Stephen Johnson onepagewo...@gmail.comwrote: Hi Vik, Call toByteArray() method on ByteArrayOutputStream when finished with creating PDF and then MimeBodyPart attachment = new MimeBodyPart(); attachment.setFileName(whatever.pdf); attachment.setContent(attachmentData, application/pdf); mp.addBodyPart(attachment); See http://code.google.com/appengine/docs/java/mail/usingjavamail.html Stephen On Sun, May 15, 2011 at 9:34 AM, Vik vik@gmail.com wrote: Hie Stephon Still I am not sure on the part that ultimately how will i use this stream to attach the generated pdf as an attachment in the email. Please advise Thankx and Regards Vik Founder http://www.sakshum.org http://blog.sakshum.org On Sun, May 15, 2011 at 9:56 PM, Stephen Johnson onepagewo...@gmail.comwrote: You're writing the PDF as your web page output. Use a ByteArrayOutputStream instead. On Sun, May 15, 2011 at 7:16 AM, Vik vik@gmail.com wrote: Hie Just a little question. I am using this pdfJet thing. The requirement for us is to create a pdf and then mail it to a user. So i am done with pdf creation part and at then end i have the code like: OutputStream out = resp.getOutputStream(); PDF pdf = new PDF(out); some actual writing. pdf.flush(); out.close(); Now the question i have is after this step how do i actually get handle to the created pdf above and attach it to an email ? Thankx and Regards Vik Founder http://www.sakshum.org http://blog.sakshum.org On Tue, Apr 20, 2010 at 1:52 PM, Patou patou.de.saint.ste...@gmail.com wrote: Hello In App Engine, You can't write a file to the file system. Otherwise the save method can't be used in GAE. Use this code to send the pdf to the navigator : pdf.wrap(); String fileName = Example_03.pdf; resp.setContentType(application/pdf); resp.setHeader(Content-Disposition, attachment; filename=\ + fileName + \); ServletOutputStream outs = resp.getOutputStream(); pdf.getData().writeTo(outs); Or to save to the datastore : new Blob(pdf.getData().toByteArray()); Bests Regards Patrice On Apr 20, 4:18 am, jeno jeno...@gmail.com wrote: Hi François , Thanks for your help. I have used PDFjet (PDFJet.jar version 2.72) PDF class missing save method So i cant call pdf.save(d.pdf) method. Cheers jeno On Apr 19, 6:48 pm, François Masurel fm2...@mably.com wrote: Hi Jeno, You can try the PDFjet Open Source Edition : http://pdfjet.com/os/edition.html François On 19 avr, 01:55, jeno jeno...@gmail.com wrote: Hi Guys, Anyone know open source java pdf engine for GAE. Thanks Jeno -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group athttp:// groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group athttp:// groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group athttp:// groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from
[appengine-java] Re: Backends.xml ERROR when deploying
Dennis, You're half-way there :) GAE won't create a backend for you until you use the appcfg.sh 'update' command to update the backends. Check out the docs here: http://code.google.com/appengine/docs/java/backends/overview.html#Commands I also was really expecting the backends.xml file backends to show up in the admin UI - because all the other xml config files (cron.xml web.xml queue.xml) take effect as soon as you deploy. My guess is that the GAE team didn't intend it to be this way or that it's necessary to do that appcfg.sh step one reason or another. As soon as you get the backend running, you may have a hard time calling URLs on the backend. I got a not ready message a lot but that seems to go away after a little while. I'm having a hard time figuring out how to get the backend to run cron scheduled tasks. If you figure out a good way to do that, let me know. Thanks. -jake -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
Re: [appengine-java] Re: how to transfer request to a different servlet ?
thanks Ravi and Stephen for your responses. my application needs to do mapping at run time, i.e. it wouldn't be knowing how may subdomains it would be handling, so, i can't not use your techniques :( On Sun, May 15, 2011 at 10:13 PM, Stephen Johnson onepagewo...@gmail.comwrote: You should be able to use the RequestDispatcher object to do what you want but you'll have to have mappings in web.xml for each of the servlets your forwarding to for instance MyGalleryApp would have mappings that all start with /MyGalleryApp/ (or something similar) so GalleryServlet would map to something like /MyGalleryApp/GalleryServlet (or something similar) On Sun, May 15, 2011 at 7:51 AM, Prashant antsh...@gmail.com wrote:web thanks a lot Ravi. i will read your article and give it a try On Sun, May 15, 2011 at 8:20 PM, Ravi Sharma ping2r...@gmail.com wrote: Using Spring MVC you could use it to solve the problem. Basically you want different Controller for http://www.mainsite.com and http://test.mainsite.com I have used it in one of my application. I write all the steps in a blog here. I hope it will helpfull http://techsravi.blogspot.com/2011/05/managing-multiple-domain-and-sub-domain.html thanks, Ravi. On Sun, May 15, 2011 at 2:43 PM, Brandon Donnelson branflake2...@gmail.com wrote: Do you mean: response.sendRedirect(url); Brandon Donnelson http://gwt-examples.googlecode.com -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
Re: [appengine-java] Re: open source pdf engine for GAE
The code snippet is from the link I provided. Replace the attachmentData in the code snippet with the byte[] array returned from toByteArray(). You do not convert the ServletResponseOutputStream to a ByteArrayOutputStream. Create your own ByteArrayOuputStream. You want to send the PDF as an attachment to an email not as the response to your web request which is what you are doing when you use ServletResponseOutputStream. On Sun, May 15, 2011 at 10:23 AM, Vik vik@gmail.com wrote: Thanks 2 futher things 1. What is the link between toByteArray() and attachment part of the code? I mean i do not see the byteArray being used anywhere in the code you provided. 2. Servlet response is giving ServletResponseOutputStream and on googling i did not find a way to convert it to ByteArrayOutStream, Any idea on this part? Please advise Thankx and Regards Vik Founder http://www.sakshum.org http://blog.sakshum.org On Sun, May 15, 2011 at 10:16 PM, Stephen Johnson onepagewo...@gmail.comwrote: Hi Vik, Call toByteArray() method on ByteArrayOutputStream when finished with creating PDF and then MimeBodyPart attachment = new MimeBodyPart(); attachment.setFileName(whatever.pdf); attachment.setContent(attachmentData, application/pdf); mp.addBodyPart(attachment); See http://code.google.com/appengine/docs/java/mail/usingjavamail.html Stephen On Sun, May 15, 2011 at 9:34 AM, Vik vik@gmail.com wrote: Hie Stephon Still I am not sure on the part that ultimately how will i use this stream to attach the generated pdf as an attachment in the email. Please advise Thankx and Regards Vik Founder http://www.sakshum.org http://blog.sakshum.org On Sun, May 15, 2011 at 9:56 PM, Stephen Johnson onepagewo...@gmail.com wrote: You're writing the PDF as your web page output. Use a ByteArrayOutputStream instead. On Sun, May 15, 2011 at 7:16 AM, Vik vik@gmail.com wrote: Hie Just a little question. I am using this pdfJet thing. The requirement for us is to create a pdf and then mail it to a user. So i am done with pdf creation part and at then end i have the code like: OutputStream out = resp.getOutputStream(); PDF pdf = new PDF(out); some actual writing. pdf.flush(); out.close(); Now the question i have is after this step how do i actually get handle to the created pdf above and attach it to an email ? Thankx and Regards Vik Founder http://www.sakshum.org http://blog.sakshum.org On Tue, Apr 20, 2010 at 1:52 PM, Patou patou.de.saint.ste...@gmail.com wrote: Hello In App Engine, You can't write a file to the file system. Otherwise the save method can't be used in GAE. Use this code to send the pdf to the navigator : pdf.wrap(); String fileName = Example_03.pdf; resp.setContentType(application/pdf); resp.setHeader(Content-Disposition, attachment; filename=\ + fileName + \); ServletOutputStream outs = resp.getOutputStream(); pdf.getData().writeTo(outs); Or to save to the datastore : new Blob(pdf.getData().toByteArray()); Bests Regards Patrice On Apr 20, 4:18 am, jeno jeno...@gmail.com wrote: Hi François , Thanks for your help. I have used PDFjet (PDFJet.jar version 2.72) PDF class missing save method So i cant call pdf.save(d.pdf) method. Cheers jeno On Apr 19, 6:48 pm, François Masurel fm2...@mably.com wrote: Hi Jeno, You can try the PDFjet Open Source Edition : http://pdfjet.com/os/edition.html François On 19 avr, 01:55, jeno jeno...@gmail.com wrote: Hi Guys, Anyone know open source java pdf engine for GAE. Thanks Jeno -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group athttp:// groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group athttp:// groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group athttp:// groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine for
[appengine-java] Vs: Re: Vs: Re: Stripes + UrlBinding + Google App Engine
Hello I did implement an empty mulitpart wrapper as I listed in my previous message so that was not the problem. Fortunately, I did solve my problem. The problem was not in the Stripes configuration at all. I had a following tag in my web.xml: jsp-config jsp-property-group url-pattern*.jsp/url-pattern include-prelude/jsp/include.jsp/include-prelude /jsp-property-group /jsp-config After removing it my app started working on the app engine as well. The app engine documentation (http://code.google.com/appengine/docs/java/config/webxml.html#web_xml_Features_Not_Supported) doesn't list this feature as unsupported. This threw me off a bit. But again, like so many time before, the problem lied in the configuration and the solution was found through relentless trial and error. Thanks for your help! Cheers Pauli Savolainen -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] Will requests from the same source typically be routed to the same GAE instance?
I'm planning to build a web service on GAE that I anticipate having to deal with significant amounts of load. I therefore want to make full use of memcache such that hopefully, most requests won't need to go to the datastore. There will be several different users of this web service, and each one is likely to require different, and not-overlapping data from the datastore. My hope is that GAE's load balancing will tend to send requests from the same user to the same Google App Engine instance, which will increase the memcache hit-rate. Is this how the load balancer works? Ian. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
Re: [appengine-java] Will requests from the same source typically be routed to the same GAE instance?
memcache is shared between all instances, so there's no need to check this you should also have a look at datastore namespaces On Sunday, May 15, 2011, Ian Clarke ian.cla...@gmail.com wrote: I'm planning to build a web service on GAE that I anticipate having to deal with significant amounts of load. I therefore want to make full use of memcache such that hopefully, most requests won't need to go to the datastore. There will be several different users of this web service, and each one is likely to require different, and not-overlapping data from the datastore. My hope is that GAE's load balancing will tend to send requests from the same user to the same Google App Engine instance, which will increase the memcache hit-rate. Is this how the load balancer works? Ian. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- Pieter Coucke - Onthoo BVBA http://www.onthoo.com/ zamtam.com http://www.zamtam.com in The Netherlandshttp://www.koopjeszoeker.com/| Belgium ( nl http://www.koopjeszoeker.be/ | fr http://fr.zamtam.be/) | Francehttp://www.zamtam.fr/| Germany http://www.zamtam.de/ | UK http://www.zamtam.co.uk/http://www.zamtam.co.uk/ -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
Re: [appengine-java] Will requests from the same source typically be routed to the same GAE instance?
Thanks Pieter, yes, it sounds like namespaces will solve this problem for me. Ian. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
Re: [appengine-java] Re: Backends.xml ERROR when deploying
Hi Jake, Can you give me the exact command you used? I'm not sure how to use appcfg.sh for the backend features. I'm actually planning to use the affcfg.py (which I believe is the same but just the python version) So what are the dir and [update] values supposed to be to make these backends.xml appear in the admin UI? My best guess is: appcfg.py ~/myapp/war/WEB-INF/appengine-web.xml backends update I dont think that's correct and want to know what you typed to get it to appear in the admin UI. Thanks! On Mon, May 16, 2011 at 3:29 AM, JakeP jake.pier...@gmail.com wrote: Dennis, You're half-way there :) GAE won't create a backend for you until you use the appcfg.sh 'update' command to update the backends. Check out the docs here: http://code.google.com/appengine/docs/java/backends/overview.html#Commands I also was really expecting the backends.xml file backends to show up in the admin UI - because all the other xml config files (cron.xml web.xml queue.xml) take effect as soon as you deploy. My guess is that the GAE team didn't intend it to be this way or that it's necessary to do that appcfg.sh step one reason or another. As soon as you get the backend running, you may have a hard time calling URLs on the backend. I got a not ready message a lot but that seems to go away after a little while. I'm having a hard time figuring out how to get the backend to run cron scheduled tasks. If you figure out a good way to do that, let me know. Thanks. -jake -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
Re: [appengine-java] Re: open source pdf engine for GAE
Thanks a lot Stephen ! I could complete the code and testing now. Your great support will really help our cause to serve the needy. Thankx and Regards Vik Founder http://www.sakshum.org http://blog.sakshum.org On Sun, May 15, 2011 at 11:15 PM, Stephen Johnson onepagewo...@gmail.comwrote: The code snippet is from the link I provided. Replace the attachmentData in the code snippet with the byte[] array returned from toByteArray(). You do not convert the ServletResponseOutputStream to a ByteArrayOutputStream. Create your own ByteArrayOuputStream. You want to send the PDF as an attachment to an email not as the response to your web request which is what you are doing when you use ServletResponseOutputStream. On Sun, May 15, 2011 at 10:23 AM, Vik vik@gmail.com wrote: Thanks 2 futher things 1. What is the link between toByteArray() and attachment part of the code? I mean i do not see the byteArray being used anywhere in the code you provided. 2. Servlet response is giving ServletResponseOutputStream and on googling i did not find a way to convert it to ByteArrayOutStream, Any idea on this part? Please advise Thankx and Regards Vik Founder http://www.sakshum.org http://blog.sakshum.org On Sun, May 15, 2011 at 10:16 PM, Stephen Johnson onepagewo...@gmail.com wrote: Hi Vik, Call toByteArray() method on ByteArrayOutputStream when finished with creating PDF and then MimeBodyPart attachment = new MimeBodyPart(); attachment.setFileName(whatever.pdf); attachment.setContent(attachmentData, application/pdf); mp.addBodyPart(attachment); See http://code.google.com/appengine/docs/java/mail/usingjavamail.html Stephen On Sun, May 15, 2011 at 9:34 AM, Vik vik@gmail.com wrote: Hie Stephon Still I am not sure on the part that ultimately how will i use this stream to attach the generated pdf as an attachment in the email. Please advise Thankx and Regards Vik Founder http://www.sakshum.org http://blog.sakshum.org On Sun, May 15, 2011 at 9:56 PM, Stephen Johnson onepagewo...@gmail.com wrote: You're writing the PDF as your web page output. Use a ByteArrayOutputStream instead. On Sun, May 15, 2011 at 7:16 AM, Vik vik@gmail.com wrote: Hie Just a little question. I am using this pdfJet thing. The requirement for us is to create a pdf and then mail it to a user. So i am done with pdf creation part and at then end i have the code like: OutputStream out = resp.getOutputStream(); PDF pdf = new PDF(out); some actual writing. pdf.flush(); out.close(); Now the question i have is after this step how do i actually get handle to the created pdf above and attach it to an email ? Thankx and Regards Vik Founder http://www.sakshum.org http://blog.sakshum.org On Tue, Apr 20, 2010 at 1:52 PM, Patou patou.de.saint.ste...@gmail.com wrote: Hello In App Engine, You can't write a file to the file system. Otherwise the save method can't be used in GAE. Use this code to send the pdf to the navigator : pdf.wrap(); String fileName = Example_03.pdf; resp.setContentType(application/pdf); resp.setHeader(Content-Disposition, attachment; filename=\ + fileName + \); ServletOutputStream outs = resp.getOutputStream(); pdf.getData().writeTo(outs); Or to save to the datastore : new Blob(pdf.getData().toByteArray()); Bests Regards Patrice On Apr 20, 4:18 am, jeno jeno...@gmail.com wrote: Hi François , Thanks for your help. I have used PDFjet (PDFJet.jar version 2.72) PDF class missing save method So i cant call pdf.save(d.pdf) method. Cheers jeno On Apr 19, 6:48 pm, François Masurel fm2...@mably.com wrote: Hi Jeno, You can try the PDFjet Open Source Edition : http://pdfjet.com/os/edition.html François On 19 avr, 01:55, jeno jeno...@gmail.com wrote: Hi Guys, Anyone know open source java pdf engine for GAE. Thanks Jeno -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group athttp:// groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group athttp:// groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to
Re: [appengine-java] Re: open source pdf engine for GAE
Great! Glad to hear you got it working. On Sun, May 15, 2011 at 7:18 PM, Vik vik@gmail.com wrote: Thanks a lot Stephen ! I could complete the code and testing now. Your great support will really help our cause to serve the needy. Thankx and Regards Vik Founder http://www.sakshum.org http://blog.sakshum.org On Sun, May 15, 2011 at 11:15 PM, Stephen Johnson onepagewo...@gmail.comwrote: The code snippet is from the link I provided. Replace the attachmentData in the code snippet with the byte[] array returned from toByteArray(). You do not convert the ServletResponseOutputStream to a ByteArrayOutputStream. Create your own ByteArrayOuputStream. You want to send the PDF as an attachment to an email not as the response to your web request which is what you are doing when you use ServletResponseOutputStream. On Sun, May 15, 2011 at 10:23 AM, Vik vik@gmail.com wrote: Thanks 2 futher things 1. What is the link between toByteArray() and attachment part of the code? I mean i do not see the byteArray being used anywhere in the code you provided. 2. Servlet response is giving ServletResponseOutputStream and on googling i did not find a way to convert it to ByteArrayOutStream, Any idea on this part? Please advise Thankx and Regards Vik Founder http://www.sakshum.org http://blog.sakshum.org On Sun, May 15, 2011 at 10:16 PM, Stephen Johnson onepagewo...@gmail.com wrote: Hi Vik, Call toByteArray() method on ByteArrayOutputStream when finished with creating PDF and then MimeBodyPart attachment = new MimeBodyPart(); attachment.setFileName(whatever.pdf); attachment.setContent(attachmentData, application/pdf); mp.addBodyPart(attachment); See http://code.google.com/appengine/docs/java/mail/usingjavamail.html Stephen On Sun, May 15, 2011 at 9:34 AM, Vik vik@gmail.com wrote: Hie Stephon Still I am not sure on the part that ultimately how will i use this stream to attach the generated pdf as an attachment in the email. Please advise Thankx and Regards Vik Founder http://www.sakshum.org http://blog.sakshum.org On Sun, May 15, 2011 at 9:56 PM, Stephen Johnson onepagewo...@gmail.com wrote: You're writing the PDF as your web page output. Use a ByteArrayOutputStream instead. On Sun, May 15, 2011 at 7:16 AM, Vik vik@gmail.com wrote: Hie Just a little question. I am using this pdfJet thing. The requirement for us is to create a pdf and then mail it to a user. So i am done with pdf creation part and at then end i have the code like: OutputStream out = resp.getOutputStream(); PDF pdf = new PDF(out); some actual writing. pdf.flush(); out.close(); Now the question i have is after this step how do i actually get handle to the created pdf above and attach it to an email ? Thankx and Regards Vik Founder http://www.sakshum.org http://blog.sakshum.org On Tue, Apr 20, 2010 at 1:52 PM, Patou patou.de.saint.ste...@gmail.com wrote: Hello In App Engine, You can't write a file to the file system. Otherwise the save method can't be used in GAE. Use this code to send the pdf to the navigator : pdf.wrap(); String fileName = Example_03.pdf; resp.setContentType(application/pdf); resp.setHeader(Content-Disposition, attachment; filename=\ + fileName + \); ServletOutputStream outs = resp.getOutputStream(); pdf.getData().writeTo(outs); Or to save to the datastore : new Blob(pdf.getData().toByteArray()); Bests Regards Patrice On Apr 20, 4:18 am, jeno jeno...@gmail.com wrote: Hi François , Thanks for your help. I have used PDFjet (PDFJet.jar version 2.72) PDF class missing save method So i cant call pdf.save(d.pdf) method. Cheers jeno On Apr 19, 6:48 pm, François Masurel fm2...@mably.com wrote: Hi Jeno, You can try the PDFjet Open Source Edition : http://pdfjet.com/os/edition.html François On 19 avr, 01:55, jeno jeno...@gmail.com wrote: Hi Guys, Anyone know open source java pdf engine for GAE. Thanks Jeno -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group athttp:// groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group athttp:// groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are subscribed to the Google
[appengine-java] TaskOptions bug: params(name, value) called, request received with no parameters
Get queue, create task, add task to queue: Queue q = QueueFactory.getDefaultQueue(); TaskOptions opts = TaskOptions.Builder.withUrl(some_url); opts.param(some_name, some_value); q.add(opts); The task is executed but HttpServletRequest.getParameterMap().size() == 0 for this task. Originally occurred with 1.4.3. Tried updating 1.5.0 but it didn't help. I'm running on a macbook but my coworker on windows xp has no problem with this same piece of code. Any thoughts? Also, where can I post java issues? The link on the left appears to be for python issues. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
Re: [appengine-java] Re: App engine SDK jars in WEB-INF/lib. Why???
On Sun, May 15, 2011 at 7:58 AM, Philippe Marschall philippe.marsch...@gmail.com wrote: On May 13, 2:29 am, Nichole nichole.k...@gmail.com wrote: Just a quick summary, the servlet spec requires that a servlet container such as appengine provider an implementation for a service. Those jars such as servlet- api-2.4.jar are needed at compile time. That's why there's provided scope in Maven. They are sometimes provided by the servlet container/ engines at run time in a global directory that is found by the container/engine classloader. They have to always be provided by the container. E.g. the HttpServletRequest interface that the container classes implement and that you program against have to be the same class defined by the same classloader otherwise you get a LinkageError. appengine provides the servlet, jsp implementations for us at runtime. The appengine specific service implementations are also needed at runtime and compile time and are present in the appengine-api-1.0-sdk-ver.jar. They've chosen not to add the latest sdk to the container global classpath, so yes, the application must provide it. But that's silly. That means you deploy the local simulation implementations into production. No, appengine-api.jar is the definition of the App Engine API, with a convenient interface that wraps the running API implementation. In the case of the dev_appserver, the implementation is in appengine-local-runtime.jar (which you should not be uploading). In the case of production, the implementation is our production servers, running code you do not have access to. Cheers Philipe -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] unable to send a pdf as attachment in mail
Hie Trying to send a pdf created using pdfJet throws the exception class javax.mail.SendFailedException:Send failure (javax.mail.MessagingException: Converting attachment data failed) The code is like: MimeBodyPart htmlPart = new MimeBodyPart(); htmlPart.setFileName(whatever.pdf); htmlPart.setContent(out.toByteArray(), application/pdf); mp.addBodyPart(htmlPart); logged issue http://code.google.com/p/googleappengine/issues/list?cursor=1764updated=1764ts=1305519190 does not seems to help. Please advise. Thankx and Regards Vik Founder http://www.sakshum.org http://blog.sakshum.org -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] Re: how to transfer request to a different servlet ?
HI, From the description of your needs, it seems that the Java inheritance mechanism is all what you need. Yours servlets should all inherit from HomeServlet, in their doGet() method, they will just call super.doGet() at the beginning and then execute their own thing. regards didier On May 15, 2:00 pm, Prashant antsh...@gmail.com wrote: hi, i want to use a common servlet (say MainServlet) to handle all the requests and based on url requested i want to transfer request to a different servlet. for example: if requested url iswww.mydomain.com/*i want to send request to HomeServlet and if requested url is test.mydomain.com/* i want to send request to TestServlet. is it possible to transfer request from one servlet to another servlet ? will calling new HomeServlet().doGet() from MainServlet be same as MainServlet (or any other servlet configured in web.xml) invocation by GAE ? any GAE specific solution to this ? thanks in advance :) -- Prashant -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] Re: TaskOptions bug: params(name, value) called, request received with no parameters
Rewrote the code: QueueFactory.getDefaultQueue().add(TaskOptions.Builder.withUrl(some_url). param(some_name, some_value). method(TaskOptions.Method.GET)); Works fine now. Method needed to be set or it defaulted to POST and created problems. Disregard piece about it working on windows xp and not working on macbook. I can't actually verify the truthiness of that statement. On May 15, 8:23 pm, Nikita Kuznetsov skateadd...@gmail.com wrote: Get queue, create task, add task to queue: Queue q = QueueFactory.getDefaultQueue(); TaskOptions opts = TaskOptions.Builder.withUrl(some_url); opts.param(some_name, some_value); q.add(opts); The task is executed but HttpServletRequest.getParameterMap().size() == 0 for this task. Originally occurred with 1.4.3. Tried updating 1.5.0 but it didn't help. I'm running on a macbook but my coworker on windows xp has no problem with this same piece of code. Any thoughts? Also, where can I post java issues? The link on the left appears to be for python issues. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] Re: Problem with Channel API
Hi Matthew, In your logging.properties file, can you set the logging level to ALL and see if that gives you more information? I've found that in these cases, it's helpful to see exactly what's going on under the hood, before the stack trace is generated. If it's not clear to you what's going on after showing all the logs, then post them here. James On May 15, 1:10 am, Matthew Smalley matthew.smal...@gmail.com wrote: Oops forgot the stack trace: (this is from the google appengine log viewer): Uncaught exception from servlet com.google.appengine.api.channel.ChannelFailureException: An unexpected error occurred. at com.google.appengine.api.channel.ChannelServiceImpl.getExceptionForError(ChannelServiceImpl.java:112) at com.google.appengine.api.channel.ChannelServiceImpl.sendMessage(ChannelServiceImpl.java:68) at com.webstersmalley.chessweb.web.ChannelTestController.sendMessage(ChannelTestController.java:74) at com.webstersmalley.chessweb.web.ChannelTestController.getChannelTestMessage(ChannelTestController.java:68) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:43) at org.springframework.web.bind.annotation.support.HandlerMethodInvoker.invokeHandlerMethod(HandlerMethodInvoker.java:176) at org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.invokeHandlerMethod(AnnotationMethodHandlerAdapter.java:426) at org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.handle(AnnotationMethodHandlerAdapter.java:414) at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:790) at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:719) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:644) at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:560) at javax.servlet.http.HttpServlet.service(HttpServlet.java:637) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1166) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:388) at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216) at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182) at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765) at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:418) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152) at org.mortbay.jetty.Server.handle(Server.java:326) at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542) at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:923) at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404) at com.google.net.rpc.impl.RpcUtil.runRpcInApplication(RpcUtil.java:439) at com.google.net.rpc.impl.Server$RpcTask.runInContext(Server.java:573) at com.google.tracing.TraceContext$TraceContextRunnable$1.run(TraceContext.java:448) at com.google.tracing.TraceContext.runInContext(TraceContext.java:688) at com.google.tracing.TraceContext$AbstractTraceContextCallback.runInInheritedContextNoUnref(TraceContext.java:326) at com.google.tracing.TraceContext$AbstractTraceContextCallback.runInInheritedContext(TraceContext.java:318) at com.google.tracing.TraceContext$TraceContextRunnable.run(TraceContext.java:446) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) at java.lang.Thread.run(Thread.java:636) Caused by: com.google.apphosting.api.ApiProxy$ApplicationException: ApplicationError: 2: Unknown at com.google.net.rpc.RpcStub$RpcCallbackDispatcher$1.runInContext(RpcStub.java:1050) at com.google.tracing.TraceContext$TraceContextRunnable$1.run(TraceContext.java:448) at