|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Generate data entry and reporting .NET Web apps in minutes, straight from your database. Read our FREE whitepaper “Build Web 2.0 Applications Without Hand-Coding” Download now! |
|
#1
|
|||
|
|||
|
[WAP]download content by redirection to the file
Hi,
I'm trying to make my own WAP server... For downloading contents, I build a path that can reach a file, like for ex : http://200.56.3.3/Contents/Poly/cansion.mid and i redirect the client to this path. The Problem : It works with the Ericsonn K500i, but it doesn't work with a Motorola C333. It tells me the content cannot be acceded... But when I proceed differently ( with a link instead of a redirection), it s ok,it download with the motorola.... I guess it has something to do with the WAP version (v1.2.1 and v2), but I don't know how to fix it... Here is what I've tried : (I use JSP/Tomcat) I need a redirection a redirection while executing (<jsp:forward...), i don t know why, but with a redir in the compilation (response.sendRedirect), it doesn t work.... I tried do redirect it to another page which set the content type, and the attachment in the header ... response.setHeader("Content-Disposition","attachment; filename=\""+path+"\""); This only work with IE. And I don t have more ideas.......... If you have an idea, please let me know, I d be happy ![]() Thanks Xoco |
|
#2
|
|||
|
|||
|
hey,
me and my friend working on the nearly same subject. The other way to reach the file without link and redirect is to write it binary. here is the code for ASP hope it helps.. ------------------------------------------ filename = "c:\" filename1 = "a.amr" Response.ContentType = "audio/AMR" Response.AddHeader "content-disposition", "attachment; filename=" & FileName1 Set Stream = server.CreateObject("ADODB.Stream") Stream.Open Stream.LoadFromFile filename & filename1 Contents = Stream.ReadText Response.BinaryWrite Contents Stream.Close Set Stream = Nothing ---------------------------------------------- but the sendredirect is better and i easy to code. i never set content type when sending redirection. |
|
#3
|
|||
|
|||
|
Hi,
Thanks for your response, but I don t find a way to write te response in binary in JSP.. But I will look for it, thanks for the idea. ![]() Quote:
|
|
#4
|
|||
|
|||
|
Hi, theloveless,
I found a lot of things thanks to what you ve told me. Nevertheless, I ve one more question : Why my technique above (just serve a link until the file) works with the Ericsson K500i, and not with the Motorola C333. Is it because of the version of WAP (2.0 and 1.2.1)??? Thanks for your help Quote:
|
|
#5
|
|||
|
|||
|
well the first thing that comes to my mind to change the gprs configuration of that phone again.
there is two way of connecting to a wap site as i work on that stuff... first is the services like in nokia and the other one is the browser. i work with a ericsson p900 and couldn't connect to my wap site so i changed the configurations and set them so the default gateway to services become the new ones and my problem is solved. i hope it helps.... |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > WAP Programming > [WAP]download content by redirection to the file |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|