Re: FOP Servlets being invoked twice -- MSIE 5.50.4522.1800 problem

2001-08-08 Thread Paul Furbacher


On Wednesday, August 8, 2001, Alex McLintock <[EMAIL PROTECTED]> wrote:

> ... but now I have a problem with a particular build of IE. Basically 
> the PDF doesn't appear -
> in fact neither does acrobat reader
> The problem occurs on the IE version 5.50.4522.1800 and not with other 
> IE5.5 versions, eg.
> 5.50.4134.0600.
>
> (Incidently the data is submitted to the servlet using Post - 
> apparently this is
> the cause of the bug in IE)

Not sure what bug you are talking about here, but I don't
think your problem is associated with doPost().

> [...]

> So folks - what are your servlet experiences?

We don't serve up PDF via FOP (yet) but we do let users download
PDFs which we have just cranked out by some other rickety process.
This worked quite well for several years, when all of a sudden, it
didn't.  We first isolated the problem to both MSIE 5.50.4522.1800
and oddly enough, NS 6.0, both on Win2k systems.

Weblogic was showing a socket exception error message in
the command console window.  We tried all the usual server side
tricks (e.g., res.setContentLength(), and so on), but they had no
effect.

We hunted everywhere for an explanation, and essentially
found none.  Posting to various newsgroups led no where.
However, while I was stumbling around on Microsoft's site, I
somehow wound up on their updates page, and noticed that
I hadn't updated much in the last however many months.  One
of the first things I updated was second or third release of
patches to MSIE  5.50.4522.1800.  I believe it was the Q299618
patch that restored the ability to download using MSIE 5.50.4522.1800.
Currently, the "About MSIE" (or whatever it's called in the Windows
version) lists the following updates:

  SP1; Q286043; Q299618

Note that this latest patch appeared on MS's "Critical Updates" page.

Also note, MSIE on MacOS X never showed this problem.  Neither did
OmniGroup's OmniWeb for MacOS X.


Paul Furbacher
http://www.teamb.com



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




RE: FOP Servlets being invoked twice

2001-08-08 Thread James Telfer

I've also had this problem -- you could try aliasing your servlet, or
alternatively adding a dummy query string on the end, along the lines of
?foo=bar.pdf. This seemed to work for me.

JT

-Original Message-
From: Alex McLintock [mailto:[EMAIL PROTECTED]]
Sent: Thursday, August 09, 2001 2:16 AM
To: [EMAIL PROTECTED]
Subject: Re: FOP Servlets being invoked twice


 --- Alex Amies <[EMAIL PROTECTED]> wrote: 
> I have a problem with a servlet, which serves up pdf documents, 
> invoking the servlet twice for every time I request the
> url using my browser.  The pdf document is produced 
> correctly in both instances.  Anybody else seen this
> problem, know what it is, or have a constructive suggestion?

If you check the mailing list archives you will see that at least one person
has seen this problem (with IE I think) and can't find a way around it.
However I don't see it myself so it might be fixable.


> long sixty = System.currentTimeMillis() + 60*1000;
> res.setDateHeader("Expires", sixty);

This is the only bit I am worried about - how does this help?

Since you've mentioned servlets I'll throw my problem into the fray.

I've seen the content size problem (which you have correctly solved in your
code)
but now I have a problem with a particular build of IE. Basically the PDF
doesn't appear -
in fact neither does acrobat reader
The problem occurs on the IE version 5.50.4522.1800 and not with other IE5.5
versions, eg.
5.50.4134.0600.

(Incidently the data is submitted to the servlet using Post - apparently
this is
the cause of the bug in IE)

