Added bug report

Added message for missing solutions
Minor edits to lesson plans

git-svn-id: http://webgoat.googlecode.com/svn/trunk/webgoat@353 4033779f-a91e-0410-96ef-6bf7bf53c507
This commit is contained in:
mayhew64
2008-07-11 00:05:05 +00:00
parent 536d29e78a
commit 084c43381b
9 changed files with 61 additions and 19 deletions

View File

@ -500,10 +500,13 @@ public abstract class AbstractLesson extends Screen implements Comparable<Object
// that performs the convertMetacharsJavaCode() transform plus
// optionally adds a styled
// line number. Wouldn't color syntax be great too?
} catch (IOException e)
} catch (Exception e)
{
s.setMessage("Could not find source file");
src = ("Could not find source file");
src = ("Could not find the source file or source file does not exist.<br/>"
+ "Send this message to: <a href=\"mailto:" + s.getWebgoatContext().getFeedbackAddress() + "?subject=Source "
+ getSourceFileName() + " not found. Lesson: " + s.getCurrentLesson().getLessonName() + "\">" +
s.getWebgoatContext().getFeedbackAddress() + "</a>");
}
Html html = new Html();
@ -530,10 +533,13 @@ public abstract class AbstractLesson extends Screen implements Comparable<Object
{
System.out.println("Solution: " + getLessonSolutionFileName());
src = readFromFile(new BufferedReader(new FileReader(s.getWebResource(getLessonSolutionFileName()))), false);
} catch (IOException e)
} catch (Exception e)
{
s.setMessage("Could not find the solution file");
src = ("Could not find the solution file");
src = ("Could not find the solution file or solution file does not exist.<br/>"
+ "Send this message to: <a href=\"mailto:" + s.getWebgoatContext().getFeedbackAddress() + "?subject=Solution "
+ getLessonSolutionFileName() + " not found. Lesson: " + s.getCurrentLesson().getLessonName() + "\">" +
s.getWebgoatContext().getFeedbackAddress() + "</a>");
}
Html html = new Html();

View File

@ -73,7 +73,7 @@ public abstract class LessonAdapter extends AbstractLesson
+ "In fact, most lessons can be created by following the easy to use instructions in the "
+ "<A HREF=http://www.owasp.org/index.php/WebGoat_User_and_Install_Guide_Table_of_Contents>WebGoat User Guide.</A>&nbsp;&nbsp;"
+ "If you would prefer, send your lesson ideas to "
+ getWebgoatContext().getFeedbackAddress()));
+ getWebgoatContext().getFeedbackAddressHTML()));
String fileName = s.getContext().getRealPath("doc/New Lesson Instructions.txt");
if (fileName != null)

View File

@ -101,7 +101,7 @@ public class ReportCardScreen extends LessonAdapter
{
ElementContainer ec = new ElementContainer();
ec.addElement(new StringElement("Comments and suggestions are welcome. "
+ getWebgoatContext().getFeedbackAddress() + "<br><br>"));
+ getWebgoatContext().getFeedbackAddressHTML() + "<br><br>"));
return ec;
}