Submitted by heartin on Sat, 05/16/2015 - 22:53
Implement a project with basic linked list operations in Java:
Steps:
-
Create a Node class with two elements:
-
int data
-
Node next
-
Create an interface MyList with three operations:
-
void add(int data) - Add a new node to the end of linked list.
-
void insert(int location, int data) - Add a new node to the given index location in a linked list.
-
void display() - Traverse and print data in every node in the linked.
Submitted by heartin on Sat, 04/18/2015 - 10:14
-
FORM Based Authentication - Without Container Template
-
Create a Dynamic Web Project with a web.xml file; name it as ServletSecurity.
-
Create a servlet RestrictedServlet with url pattern “/RestrictedServlet” that print “Restricted Servlet” to client.
-
Create a servlet LoginServlet with url pattern “/LoginServlet” that gets the username and password from client and validate it against a dummy hashmap of username and password.
Submitted by heartin on Fri, 04/10/2015 - 20:17
JSPs allow you to write html, css, javascript etc. just as if you were writing an html file. JSPs can be considered as html pages (except for the .jsp extension and some extra lines) with some java code inside. JSPs may also contain no Java at all. In this example we will create our first JSP page, deploy it on Apache Tomcat and then runt it.
Prerequisites
Submitted by heartin on Fri, 04/10/2015 - 09:17
-
JSP Scripting Elements
-
Do the following with only JSPs (and no servlets) and using JSP scripting elements
-
Create a method that take two int numbers and return their sum as int.
-
Invoke the method from within template text using JSP elements (example o/p - Sum of 3 and 4 is 7.)
-
Print above line to console as well using JSP elements.
-
Deploy the project into tomcat, restart server and compare the source jsp with the generated servlet.
-
Use Resteasy instead of Jersey in one of the examples.
Pages