Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.softwaretools > #135
| From | Donkey Hottie <donkey@fredriksson.dy.fi> |
|---|---|
| Newsgroups | comp.lang.java.softwaretools |
| Subject | Re: Eclipse/Tomcat/JSP, ROOT/<img src=?> |
| Date | 2012-05-27 22:52 +0300 |
| Organization | A noiseless patient Spider |
| Message-ID | <89da99-30t.ln1@hurricane.fredriksson.dy.fi> (permalink) |
| References | <4fc2773c$0$295$14726298@news.sunsite.dk> |
On 27.5.2012 21:38, Allan wrote: > I am using Windows XP, Eclipse(WTP), Apache, and Tomcat(v7). > > How do I - in my .JSP program - refer to a 'src' that is not placed in > my Eclipse generated .war-file? > > (I agree my question is not very clear, let me give an example) > > JSP example: > <%@ page language="java" contentType="text/html; charset=UTF-8" > pageEncoding="UTF-8"%> > <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> > <html> > <head> > <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> > <title>flagtest</title> > </head> > <body> > <img src="/flag/DK.gif" alt="Denmark" border="1"> > </body> > </html> > > I have no problem showing the file 'DK.gif' if I include the file > 'DK.gif' as a source file in Eclipse and therefore implicit includes the > 'DK.gif' in the .war file generated by Eclipse. > > BUT, because I have a huge amount of ordinary images I don't want to > include these files in the .war file. > > So..., where do I place the flag directory relative to Tomcat ROOT, in > order to having Apache/Tomcat to find the file "DK.gif" in the directory > "/flag/"? > > Thanks in advance > Allan <body> <img src="<%= request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() %>/flag/DK.gif" alt="Denmark" border="1"> </body> -- I dote on his very absence. -- William Shakespeare, "The Merchant of Venice"
Back to comp.lang.java.softwaretools | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Eclipse/Tomcat/JSP, ROOT/<img src=?> Allan <findes@ikke.invalid> - 2012-05-27 20:38 +0200
Re: Eclipse/Tomcat/JSP, ROOT/<img src=?> Donkey Hottie <donkey@fredriksson.dy.fi> - 2012-05-27 22:52 +0300
Re: Eclipse/Tomcat/JSP, ROOT/<img src=?> Allan <findes@ikke.invalid> - 2012-05-29 23:07 +0200
csiph-web