If you edit a generated file or try to store original content in generated modules, you will lose your changes when you regenerate the projects during the build process.
As a best practice, do not store any user logic in generated EJB or Web projects. Rather, create a separate Web project of your own and add it to the application as a dependent of the generated module by following these steps:
Related information