Use structure:
.src
.java
..com
...myapp
...[HTML Java go here]
...img
...css
...somethink else you would like
In img dir put Images.class, in css put Styles.class and so on, for example:
package com.myapp.images;
public
You can put your resources in src/main/webapp but I would not recommend to do
so (they will work by using an absolute path with the correct web app context)
but it's quite ugly *imho*
My suggestion is:
Put them somewhere in your package hierarchy below src/main/java where it fits
best.
Am 27.07.2011 14:21, schrieb Peter Ertl:
You can put your resources in src/main/webapp but I would not recommend to do
so (they will work by using an absolute path with the correct web app
context) but it's quite ugly *imho*
no, you can just reference them via css/style.css eg. if you have
Miroslav, is there way to achive some kind of whole package mounting
without explicit mounting of each image?
2011/7/27 Miroslav F. mir...@seznam.cz
Use structure:
.src
.java
..com
...myapp
...[HTML Java go here]
...img
if your login page is mounted to path '/login/authenticate' and the application
is deployed to web application context '/myapp' your page will be available at
/myapp/login/authenticate
and the css in src/main/webapp/styles.css must be referenced from your page via
1) ../../css/styles.css
or
put the images in an package and use wicket:link properly ... no need to mount
at all
Am 27.07.2011 um 14:45 schrieb Dmitriy Ivanov:
Miroslav, is there way to achive some kind of whole package mounting
without explicit mounting of each image?
2011/7/27 Miroslav F. mir...@seznam.cz
Use
Guys, I tried creating new folders under src/, naming them main/ and then
webapp/ under main/, with img and css subdirectories, but that didn't work
either, I don't know why. It was supposed to find it automatically.
But anyway, I don't want to reorganize my project structure. It's an
existing
I was assuming you use maven
'src/main/java'
and
'src/main/webapp'
see
http://maven.apache.org/guides/introduction/introduction-to-the-standard-directory-layout.html
If you don't use maven you have to choose the corresponding directory in your
build / IDE environment...
Am 27.07.2011 um
On Wed, Jul 27, 2011 at 3:54 PM, Peter Ertl pe...@gmx.org wrote:
if your login page is mounted to path '/login/authenticate' and the
application is deployed to web application context '/myapp' your page will be
available at
/myapp/login/authenticate
and the css in
Actually you just have to use css/styles.css and Wicket will
relativize it for you.
There is a special IMarkupFilter for that.
but only if wrap it inside wicket:link
this will not work for resources in src/main/webapp but only for package
resources
without wicket:link the markup will just
Can I do, in my Application class,
getResourceSettings().addResourceFolder(this.getServletContext().getContextPath())
? The theory being, that all folders (src and web) will be added as resource
folders, and my img and css files will be found.
--
View this message in context:
Trust me! ;-)
See the javadoc of
org.apache.wicket.markup.parser.filter.RelativePathPrefixHandler
On Wed, Jul 27, 2011 at 4:52 PM, Peter Ertl pe...@gmx.org wrote:
Actually you just have to use css/styles.css and Wicket will
relativize it for you.
There is a special IMarkupFilter for that.
My project structure looks like this:
.src
.java
..com
...myapp
...[HTML Java go here]
.web
.img
.css
.WEB-INF
In my HTML, when I reference img/image.jpg or css/main.css, these files
are not found. I also tried /img/image.jpg and
From googling this issue, it looks like in a Wicket project, webapp is
under src...
In my project, src and web are on the same level. Is this problem? This
project was created by NetBeans and I'd prefer not to modify it, with all
the web.xml dependencies etc.
Looking at the rendered result, I
14 matches
Mail list logo