Update of /cvsroot/easystruts/easystruts-website/web
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv435/web
Added Files:
favicon.ico Edit.jsp faq.html Search.jsp Wiki.jsp .htaccess
Error.jsp index.jsp
Log Message:
Added new web site sources and data
--- NEW FILE: favicon.ico ---
(This appears to be a binary file; contents omitted.)
--- NEW FILE: Wiki.jsp ---
<%@ page import="org.apache.log4j.*" %>
<%@ page import="com.ecyrd.jspwiki.*" %>
<%@ page import="com.ecyrd.jspwiki.tags.WikiTagBase" %>
<%@ page import="com.ecyrd.jspwiki.auth.permissions.ViewPermission" %>
<%@ page import="com.ecyrd.jspwiki.auth.*" %>
<%@ page errorPage="/Error.jsp" %>
<%@ taglib uri="/WEB-INF/jspwiki.tld" prefix="wiki" %>
<%!
public void jspInit()
{
wiki = WikiEngine.getInstance( getServletConfig() );
}
Category log = Category.getInstance("JSPWiki");
WikiEngine wiki;
%><%
WikiContext wikiContext = wiki.createContext( request, WikiContext.VIEW );
String pagereq = wikiContext.getPage().getName();
NDC.push( wiki.getApplicationName()+":"+pagereq );
log.info("Request for page '"+pagereq+"' from "+request.getRemoteHost()+" by "+request.getRemoteUser() );
String redirect = wiki.getRedirectURL( wikiContext );
if( redirect != null )
{
response.sendRedirect( redirect );
return;
}
AuthorizationManager mgr = wiki.getAuthorizationManager();
UserProfile currentUser = wiki.getUserManager().getUserProfile( request );
if( !mgr.checkPermission( wikiContext.getPage(),
currentUser,
new ViewPermission() ) )
{
if( mgr.strictLogins() )
{
log.info("User "+currentUser.getName()+" has no access - redirecting to login page.");
String msg = "Unknown user or password.<br>Please try again.";
wikiContext.setVariable( "msg", msg );
String pageurl = wiki.encodeName( pagereq );
response.sendRedirect( wiki.getBaseURL()+"Login.jsp?page="+pageurl );
return;
}
else
{
//
// Do a bit of sanity check here. FIXME: Should this be somewhere else?
//
if( pagereq.equals("LoginError") )
{
throw new WikiSecurityException("Looped config detected - you must not prevent view access to page LoginError AND have strictLogins set to true!");
}
log.info("User "+currentUser.getName()+" has no access - displaying message.");
response.sendRedirect( wiki.getBaseURL()+"Wiki.jsp?page=LoginError" );
}
}
pageContext.setAttribute( WikiTagBase.ATTR_CONTEXT,
wikiContext,
PageContext.REQUEST_SCOPE );
//
// Alright, then start responding.
//
response.setContentType("text/html; charset="+wiki.getContentEncoding() );
String contentPage = "templates/"+wikiContext.getTemplate()+"/ViewTemplate.jsp";
%><wiki:Include page="<%=contentPage%>" /><%
NDC.pop();
NDC.remove();
%>
--- NEW FILE: Edit.jsp ---
<jsp:forward page="Wiki.jsp"/>
--- NEW FILE: Error.jsp ---
<%@ page isErrorPage="true" %>
<%@ page import="org.apache.log4j.*" %>
<%@ page import="com.ecyrd.jspwiki.*" %>
<%@ page import="com.ecyrd.jspwiki.tags.WikiTagBase" %>
<%@ taglib uri="/WEB-INF/jspwiki.tld" prefix="wiki" %>
<%!
public void jspInit()
{
wiki = WikiEngine.getInstance( getServletConfig() );
}
Category log = Category.getInstance("JSPWiki");
WikiEngine wiki;
%>
<%
WikiContext wikiContext = wiki.createContext( request,
WikiContext.ERROR );
String pagereq = wikiContext.getPage().getName();
NDC.push( wiki.getApplicationName() + ":" + pagereq );
pageContext.setAttribute( WikiTagBase.ATTR_CONTEXT,
wikiContext,
PageContext.REQUEST_SCOPE );
response.setContentType("text/html; charset="+wiki.getContentEncoding() );
String msg = "An unknown error was caught by Error.jsp";
if( exception != null )
{
msg = exception.getMessage();
if( msg == null || msg.length() == 0 )
{
msg = "An unknown exception "+exception.getClass().getName()+" was caught by Error.jsp.";
}
}
log.debug("Error.jsp exception is: ",exception);
//
// This allows us to get the actual cause of the exception.
// Note the cast; at least Tomcat has two classes called "JspException"
// imported in JSP pages.
//
Throwable realcause = null;
if( exception instanceof javax.servlet.jsp.JspException )
{
log.debug("IS JSPEXCEPTION");
realcause = ((javax.servlet.jsp.JspException)exception).getRootCause();
log.debug("REALCAUSE="+realcause);
}
if( realcause == null ) realcause = exception;
pageContext.setAttribute( "message", msg, PageContext.REQUEST_SCOPE );
%>
<h3>JSPWiki has detected an error</h3>
<dl>
<dt><b>Error Message</b></dt>
<dd>
<%=pageContext.getAttribute("message",PageContext.REQUEST_SCOPE)%>
</dd>
<dt><b>Exception</b></dt>
<dd><%=realcause.getClass().getName()%></dd>
<dt><b>Place where detected</b></dt>
<dd><%=FileUtil.getThrowingMethod(realcause)%></dd>
</dl>
<p>
If you have changed the templates, please do check them. This error message
may show up because of that. If you have not changed them, and you are
either installing JSPWiki for the first time or have changed configuration,
then you might want to check your configuration files. If you are absolutely sure
that JSPWiki was running quite okay or you can't figure out what is going
on, then by all means, come over to <a href="http://www.jspwiki.org/">jspwiki.org</a>
and tell us. There is more information in the log file (like the full stack trace,
which you should add to any error report).
</p>
<p>
And don't worry - it's just a computer program. Nothing really
serious is probably going on: at worst you can lose a few nights
sleep. It's not like it's the end of the world.
</p>
<br clear="all" />
<%
NDC.pop();
NDC.remove();
%>
--- NEW FILE: .htaccess ---
Options -Indexes
--- NEW FILE: index.jsp ---
<jsp:forward page="Wiki.jsp"/>
--- NEW FILE: faq.html ---
<html>
<head>
<title>Easy Struts</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" href="style/easystruts.css" type="text/css">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<table width="900" border="0">
<tr>
<td height="9" width="64%"><span class="grand"> Easy Struts - F.A.Q.</span></td>
<td height="9" width="218"><img src="images/easystruts/new-actionform-med.gif" width="31" height="32">
<img src="images/easystruts/new-action-med.gif" width="31" height="32">
<img src="images/easystruts/new-ds-med.gif" width="32" height="32"> <img src="images/easystruts/new-form-med.gif" width="31" height="32">
<img src="images/easystruts/new-resources-med.gif" width="31" height="32">
<img src="images/easystruts/new-forward-med.gif" width="31" height="32"></td>
<td height="9" width="12%"><span class="inforouge"></span><span class="grand"></span></td>
</tr>
<tr bordercolor="#000000">
<td align="right" valign="middle" height="19" width="260"> </td>
<td align="right" valign="middle" height="19" width="348" class="petitnoir">
<a href="index.html">HOME</a> | <a href="CHANGES.TXT"> LOGS</a> | <a href="EASYSTRUTS-LICENSE.TXT">LICENSE</a></td>
<td align="left" valign="middle" height="19" width="268"> </td>
</tr>
<tr>
<td height="466" colspan="2" align="center" valign="top"> <p align="left">
<hr>
<div align="left">
<p class="normalnoir"><img src="images/easystruts/forward-editor.gif" width="16" height="16">
<a href="#1">What is Struts ?</a><br>
<img src="images/easystruts/forward-editor.gif" width="16" height="16">
<a href="#2">What is Eclipse ?</a> <br>
<img src="images/easystruts/forward-editor.gif" width="16" height="16">
<a href="#3">What is Easy Struts plugin?</a> <br>
<img src="images/easystruts/forward-editor.gif" width="16" height="16">
<a href="#4">How can I install Easy Struts plugin ?</a><br>
<img src="images/easystruts/forward-editor.gif" width="16" height="16">
<a href="#5">I've installed Easy Struts plugin but I can't see Easy
Struts in Eclipse !</a> <br>
<img src="images/easystruts/forward-editor.gif" width="16" height="16">
<a href="#7">Easy Struts view is not synchronised !</a><br>
<img src="images/easystruts/forward-editor.gif" width="16" height="16">
<a href="#6">I've found a Bug... ! </a></p>
<p class="petitnoir"><span class="titre"> <br>
</span></p>
<p class="petitnoir"><br>
<img src="images/easystruts/forward-editor.gif" width="16" height="16">
<span class="titre">What is Struts ?</span><a name="1"></a><br>
<span class="petitnoir"><br>
Struts is a framework from the Apache Software Foundation, the goal
is to provide a (FREE and OPENSOURCE) MVC2 implementation for web application,
more information on <a href="http://jakarta.apache.org/struts" target="_blank">http://jakarta.apache.org/struts</a>.
You can also check the book <a href="http://www.amazon.com/exec/obidos/ASIN/1930110502/easystrutspro-20/102-0806726-6408966" target="_blank">Java
Web Development With Struts</a> written by some Struts Committers.</span></p>
<p class="petitnoir"><br>
<br>
<img src="images/easystruts/forward-editor.gif" width="16" height="16">
<span class="titre">What is Eclipse ?</span><a name="2" id="2"></a><br>
<span class="petitnoir"><br>
Perhaps you need to read <a href="http://www.eclipse.org/org/index.html" target="_blank">http://www.eclipse.org/org/index.html</a>
;)</span></p>
<p class="petitnoir"></p>
<p class="petitnoir"><br>
<img src="images/easystruts/forward-editor.gif" width="16" height="16">
<span class="titre">What is Easy Struts plugin?</span><a name="3" id="3"></a><br>
<span class="petitnoir"><br>
Easy Strut is a plugin for Eclipse, the goal is to provide a set of
IDE tools for Struts developpement. Theses tools are wizards, code generator,
editors, views... <em>This project is inspired from <a href="http://www.jamesholmes.com/struts" target="_blank">struts-console</a>
who provide Struts support in many other IDE.</em></span></p>
<p class="petitnoir"></p>
<p class="petitnoir"><img src="images/easystruts/forward-editor.gif" width="16" height="16">
<span class="titre">How can I install Easy Struts plugin</span><a name="4" id="4"></a><br>
<span class="petitnoir"><br>
There is two way to install Easy Struts. With the Eclipse Update Manager
(This way won't work with some Firewall) or donwload the latest release,
unzip and copy the directory (in bold) <where you unzip the file>\easystruts-eclipse_X.X.X\plugins<strong>\com.cross.easystruts.eclipse_X.X.X</strong>
in your <strong><eclipse>\plugins</strong> directory. </span><br>
After launch Eclipse, if Easy Struts appears in Eclipse preference,
let' rock...<br>
</p>
<p class="petitnoir"><br>
<img src="images/easystruts/forward-editor.gif" width="16" height="16">
<span class="titre">I've installed Easy Struts plugin but I can't see
Easy Struts in Eclipse</span><a name="5" id="5"></a><br>
<span class="petitnoir"><br>
Easy Struts require <a href="http://www.eclipse.org/pde/index.html" target="_blank">PDE
plugins</a>, this plugin can be found in <a href="http://www.eclipse.org/downloads/index.php" target="_blank">Eclipse
SDK</a> distribution. If you have this plugin and Easy Struts won't
work, consult ths file <eclipse>\workspace\.metadata\.log. </span>...
and see <a href="#6">next question</a>.</p>
<p class="petitnoir"><img src="images/easystruts/forward-editor.gif" width="16" height="16">
<span class="titre">Easy Struts view is not synchronised !</span><a name="7" id="7"></a></p>
<p class="petitnoir">Hit F5 to refresh tree (for example after removing
a java project or manually adding a Struts 1.1 module in web.xml).</p>
<p><img src="images/easystruts/forward-editor.gif" width="16" height="16">
<span class="titre">I've found a Bug...!<a name="6" id="6"></a></span></p>
<p class="petitnoir">Easy Struts is on developpement so there is many
bug, I've got "normal" a <a href="http://www.cross-systems.com" target="_blank">work</a>
and I can't work full-time on Easy Struts... Report all bugs in <a href="http://sourceforge.net/tracker/?atid=474084&group_id=54542&func=browse" target="_blank">SourceForge
bug repport tools</a>, inforation needed : Eclipse version, Easy Strut
version, Platform, entries in your <span class="petitnoir"><eclipse>\workspace\.metadata\.log</span>
and all other informations you have... and be patient.</p>
<p class="petitnoir"><br>
<br>
<img src="images/easystruts/forward-editor.gif" width="16" height="16">
<span class="titre">To be continued...!</span> </p>
<p> </p>
</div>
</td>
<td width="12%" rowspan="2"> </td>
</tr>
<tr>
<td height="53" colspan="2" align="center" valign="bottom"> </td>
</tr>
<tr align="center">
<td colspan="2" class="petitgris">Copyright © 2002 Easy Struts - contact
: <a href="mailto:e.b...@cr...">e.b...@us...</a>
<br>
JBuilder is a trademark of Borland Software Corporation in the United States
and other countries. </td>
<td class="petitgris"> </td>
</tr>
</table>
</body>
</html>
--- NEW FILE: Search.jsp ---
<%@ page import="org.apache.log4j.*" %>
<%@ page import="com.ecyrd.jspwiki.*" %>
<%@ page import="java.util.*" %>
<%@ page import="com.ecyrd.jspwiki.tags.WikiTagBase" %>
<%@ page errorPage="/Error.jsp" %>
<%@ taglib uri="/WEB-INF/jspwiki.tld" prefix="wiki" %>
<%!
public void jspInit()
{
wiki = WikiEngine.getInstance( getServletConfig() );
}
Category log = Category.getInstance("JSPWikiSearch");
WikiEngine wiki;
%>
<%
WikiContext wikiContext = wiki.createContext( request, WikiContext.FIND );
String pagereq = wikiContext.getPage().getName();
NDC.push( wiki.getApplicationName()+":"+pagereq );
String query = wiki.safeGetParameter( request, "query");
Collection list = null;
pageContext.setAttribute( WikiTagBase.ATTR_CONTEXT,
wikiContext,
PageContext.REQUEST_SCOPE );
response.setContentType("text/html; charset="+wiki.getContentEncoding() );
if( query != null )
{
log.info("Searching for string "+query);
list = wiki.findPages( query );
pageContext.setAttribute( "searchresults",
list,
PageContext.REQUEST_SCOPE );
pageContext.setAttribute( "query",
query,
PageContext.REQUEST_SCOPE );
log.info("Found "+list.size()+" pages");
}
String contentPage = "templates/"+wikiContext.getTemplate()+"/ViewTemplate.jsp";
%>
<wiki:Include page="<%=contentPage%>" />
<%
NDC.pop();
NDC.remove();
%>
|