|
21 | 21 | import org.slf4j.LoggerFactory; |
22 | 22 |
|
23 | 23 | import java.io.BufferedReader; |
24 | | -import java.io.File; |
25 | 24 | import java.io.FileNotFoundException; |
26 | 25 | import java.io.FileReader; |
27 | 26 | import java.io.InputStreamReader; |
@@ -399,7 +398,7 @@ public String getHint(WebSession s, int hintNumber) { |
399 | 398 | * |
400 | 399 | * @return The lessonPlan value |
401 | 400 | */ |
402 | | - protected String getLessonName() { |
| 401 | + public String getLessonName() { |
403 | 402 | return this.getClass().getSimpleName(); |
404 | 403 | } |
405 | 404 |
|
@@ -991,57 +990,7 @@ protected LabelManager getLabelManager() { |
991 | 990 | return labelManager; |
992 | 991 | } |
993 | 992 |
|
994 | | - /** |
995 | | - * A reference from an image, script and link tag must include the context path. |
996 | | - * <p> |
997 | | - * A reference in include directives are made from within the web application on the server. |
998 | | - * However, img tags (and the like) make references from the client browser. |
999 | | - * In such external references, the context path must be included. |
1000 | | - * |
1001 | | - * @param w a {@link org.owasp.webgoat.session.WebSession} object. |
1002 | | - * @param imgResourceName a {@link java.lang.String} object. |
1003 | | - * @return a {@link java.lang.String} object. |
1004 | | - */ |
1005 | | - protected final String buildImagePath(WebSession w, String imgResourceName) { |
1006 | | - return w.getRequest() |
1007 | | - .getContextPath() + "/plugin_extracted/plugin/" + getLessonName() + "/images/" + imgResourceName; |
1008 | | - } |
1009 | | - |
1010 | | - |
1011 | | - /** |
1012 | | - * <p>buildJspPath.</p> |
1013 | | - * |
1014 | | - * @param w a {@link org.owasp.webgoat.session.WebSession} object. |
1015 | | - * @param jspResourceName a {@link java.lang.String} object. |
1016 | | - * @param includeContextPath a boolean. |
1017 | | - * @return a {@link java.lang.String} object. |
1018 | | - */ |
1019 | | - protected final String buildJspPath(WebSession w, String jspResourceName, boolean includeContextPath) { |
1020 | | - String path = includeContextPath ? w.getContext().getContextPath() : ""; |
1021 | | - return path + "/plugin_extracted/plugin/" + getLessonName() + "/jsp/" + jspResourceName; |
1022 | | - } |
1023 | 993 |
|
1024 | | - /** |
1025 | | - * <p>buildJsPath.</p> |
1026 | | - * |
1027 | | - * @param w a {@link org.owasp.webgoat.session.WebSession} object. |
1028 | | - * @param jsResourceName a {@link java.lang.String} object. |
1029 | | - * @return a {@link java.lang.String} object. |
1030 | | - */ |
1031 | | - protected final String buildJsPath(WebSession w, String jsResourceName) { |
1032 | | - return w.getRequest() |
1033 | | - .getContextPath() + "/plugin_extracted/plugin/" + getLessonName() + "/js/" + jsResourceName; |
1034 | | - } |
1035 | | - |
1036 | | - /** |
1037 | | - * <p>getLessonDirectory.</p> |
1038 | | - * |
1039 | | - * @param w a {@link org.owasp.webgoat.session.WebSession} object. |
1040 | | - * @return a {@link java.io.File} object. |
1041 | | - */ |
1042 | | - protected final File getLessonDirectory(WebSession w) { |
1043 | | - return new File(w.getContext().getRealPath("/plugin_extracted/plugin/" + getLessonName() + "/")); |
1044 | | - } |
1045 | 994 |
|
1046 | 995 |
|
1047 | 996 | } |
0 commit comments