Re: JSP page refresh option

2003-03-13 Thread Ashwani Kalra

When user presses the back button of browser, and does some operation and
presses submit or other button, the request will go to server. And before
trying anything you should always check if user is in session or not, else
redirect him to the login page.
Client browser can override the attributes as described below. But you
should also use them




Sanchez, Enrique
(CORP, DDEMESIS)  To: [EMAIL PROTECTED]
[EMAIL PROTECTED]cc: (bcc: ashwani.kalra/Polaris)
IS.GE.COM Subject: Re: JSP page refresh 
option
Sent by: A mailing list
about Java Server Pages
specification and
reference
[EMAIL PROTECTED]
COM


03/14/2003 04:05 AM
Please respond to A
mailing list about Java
Server Pages
specification and
reference







You will need to set the appropriate HTTP header attributes to prevent the
dynamic content output by the JSP page from being cached by the browser.

Just execute the following scriptlet at the beginning of your JSP pages to
prevent them from being cached at the browser. You need both the statements
to take care of some of the older browser versions.

%
response.setHeader(Cache-Control,no-cache); //HTTP 1.1
response.setHeader(Pragma,no-cache); //HTTP 1.0
response.setDateHeader (Expires, 0); //prevents caching at the proxy
server
%

If the above fails, try changing the first line to

response.setHeader(Cache-Control,no-store); //HTTP 1.1

-Original Message-
From: Saket Barve [mailto:[EMAIL PROTECTED]
Sent: Jueves, 13 de Marzo de 2003 04:31 p.m.
To: [EMAIL PROTECTED]
Subject: JSP page refresh option


Is there any way for me to have my page refreshed
everytime it is opened on the browser?

I am working on a database backed web project, with
JSP as front end and Oracle, JDBC as the back end.
When I have a particular user logout of the system,
it is noticed that simply by hitting the back button
on the web browser, one is able to view and act upon
the previous pages.

session.invalidate is already implemented. I need a
way to refresh the page.

I'd appreciate any feedback at the earliest.

Thanks,
Saket




__
Do you Yahoo!?
Yahoo! Web Hosting - establish your business online
http://webhosting.yahoo.com

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff
JSP-INTEREST.
For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST
DIGEST.

Some relevant archives, FAQs and Forums on JSPs can be found at:

 http://java.sun.com/products/jsp
 http://archives.java.sun.com/jsp-interest.html
 http://forums.java.sun.com
 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 archives, FAQs and Forums on JSPs can be found at:

 http://java.sun.com/products/jsp
 http://archives.java.sun.com/jsp-interest.html
 http://forums.java.sun.com
 http://www.jspinsider.com




This e-Mail may contain proprietary and confidential information and is sent for the 
intended recipient(s) only.
If by an addressing or transmission error this mail has been misdirected to you, you 
are requested to delete this mail immediately.
You are also hereby notified that any use, any form of reproduction, dissemination, 
copying, disclosure, modification,
distribution and/or publication of this e-mail message, contents or its attachment 
other than by its intended recipient/s is strictly prohibited.

Visit Us at http://www.polaris.co.in


Re: how to use JavaBean

2003-01-16 Thread Ashwani Kalra

It should be in classpath ie all.

you can also put the class file in web-inf\classes dir. This is special dir
, and web container will automatically load the class from this folder.





Ha Duy Thien
[EMAIL PROTECTED]To: [EMAIL PROTECTED]
Sent by: A   cc: (bcc: ashwani.kalra/Polaris)
mailing list Subject: how to use JavaBean
about Java Server
Pages
specification and
reference
JSP-INTEREST@JAV
A.SUN.COM


01/16/2003 06:14
PM
Please respond to
Ha Duy Thien







Dear JSP experts around the world

I am just a JSP beginer so it seems that everything is very difficult.

I am learning JSP from the book Java Server Page by O'reilly. In that books
they have examples that use java bean (%jsp:useBean id = class= %).

Does any one know how to config in order to use Java Bean . I don't know
which directory the JSP page will look for code of Java Bean .

Thanks in advance

Thien

==To

unsubscribe: mailto [EMAIL PROTECTED] with body: signoff
JSP-INTEREST.
For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST
DIGEST.

Some relevant archives, FAQs and Forums on JSPs can be found at:

 http://java.sun.com/products/jsp
 http://archives.java.sun.com/jsp-interest.html
 http://forums.java.sun.com
 http://www.jspinsider.com





This e-Mail may contain proprietary and confidential information and is sent for the 
intended recipient(s) only.
If by an addressing or transmission error this mail has been misdirected to you, you 
are requested to delete this mail immediately.
You are also hereby notified that any use, any form of reproduction, dissemination, 
copying, disclosure, modification,
distribution and/or publication of this e-mail message, contents or its attachment 
other than by its intended recipient/s is strictly prohibited.

Visit Us at http://www.polaris.co.in



Details error message from the included page

2003-01-15 Thread Ashwani Kalra
Hi,

I am using jsp templates and dynamically including the pages using
PageContext.include fn. using Custom tags ||ar to tiles in struts

 when any error occurs in this included page I do not get the actual error.


For example  in my included jsp I am doing the following

String str=null;
str.equals(something)
if str is null then I do not get the actuall null pointer exception .

I Get Exception like one giving below. I am printing the stack Trace.

javax.servlet.ServletException
 at
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:585)
 at content.ViewPrivilegesContent_jsp_82.
_jspService(ViewPrivilegesContent_jsp_82.java:403)
 at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:139)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
 at
org.apache.jasper.runtime.JspServlet$JspServletWrapper.service(JspServlet.java:286)
 at
org.apache.jasper.runtime.JspServlet.serviceJspFile(JspServlet.java:415)
 at org.apache.jasper.runtime.JspServlet.service(JspServlet.java:544)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
 at
com.ibm.servlet.engine.webapp.StrictServletInstance.doService(ServletManager.java:827)
 at com.ibm.servlet.engine.webapp.StrictLifecycleServlet.
_service(StrictLifecycleServlet.java:159)
 at
com.ibm.servlet.engine.webapp.ServicingServletState.service(StrictLifecycleServlet.java:306)
 at
com.ibm.servlet.engine.webapp.StrictLifecycleServlet.service(StrictLifecycleServlet.java:106)
 at
com.ibm.servlet.engine.webapp.ServletInstance.service(ServletManager.java:472)
 at
com.ibm.servlet.engine.webapp.ValidServletReferenceState.dispatch(ServletManager.java:1012)
 at
com.ibm.servlet.engine.webapp.ServletInstanceReference.dispatch(ServletManager.java:913)
 at
com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:499)
 at
com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:278)
 at
com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.include(WebAppRequestDispatcher.java:111)
 at
org.apache.jasper.runtime.PageContextImpl.include(PageContextImpl.java:473)
 at tags.templates.GetTag.doStartTag(GetTag.java:56)

Note that in the last line in doStartTag fn I am including my jsp file like
this

pageContext.getOut().flush();
pageContext.include(content);


This is giving problem in debuging the page.

Any Idea on how to get the original exception


TIA
Ashwani






This e-Mail may contain proprietary and confidential information and is sent for the 
intended recipient(s) only.
If by an addressing or transmission error this mail has been misdirected to you, you 
are requested to delete this mail immediately.
You are also hereby notified that any use, any form of reproduction, dissemination, 
copying, disclosure, modification,
distribution and/or publication of this e-mail message, contents or its attachment 
other than by its intended recipient/s is strictly prohibited.

Visit Us at http://www.polaris.co.in



Re: JSP Servlets

2002-05-20 Thread Ashwani Kalra

The key word here is role separation  and avoiding mess when both programmer
and web designer are working on the jsp.

~
Cheers
Ashwani Kalra
http://www.geocities.com/ashwani_kalra/
~

