If you deploy the theme to the classpath (it's not relevant what *NetBean's* classpath is--it should be on the *webapp's* classpath) then you should be able to load templates.
Have you tried creating a minimal test case, like changing one of the existing templates, and see if the changes are visible? If you put it in template/name-of-theme you shouldn't have to set anything. Dave --- On Fri, 8/22/08, Ylva Degerfeldt <[EMAIL PROTECTED]> wrote: > From: Ylva Degerfeldt <[EMAIL PROTECTED]> > Subject: Re: Why do s:select and s:submit add a <tr> ? > To: "Struts Users Mailing List" <user@struts.apache.org>, [EMAIL PROTECTED] > Date: Friday, August 22, 2008, 11:45 AM > Hi again! > I'm still struggling with the theme. See below.. > > >> I don't even know if I've put the theme in > the right place > >> in the NetBeans (5.5.1) structure. Is there a way > to check > >> that? > > > > Where did you put it? Did you read the template > loading page? > > > > > http://struts.apache.org/2.x/docs/template-loading.html? > > Yes, I read that but I'm afraid that "Templates ae > loaded first by > searching the application and then by searching the > classpath" is not > helping me since I haven't been able to figure out > exactly what the > classpath of NetBeans is. I've tried putting the > template files in > different places and changing the value of the property > "struts.ui.templateDir" according to that.. > > But then I decided to download the code that belonged to > the theme tutorial at: > http://www.vitarara.org/cms/struts_2_cookbook/creating_a_theme > (which > I mentionend earlier) > > ..and to do as much as possible like they had done. About > the location > of the files, they had put it in /WEB-INF/classes/template, > so I did > that to and changed the value of the struts property to: > > /WEB-INF/classes/template > > I think that location is ok since I tried a different > location once > (right under /WEB-INF) and then actually got an exception, > saying that > the files of this theme couldn't be found, but now I > don't get that > exception. > > I also compared my "controlheader-core.ftl", > "controlfooter.ftl", the > newly created "controlheader-trlogic.ftl" and > "controlfooter-trlogic" > to the downloaded equivalents and found that I needed to > add some > stuff (like an #include in controlheader-core that includes > controlheader-trlogic, which I actually had thought that I > might need) > and remove some other stuff, so I did that. > > Now my ftl files look exactly like the ones I downloaded, > but when I > run the application I still get the 2 column theme, and I > wonder why. > > One difference between what I've done and what was done > in the > downloaded examples is that I don't have the > "tablecolspan" variable > (used for inst. like "<#if qTableLayout?exists > && > qTableLayout.tablecolspan?exists > > <#assign columnCount = > qTableLayout.currentColumnCount />) > as a property in any action. I thought that maybe there was > no need > when you just wanted to set the nr of columns from the jsp > like: > > <s:bean name="java.util.HashMap" > id="qTableLayout"> > <s:param name="tablecolspan" > value="%{10}" /> > </s:bean> > > I thought that the "tablecolspan" somehow was > created automatically, > but maybe I'm wrong. Is that why it's not working? > > Please, Dave or anybody who knows how to do this, can you > help me > figure this out? (I attached the most significant files in > case you > need to see them.) I just want the easiest way to be able > to change > the number of columns in a theme, and I thought the example > I followed > was.. > > (And I can't spend a really long time learning about > some complicated > template stuff because I really need to finish this whole > project in > three weeks to finish my education, get an income and a > life again.. > Sorry for being personal but that's the way it is.) > > Please please help me! > > /Ylva > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: > [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]