help?
hi, I go two qns to ask, hope someone could help mi out =)
1) Can I use integrate javascript with JSP codes in a single JSP page?
2)If i want to encrypt something without using SSL, how do i encrypt a text on client side, then send to server the encrypted text? I can't use javascript cos this will make the algorithm visible to the client.
Thanks
[380 byte] By [
des_xu] at [2007-9-26 1:14:37]

> hi, I go two qns to ask, hope someone could help mi
> out =)
>
> 1) Can I use integrate javascript with JSP codes in a
> single JSP page?
Ans: You can of course use JSP and Javascript on the same page if you use client side javascript.
You can even generate your javascripts dynamically using JSP if the requirements are such... however use that with caution as the code will lack readability
> 2)If i want to encrypt something without using SSL,
> how do i encrypt a text on client side, then send to
> server the encrypted text? I can't use javascript cos
> this will make the algorithm visible to the client.
>
Ans: Why don't u use an applet in your page to encode data, and send it back to your server using sockets ?
sorry, another thing, is there a way of passing a value you get with javascript, for example, this.form.password.value, to a JSP variable, for example, String password?
They cannot be passed directly... you will have to submit a form.
As for your other question.... I don't have a code in according to your requirements... I am basically a JSP/Javascript guy.
However as a case study , I wrote a chat application(poorly done...) which opens a socket connection back to the server, but not to the web/application server , but to another listening program written by me...
If that code helps , I can mail you that...though I think it won't help much as You probably want to open a socket connection to your web/app server.
oh..sure, my email is squall_leonhart82@hotmail.comwell, I can need any help now, thanks alot =)