You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@wicket.apache.org by jlazeraski <su...@yahoo.com> on 2011/09/02 00:55:01 UTC

Having problems with wicket pages not showing up

Hi all,

I am new to Wicket. I have Wicket in Action, read that and a bit on the web,
but my first go of Wicket 1.4 is not doing so well. I have the wicket jar
files, logging files, etc in the lib, and I see the log of my GlassFish v3
server showing Wicket in Development mode. I set up the web.xml to use the
path of /html/* to point to the Wicket filter. In my code I have a
HellowWorld at com.company.wicket.HelloWorld. I also had the
HellowWorld.html file there. When I deploy that and point my browser to
localhost/war_name/html   it shows the HellowWorld just fine. 

I am not a fan of having html in my src paths, so I figured out how to move
the html files to another pat using:

IResourceSettings resourceSettings = getResourceSettings();
resourceSettings.addResourceFolder("");

in my WebApplication class init method. That worked upon redeployment with
the HellowWorld.html moved to a new path under my root web path, which
mimicked the package name.

The problem is, no other page works. If I put a 2nd WebPage extending class
called TestPage with a TestPage.html in my same location as the other html,
using the localhost/war_name/html/TestPage doesn't work. I've also tried
localhost/war_name/html/com.company.wicket.TestPage and that didn't work. 

I am not seeing any log errors either, so I am unsure at this time how to
make the other pages show up. I can't seem to find anything in the Wicket in
Action book either that would solve this.

Appreciate a little help figuring out this issue. Thanks.


--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Having-problems-with-wicket-pages-not-showing-up-tp3784941p3784941.html
Sent from the Forum for Wicket Core developers mailing list archive at Nabble.com.

Re: Having problems with wicket pages not showing up

Posted by jcgarciam <jc...@gmail.com>.
>From my personal opinion, wicket is not meant to create "WebSite" where most
of the page are just static and few of them dynamic. Wicket is mean to build
Web Application with complex GUI that resemble how Desktop application works
(think about it as Swing applications, but without the hassle of Swing
component model), navigation is accomplish from within internal component
comunication.

Regarding the memory and session, from my experience wicket does a great job
regarding memory related. It only store the current page structure in memory
and rest (versions) are stored on Disk.

The most daunting part of wicket is the concept behinds model and thats
something you really  need to pay attention because that will depends how
well your application do.

Wicket biggest point is the OOP abstraction to tackle problem thru
composition and inherintance just as we were used to do when doing Desktop
Application.

On Thu, Sep 1, 2011 at 10:34 PM, jlazeraski [via Apache Wicket] <
ml-node+3785097-123039037-65838@n4.nabble.com> wrote:

> Hmm.. I am still evaluating if Wicket is worth the trouble. I've been
> reading about how Wicket stores the object model in the session, making each
> user session potentially quite large, which doesn't bode well at all for
> session replication performance. I have read about detachable models, which
> I assume means instead of each user session storing object data, for example
> form input values, label strings, etc, you can pull the data from a database
> when a request is made.
>
> It seems odd that it's so difficult to access a page that is either all or
> mostly html, with some links to navigate to other pages. I suppose I don't
> know enough about how to configure wicket. I have a login button that
> ideally will use wicket to log in, and several "logged in" user pages with
> data, tables, form input, etc. But the majority of the outside (not logged
> in) site is static content with the occasional link to another static page
> or sometimes a page with some form data. I haven't found any info that
> explain when to use Wicket and when not to in a typical web application
> where many pages are static content with links, and then there are those
> dynamic pages for logged in users or a shopping cart or form registration.
> As of now we're using Struts2/jsp pages with page includes to reuse the
> header/footer area. I wanted to use just Wicket for the whole site, but with
> what at least seems to be complex just to view a page, and the session
> memory usage, I am a bit scared now. The learning curve seems a bit steep, I
> have been using MVC for so many years.. when I read about Wicket and picked
> up the book it just seemed like a more separated OO way to approach a web
> app.
>
>
>
> ------------------------------
>  If you reply to this email, your message will be added to the discussion
> below:
>
> http://apache-wicket.1842946.n4.nabble.com/Having-problems-with-wicket-pages-not-showing-up-tp3784941p3785097.html
>  To start a new topic under Apache Wicket, email
> ml-node+1842946-398011874-65838@n4.nabble.com
> To unsubscribe from Apache Wicket, click here<http://apache-wicket.1842946.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=1842946&code=amNnYXJjaWFtQGdtYWlsLmNvbXwxODQyOTQ2fDEyNTYxMzc3ODY=>.
>
>



-- 

JC


--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Having-problems-with-wicket-pages-not-showing-up-tp3784941p3785143.html
Sent from the Forum for Wicket Core developers mailing list archive at Nabble.com.

Re: Having problems with wicket pages not showing up

Posted by Juergen Donnerstag <ju...@gmail.com>.
May I kindly ask you to raise such questions on the user list instead
of the dev list. There are many more people listening, able to answer
such questions. Thanks a lot.

-Juergen

On Fri, Sep 2, 2011 at 8:01 AM, Martin Grigorov <mg...@apache.org> wrote:
> Yes, it is possible.
> wicket-examples.war from Wicket distro works this way
>
> On Fri, Sep 2, 2011 at 7:20 AM, jlazeraski
> <su...@yahoo.com> wrote:
>> Makes sense..
>>
>> Is it possible to configure in the web.xml more than one wicket filter and
>> conversely have more than one WebApplication class in my deployed web app? I
>> was thinking for registration pages to point to a "reg" wicket app, and once
>> a user is logged in, a different app for some pages.
>>
>> The thing is, I am trying to intermix an existing badly written Struts/JSP
>> pages, worse written JSP pages that point to each other and use ajax/rest
>> calls to populate data.. and now trying to "fix" some of the bad pages by
>> building wicket pages from them. Eventually the goal is to be pure wicket.
>> But in the mean time, I gotta work around the existing pages. In many cases
>> I am going to need to call the wicket pages from the existing pages. For
>> example, if a user wants to register, I have to pop up a modal dialog box
>> and hopefully use the new wicket registration pages I am working on in the
>> modal dialog, then when it is done, close back to the existing pages. My
>> thought was, the reg pages would be their own wicket app, and when I get to
>> the logged in pages that I'll start to fix/add, make that a separate app so
>> that the entry point into the wicket is another WebApplication and home
>> page/class. So is it possible.. allowed, or bad to do?
>>
>> Thanks.
>>
>>
>> --
>> View this message in context: http://apache-wicket.1842946.n4.nabble.com/Having-problems-with-wicket-pages-not-showing-up-tp3784941p3785309.html
>> Sent from the Forum for Wicket Core developers mailing list archive at Nabble.com.
>>
>
>
>
> --
> Martin Grigorov
> jWeekend
> Training, Consulting, Development
> http://jWeekend.com
>

Re: Having problems with wicket pages not showing up

Posted by Martin Grigorov <mg...@apache.org>.
Yes, it is possible.
wicket-examples.war from Wicket distro works this way

On Fri, Sep 2, 2011 at 7:20 AM, jlazeraski
<su...@yahoo.com> wrote:
> Makes sense..
>
> Is it possible to configure in the web.xml more than one wicket filter and
> conversely have more than one WebApplication class in my deployed web app? I
> was thinking for registration pages to point to a "reg" wicket app, and once
> a user is logged in, a different app for some pages.
>
> The thing is, I am trying to intermix an existing badly written Struts/JSP
> pages, worse written JSP pages that point to each other and use ajax/rest
> calls to populate data.. and now trying to "fix" some of the bad pages by
> building wicket pages from them. Eventually the goal is to be pure wicket.
> But in the mean time, I gotta work around the existing pages. In many cases
> I am going to need to call the wicket pages from the existing pages. For
> example, if a user wants to register, I have to pop up a modal dialog box
> and hopefully use the new wicket registration pages I am working on in the
> modal dialog, then when it is done, close back to the existing pages. My
> thought was, the reg pages would be their own wicket app, and when I get to
> the logged in pages that I'll start to fix/add, make that a separate app so
> that the entry point into the wicket is another WebApplication and home
> page/class. So is it possible.. allowed, or bad to do?
>
> Thanks.
>
>
> --
> View this message in context: http://apache-wicket.1842946.n4.nabble.com/Having-problems-with-wicket-pages-not-showing-up-tp3784941p3785309.html
> Sent from the Forum for Wicket Core developers mailing list archive at Nabble.com.
>



-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

Re: Having problems with wicket pages not showing up

Posted by jlazeraski <su...@yahoo.com>.
Makes sense.. 

Is it possible to configure in the web.xml more than one wicket filter and
conversely have more than one WebApplication class in my deployed web app? I
was thinking for registration pages to point to a "reg" wicket app, and once
a user is logged in, a different app for some pages.

The thing is, I am trying to intermix an existing badly written Struts/JSP
pages, worse written JSP pages that point to each other and use ajax/rest
calls to populate data.. and now trying to "fix" some of the bad pages by
building wicket pages from them. Eventually the goal is to be pure wicket.
But in the mean time, I gotta work around the existing pages. In many cases
I am going to need to call the wicket pages from the existing pages. For
example, if a user wants to register, I have to pop up a modal dialog box
and hopefully use the new wicket registration pages I am working on in the
modal dialog, then when it is done, close back to the existing pages. My
thought was, the reg pages would be their own wicket app, and when I get to
the logged in pages that I'll start to fix/add, make that a separate app so
that the entry point into the wicket is another WebApplication and home
page/class. So is it possible.. allowed, or bad to do?

Thanks.


--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Having-problems-with-wicket-pages-not-showing-up-tp3784941p3785309.html
Sent from the Forum for Wicket Core developers mailing list archive at Nabble.com.

Re: Having problems with wicket pages not showing up

Posted by Igor Vaynberg <ig...@gmail.com>.
if your site is mostly static you should look into Brix - a cms based
on wicket. that way you can manage the static content easily and mix
it with dynamic content as well.

https://github.com/brix-cms/brix-cms

-igor


On Thu, Sep 1, 2011 at 6:34 PM, jlazeraski
<su...@yahoo.com> wrote:
> Hmm.. I am still evaluating if Wicket is worth the trouble. I've been reading
> about how Wicket stores the object model in the session, making each user
> session potentially quite large, which doesn't bode well at all for session
> replication performance. I have read about detachable models, which I assume
> means instead of each user session storing object data, for example form
> input values, label strings, etc, you can pull the data from a database when
> a request is made.
>
> It seems odd that it's so difficult to access a page that is either all or
> mostly html, with some links to navigate to other pages. I suppose I don't
> know enough about how to configure wicket. I have a login button that
> ideally will use wicket to log in, and several "logged in" user pages with
> data, tables, form input, etc. But the majority of the outside (not logged
> in) site is static content with the occasional link to another static page
> or sometimes a page with some form data. I haven't found any info that
> explain when to use Wicket and when not to in a typical web application
> where many pages are static content with links, and then there are those
> dynamic pages for logged in users or a shopping cart or form registration.
> As of now we're using Struts2/jsp pages with page includes to reuse the
> header/footer area. I wanted to use just Wicket for the whole site, but with
> what at least seems to be complex just to view a page, and the session
> memory usage, I am a bit scared now. The learning curve seems a bit steep, I
> have been using MVC for so many years.. when I read about Wicket and picked
> up the book it just seemed like a more separated OO way to approach a web
> app.
>
>
>
> --
> View this message in context: http://apache-wicket.1842946.n4.nabble.com/Having-problems-with-wicket-pages-not-showing-up-tp3784941p3785097.html
> Sent from the Forum for Wicket Core developers mailing list archive at Nabble.com.
>

Re: Having problems with wicket pages not showing up

Posted by jlazeraski <su...@yahoo.com>.
Hmm.. I am still evaluating if Wicket is worth the trouble. I've been reading
about how Wicket stores the object model in the session, making each user
session potentially quite large, which doesn't bode well at all for session
replication performance. I have read about detachable models, which I assume
means instead of each user session storing object data, for example form
input values, label strings, etc, you can pull the data from a database when
a request is made.

It seems odd that it's so difficult to access a page that is either all or
mostly html, with some links to navigate to other pages. I suppose I don't
know enough about how to configure wicket. I have a login button that
ideally will use wicket to log in, and several "logged in" user pages with
data, tables, form input, etc. But the majority of the outside (not logged
in) site is static content with the occasional link to another static page
or sometimes a page with some form data. I haven't found any info that
explain when to use Wicket and when not to in a typical web application
where many pages are static content with links, and then there are those
dynamic pages for logged in users or a shopping cart or form registration.
As of now we're using Struts2/jsp pages with page includes to reuse the
header/footer area. I wanted to use just Wicket for the whole site, but with
what at least seems to be complex just to view a page, and the session
memory usage, I am a bit scared now. The learning curve seems a bit steep, I
have been using MVC for so many years.. when I read about Wicket and picked
up the book it just seemed like a more separated OO way to approach a web
app.



--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Having-problems-with-wicket-pages-not-showing-up-tp3784941p3785097.html
Sent from the Forum for Wicket Core developers mailing list archive at Nabble.com.

Re: Having problems with wicket pages not showing up

Posted by Igor Vaynberg <ig...@gmail.com>.
thats 1.5 btw, in 1.4 you can do
/context/filter/?wicket:bookmarkablePage=:<class>

-igor

On Thu, Sep 1, 2011 at 5:56 PM, Igor Vaynberg <ig...@gmail.com> wrote:
> if your pages are bookmarkable, but you dont mount them you can access
> them via a url like this
>
> /context/filter/wicket/bookmarkable/<classname>
>
> -igor
>
> On Thu, Sep 1, 2011 at 4:46 PM, jlazeraski
> <su...@yahoo.com> wrote:
>> Thank you for the reply. Indeed there is info on mounting, but being new I
>> would not have known that other than the main page, every page must be
>> mounted to access it. In examples, there is no info on "mount the URL so you
>> can test this page". So unlike when buliding with jsf, jsp, or even normal
>> html where I can simply access the page, in Wicket, without mounting, the
>> only page I can access is the home page returned by the Application class?
>> So I take it the home page must provide links that when clicked and handled
>> in the Wicket class that represents the page, it then forwards to other
>> pages within wicket? In other words, there is typically only one entry into
>> a wicket app, unless you make a bookmarkable page (and/or mount it)?. That
>> info isn't made clear up front that you don't navigate wicket pages like you
>> do pretty much every other framework.
>>
>> So in my case, my site has several static pages that the user clicks around
>> from the home page.. basically reading info on why they should use our
>> service.. etc.. and then a login button and a register button. Those lead
>> into dynamic form pages. So if I want to build the static pages yet utilize
>> a shared header/footer bit, is it typical to do these in wicket still to
>> share a common header/footer, much like jsp includes? If so, then how do I
>> "test" these pages.. do I have to always refresh the main home page then
>> navigate to the page I am working on? For that matter, I would assume static
>> pages like this that don't require a user to be logged in (or any session
>> state), but do want to share a common header/footer, should be mounted
>> and/or bookmarkable so that they can be accessed directly?
>>
>> Thanks.
>>
>>
>> --
>> View this message in context: http://apache-wicket.1842946.n4.nabble.com/Having-problems-with-wicket-pages-not-showing-up-tp3784941p3784999.html
>> Sent from the Forum for Wicket Core developers mailing list archive at Nabble.com.
>>
>

Re: Having problems with wicket pages not showing up

Posted by Igor Vaynberg <ig...@gmail.com>.
if your pages are bookmarkable, but you dont mount them you can access
them via a url like this

/context/filter/wicket/bookmarkable/<classname>

-igor

On Thu, Sep 1, 2011 at 4:46 PM, jlazeraski
<su...@yahoo.com> wrote:
> Thank you for the reply. Indeed there is info on mounting, but being new I
> would not have known that other than the main page, every page must be
> mounted to access it. In examples, there is no info on "mount the URL so you
> can test this page". So unlike when buliding with jsf, jsp, or even normal
> html where I can simply access the page, in Wicket, without mounting, the
> only page I can access is the home page returned by the Application class?
> So I take it the home page must provide links that when clicked and handled
> in the Wicket class that represents the page, it then forwards to other
> pages within wicket? In other words, there is typically only one entry into
> a wicket app, unless you make a bookmarkable page (and/or mount it)?. That
> info isn't made clear up front that you don't navigate wicket pages like you
> do pretty much every other framework.
>
> So in my case, my site has several static pages that the user clicks around
> from the home page.. basically reading info on why they should use our
> service.. etc.. and then a login button and a register button. Those lead
> into dynamic form pages. So if I want to build the static pages yet utilize
> a shared header/footer bit, is it typical to do these in wicket still to
> share a common header/footer, much like jsp includes? If so, then how do I
> "test" these pages.. do I have to always refresh the main home page then
> navigate to the page I am working on? For that matter, I would assume static
> pages like this that don't require a user to be logged in (or any session
> state), but do want to share a common header/footer, should be mounted
> and/or bookmarkable so that they can be accessed directly?
>
> Thanks.
>
>
> --
> View this message in context: http://apache-wicket.1842946.n4.nabble.com/Having-problems-with-wicket-pages-not-showing-up-tp3784941p3784999.html
> Sent from the Forum for Wicket Core developers mailing list archive at Nabble.com.
>

Re: Having problems with wicket pages not showing up

Posted by jlazeraski <su...@yahoo.com>.
Thank you for the reply. Indeed there is info on mounting, but being new I
would not have known that other than the main page, every page must be
mounted to access it. In examples, there is no info on "mount the URL so you
can test this page". So unlike when buliding with jsf, jsp, or even normal
html where I can simply access the page, in Wicket, without mounting, the
only page I can access is the home page returned by the Application class?
So I take it the home page must provide links that when clicked and handled
in the Wicket class that represents the page, it then forwards to other
pages within wicket? In other words, there is typically only one entry into
a wicket app, unless you make a bookmarkable page (and/or mount it)?. That
info isn't made clear up front that you don't navigate wicket pages like you
do pretty much every other framework.

So in my case, my site has several static pages that the user clicks around
from the home page.. basically reading info on why they should use our
service.. etc.. and then a login button and a register button. Those lead
into dynamic form pages. So if I want to build the static pages yet utilize
a shared header/footer bit, is it typical to do these in wicket still to
share a common header/footer, much like jsp includes? If so, then how do I
"test" these pages.. do I have to always refresh the main home page then
navigate to the page I am working on? For that matter, I would assume static
pages like this that don't require a user to be logged in (or any session
state), but do want to share a common header/footer, should be mounted
and/or bookmarkable so that they can be accessed directly?

Thanks.


--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Having-problems-with-wicket-pages-not-showing-up-tp3784941p3784999.html
Sent from the Forum for Wicket Core developers mailing list archive at Nabble.com.

Re: Having problems with wicket pages not showing up

Posted by Igor Vaynberg <ig...@gmail.com>.
if you want your pages accessible via a url you need to mount them. im
sure wicket in action has a chapter on that.

-igor


On Thu, Sep 1, 2011 at 3:55 PM, jlazeraski
<su...@yahoo.com> wrote:
> Hi all,
>
> I am new to Wicket. I have Wicket in Action, read that and a bit on the web,
> but my first go of Wicket 1.4 is not doing so well. I have the wicket jar
> files, logging files, etc in the lib, and I see the log of my GlassFish v3
> server showing Wicket in Development mode. I set up the web.xml to use the
> path of /html/* to point to the Wicket filter. In my code I have a
> HellowWorld at com.company.wicket.HelloWorld. I also had the
> HellowWorld.html file there. When I deploy that and point my browser to
> localhost/war_name/html   it shows the HellowWorld just fine.
>
> I am not a fan of having html in my src paths, so I figured out how to move
> the html files to another pat using:
>
> IResourceSettings resourceSettings = getResourceSettings();
> resourceSettings.addResourceFolder("");
>
> in my WebApplication class init method. That worked upon redeployment with
> the HellowWorld.html moved to a new path under my root web path, which
> mimicked the package name.
>
> The problem is, no other page works. If I put a 2nd WebPage extending class
> called TestPage with a TestPage.html in my same location as the other html,
> using the localhost/war_name/html/TestPage doesn't work. I've also tried
> localhost/war_name/html/com.company.wicket.TestPage and that didn't work.
>
> I am not seeing any log errors either, so I am unsure at this time how to
> make the other pages show up. I can't seem to find anything in the Wicket in
> Action book either that would solve this.
>
> Appreciate a little help figuring out this issue. Thanks.
>
>
> --
> View this message in context: http://apache-wicket.1842946.n4.nabble.com/Having-problems-with-wicket-pages-not-showing-up-tp3784941p3784941.html
> Sent from the Forum for Wicket Core developers mailing list archive at Nabble.com.
>