Redirection through jsp

Redirection through jsp SearchSearch
Author Message
hitesh
New member
Username: Hit1808

Post Number: 1
Registered: 03-2011
Posted on Tuesday, March 29, 2011 - 02:32 pm:   

i m using send redirect method in jsp for a web application.i dont want nowsms window notifyin message sent i just wanna execute the url http://localhost:8800/text=""......... since it will called multiple times with different phno n text,i dont want the "message sent" window on the screen...how do i do that?.I am using nowsms with GSMmodem..pls pls help ....
Des - NowSMS Support
Board Administrator
Username: Desosms

Post Number: 3065
Registered: 08-2008
Posted on Tuesday, March 29, 2011 - 05:09 pm:   

Hi,

I don't have any experience with JSP, so I'm not sure how much Java code and capabilities are available from within JSP.

So let me explain conceptually what you want to do, and then I'll give you a few pointers that might lead you in the right direction.

I don't think you want to do a redirect for several reasons.

One reason is that the redirect sends the URL back to the client browser, and the request to send the message is made from the client browser. This means that the client browser needs to be able to initiate a connection directly to your NowSMS server, which may not be a good idea.

What is usually preferable is to have the server application initiate the HTTP connection to the NowSMS server. This involves the server initiating an HTTP GET request to the NowSMS server, and the client never sees this happening.

In other words, your application performs this HTTP GET instead of sending it to the client as a redirect.

I did some Googling, and it is very difficult to find the right keywords to determine how to do this from within JSP. But I think if you search using keywords JSP fetch external URL, then this will give you some good pointers.

This link in particular looked interesting to me: http://www.codingforums.com/archive/index.php/t-44953.html

If the above link is true, and you can use the java.net.URL object from within JSP, then maybe you could just use our full Java example, which uses java.net.URL: http://www.nowsms.com/nowsms-java-example-send-sms-message

--
Des
NowSMS Support
hitesh
New member
Username: Hit1808

Post Number: 2
Registered: 03-2011
Posted on Wednesday, March 30, 2011 - 03:12 pm:   

Thanks a lot that java file really helped me !!! :)
nice support!!