can any one tell the meaning and functionality of this ASP file
hi youth , can any one tell the meaning and functionality of this ASP file , and i have to migrate this file into JSP file,
can any one analyse this file and tell me how i could migrate it to JSP.
tmpfile=server.mappath(FileToRead) 'convert virtual path to physical path
Set fs = CreateObject("Scripting.FileSystemObject") 'create instance of FileSystemObject
Set thisfile = fs.OpenTextFile(tmpfile, 1, False) 'Open file for reading
tempSTR=thisfile.readall 'Read contents of file
response.write tempSTR 'Write contents of include file
filename4="includes/" & Session("BannerName")
Well somewhere along the way a Session level variable called BannerName was created. The ASP Session objest is used to retreive the contents of this variable which is combined with the path "includes/" and stored in the variable filename4. This file is located on the webserver which is relative to the location of the original web page so the ReadDisplayFile sub must use the ASP Server object to map the location of this file. Then the sub creates a FileSystemObject to open and read the contents of the file into the tempSTR variable. Once that has been done then the ASP responce object is used to write the contents of tempSTR back to the web page being constructed. Finally the file is closed and the object variables are reset to free up resources.
If interested, you can also check out J-ASP by NetCoole Migration Services.
Managing Technical Editor
By benbo in forum Database
Last Post: 06-21-2005, 09:26 PM
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center