File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Spring and the fly likes html view resolver Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "html view resolver" Watch "html view resolver" New topic

html view resolver

John Eric Hamacher
Ranch Hand

Joined: Apr 25, 2007
Posts: 230

I am attempting to write a web app without JSPs, just HTML and ajax. I am trying to use Spring 3 MVC. I am having trouble resolving HTML views . . .
I need something like :

But this doesn't work. Wondering how to resolve static content. Thanks. Eric.
Mark Spritzler

Joined: Feb 05, 2001
Posts: 17276

How does it not work? What error or exception are you getting? What does your Controller code return?



Perfect World Programming, LLC - iOS Apps
How to Ask Questions the Smart Way FAQ
Albert Liptay

Joined: Sep 04, 2011
Posts: 3
Alas, 1 year later I'm trying to do the same thing.

I'm on this contract where the UI designer does not and will not fire up a web app in eclipse to make changes. So I'm trying to architect a solution whereby the static code loads from the file system, a kinda pure HTML.

I'm willing to for go MVC, and java templating engines, however I cannot find any precedence. I've read up on a templating engine called Thymeleaf which probably would give me much needed mileage.

For now, we're trying static html using jQuery to populate selects and forms after the page load. Essentially forgoing any traditional servlet based controllers, except for the RestEasy service points to serve JSON

Wish me luck.
Mark Spritzler

Joined: Feb 05, 2001
Posts: 17276

I really like ICanHaz.js for templating, it is built on top of mustache.js Makes it very simple to render the template on the client side in javascript with just one line of code


returns the html of the rendered template.


var contents = ich['templateName](dataInJSonFormat);

subject: html view resolver
It's not a secret anymore!