How to make an ActionBean instantly created, but not after I call one of the handlers?

I am trying to do something simple using Stripes. I read a lot and heard a lot about the ease of using this structure and the steep learning curve (i.e., learning is pretty fast and productive).

But up to this point, I can’t even create the simplest HelloWorld with Stripes.

All the examples that I found demonstrate functions such as: "click on the link → see the result." When we click on the link, a special handler (which returns Resolution) is called , and after that getters also work (since the bean is created).

But if I don’t need a link, but I want simple static information (for example, when I open StackOverflow, I don’t need to click a link, but I see a list of questions right away), then this is something not trivial for Stripes, as it seems to me, because a bean is not created immediately.

How to fix it? Is there any special annotation or other technique?

Has anyone here tried Stripes and encountered the same problem? I am very upset, maybe I missed something.

UPD: perhaps this is incomprehensible because I did not add any code. Therefore, I describe a little more. To reproduce my situation, it is enough to get the QuickStart code and try to extract the text from the ActionBean gates (currently the text is hardcoded in jsp). The text will appear only after clicking the button (i.e., after the handler does some work). But after you first open the page, you will not see the text.

+3
source share
1 answer

MVC (. http://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller)? MVC - JSP . www.myservername.com/myjsp.jsp. www.myservername.com/mything.action. Stripes , , JSP.

, JSP. , .

, , www.myservername.com, web.xml. -

<welcome-file>index.jsp</welcome-file>

(, jsp )

index.jsp 1- :

<jsp:forward page="myaction.action"/>

, - , index.jsp, , . jsp, - .

+5

Source: https://habr.com/ru/post/1750923/


All Articles