Maven Struts/JSP login logout sample application?
Does anyone have a simple maven sample Struts/JSP application to l开发者_如何学Pythonogin/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:
- I created a simple maven web application project from NetBeans.
- I downloaded the Struts Hello World example from here (see bottom of the page).
- I copied the code in the code section of my maven project. Ditto for resources.
- Then, I dragged and dropped the content of the
/StrutsHelloWord/WebContent/
folder in the/Web Pages
folder of my NetBeans projects. - I removed the
index.jsp
page from my project. - 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.
精彩评论