Now I got so fed up with this that I tried saving the PDF file to disk and
then issuing
a redirect to the static PDF file. Hooray this works in the problem version
of IE.
Oh b(*&^(*er it no longer works in the older versions of IE.

I've tried the servlet "sendRedirect", I've tried a Location header with
relative and 
absolute URLs, I've even just tried a "Refresh" header. Nothing seems to
work.

So folks - what are your servlet experiences?

I feel like I'm going round in circles here. 

The one thing I haven't really done is to change the URL to end with ".pdf" 
Basically I can't create a class called "something.pdf" so haven't created a
servlet  
with that name yet. I've tried servletname;stupidie.pdf but that didn't seem
to help.


Alex




=
Alex McLintock[EMAIL PROTECTED]Open Source Consultancy in London
OpenWeb Analysts Ltd, http://www.OWAL.co.uk/ 
SF and Computing Book News and Reviews: http://news.diversebooks.com/
Get Your XML T-Shirt  at http://www.inversity.co.uk/


Do You Yahoo!?
Get your free @yahoo.co.uk address at http://mail.yahoo.co.uk
or your free @yahoo.ie address at http://mail.yahoo.ie

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




RE: FOP Servlets being invoked twice

2001-08-08 Thread Alex Amies

Thanks for the tip on IE behaving like this.  

I don't agree with the suggestion about using DOM to
build up a document.  Intuitively it does not make sense
to have Xalan parse the document out when the program that
constructs it knows the structure.  There are several 
problems with this, however:

(1) It is more convoluted to code DOM than dealing with strings.
(2) It will be slower.   Xalan does not use DOM to store
nodes in an xml document since it creates too many objects.
(3) It will take more memory since storing the document in
a DOM will use more memory than a StringBuffer.

-Original Message-
From: David Frankson [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, August 08, 2001 12:33 PM
To: [EMAIL PROTECTED]
Subject: Re: FOP Servlets being invoked twice


As far as I know, IE has always done 2 requests per mime type that
it
doesn't handle internally.  See Article ID: Q293336 in the M$ knowledge
base.  Netscape and all others only do 1 request.  If anyone knows a
configuration that can get IE to behave, please let me know


I do suggest adding

response.addHeader("Content-Disposition", "inline;
filename=report.pdf");

it will fix some glitches in IE5.0,  and also have you considered using
a
Dom  Document rather than a string to pass your xml around?  It would
save
you from having to parse it twice when you go from your business object
to
Xalan, and from Xalan to FOP.

Dave


- Original Message -
From: "Alex Amies" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Cc: "Tim Kearney" <[EMAIL PROTECTED]>
Sent: Wednesday, August 08, 2001 11:15 AM
Subject: FOP Servlets being invoked twice


> I have a problem with a servlet, which serves up pdf documents,
> invoking the servlet twice for every time I request the
> url using my browser.  The pdf document is produced
> correctly in both instances.  Anybody else seen this
> problem, know what it is, or have a constructive suggestion?
>
> The servlet gets data from a database, formats into xml,
> transforms it with Xalan, then again to a pdf, sending
> the content to a byte array where it is then written to
> the output stream.  Here is a code fragment:
>
> Writer writer = new StringWriter();
>
> // Get an xslt processor factory
> TransformerFactory tFactory = TransformerFactory.newInstance();
>
> // Create the 3 objects the XSLTProcessor needs to perform the
> transformation.
> ReportInfo reportInfo = getReportData(request,res);
> String xml = reportInfo.getXml();
> StringReader stringReader = new StringReader(xml);
> Source xmlSource  = new StreamSource(stringReader);
> Source xslSheet   = getXSLInput(reportInfo.getReportNo());
> StreamResult xmlResult = new StreamResult(writer);
>
> Transformer transformer = tFactory.newTransformer(xslSheet);
>
> // Perform the transformation.
> transformer.transform(xmlSource, xmlResult);
>
> // send output from xsl transformation to a string reader
> // create a input source containing the xsl:fo file which can be fed
to
> Fop
> Reader reader = new StringReader(writer.toString());
> writer.flush();
> writer.close();
>
> //set Driver methods to start Fop processing
> Driver driver = new Driver();
>
> driver.setRenderer("org.apache.fop.render.pdf.PDFRenderer",".14");
> driver.addElementMapping("org.apache.fop.fo.StandardElementMapping");
> driver.addElementMapping("org.apache.fop.svg.SVGElementMapping");
>
driver.addPropertyList("org.apache.fop.fo.StandardPropertyListMapping");
> driver.addPropertyList("org.apache.fop.svg.SVGPropertyListMapping");
>
> // send pdf writer output to a byte array stream
> ByteArrayOutputStream baos = new ByteArrayOutputStream();
> PrintWriter printWriter = new PrintWriter(baos);
> driver.setWriter(printWriter);
> driver.buildFOTree(parser, new InputSource(reader));
> driver.format();
> driver.render();
>
> // send the bytes out to the servlet output stream
> res.setContentType("application/pdf");
> res.setContentLength(baos.size());
>
> long sixty = System.currentTimeMillis() + 60*1000;
> res.setDateHeader("Expires", sixty);
> baos.writeTo(res.getOutputStream());
> res.flushBuffer();
>
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, email: [EMAIL PROTECTED]
>
>


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




Re: FOP Servlets being invoked twice

2001-08-08 Thread David Frankson

As far as I know, IE has always done 2 requests per mime type that it
doesn't handle internally.  See Article ID: Q293336 in the M$ knowledge
base.  Netscape and all others only do 1 request.  If anyone knows a
configuration that can get IE to behave, please let me know


I do suggest adding

response.addHeader("Content-Disposition", "inline; filename=report.pdf");

it will fix some glitches in IE5.0,  and also have you considered using a
Dom  Document rather than a string to pass your xml around?  It would save
you from having to parse it twice when you go from your business object to
Xalan, and from Xalan to FOP.

Dave


- Original Message -
From: "Alex Amies" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Cc: "Tim Kearney" <[EMAIL PROTECTED]>
Sent: Wednesday, August 08, 2001 11:15 AM
Subject: FOP Servlets being invoked twice


> I have a problem with a servlet, which serves up pdf documents,
> invoking the servlet twice for every time I request the
> url using my browser.  The pdf document is produced
> correctly in both instances.  Anybody else seen this
> problem, know what it is, or have a constructive suggestion?
>
> The servlet gets data from a database, formats into xml,
> transforms it with Xalan, then again to a pdf, sending
> the content to a byte array where it is then written to
> the output stream.  Here is a code fragment:
>
> Writer writer = new StringWriter();
>
> // Get an xslt processor factory
> TransformerFactory tFactory = TransformerFactory.newInstance();
>
> // Create the 3 objects the XSLTProcessor needs to perform the
> transformation.
> ReportInfo reportInfo = getReportData(request,res);
> String xml = reportInfo.getXml();
> StringReader stringReader = new StringReader(xml);
> Source xmlSource  = new StreamSource(stringReader);
> Source xslSheet   = getXSLInput(reportInfo.getReportNo());
> StreamResult xmlResult = new StreamResult(writer);
>
> Transformer transformer = tFactory.newTransformer(xslSheet);
>
> // Perform the transformation.
> transformer.transform(xmlSource, xmlResult);
>
> // send output from xsl transformation to a string reader
> // create a input source containing the xsl:fo file which can be fed to
> Fop
> Reader reader = new StringReader(writer.toString());
> writer.flush();
> writer.close();
>
> //set Driver methods to start Fop processing
> Driver driver = new Driver();
>
> driver.setRenderer("org.apache.fop.render.pdf.PDFRenderer",".14");
> driver.addElementMapping("org.apache.fop.fo.StandardElementMapping");
> driver.addElementMapping("org.apache.fop.svg.SVGElementMapping");
> driver.addPropertyList("org.apache.fop.fo.StandardPropertyListMapping");
> driver.addPropertyList("org.apache.fop.svg.SVGPropertyListMapping");
>
> // send pdf writer output to a byte array stream
> ByteArrayOutputStream baos = new ByteArrayOutputStream();
> PrintWriter printWriter = new PrintWriter(baos);
> driver.setWriter(printWriter);
> driver.buildFOTree(parser, new InputSource(reader));
> driver.format();
> driver.render();
>
> // send the bytes out to the servlet output stream
> res.setContentType("application/pdf");
> res.setContentLength(baos.size());
>
> long sixty = System.currentTimeMillis() + 60*1000;
> res.setDateHeader("Expires", sixty);
> baos.writeTo(res.getOutputStream());
> res.flushBuffer();
>
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, email: [EMAIL PROTECTED]
>
>


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




Re: FOP Servlets being invoked twice

2001-08-08 Thread Joe Batt

Alex McLintock wrote:

>
>I've seen the content size problem (which you have correctly solved in your code)
>but now I have a problem with a particular build of IE. Basically the PDF doesn't 
>appear -
>in fact neither does acrobat reader
>The problem occurs on the IE version 5.50.4522.1800 and not with other IE5.5 
>versions, eg.
>5.50.4134.0600.
>
We found that Acrobat with 'Web Browser Integration' turned on failed to 
render almost always.  Switching to Acrobat 5.0 or turning off the web 
browser integration caused the rendering to work just fine.

Joe


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




Re: FOP Servlets being invoked twice

2001-08-08 Thread Chetan Vig

Yes, I have also seen this on my servlets which
generate PDF reports of 10-15 pages or more. For small
PDF reports like 1-5 pages I havent seen this issue.

-Chetan

 
--- Alex Amies <[EMAIL PROTECTED]> wrote:
> I have a problem with a servlet, which serves up pdf
> documents, 
> invoking the servlet twice for every time I request
> the
> url using my browser.  The pdf document is produced 
> correctly in both instances.  Anybody else seen this
> problem, know what it is, or have a constructive
> suggestion?
> 
> The servlet gets data from a database, formats into
> xml, 
> transforms it with Xalan, then again to a pdf,
> sending 
> the content to a byte array where it is then written
> to 
> the output stream.  Here is a code fragment:
> 
> Writer writer = new StringWriter();
> 
> // Get an xslt processor factory
> TransformerFactory tFactory =
> TransformerFactory.newInstance();
> 
> // Create the 3 objects the XSLTProcessor needs to
> perform the
> transformation.
> ReportInfo reportInfo = getReportData(request,res);
> String xml = reportInfo.getXml();
> StringReader stringReader = new StringReader(xml);
> Source xmlSource  = new StreamSource(stringReader);
> Source xslSheet   =
> getXSLInput(reportInfo.getReportNo());
> StreamResult xmlResult = new StreamResult(writer);
> 
> Transformer transformer =
> tFactory.newTransformer(xslSheet);
> 
> // Perform the transformation.
> transformer.transform(xmlSource, xmlResult);
> 
> // send output from xsl transformation to a string
> reader
> // create a input source containing the xsl:fo file
> which can be fed to
> Fop
> Reader reader = new StringReader(writer.toString());
> writer.flush();
> writer.close();
> 
> //set Driver methods to start Fop processing
> Driver driver = new Driver();
> 
>
driver.setRenderer("org.apache.fop.render.pdf.PDFRenderer",".14");
>
driver.addElementMapping("org.apache.fop.fo.StandardElementMapping");
>
driver.addElementMapping("org.apache.fop.svg.SVGElementMapping");
>
driver.addPropertyList("org.apache.fop.fo.StandardPropertyListMapping");
>
driver.addPropertyList("org.apache.fop.svg.SVGPropertyListMapping");
> 
> // send pdf writer output to a byte array stream
> ByteArrayOutputStream baos = new
> ByteArrayOutputStream();
> PrintWriter printWriter = new PrintWriter(baos);
> driver.setWriter(printWriter);
> driver.buildFOTree(parser, new InputSource(reader));
> driver.format();
> driver.render();
> 
> // send the bytes out to the servlet output stream
> res.setContentType("application/pdf");
> res.setContentLength(baos.size());
> 
> long sixty = System.currentTimeMillis() + 60*1000;
> res.setDateHeader("Expires", sixty);
> baos.writeTo(res.getOutputStream());
> res.flushBuffer();
> 
>  
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, email:
> [EMAIL PROTECTED]
> 


__
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




Re: FOP Servlets being invoked twice

2001-08-08 Thread Joe Batt

It happened to me using IE to Tomcat on the local machine using 
'localhost'.  I switched to using the real network interface and it 
fixed itself.

Joe

Alex Amies wrote:

>I have a problem with a servlet, which serves up pdf documents, 
>invoking the servlet twice for every time I request the
>url using my browser.  The pdf document is produced 
>correctly in both instances.  Anybody else seen this
>problem, know what it is, or have a constructive suggestion?
>
>The servlet gets data from a database, formats into xml, 
>transforms it with Xalan, then again to a pdf, sending 
>the content to a byte array where it is then written to 
>the output stream.  Here is a code fragment:
>
>Writer writer = new StringWriter();
>
>// Get an xslt processor factory
>TransformerFactory tFactory = TransformerFactory.newInstance();
>
>// Create the 3 objects the XSLTProcessor needs to perform the
>transformation.
>ReportInfo reportInfo = getReportData(request,res);
>String xml = reportInfo.getXml();
>StringReader stringReader = new StringReader(xml);
>Source xmlSource  = new StreamSource(stringReader);
>Source xslSheet   = getXSLInput(reportInfo.getReportNo());
>StreamResult xmlResult = new StreamResult(writer);
>
>Transformer transformer = tFactory.newTransformer(xslSheet);
>
>// Perform the transformation.
>transformer.transform(xmlSource, xmlResult);
>
>// send output from xsl transformation to a string reader
>// create a input source containing the xsl:fo file which can be fed to
>Fop
>Reader reader = new StringReader(writer.toString());
>writer.flush();
>writer.close();
>
>//set Driver methods to start Fop processing
>Driver driver = new Driver();
>
>driver.setRenderer("org.apache.fop.render.pdf.PDFRenderer",".14");
>driver.addElementMapping("org.apache.fop.fo.StandardElementMapping");
>driver.addElementMapping("org.apache.fop.svg.SVGElementMapping");
>driver.addPropertyList("org.apache.fop.fo.StandardPropertyListMapping");
>driver.addPropertyList("org.apache.fop.svg.SVGPropertyListMapping");
>
>// send pdf writer output to a byte array stream
>ByteArrayOutputStream baos = new ByteArrayOutputStream();
>PrintWriter printWriter = new PrintWriter(baos);
>driver.setWriter(printWriter);
>driver.buildFOTree(parser, new InputSource(reader));
>driver.format();
>driver.render();
>
>// send the bytes out to the servlet output stream
>res.setContentType("application/pdf");
>res.setContentLength(baos.size());
>
>long sixty = System.currentTimeMillis() + 60*1000;
>res.setDateHeader("Expires", sixty);
>baos.writeTo(res.getOutputStream());
>res.flushBuffer();
>
> 
>
>-
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, email: [EMAIL PROTECTED]
>
>
>




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




Re: FOP Servlets being invoked twice

2001-08-08 Thread Alex McLintock

 --- Alex Amies <[EMAIL PROTECTED]> wrote: 
> I have a problem with a servlet, which serves up pdf documents, 
> invoking the servlet twice for every time I request the
> url using my browser.  The pdf document is produced 
> correctly in both instances.  Anybody else seen this
> problem, know what it is, or have a constructive suggestion?

If you check the mailing list archives you will see that at least one person
has seen this problem (with IE I think) and can't find a way around it.
However I don't see it myself so it might be fixable.


> long sixty = System.currentTimeMillis() + 60*1000;
> res.setDateHeader("Expires", sixty);

This is the only bit I am worried about - how does this help?

Since you've mentioned servlets I'll throw my problem into the fray.

I've seen the content size problem (which you have correctly solved in your code)
but now I have a problem with a particular build of IE. Basically the PDF doesn't 
appear -
in fact neither does acrobat reader
The problem occurs on the IE version 5.50.4522.1800 and not with other IE5.5 versions, 
eg.
5.50.4134.0600.

(Incidently the data is submitted to the servlet using Post - apparently this is
the cause of the bug in IE)

Now I got so fed up with this that I tried saving the PDF file to disk and then issuing
a redirect to the static PDF file. Hooray this works in the problem version of IE.
Oh b(*&^(*er it no longer works in the older versions of IE.

I've tried the servlet "sendRedirect", I've tried a Location header with relative and 
absolute URLs, I've even just tried a "Refresh" header. Nothing seems to work.

So folks - what are your servlet experiences?

I feel like I'm going round in circles here. 

The one thing I haven't really done is to change the URL to end with ".pdf" 
Basically I can't create a class called "something.pdf" so haven't created a servlet  
with that name yet. I've tried servletname;stupidie.pdf but that didn't seem to help.


Alex




=
Alex McLintock[EMAIL PROTECTED]Open Source Consultancy in London
OpenWeb Analysts Ltd, http://www.OWAL.co.uk/ 
SF and Computing Book News and Reviews: http://news.diversebooks.com/
Get Your XML T-Shirt  at http://www.inversity.co.uk/


Do You Yahoo!?
Get your free @yahoo.co.uk address at http://mail.yahoo.co.uk
or your free @yahoo.ie address at http://mail.yahoo.ie

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




FOP Servlets being invoked twice

2001-08-08 Thread Alex Amies

I have a problem with a servlet, which serves up pdf documents, 
invoking the servlet twice for every time I request the
url using my browser.  The pdf document is produced 
correctly in both instances.  Anybody else seen this
problem, know what it is, or have a constructive suggestion?

The servlet gets data from a database, formats into xml, 
transforms it with Xalan, then again to a pdf, sending 
the content to a byte array where it is then written to 
the output stream.  Here is a code fragment:

Writer writer = new StringWriter();

// Get an xslt processor factory
TransformerFactory tFactory = TransformerFactory.newInstance();

// Create the 3 objects the XSLTProcessor needs to perform the
transformation.
ReportInfo reportInfo = getReportData(request,res);
String xml = reportInfo.getXml();
StringReader stringReader = new StringReader(xml);
Source xmlSource  = new StreamSource(stringReader);
Source xslSheet   = getXSLInput(reportInfo.getReportNo());
StreamResult xmlResult = new StreamResult(writer);

Transformer transformer = tFactory.newTransformer(xslSheet);

// Perform the transformation.
transformer.transform(xmlSource, xmlResult);

// send output from xsl transformation to a string reader
// create a input source containing the xsl:fo file which can be fed to
Fop
Reader reader = new StringReader(writer.toString());
writer.flush();
writer.close();

//set Driver methods to start Fop processing
Driver driver = new Driver();

driver.setRenderer("org.apache.fop.render.pdf.PDFRenderer",".14");
driver.addElementMapping("org.apache.fop.fo.StandardElementMapping");
driver.addElementMapping("org.apache.fop.svg.SVGElementMapping");
driver.addPropertyList("org.apache.fop.fo.StandardPropertyListMapping");
driver.addPropertyList("org.apache.fop.svg.SVGPropertyListMapping");

// send pdf writer output to a byte array stream
ByteArrayOutputStream baos = new ByteArrayOutputStream();
PrintWriter printWriter = new PrintWriter(baos);
driver.setWriter(printWriter);
driver.buildFOTree(parser, new InputSource(reader));
driver.format();
driver.render();

// send the bytes out to the servlet output stream
res.setContentType("application/pdf");
res.setContentLength(baos.size());

long sixty = System.currentTimeMillis() + 60*1000;
res.setDateHeader("Expires", sixty);
baos.writeTo(res.getOutputStream());
res.flushBuffer();

 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]