This is the mail archive of the
docbook-apps@lists.oasis-open.org
mailing list .
[docbook-apps] website and jsp
- From: Arnaud Vandyck <arnaud dot vandyck at ulg dot ac dot be>
- To: docbook-apps at lists dot oasis-open dot org
- Date: Wed, 30 Jun 2004 10:32:08 +0200
- Subject: [docbook-apps] website and jsp
Hi,
I'd like to use jsp's in my website and I use the website
stylesheets. The problem is I don't know how to embed the jsp tags. I
already made some php and the processing tags works well.
If anyone has some experience with jsp's, thanks to share.
Here is what I did. Thanks for comments.
The solution I found was to use xml tags in jsp. So I don't use <@ or <%
tags, but:
<jsp:directive.page contentType="text/html"/>
<jsp:directive.page import="java.util.Date, java.util.Locale, netscape.ldap.*"/>
<jsp:directive.page import="java.text.*"/>
<jsp:declaration>
etc...
The problem then was the root element of the jsp page... I'd like to
have the stylesheets to automatically detect if it's a jsp page or an
xhtml page (yes, I have to use xhtml or jsp's will fail). I did some
tests but did not find how to do this. Thanks for a hint.
So I made this little tricky script (it does the trick but I really
don't like it)
jspfix.sh
#! /bin/sh
for jspfile in $(find -name '*.jsp')
do
NBLIGNES=$(( $(wc -l $jspfile | cut -d ' ' -f 1) - 2 ))
echo '<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="1.2">' \
> temp.jsp
echo ' <jsp:directive.page contentType="text/html;charset=utf-8"/>' >> temp.jsp
echo ' <jsp:text>' >> temp.jsp
tail -n $NBLIGNES $jspfile >> temp.jsp
echo ' </jsp:text>' >> temp.jsp
echo '</jsp:root>' >> temp.jsp
mv temp.jsp $jspfile
done
If someone has a hint or want to share experience, I'd be glad ;-)
Cheers
--
Arnaud Vandyck
To unsubscribe from this list, send a post to docbook-apps-unsubscribe@lists.oasis-open.org, or visit http://www.oasis-open.org/mlmanage/.