Save and Logout

Hi Experts,

I am developing an application on Spring MVC with tiles. The top tile has a logout button. When I click on that button, I would like to save the data on the page and then logout.

Note: The logout button is common for all pages displaying on the main tile. Please help me with code samples and flow.
vijayprabakarAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Sathish David Kumar NArchitectCommented:
Define like this
 in your tiles-layout.xml

<definition name="baseLayout" path="/jsp/layout.jsp">
            <put name="header" value="/jsp/header.jsp" /> //-----------> ur logout button and menu are put this jsp
            <put name="footer" value="/jsp/footer.jsp" />//--------? copyrights
      </definition>
Sathish David Kumar NArchitectCommented:
then it will come to all ur page .
vijayprabakarAuthor Commented:
While clicking on logout button, it should display a popup and ask the user, whether to save the data. If yes, it has to save the complete/partial data to the database and logout.
Become a Certified Penetration Testing Engineer

This CPTE Certified Penetration Testing Engineer course covers everything you need to know about becoming a Certified Penetration Testing Engineer. Career Path: Professional roles include Ethical Hackers, Security Consultants, System Administrators, and Chief Security Officers.

Sathish David Kumar NArchitectCommented:
Right this code inside your logout function
var answer = confirm ("Please click on OK to continue  Save the data, or CANCEL");
if (answer)
      {
var importdata =document.getElementsByTagName("form").value;  

      document.importdata.action="";
      document.importdata.submit();
      }

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
vijayprabakarAuthor Commented:
I will check and come back to you.
Kevin CrossChief Technology OfficerCommented:
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Java EE

From novice to tech pro — start learning today.