View .HTML with VRaptor. It's possible?

3

I'm a Systems Analysis and Development student and I love programming, I've studied the basics of Java and I'm working on frameworks just to get a feel for it. How do I return an HTML page in a controller with VRptor instead of JSP.

I'm doing some testing with REST and did not want to use JSP. With Spring boot, I got only by returning a String : return "index.html" . With VRaptor I have not found a way yet. It's possible? How?

    
asked by anonymous 21.01.2015 / 17:36

2 answers

3

If you use result.forwardTo("/minhapagina.html"); in the controller it works, but it makes more sense to use the JSP that allows you to create Java code within HTML, that is, dynamic pages.

    
28.05.2015 / 22:12
0

Yes, just use result.redirectTo("/index.html"); or result.forwardTo("/index.html"); in the same Controller, which it will redirect to you, but as @haykou said, it would be more convenient to use the JSP, but nothing prevents the use of HTML, php, or other extensions, as long as you treat Controller like that.

    
15.07.2015 / 21:46