Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > loss of data depending on security permissions

Reply
Thread Tools

loss of data depending on security permissions

 
 
Christian Schott
Guest
Posts: n/a
 
      03-04-2004
Hallo Java Programmer People.

Hopefully that is the right Place for asking that Question, otherwise
i apologize for wasting your time.

I load a Bitmap (filename.bmp) in an Applet from a the Webserver that
hosts the Applet.

BufferedImage bi = ImageIO.read(url);

Unfortunately some Data seems to be lost on its way.
If I Read *.bmp Images it seems that some Rows of the Bitmap are not
fully loaded, they are partly set to Black.
If I Read JPEG Images instead the dataloss has the effect that the
images are a little wishy-washy.

In the Netbeans IDE everything works fine if i use Debug mode.
The same if i grant all permissions in the java.policy file.

Any suggestions where the problem comes from and maybe how to get rid
of it without granting permissions.

Any Help on this would be great !

Thanx for spending your time in reading this.

regards

Christian Schott

Plattform: Windows
Browser : Netscape and IE using the latest Java Plugin.
 
Reply With Quote
 
 
 
 
Andrew Thompson
Guest
Posts: n/a
 
      03-04-2004
On 4 Mar 2004 02:57:39 -0800, Christian Schott wrote:

> I load a Bitmap (filename.bmp)


What are you gonna call your
other picture? [ ]

>..in an Applet from a the Webserver that
> hosts the Applet.


What applet? What web server? What URL?

<http://www.physci.org/codes/sscce.jsp#eg>
'Example - Extra Points'

--
Andrew Thompson
* http://www.PhySci.org/ Open-source software suite
* http://www.PhySci.org/codes/ Web & IT Help
* http://www.1point1C.org/ Science & Technology
 
Reply With Quote
 
 
 
 
Christian Schott
Guest
Posts: n/a
 
      03-04-2004
Hallo Andre



Andrew Thompson <(E-Mail Removed)> wrote in message news:<1mf69x84hl51r.7c3tli5fsnqh$(E-Mail Removed)>. ..
> On 4 Mar 2004 02:57:39 -0800, Christian Schott wrote:
>
> > I load a Bitmap (filename.bmp)


just to make clear that it is an *.bmp file.

>
> What are you gonna call your
> other picture? [ ]


Actually the Images are streamed via ASP and not named at all .

>
> >..in an Applet from a the Webserver that
> > hosts the Applet.

>
> What applet? What web server? What URL?


A Java2 Applet written using the sun sdk j2sdk1.4.1_04.

I HAVE TO use IIS as Webserver.

regardz

Christian Schott
 
Reply With Quote
 
John Davison
Guest
Posts: n/a
 
      03-04-2004

"Christian Schott" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) om...
> Hallo Java Programmer People.
>
> Hopefully that is the right Place for asking that Question, otherwise
> i apologize for wasting your time.
>
> I load a Bitmap (filename.bmp) in an Applet from a the Webserver that
> hosts the Applet.
>
> BufferedImage bi = ImageIO.read(url);
>
> Unfortunately some Data seems to be lost on its way.
> If I Read *.bmp Images it seems that some Rows of the Bitmap are not
> fully loaded, they are partly set to Black.
> If I Read JPEG Images instead the dataloss has the effect that the
> images are a little wishy-washy.
>
> In the Netbeans IDE everything works fine if i use Debug mode.
> The same if i grant all permissions in the java.policy file.


You don't need extra security permissions to load a URL from the server
hosting the applet.

Are you sure that "data is lost of the way"? Can you verify that? Could it
be the way you're displaying the Image? Or could it be your ASP script
sending the image? Perhaps it's not sending the correct header information,
such as the size and dimensions of the image.

Suggestions:
Use a sniffer to verify URL transactions: compare these transactions to one
made by a web browser and see if there is any difference.
Save the downloaded image to a file and do a binary compare. Download the
image through a web browser and compare it to your original.


 
Reply With Quote
 
Andrew Thompson
Guest
Posts: n/a
 
      03-05-2004
On 4 Mar 2004 07:36:39 -0800, Christian Schott wrote:

> Hallo Andre


It's Andrew

>>>..in an Applet from a the Webserver that
>>> hosts the Applet.

>>
>> What applet? What web server? What URL?

>
> A Java2 Applet written using the sun sdk j2sdk1.4.1_04.


Let me rehprase that.
The _URL_?
The SSCCE?
<http://www.physci.org/codes/sscce.jsp>

Rather than talk about, or describe, your
code, give an URL, give the source.

--
Andrew Thompson
* http://www.PhySci.org/ Open-source software suite
* http://www.PhySci.org/codes/ Web & IT Help
* http://www.1point1C.org/ Science & Technology
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
System.Security.SecurityException: Request for the permission of type 'System.Security.Permissions.FileIOPermission, mscorlib,... Leyla ASP .Net Security 2 08-17-2006 05:56 PM
Template Column data depending on form data John Mackerras ASP .Net Datagrid Control 0 11-15-2004 01:05 PM
ASPX file returning obscur runtime error - after changing permissions to a subweb (.net app) to different permissions than on its parent ? Isabelle ASP .Net 0 08-11-2004 02:04 PM
Re: Permissions - giving "everyone" full permissions is bad ? Scott Allen ASP .Net 0 07-13-2004 08:54 PM
Activa or not activate a button column depending if another data column has data or not carlos perez ASP .Net 0 06-08-2004 02:16 PM



Advertisments