tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Seth Brahler <>
Subject RE: can jsp's import text?
Date Fri, 28 Jun 2002 13:34:48 GMT

Correct. I did it this way. I'm just having problems parsing now.

String url="";
URL urlObject = new URL(url);
URLConnection conn = urlObject.openConnection();
BufferedReader fromServer = new BufferedReader(new 
String webPage = "";
for (String line = null; (line = fromServer.readLine()) != null;) 
{   webPage = webPage + line + "\n";}

At 04:30 PM 6/27/2002 -0500, you wrote:
>At 03:01 PM 6/27/2002, you wrote:
>>Use the <jsp:include page="yoururl.html"/> tag.
>>This just drags the text into the page as is.
>>If you want to parse it in the page, I think this might work:
>>         String extContent = "<jsp:include page="yourpage.whatever"/>";
>>         // now do stuff with extContent
>No, I'm pretty sure the above won't work - you can't use a jsp tag inside 
>of a scriptlet.
>Seth, are you asking about parsing the content of an included page that is 
>part of the application (ie on the same server, within the same context), 
>or are you talking about accessing a remote page via http?
>Either way its possible, but you'll have to write some code to do it.  But 
>then, you have to write code anyway since you want to parse the returned 
>text, right?
>Eric Everman
>>-----Original Message-----
>>From: Seth Brahler [<>]
>>Sent: Thursday, June 27, 2002 2:43 PM
>>Subject: can jsp's import text?
>>For example, in Cold Fusion you can use a HTTP tag that will bring any
>>page's HTML and deliver it as a string. Then you can parse the string as
>>you wish and display it on your site. Can this be done in JSP?
>>Seth Brahler
>>HR Information Systems
>>Cornell University
>>Office of Human Resources
>>337 Pine Tree Road
>>East Hill Plaza
>>Ithaca, New York  14853
>>To unsubscribe, e-mail: 

>>For additional commands, e-mail: 

>>To unsubscribe, e-mail:   <>
>>For additional commands, e-mail: <>
>To unsubscribe, e-mail:   <>
>For additional commands, e-mail: <>

Seth Brahler

HR Information Systems
Cornell University
Office of Human Resources
337 Pine Tree Road
East Hill Plaza
Ithaca, New York  14853


To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message