Hi Jin ....
Actually i was trying to figure out why would u want to do that.. could
you please tell me..
i just mean that if the user want to open an html page which should
invoke a servlet then why not directly open the servlet rather than an
html..
but i guess it would be for soe kinda defaut.html...

is it so ???

Solution...
===================================
<script>
function init()
{
        location.redirect = servlet-to-open
}
</script>

<BODY OnLoad="init()" >
=====================================

could be either location.redirect or location.open...
one of the two...
u could find it in the javascript about the location object...

tell me if u didnt understand

deneb
:)



Jinfeng Ni wrote:
>
> hi,
>       I meet a problem. I want to run a servlet when user open
> one html. I edit the html file like this:
>
> <html>
> <head>
> <title>Untitled Document</title>
> <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
> </head>
> <body bgcolor="#FFFFFF">
> <script language="JavaScript" src="/servlet/Hello">
> </script>
> </body>
> </html>
>
> ==========================================
> But it failed. I  was told that there is a syntax error!
>
> How to implent this request?
>
> Any help will be appreciate!
>
> Jeff Ni
>
> _____________________________________________
> 263�׶�����--�й��˵����ϼ�԰ http://www.263.net
> ���ʡ���ѡ�����ʡ�����ѣ��충�����׵��ӿ��http://www.soim.com
> �����ţ��㣬��������Ʒ��http://www.thepoints.com
>
> ___________________________________________________________________________
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
> of the message "signoff SERVLET-INTEREST".
>
> Archives: http://archives.java.sun.com/archives/servlet-interest.html
> Resources: http://java.sun.com/products/servlet/external-resources.html
> LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to