gooroo
asked on
xml browser detection
hi,
as a total newbie to xml, I'm wondering how to detect a browser type in an xml file. The varianble called treeview.xsl should change according to the browser type (ie.xsl / ns.xsl) The script looks like this;
***********
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN" "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">
<web-app>
<display-name>hmg</display -name>
<servlet>
<servlet-name>action</serv let-name>
<servlet-class>org.apache. struts.act ion.Action Servlet</s ervlet-cla ss>
<init-param>
<param-name>application</p aram-name>
<param-value>ApplicationFo rmResource s</param-v alue>
</init-param>
<init-param>
<param-name>config</param- name>
<param-value>/WEB-INF/stru ts-config. xml</param -value>
</init-param>
<init-param>
<param-name>validate</para m-name>
<param-value>true</param-v alue>
</init-param>
<load-on-startup>1</load-o n-startup>
</servlet>
<servlet>
<servlet-name>content</ser vlet-name>
<servlet-class>no.cellnetw ork.hmg.co ntentmanag ement.serv lets.ShowC ontentServ let</servl et-class>
</servlet>
<servlet>
<servlet-name>initservlet< /servlet-n ame>
<servlet-class>no.cellnetw ork.hmg.in it.servlet s.InitServ let</servl et-class>
<load-on-startup>0</load-o n-startup>
</servlet>
<servlet>
<servlet-name>treeview</se rvlet-name >
<servlet-class>no.cellnetw ork.hmg.tr ee.servlet s.TreeView Servlet</s ervlet-cla ss>
<init-param>
<param-name>xslurl</param- name>
<param-value>http://localhost/eportal/hmg/xsl/treeview.xsl</param-value >
</init-param>
<init-param>
<param-name>xslurlmyprofil e</param-n ame>
<param-value>http://localhost/eportal/hmg/xsl/myprofile.xsl</param-value >
</init-param>
<init-param>
<param-name>defaultreposit ory</param -name>
<param-value>public</param -value>
</init-param>
</servlet>
<servlet>
<servlet-name>iconservlet< /servlet-n ame>
<servlet-class>no.cellnetw ork.hmg.ic on.servlet s.IconServ let</servl et-class>
</servlet>
<servlet>
<servlet-name>imageservlet </servlet- name>
<servlet-class>no.cellnetw ork.hmg.im age.servle ts.ImageSe rvlet</ser vlet-class >
</servlet>
<servlet-mapping>
<servlet-name>content</ser vlet-name>
<url-pattern>/jsp/content/ *</url-pat tern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>treeview</se rvlet-name >
<url-pattern>/jsp/treeview /*</url-pa ttern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>imageservlet </servlet- name>
<url-pattern>/jsp/imageser vlet/*</ur l-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>initservlet< /servlet-n ame>
<url-pattern>/init</url-pa ttern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>iconservlet< /servlet-n ame>
<url-pattern>/jsp/iconserv let/*</url -pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>action</serv let-name>
<url-pattern>*.do</url-pat tern>
</servlet-mapping>
<session-config>
<session-timeout>30</sessi on-timeout >
</session-config>
<taglib>
<taglib-uri>/WEB-INF/strut s-bean.tld </taglib-u ri>
<taglib-location>/WEB-INF/ struts-bea n.tld</tag lib-locati on>
</taglib>
<taglib>
<taglib-uri>/WEB-INF/strut s-logic.tl d</taglib- uri>
<taglib-location>/WEB-INF/ struts-log ic.tld</ta glib-locat ion>
</taglib>
<taglib>
<taglib-uri>/WEB-INF/strut s-html.tld </taglib-u ri>
<taglib-location>/WEB-INF/ struts-htm l.tld</tag lib-locati on>
</taglib>
<taglib>
<taglib-uri>/struts</tagli b-uri>
<taglib-location>/WEB-INF/ lib/struts .jar</tagl ib-locatio n>
</taglib>
</web-app>
***************
Any ideas greatly appreciated!
Regards,
Erik
as a total newbie to xml, I'm wondering how to detect a browser type in an xml file. The varianble called treeview.xsl should change according to the browser type (ie.xsl / ns.xsl) The script looks like this;
***********
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN" "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">
<web-app>
<display-name>hmg</display
<servlet>
<servlet-name>action</serv
<servlet-class>org.apache.
<init-param>
<param-name>application</p
<param-value>ApplicationFo
</init-param>
<init-param>
<param-name>config</param-
<param-value>/WEB-INF/stru
</init-param>
<init-param>
<param-name>validate</para
<param-value>true</param-v
</init-param>
<load-on-startup>1</load-o
</servlet>
<servlet>
<servlet-name>content</ser
<servlet-class>no.cellnetw
</servlet>
<servlet>
<servlet-name>initservlet<
<servlet-class>no.cellnetw
<load-on-startup>0</load-o
</servlet>
<servlet>
<servlet-name>treeview</se
<servlet-class>no.cellnetw
<init-param>
<param-name>xslurl</param-
<param-value>http://localhost/eportal/hmg/xsl/treeview.xsl</param-value
</init-param>
<init-param>
<param-name>xslurlmyprofil
<param-value>http://localhost/eportal/hmg/xsl/myprofile.xsl</param-value
</init-param>
<init-param>
<param-name>defaultreposit
<param-value>public</param
</init-param>
</servlet>
<servlet>
<servlet-name>iconservlet<
<servlet-class>no.cellnetw
</servlet>
<servlet>
<servlet-name>imageservlet
<servlet-class>no.cellnetw
</servlet>
<servlet-mapping>
<servlet-name>content</ser
<url-pattern>/jsp/content/
</servlet-mapping>
<servlet-mapping>
<servlet-name>treeview</se
<url-pattern>/jsp/treeview
</servlet-mapping>
<servlet-mapping>
<servlet-name>imageservlet
<url-pattern>/jsp/imageser
</servlet-mapping>
<servlet-mapping>
<servlet-name>initservlet<
<url-pattern>/init</url-pa
</servlet-mapping>
<servlet-mapping>
<servlet-name>iconservlet<
<url-pattern>/jsp/iconserv
</servlet-mapping>
<servlet-mapping>
<servlet-name>action</serv
<url-pattern>*.do</url-pat
</servlet-mapping>
<session-config>
<session-timeout>30</sessi
</session-config>
<taglib>
<taglib-uri>/WEB-INF/strut
<taglib-location>/WEB-INF/
</taglib>
<taglib>
<taglib-uri>/WEB-INF/strut
<taglib-location>/WEB-INF/
</taglib>
<taglib>
<taglib-uri>/WEB-INF/strut
<taglib-location>/WEB-INF/
</taglib>
<taglib>
<taglib-uri>/struts</tagli
<taglib-location>/WEB-INF/
</taglib>
</web-app>
***************
Any ideas greatly appreciated!
Regards,
Erik
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:
[Accept mplungjan's comment as answer.]
Please leave any comments here within the next seven days.
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
>S'Plug<
EE Cleanup Volunteer
I will leave a recommendation in the Cleanup topic area that this question is:
[Accept mplungjan's comment as answer.]
Please leave any comments here within the next seven days.
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
>S'Plug<
EE Cleanup Volunteer
Thanks
Michel
PS: Please do not respond with a "C" Grade to get rid of the question