Re: not html

1999-06-10 Thread Pinky Thakkar

Which application server are you using?


-Original Message-
From: Vincent Roderick [mailto:[EMAIL PROTECTED]]
Sent: Monday, June 07, 1999 12:54 PM
To: [EMAIL PROTECTED]
Subject: Re: not html


What version of the implementation are you running, what platform, and what
JDK version do you have?

> -Original Message-
> From: olivier gerbehaye [SMTP:[EMAIL PROTECTED]]
> Sent: Monday, June 07, 1999 2:27 PM
> To:   [EMAIL PROTECTED]
> Subject:  not html
>
> Hi everybody
>
> I use the jsp implementation from sun
> When I test a jsp file, I have no problem. The server display the
> page but when I try to display a "html" file I receive
> Error 404 no detailed message
> could somebody tell me why ?
>
> (I cannot display the exemples with
> http://localhost:8080/index.html but I have to change the extension
> to index.jsp)
>
> Thank a lot
> olivier
>
>
> __
> Get Your Private, Free Email at http://www.hotmail.com
>
> ==
> =
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the
> body
> of the message "signoff JSP-INTEREST".  For general help, send email to
> [EMAIL PROTECTED] and include in the body of the message "help".

===
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JSP-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

===
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JSP-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".



Application scope

1999-05-13 Thread Pinky Thakkar

hi.

i have one more question.

Will this bean support multi-threading?

Basically wot i want to do is increment the value of the variable before it
is read, (so,i will have to write another function called:readIndex()).
Now do i have to write a mechanism for locking the variable when it is read
or the environment will take care of it?

[
for those who know ASP, i want to do something like:
<%
Application.Lock
Application(no)= Application(no)+1
Application.Unlock
%>
]


Thanks everybody for the help,
Pinky





-Original Message-
From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 12, 1999 1:22 PM
To: Pinky Thakkar
Cc: [EMAIL PROTECTED]
Subject: Re: Application scope


Pinky Thakkar wrote:

> Hi,
>
> I want to define a variable: index, which has an application scope.
> {
> like in ASP, i would write something like :
>
> Application("index")=0
> }
>
> How do i do it in JSP?
>
> Thanks,
> Pinky

First thing - you cannot store primitive objects (like an int) in one of
these
scopes -- only objects.  So, you'd probably create yourself a Counter class
something like this:

public class Counter {

private int value = 0;

public Counter() {
;// No-args constructor required for instantiation from a
JSP
page
}

public Counter(int initialValue) {
value = initialValue;
}

public int getValue() {
return (value);
}

public void setValue(int newValue) {
value = newValue;
}

}

Next, you can cause an object like this to be added to the application scope
from either a Servlet or a JSP page.  From a servlet, it would be created
like
this:

getServletContext().setAttribute("index", new Counter());

and accessed (say, to increment the value) -- ignoring synchronization
issues
-- with:

Counter index = (Counter) getServletContext().getAttribute("index");
int currentValue = index.getValue();
index.setValue(currentValue + 1);
// Note -- no need to re-store the object


>From a JSP page (1.0 syntax) create it (if not present already) with:



and access it by using the name specified for the ID ("Index" in this
example).  Essentially, the "Counter index ..." declaration above is done
for
you by the JSP page compiler.

Craig McClanahan

===
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JSP-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".



Application scope

1999-05-12 Thread Pinky Thakkar

Hi,

I want to define a variable: index, which has an application scope.
{
like in ASP, i would write something like :

Application("index")=0
}

How do i do it in JSP?

Thanks,
Pinky

===
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JSP-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".



q question abt. JSP

1999-05-07 Thread Pinky Thakkar

hi,

I just began reading white papers in JSP i.e. JavaServerPages Specification.
In the document, there is lot of reference to XML. I don't know XML at all,
but i know ASP pretty well.

So my question is: do i have to know XML before trying to understand JSP?

thanks,
Pinky

===
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JSP-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".