[opencms-dev] questions on jsp template
alicewin at collegeclub.com
alicewin at collegeclub.com
Thu Sep 11 12:01:07 CEST 2003
Hello,
I'm in OpenCMS.
I have some questions, hope you could help me.
My project will read-write into database, so I think I should use jsp language.
But currently, I meet problem with the default.jsp template.
How to create an element? I don't want to define them in default.jsp.
How to include a jsp file or an element into the default.jsp template?
How to load an image in a jsp (for the header)? I really want to put the head part into another page/template, but I don't know how to.
The below default.jsp file is a bad template.
It raises errors. Help me please.
What's wrong?
By the way, please answer me in OpenCMS, where should I put my new project? Because, I don't think /release/ folder is a good place. Am I right?
Be patient with me.
Thanks alot.
Here is my default.jsp:
<%@ taglib prefix="cms" uri="http://www.opencms.org/taglib/cms" %>
<cms:template element="head"><%--
--%><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=<cms:info property="opencms.request.encoding" />">
<title>Test page</title>
</head>
<body>
<link title="Flex Stylesheet" href ="<cms:link>../resources/css/alice.css</cms:link>" type="text/css" rel="STYLESHEET">
<!-- Header row -->
<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
<TR>
<TD colSpan=5><IMG height=30 alt=""
src="<cms:link>/system/galleries/pics/pics/spacer.gif</cms:link>" width=1 border=0></TD>
<TD rowSpan=3><A href="<cms:link>/index.jsp?pag=login</cms:link>"><IMG alt=""
src="<cms:link>/system/galleries/pics/pics/login.gif</cms:link>" border=0></A></TD></TR>
<TR>
<TD><IMG height=1 alt=""
src="<cms:link>/system/galleries/pics/pics/spacer.gif</cms:link>" width=40 border=0></TD>
<TD vAlign=top align=right><IMG alt=logo_image
src="<cms:link>/system/galleries/pics/pics/logo.gif</cms:link>"></TD>
<TD><IMG height=1 alt=""
src="<cms:link>/system/galleries/pics/pics/spacer.gif</cms:link>" width=20 border=0></TD>
<TD vAlign=top align=left><IMG alt=logo_text
src="<cms:link>/system/galleries/pics/pics/logo_text.gif</cms:link>" ></TD>
<TD><IMG height=1 alt=""
src="<cms:link>/system/galleries/pics/pics/spacer.gif</cms:link>" width=100 border=0></TD>
</TR>
<TR>
<TD colSpan=5><IMG height=20 alt=""
src="<cms:link>/system/galleries/pics/pics/spacer.gif</cms:link>" width=1 border=0></TD></TR></TABLE>
</cms:template>
<cms:template element="body">
<!-- Main row -->
<cms:include page="<cms:link>/index.jsp</cms:link>"
</cms:template>
<cms:template element="foot">
<!-- Footer row -->
<cms:include page="<cms:link>../elements/foot.jsp</cms:link>"
</body>
</html>
</cms:template>
--------------------------------------------------------------------------
CollegeClub.com is ready for Back to School! Enter the Caption Contest, get advice or see the 'Old School' Flipbook.
http://navisite.collegeclub.com/backtoschool2003
More information about the opencms-dev
mailing list