Mercurial Hosting > nabble
view src/nabble/view/web/help/Answer.jtp @ 62:4674ed7d56df default tip
remove n2
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Sat, 30 Sep 2023 20:25:29 -0600 |
parents | 7ecd1a4ef557 |
children |
line wrap: on
line source
<% package nabble.view.web.help; import fschmidt.util.servlet.JtpContext; import nabble.view.lib.Cache; import nabble.view.lib.Jtp; import nabble.view.lib.Shared; import nabble.view.lib.help.Help; import javax.servlet.ServletException; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import java.io.IOException; import java.io.PrintWriter; public class Answer extends HttpServlet { protected void service(HttpServletRequest request,HttpServletResponse response) throws ServletException, IOException { JtpContext jtpContext = (JtpContext)getServletContext().getAttribute(JtpContext.attrName); jtpContext.setEtag(request,response); PrintWriter out = response.getWriter(); Help help = Help.getHelp(Jtp.getInt(request,"id")); if (help == null) { Shared.simplePage("Invalid Help Article", null, "Invalid Help Article", "The help article you are trying to open doesn't exist or was removed.<br>Please contact Nabble Support if you need help.", request, response); return; } String metaDescription = help.getMetaDescription(); String metaKeywords = help.getMetaKeywords(); %> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <% if (metaDescription != null) { %><META NAME="description" CONTENT="<%=metaDescription%>"><% } %> <% if (metaKeywords != null) { %><META NAME="keywords" CONTENT="<%=metaKeywords%>"><% } %> <% Shared.canonical(request, response); %> <% Shared.title(request,response,"Help - "+help.question); %> </head> <body> <% Shared.helpHeader(request,response); %> <div class="content-description"> <h1><%=help.question%></h1> <%=help.answer()%> <p>If you still have questions, visit <a href="<%=Jtp.helpIndexUrl(request,response)%>">Nabble Help</a> or the <%=Jtp.supportLink()%> forum.</p> <p><br />« <a href="javascript:history.back();">Go Back</a></p> </div> <% Shared.footer(request,response); %> <% Shared.analytics(request,response); %> </body> </html> <% } } %>