• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

Ajax them

 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi, Can any one tell me all the required configuration to use AJAX theme in struts2. When I try to use, I get error message like head.ftl, many other ftls are missing. Where as if I use xhtml theme, everything works fine. But I need to use AJAX theme. Thanks.
 
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Which version of Struts? Are you including the <s:head> tag or <sx:head> tag for S2.1+?

It'd help if you showed a minimal JSP that causes the issue. Other factors might include the filter mapping.
 
James Dutt
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am using Struts 2.1.6. I have <s:head> tag as <s:head theme="ajax" />. Should I use <sx:head> to have ajax theme?

In my My jsp i am trying to use ajax theme in the form tag also as shown below. I dono which is the right way.

<s:form id="Myform" action="HotelList" namespace="/"
method="post" theme="ajax">

I don't have "ajax" folder in WEB-INF\classes\template folder. in the error log it says it cannot find file head.ftl, some more .ftl in ajax folder.

Looks like i need a ajax folder with set of .ftl files. So if i know the basic configurations/requirements/setup to use AJAX theme, i will check my files/folders to make sure i have everything. Thanks for your time.


 
David Newton
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes, you need the <sx:head> tag: see the documentation here, where it states:

The docs wrote:To use the AJAX tags from 2.1 on you must:

* Include the Dojo Plugin distributed with Struts 2 in your /WEB-INF/lib folder.
* Add <%@ taglib prefix="sx" uri="/struts-dojo-tags" %> to your page.
* Include the (dojo) head tag on the page, which can be configured for performance or debugging purposes.


Have you met those requirements?

I'm also not sure if setting the form's theme to "ajax" will work as you believe it will; AFAIK using the <sx:submit> tag is the way to do that in S2.1. You may want to have a quick look at some of the existing documentation before proceeding much further.
 
James Dutt
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks a lot. Will do more research on it. This gives me some direction to move on. If you come across more on this, could you please post under this discussion. Appreciate it.
 
Politics n. Poly "many" + ticks "blood sucking insects". Tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic