Thread View: aus.computers.java
5 messages
5 total messages
Started by sydneyshan
Tue, 06 Jun 2000 00:00
FTP integrated updating script
Author: sydneyshan
Date: Tue, 06 Jun 2000 00:00
Date: Tue, 06 Jun 2000 00:00
28 lines
1650 bytes
1650 bytes
Hi all, I'm designing a web site for a client and have run in to the need to integrate some java into it for easy maintainance. Basically, on the website (as usual, source files will be accessable through passworded FTP), there will be a standard HTML page with images, tables, links AND "Hot News" on it. The Hot News table is the trouble area, as I don't want the client to have to get in to updating it via an HTML editor and FTP client, but using an on-site Javascript to do so. This means the client will type (or paste) the latest news in to a field (or java-generated text dialog) and click "Update". From here, the javascript will upload a rendition of the existing HTML document with the new Hot News, replacing the previous document on the FTP site. Is this possible using Java/Javascript? If so, how would you go about it? Thanks in advance! -Shannon Murdoch
Re: FTP integrated updating script
Author: Alan Boldock
Date: Tue, 06 Jun 2000 00:00
Date: Tue, 06 Jun 2000 00:00
65 lines
3271 bytes
3271 bytes
Perhaps you shouldn't be looking at JavaScript as that runs in the browser on the client side of the process, rather you need to look at some way of getting the file up to the site, this really needs to be done using Server side processing. There are many ways of doing this. You would use some kind of processing of the form this could be using a CGI scripting language (e.g. Perl, PHP, Python etc) or you could go to the "Dark Side" and use Active Server Pages (ASP). The preferred solution for this Newsgroup would be some serverside Java i.e. a Java Servlet or Java Server Pages (JSP) (which becomes a Servlet) you could get the form to submit to the Servile that knows the HTML file that the field is to be merged into and the code could do that. The code wouldn't be too hard write. The biggest problem you have is that you probably don't have an application server (that the servlets run it) so you may need to look at some other CGI approach. If your deploying onto an Hosting Service you need to check with them as to what they provide. In my Experience most provide some kind of Perl CGI's but many won't allow you to write your own Perhaps another approach is getting the users to edit a file on their machine that is then uploaded (FTP) to the server. That way getting around the form submission/processing problem. Another alternative is use Lotus/Domino its made for that sort of thing :-) Alan Boldock alan@boldenterprise.com.au "sydneyshan" <sydneyshan@hotmail.com> wrote in message news:393CE68B.696168B1@hotmail.com... > > Hi all, > > I'm designing a web site for a client and have run in > to the need to integrate some java into it for easy > maintainance. > > Basically, on the website (as usual, source files will be accessable > through > passworded FTP), there will be a standard HTML page with > images, tables, links AND "Hot News" on it. > > The Hot News table is the trouble area, as I don't want the > client to have to get in to updating it via an HTML editor and > FTP client, but using an on-site Javascript to do so. > > This means the client will type (or paste) the latest news in > to a field (or java-generated text dialog) and click "Update". > From here, the javascript will upload a rendition of the > existing HTML document with the new Hot News, replacing > the previous document on the FTP site. > > Is this possible using Java/Javascript? > > If so, how would you go about it? > > Thanks in advance! > -Shannon Murdoch >
Re: FTP integrated updating script
Author: sydneyshan
Date: Wed, 07 Jun 2000 00:00
Date: Wed, 07 Jun 2000 00:00
83 lines
4261 bytes
4261 bytes
Yeah I was afraid that CGI/Perl etc would need to be involved. Have a look at http://www.baillie951.freeserve.co.uk/WPMaker/Direct/Index.htm he has been able to create a 'webpage' from java and html source. I don't think he has any FTP commands there though. If his script could be adapted to include uploading the page to an FTP server instead of displaying it, I think it would work. I am unclear about Java's functionality in relation to FTP uploading/interfacing. Also, have a look at http://www.crosswinds.net/~shannonmurdoch/ftpscriptjava.html for a little bit of java/FTP integration. If you could some how merge these two scripts so that the page is uploaded instead of displayed, it would work perfectly! Can it be done? Alan Boldock wrote: > Perhaps you shouldn't be looking at JavaScript as that runs in the > browser on the client side of the process, rather you need to look at > some way of getting the file up to the site, this really needs to > be done using Server side processing. There are many ways of > doing this. You would use some kind of processing of > the form this could be using a CGI scripting language > (e.g. Perl, PHP, Python etc) or you could go to the "Dark Side" > and use Active Server Pages (ASP). The preferred > solution for this Newsgroup would be some serverside Java > i.e. a Java Servlet or Java Server Pages (JSP) (which becomes a Servlet) you > could get the form to submit to the Servile that knows the HTML > file that the field is to be merged into and the code could do that. The > code wouldn't be too hard write. > > The biggest problem you have is that you probably don't have > an application server (that the servlets run it) so you may need to look > at some other CGI approach. > > If your deploying onto an Hosting Service you need to check with them as to > what they provide. In my Experience most provide some kind of Perl CGI's > but many won't allow you to write your own > > Perhaps another approach is getting the users to edit a file on their > machine > that is then uploaded (FTP) to the server. That way getting around the form > submission/processing problem. > > Another alternative is use Lotus/Domino its made for that sort of thing :-) > > Alan Boldock > alan@boldenterprise.com.au > > "sydneyshan" <sydneyshan@hotmail.com> wrote in message > news:393CE68B.696168B1@hotmail.com... > > > > Hi all, > > > > I'm designing a web site for a client and have run in > > to the need to integrate some java into it for easy > > maintainance. > > > > Basically, on the website (as usual, source files will be accessable > > through > > passworded FTP), there will be a standard HTML page with > > images, tables, links AND "Hot News" on it. > > > > The Hot News table is the trouble area, as I don't want the > > client to have to get in to updating it via an HTML editor and > > FTP client, but using an on-site Javascript to do so. > > > > This means the client will type (or paste) the latest news in > > to a field (or java-generated text dialog) and click "Update". > > From here, the javascript will upload a rendition of the > > existing HTML document with the new Hot News, replacing > > the previous document on the FTP site. > > > > Is this possible using Java/Javascript? > > > > If so, how would you go about it? > > > > Thanks in advance! > > -Shannon Murdoch > >
Re: FTP integrated updating script
Author: Alan Boldock
Date: Wed, 07 Jun 2000 00:00
Date: Wed, 07 Jun 2000 00:00
137 lines
6087 bytes
6087 bytes
The JavaScript is very primitive. Its essentially
function NewPage()
var passname=document.myform.tit.value
var passage=document.myform.hed.value
var passbody=document.myform.bod.value
myWin = window.open ("about:blank", "myWin");
myWin.document.open ();
myWin.document.write ("<html><head>");
myWin.document.write ("<meta name='created by'
content='Web Page Maker'>");
myWin.document.write ("<meta name='Version'
content='version 1.0'>");
myWin.document.write ("<meta name='where can i get
web page maker'
content='http://www.baillie951.freeserve.co.uk/WPMaker - Its free'>");
myWin.document.write ("<title>" + passname +
"</title>");
myWin.document.write (""+ passage +"");
myWin.document.write ("" + passbody + "");
myWin.document.write ("</body></html>");
}
and it doesn't upload a thing.
you could make this a lot more sophisticated and to include your HTML. But
as
stated before your problem is the upload.
As for the other site all it does is for a URL to connect to an FTP site
again it does no upload. I've looked in my "O'Reilly: JavaScript the
Definitive Guide"
and can't see any way of doing an FTP upload in JS but I could be wrong.
Alan Boldock
alan@boldenterprise.com.au
"sydneyshan" <sydneyshan@hotmail.com> wrote in message
news:393DA3C8.B324588C@hotmail.com...
> Yeah I was afraid that CGI/Perl etc would need to be involved.
> Have a look at
http://www.baillie951.freeserve.co.uk/WPMaker/Direct/Index.htm
> he has been able to create a 'webpage' from java and html source. I don't
> think he has any FTP commands there though.
> If his script could be adapted to include uploading the page to an FTP
server
> instead of displaying it, I think it would work. I am unclear about
Java's
> functionality in relation to FTP uploading/interfacing.
>
> Also, have a look at
> http://www.crosswinds.net/~shannonmurdoch/ftpscriptjava.html
> for a little bit of java/FTP integration.
>
> If you could some how merge these two scripts so that the page is uploaded
> instead of displayed, it would work perfectly!
>
> Can it be done?
>
>
> Alan Boldock wrote:
>
> > Perhaps you shouldn't be looking at JavaScript as that runs in the
> > browser on the client side of the process, rather you need to look at
> > some way of getting the file up to the site, this really needs to
> > be done using Server side processing. There are many ways of
> > doing this. You would use some kind of processing of
> > the form this could be using a CGI scripting language
> > (e.g. Perl, PHP, Python etc) or you could go to the "Dark Side"
> > and use Active Server Pages (ASP). The preferred
> > solution for this Newsgroup would be some serverside Java
> > i.e. a Java Servlet or Java Server Pages (JSP) (which becomes a Servlet)
you
> > could get the form to submit to the Servile that knows the HTML
> > file that the field is to be merged into and the code could do that. The
> > code wouldn't be too hard write.
> >
> > The biggest problem you have is that you probably don't have
> > an application server (that the servlets run it) so you may need to look
> > at some other CGI approach.
> >
> > If your deploying onto an Hosting Service you need to check with them
as to
> > what they provide. In my Experience most provide some kind of Perl CGI's
> > but many won't allow you to write your own
> >
> > Perhaps another approach is getting the users to edit a file on their
> > machine
> > that is then uploaded (FTP) to the server. That way getting around the
form
> > submission/processing problem.
> >
> > Another alternative is use Lotus/Domino its made for that sort of thing
:-)
> >
> > Alan Boldock
> > alan@boldenterprise.com.au
> >
> > "sydneyshan" <sydneyshan@hotmail.com> wrote in message
> > news:393CE68B.696168B1@hotmail.com...
> > >
> > > Hi all,
> > >
> > > I'm designing a web site for a client and have run in
> > > to the need to integrate some java into it for easy
> > > maintainance.
> > >
> > > Basically, on the website (as usual, source files will be accessable
> > > through
> > > passworded FTP), there will be a standard HTML page with
> > > images, tables, links AND "Hot News" on it.
> > >
> > > The Hot News table is the trouble area, as I don't want the
> > > client to have to get in to updating it via an HTML editor and
> > > FTP client, but using an on-site Javascript to do so.
> > >
> > > This means the client will type (or paste) the latest news in
> > > to a field (or java-generated text dialog) and click "Update".
> > > From here, the javascript will upload a rendition of the
> > > existing HTML document with the new Hot News, replacing
> > > the previous document on the FTP site.
> > >
> > > Is this possible using Java/Javascript?
> > >
> > > If so, how would you go about it?
> > >
> > > Thanks in advance!
> > > -Shannon Murdoch
> > >
>
Re: FTP integrated updating script
Author: sydneyshan
Date: Wed, 07 Jun 2000 00:00
Date: Wed, 07 Jun 2000 00:00
146 lines
6764 bytes
6764 bytes
Damn. Thanks for your help Alan. I've got a backup plan to get it sorted out
(will host on a Lotus Notes Domino server, allowing the user to update
everything using their Lotus Notes intranet.)
Looks like Java is a bit of a fizzer when it comes to FTP.
Thanks again,
Shannon Murdoch
-Sydney
Alan Boldock wrote:
> The JavaScript is very primitive. Its essentially
>
> function NewPage()
>
> var passname=document.myform.tit.value
> var passage=document.myform.hed.value
> var passbody=document.myform.bod.value
>
> myWin = window.open ("about:blank", "myWin");
> myWin.document.open ();
> myWin.document.write ("<html><head>");
> myWin.document.write ("<meta name='created by'
> content='Web Page Maker'>");
> myWin.document.write ("<meta name='Version'
> content='version 1.0'>");
> myWin.document.write ("<meta name='where can i get
> web page maker'
>
> content='http://www.baillie951.freeserve.co.uk/WPMaker - Its free'>");
> myWin.document.write ("<title>" + passname +
> "</title>");
> myWin.document.write (""+ passage +"");
> myWin.document.write ("" + passbody + "");
> myWin.document.write ("</body></html>");
>
> }
>
> and it doesn't upload a thing.
>
> you could make this a lot more sophisticated and to include your HTML. But
> as
> stated before your problem is the upload.
>
> As for the other site all it does is for a URL to connect to an FTP site
> again it does no upload. I've looked in my "O'Reilly: JavaScript the
> Definitive Guide"
> and can't see any way of doing an FTP upload in JS but I could be wrong.
>
> Alan Boldock
> alan@boldenterprise.com.au
>
> "sydneyshan" <sydneyshan@hotmail.com> wrote in message
> news:393DA3C8.B324588C@hotmail.com...
> > Yeah I was afraid that CGI/Perl etc would need to be involved.
> > Have a look at
> http://www.baillie951.freeserve.co.uk/WPMaker/Direct/Index.htm
> > he has been able to create a 'webpage' from java and html source. I don't
> > think he has any FTP commands there though.
> > If his script could be adapted to include uploading the page to an FTP
> server
> > instead of displaying it, I think it would work. I am unclear about
> Java's
> > functionality in relation to FTP uploading/interfacing.
> >
> > Also, have a look at
> > http://www.crosswinds.net/~shannonmurdoch/ftpscriptjava.html
> > for a little bit of java/FTP integration.
> >
> > If you could some how merge these two scripts so that the page is uploaded
> > instead of displayed, it would work perfectly!
> >
> > Can it be done?
> >
> >
> > Alan Boldock wrote:
> >
> > > Perhaps you shouldn't be looking at JavaScript as that runs in the
> > > browser on the client side of the process, rather you need to look at
> > > some way of getting the file up to the site, this really needs to
> > > be done using Server side processing. There are many ways of
> > > doing this. You would use some kind of processing of
> > > the form this could be using a CGI scripting language
> > > (e.g. Perl, PHP, Python etc) or you could go to the "Dark Side"
> > > and use Active Server Pages (ASP). The preferred
> > > solution for this Newsgroup would be some serverside Java
> > > i.e. a Java Servlet or Java Server Pages (JSP) (which becomes a Servlet)
> you
> > > could get the form to submit to the Servile that knows the HTML
> > > file that the field is to be merged into and the code could do that. The
> > > code wouldn't be too hard write.
> > >
> > > The biggest problem you have is that you probably don't have
> > > an application server (that the servlets run it) so you may need to look
> > > at some other CGI approach.
> > >
> > > If your deploying onto an Hosting Service you need to check with them
> as to
> > > what they provide. In my Experience most provide some kind of Perl CGI's
> > > but many won't allow you to write your own
> > >
> > > Perhaps another approach is getting the users to edit a file on their
> > > machine
> > > that is then uploaded (FTP) to the server. That way getting around the
> form
> > > submission/processing problem.
> > >
> > > Another alternative is use Lotus/Domino its made for that sort of thing
> :-)
> > >
> > > Alan Boldock
> > > alan@boldenterprise.com.au
> > >
> > > "sydneyshan" <sydneyshan@hotmail.com> wrote in message
> > > news:393CE68B.696168B1@hotmail.com...
> > > >
> > > > Hi all,
> > > >
> > > > I'm designing a web site for a client and have run in
> > > > to the need to integrate some java into it for easy
> > > > maintainance.
> > > >
> > > > Basically, on the website (as usual, source files will be accessable
> > > > through
> > > > passworded FTP), there will be a standard HTML page with
> > > > images, tables, links AND "Hot News" on it.
> > > >
> > > > The Hot News table is the trouble area, as I don't want the
> > > > client to have to get in to updating it via an HTML editor and
> > > > FTP client, but using an on-site Javascript to do so.
> > > >
> > > > This means the client will type (or paste) the latest news in
> > > > to a field (or java-generated text dialog) and click "Update".
> > > > From here, the javascript will upload a rendition of the
> > > > existing HTML document with the new Hot News, replacing
> > > > the previous document on the FTP site.
> > > >
> > > > Is this possible using Java/Javascript?
> > > >
> > > > If so, how would you go about it?
> > > >
> > > > Thanks in advance!
> > > > -Shannon Murdoch
> > > >
> >
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads