Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.softwaretools > #133 > unrolled thread
| Started by | Allan <findes@ikke.invalid> |
|---|---|
| First post | 2012-05-27 20:38 +0200 |
| Last post | 2012-05-29 23:07 +0200 |
| Articles | 3 — 2 participants |
Back to article view | Back to comp.lang.java.softwaretools
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
| From | Allan <findes@ikke.invalid> |
|---|---|
| Date | 2012-05-27 20:38 +0200 |
| Subject | Eclipse/Tomcat/JSP, ROOT/<img src=?> |
| Message-ID | <4fc2773c$0$295$14726298@news.sunsite.dk> |
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
[toc] | [next] | [standalone]
| From | Donkey Hottie <donkey@fredriksson.dy.fi> |
|---|---|
| Date | 2012-05-27 22:52 +0300 |
| Message-ID | <89da99-30t.ln1@hurricane.fredriksson.dy.fi> |
| In reply to | #133 |
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"
[toc] | [prev] | [next] | [standalone]
| From | Allan <findes@ikke.invalid> |
|---|---|
| Date | 2012-05-29 23:07 +0200 |
| Message-ID | <4fc53a83$0$294$14726298@news.sunsite.dk> |
| In reply to | #135 |
> > <body> > <img src="<%= request.getScheme() + "://" + request.getServerName() + > ":" + request.getServerPort() %>/flag/DK.gif" alt="Denmark" border="1"> > </body> > > Thanks Allan
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.java.softwaretools
csiph-web