Are you sure that you use the latest version from Git? Because
webapp/index.jsp looks like this

<% response.sendRedirect("/index"); %>

see and I have no problems on Jetty (mvn jetty:run)

[1]
https://github.com/apache/struts-examples/blob/master/annotations/src/main/webapp/index.jsp


Regards
-- 
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/

2015-11-09 20:00 GMT+01:00 José Antonio Delgado Trujillo <jadt...@gmail.com>
:

> I don`t know what is the problem.
> It’s the example annotations of Getting Started Tutorial.
>
> https://github.com/apache/struts-examples/tree/master/annotations
>
>
>
>    - Convention plugin is set enable with maven dependency.
>    - all jsp are into /WEB-INF/content folder
>    - The action class are into package structure that ends in action.
>    - The action class use the name of the action ending in Action.
>
>
> The example use the url
> http:localhost:8080/annotations
>
> There is a welcome file index.jsp into /webapp folder but these file only
> resend the request to /index.jsp
>
>
> And into the /WEB-INF/content is another index.jsp which has the index of
> the application (in this case two link associated with two actions.
>
>
> I put in the browser http://localhost/annotations but the response is
> 404 - NOT FOUND
> and i saw in the browser the URL
> Why it does´t find index.jsp
>
> I thought reading the convention plugin documentation that…
> the action index is an actionless result (has neither action class nor
> result) so by default the convention plugin look into
> /WEB-INF/content/index.jsp
>
> What is happening?
> Why the error message NOT FOUND?
>
>
> On 09 Nov 2015, at 07:02, Lukasz Lenart <lukaszlen...@apache.org> wrote:
>
> 2015-11-08 22:03 GMT+01:00 José Antonio Delgado Trujillo <
> jadt...@gmail.com>:
>
> I’ve problem with the annotation example.
>
> I’ve added the convention-plugin dependency in my POM.
> But when i put localhost:8080/annotations/index tsp the result is NOT
> FOUND PAGE
>
> However when i copy the index.jsp in /src/main/webapp all is correct.
> ....
> What is happening?
>
>
> but it works now, right? Not sure what was your problem, all JSP files
> should be located in /WEB-INF/content and they will be used based on
> requested action and returned result
>
>
> http://struts.apache.org/docs/convention-plugin.html#ConventionPlugin-Resultsandresultcodes
>
>
> Regards
> --
> Łukasz
> + 48 606 323 122 http://www.lenart.org.pl/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
>
>

Reply via email to