- Original Message -
From: GW [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, May 20, 2002 5:46 PM
Subject: JSP  Servlets


Hi All

As far as possible JSP pages should only contain presentation data (html)
and not embedded java code. Programmatical logic should be handled in beans
and servlets and not in jsp pages.

Can someone please be kind enough to tell my why this is important?

Kind Regards
GW

=
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



Re: JSP Servlets

2002-05-20 Thread Ashwani Kalra

 1. If you have to change common code, you only have to do it in one
place:in
 the bean or servlet, not in all the pages that excute that code.
This can be achieved by including a common jsp.
2  3 are more appropriate.

Regds
Ashwani


- Original Message -
From: Francisco Manuel Martínez Suárez [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, May 20, 2002 5:55 PM
Subject: Re: JSP  Servlets


 I have three answers:

 1. If you have to change common code, you only have to do it in one
place:in
 the bean or servlet, not in all the pages that excute that code.
 2. The JSPs would handle the HTML code and/or JavaScript code making them
 more clear.
 3. It is possible then, to have a java team working separately on beans
and
 servlets and a HTML or Web-design team working on the structure and look.

 Regards

 Fran

  -Mensaje original-
  De:   GW [SMTP:[EMAIL PROTECTED]]
  Enviado el:   lunes 20 de mayo de 2002 13:16
  Para: [EMAIL PROTECTED]
  Asunto:   JSP  Servlets
 
  Hi All
 
  As far as possible JSP pages should only contain presentation data
(html)
  and not embedded java code. Programmatical logic should be handled in
  beans and servlets and not in jsp pages.
 
  Can someone please be kind enough to tell my why this is important?
 
  Kind Regards
  GW
 
 
==
  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

===
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



Re: JDBC Connection close

2002-05-14 Thread Ashwani Kalra

Proper sequence should be
resultset
statement
connection

if you diretly close the connection, then your code may behave differently
depending upon the driver. Closing the connection in finally block may give
you exception. You should always put in try block. whether connection is
closed or not is not sure but your code in finally block will always be
executed .

regds
Ashwani

- Original Message -
From: vijay [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, May 14, 2002 11:56 AM
Subject: Re: JDBC Connection close


 hi,

 if u close the connections in finally block, then it will be closed
 successfully. there will be no connections opened. its advisable to close
 the connection after closing other things

 thanks  regards
 vijayanand.R

 (),,,()
( (.  .) .-''-.
   (o  ) ) ('o'   )
 =(,,)=(,,)=(,,)==(,,)=
 - Original Message -
 From: Manoj Nahar [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Tuesday, May 14, 2002 11:38 AM
 Subject: JDBC Connection close


 Hi there,

 Does it make aby difference if i close the JDBC connection without closing
 all the resultsets and statements.

 I am closing connections is try catch finally. Is it possible that
 connections are left open even after closing them in finally

 Manoj Nahar
 http://www.naharonline.com



 --
--
 



 ---
 Outgoing mail is certified Virus Free.
 Checked by AVG anti-virus system (http://www.grisoft.com).
 Version: 6.0.361 / Virus Database: 199 - Release Date: 5/7/2002


===
 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



Re: JDBC Connection close

2002-05-14 Thread Ashwani Kalra

hi,
Connection.close() is not required just because they have to be garbage
collected.
When using the connection pool , this statement allows the pool
implementation
to return the connection to the pool. If not using pooling , then it allows
the database to clean up the resources.

regds
Ashwani



- Original Message -
From: Vikramjit Singh [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, May 14, 2002 12:27 PM
Subject: Re: JDBC Connection close


 yeah it does make a difference if you dont close the resultsets and
 statements. If you are doing procedures in oracle, then you need not care
of
 closing the resultsets coz oracle does that for you. but when u do it in
 java. oracle does not take care and you have to explicitly close the
 resultsets and statements. Though when they are not in use, javas garbage
 collection does garbage collect, the not used resultsets and statements, u
 dont know when it will be garbage collected, whether it will be also or
not.
 but if you close them explicitly they shall garbage collected. or else
most
 of the times if the resultsets or statements are open you will get an
error
 MAXIMUM OPEN CURSORS EXCEEDED.

 Regards,
 Vikramjit Singh,
 Systems Engineer,
 GTL Ltd.
 Ph. 7612929-1031


 -Original Message-
 From: Manoj Nahar [mailto:[EMAIL PROTECTED]]
 Sent: Monday, May 13, 2002 11:08 PM
 To: [EMAIL PROTECTED]
 Subject: JDBC Connection close


 Hi there,

 Does it make aby difference if i close the JDBC connection without closing
 all the resultsets and statements.

 I am closing connections is try catch finally. Is it possible that
 connections are left open even after closing them in finally

 Manoj Nahar
 http://www.naharonline.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

===
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



jar files in web-inf/lib dir

2002-05-07 Thread Ashwani Kalra

Hi,

I have two different jar files say a.jar and b.jar  in the WEB-INF/lib dir.
There is one common(also same package) file which is present in both the
jars. I am accessing this class from say servlet. Then which of the jar file
will be used for this class. Basically I want to know the sequence in which
these jar file will be placed ?

TIA
Ashwani

===
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



resources in different context

2002-05-06 Thread Ashwani Kalra

Hi,

I am having an ear file containing multiple war files with different
contexts. I am facing lot of problems in accessing the resources from one
context to other.

I need some articles that discusses on how to work with different context in
one application. For example how http session work in different context. How
to redirect or access jsp in different context  etc

Any articles ?

Regds
Ashwani Kalra

===
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



Re: PreparedStatement vs Statement

2002-05-03 Thread Ashwani Kalra

The primary reason to use PreparedStatement has nothing to do with
performance.

Have you read the article I have sent. Some body has not made the prepared
statements just because there is problem of escaping. I have only suggested
its use only when necessary and in scenarios where you can gain its
benefits..

What malicious code do you think could be inserted by users free to pick
their own names?  Answer:  lots.

Couldnt Understand what you mean by this ??

Performance will ofcourse play the major role in selecting between the two.

Cheers
Ashwani



- Original Message -
From: Jeff Schnitzer [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, May 03, 2002 11:32 AM
Subject: Re: PreparedStatement vs Statement





When you are building your query for a Statement:

String sql = SELECT * FROM theTable WHERE name = ' + name + ';

With PreparedStatement, you never need to worry about escaping.

Jeff Schnitzer
[EMAIL PROTECTED]

 -Original Message-
 From: Ashwani Kalra [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, May 02, 2002 8:58 PM
 To: [EMAIL PROTECTED]
 Subject: Re: PreparedStatement vs Statement

 Hi,
 I think other wise. Prepared statements are best to be avoided unless
you
 are trying to execute some queries which cannot be done from statement
 object.like batch processing. From the article below I can conclude
that
 gain in performance of the PStatement becomes visible only after
50-100
 successive inserts.

 Doing a simple search on google gives so much info. Instead of
guessing
 which is better please have a look at this link.

 http://www.onjava.com/pub/a/onjava/excerpt/oraclejdbc_19/

 ~
 Cheers
 Ashwani Kalra
 http://www.geocities.com/ashwani_kalra/
 ~






 - Original Message -
 From: suresh kumar Durairaj [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Friday, May 03, 2002 6:51 AM
 Subject: Re: PreparedStatement vs Statement


  Dear all,
 
  From the DB Perspective,
  use of Prepared statement reduces the memory usage as prepared
statement
  uses bind variables . The query is parsed once for several
execution. It
 is
  always recommended to use prepared statement where ever possible .
 
  Suresh
 
 
  From: Lai, Kenny [EMAIL PROTECTED]
  Reply-To: A mailing list about Java Server Pages specification and
  reference [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Subject: PreparedStatement vs Statement
  Date: Thu, 2 May 2002 14:41:20 -0400
  
  is there a considerable difference, if I create PreparedStatement
 instead
  of
  Statement after i get my DB connection?
  are there pitfalls i should be aware about (using
PreparedStatement)?
  
  kenny
  
 

===
==
 ==
  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
 
 
  _
  Join the world's largest e-mail service with MSN Hotmail.
  http://www.hotmail.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



==
 =
 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

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff JSP-INTEREST.
For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST DIGEST.
Some

Re: PreparedStatement vs Statement

2002-05-03 Thread Ashwani Kalra

Can you explain these four points in terms of  statements/preparedstatements
specially security ,stability , correctness ?

Ashwani


- Original Message -
From: Geert Van Damme [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, May 03, 2002 3:42 PM
Subject: Re: PreparedStatement vs Statement


  Performance will ofcourse play the major role in selecting
  between the two.
 


 I seriously doubt that.

 - Correctness
 - Stability
 - Security
 - Maintainability

 Are IMO all much more crucial than raw speed.

 Geert Van Damme


===
 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



Re: pls try and tell me why not working

2002-05-03 Thread Ashwani Kalra

I think request.get...  returns in String. I am not expert in java script.
But what you mentioned is an error in javascript in the bottom title bar.
Click there and see the details of the errror.

Cheers
Ashwani


- Original Message -
From: Francisco Manuel Martínez Suárez [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, May 03, 2002 4:14 PM
Subject: Re: pls try and tell me why not working


 Try to use request.getParameter(..).toString(); in both name and chk
 variables.

 Regards

 Fran Martinez


  -Mensaje original-
  De:   [Vaishali S. Pandya] [SMTP:[EMAIL PROTECTED]]
  Enviado el:   viernes 3 de mayo de 2002 11:15
  Para: [EMAIL PROTECTED]
  Asunto:   pls try and tell me why not working
 
  hello.jsp
  
  html
  headtitleHello User/title/head
  script language = javascript
   function getfocus(){
document.hello.username.focus();
   }
   function submit1(){
document.hello.action=hello.jsp?check=1
document.hello.submit()
   }
   function reset1(){
document.hello.action=hello.jsp?check=0
document.hello.submit()
   }
  /script
  body bgcolor=#ff onload = getfocus()
  table border=0 width=700
  h1
  font color = pink
  marquee
  Hi! I am Vaishali. Who are you?
  /marquee
  /h1
  form  name=hello method=Post action=hello.jsp
  input type=text name=username size=25br
  input type=submit name=submit value=Submit onclick=submit1()
  input type=submit name= reset value=Reset onclick=reset1()
  input type=hidden name = check value = 1
  %
   String name = request.getParameter(username);
   String chk  = request.getParameter(check);
   if (name != null  chk != null){
name = name.trim();
if (!(name.equals())  (chk.equals(1))){
  %
 br
 Hello %=name%
  %
}
   }
  %
  /form
  /font
  /table
  /body
  /html
 
 
 
 
  login.jsp
  
  html
  headtitle Login Window /title/head
  script language = javascript
   function getfocus(){
document.login.user.focus();
   }
   function submit1(){
document.login.action=login.jsp?check=1;
document.login.submit();
   }
   function reset1(){
document.login.user.value=;
document.login.pword.value=;
document.login.action=login.jsp?check=0;
document.login.submit();
   }
  /script
  body onload = getfocus()
  form  name=login method=Post action=login.jsp
  center
  TABLE
   TR
TDLogin/TD
TDINPUT TYPE=text NAME=user value=/TD
   /TR
   TR
TDPassword/TD
TDINPUT TYPE=password NAME=pword value=/TD
   /TR
   TR
TDINPUT TYPE=submit name=submit value=Submit onclick
  =submit1()/TD
TDINPUT TYPE=submit name=reset value=Reset
  onclick=reset1
  ()/TD
   /TR
  /TABLE
  /center
  input type=hidden name = check value = 1
 
  %
   String user = request.getParameter(user);
   String pword = request.getParameter(pword);
   String chk = request.getParameter(check);
   if(user != null  pword != null  chk != null){
if (chk.equals(0)){
  %
  script
 getfocus();
  /script
  %
}
else{
 user = user.trim();
 if (!(user.equals())){
  if (user.equals(ril)  pword.equals(india)){
  %
  script
   alert(Yes! You have done it!!!);
   document.login.action=hello.jsp
   document.login.submit()
  /script
  %
  }
  else{
  %
   Sorry! Wrong User name or Password!!!
  %
  }
 }
}
   }
  %
  /form
  /body
  /html
 
 
 
  --
  i am opening login.jsp
  gives ril and india
  it gives me alert but hello.jsp is not opening and gives me
 
  Done, but with error on page.
 
  Thanks
  Vaishali
  Reliance Ind. Ltd
  Ahmedabad
 
 
==
  =
  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
  

Re: PreparedStatement vs Statement

2002-05-03 Thread Ashwani Kalra

 My main point is that performance generally isn't that much an issue in
 server side web development.

I cant believe  this !!! . In out project we are trying hard to increase
throughput and response time/performance. These small-2 points add  and
later create problems.

 e.g. the difference between using Connection pooling or not is in the
order
 of 100 - 300 ms. In that case, it does matter.

Ok I agree


 Security: I already said that it was my favorite trick to break into asp
 sites (these generally don't use PreparedStatements. I don't know if such
a
 thing exists in asp)
 image your login check as:
 String userName = request.getParameter(userName);
 String passWord = 
 ResultSet rs = stmt.executeQuery(select userName, status from login where
 userName = '+userName+' and password = '+password+');

 Now, I can login by using userName/password
 test / test' or '1'='1

 Believe me. It works. I've seen them doing it, man ;-)

I am not including such poorly developed site.

 - Stability and correctness:
 Think about a last name lookup HTML form and I type in
 O'Connor

??

 I also think PreparedStatements are cleaner code. Think about the parallel
 with a method name and the arguments. You're not creating several methods
 that do the same thing (apart from the arguments).

I also agree . Specially if a query takes 10-15 parameters , I would prefer
Prepared statement. However for executing very smal queries like Select *
etc , I dont think it will give me any benefit.
I am again saying that use of prepared statements should be done thought
fully instead of  considering it as default  for executing the queries.

Regds
Ashwani






- Original Message -
From: Geert Van Damme [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, May 03, 2002 4:29 PM
Subject: Re: PreparedStatement vs Statement


 The difference between Statement and PreparedStatement is in the order of
 nanoseconds. I'm sure it's less than 1 ms on normal hardware.
 That means it would take  1000 requests to increase the processor time
with
 1 second. I'd say that this is cheap ;-) I'm not saying performance
doesn't
 matter at all.
 e.g. the difference between using Connection pooling or not is in the
order
 of 100 - 300 ms. In that case, it does matter.

 To answer your question:

 - Security: I already said that it was my favorite trick to break into asp
 sites (these generally don't use PreparedStatements. I don't know if such
a
 thing exists in asp)
 image your login check as:
 String userName = request.getParameter(userName);
 String passWord = 
 ResultSet rs = stmt.executeQuery(select userName, status from login where
 userName = '+userName+' and password = '+password+');

 Now, I can login by using userName/password
 test / test' or '1'='1

 Believe me. It works. I've seen them doing it, man ;-)

 - Stability and correctness:
 Think about a last name lookup HTML form and I type in
 O'Connor




 Geert Van Damme


 I also think PreparedStatements are cleaner code. Think about the parallel
 with a method name and the arguments. You're not creating several methods
 that do the same thing (apart from the arguments).

 Geert Van Damme


  -Original Message-
  From: A mailing list about Java Server Pages specification and reference
  [mailto:[EMAIL PROTECTED]]On Behalf Of Ashwani Kalra
  Sent: vrijdag 3 mei 2002 12:34
  To: [EMAIL PROTECTED]
  Subject: Re: PreparedStatement vs Statement
 
 
  Can you explain these four points in terms of
  statements/preparedstatements
  specially security ,stability , correctness ?
 
  Ashwani
 
 
  - Original Message -
  From: Geert Van Damme [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Sent: Friday, May 03, 2002 3:42 PM
  Subject: Re: PreparedStatement vs Statement
 
 
Performance will ofcourse play the major role in selecting
between the two.
   
  
  
   I seriously doubt that.
  
   - Correctness
   - Stability
   - Security
   - Maintainability
  
   Are IMO all much more crucial than raw speed.
  
   Geert Van Damme
  
  
  ==
  =
   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

Re: PreparedStatement vs Statement

2002-05-03 Thread Ashwani Kalra

Hi,

I saw this article
http://www.javaperformancetuning.com/tips/rawtips.shtml
which  tells you
a.. Use prepared statements (PreparedStatement class) [article provides
coded example of using Statement vs. PreparedStatement].

This is very vague statement.This doesnt mean that you should use it every
time.See the link  below as given in the above site . They tell you the
reason when you should use it. Which I also agree.
ie if you want to execute same statement many times differing only with
parameters to the query. This is because the statements is compiled and
cached at db end while with statement this occurs at the execution time. (I
am not db expert. Correct me if I am wrong)
http://www.as400.ibm.com/developer/java/topics/jdbctips.html

So can we say this should be the default usage?

And I am again-2 saying that I am not against it. I my self using prepared
statement(because of large no of parameters used by queries but not because
I am executing again and again). Because this is lot more cleaner then using
statement object.

 Now this is nice ??
 So you're avoiding PreparedStatements because they're slow, but you do
issue
 a select * ??
 You might start with replacing the * with the correct columns. It might
give
 you a better performance boost that the Statement.

This was just an example. I meant to say in queries which does not have many
input parameters.
example
select abc from table1 where name =var value
I am referring to var value

Hope this clear my views. You can try any site . Main compariso will be on
performance. And obviously for some queries I have to use prepared
statements which cannot be executed by Statement. Ofcourse I agree again
that code is more cleaner .

Regds
Ashwani




- Original Message -
From: Geert Van Damme [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, May 03, 2002 5:12 PM
Subject: Re: PreparedStatement vs Statement


   My main point is that performance generally isn't that much an issue
in
   server side web development.
 
  I cant believe  this !!! . In out project we are trying hard to increase
  throughput and response time/performance. These small-2 points add  and
  later create problems.
 
   e.g. the difference between using Connection pooling or not is in the
  order
   of 100 - 300 ms. In that case, it does matter.
 
  Ok I agree
 
 
   Security: I already said that it was my favorite trick to break into
asp
   sites (these generally don't use PreparedStatements. I don't
  know if such
  a
   thing exists in asp)
   image your login check as:
   String userName = request.getParameter(userName);
   String passWord = 
   ResultSet rs = stmt.executeQuery(select userName, status from
  login where
   userName = '+userName+' and password = '+password+');
  
   Now, I can login by using userName/password
   test / test' or '1'='1
  
   Believe me. It works. I've seen them doing it, man ;-)
 
  I am not including such poorly developed site.
 


 I didn't say that. But many developers do. So, I'm correct in saying that
 the PreparedStatement should be the default ;-)

 The article about the speed difference is about a specific DBMS and a
 specific Driver. I doubt that you would see the same results in another
 setup. So, unless you did proper profiling, you should never give up on
 clean code, security, .. in favor of 'supposed' performance.
 If you did proper tuning, go ahead and use a Statement for performance's
 sake, but the default is still Prepared.
 BTW, I could easily create an ODBC driver that wraps around another one
and
 simply implement the PreparedStatement myself by using Strig
concatenation.
 This allows me to switch where I want without changing my code.



   - Stability and correctness:
   Think about a last name lookup HTML form and I type in
   O'Connor
 
  ??

 Think again ;-)


 
   I also think PreparedStatements are cleaner code. Think about
  the parallel
   with a method name and the arguments. You're not creating
  several methods
   that do the same thing (apart from the arguments).
 
  I also agree . Specially if a query takes 10-15 parameters , I
  would prefer
  Prepared statement. However for executing very smal queries like
  Select *
  etc , I dont think it will give me any benefit.
  I am again saying that use of prepared statements should be done thought
  fully instead of  considering it as default  for executing the
queries.


 Now this is nice ??
 So you're avoiding PreparedStatements because they're slow, but you do
issue
 a select * ??
 You might start with replacing the * with the correct columns. It might
give
 you a better performance boost that the Statement.

 at http://www.javaperformancetuning.com/tips/rawtips.shtml
 about 5 articles are listed that state you should use 'PreparedStatement'
 for performance.
 Only 1 that - in a very particular case (DBMS and Driver) - shows the
 opposite.

 Geert Van Damme


===
 

Re: PreparedStatement vs Statement

2002-05-02 Thread Ashwani Kalra

Hi,
I think other wise. Prepared statements are best to be avoided unless you
are trying to execute some queries which cannot be done from statement
object.like batch processing. From the article below I can conclude that
gain in performance of the PStatement becomes visible only after 50-100
successive inserts.

Doing a simple search on google gives so much info. Instead of guessing
which is better please have a look at this link.

http://www.onjava.com/pub/a/onjava/excerpt/oraclejdbc_19/

~
Cheers
Ashwani Kalra
http://www.geocities.com/ashwani_kalra/
~






- Original Message -
From: suresh kumar Durairaj [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, May 03, 2002 6:51 AM
Subject: Re: PreparedStatement vs Statement


 Dear all,

 From the DB Perspective,
 use of Prepared statement reduces the memory usage as prepared statement
 uses bind variables . The query is parsed once for several execution. It
is
 always recommended to use prepared statement where ever possible .

 Suresh


 From: Lai, Kenny [EMAIL PROTECTED]
 Reply-To: A mailing list about Java Server Pages specification and
 reference [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Subject: PreparedStatement vs Statement
 Date: Thu, 2 May 2002 14:41:20 -0400
 
 is there a considerable difference, if I create PreparedStatement instead
 of
 Statement after i get my DB connection?
 are there pitfalls i should be aware about (using PreparedStatement)?
 
 kenny
 

===
 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


 _
 Join the world's largest e-mail service with MSN Hotmail.
 http://www.hotmail.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

===
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



Re: Question about page parameters type. String?

2002-04-18 Thread Ashwani Kalra

Hi,
I was seeing the description of the intern() method , and could not
understand how it can be faster than equal() method. As intern() internally
calls the equal method . Am I correct ??

Regds
Ashwani


- Original Message -
From: Vikramjit Singh [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, April 19, 2002 9:24 AM
Subject: Re: Question about page parameters type. String?


or a much faster way is like this

%
String color;
color=request.getParameter(color)

if (color.intern() ==red) {
--
whatever1
}
else {whatever2}

%

using intern() is quite fast since in equals() each character is checked
which is quite time consuming which intern() gives you the canonical
representation of the string.
in your applications try to use intern() rather than equals().

Regards,
Vikramjit Singh,
Systems Engineer,
GTL Ltd.
Ph. 7612929-1031


-Original Message-
From: Kesav, Ramesh [mailto:[EMAIL PROTECTED]]
Sent: Thursday, April 18, 2002 5:19 AM
To: [EMAIL PROTECTED]
Subject: Re: Question about page parameters type. String?


Hi bhusan,

 That's one point  but she is trying to compare using == method which is for
object referecne but not the value.


No need of casting as paramater always comes as a String and your color
variable in the code is also a String so no need of casting.
-Original Message-
From:   Villén Pizarro, Julia [mailto:[EMAIL PROTECTED]]
mailto:[mailto:[EMAIL PROTECTED]]
Sent:   Thursday, April 18, 2002 5:22 PM
To: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]
Subject:Question about page parameters type. String?


Hi all!
I call my_page.jsp this way
http://my_server/my_page.jsp?color=red
http://my_server/my_page.jsp?color=red

Then I retrieve the value of the parameter color and then try to match it,
in the following way:

%
String color;
color=request.getParameter(color)
if (color==red) {
whatever1
}
else {whatever2}

%

The answer is whatever2. I made sure the page is getting the parameter right
by writing it out. The question is if I have to do any kind of casting.
Thaks in advance,
Julia

=
To unsubscribe: mailto [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]
with body: signoff JSP-INTEREST.
For digest: mailto [EMAIL PROTECTED] 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://archives.java.sun.com/jsp-interest.html
http://java.sun.com/products/jsp/faq.html
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.jsp
http://www.esperanto.org.nz/jsp/jspfaq.jsp
http://www.jguru.com/faq/index.jsp http://www.jguru.com/faq/index.jsp
http://www.jspinsider.com http://www.jspinsider.com

==To
unsubscribe: mailto [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]
with body: signoff JSP-INTEREST.
For digest: mailto [EMAIL PROTECTED] 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://archives.java.sun.com/jsp-interest.html
http://java.sun.com/products/jsp/faq.html
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.jsp
http://www.esperanto.org.nz/jsp/jspfaq.jsp
http://www.jguru.com/faq/index.jsp http://www.jguru.com/faq/index.jsp
http://www.jspinsider.com 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

=
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



Re: jsp:forward tag strange problem

2002-04-16 Thread Ashwani Kalra

Hi,
Yeah I know this solution. The problem is that I have many jsp to do such
changes.Also it should work on any j2ee compliant(jsp 1.1 supported) server.
Is this a bug in weblogic ?


Thanks
Ashwani Kalra
Sr. Mem. Dev. Staff
Aithent Technologies
http://www.geocities.com/ashwani_kalra/



-Original Message-
From: Smita Kotnis [mailto:[EMAIL PROTECTED]]
Sent: Monday, April 15, 2002 10:12 PM
To: [EMAIL PROTECTED]; Ashwani Kalra
Cc: [EMAIL PROTECTED]
Subject: Re: jsp:forward tag strange problem


Hi,
 One other alternative would be, to use,
response.sendRedirect=CompletURL. Your URL must me some thing like this,
thirdpage.jsp?firstString=+firValue+secondString=+secValue,
I think, it will work. I too had same problem with this JSP:Forward using
Params, I did this redirect,  it worked. But, I had only threee parameters
to be passed, so problem was simpler. If you have a lot of Parameters to be
passed to third page, then this above method would not be a efficient way.
Any way, good luck.

Smita

 Ashwani Kalra [EMAIL PROTECTED]:

 Hi,
 I am facing a strange problem.
 I have three jsps. First one has simple form which submit to second jsp.
 I
 retrieve the values from request object saves them in variable and pass
 them
 to third jsp using jsp:forward tag in query string. But the third jsp
 is
 unable to get the values. This is happening even if I use param name=
 value= tags. I have noticed if I dont retrieve the values from request
 in
 the second jsp and pass some hardcoded values ,they are coming.It means
 if I
 do something with request object , then I am unable to obtain the values
 in
 third jsp using jsp:forward tag. I am using WL6.1.
 Can any body tell me why this problem ?


 
 Thanks
 Ashwani Kalra
 http://www.geocities.com/ashwani_kalra/
 


===
 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


-
This mail helped a tree grow. Know more at http://green.sify.com

Take the shortest route to success!
Click here to know how http://education.sify.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



Re: jsp:forward tag strange problem

2002-04-16 Thread Ashwani Kalra

Yes I am doing exactly same. What I have noticed is if in second jsp  I
comment request.get... line and pass some hardcoded value , its working.
That means if I do something with request object, things are not working.
But I cannot avoid this.


Thanks
Ashwani Kalra



-Original Message-
From: A mailing list about Java Server Pages specification and reference
[mailto:[EMAIL PROTECTED]]On Behalf Of Bhushan_Bhangale
Sent: Tuesday, April 16, 2002 4:42 PM
To: [EMAIL PROTECTED]
Subject: Re: jsp:forward tag strange problem


Hi,

First jsp -

form name=form1 action=forward1.jsp
input type=text name=name
input type=submit value=Submit
/form

Second jsp -

%
String name = request.getParameter(name);
%
jsp:forward page=forward2.jsp
jsp:param name=name1 value=%=name% /
/jsp:forward

Third jsp -

%
out.println(name =  + request.getParameter(name));
out.println(brname1 =  + request.getParameter(name1));
%

It works very fine in IPlanet. I hope you are also doing the same thing. If
yes then it may be a problem with WL.

=
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



Re: Class not found Exception

2002-04-14 Thread Ashwani Kalra

The changes you will make will not be visible unless you restart.


Thanks
Ashwani Kalra
http://www.geocities.com/ashwani_kalra/



-Original Message-
From: A mailing list about Java Server Pages specification and reference
[mailto:[EMAIL PROTECTED]]On Behalf Of Sanjay Jadhav
Sent: Sunday, April 14, 2002 7:59 PM
To: [EMAIL PROTECTED]
Subject: Re: Class not found Exception


Hi..
I use tomcat 4.0.1 and j2ee 1.3 did i need to modify the server.xml file
every time i change the .class file or to restart the web server again.

with best regards,
sanjay jadhav

===
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



Re: Sorry... was [Re: From where i can get javax.sql.* package.

2002-04-10 Thread Ashwani Kalra

Yes It is


Thanks
Ashwani Kalra
http://www.geocities.com/ashwani_kalra/



-Original Message-
From: A mailing list about Java Server Pages specification and reference
[mailto:[EMAIL PROTECTED]]On Behalf Of Next Step
Sent: Wednesday, April 10, 2002 4:50 PM
To: [EMAIL PROTECTED]
Subject: Sorry... was [Re: From where i can get javax.sql.* package.


Sorry, im in hurry so i have not read the previous thread, pls forgive my
ignorance.

However, i still have a question, when using jsp import it was fine, so
there must be this package somewhere (im using orion 1.54).
Is javax.sql is not in standard package?
Thanks.


At 06:13 PM 4/10/2002 +0700, you wrote:
Hi all,

I've page which connect to DB, and now try to used connection pooling.
With jsp, it was fine, using this statement :
%@ page import=java.sql.*, javax.sql.DataSource,
javax.naming.InitialContext, javax.sql.ConnectionPoolDataSource%

===
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



The JSP engine is not configured with a scratch dir

2002-03-26 Thread Ashwani Kalra

Hi,
I get the following error when I try to run any jsp(application deployed as
ear file)

The JSP engine is not configured with a scratch dir.
 Please add jsp.initparams=scratchdir=dir-name
 in the servlets.properties file for this context.
I am not able to solve this problem. Why I am getting this error. Why it is
asking for servlets.properties file. When I have web.xml .
I am working on WAS 4.0 , win2k
Please help !!



Thanks
Ashwani Kalra
Sr. Mem. Dev. Staff
Aithent Technologies
http://www.geocities.com/ashwani_kalra/


===
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



Re: deployment into Tomcat question?

2002-03-26 Thread Ashwani Kalra

War and ear files are nothing but jar files but with extensions as .war and
.ear

you can give the following command at the dos prompt

jar -cvf abc.war/abc.ear  files to be archived

Its better to use some tools for such puposes. You can use ant also. or make
a batch file(.cmd)


Thanks
Ashwani Kalra
Sr. Mem. Dev. Staff
Aithent Technologies
http://www.geocities.com/ashwani_kalra/



-Original Message-
From: A mailing list about Java Server Pages specification and reference
[mailto:[EMAIL PROTECTED]]On Behalf Of OZGUR KISIR
Sent: Tuesday, March 26, 2002 4:49 PM
To: [EMAIL PROTECTED]
Subject: deployment into Tomcat question?


Hi all,
I want to compress (make a *.war file) my project for easy deployment. I
can run with putting the necessary files in the exact folders(classes into
WEB-INF/classes , jsp's /root/jsp etc...) However , how can I convert my
application into a   'myapp.war'  file?

Ozgur

===
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



Re: XML-Parsing

2002-01-09 Thread Ashwani Kalra

I can suggest some patterns for such scenario. You can user Singlaton
pattern . Read the xml file put the key, values in some sort of map. Now
whoever needs the configuration information will do so by calling some
functions from a class which takes care of all the issues. like modification
of the info by others


Cheers
Ashwani Kalra
Sr. Mem. Dev. Staff
Aithent Technologies
India
http://www.geocities.com/ashwani_kalra/
~~


-Original Message-
From: A mailing list about Java Server Pages specification and reference
[mailto:[EMAIL PROTECTED]]On Behalf Of Philip M. Meier
Sent: Thursday, January 10, 2002 3:38 AM
To: [EMAIL PROTECTED]
Subject: XML-Parsing


Hello List,

I've a problem parsing xml-data! When should I read in the data stored in
the xml-file? At every query the data is needed or once when the application
is started for the first time and at every restart of the container? When
using the second possibility where to store the data inside the application
after the data were read in? The data I want to read in is basicly
configuration data, which is important for the whole application!

Thanks in advance,

Philip

===
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



Re: Thread args

2002-01-07 Thread Ashwani Kalra

5 will be priority, and main is the group to which it belongs ie. it was
spawned from the main fn.

-Original Message-
From: A mailing list about Java Server Pages specification and reference
[mailto:[EMAIL PROTECTED]]On Behalf Of Vibha Jindal
Sent: Monday, January 07, 2002 3:55 PM
To: [EMAIL PROTECTED]
Subject: Thread args


Hi,

I don't know anything about Thread programming.

I know I'm asking a bsic question. Could someone please tell me what these
arguments mean?
e.g., it is Thraed No 465 etc. What is th 5 and teh main? I have absolutely
no idea.
Thread[Thread-460,5,main]

Thread[EProxy,5,main]

I need this information to understand my Portal Server Gateway logs.



Regards,

Vibha

===
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



Re: Re Re: Urgent : Compilation of JSPs

2001-12-30 Thread Ashwani Kalra

Most of the vendors provides some feature to precompilation of all the jsps
for increasing the response time when the jsp handles request first time.
You can check the weblogic docs or their newsgroup.

Cheers
Ashwani Kalra
Sr. Mem. Dev. Staff
Aithent Technologies
India
www.geocities.com/ashwani_kalra/
~~




-Original Message-
From: A mailing list about Java Server Pages specification and reference
[mailto:[EMAIL PROTECTED]]On Behalf Of Pranav Shah
Sent: Friday, December 28, 2001 7:18 PM
To: [EMAIL PROTECTED]
Subject: Re Re: Urgent : Compilation of JSPs


Hi
 I am using weblogi server 6.0. In weblogic the jsp compiles when it is used
for first time or when you make changes in it.But how can i instruct
weblogic to compile my JSP when it starts ?

Thanks
Pranav Shah

On Fri, 28 Dec 2001 Sasi Bhushan wrote :
 Its depends on the server on which you are going to
 deploy your JSPs.For
 weblogic and WebSphere u can specify that  should the
 JSP's compile before
 application starting or at time first invocation of
 that Jsp page.
 You have not specified the server on which you are
 going to deploy.

 - Original Message -
 From: lalit gulhane [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Friday, December 28, 2001 10:48 AM
 Subject: Urgent : Compilation of JSPs


 Hi All,

 Is it possible to compile all JSPs before starting the
 server ?

 Thanx and regards,
 Lalit

 =
 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



=
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



Re: calling a ejb

2001-12-27 Thread Ashwani Kalra

Yes I also agree. If anybody thinks its stupid question then just
presss delete. Dont think you are smart. Some day when we were
beginners we also used to ask such questions.

Cheers
Ashwani Kalra
Sr. Mem. Dev. Staff
Aithent Technologies
India
www.geocities.com/ashwani_kalra/
~~





-Original Message-
From: A mailing list about Java Server Pages specification and reference
[mailto:[EMAIL PROTECTED]]On Behalf Of Ramesh Kesavanarayanan
Sent: Friday, December 28, 2001 9:16 AM
To: [EMAIL PROTECTED]
Subject: Re: calling a ejb


 i totally agree with what zivki says.if you do not
want to answer any question ignore them. who do you
think you are to use vulgar language? you are not the
mediator of this group so just shut up and do your
work if you are not interested in any question. you
think all the question you ask are relevant??


=



Download Logos, Picture Messages  Ringtones for your mobile phone
Visit http://mobile.yahoo.co.in

===
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



Re: instead of javascript

2001-12-26 Thread Ashwani Kalra

There is no such function in JSP. Although you can generate the jsp scriplet
dynamically from jsp to do the same thing.

Cheers
Ashwani Kalra
Sr. Mem. Dev. Staff
Aithent Technologies
India
www.geocities.com/ashwani_kalra/
~~


-Original Message-
From: A mailing list about Java Server Pages specification and reference
[mailto:[EMAIL PROTECTED]]On Behalf Of Eric Cho
Sent: Thursday, December 27, 2001 3:55 AM
To: [EMAIL PROTECTED]
Subject: instead of javascript


Hi all,

is there a way to have a confirmation box popup confirming your click.  An
ok would bring the user to another page and a cancel will keep the user
where they are at?

I would like to avoid javascript so if you have a method in jsp, that would
be great.

Thanks,
Eric
___
eSafe Protect Gateway has scanned this mail for viruses, vandals and
suspicious attachments.

===
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



Re: instead of javascript

2001-12-26 Thread Ashwani Kalra

I am sorry please read javascript instead of jsp scriplet

-Original Message-
From: A mailing list about Java Server Pages specification and reference
[mailto:[EMAIL PROTECTED]]On Behalf Of Ashwani Kalra
Sent: Thursday, December 27, 2001 9:37 AM
To: [EMAIL PROTECTED]
Subject: Re: instead of javascript


There is no such function in JSP. Although you can generate the jsp scriplet
dynamically from jsp to do the same thing.

Cheers
Ashwani Kalra
Sr. Mem. Dev. Staff
Aithent Technologies
India
www.geocities.com/ashwani_kalra/
~~


-Original Message-
From: A mailing list about Java Server Pages specification and reference
[mailto:[EMAIL PROTECTED]]On Behalf Of Eric Cho
Sent: Thursday, December 27, 2001 3:55 AM
To: [EMAIL PROTECTED]
Subject: instead of javascript


Hi all,

is there a way to have a confirmation box popup confirming your click.  An
ok would bring the user to another page and a cancel will keep the user
where they are at?

I would like to avoid javascript so if you have a method in jsp, that would
be great.

Thanks,
Eric
___
eSafe Protect Gateway has scanned this mail for viruses, vandals and
suspicious attachments.

===
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



Re: Object Serialization

2001-12-24 Thread Ashwani Kalra

Hi,
Can you give the stack trace and exactly when you are getting error.


Cheers
Ashwani Kalra
Sr. Mem. Dev. Staff
Aithent Technologies
India
www.geocities.com/ashwani_kalra/
~~



-Original Message-
From: A mailing list about Java Server Pages specification and reference
[mailto:[EMAIL PROTECTED]]On Behalf Of M Sankar
Sent: Monday, December 24, 2001 6:50 PM
To: [EMAIL PROTECTED]
Subject: Object Serialization


Hi,

I am trying to send some some objects to an applet from a JSP using
Object serialization. The communication is taking place and I am
receiving the objects too. But an IllegalStateException is thrown from
the JSP. What might be the possible reasons for this.
The scenario is the applet on initialization opens an URLConnection to
the JSP and reads Objects. JSP uses the writeObject method to write into
the stream.

Any help would be great
Regards
Sankar

===
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



[no subject]

2001-12-21 Thread Ashwani Kalra

Hi,
http://jakarta.apache.org/taglibs/tutorial.html

It also has links to the Sun's site which tells you step by step on what to
do.

Cheers
Ashwani Kalra
Sr. Mem. Dev. Staff
Aithent Technologies
India
www.geocities.com/ashwani_kalra/
~~




-Original Message-
From: A mailing list about Java Server Pages specification and reference
[mailto:[EMAIL PROTECTED]]On Behalf Of Pranav Shah
Sent: Friday, December 21, 2001 1:55 PM
To: [EMAIL PROTECTED]
Subject:


Can any one send me link where can i get good material on Jsp Taglib?



=
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



Re: Transforming XML in JSP

2001-12-21 Thread Ashwani Kalra

We are doing this in the current project. It uses the tag libraries.
Checkout the link on apache i have already sent on this list.

Cheers
Ashwani Kalra
Sr. Mem. Dev. Staff
Aithent Technologies
India
www.geocities.com/ashwani_kalra/
~~





-Original Message-
From: A mailing list about Java Server Pages specification and reference
[mailto:[EMAIL PROTECTED]]On Behalf Of Dmitry Namiot
Sent: Friday, December 21, 2001 2:31 PM
To: [EMAIL PROTECTED]
Subject: Re: Transforming XML in JSP


See for example XSL taglib on
http://www.servletsuite.com/jsp.htm

Any one knows what is the code in JSP to transforming XML to HTML using
XSL file in server side ?
I have the XML and XSL files already ... i cant find the jsp code to do
this .. or anyone knows any document i can use ?

--
Coldbeans Software - server-side Java (tm) components
http://www.servletsuite.com



__
Your favorite stores, helpful shopping tools and great gift ideas.
Experience the convenience of buying online with Shop@Netscape!
http://shopnow.netscape.com/

Get your own FREE, personal Netscape Mail account today at
http://webmail.netscape.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

===
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



testing

2001-12-20 Thread Ashwani Kalra


Cheers
Ashwani Kalra
Sr. Mem. Dev. Staff
Aithent Technologies
India
www.geocities.com/ashwani_kalra/
~~

===
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



Re: passing hidden form variables

2000-03-14 Thread Ashwani Kalra

Hi,
In the second page you can make a statefull bean that will hold the data.
Then  you can redirect to the first page without any parameters. Use the
getter function of the bean to populate the first page.



Ashwani Kalra
Sr. Systems Associate,
E-Commerce Group, NIIT Ltd.
Phone :091-11-6203577(D),6203578



 --
 From: Reichenbach Craig
 Reply To: [EMAIL PROTECTED]
 Sent: Tuesday, March 07, 2000 8:27 PM
 To:   [EMAIL PROTECTED]
 Subject:  passing hidden form variables

 Hi,
   Here's my scenario:  I have a form on one JSP page that passes the info
 to another
 JSP page that processes this info (by calling a stateless session bean).
 This processing
 page does not display, so once the the processing is done I pass the
 client back to the first
 JSP page.  My question is, how can I pass the user back to the first page
 using hidden variables?
 I currently use a form with an automatic javascript "submit()" function.
 It's OK, but I'd
 like a better solution.  Can someone enlighten me as to how to
 automatically submit a form
 so that I can seamlessly pass the user back to a page with the proper
 hidden variables???

 Thanks, Craig

 NOTES:
 I love the response.sendRedirect(), but you are forced to visibly show
 your parameters in
 the URL.  Same with jsp:forward

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

  http://java.sun.com/products/jsp/faq.html
  http://www.esperanto.org.nz/jsp/jspfaq.html
  http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
  http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets


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

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets



Re: methods in JSP

2000-03-10 Thread Ashwani Kalra

Hi,
I had already replied  to this . You cannot break a method like this.


Ashwani Kalra
Sr. Systems Associate,
E-Commerce Group, NIIT Ltd.
Phone :091-11-6203577(D),6203578



 --
 From: Verma Varun
 Reply To: [EMAIL PROTECTED]
 Sent: Friday, March 10, 2000 10:32 AM
 To:   [EMAIL PROTECTED]
 Subject:  methods in JSP

 hi all!
 of late there have been some queries about how to write java methods in
 .jsp
 many people have replied that u can do it as follows..

 %!
   method()
 {
   //java code
 }
 %

 however 1 pt. i would like to add is that u CANNOT BREAK UP THE METHOD
 LIKE 

 %!
  method()
 {
   ///java code
  % html code %
 }
 %

 hope it will help somebody! Actually, i wasted a lot of time trying to do
 this :)

 varun

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

  http://java.sun.com/products/jsp/faq.html
  http://www.esperanto.org.nz/jsp/jspfaq.html
  http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
  http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets



Visit http://www.niit.com for eCommerce Solutions.

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

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets



Re: Java in javscript

2000-03-08 Thread Ashwani Kalra

You can use the applet object of the javascritpt to access the variables.For
applets , you can use the client side javascripting. but for normal java
class function you have to write server side equivalent of the javascript
may be using the liveconnect as you mentioned.


Ashwani Kalra
Sr. Systems Associate,
NIIT LTD.


 --
 From: K.V.Srinivas Kumar
 Reply To: [EMAIL PROTECTED]
 Sent: Monday, March 06, 2000 10:15 AM
 To:   [EMAIL PROTECTED]
 Subject:  Re: Java in javscript



 Hi All,

  Do we need to have live connect or something equivalent to call Java
 methods in JavaScript?  I have tried with the code as mentioned in the
 mail
 using internet explorer.  But I am getting javascript error message.  When
 I tried
 to access public string attribute of the applet class, I am getting the
 message:

  undefined

 So I want to know what are the pre-requisite to communicate with java from
 javascript.

 Thanks
 K.V. Srinivas Kumar




 sampathkumar rangarajan [EMAIL PROTECTED] on 02/29/2000 05:10:31
 PM

 Please respond to sampathkumar rangarajan [EMAIL PROTECTED]

 To:   [EMAIL PROTECTED]
 cc:(bcc: Srinivas Kumar Krishna Vajjala/BS1/SGSSDI/SONYASIA)
 Subject:  Re: Java in javscript




 Hi,

 here is the code for calling java function from js.

 comment
   Refers to MyApp.java  file
 /comment
 html
  head title  Accessing Java Applets from
 JavaScript /title
  script language="JavaScript"
function call(str)
 {
  window.document.app.changeText(str);
 }

  /script
  /head
 body

  applet code="MyApp.class" width=400 height=300
 name="app"
  /applet

  form name=frm
   input type=text name=txt value=" " 
   input type=button name=btn value="Click"
 onClick='call(document.frm.txt.value)'
  /form


 /body
 /html
 the applet file is
 //  JAVASCRIPT TO JAVA COMMUNICATIONS
   import java.awt.*;
   import java.applet.*;

   public class MyApp extends Applet
{
 String str="LiveConnect in Applet";
 Font f = new
 Font("TimesRoman",Font.BOLD+Font.ITALIC,20);

 public void init()
  {
   setBackground(Color.red);
   setForeground(Color.white);
   setFont(f);
   resize(399,300);
  }
 public void changeText(String s)
  {
   str = s;
   repaint();
  }

 public void paint(Graphics g)
  {
g.drawString(str,10,100);
  }

 if found this code useful i will be very happy.

 --- [EMAIL PROTECTED] wrote:
  Hi,
  Thanks, can you just send me a simple code exmple
 
  Ashwani
 
   --
   From:   sampathkumar rangarajan
   Sent:   Monday, February 28, 2000 11:28 PM
   To: [EMAIL PROTECTED]
   Subject:Re: Java in javscript
  
   Hi,
  
   It is possible to call a java function from
   javascript.
   try a concept called liveconnect in javascript.
   if cannot mail me i will send the code.
  
  
  
   --- Ashwani Kalra [EMAIL PROTECTED] wrote:
Hi,
I also want to know if this is possible. Does
javascript recognises the
return values from java functions. or is it
  possible
to call the java
function inside the javascript. I have not tried
  ,
but my guess is that it
will give you some kind of syntax error.
   

ASHWANI KALRA
NIIT LTD.
E-Commerce Group, SEB
8, Balaji Estate
Kalka ji,
New Delhl-19.
Email : [EMAIL PROTECTED]
   [EMAIL PROTECTED]
Phone :091-11-6203577(D),6203578

   
   
   
   
 --
 From: meera nayak
 Reply To: meera nayak
 Sent: Thursday, February 24, 2000 1:44
  PM
 To:   [EMAIL PROTECTED]
 Subject:  Java in javscript

 Hi room,
 I am doing something like this
  .Trying
to call a method in a
 java class from javascript.It returns a string
.But how does javascript
 handle it.Can it handle a parameter returned
  from
the java method.Can it
 store it in a variable.

 source code
 html
 head
 script
 var strMon;
  function getMon(){
   strMon=document.test.getMonth();
   alert("mon",strMon);
 }
 /script
 /head
 body
 applet name="test" code="rob.class" width=1
height=1
 /applet
 form
 input type=text name=textfield1 value=""
 input type=button onclick="getMon();"
 form
 /body
 html

 Can anyone help

 Thanx in advance
 Meera


   
  
 
 ==
 =
 To unsubscribe: mailto [EMAIL PROTECTED]
  with
body: "signoff
 JSP-INTEREST".
 FAQs on JSP can be found at:
  http://java.sun.com/products/jsp/faq.html
  http://www.esperanto.org.nz/jsp/jspfaq.html

   
   
  
 
 ==

Re: EJB life cycle on java server restart

2000-03-08 Thread Ashwani Kalra

Hi,
I have read that  whenever the server is shutdown properly,  it removes the
instatnces of the EJB from the pool(Garbage collected).And when ever the
server is restarted it creates many instances of the bean and put them in
the pool


Ashwani Kalra
Sr. Systems Associate,
NIIT LTD.
Phone :091-11-6203577(D),6203578




 --
 From: Sylvain Roche
 Reply To: Sylvain Roche
 Sent: Monday, March 06, 2000 6:58 PM
 To:   [EMAIL PROTECTED]
 Subject:  EJB life cycle on java server restart

 I was just wondering, what do beans become when the server is shut down ?
 Are they destroyed, and in which way ? Are they garbage collected, or do I
 have to do it myself. Servlets are destroyed upon server restart, but
 apparently my beans aren't, or to be more precise, their destroy method is
 not called (as far as I have tested it).

 I think what should happen, in a session persistence context, is that all
 think in the session scope are saved to disk, which could explain why they
 are not destroyed
 All that isn't stored in the session environment should be destroyed
 anyway.
 I don't know if this should be done by an explicit kill, or if you have to
 wait for the garbage collector. afaik, the gc is called when the server
 stops, but what happens when it crashes.

 I have downsized my ebj, but I want to be sure not to run out of memory,
 even with wide traffic on my application. Am I mistaking something ?

 Regards
 Sylvain





 __
 Sylvain Roche
 Responsable développement
 Add-Online
 www.add-online.fr

 80 rue d'Alsace
 69100 VILLEURBANNE
 France

 tel : +33 437431260
 fax: +33 437431269

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

  http://java.sun.com/products/jsp/faq.html
  http://www.esperanto.org.nz/jsp/jspfaq.html
  http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
  http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets



Visit http://www.niit.com for eCommerce Solutions.

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

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets



Re: interset doubt on jsp.

2000-03-07 Thread Ashwani Kalra

Use the equivalent init method(name is something like jsp_init) in your JSP

Ashwani

 --
 From: munu praveen
 Reply To: munu praveen
 Sent: Tuesday, February 29, 2000 8:51 AM
 To:   [EMAIL PROTECTED]
 Subject:  interset doubt on jsp.

 Hi guys,

 1)I have one doubt on jsp. i written one servlet with
 init method. same init method, where i can spacify in
 jsp.

 Thanks in advance

 __
 Do You Yahoo!?
 Talk to your friends online with Yahoo! Messenger.
 http://im.yahoo.com

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

  http://java.sun.com/products/jsp/faq.html
  http://www.esperanto.org.nz/jsp/jspfaq.html
  http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
  http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets


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

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets



Re: [Java in javscript]

2000-03-07 Thread Ashwani Kalra

Hi,
Alert takes one parameter only(String types). You have given two . I think
you intended to do alert("Mon"+strMon) then alert("Mon",strMon)
and yeah , the return value can be handled by javascript.

Ashwani
 --
 From: Ravi Pritmani
 Reply To: Ravi Pritmani
 Sent: Saturday, February 26, 2000 11:41 AM
 To:   [EMAIL PROTECTED]
 Subject:  Re: [Java in javscript]

 There is something wrong with your code. Just replace alert("mon",strMon);
 with alert("mon"+strMon); and it would work.Take care that all your
 variables
 and methods in your applet should be public.
 Ravi


 meera nayak [EMAIL PROTECTED] wrote:
 Hi room,
 I am doing something like this .Trying to call a method in a
 java class from javascript.It returns a string .But how does javascript
 handle it.Can it handle a parameter returned from the java method.Can it
 store it in a variable.

 source code
 html
 head
 script
 var strMon;
  function getMon(){
   strMon=document.test.getMonth();
   alert("mon",strMon);
 }
 /script
 /head
 body
 applet name="test" code="rob.class" width=1 height=1
 /applet
 form
 input type=text name=textfield1 value=""
 input type=button onclick="getMon();"
 form
 /body
 html

 Can anyone help

 Thanx in advance
 Meera

 ==
 =
 To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
 JSP-INTEREST".
 FAQs on JSP can be found at:
  http://java.sun.com/products/jsp/faq.html
  http://www.esperanto.org.nz/jsp/jspfaq.html


 
 Get free email and a permanent address at http://www.netaddress.com/?N=1

 ==
 =
 To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
 JSP-INTEREST".
 FAQs on JSP can be found at:
  http://java.sun.com/products/jsp/faq.html
  http://www.esperanto.org.nz/jsp/jspfaq.html


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

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets



Re: problems with jsp:include to include files dynamically

2000-03-07 Thread Ashwani Kalra

Actually , I dont know the specification, But I am doing it Dynamically in
the following way :
if(errors0)
{
//include the file
}

Ashwani
 --
 From: Veena
 Sent: Wednesday, February 16, 2000 12:48 PM
 To:   [EMAIL PROTECTED]
 Subject:  Re: problems with jsp:include to include files dynamically

 For including files dynamically i can't use %@ include  % ...That's what
 the slpecification says.

 - Original Message -
 From: [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Monday, March 06, 2000 12:24 PM
 Subject: RE: problems with jsp:include to include files dynamically


  Why not try html tag %@ include  %  instead of jsp tag
 
  Ashwani
 
   --
   From: Veena
   Reply To: Veena
   Sent: Wednesday, February 16, 2000 2:58 PM
   To: [EMAIL PROTECTED]
   Subject: problems with jsp:include to include files dynamically
  
   Hi all,
  
 I have a problem in including files dynamically using jsp:include.
Below i have placed the code.Please go thru this..and tell me am i
 doing
   something wrong.
  
   Thanks  Regards
   Veena
  
 =
   %-- TestInclude.jsp --%
   %@ page language="java"%
   % String a="Veena"; %
   %! String m="VIDHYA"; %
  
   %
   if (session.getValue("staticPage")==null)
   session.putValue("staticPage","b.jsp");
  
  
   String newPage=request.getParameter("staticPage");
   if (newPage!=null) session.putValue("staticPage",newPage);
  
   String p= (String)session.getValue("staticPage");
   %
  
   HTML
   BODY
   BRBR
   BPage %=p%:(%= request.getMethod() %)/BBRBR
   BRBRBR
   FORM method="post" action="/TestInclude.jsp"
   input type="hidden" name="staticPage" value="c.jsp"
   input type="submit"
   /FORM
  
   The current date and time are
   %-- here iam including static file --%
   %@ include file="Date.jsp" %
  
   %--
here iam including file dynamically based on the condition which is
 not
   being included
   do u have any idea of why this is happening
   --%
   jsp:include page="%= p %" flush="true" /
   /BODY
   /HTML
  
   ===
  
   %-- b.jsp --%
  
   HTML
   BODY
   This is page B
   /BODY
   /HTML
   ===
   %-- c.jsp --%
  
   HTML
   BODY
   This is page C
   /BODY
   /HTML
   ===
   %-- date.jsp: --%
   %@ page import="java.util.*" %
   %= (new java.util.Date() ).toLocaleString() %
   % System.out.println("the value is ="+a); %
   % out.println("br"); %
   % out.println(a); %
   =
  
  


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

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets



Re: java.sql.exception : network adapter could not able to establ ish connection

2000-03-01 Thread Ashwani Kalra

There is some limit on the no of connection that can remain open to
Oracle.Are you using connection pooling or properly closing the connection
after use so that it can be returned to the connection pool

Ashwani

 --
 From: Sharat Babu
 Reply To: [EMAIL PROTECTED]
 Sent: Wednesday, March 01, 2000 12:15 AM
 To:   [EMAIL PROTECTED]
 Subject:  java.sql.exception : network adapter could not able to
 establish connection
 Importance:   High

 I am getting an exception like this .
 what could be the problem:

 .livesoftware.jrun.service.ThreadConfigHandler.run(Compiled Code)
 java.sql.SQLException: The Network Adapter could not establish the
 connection
 at java.lang.Throwable.init(Compiled Code)
 at java.lang.Exception.init(Compiled Code)
 at java.sql.SQLException.init(Compiled Code)
 at oracle.jdbc.dbaccess.DBError.check_error(Compiled Code)
 at oracle.jdbc.driver.OracleConnection.init(Compiled Code)
 at oracle.jdbc.driver.OracleDriver.getConnectionInstance(Compiled
 Code)
 at oracle.jdbc.driver.OracleDriver.connect(Compiled Code)
 at java.sql.DriverManager.getConnection(Compiled Code)
 at java.sql.DriverManager.getConnection(Compiled Code)
 at
 bu_intranets.energy_prod.pplants.paracon.DbAccess.getDbConnect(DbAccess.ja
 va
 :71)
 at
 jsp.bu_intranets.energy_prod.pplants.paracon.UnitSystem._jspService(Compil
 ed
 Code)
 at com.livesoftware.jsp.HttpJSPServlet.service(Compiled Code)
 at com.livesoftware.jsp.JSPServlet.service(Compiled Code)
 at javax.servlet.http.HttpServlet.service(Compiled Code)
 at com.livesoftware.jrun.JRun.runServlet(Compiled Code)
 at com.livesoftware.jrun.JRunGeneric.handleConnection(Compiled
 Code)
 at
 com.livesoftware.jrun.JRunGeneric.handleProxyConnection(Compiled
 Code)
 at
 com.livesoftware.jrun.service.proxy.JRunProxyServiceHandler.handleRequest(
 Co
 mpiled Code)
 at com.livesoftware.jrun.service.ThreadConfigHandler.run(Compiled
 Code)

 thanx in advance


 regards
 sharat




 Sharath Babu, Konda.
 GE Power Systems,
 Schenectady,NY.

 Ph: 518-385-2853(0)
   518-377-8024(R)
 Fax:518-385-2739
 Home Page: www.geocities.com/sharat22

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

  http://java.sun.com/products/jsp/faq.html
  http://www.esperanto.org.nz/jsp/jspfaq.html
  http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
  http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets


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

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets



Re: Display PROBLEM in text fields for JSP

2000-03-01 Thread Ashwani Kalra

Use double quotes to surround the display value. If no quotes are there then

only the first  continuous token (withoud spaces is picked rest is ignored)

Ashwani
 --
 From: Sivakumar S
 Reply To: Sivakumar S
 Sent: Sunday, February 27, 2000 5:16 AM
 To:   [EMAIL PROTECTED]
 Subject:  Display PROBLEM in text fields for JSP

 Hi

 I'm using a Servlet Bean to retrieve information from the database. The
 JSP code looks similar to the one below, where "table" is the bean name.

 input type="TEXT" name=City size="25" value=%=table.getCity()% 


 This has to retrieve CITY value from the database and put it into the text
 field for editing .

 If the city is something like "San Jose", then the characters after "San"
 is getting truncated because the code is interpreted as

 value = San

 only.

 Help needed

 ==
 =
 To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
 JSP-INTEREST".
 FAQs on JSP can be found at:
  http://java.sun.com/products/jsp/faq.html
  http://www.esperanto.org.nz/jsp/jspfaq.html


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

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets



Re: JSP-Servlet,Servlet-JSP Communication

2000-02-29 Thread Ashwani Kalra

You can call a servlet from jsp by specifying the url in the action
atribute of the form tag.
Pass the parmeters either as querystring or use the post method. Use the
getParameter function of the request object to obtain the values from the
form.
You can use response.redirect to call the jsp page.



ASHWANI KALRA
NIIT LTD.
E-Commerce Group, SEB
Email : [EMAIL PROTECTED]
   [EMAIL PROTECTED]
Phone :091-11-6203577(D),6203578








 --
 From: Ajay Kumar Vasireddy
 Reply To: Ajay Kumar Vasireddy
 Sent: Saturday, February 26, 2000 1:14 AM
 To:   [EMAIL PROTECTED]
 Subject:  JSP-Servlet,Servlet-JSP  Communication

 Hi All,
   I've a Login.JSP Page
 After i enter the user name and password, it has to call a Servlet for
 login validation.
 if the login is successful,it'll show some jsp page.
 if the login not successful,it'll redirect the user to the same
 login.JSP  page with
 some error message.

 How should i procced doing this.

 How to pass parameters from jsp to servlet.

 How to call a servlet from JSP Page.

 How to call a JSP Page from a Servlet.

 Any inputs are appreciated .

 Is there any good web site where can i get info on JSP other than Sun
 Site.

 Thanks in advance
 Ajay

 ==
 =
 To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
 JSP-INTEREST".
 FAQs on JSP can be found at:
  http://java.sun.com/products/jsp/faq.html
  http://www.esperanto.org.nz/jsp/jspfaq.html


===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html



Re: isThreadSafe

2000-02-27 Thread Ashwani Kalra

This is a page directive that tell the jsp container(If isthreadsafe=false)
that concurrent request to my page may have problems of corrupted data and
hence the container should put the request in  que to prevent any concurrent
access.

Ashwani

 --
 From: Verma Varun
 Reply To: [EMAIL PROTECTED]
 Sent: Thursday, February 24, 2000 1:49 PM
 To:   [EMAIL PROTECTED]
 Subject:  isThreadSafe

 Hi all!
 Can somebody please tell me what is meant by
 %@ page isThreadSafe="false" %

 i did'nt understand the isThreadSafe property.

 thnx
 varun

 ==
 =
 To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
 JSP-INTEREST".
 FAQs on JSP can be found at:
  http://java.sun.com/products/jsp/faq.html
  http://www.esperanto.org.nz/jsp/jspfaq.html



Visit http://www.niit.com for eCommerce Solutions.

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html



Re: Java in javscript

2000-02-27 Thread Ashwani Kalra

Hi,
I also want to know if this is possible. Does javascript recognises the
return values from java functions. or is it possible to call the java
function inside the javascript. I have not tried , but my guess is that it
will give you some kind of syntax error.


ASHWANI KALRA
NIIT LTD.
E-Commerce Group, SEB
8, Balaji Estate
Kalka ji,
New Delhl-19.
Email : [EMAIL PROTECTED]
   [EMAIL PROTECTED]
Phone :091-11-6203577(D),6203578





 --
 From: meera nayak
 Reply To: meera nayak
 Sent: Thursday, February 24, 2000 1:44 PM
 To:   [EMAIL PROTECTED]
 Subject:  Java in javscript

 Hi room,
 I am doing something like this .Trying to call a method in a
 java class from javascript.It returns a string .But how does javascript
 handle it.Can it handle a parameter returned from the java method.Can it
 store it in a variable.

 source code
 html
 head
 script
 var strMon;
  function getMon(){
   strMon=document.test.getMonth();
   alert("mon",strMon);
 }
 /script
 /head
 body
 applet name="test" code="rob.class" width=1 height=1
 /applet
 form
 input type=text name=textfield1 value=""
 input type=button onclick="getMon();"
 form
 /body
 html

 Can anyone help

 Thanx in advance
 Meera

 ==
 =
 To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
 JSP-INTEREST".
 FAQs on JSP can be found at:
  http://java.sun.com/products/jsp/faq.html
  http://www.esperanto.org.nz/jsp/jspfaq.html


===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html



Re: outputting a fileinputstream

2000-02-27 Thread Ashwani Kalra

Instead of using the available method try using some other function to read
bytes and then check it.

Ashwani

 --
 From: Paul Beer
 Reply To: [EMAIL PROTECTED]
 Sent: Saturday, February 26, 2000 1:08 AM
 To:   [EMAIL PROTECTED]
 Subject:  outputting a fileinputstream

 I am trying to load an xml packet off a local directory and display it in
 a
 jsp template... to no avail... could someone lok at this code and let me
 know why it displays nothing ?  when i do a string.length() i get 3451 so
 I
 know it is reading the stream... I just cant output it in JSP.

 thanks,
 paul

 code:

 File file = new File("./public_html/xml/cc.xml");
 FileInputStream fis = new FileInputStream(file);
 byte[] data = new byte[fis.available()];
 String strData = new String(data);
 out.println(strData);

 ==
 =
 To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
 JSP-INTEREST".
 FAQs on JSP can be found at:
  http://java.sun.com/products/jsp/faq.html
  http://www.esperanto.org.nz/jsp/jspfaq.html


===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html



Re: Killing Beans from memory

2000-02-25 Thread Ashwani Kalra

Try after restarting the server.

Ashwani

 --
 From: Corbin Hoenes
 Reply To: Corbin Hoenes
 Sent: Tuesday, February 22, 2000 11:51 PM
 To:   [EMAIL PROTECTED]
 Subject:  Killing Beans from memory

 I have run into a development problem I make a modification to my Bean --
 recompile using the jdk compiler and the old bean is still in memory (I
 think) so the modifications don't take place.   I tried a couple of things
 starting a new browser session and stopping the web server but   I can't
 figure out how to "refresh" my beans.

 I am using the Win98/NT jswdk1-1.0.1 anyhow know how I can do this?




Visit http://www.niit.com for eCommerce Solutions.

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html



Re: Number of characters read - restriction??

2000-02-25 Thread Ashwani Kalra

Try using other functions like getInputStream, or getObject.This may help
I dont know about this restriction.
Also try getString method by changing the contents of the  column.May be
that column has some character after which string gets truncated.

Ashwani

 --
 From: B Alaguselvan
 Reply To: [EMAIL PROTECTED]
 Sent: Thursday, February 24, 2000 5:04 AM
 To:   [EMAIL PROTECTED]
 Subject:  Number of characters read - restriction??

 Hello all

 I am using JRun Pro v2.3.3 with IIS for my JSP based programs...

 Is there any restriction on the number of characters that we can read from
 the table using the getString() method??

 I am reading the content of a varchar column (length=5400) using the
 getString() method. If the column has more than 5120 charcters, i am
 getting only the first 5120 characters (this is 640 bytes). is this a
 restriction???

 any pointers will greatly help me...

 TIA
 Alagu

 ==
 =
 To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
 JSP-INTEREST".
 FAQs on JSP can be found at:
  http://java.sun.com/products/jsp/faq.html
  http://www.esperanto.org.nz/jsp/jspfaq.html


===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html



Re: refreshing problem

2000-02-25 Thread Ashwani Kalra

Are you always calling the servlet to pick up the data from the database and
show it on the form ?
Ashwani



 --
 From: Naresh Singh Chhonker
 Reply To: [EMAIL PROTECTED]
 Sent: Wednesday, February 23, 2000 2:30 PM
 To:   [EMAIL PROTECTED]
 Subject:  refreshing problem

 hai
  I have a problem of refershing Page contents on  browser
 I have Two servlets ,
  One access some values for the form elements from the Data base,
 display it in respective boxes
  other servlet Save the post data into database and after saving data
 it goes to first servlet by calling
  function of javascript  =window.location.href=../../.. But The First
 Servlet shows perivious data not new saved data
  into the boxes So Please tell me How Can i solve this problem so
 theat
 new Values Comes in boxes


 thanks in advance
 naresh

 ==
 =
 To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
 JSP-INTEREST".
 FAQs on JSP can be found at:
  http://java.sun.com/products/jsp/faq.html
  http://www.esperanto.org.nz/jsp/jspfaq.html



Visit http://www.niit.com for eCommerce Solutions.

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html



Re: refreshing problem

2000-02-25 Thread Ashwani Kalra

You can use HTTP meta tag pragma cache control for that. But it doesnt work
100% correctly. For that u have to use some logic like when ever u call that
page pass one query string variable with a value of unique Number.

Regds
Ashwani


 --
 From: [EMAIL PROTECTED]
 Sent: Thursday, February 24, 2000 11:57 AM
 To:   [EMAIL PROTECTED]
 Subject:  RE: refreshing problem



 This one  Solution, But how can i go to each person who is using this page
 and tell everybody to disable Cookie for thier browers , Is thier any
 other
 solution?




Visit http://www.niit.com for eCommerce Solutions.

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html



Re: refreshing problem

2000-02-25 Thread Ashwani Kalra

Yes , I meant that only. passing a random no wont give any problem. For
Netscape I dont know much. I have not tried my jsps on them. Also I am using
the get method not post. because the data I am passing is not much.And post
method doesnt work properly with my jsps.
The another alernative is to use stateful session bean(if you are using
EJB). after each post put the data  in  the bean and you can access the data
on the next page without any problems.

Ashwani

 --
 From: [EMAIL PROTECTED]
 Sent: Friday, February 25, 2000 3:40 AM
 To:   [EMAIL PROTECTED]
 Subject:  Re: refreshing problem

 Hi,

 You can use HTTP meta tag pragma cache control for that. But it doesnt
 work
 100% correctly. For that u have to use some logic like when ever u call
 that
 page pass one query string variable with a value of unique Number.
 

 Can you explain this? Someone else once told me this. Do something like:

 a href="/path/mypage.jsp?randomValue=%= somebean.getRandomValue()
 %"Click here/a

 Is that how it would be done? The person I spoke to said this is an "ugly"
 way of doing it, but it works because each time the value changes, it
 "forces" the browser to load the page from the server, and thus the META
 tag isnt needed.

 One problem I am having is that we use multiple JSP pages, each with a
 form
 on them, but all making up one big "sequence" of stuff that needs to be
 entered before a submission is done at the end. Each next page uses the
 choices from the previous page to display info from the database. The
 problem is, in Netscape, the first page is fine, but the next page wont
 print out because the View Source says it was returned with a POST
 operation..etc. Very odd problem. Even with mulitple JSP pages, one going
 to the next, I get this problem. These pages use a JavaBean (session
 scope)
 to set/get data to/from, but I dont see why this is a problem. The funny
 thing is, it only happens when we force the browser to load the pages off
 the server. We use a META tag. When we dont have that tag, it works fine,
 but then we get all kinds of caching problems, such as dynamic pages
 coming
 from browser cache instead of the server, and often times a "time-out" or
 something occurs.

 So, if you have any insight on this problem, I would be much appreciated.
 Thanks.


 Kevin Duffey
 Software Engineer
 [EMAIL PROTECTED]


===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html



Re: JSP, Servlets connecting to database with JWSDK or Tomkat

2000-02-23 Thread Ashwani Kalra

You can user JDBC. See its documentation. No need to configure JSWDK

Ashwani

 --
 From: Project Tajikistan
 Reply To: Project Tajikistan
 Sent: Tuesday, February 22, 2000 9:30 PM
 To:   [EMAIL PROTECTED]
 Subject:  JSP, Servlets connecting to database with JWSDK or Tomkat

 Hello, I have just started using JSP and servlets, I would like my
 servlets to
 read and write data to a database, however I haven't been able to find any
 documentation on configuring
 JWSDK or tomcat to implement this, can anyone point me in the right
 direction.

 Thanks in advance.

 Hoose.


===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html



Re: Browser detection in JSP ??

2000-02-23 Thread Ashwani Kalra

You can use javascript also and do any conditional manipultion depending on
the type  of the browser

Ashwani
 --
 From: Wallis, Ken
 Reply To: espen dallokken
 Sent: Tuesday, February 22, 2000 8:11 PM
 To:   [EMAIL PROTECTED]
 Subject:  Re: Browser detection in JSP ??

 You can retrieve and process the "USER_AGENT" header value from the
 incoming
 request

 For example:
The JSP line:   %= request.getHeader ("USER_AGENT") %
prints: Mozilla/4.0 (compatible; MSIE 4.01; Windows NT)

 Parse the results instead of print them  you will know not only the
 browser, but also the version.


 -Original Message-
 From: espen dallokken
 To: [EMAIL PROTECTED]
 Sent: 2/22/00 6:58 AM
 Subject: Browser detection in JSP ??

 I wondered if JSP has support for browser detection in the same way as
 ASP
 has ??


 |  ||  |||   ||   r a z o r f i s h , oslo

 espen dalløkken

 
 ===
 To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
 JSP-INTEREST".
 FAQs on JSP can be found at:
  http://java.sun.com/products/jsp/faq.html
  http://www.esperanto.org.nz/jsp/jspfaq.html

 ==
 =
 To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
 JSP-INTEREST".
 FAQs on JSP can be found at:
  http://java.sun.com/products/jsp/faq.html
  http://www.esperanto.org.nz/jsp/jspfaq.html


===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html



Re: Jsp and servlets sharing sessions ?? How does it work in webl ogic ?

2000-02-23 Thread Ashwani Kalra

You can use the implicit session object in jsp and the corresponding session
object(I dont know , just see documentation for servlets) to access the
session variables.
Ashwani

 --
 From: vaidyanathan_g
 Reply To: vaidyanathan_g
 Sent: Tuesday, February 22, 2000 8:03 PM
 To:   [EMAIL PROTECTED]
 Subject:  Jsp and servlets sharing sessions ?? How does it work in
 weblogic ?

 Hi,

 How can we share sesssion variables between jsps and servlets ?In our
 application, jsps and servlets are invoked from each other at many
 places.We
 want to access session variables in both jsp and servlets.

 If you have any solution, also let me know whether it is supported by App
 Server WebLogic 4.5.1

 Thanks

 regards,

 Vaidyanathan

 ==
 =
 To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
 JSP-INTEREST".
 FAQs on JSP can be found at:
  http://java.sun.com/products/jsp/faq.html
  http://www.esperanto.org.nz/jsp/jspfaq.html



Visit http://www.niit.com for eCommerce Solutions.

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html



Re: JSP menuing system

2000-02-21 Thread Ashwani Kalra

Instead of storing in database , you can use include statements in your jsp.
Included jsp may contain the generic code that you want to use at many
places.

Ashwani
 --
 From: needArchitectureHelp
 Reply To: needArchitectureHelp
 Sent: Monday, February 21, 2000 10:44 PM
 To:   [EMAIL PROTECTED]
 Subject:  JSP menuing system


 I'm [attempting to] write a JSP application.   I want to use a very
 "generic" menuing system.   For example, have database storing JSP name,
 heading, instructions, next JSP page to call.   When JSP page is called,
 access database for the appropriate information.

 Does this make sense?
 What Java method should I use to determine the current JSP page?
 Is there a better way?

 ==
 =
 To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
 JSP-INTEREST".
 FAQs on JSP can be found at:
  http://java.sun.com/products/jsp/faq.html
  http://www.esperanto.org.nz/jsp/jspfaq.html


===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html



Re: HTML from a bean?

2000-02-20 Thread Ashwani Kalra

My suggestion is just get the  columns from the ejb. And do all formatting
in jsp.Which provides more flexibility.

Ashwani

 --
 From: D. J. Hagberg
 Reply To: [EMAIL PROTECTED]
 Sent: Sunday, February 20, 2000 2:28 AM
 To:   [EMAIL PROTECTED]
 Subject:  Re: HTML from a bean?



 A couple possibilities:
 - returning an array of Strings (or Objects with appropriate toString
 methods) works well if you know your result sets will be small and that
 the creation of a bunch of temporary objects is not a huge deal.
 - for larger or unknown-length result sets, you might consider providing
 accessor methods so that the .jsp page can simply get the
 java.sql.ResultSet, though you will need to wrap things in a try/finally
 block inside the .jsp to ensure the underlying Statement is close()'d
 before you return.
 - As an alternative to providing direct access to the ResultSet, which
 can be ugly for .jsp artist-types to program, you could wrap the
 ResultSet with a kinder/gentler type of enumerated interface.  Same
 problem with needing a try/finally block in the .jsp page to close
 things up.

 -=- D. J.

 John Parrish wrote:
  What is the preferred method of generating HTML back to a JSP page from
 a
  bean? I was thinking about possibly returning a String array containing
  lines to be outputted and having JSP code loop and print. My scenario
 would
  be a bean that executes an SQL query and generates and HTML table with
 the
  results. I am very new to JSP so if I need prodding in a different
  direction, by all means prod! :) Regards

 ==
 =
 To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
 JSP-INTEREST".
 FAQs on JSP can be found at:
  http://java.sun.com/products/jsp/faq.html
  http://www.esperanto.org.nz/jsp/jspfaq.html



Visit http://www.niit.com for eCommerce Solutions.

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html



Re: Request.Form in JSP

2000-02-20 Thread Ashwani Kalra

Request.getParameter is the equivalent.
Ashwani

 --
 From: Kate S.
 Reply To: [EMAIL PROTECTED]
 Sent: Saturday, February 19, 2000 11:31 PM
 To:   [EMAIL PROTECTED]
 Subject:  Request.Form in JSP

 Hi all,

 I have a newbie question. What is equal to ASP's Request.Form in JSP? Do
 they
 have a comparative chart or something like that? I've done some ASP and
 have
 to begin project in JSP.

 Suthawan Sukhum

 ==
 =
 To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
 JSP-INTEREST".
 FAQs on JSP can be found at:
  http://java.sun.com/products/jsp/faq.html
  http://www.esperanto.org.nz/jsp/jspfaq.html



Visit http://www.niit.com for eCommerce Solutions.

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html



Re: Applet and Servlet Communication

2000-02-20 Thread Ashwani Kalra

You can use url object and pass it the parameters like query string in http
request.
Ashwani

 --
 From: Chad Darby
 Reply To: Chad Darby
 Sent: Friday, February 18, 2000 1:03 PM
 To:   [EMAIL PROTECTED]
 Subject:  Applet and Servlet Communication

  how to pass info between applet and servlet using HTTP?


 The article below provides a complete tutorial for applet and servlet
 communication using HTTP:

 -  http://www.j-nine.com/pubs/applet2servlet

 --

 ---
 Chad (shod) Darby|J9 Consulting, Inc.
 [EMAIL PROTECTED] |http://www.j-nine.com
 ---


 Info on my upcoming presentation:
 ---
 "Developing Web Apps w/ JSP  XML"
 - Evolve 2000
 - Feb 28, 2000 in Sydney, Australia
 - http://www.dstc.edu.au
 ---

 ==
 =
 To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
 JSP-INTEREST".
 FAQs on JSP can be found at:
  http://java.sun.com/products/jsp/faq.html
  http://www.esperanto.org.nz/jsp/jspfaq.html



Visit http://www.niit.com for eCommerce Solutions.

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html



Re: adding methods in a JSP page

2000-02-20 Thread Ashwani Kalra

All the code that you write that is send to the client browser is given to
jsp service method. You can write a function in following way and it will
become the member function of the resulting jsp.

%!   void function1()
{


}

%

 --
 From: Sandy Tiu
 Reply To: Sandy Tiu
 Sent: Saturday, February 19, 2000 12:48 AM
 To:   [EMAIL PROTECTED]
 Subject:  adding methods in a JSP page

 Is it possible to add methods inside a JSP page.
 i.e.

 %

 int maxRow = 2;
 int maxIdx = 0;
 dbAccess();



 private void dbAccess(){

 }

 %

 Thanks.

 Sandy Tiu
 Bank United
 Emerging Technologies Engr.


 __
 Get Your Private, Free Email at http://www.hotmail.com

 ==
 =
 To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
 JSP-INTEREST".
 FAQs on JSP can be found at:
  http://java.sun.com/products/jsp/faq.html
  http://www.esperanto.org.nz/jsp/jspfaq.html



Visit http://www.niit.com for eCommerce Solutions.

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html



Re: return from bean

2000-02-20 Thread Ashwani Kalra

Yes you can. I am doing it in my EJB. Just call the fucntion and assign the
return value to ur jsp String array varible.

Ashwani
 --
 From: Sanjay Mistry
 Reply To: Sanjay Mistry
 Sent: Friday, February 18, 2000 9:30 AM
 To:   [EMAIL PROTECTED]
 Subject:  return from bean


 hello guys,
 Well using getXXX() method of a bean, can i return an arrary of string
 in the JSP Page ?

 if yes, how can I ?

 Any help on link would be fine.

 Thanks.

 Sanjay Mistry
 __
 NetZero - Defenders of the Free World
 Get your FREE Internet Access and Email at
 http://www.netzero.net/download/index.html

 ==
 =
 To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
 JSP-INTEREST".
 FAQs on JSP can be found at:
  http://java.sun.com/products/jsp/faq.html
  http://www.esperanto.org.nz/jsp/jspfaq.html



Visit http://www.niit.com for eCommerce Solutions.

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html



Re: ip address

2000-02-20 Thread Ashwani Kalra

You can call the request.getRemoteHost() function which returns you the
string equivalent of the Client IP address.
Ashwani
 --
 From: Simon Jakesch
 Reply To: Simon Jakesch
 Sent: Thursday, February 17, 2000 11:42 AM
 To:   [EMAIL PROTECTED]
 Subject:  ip address

 hi,

 i wondered if there is a way to get the ip address of a remote sending an
 request to the jsp? shouldn't be a big deal? just need a quick tip no
 examples
 or something

 thanks guys,
 bye,
 simon

 ==
 =
 To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
 JSP-INTEREST".
 FAQs on JSP can be found at:
  http://java.sun.com/products/jsp/faq.html
  http://www.esperanto.org.nz/jsp/jspfaq.html



Visit http://www.niit.com for eCommerce Solutions.

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html



Re: Help!!!

2000-02-20 Thread Ashwani Kalra

Make ur bean statefull. And for the first query put all the results in the
vector. and when user presses next and prev buttons  extract the specifies
no of records from it and return to jsp. You have to maintain the current
row pointer for that in ur bean

Regds
Ashwani

 --
 From: Donald E. Vandenbeld
 Reply To: Donald E. Vandenbeld
 Sent: Saturday, February 19, 2000 4:24 AM
 To:   [EMAIL PROTECTED]
 Subject:  Re: Help!!!

 I have a similar situation.  My initial thought is to create a Vector
 object
 and store it in the session.  Another session variable would keep track of
 what 'page' you are on.  This enables you to move back and forth through
 the
 pages without querying the database each time.  Would it be wise to make
 this Vector object kind of a result set object that could be used for
 several different listing JSPs throughout the site?

 I should state, though, that if you have a busy site (lots of concurrent
 users) and are returning huge result sets, this would eat up memory like
 crazy.

 Donald

 - Original Message -
 From: "OG Project(Chennai)" [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Thursday, February 17, 2000 6:06 AM
 Subject: Help!!!


 
 
  Hi All,
 
  How do I display (say) 100 records from the database in the same JSP
 page
  while restricting the nos. of displayed datas  to 20 at a time on the
 page.
  Something like a search page where you get hundreds of matches and
 displays
  20 at a time and with links for the rest.
 
  Regards
  Subendu
 
 
 ==
 =
  To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
 JSP-INTEREST".
  FAQs on JSP can be found at:
   http://java.sun.com/products/jsp/faq.html
   http://www.esperanto.org.nz/jsp/jspfaq.html
 

 ==
 =
 To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
 JSP-INTEREST".
 FAQs on JSP can be found at:
  http://java.sun.com/products/jsp/faq.html
  http://www.esperanto.org.nz/jsp/jspfaq.html



Visit http://www.niit.com for eCommerce Solutions.

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html



No Subject

2000-02-07 Thread Ashwani Kalra

Hi all
Its sort of urgent ;
I have three links on a page(jsp)  which points to this page itself. but as
far as i know  if the page is cache it is picked up  from there not from the
server.
so i want to expire the page so that when the link is clicked  the page is
picked up from the server.

It must be small command of html  or ??? jsp.

please let me know if any one have done something similar.
Exact syntax will be of great help

Thanks

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html



pragma cache control meta tag

2000-02-07 Thread Ashwani Kalra

Hi,
pragma header  doesn't work properly , is ther any other solution  ???
 --
 From: Stefan van den Oord[SMTP:[EMAIL PROTECTED]]
 Reply To: Stefan van den Oord
 Sent: Monday, February 07, 2000 7:41 PM
 To:   [EMAIL PROTECTED]
 Importance:   High

 Hi Ashwani,

 If you include the following directive in your page, the browser will not
 cahce it:

 META HTTP-EQUIV="Pragma" CONTENT="no-cache"
 --
 Stefan van den Oord
 [EMAIL PROTECTED]

  From: Ashwani Kalra [EMAIL PROTECTED]
  Reply-To: [EMAIL PROTECTED]
  Date: Mon, 7 Feb 2000 19:25:02 +0530
  To: [EMAIL PROTECTED]
 
  Hi all
  Its sort of urgent ;
  I have three links on a page(jsp)  which points to this page itself. but
 as
  far as i know  if the page is cache it is picked up  from there not from
 the
  server.
  so i want to expire the page so that when the link is clicked  the page
 is
  picked up from the server.
 
  It must be small command of html  or ??? jsp.
 
  please let me know if any one have done something similar.
  Exact syntax will be of great help
 
  Thanks
 
 
 ==
 =
  To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
  JSP-INTEREST".
  FAQs on JSP can be found at:
  http://java.sun.com/products/jsp/faq.html
  http://www.esperanto.org.nz/jsp/jspfaq.html

 ==
 =
 To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
 JSP-INTEREST".
 FAQs on JSP can be found at:
  http://java.sun.com/products/jsp/faq.html
  http://www.esperanto.org.nz/jsp/jspfaq.html


===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html



No Subject

2000-02-03 Thread Ashwani Kalra

Hi all
This question was asked yeaterday.
Is there any way to track if user has pressed the refresh button of the
browser.I want to ignore that request ???

Any idea

Thanks
Ashwani

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html



JSP form get method

2000-01-31 Thread Ashwani Kalra

Hi,
I want to access the information from jsp form on the next page. I cannot
use the post method because I am conditionally going to the next page. So i
am using get method using query string. But query string has limitation of
the data u send after the ? mark. Any solution for this 


Ashwani

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html



diplay of records page by page

2000-01-24 Thread Ashwani Kalra

Hi,

Rajiv has given me  the solution for diplaying the records page by page(say
10 records per page). But Once i get all the records from the database i
dont want to use my EJB to do any thing. I just want those records obtained
in a vector or array to be displayed page by page
Has any body more ideas ???

thanks
Ashwani


Visit http://www.niit.com for eCommerce Solutions.

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html



important for all jsp developers

2000-01-22 Thread Ashwani Kalra

Hi all ,
Can any body provide some information for the following  situation ?

Since JSP page is compiled into  the servlet class that has only one
instance(normally) and initilized only once. All the variables declared
using %! % tags become the part of the member variables of the servlet
class(i.e. page implementation class).

Now consider follwing scenario.
I have declared one int variable and initilized to 0. My first http request
to this variable sets to some other value say 100.Now my question is that if
i make another request to same page and display this variable . What will be
ouptput 0 or 100.(looks that it should be 100 but this will create problem
for me. because my second request is expecting 0 value to be used in
calculation.)
can any Body suggest a solution for this so that each page will have its own
value.
eagerly waiting for reply

Thanks and Regds
Ashwani




Visit http://www.niit.com for eCommerce Solutions.

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html



webserver and ejb server on different machines

2000-01-21 Thread Ashwani Kalra

Hi,
What settings and things have to be taken care of if my jsp pages are
running on one machine  using beans on other machine.

Thanks
Ashwani


Visit http://www.niit.com for eCommerce Solutions.

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html



jsp variables scope

2000-01-20 Thread Ashwani Kalra

Hi all
One basic question. What is the scope the variable that are declared using
%! % tags when that page is compiled into servelet. Is it private, public
, protected.can some other servelet or jsp access those variables.

Thanks
Ashwani


Visit http://www.niit.com for eCommerce Solutions.

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html



EJB developers

2000-01-02 Thread Ashwani Kalra

Hi all,
Please tell me what is the difference between object and instance in EJB
context. As the text on ejb says that when ever client request comes
container pickup instance from pool and links it to the ejb object. This
means intance of the class and ejb object are different in EJB.
Any clarifications?

Thanx
Ashwani

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html



No Subject

1999-12-30 Thread Ashwani Kalra

Visit http://www.niit.com for eCommerce Solutions.

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html



No Subject

1999-12-29 Thread Ashwani Kalra

Hi, every body,
can any body tell me the steps to set up the j2ee server for testing my Ejbs

Ashwani

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html