Re: Newbie IMG tag pointing context root issue

2009-01-13 Thread Steve Viens
Sounds about right .. i'm running on JBoss 5.0 with embedded Tomcat.

Steve

On 1/12/09, Igor Vaynberg igor.vaynb...@gmail.com wrote:

 its a tomcat bug afaik. search this list for tomcat and index.jsp.

 -igor

 On Mon, Jan 12, 2009 at 6:28 PM, Steve Viens st...@viens.net wrote:
  Interesting.
 
  Peter, I tried what you suggested below but was still having the same
 issue
  ... that darn ../ prefix in being added to the src value for my
 image.  But
  I did figure it out ...
 
  Because I am in the process of moving a small JSP-based webapp to Wicket.
  I realized that while I had copied the markup of the index.jsp file into
  Index.html in the classpath I left the original index.jsp file at the
 root
  of the application context.  When I renamed the index.jsp file to
 xindex.jsp
  the annoying ../ prefix no longer appeared.  This is even stranger
 because
  my web.xml file does not contain a welcome-file-list element.
 
  Does this sound like bug to anyone else?
 
  Steve
 
 
  Peter Thomas wrote:
 
  On Mon, Jan 12, 2009 at 8:15 AM, Steve Viens st...@viens.net wrote:
 
 
 
  I'm a newbie too  but I'm having the same problem without
 resolution
  (Wicket 1.3.5).  I'd like to simply include the image from the context
  root.
   After reading the archive below...
 
  http://www.nabble.com/Newbie-IMG-question-td20501647.html
 
  ...I believe that there isn't supposed to be anthing for me to do.  If
 I
  want to include the image from the web application's context root I
  shouldn't have to do anything. Anyone else had this happen to them?  Am
 I
  missing something obvious?
 
 
 
  For e.g. when you have a mix of pages with bookmarkable URLs - you can't
  predict relative paths.  I think best practice is to use ContextImage.
  Example usage:
 
  HTML: img wicket:id=logo/
  Java: add(new ContextImage(logo, new Model(images/logo.gif)));
 
 
 
 
  The Index.html page looks like this
 
  html
  head
  titleHelloWicketWorld/title
  meta http-equiv=Content-Type content=text/html;
 charset=ISO-8859-1
  link rel=stylesheet href=styles/drumbeat.css/
  /head
  body
  img src=images/logo.gif /br
  span wicket:id=messageMessage goes here/span
  /body
  /html
 
 
  The rendered Index.html page looks like this (notice the ../ prefix to
  the
  image and css files)
 
  html
  head
  titleHelloWicketWorld/title
  meta http-equiv=Content-Type content=text/html;
 charset=ISO-8859-1
  link rel=stylesheet href=../styles/drumbeat.css/
  /head
  body
  img src=../images/logo.gif/br
  span wicket:id=messageWicket, Wicket World!/span
  /body
  /html
 
 
  The Index.java default constructor looks like this.
 
  public Index() {
   add(new Label(message, Wicket, Wicket World!));
  }
 
 
  And the web.xml filter mapping looks like this.
 
  filter
   filter-nameDrumbeatApplication/filter-name
 

   filter-classorg.apache.wicket.protocol.http.WicketFilter/filter-class
   init-param
param-nameapplicationClassName/param-name

   param-valuenet.viens.drumbeat.markup.DrumbeatApplication/param-value
   /init-param
   init-param
