Add new attachment

Only authorized users are allowed to upload new attachments.

This page (revision-6) was last changed on 06-Jun-2007 16:41 by MurrayAltheim  

This page was created on 27-Jan-2006 22:31 by 200.69.195.234

Only authorized users are allowed to rename pages.

Only authorized users are allowed to delete pages.

Difference between version and

At line 1 added 6 lines
{{{
<%@ page import="org.apache.log4j.*" %>
<%@ page import="com.ecyrd.jspwiki.*" %>
<%@ page import="com.ecyrd.jspwiki.tags.WikiTagBase" %>
<%@ page errorPage="/Error.jsp" %>
<%@ taglib uri="/WEB-INF/jspwiki.tld" prefix="wiki" %>
At line 8 added 90 lines
<%!
public void jspInit()
{
wiki = WikiEngine.getInstance( getServletConfig() );
}
Category log = Category.getInstance("JSPWiki");
WikiEngine wiki;
%>
<%
String pagereq = wiki.safeGetParameter( request, "page" );
String skin = wiki.safeGetParameter( request, "skin" );
if ( pagereq == null )
pagereq = wiki.getFrontPage();
if ( skin == null )
skin = wiki.getTemplateDir();
NDC.push( wiki.getApplicationName()+":"+pagereq );
log.info("Request for page '"+pagereq+"' from "+request.getRemoteHost()+" by "+request.getRemoteUser() );
String specialpage = wiki.getSpecialPageReference( pagereq );
if ( specialpage != null )
{
response.sendRedirect( specialpage );
return;
}
//
// Determine requested version. If version == -1,
// then fetch current version.
//
int version = -1;
String rev = request.getParameter("version");
if ((rev != null))
{
try
{
version = Integer.parseInt(rev);
}
catch (NumberFormatException e)
{
version = -1;
}
}
WikiPage wikipage = wiki.getPage( pagereq, version );
if ( wikipage == null )
{
wikipage = new WikiPage( pagereq );
}
WikiContext wikiContext = new WikiContext( wiki, wikipage );
wikiContext.setRequestContext( WikiContext.VIEW );
wikiContext.setHttpRequest( request );
pageContext.setAttribute( WikiTagBase.ATTR_CONTEXT,
wikiContext,
PageContext.REQUEST_SCOPE );
//
// Alright, then start responding.
//
response.setContentType("text/html; charset="+wiki.getContentEncoding() );
String contentPage = "templates/"+skin+"/PrintTemplate.jsp";
%>
<wiki:Include page="<%=contentPage%>" />
<%
NDC.pop();
NDC.remove();
%>
}}}
----
Sorry new to java wiki , how do i get this print friendly format working i presume i need to edit the code mentioned here soemwhere within thw wiki but now clear where.
help appreciated
--[AnonymousCoward|mailto:michael.poyser@ubs.com ], 08-Jun-2006
Version Date Modified Size Author Changes ... Change note
6 06-Jun-2007 16:41 2.483 kB MurrayAltheim to previous removed noise
5 06-Jun-2007 16:38 2.723 kB ��Ʊj�� to previous | to last Comment by ��Ʊj��
4 20-Oct-2006 23:38 2.483 kB 201.41.100.162 to previous | to last
3 08-Jun-2006 10:30 2.475 kB AnonymousCoward to previous | to last
2 27-Jan-2006 22:32 2.205 kB 200.69.195.234 to previous | to last
1 27-Jan-2006 22:31 0.002 kB 200.69.195.234 to last
« This page (revision-6) was last changed on 06-Jun-2007 16:41 by MurrayAltheim