I'm new to Struts, and I'm developing my first web application using Struts. Actually I'm just following the guidelines of the tutorial that I have.
Currently I'm facing 2 problems:
1) Images: According to my tutorial, you can use page rewrite when you use images in a tile.
So what I do is this:
- in the head I define:
<%@ taglib uri="http://struts.apache.org/tags-tiles
" prefix="tiles" %>
<%@ taglib uri="http://struts.apache.org/tags-html
" prefix="html" %>
- to put the image, I use:
<img src="<html:rewrite page='/imgs/chimay01.bmp'/
The problem is that the img doens't show. I checked that the url and everything is correct,
but apparently that ain't the problem.
2) Links: When I click on them, they don't redirect. You can hear the typical "click", but ...
- I define them like this:
<a href="html:rewrite page='/history.jsp'/>">His
Now, the rewrite page works perfectly for the stylesheet when I use this:
<link rel="stylesheet" href="<html:rewrite page='/css/styles01.css'/>
I read somewhere that, to use images and rewrite page, you should put the value $P in the pagePattern. I guess that refers to the struts-config file, so what I did there was this:
Thanks in advance