Downloading a .sis file through JSP

Hi guys,

I have .sis file on my server. and i want to install it on a cell without giving a link access to my user. I am sending my link in the following format.

if(rs.next())

{

url= rs.getString(1);

}

response.setContentType("application/vnd.symbian.install");

response.sendRedirect(url);

(I am retrieving my .sis file url from database)

but i m not able to do it, I am getting a null pointer exception.

is there any modofications that i have to make in my code. please tell me how to do this.

with regards,

shirish.

(new to java development. if there is any logical mistake, try to help me out.)

[773 byte] By [Sunnie_200210324a] at [2007-11-26 21:18:26]
# 1
at what point you are getting the null pointer exception?can you paste the stacktrace here
arunmp25a at 2007-7-10 2:57:22 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 2

After you solve the NPE, you could try to read the file yourself and sent the contents in the response as you already set the header.

If i'm not making some incorrect assumption, when you redirect the user to the new URL he/she will be able to see the new location (redirect asks the browser to go to the next location). If you want to prevent this, then do a forward instead of a redirect (request.getRequestDispatcher(url).forward(request, response)); or send the contents of the .sis file directly.

benubacha at 2007-7-10 2:57:22 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...