struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From José Antonio Delgado Trujillo <jadt...@gmail.com>
Subject Re: Convention plugin
Date Fri, 25 Mar 2016 12:39:08 GMT

> On 25 Mar 2016, at 06:29, Lukasz Lenart <lukaszlenart@apache.org> wrote:
> 
> I don't really understand what do you mean by that,


In the example annotations there are two index.jsp files (one in the /webapp and another in
/webapp/content).

The first redirect the response to “index”
i suppose that this redirect to /webapp/content/index.jsp (but i don’t know why).

In hello-success.jsp and register-success.jsp they are URL action to index.
There isn’t IndexAction class so i don’t know what the framework will do by default.
I read the convention plugin documentation i understood the next:

action url -> hello
action class -> */actions/HelloAction.class
(result=input), response -> /webapp/content/hello-input.jsp

But what happens if the framework doesn’t find the action class.


In my case i had the action class in the package /pfc/struts2/annotations/actions so i had
to use the namespace=/annotations/actions in the url and i put the jsp in /webapp/content/annotations/actions
The url index in jsp files doesn’t go to /webapp/index.

Un saludo,
José A



 
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message