Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Is it possible to write an applet that reads image and data files from web server that is easy for end users?

Reply
Thread Tools

Is it possible to write an applet that reads image and data files from web server that is easy for end users?

 
 
Jean-Paul Lanaux
Guest
Posts: n/a
 
      05-16-2004
My background:

4th year computer science student.

The school that I am studying at teaches a lot of java, but they haven't
ever touched upon applets. I don't have much experiance with applets and
I find that applets are excercising my patience. I thought I would
attempt to write an involved applet and the program I was writing was
working very well and I was pleased with the way it as coming out. I
then put it on a web server and discovered all of the security problems
with running applets off of the web. I am at a point now where I might
want to totally abandon the project using java and move over to c++ and
just write an app that uses an exe.

I have done a lot of searching on the net for the info that seems to be
eluding me. I am searching for and It is not clear to me if I can do
what I wish to do without all of the damn security exceptions.

My main question:

I want to develop an application that runs from a browser window as an
applet using Java. I want to be able to read files from the same server
and directory structure which has the html files. The files that I would
be reading would be jpg's and gif's and either text files or binary
files for the data. It would also be nice to write to the directory, but
at this point I would just be satisfied to be able to just read files.

The users that I expect to use this applet are not expected to be very
competant computer users. It is very important that the applet just run
from a link or other simple method. Can I do this from a jar file
without having to use certificates and/or java policy file
modifications.

I don't want to give up on java just yet, but this security thing is
killing it for me.

I have even thought about planting the data within the source code, but
that to me seems too damn messy, and just plain wrong.

I would just like if people could tell me one way or another if my
program would be possible.

Jean-Paul Lanaux

 
Reply With Quote
 
 
 
 
Chris Smith
Guest
Posts: n/a
 
      05-16-2004
Jean-Paul Lanaux wrote:
> I want to develop an application that runs from a browser window as an
> applet using Java. I want to be able to read files from the same server
> and directory structure which has the html files. The files that I would
> be reading would be jpg's and gif's and either text files or binary
> files for the data. It would also be nice to write to the directory, but
> at this point I would just be satisfied to be able to just read files.


Yes, you can do the reading part. If you want to know what's wrong with
your code, you'll have to post a short example that demonstrates the
problem.

As for the writing part, web servers don't typically provide a way to
write to their directories (for obvious reasons). You can write to the
server, IF the server is running an appropriate service such as FTP or
such, and you don't mind giving out the password to the world. If you
have more control over the server, you could also write your own service
of sorts, which would allow only the kind of writes you want, and no
more.

> I don't want to give up on java just yet, but this security thing is
> killing it for me.


There are, incidentally, other options besides applets for writing Java
code to do this sort of thing. Writing a Java application would be just
as easy as writing a C++ application to perform these tasks, assuming
you know Java already...

--
www.designacourse.com
The Easiest Way to Train Anyone... Anywhere.

Chris Smith - Lead Software Developer/Technical Trainer
MindIQ Corporation
 
Reply With Quote
 
 
 
 
Roedy Green
Guest
Posts: n/a
 
      05-16-2004
On Sun, 16 May 2004 14:04:24 GMT, Jean-Paul Lanaux <(E-Mail Removed)>
wrote or quoted :

> Can I do this from a jar file
>without having to use certificates and/or java policy file
>modifications.


To read images from jar files, or the server see
http://mindprod.com/jgloss/image.html

Also see http://mindprod.com/fileio.html
to see how to do HTTP gets to fetch them from a server at the socket
level.

--
Canadian Mind Products, Roedy Green.
Coaching, problem solving, economical contract programming.
See http://mindprod.com/jgloss/jgloss.html for The Java Glossary.
 
Reply With Quote
 
Roedy Green
Guest
Posts: n/a
 
      05-16-2004
On Sun, 16 May 2004 14:45:54 -0400, perry <(E-Mail Removed)> wrote
or quoted :

>if you sit back and think about it, not letting applets write to server
>files should make sense.. do some research on different types of
>applet/server relationships available.


see http://mindprod.com/jgloss/remotefileaccess.html
for your options.

--
Canadian Mind Products, Roedy Green.
Coaching, problem solving, economical contract programming.
See http://mindprod.com/jgloss/jgloss.html for The Java Glossary.
 
Reply With Quote
 
perry
Guest
Posts: n/a
 
      05-16-2004
i'm not sure of the all the details of the application you are
describing and true, applets have a few restrictions but with good reason.

from what you have described, there is nothing wrong with collecting
information via the standard practise and having that sent to the server
for proper storage. i don' know if this is what you meant with writing
files to the server. the whole idea of the applet/servlet or
applet/server relationship is that each would focus on tasks that are
appropaite for each.

