Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.softwaretools > #135

Re: Eclipse/Tomcat/JSP, ROOT/<img src=?>

Path csiph.com!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!eternal-september.org!feeder.eternal-september.org!mx04.eternal-september.org!.POSTED!not-for-mail
From Donkey Hottie <donkey@fredriksson.dy.fi>
Newsgroups comp.lang.java.softwaretools
Subject Re: Eclipse/Tomcat/JSP, ROOT/<img src=?>
Date Sun, 27 May 2012 22:52:40 +0300
Organization A noiseless patient Spider
Lines 46
Message-ID <89da99-30t.ln1@hurricane.fredriksson.dy.fi> (permalink)
References <4fc2773c$0$295$14726298@news.sunsite.dk>
Mime-Version 1.0
Content-Type text/plain; charset=ISO-8859-1
Content-Transfer-Encoding 7bit
Injection-Info mx04.eternal-september.org; posting-host="2CZGuqNdT70amojVWJXwUg"; logging-data="10463"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18j3Fl5/uXIXkcDzJuYzVo+"
User-Agent Mozilla/5.0 (Windows NT 6.1; WOW64; rv:12.0) Gecko/20120428 Thunderbird/12.0.1
In-Reply-To <4fc2773c$0$295$14726298@news.sunsite.dk>
X-Antivirus-Status Clean
X-Antivirus avast! (VPS 120527-1, 27.05.2012), Outbound message
Cancel-Lock sha1:V/PdyWkLo307IHZiA2fHcoZ+wyo=
Xref csiph.com comp.lang.java.softwaretools:135

Show key headers only | View raw


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 | NextPrevious in thread | Next in thread | Find similar | Unroll thread


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