SUCCESS! I needed sjsxp.jar in the client's classpath, glad I gave that warning attention. Right now I'm manually copying Bird.java (serializable pojo model) to both classpath of QueryServlet's and Client. Any advice on how to automate this in Eclipse? I'm starting to think I should really learn Ant :D
- thirdy On Sun, Aug 23, 2009 at 10:58 AM, Vicente de Rivera III < [email protected]> wrote: > Ok sorry it's setSerializerClass(BinarySerializer.class); > Curious, there something wrong with Netbeans when extending QueryServlet > > > On Sun, Aug 23, 2009 at 10:42 AM, Vicente de Rivera III < > [email protected]> wrote: > >> hi this is my Servlet, >> >> public class TweetServlet extends QueryServlet { >> @Override >> protected Object doGet() throws ServletException { >> setSerializerClass(new BinarySerializer()); >> return new Bird(); >> } >> } >> >> I got this compiler error from Eclipse: >> >> The method setSerializerClass(Class<? extends Serializer<?>>) in the type >> QueryServlet is not applicable for the arguments >> (BinarySerializer) >> >> >> >> On Sun, Aug 23, 2009 at 10:07 AM, Greg Brown <[email protected]> wrote: >> >>> You need to make sure you are using a serializer that supports your type. >>> The default is JSONSerializer. If "Bird" implements Serializable, you can >>> use BinarySerializer. >>> >>> >>> On Aug 22, 2009, at 9:10 PM, Vicente de Rivera III wrote: >>> >>> Hi, how I send user-defined types using Pivot Web Queries? >>>> Looking @ the javadocs now (w/c brings another ?, any better way to >>>> view a JavaDoc than just plain Firefox?) >>>> >>>> /* SERVLET */ >>>> @SuppressWarnings("serial") >>>> public class TweetServlet extends QueryServlet { >>>> >>>> @Override >>>> protected Object doGet() throws ServletException { >>>> return new Bird("terdi","stereophonics"); >>>> } >>>> >>>> } >>>> >>>> /* CLIENT APPLET */ >>>> public void taskExecuted(Task<Object> task) { >>>> if (task == getQuery) { >>>> s = ((Bird) task.getResult()).getUsername(); >>>> System.out.println("SUCCESS"); >>>> label.setText(s); >>>> getQuery = null; >>>> } >>>> } >>>> >>>> btw, any better to log "SUCCESS" ? right now I'm relying on the Java >>>> Console >>>> Thanks!! >>>> -- >>>> thirdy >>>> >>> >>> >> >> >
