wood burning stoves*
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


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "html view resolver" Watch "html view resolver" New topic
Author

html view resolver

John Eric Hamacher
Ranch Hand

Joined: Apr 25, 2007
Posts: 230
Hello:

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
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17260
    
    6

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

Thanks

Mark


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
Albert Liptay
Greenhorn

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
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17260
    
    6

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

ich['templateName](dataInJSonFormat);

returns the html of the rendered template.

so

var contents = ich['templateName](dataInJSonFormat);
$("#someDivId).html(contents);

Mark
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: html view resolver