<%@ page import="java.io.*" %>
try
{
BufferedReader in = new BufferedReader(new FileReader
"myFile.html")); // Open file.
int c;
// New character to read.
char next; // Next character to be read.
String myString = "";
while((c = in.read()) != -1)
// If not EOF.
{
myString = myString + (char) c;
}
} // end try
catch (Exception e)
{
System.out.println("Exception occured " + e);
e.printStackTrace();
System.exit(1);
}
>From: Rosario Samanez <[EMAIL PROTECTED]>
>Reply-To: A mailing list about Java Server Pages specification and
> reference <[EMAIL PROTECTED]>
>To: [EMAIL PROTECTED]
>Subject: Read File
>Date: Wed, 20 Dec 2000 10:58:24 -0000
>
>Hi......everybody
>
>How can read a file(*.htm) and get the source it into
>a variable String
>
>
>thanks ......
>
>
>
>-----Mensaje original-----
>De: Raymond Blum [mailto:[EMAIL PROTECTED]]
>Enviado el: mi�rcoles 20 de diciembre de 2000 0:34
>Para: [EMAIL PROTECTED]
>Asunto: JRun Virtual Mappings & base HREFS
>
>
>Hi
>
>This is in JRun 3.0sp1 running under Linux.
>
> I have a virtual mapping in my default server, default app that maps
>"/images"
> to "{jrun.rootdir}/servers/default/default-app/images"
>
>I have a JSP that contains...
>
><BASE HREF="<%= request.getContextPath() %>/">
>
>and then a while later...
>
><td align=right valign=bottom><input type=image src="<%=
>"images/connect_btn.gif" %>" border=0>
>
>This gets a broken link icon, when I copy the image location in the
>browser it is "/images/connect_btn.gif"
>
>As an experiment I replaced the image source with a full URL
>"http://ipaddress:port/images/connect_btn.gif" and this worked.
>Obviously I do not want to have to calculate and prefix the explicit URL
>path this way.
>
>I guess that I am misunderstanding how to use the virtual mappings. Can
>anyone help me out?
>
>--
>Cheers,
>
>Raymond Blum
>VP of System Architecture
>Askit.com
>
>212 414-9590
>
>===========================================================================
>To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
>JSP-INTEREST".
>For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
>DIGEST".
>Some relevant FAQs on JSP/Servlets can be found at:
>
> http://java.sun.com/products/jsp/faq.html
> http://www.esperanto.org.nz/jsp/jspfaq.html
> http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
> http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
>
>===========================================================================
>To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
>JSP-INTEREST".
>For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
>DIGEST".
>Some relevant FAQs on JSP/Servlets can be found at:
>
> http://java.sun.com/products/jsp/faq.html
> http://www.esperanto.org.nz/jsp/jspfaq.html
> http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
> http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets