if else in XML via struts 1.2

2010-08-08 Thread abhishek jain
Hi friends,
I am using struts 1.2 on tomcat, 5.5 and apache,

I am using some dynamic html which need an xml file.  no problem till here,
but i need to change the content of that xml file. depending on some request
parameter.
I need to know is there a way, i can process and write some if else
condition on the xml file, probably allowing making the xml file behave like
jsp file.

One solution is that i do some rule via urlrewrite / mod_rewrite which
passes all request for that xml to a jsp page, but that dont seem to be a
good sol to me.

Pl. advice.
-- 
Thanks and kind Regards,
Abhishek jain


Re: if else in XML via struts 1.2

2010-08-08 Thread Michael Dekmetzian
 Depending on how big your site is you can always configure a servlet at
the xml files's location to be rendered by a jsp page.

Something like this:
servlet
  servlet-namexmlservlet/servlet-name
  jsp-file/path/to/yourfile.jsp/jsp-file
  /servlet
 
  servlet-mapping
  servlet-namexmlservlet/servlet-name
  url-pattern/path/to/xmlfile.xml/url-pattern
  /servlet-mapping

Of course you can also use a jsp file in place of your xml file if
you're happy with it having a jsp extension.

Cheers

Michael

On 8/8/10 1:44 PM, abhishek jain wrote:
 Hi friends,
 I am using struts 1.2 on tomcat, 5.5 and apache,

 I am using some dynamic html which need an xml file.  no problem till here,
 but i need to change the content of that xml file. depending on some request
 parameter.
 I need to know is there a way, i can process and write some if else
 condition on the xml file, probably allowing making the xml file behave like
 jsp file.

 One solution is that i do some rule via urlrewrite / mod_rewrite which
 passes all request for that xml to a jsp page, but that dont seem to be a
 good sol to me.

 Pl. advice.


-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Get i18n text problem

2010-08-08 Thread Franz Wong
Hi group,

In the jsp page, I have a page scope variable title. This variable stores
the key of the resource bundle. I can print the value by %= title %.
However, I am not able to use it with s:text/.

I have tried s:text name=${title}/ or s:text name=%= title %/. But
both of them do not work.

Thanks.
Franz