  | Mailing List | | Home | | Forum Home | | JBoss - Java Application Server | | Tomcat - JSP/Servlet container | | Struts - A MVC web framework | | iText - An open source PDF Java Library | | JDOM - JDOM XML Parser | | JSP - A mailing list about Java Server Pages specification and reference | | J2EE - A mailing list for Java(tm) 2 Platform, Enterprise Edition | | J2EE Pattern - An interest list for Sun Java Center J2EE Pattern Catalog | | Servlet - A mailing list for discussion about Sun Microsystem's Java Servlet API Technology | |
Struts & Hibernate
|
|
|
  | | | UNSUBSCRIBE | UNSUBSCRIBE 2004-11-17 - By Leviaguirre Queral Jos? Luis
Back -- --Mensaje original-- -- De: A mailing list for discussion about Sun Microsystem's Java Servlet API Technology. [mailto:SERVLET-INTEREST@(protected)]En nombre de Paul Copeland Enviado el: Domingo, 14 de Noviembre de 2004 01:34 p.m. Para: SERVLET-INTEREST@(protected) Asunto: [SPAM] - Re: Dynamic image generation servlet... - Email has different SMTP TO: and MIME TO: fields in the email addresses
In the Perl spirit that every easy problem should have a minimum of four equally valid solutions, he could also use the html BASE tag to set the relative URL for the rest of the document.
- Paul Copeland JOT Object Technologies http://www.jotobjects.com
>Date: Sat, 13 Nov 2004 16:42:14 +0000 >From: Nic Ferrier <nferrier@(protected)> >Subject: Re: Dynamic image generation servlet... > >Johan Hahn <johahn2003@(protected)> writes: > > > >>Michael Burbidge wrote: >>[snip] >> >> >>>Note that the ImageServlet is registered to handle URI from the root >>>context of the form "/image". I would think then that the URI in the >>>the html snippet <img src='/image?name=imagename'> would get resolved >>>by dispatching to my ImageServlet. But it doesn't work. >>> >>> >>Try >> >> <url-pattern>/image*</url-pattern> >> >>It should work without explanaition. >> >> > >I don't think that's the problem. > > <url-patten>/image</url-pattern> > >should match the url: > > http://somehost/image?something=xxx > >I think the poster may have got the context path mucked up. The >request path he gave for calling his image directly was this: > > http://localhost:8080/demo/image > >which indicates that the webapp is mapped to /demo on localhost. > >But he said he was putting the following in his HTML page: > > <img src='/image?name=imagename'> > >Well, that's never going to work because /image is not bound to >anything. > >Instead he should use: > > <img src='/demo/image?name=imagename'/> > >Or alternately use relative paths. If the HTML page is being served >from, for example /demo/index.html then his HTML could be this: > > <img src="image?name=imagename"/> > > > >In a more advanced note: if relative paths are not possible then you >can still make your HTML position portable by generating the link to >the image in a servlet, eg: > > out.println(request.getContextPath() + "/image?name=imagename"); > > >-- >Nic Ferrier >http://www.tapsellferrier.co.uk > >__ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ __ >To unsubscribe, send email to listserv@(protected) and include in the body >of the message "signoff SERVLET-INTEREST". > >Archives: http://archives.java.sun.com/archives/servlet-interest.html >Resources: http://java.sun.com/products/servlet/external-resources.html >LISTSERV Help: http://www.lsoft.com/manuals/user/user.html > >-- ---- ---- ---- ---- ---- -- > >End of SERVLET-INTEREST Digest - 12 Nov 2004 to 13 Nov 2004 (#2004-162) >*********************************************************************** > > > > >
__ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ __ To unsubscribe, send email to listserv@(protected) and include in the body of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html Resources: http://java.sun.com/products/servlet/external-resources.html LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ------ -- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- -- -- --- Contrata Prodigy Infinitum y navega a Infinitum de velocidad sin ocupar tu tel ?fono por s?lo $349 al mes. Adem?s, ll?vate Antivirus. El mejor del mercado para proteger tu equipo e informaci?n. ?Qu? esperas? Ven a tu Tienda Telmex o con?ctate en telmex.com 01 800 123 2222. Precio m?s I .V.A. http://www.telmex.com/infinitum
Prodigy Infinitum la conexi?n m?s r?pida
As?m@(protected) a telmex.com http://www.hits.telmex.com/app/ad_Mgr/lnk_mgrN.jsp?lnk?
__ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ __ To unsubscribe, send email to listserv@(protected) and include in the body of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html Resources: http://java.sun.com/products/servlet/external-resources.html LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
|
|
 |