When you are working with jsp & servlets you need to go from one page to another & that page may be a jsp, servlet, java page or html page. Well I know how I suffered from those basic stuff when I am at the basics. So to make you feel better let me give some hints on those conversions.
Here the form action will be the page you need to go after a submit. Here the servlet page is newservlet.java.
- HTML to Sevlet
Here the form action will be the page you need to go after a submit. Here the servlet page is newservlet.java.
- JSP to Servlet
This jsp:include will make a jsp page request to go to a servlet & do the logic within the request & return the values will be return to the jsp page again.
- JSP to JSP
The jsp:forward command will redirect the current page to another page (newjsp.jsp).
- Servlet to JSP/HTML
response.SendRedirect(response.encodedRedirect(des));
Another way.
RequestDispatcher dispatcher = getServletContext().getRequestDispatcher("/testin.html");
Dispatcher.include(request,response);
So hope you find this post helpful for you to begin work. :)
how to get current month from system & how to display the number of weeks in that month in jsp, servlets?
ReplyDelete