Hi guys, I'm trying to build stupid portal for our stupid java user group site...:) There, in that site, I want to add nice feature, so that I --- as the webmaster --- and whoever have something to tell (article) to all the member of the jug, can easily upload the html file of his article and along with it all the gifs file mentioned in that html. For each article, my server will dynamically create a subdirectory under, say, www root directory....The html file and the gifs / jpeg / whatever resources included in that article will be placed in that subdirectory.... The abstract of that article will be recorded in a database table, to make searching previous articles easy. Ok, I've tried a template technique before. It was when I work with servlet... It worked fine as long as the article doesn't contain any image.... just a plain html / text...or I use absolute url for the image :( The same thing happen today, when I switch to JSP. say my jsp is in : http://my.sisterdog.com/portal.jsp. I have an article in http://my.sisterdog.com/article1/article1.html and image http://my.sisterdog.com/article1/bali_language.gif my portal.jsp has the responsiblity to show an article do some other marginal things, like including the result of query to database for latest 3 news in my JUG database. the request should come along with a some request parameter. One of them, say, articlenumber. So i can use : <html> <body>welcome to our JUG...yack..yack..yack.. <! String articlename = "article" + articlenumber !> <!@include pagefile=articlename !> </body></html> ow sorry, I forget the syntax... the final spit will be : <html><body>welcome to our JUG..yack..yack...yack... <html><body>Why Java ? Why it's not Bali ? ha ha ha <img="bali_language.gif"> </body></html> As you may have guessed....the bali_language won't be dispalyed in browser, beacuse the file is not in http://my.sisterdog.com/ , but rather in http://my.sisterdog.com/article1/ . I didn't see any problem when I used php scripting language. Beacuse I can use some string prosessing functions there to prepend the subdirectory name before the image name in <img ...> tag. But,,,, I think I want to avoid using that approach.... Isn't there any magical tag in HTML to solve this problem ? for example : <BASERESOURCES="article1"/> ???? Please help me....this question has been haunting me since 8 months ago. Actually I've forgoten that, but It suddenly come up again today as I'm trying to build a nice site for my nice JUG. Thanks... -Cokorda Raka Angga Jananuraga- Oh...you're turning my software into hardware..... http://www.brainbench.com/transcript.jsp=114634 Send FREE Greetings for Father's Day--or any day! Click here: http://www.whowhere.lycos.com/redirects/fathers_day.rdct =========================================================================== To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". 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
Ohh...include and relative url...images won't show up...
Cokorda Raka Angga Jananuraga Wed, 21 Jun 2000 00:00:33 -0700
