This week's book giveaway is in the General Computing forum. We're giving away four copies of Arduino in Action and have Martin Evans, Joshua Noble, and Jordan Hochenbaum on-line! See this thread for details.
I am newbie to Struts 2 and I got error trying to understand and get working on select tag(struts2).
the following is my action class.
the following is my jsp page
If I change <s:select /> to <s:textfield /> the whole thing is working.(if not working error is 404) Or If I do NOT make an object of type "User", I can use <s:select />. (then I can NOT write user object to database).
I do not know where do I get wrong
1). How can I achieve it?
2). Can you recommend me a website or a book to achieve that?
thanks in advance.
Joined: May 17, 2011
Thanks I got that working and for those who struggle like me can have reference ..
I just add a new method called populate() and add the String using List's add method. Do NOT forget to return a string, otherwise, it will stuck on that point.
in struts.xml, you just need to point your newly created method (populate())
and finally in the jsp page, you just prepare the normal select tag as follow