[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: 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
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]