I'm new in XSLT and I would know what is the best solution to integrate XSLT into Spring web application. I found quick example here, but all in all I had troubles with proper character encoding and switching to Saxon processor (I refer to my former questions here and here). In book: 'Spring in Action' is described solution by extending AbstractXsltView. Is better way than AbstractXsltView which would let me choose Saxon processor? Is better way than execute transformation from .jsp files?
There's an old IBM DeveloperWorks JSTL primer on doing transformations through JSP using the <x:transform> tag of JSTL. This would be a much simpler approach, but may not allow Saxon.
Related
I am trying to find out how to use SpEL (or any other expression language) in my Quarkus applications to handle basic object transformation via injected configuration (and run on Graal).
I am not sure if/what is possible here and I cant find much in the way of docs or how-tos.
I see that this can be possibly be used via the Apache Camel extension, but right now that would be overkill for this requirement.
Any pointers or guidance would be appreciated.
Thanks.
Not much - I cant find docs, examples or howtos for this anywhere.
This is not supported in core Quarkus
I want to create web-site with Spring back-end, but I can't choose what view technology to use: JSP, Velocity, or I should try to integrate JSF with my app. Which of this technologies is the most popular?
Looks like that JSP is a quite deprecated technology, but I hasn't found a proof of this thesis yet. Should I learn JSP, or try some another framework?
I´d use JSP+JSTL+Tiles, but mainly because everybody knows them. I could consider to use Freemarker or Velocity (Specially the first). However, I think Spring MVC and JSF are technologies that overlap, and using them together could be useless and dangerous.
I recommend you to take a look at this: http://docs.spring.io/autorepo/docs/spring/3.2.x/spring-framework-reference/html/view.html
And also at this: http://ihatejsf.com/
i was using JSP and YUI with spring applications
and i want to use a new presentation layer like IceFaces or GWT or any other good one
but i am confused what to choose
i need to make a good looking view, and the technology must have a good support/samples, and easy to use, commonly used with spring, please advise, thanks.
I don't have enough experience in IceFaces, but GWT is really easy, rapid and full ajaxian. Also the SEO issues can be handled in GWT.
Although a bit old, check out:-
http://woork.blogspot.com/2009/01/10-beautiful-web-ui-libraries.html
Is it possible to create a dynamic sitemap in a Java EE app? I'm using GWT and glassfish, but I doubt that matters.
The URLs I want to add are in this form: site.com/article/id/title-of-article
The best I think up with was to make a servlet and map it with *sitemap.xml, and have that create the XML for the sitemap. Is there a better way?
I've done the same thing... exactly as you described. The fact that it's Java EE is really beside the point. It's really the framework you're using (Spring MVC/Struts/custom) and how it maps views to URLs. If it's REST style URLs as you stated, then it should be a pretty straight forward implementation generating XML from the servlet. Be sure to use a streaming writer (StAX?) to keep your heap usage down.
What are you guys using for your view in Spring MVC.
I know Spring MVC has a wide support for views but I'm having trouble finding what works well, what view to use when, etc.
Any insight would be great!
JSP, of course.
Sometimes PDF; Excel when necessary.
BlazeDS makes Flex integration with Spring possible. That's a great way to go if you use Flex.
"...I'm having trouble finding what works well..." - they all work well from Spring's point of view.
What to use when? Use the technology that you know best. Spring can deal with all of them just fine.
UPDATE: Since this was written three years ago, I'll amend it by saying that I would recommend just using Velocity templates to marry with dynamic data. Templates should use HTML, CSS, JavaScript, and jQuery. I think that provides the best flexibility you can have. You "future proof" your design if you can generate responsive HTML 5 pages.
We are using the following templating languages
Apache Velocity: Most of our old projects are using apache velocity to render the view. This is a very easy to learn and use language. But here xml operations are very limited.
Freemarker: Now we are migrating our project to Freemarker. This is a very good templating language. Advantage over velocity is that it has a very good support for xml data processing
You can use jsp with struts tiles to give good and uniform experience. You can refer to "Spring in Action" Book to find out how to do it. I have used this combination for developing my website www.propertymela.net. Have a look.
I am using Thymeleaf, because it has static prototyping which is very useful when there are two teams doing web design and server side development. I believe JSP is a fairly old technology, and I've had some problems with using HTML5 with it, which is why I opted to use a different view technology.
Also, Velocity is a competitor of Thymeleaf but I haven't really touched on Velocity aside from creating email templates.
JSTL is my option. JSTL has all the functional component which we can achieve through the use of scriplets in JSP. The avoidance of the scriptlet code in JSP is key to move into JSTL
In scriplet code if anything wrong whole page breaks. But it is not in the case of JSTL