<%@ page import="org.apache.log4j.*" %> <%@ page import="com.ecyrd.jspwiki.*" %> <%@ page import="java.util.Calendar,java.util.Date" %> <%! public void jspInit() { wiki = WikiEngine.getInstance( getServletConfig() ); } Category log = Category.getInstance("JSPWiki"); WikiEngine wiki; %> <% String pagereq = request.getParameter("page"); if( pagereq == null ) { throw new ServletException("No page defined"); } String action = request.getParameter("action"); if( action != null && action.equals("save") ) { log.info("Saving page "+pagereq); // FIXME: I am not entirely sure if the JSP page is the // best place to check for concurrent changes. It certainly // is the best place to show errors, though. long pagedate = Long.parseLong(request.getParameter("edittime")); Date change = wiki.pageLastChanged( pagereq ); if( change != null && change.getTime() != pagedate ) { // // Someone changed the page while we were editing it! // log.info("Page changed, warning user."); // FIXME: This is put into session, but it is probably // a better idea if it's stored in request, but since // the request can be long, we need to POST it. request.getSession().setAttribute("usertext",request.getParameter("text")); response.sendRedirect("PageModified.jsp?page="+pagereq); return; } wiki.saveText( pagereq, request.getParameter("text") ); response.sendRedirect("Wiki.jsp?page="+pagereq); return; } log.info("Editing page "+pagereq+". User="+request.getRemoteUser()+", host="+request.getRemoteHost() ); // // If the page does not exist, we'll get a null here. // long lastchange = 0; Date d = wiki.pageLastChanged( pagereq ); if( d != null ) lastchange = d.getTime(); %> <%=wiki.getApplicationName()%> Edit: <%=pagereq%> <%@ include file="cssinclude.js" %>
<%@ include file="LeftMenu.jsp" %>

Help on editing

<%@ include file="LeftMenuFooter.jsp" %>

Edit page <%=pagereq%>

         Cancel

Here's a short reminder on what elements you have at your disposal:
----Horizontal ruler
{{{, }}}Begin/end code block. (Recommended that you start on a new line.)
\\Forced line break
[link]Create hyperlink to "link", where "link" can be either an internal WikiName or an external link (http://)
[text|link] Create a hyperlink where the link text is different from the actual hyperlink link.
[text|wiki:link] Create a hyperlink where the link text is different from the actual hyperlink link, and the hyperlink points to a named Wiki. This supports interWiki linking.
*Make a bulleted list (must be in first column). Use more (**) for deeper indentations.
#Make a numbered list (must be in first column). Use more (##, ###) for deeper indentations.
!, !!, !!! Start a line with an exclamation mark (!) to make a heading. More exclamation marks mean bigger headings.
__text__Makes text bold.
''text''Makes text in italics.
{{text}}Makes text in monospaced font.

Don't try to use HTML, since it just won't work.

To embed images just put them available on the web using one of the approved formats, and they will get inlined automatically. To see the list of approved formats, go check SystemInfo.