Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 844b628

Browse files
Added UtilHelper folder in the MVCPractice section of a small course on Java EE
1 parent 19c7c4a commit 844b628

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
package PartThree.UtilHelper;
2+
3+
import lombok.experimental.UtilityClass;
4+
@UtilityClass
5+
public class JspPathHelper {
6+
private static final String JSP_FORMAT = "/WEB-INF/jsp/%s.jsp";
7+
private static final String JSTL_FORMAT = "/WEB-INF/JstlDemo/%s.jsp";
8+
private static final String JST_FORMS_FORMAT = "/WEB-INF/jspForms/%s.jsp";
9+
public static String getJspPath (String jspPageName){
10+
return String.format(JSP_FORMAT, jspPageName);
11+
}
12+
public static String getJstlDempPath (String jstlPageName){
13+
return String.format(JSTL_FORMAT, jstlPageName);
14+
}
15+
16+
public static String getJspFormPath (String jstFormPage){
17+
return String.format(JST_FORMS_FORMAT, jstFormPage);
18+
}
19+
}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /