0

I am working on a web project. The login HTML page has 5 buttons like search, edit, create, delete, get. There is a text box where I give the string to search/edit/delete from the database. The create button when clicked will be redirected to a new page and a servlet handles the logic for that page. I have a servlet for login page which does the redirection based on button clicks. I have created servlets for the delete, search, edit functionality. However, I don't have separate html pages for the delete, search, get buttons. I used a request dispatcher servlet and am successfully able to enter to those corresponding servlets based on the clicks. But how should my web.xml be for the url mappings? I am using just HTML and Servlets. Also the final output should be displayed based on freemarker template engine. I am getting an error at this point. The freemarker is showing a Class File Error.

Any suggestions on how this should be called?

BalusC
  • 1,082,665
  • 372
  • 3,610
  • 3,555
Sri
  • 573
  • 2
  • 6
  • 20

1 Answers1

0

Disclaimer: I am not an expert at this, but I do know how PHP and Smarty works.

I would think in each respective servlet, you would specify what template you want to use. request.getRequestDispatcher(TEMPLATE).forward(request, response); where I earlier determined which .ftl template to use.

There is probably more to what I have done (I don't understand it all, yet) that I have failed to mention.

bsmither
  • 48
  • 6