<script language ="JavaScript" runat="server">----runat=server not working
1 posts in topic
Flat View  Flat View

Posted By:   P_Manchanda
Posted On:   Wednesday, June 20, 2001 07:12 AM

i am using IBM WebSphere 3.5 Advanced edition.I am running a jsp file which has following block of code in it.

the problem is that if i use "request" within this block and i run it then "request is undefined" message appears.
I think the related to this is the fact that when i view source on the client side, it shows this block of code, though it ws supposed to be executed on the server side.
So do i need to make some settings in the WAS for this

Re: <script language ="JavaScript" runat="server">----runat=server not working

Posted By:   AlessandroA_Garbagnati  
Posted On:   Wednesday, June 20, 2001 08:19 AM


You are confusing Javascript and Java. They are absolutely not the same thing!

The javascript code it's executed on the client side (it's the browser that interpretes the code), while the java code it's executed on the server side and the result is send to the browser.

The request object is a server side object, and the browser can't know anything about it.

If you need to have some Javascript code executed on the server, you should use a web server capable of that functionality, and I don't know any web server that it's able to mix JSP (Java) with Javascript ServerSide.

About | Sitemap | Contact