Created
January 11, 2018 07:09
-
-
Save raunakhajela/3148865a34dec80c3e4be18843a0b228 to your computer and use it in GitHub Desktop.
JSP: Call Java Class from JSP
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<%@ page import="com.jspDemo.jsp.*, java.util.ArrayList" %> | |
<html> | |
<body> | |
Let's have some fun": <%= FunUtils.makeItLower("Hello JSP Classes") %> | |
</body> | |
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*To create a package go to Java Resources/src right click and click new and choose "Package" and provide your package name*/ | |
/*To create your class right click on your created package, click New and choose "Class"*/ | |
package com.jspDemo.jsp; | |
public class FunUtils { | |
public static String makeItLower(String data){ | |
return data.toLowerCase(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment