Hi,
May be it's newbies question... :-/
I tried to show an image coming from mySQL. found nothing in the doc and
mail-archive.
I did :
....
public class ArtisteTrombine extends HttpServlet {
protected void doGet(HttpServletRequest req, HttpServletResponse res)
throws ServletException, IOException {
byte[] trombine = null;
try {
Criteria aCriteria = new Criteria();
Vector aResultList = ArtistePeer.doSelect(aCriteria);
Artiste aArtiste = (Artiste) aResultList.firstElement();
trombine = aArtiste.getTrombine();
if (trombine != null) {
res.setContentType("image/jpeg");
ServletOutputStream out = res.getOutputStream();
out.write(trombine);
}
}
catch (Exception e ) {
Log.debug(e.getMessage());
}
}
}
and in my template :
<img src="/servlets/pf.cs.gtr.modules.actions.ArtisteAction" >
I'm think, I'm wrong
If somebody used, thanks for the help
Xa.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]