简体   繁体   中英

Maven Struts/JSP login logout sample application?

Does anyone have a simple maven sample Struts/JSP application to login/logout and navigate over a couple of pages to share? Thanks.

I could not find an answer on the net/googling, so I created the project myself as following:

  1. I created a simple maven web application project from NetBeans.
  2. I downloaded the Struts Hello World example from here (see bottom of the page).
  3. I copied the code in the code section of my maven project. Ditto for resources.
  4. Then, I dragged and dropped the content of the /StrutsHelloWord/WebContent/ folder in the /Web Pages folder of my NetBeans projects.
  5. I removed the index.jsp page from my project.
  6. There is a bug in the struts.xml file. The <action name="login" method="authenticate"... line should be corrected to <action name="login" method="execute"...

Then, the project compiled and ran fine.

This project does not include a logout page, but it is a start.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM