You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Rock Vas <ro...@yahoo.com> on 2001/02/26 22:59:01 UTC

Struts and XSL..

Hi,
I'm new to struts.
How Can i use XML and XSL with struts.
XSL style sheets are to  display the data.
But in Struts,its diffrent approach.
If i use XSL and XML to display my document.
XSL..a Designer cann't write ,it will have lot of XML
syntax .
Does Struts is to replaces XSL .

Thanks
Rocky


__________________________________________________
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail. 
http://personal.mail.yahoo.com/

Re: What a jar file is needed?

Posted by "Craig R. McClanahan" <Cr...@eng.sun.com>.
Maya Muchnik wrote:

> Wayne,
>
> Thank you for your suggestion. I put copies of jaxp.jar and parser.jar from
> jaxp1.0.1 package (Sun Microsystems) to /usr/java/jre/lib/ext and the file
> was compiled.
>
> Does anyone know why and what case we need to have crimson.jar, xlan.jar?
>

The JAXP/1.0 (and 1.0.1) release includes "jaxp.jar" and "parser.jar".

The JAXP/1.1 release includes "jaxp.jar", "crimson.jar", and "xalan.jar".

You should use either one release or the other, but not both.  Note also that
putting these JAR files in $JAVA_HOME/jre/lib/ext may cause you to run into
"package sealing violation" errors in servlet containers like Tomcat 4.0, which
include the JAXP/1.1 JARs in their own classpaths.

>
> The second Q. (maybe it was corrected for the beta release): why is needed
> to use deprecated functions in struts.util.BeanUtils.java:
>
> LinkUserTag.java:191: warning: filter(java.lang.String) in
> org.apache.struts.util.BeanUtils has been deprecated
>  url.append(BeanUtils.filter(user.getUsername()));
>                             ^
> LinkUserTag.java:197: warning: filter(java.lang.String) in
> org.apache.struts.util.BeanUtils has been deprecated
>  results.append(response.encodeURL(BeanUtils.filter(url.toString())));
>                                                    ^
> Similar output for LinkSubscriptionTag.java.
>
> In struts.util.BeanUtils.java two deprecated functions are used:
> ResponseUtils.filter() and PropertyUtils.getProperty().  I have (and maybe
> others) a tag "filter" to filtering special characters for HTML
> interpreters. Maybe it is possible to use this code instead of the
> deprecated function?
>

99% of this is just oversight on my part :-(.  Deprecated functions still work
(and will continue to work through 1.0 -- it's just that you will need to
change any code that relies on them as soon as we start working on 1.1.

Maya, could you please file a bug report in the Bug Tracking System?

    http://nagoya.apache.org/bugzilla/

It is *much* easier for me to keep track of problems there, rather than
potentially losing useful reports in the volume of mail on the mailing lists.

>
> Thanks,
>
> Maya
>

Craig



Re: What a jar file is needed?

Posted by Maya Muchnik <mm...@pumatech.com>.
Wayne,

Thank you for your suggestion. I put copies of jaxp.jar and parser.jar from
jaxp1.0.1 package (Sun Microsystems) to /usr/java/jre/lib/ext and the file
was compiled.

Does anyone know why and what case we need to have crimson.jar, xlan.jar?

The second Q. (maybe it was corrected for the beta release): why is needed
to use deprecated functions in struts.util.BeanUtils.java:

LinkUserTag.java:191: warning: filter(java.lang.String) in
org.apache.struts.util.BeanUtils has been deprecated
 url.append(BeanUtils.filter(user.getUsername()));
                            ^
LinkUserTag.java:197: warning: filter(java.lang.String) in
org.apache.struts.util.BeanUtils has been deprecated
 results.append(response.encodeURL(BeanUtils.filter(url.toString())));
                                                   ^
Similar output for LinkSubscriptionTag.java.

In struts.util.BeanUtils.java two deprecated functions are used:
ResponseUtils.filter() and PropertyUtils.getProperty().  I have (and maybe
others) a tag "filter" to filtering special characters for HTML
interpreters. Maybe it is possible to use this code instead of the
deprecated function?


Thanks,

Maya

Wayne Ohm wrote:

> Are you sure you have installed an XML parser?  Make sure you download it
> first (http://java.sun.com/xml), and install the jar files (jaxp.jar,
> crimson.jar, xlan.jar) in C:\jdk1.3\jre\lib\ext (for JDK v1.3, for
> example).  This will eliminate the need to modify CLASSPATH.
>
> Maya Muchnik wrote:
>
> > Hi,
> > I have tried to compile struts-example. DatabaseServlet.java is looking
> > for HandlerBase.class and InputSource.class from org.xml.sax. The error
> > messages are:
> >
> > DatabaseServlet.java:273: cannot access org.xml.sax.HandlerBase
> > file org/xml/sax/HandlerBase.class not found
> >  Digester digester = new Digester();
> >                             ^
> > DatabaseServlet.java:287: cannot access org.xml.sax.InputSource
> > file org/xml/sax/InputSource.class not found
> >  digester.parse(bis);
> >                 ^
> >
> > Maybe I have missed this question from others.
> >
> > Maya
> > P.S. Maybe I have the old struts.jar?


Re: What a jar file is needed?

Posted by Wayne Ohm <wo...@home.com>.
Are you sure you have installed an XML parser?  Make sure you download it
first (http://java.sun.com/xml), and install the jar files (jaxp.jar,
crimson.jar, xlan.jar) in C:\jdk1.3\jre\lib\ext (for JDK v1.3, for
example).  This will eliminate the need to modify CLASSPATH.

Maya Muchnik wrote:

> Hi,
> I have tried to compile struts-example. DatabaseServlet.java is looking
> for HandlerBase.class and InputSource.class from org.xml.sax. The error
> messages are:
>
> DatabaseServlet.java:273: cannot access org.xml.sax.HandlerBase
> file org/xml/sax/HandlerBase.class not found
>  Digester digester = new Digester();
>                             ^
> DatabaseServlet.java:287: cannot access org.xml.sax.InputSource
> file org/xml/sax/InputSource.class not found
>  digester.parse(bis);
>                 ^
>
> Maybe I have missed this question from others.
>
> Maya
> P.S. Maybe I have the old struts.jar?


What a jar file is needed?

Posted by Maya Muchnik <mm...@pumatech.com>.
Hi,
I have tried to compile struts-example. DatabaseServlet.java is looking
for HandlerBase.class and InputSource.class from org.xml.sax. The error
messages are:

DatabaseServlet.java:273: cannot access org.xml.sax.HandlerBase
file org/xml/sax/HandlerBase.class not found
 Digester digester = new Digester();
                            ^
DatabaseServlet.java:287: cannot access org.xml.sax.InputSource
file org/xml/sax/InputSource.class not found
 digester.parse(bis);
                ^

Maybe I have missed this question from others.

Maya
P.S. Maybe I have the old struts.jar?


Re: Struts and XSL..

Posted by Maya Muchnik <mm...@pumatech.com>.
Try to find mail(s) with "XSL" in
http://www.mail-archive.com/struts-user@jakarta.apache.org/
It was several good answes to your question.

Rock Vas wrote:

> Hi,
> I'm new to struts.
> How Can i use XML and XSL with struts.
> XSL style sheets are to  display the data.
> But in Struts,its diffrent approach.
> If i use XSL and XML to display my document.
> XSL..a Designer cann't write ,it will have lot of XML
> syntax .
> Does Struts is to replaces XSL .
>
> Thanks
> Rocky
>
> __________________________________________________
> Do You Yahoo!?
> Get email at your own domain with Yahoo! Mail.
> http://personal.mail.yahoo.com/