I tried adding the "*" to my web.xml file, that didn't make any
difference. I ran a debugger on the wicket code and came across
something that doesn't seem right to me. In
wicket/protocol/http/WebRequestCycle.java at line 149 (version 1.1-b4)
is this line:
if (!resourceReference() && !staticContent()) ...
The call to resourceReference returns true (the CSS file is found in
the shared resources), so the then-block does not execute. But
then it just falls out into these lines of code at line 167:
// Don't update the cluster, not returning a page
setUpdateCluster(false);
setResponsePage((Page)null);
return false;
Is this correct? It seems like it should be returning the page somehow,
not saying it will return nothing.
--
Jim McBeath
On Thu, Sep 01, 2005 at 11:05:33AM +0100, Gwyn Evans wrote:
> From: Gwyn Evans <[EMAIL PROTECTED]>
> To: [email protected]
> Subject: Re: [Wicket-user] main CSS file
> Date: Thu, 1 Sep 2005 11:05:33 +0100
>
> You need to change your servlet mapping to "/*", not "/" if you want
> to have Wicket able to serve the CSS file (from down in the hierachy)
> via wicket:link!
>
> /Gwyn
>
> On 01/09/05, Jim McBeath <[EMAIL PROTECTED]> wrote:
> > To answer Johann, here's my web.xml:
> >
> > <?xml version="1.0" encoding="UTF-8"?>
> > <!DOCTYPE web-app
> > PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
> > "http://java.sun.com/dtd/web-app_2_3.dtd">
> >
> > <web-app>
> > <display-name>AppLog Viewer</display-name>
> > <servlet>
> > <servlet-name>AppLogViewerApp</servlet-name>
> >
> > <servlet-class>wicket.protocol.http.WicketServlet</servlet-class>
> > <init-param>
> > <param-name>applicationClassName</param-name>
> >
> > <param-value>com.mobliss.sms.applog.AppLogViewerApp</param-value>
> > </init-param>
> > <load-on-startup>1</load-on-startup>
> > </servlet>
> > <servlet-mapping>
> > <servlet-name>AppLogViewerApp</servlet-name>
> > <url-pattern>/</url-pattern>
> > </servlet-mapping>
> > </web-app>
> >
> > So I have configured it so that all accesses within my war file are
> > directed to the AppLogViewerApp, which in turn displays my one page,
> > implemented by my AppLogViewer class. Other than the css file,
> > this is working fine for me.
> >
> > more...
> >
> > On Wed, Aug 31, 2005 at 08:56:32AM +0200, Juergen Donnerstag wrote:
> > > From: Juergen Donnerstag <[EMAIL PROTECTED]>
> > > To: [email protected]
> > > Subject: Re: [Wicket-user] main CSS file
> > > Date: Wed, 31 Aug 2005 08:56:32 +0200
> > >
> > > please take a look at wicket-examples as well. There we you both
> > > approaches.
> >
> > I see one place where it looks like the <wicket:link> approach was
> > used for a css file, in wicket/examples/displaytag/DisplaytagIndex.java
> > which references wicket/examples/displaytag/jd_style.css (this is in the
> > 1.1-b4 examples). I see the <wicket:link> code in DisplaytagIndex.html,
> > it looks just like mine, referencing a local css file which is in the same
> > directory as the html file. I see jd_style.css in the WEB_INF/classes
> > directory under wicket/examples/displaytag, just as I see my css file
> > in my jar file in WEB_INF/lib in the same directory as my html file.
> >
> > Can someone explain how this is supposed to work? The URL to my css file,
> > which is located three levels down in my package hierarchy, is coming
> > back as:
> >
> > localhost:8088/AppLogViewer/resources/wicket.Application/wstyle.css
> >
> > How is this supposed to get translated to a css file located in my
> > package directory? Is the wicket servlet supposed to translate the
> > "resources/wicket.Application" somehow and pick up the css file, or am I
> > required to modify my web.xml file so that the css file access does not go
> > through the wicket servlet? If the wicket servlet is not going to pick up
> > the css file, how do I know where it is supposed to be? I would expect
> > that the URL to the css file would have my class name in it somewhere;
> > I can't see how it can be found given the URL that is being generated.
> >
> > --
> > Jim
> >
> > > Juergen
> > >
> > > On 8/31/05, Juergen Donnerstag <[EMAIL PROTECTED]> wrote:
> > > > Besides what Johann already mentioned ...You've two options. Some
> > > > users like to have the css file next to the html file, than the
> > > > <wicket:link> approach should hopefully) work. Nad the beside the path
> > > > (..//.. and AppLogViewer/) what I see looks fine.
> > > >
> > > > The second approach is plain standard html. Put your css in
> > > > /webroot/style.css (next to your index.html) and forget about
> > > > <wicket:link>. Disadvantage: you loose previewability in Dreamweaver
> > > > etc. because it won't know where to look for the css file.
> > > >
> > > > Juergen
> > > >
> > > > On 8/31/05, Johan Compagner <[EMAIL PROTECTED]> wrote:
> > > > > how did you configure the wicket servlet in web.xml?
> > > > >
> > > > >
> > > > > Jim McBeath wrote:
> > > > > > I've been playing with Wicket on and off for a while, starting with
> > > > > > 1.0
> > > > > > and today upgrading to 1.1-b4. Today I have been trying to set up
> > > > > > a main
> > > > > > CSS page for my app, and so far have not succeeded.
> > > > > >
> > > > > > Based on a recent comment about the upcoming capabilities of the
> > > > > > <wicket:link> element by Juergen in the archives of the
> > > > > > wicket-users list
> > > > > > <http://sourceforge.net/mailarchive/message.php?msg_id=12740630>
> > > > > > (did this make it into 1.1-b4?),
> > > > > > I have added the following fragment to the <head> of my page file,
> > > > > > AppLogViewer.html, which is down inside a package about three
> > > > > > levels:
> > > > > >
> > > > > > <wicket:link>
> > > > > > <link rel="stylesheet" type="text/css" href="wstyle.css"/>
> > > > > > </wicket:link>
> > > > > >
> > > > > > The referenced file, wstyle.css, is in the same location as
> > > > > > AppLogViewer.html, which is to say in a subdirectory in the jar
> > > > > > file in the WEB-INF/lib directory in the war file.
> > > > > >
> > > > > > When I access my web page at the URL
> > > > > >
> > > > > > localhost:8088/AppLogViewer/
> > > > > >
> > > > > > my page appears and works fine, but does not access the css page.
> > > > > > A "View Source" in the browser shows this for the <link> element:
> > > > > >
> > > > > > <wicket:link>
> > > > > > <link
> > > > > > href="/AppLogViewer//resources/wicket.Application/wstyle.css"
> > > > > > type="text/css" rel="stylesheet"/>
> > > > > > </wicket:link>
> > > > > >
> > > > > > If I just point my browser to
> > > > > >
> > > > > >
> > > > > > localhost:8088/AppLogViewer/resources/wicket.Application/wstyle.css
> > > > > >
> > > > > > it just shows me my app page, same as looking at
> > > > > > localhost:8088/AppLogViewer/.
> > > > > >
> > > > > > As a wicket beginner, I am still light on some of the concepts and
> > > > > > classes
> > > > > > in Wicket, such as the Resource stuff. Although I have spent a lot
> > > > > > of
> > > > > > time digging on the net, I have not been very successful at finding
> > > > > > and
> > > > > > navigating documentation for Wicket. I spent a short amount of time
> > > > > > trying to figure out where the "resources/wicket.Application"
> > > > > > appeared
> > > > > > in the source code, but it takes a long time to understand 70K
> > > > > > lines of
> > > > > > code without a mentor.
> > > > > >
> > > > > > My goal is simply to be able to have one CSS page for my app, which
> > > > > > I
> > > > > > can bundle into the war file. Am I missing something basic here?
> > > > > > Is this supposed to work now? Is the wicket servlet supposed to be
> > > > > > serving up my wstyle.css file, or do I have to modify my xml file so
> > > > > > that it access the css file without going through the wicket
> > > > > > servlet?
> > > > > >
> > > > > > --
> > > > > > Jim McBeath
> > > > > >
> > > > > >
> > > > > > -------------------------------------------------------
> > > > > > SF.Net email is Sponsored by the Better Software Conference & EXPO
> > > > > > September 19-22, 2005 * San Francisco, CA * Development Lifecycle
> > > > > > Practices
> > > > > > Agile & Plan-Driven Development * Managing Projects & Teams *
> > > > > > Testing & QA
> > > > > > Security * Process Improvement & Measurement *
> > > > > > http://www.sqe.com/bsce5sf
> > > > > > _______________________________________________
> > > > > > Wicket-user mailing list
> > > > > > [email protected]
> > > > > > https://lists.sourceforge.net/lists/listinfo/wicket-user
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > > > -------------------------------------------------------
> > > > > SF.Net email is Sponsored by the Better Software Conference & EXPO
> > > > > September 19-22, 2005 * San Francisco, CA * Development Lifecycle
> > > > > Practices
> > > > > Agile & Plan-Driven Development * Managing Projects & Teams * Testing
> > > > > & QA
> > > > > Security * Process Improvement & Measurement *
> > > > > http://www.sqe.com/bsce5sf
> > > > > _______________________________________________
> > > > > Wicket-user mailing list
> > > > > [email protected]
> > > > > https://lists.sourceforge.net/lists/listinfo/wicket-user
> > > > >
> > > >
> > >
> > >
> > > -------------------------------------------------------
> > > SF.Net email is Sponsored by the Better Software Conference & EXPO
> > > September 19-22, 2005 * San Francisco, CA * Development Lifecycle
> > > Practices
> > > Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
> > > Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
> > > _______________________________________________
> > > Wicket-user mailing list
> > > [email protected]
> > > https://lists.sourceforge.net/lists/listinfo/wicket-user
> >
> >
> > -------------------------------------------------------
> > SF.Net email is Sponsored by the Better Software Conference & EXPO
> > September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
> > Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
> > Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
> > _______________________________________________
> > Wicket-user mailing list
> > [email protected]
> > https://lists.sourceforge.net/lists/listinfo/wicket-user
> >
>
>
> -------------------------------------------------------
> SF.Net email is Sponsored by the Better Software Conference & EXPO
> September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
> Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
> Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
> _______________________________________________
> Wicket-user mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/wicket-user
-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user