hi

i think (but i not known) that the best solution is to combine <script src>
and the pageContext object...

in your jsp you set an Attribute :

-------------index.jsp code----------------

<%
pageContext.setAttribute(session.getId()+"callJs",new
Boolean(true),pageContext.SESSION_SCOPE);
%>

<script language="javascript" src="js.jsp">
</script>

---------------------js.jsp code--------------------

<%
    if (pageContext.getAttribute(session.getId()+"callJs")==null)
        return;
%>

function xx(){

}

<%
    pageContext.removeAttribute(session.getId()+"callJs");
%>

--------------------------end-----------------

in that way it's may be imposible to read your js.jsp without calling the
page which include it. with the <script src>-tag it wouldn't be shown in
your browser...

sebaschu

-----Das Leben ist ein beschissenes Adventure - Aber die Grafik ist geil!

----- Original Message -----
From: "Miao, Franco CAWS:EX" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, October 25, 2001 11:21 PM
Subject: hide JavaScript ?


> How to hide JavaScript, disallow people see the source code with Brower's
> source manus?
>
> Franco
>
>
===========================================================================
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
> For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
DIGEST".
> Some relevant FAQs on JSP/Servlets can be found at:
>
>  http://archives.java.sun.com/jsp-interest.html
>  http://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.jsp
>  http://www.jguru.com/faq/index.jsp
>  http://www.jspinsider.com

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com

Reply via email to