param-nameconfiguration/param-name
param-valuedevelopment/param-value
   /init-param
  /filter
 
  filter-mapping
   filter-nameDrumbeatApplication/filter-name
   url-pattern/*/url-pattern
  /filter-mapping
 
  Steve
 
 
  -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 
 
 
 
 
 
  -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
 

 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org




Re: Newbie IMG tag pointing context root issue

2009-01-12 Thread Steve Viens

Interesting.

Peter, I tried what you suggested below but was still having the same 
issue ... that darn ../ prefix in being added to the src value for my 
image.  But I did figure it out ...


Because I am in the process of moving a small JSP-based webapp to 
Wicket.   I realized that while I had copied the markup of the index.jsp 
file into Index.html in the classpath I left the original index.jsp file 
at the root of the application context.  When I renamed the index.jsp 
file to xindex.jsp the annoying ../ prefix no longer appeared.  This is 
even stranger because my web.xml file does not contain a 
welcome-file-list element.


Does this sound like bug to anyone else?

Steve


Peter Thomas wrote:

On Mon, Jan 12, 2009 at 8:15 AM, Steve Viens st...@viens.net wrote:

  

I'm a newbie too  but I'm having the same problem without resolution
(Wicket 1.3.5).  I'd like to simply include the image from the context root.
 After reading the archive below...

http://www.nabble.com/Newbie-IMG-question-td20501647.html

...I believe that there isn't supposed to be anthing for me to do.  If I
want to include the image from the web application's context root I
shouldn't have to do anything. Anyone else had this happen to them?  Am I
missing something obvious?




For e.g. when you have a mix of pages with bookmarkable URLs - you can't
predict relative paths.  I think best practice is to use ContextImage.
Example usage:

HTML: img wicket:id=logo/
Java: add(new ContextImage(logo, new Model(images/logo.gif)));


  

The Index.html page looks like this

html
head
titleHelloWicketWorld/title
meta http-equiv=Content-Type content=text/html; charset=ISO-8859-1
link rel=stylesheet href=styles/drumbeat.css/
/head
body
img src=images/logo.gif /br
span wicket:id=messageMessage goes here/span
/body
/html


The rendered Index.html page looks like this (notice the ../ prefix to the
image and css files)

html
head
titleHelloWicketWorld/title
meta http-equiv=Content-Type content=text/html; charset=ISO-8859-1
link rel=stylesheet href=../styles/drumbeat.css/
/head
body
img src=../images/logo.gif/br
span wicket:id=messageWicket, Wicket World!/span
/body
/html


The Index.java default constructor looks like this.

public Index() {
 add(new Label(message, Wicket, Wicket World!));
}


And the web.xml filter mapping looks like this.

filter
 filter-nameDrumbeatApplication/filter-name
 filter-classorg.apache.wicket.protocol.http.WicketFilter/filter-class
 init-param
   param-nameapplicationClassName/param-name
  param-valuenet.viens.drumbeat.markup.DrumbeatApplication/param-value
 /init-param
 init-param
   param-nameconfiguration/param-name
   param-valuedevelopment/param-value
 /init-param
/filter

filter-mapping
 filter-nameDrumbeatApplication/filter-name
 url-pattern/*/url-pattern
/filter-mapping

Steve


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org





  




-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Newbie IMG tag pointing context root issue

2009-01-11 Thread Steve Viens
I'm a newbie too  but I'm having the same problem without resolution 
(Wicket 1.3.5).  I'd like to simply include the image from the context 
root.  After reading the archive below...


http://www.nabble.com/Newbie-IMG-question-td20501647.html

...I believe that there isn't supposed to be anthing for me to do.  If I 
want to include the image from the web application's context root I 
shouldn't have to do anything. Anyone else had this happen to them?  Am 
I missing something obvious?



The Index.html page looks like this

html
head
titleHelloWicketWorld/title
meta http-equiv=Content-Type content=text/html; charset=ISO-8859-1
link rel=stylesheet href=styles/drumbeat.css/
/head
body
img src=images/logo.gif /br
span wicket:id=messageMessage goes here/span
/body
/html


The rendered Index.html page looks like this (notice the ../ prefix to 
the image and css files)


html
head
titleHelloWicketWorld/title
meta http-equiv=Content-Type content=text/html; charset=ISO-8859-1
link rel=stylesheet href=../styles/drumbeat.css/
/head
body
img src=../images/logo.gif/br
span wicket:id=messageWicket, Wicket World!/span
/body
/html


The Index.java default constructor looks like this.

public Index() {
  add(new Label(message, Wicket, Wicket World!));
}


And the web.xml filter mapping looks like this.

filter
  filter-nameDrumbeatApplication/filter-name
  filter-classorg.apache.wicket.protocol.http.WicketFilter/filter-class
  init-param
param-nameapplicationClassName/param-name
   
param-valuenet.viens.drumbeat.markup.DrumbeatApplication/param-value

  /init-param
  init-param
param-nameconfiguration/param-name
param-valuedevelopment/param-value
  /init-param
/filter

filter-mapping
  filter-nameDrumbeatApplication/filter-name
  url-pattern/*/url-pattern
/filter-mapping

Steve


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org