as for accessing gifs/jpgs from the server, sure. as for writing images
(i'm assuming) back. there's a couple approaches other than what was
mentioned. i don't see any need in your app to capture or store altered
images, if so, a trip down the JMF framework might be appropiate. but if
all your storing is user choices or responses, send that information to
the server or servlet and let it do the writing to the server files.

if you sit back and think about it, not letting applets write to server
files should make sense.. do some research on different types of
applet/server relationships available. you might even consider JavaSpaces.

- perry

Jean-Paul Lanaux wrote:
> My background:
>
> 4th year computer science student.
>
> The school that I am studying at teaches a lot of java, but they haven't
> ever touched upon applets. I don't have much experiance with applets and
> I find that applets are excercising my patience. I thought I would
> attempt to write an involved applet and the program I was writing was
> working very well and I was pleased with the way it as coming out. I
> then put it on a web server and discovered all of the security problems
> with running applets off of the web. I am at a point now where I might
> want to totally abandon the project using java and move over to c++ and
> just write an app that uses an exe.
>
> I have done a lot of searching on the net for the info that seems to be
> eluding me. I am searching for and It is not clear to me if I can do
> what I wish to do without all of the damn security exceptions.
>
> My main question:
>
> I want to develop an application that runs from a browser window as an
> applet using Java. I want to be able to read files from the same server
> and directory structure which has the html files. The files that I would
> be reading would be jpg's and gif's and either text files or binary
> files for the data. It would also be nice to write to the directory, but
> at this point I would just be satisfied to be able to just read files.
>
> The users that I expect to use this applet are not expected to be very
> competant computer users. It is very important that the applet just run
> from a link or other simple method. Can I do this from a jar file
> without having to use certificates and/or java policy file
> modifications.
>
> I don't want to give up on java just yet, but this security thing is
> killing it for me.
>
> I have even thought about planting the data within the source code, but
> that to me seems too damn messy, and just plain wrong.
>
> I would just like if people could tell me one way or another if my
> program would be possible.
>
> Jean-Paul Lanaux
>


 
Reply With Quote
 
Steve Burrus
Guest
Posts: n/a
 
      05-16-2004
>Jean-Paul Lanaux wrote:
> .....My main question:
>
> I want to develop an application that runs from a browser window as an
> applet using Java. I want to be able to read files from the same server
> and directory structure which has the html files. The files that I would
> be reading would be jpg's and gif's and either text files or binary
> files for the data. It would also be nice to write to the directory, but
> at this point I would just be satisfied to be able to just read files.
> ....


Jean-Paul, I really haven't read ALL of the various responses back to
your original post just yet, but I would "echo" all of those responses
that have urged u to please send to us the applet code that you are now
working with!




 
Reply With Quote
 
Jean-Paul Lanaux
Guest
Posts: n/a
 
      05-17-2004
In article <(E-Mail Removed)>, look-
http://www.velocityreviews.com/forums/(E-Mail Removed)lid says...
> On Sun, 16 May 2004 14:04:24 GMT, Jean-Paul Lanaux <(E-Mail Removed)>
> wrote or quoted :
>
> > Can I do this from a jar file
> >without having to use certificates and/or java policy file
> >modifications.

>
> To read images from jar files, or the server see
> http://mindprod.com/jgloss/image.html
>
> Also see http://mindprod.com/fileio.html
> to see how to do HTTP gets to fetch them from a server at the socket
> level.
>
>

I am going to attempt to figure this out with the info I received from
this group. If I can't figure it out, I will post the code.

I was working on this project between semesters, and I put it down in
January. School just finished so I would like to pick it up again. But
in the mean time I have to get back up to speed with the code.

Thanks to all that responded.
-jpl-
 
Reply With Quote
 
Andrew Thompson
Guest
Posts: n/a
 
      05-17-2004
On Mon, 17 May 2004 07:27:14 GMT, Jean-Paul Lanaux wrote:

> I am going to attempt to figure this out
> with the info I received from this group.
> If I can't figure it out, I will post the code.


Linking to it at Geocities might be a
better idea, especially since it is
an applet(!). If posting to the group
itself, it is important to keep it short.

For tips..
<http://www.physci.org/codes/sscce.jsp>

But ..you are only going to post if
you have a problem?

What about if you create a wonderful
applet.. Is the source going to be
secret?

--
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
How do i write a code that reads a site, then takes the neccisary information Dustinscape@gmail.com Java 5 03-28-2006 06:25 PM
Driver no longer reads burned cd's when they are loaded BUT still reads manufactured cd's no prob JD Computer Support 5 04-14-2005 01:50 AM
[Applet] Image-Upload to Server via Applet+PHP Roland Poellinger Java 1 03-12-2005 07:23 AM
CD reads data files as audio whenindoubt Computer Support 1 06-17-2004 09:56 PM
how to write a python program tht reads (x,y) Selbourne makhomo Python 0 05-16-2004 12:58 PM



Advertisments