Re: Embedding wicket in jsp error
:1836) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1713) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1299) at java.io.ObjectInputStream.readObject(ObjectInputStream.java:339) at org.apache.wicket.util.lang.Objects.byteArrayToObject(Objects.java:396) ... 38 more Hopefully someone has an easy answer to this one, but for some reason, I hear those IFRAMEs calling out to me. Thanks. Joel -- View this message in context: http://www.nabble.com/Embedding-wicket-in-jsp-error-tf4488872.html#a12827068 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Embedding wicket in jsp error
On 9/21/07, hillj2 [EMAIL PROTECTED] wrote: Also are there any other issues with using HttpSessionStore besides losing back button support? Since I'm already forced to use ONE_PASS_RENDER (for now), I've already lost that support (haven't I?). ONE_PASS_RENDER does not kill back button support, but does provoke that blasted repost on back button for form submissions. So it prevents the double submit problem. The HttpSessionStore is the default store for wicket 1.2 and prior. It only limits the number of pages that are stored per session for backbutton support. So you will be able to press back, but not unlimited as with the disk based store. As for the serialization errors, somehow either you don't read the log too well, or you have a misconfigured Wicket. To fix them, you should return to the Disk store: it will report exactly what is wrong. Do you run the application in development mode on your local box? If so, you should see things like the following in your log: ERROR - Objects - Error serializing object class wicket.in.action.HomePage Field hierarchy is: 0 [class=wicket.in.action.HomePage, path=0] children [class=[Lorg.apache.wicket.Component;] children[0] [class=org.apache.wicket.markup.html.basic.Label, path=0:name] model [class=org.apache.wicket.model.PropertyModel] target [class=wicket.in.action.User] - field that is not serializable at org.apache.wicket.util.io.SerializableChecker.check() at org.apache.wicket.util.io.SerializableChecker.checkFields() Martijn -- Buy Wicket in Action: http://manning.com/dashorst Apache Wicket 1.3.0-beta3 is released Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.0-beta3/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Embedding wicket in jsp error
My mistake. I noticed there was a typo in my newSessionStore() declaration which caused it not to be called (obviously). One of the better additions to the JDK in my opinion were the @Override tags. If you use those (and e.g. use your IDE's autocomplete function) you would have avoided this in the first place. Also are there any other issues with using HttpSessionStore besides losing back button support? Since I'm already forced to use ONE_PASS_RENDER (for now), I've already lost that support (haven't I?). You're not loosing back button support, it is just limited to the last few entries (which is configurable) whereas the SLCSS is in principle unlimited. Eelco - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Embedding wicket in jsp error
Martijn Dashorst wrote: ONE_PASS_RENDER does not kill back button support, but does provoke that blasted repost on back button for form submissions. So it prevents the double submit problem. Right, of course. I knew that. :) Martijn Dashorst wrote: The HttpSessionStore is the default store for wicket 1.2 and prior. It only limits the number of pages that are stored per session for backbutton support. So you will be able to press back, but not unlimited as with the disk based store. Well that doesn't bother me. The users really shouldn't need to press the back button at all, so only having a limited number of previous pages shouldn't be a problem. Martijn Dashorst wrote: As for the serialization errors, somehow either you don't read the log too well, or you have a misconfigured Wicket. To fix them, you should return to the Disk store: it will report exactly what is wrong. Do you run the application in development mode on your local box? If so, you should see things like the following in your log: ERROR - Objects - Error serializing object class wicket.in.action.HomePage Field hierarchy is: 0 [class=wicket.in.action.HomePage, path=0] children [class=[Lorg.apache.wicket.Component;] children[0] [class=org.apache.wicket.markup.html.basic.Label, path=0:name] model [class=org.apache.wicket.model.PropertyModel] target [class=wicket.in.action.User] - field that is not serializable at org.apache.wicket.util.io.SerializableChecker.check() at org.apache.wicket.util.io.SerializableChecker.checkFields() Well I thought what I put in the original post was all that I could see in the logs regarding this issue. I'll try again and see if I notice more, or fiddle with some of the config, if I can figure out what to change. I probably won't get to this until Mon though. I'll let you know what I discover. Thanks, Joel -- View this message in context: http://www.nabble.com/Embedding-wicket-in-jsp-error-tf4488872.html#a12829549 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Embedding wicket in jsp error
I know this has been discussed before, but none of the previous posts have helped me solve my problem. I'm trying to embed a wicket page into a jsp page (until I have time go back and convert all our jsp's to wicket) using the jsp:include tag. oc4j throws a ServletException: Error in Servlet, with no further information specifying the problem, nor any indication from wicket that it's having a problem. To isolate the problem I tried to recreate it in a very small app, so I could rule out any issue with other app code/configurations. This time, I get a more informative (but not necessarily more helpful) error message: java.lang.IllegalStateException: Response has already been committed, be sure not to write to the OutputStream or to trigger a commit due to any other action before calling this method. I'm hoping it's the same error in both cases, and the former case just has a more generic error message for some reason; but I was hoping someone might have a clue why I can't get the embedding to work. I'm using oc4j 10.1.3.3, and wicket beta2. I tried it on Tomcat also. It didn't throw an error, but the place where the wicket content should be was just empty. I'd prefer not to have to do this with embedded IFRAME's as I've seen suggested. That's the setup I have now, but when a page loads there's a delay loading the IFRAME content, which doesn't look very nice, especially since the embedded content is my app's navigation menu. Any thoughts, suggestions, alternate solutions to the embedding issue? Here's the code from my small test app: embed.jsp html head titleEmbed test/title /head body jsp:include page=/wicket/ flush=true /jsp:include pHere is my JSP content/p /body /html EmbedServlet.java == public class EmbedServlet extends HttpServlet { public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { doPost(request, response); } public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { RequestDispatcher rd = request.getRequestDispatcher(/WEB-INF/jsp/embed.jsp); rd.forward(request, response); } } EmbedApplication.java = public class EmbedApplication extends WebApplication { public EmbedApplication() { super(); } public Class getHomePage() { return EmbedPage.class; } protected void init() { System.out.println(* Wicket App initialized *); } } EmbedPage.java public class EmbedPage extends WebPage { public EmbedPage() { super(); } } EmbedPage.html html head titleEmbeded Wicket/title /head body pHere is my wicket content./p /body /html web.xml == ?xml version=1.0 encoding=ISO-8859-1? !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.2//EN http://java.sun.com/j2ee/dtds/web-app_2.2.dtd; web-app xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd; version=2.5 xmlns=http://java.sun.com/xml/ns/javaee; servlet servlet-nameEmbedServlet/servlet-name servlet-classEmbedServlet/servlet-class /servlet servlet-mapping servlet-nameEmbedServlet/servlet-name url-pattern/main/url-pattern /servlet-mapping servlet servlet-nameEmbedApplication/servlet-name servlet-classorg.apache.wicket.protocol.http.WicketServlet/servlet-class init-param param-nameapplicationClassName/param-name param-valueEmbedApplication/param-value /init-param /servlet servlet-mapping servlet-nameEmbedApplication/servlet-name url-pattern/wicket/*/url-pattern /servlet-mapping session-config session-timeout35/session-timeout /session-config mime-mapping extensionhtml/extension mime-typetext/html/mime-type /mime-mapping mime-mapping extensiontxt/extension mime-typetext/plain/mime-type /mime-mapping /web-app Thanks, Joel -- View this message in context: http://www.nabble.com/Embedding-wicket-in-jsp-error-tf4488872.html#a12801646 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Embedding wicket in jsp error
I don't have any experience with oc4j nor embedding wicket in JSPs, but I know two things that can cause trouble: - make sure you use ONE_PASS_RENDER as a render strategy - don't use oc4j, or at least look at the threads on this list, as there have been more problems with oc4j and Wicket. Martijn On 9/20/07, hillj2 [EMAIL PROTECTED] wrote: I know this has been discussed before, but none of the previous posts have helped me solve my problem. I'm trying to embed a wicket page into a jsp page (until I have time go back and convert all our jsp's to wicket) using the jsp:include tag. oc4j throws a ServletException: Error in Servlet, with no further information specifying the problem, nor any indication from wicket that it's having a problem. To isolate the problem I tried to recreate it in a very small app, so I could rule out any issue with other app code/configurations. This time, I get a more informative (but not necessarily more helpful) error message: java.lang.IllegalStateException: Response has already been committed, be sure not to write to the OutputStream or to trigger a commit due to any other action before calling this method. I'm hoping it's the same error in both cases, and the former case just has a more generic error message for some reason; but I was hoping someone might have a clue why I can't get the embedding to work. I'm using oc4j 10.1.3.3, and wicket beta2. I tried it on Tomcat also. It didn't throw an error, but the place where the wicket content should be was just empty. I'd prefer not to have to do this with embedded IFRAME's as I've seen suggested. That's the setup I have now, but when a page loads there's a delay loading the IFRAME content, which doesn't look very nice, especially since the embedded content is my app's navigation menu. Any thoughts, suggestions, alternate solutions to the embedding issue? Here's the code from my small test app: embed.jsp html head titleEmbed test/title /head body jsp:include page=/wicket/ flush=true /jsp:include pHere is my JSP content/p /body /html EmbedServlet.java == public class EmbedServlet extends HttpServlet { public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { doPost(request, response); } public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { RequestDispatcher rd = request.getRequestDispatcher(/WEB-INF/jsp/embed.jsp); rd.forward(request, response); } } EmbedApplication.java = public class EmbedApplication extends WebApplication { public EmbedApplication() { super(); } public Class getHomePage() { return EmbedPage.class; } protected void init() { System.out.println(* Wicket App initialized *); } } EmbedPage.java public class EmbedPage extends WebPage { public EmbedPage() { super(); } } EmbedPage.html html head titleEmbeded Wicket/title /head body pHere is my wicket content./p /body /html web.xml == ?xml version=1.0 encoding=ISO-8859-1? !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.2//EN http://java.sun.com/j2ee/dtds/web-app_2.2.dtd; web-app xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd; version=2.5 xmlns=http://java.sun.com/xml/ns/javaee; servlet servlet-nameEmbedServlet/servlet-name servlet-classEmbedServlet/servlet-class /servlet servlet-mapping servlet-nameEmbedServlet/servlet-name url-pattern/main/url-pattern /servlet-mapping servlet servlet-nameEmbedApplication/servlet-name servlet-classorg.apache.wicket.protocol.http.WicketServlet/servlet-class init-param param-nameapplicationClassName/param-name param-valueEmbedApplication/param-value /init-param /servlet servlet-mapping servlet-nameEmbedApplication/servlet-name url-pattern/wicket/*/url-pattern /servlet-mapping session-config session-timeout35/session-timeout /session-config mime-mapping extensionhtml/extension mime-typetext/html/mime-type /mime-mapping mime-mapping extensiontxt/extension mime-typetext/plain/mime-type /mime-mapping /web-app Thanks, Joel -- View this message in context: http://www.nabble.com/Embedding-wicket-in-jsp-error-tf4488872.html#a12801646 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Buy Wicket in Action: http://manning.com/dashorst Apache Wicket 1.3.0-beta3 is released Get it now: http://www.apache.org
Re: Embedding wicket in jsp error
hillj2 wrote: I know this has been discussed before, but none of the previous posts have helped me solve my problem. I'm trying to embed a wicket page into a jsp page (until I have time go back and convert all our jsp's to wicket) using the jsp:include tag. At the very least, you'll need to do what Martijn suggests and set a one-pass render strategy. I'd recommend you go and read my blog post about this whole topic: http://herebebeasties.com/2007-03-01/jsp-and-wicket-sitting-in-a-tree/ It comes at things from slightly the other end of the spectrum (embedding JSPs in a Wicket page) but the issues are very similar and you should find it interesting reading. You'll probably discover that you want to migrate your template stuff to Wicket anyway at some point, in which case this is the approach you'll need to adopt anyway. Good luck. Best Regards, Al - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Embedding wicket in jsp error
Martijn Dashorst wrote: I don't have any experience with oc4j nor embedding wicket in JSPs, but I know two things that can cause trouble: - make sure you use ONE_PASS_RENDER as a render strategy I actualy did have this set up in our main app. I just didn't put it in my small test app. I changed the render strategy on the test app and got the same error. Martijn Dashorst wrote: - don't use oc4j, or at least look at the threads on this list, as there have been more problems with oc4j and Wicket. I know, several of those posts are probably mine. :) Frankly I've been about ready to chuck oc4j myself, but it's not my call. Although it may come to it if we finally reach a problem that has no workaround. However, when I ran the app in Tomcat it also didn't work, so it doesn't look to be an oc4j specific problem this time (I'm as shocked as you are). -- View this message in context: http://www.nabble.com/Embedding-wicket-in-jsp-error-tf4488872.html#a12803370 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Embedding wicket in jsp error
Al Maw wrote: At the very least, you'll need to do what Martijn suggests and set a one-pass render strategy. Done, with no success. Al Maw wrote: I'd recommend you go and read my blog post about this whole topic: http://herebebeasties.com/2007-03-01/jsp-and-wicket-sitting-in-a-tree/ It comes at things from slightly the other end of the spectrum (embedding JSPs in a Wicket page) but the issues are very similar and you should find it interesting reading. You'll probably discover that you want to migrate your template stuff to Wicket anyway at some point, in which case this is the approach you'll need to adopt anyway. I have seen your blog before. I was even skimming over it again today earlier. I'll have to sit down and read it thoroughly to see what it will entail to implement, and how long it will take. I'd love to migrate everything to wicket right now, but it's an very large app and we barely have time to implement the new component we're working on now (which IS all wicket). Thanks for the help. And thanks to Martijn as well. Joel -- View this message in context: http://www.nabble.com/Embedding-wicket-in-jsp-error-tf4488872.html#a12803501 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]