Re: JSP, JRun and PWS

2001-11-02 Thread Daryani Santosh

Yes , its possible . I was doing it on my PC , but I was using Jrun 2.3. It was
a while back , haven't tried
it with Jrun 3.0.
 I was running JSPs on PWS on port 8100.


santosh








Theo Starr <[EMAIL PROTECTED]> on 11/02/2001 06:39:32 AM

Please respond to A mailing list about Java Server Pages specification and
  reference <[EMAIL PROTECTED]>

To:   [EMAIL PROTECTED]
cc:(bcc: Santosh Daryani/IT/Aon Consulting)

Subject:  JSP, JRun and PWS



Hello Everybody

Is it possible to run JSP with JRun on Personal Web Server??

Has anyone done this with success??

Theo Starr
Almityand-Mega Multimedia
WWW:  http://www.ozemail.com.au/~almity1
email:  [EMAIL PROTECTED]

===
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: Need Some Help with xml and jsp!

2001-10-30 Thread Daryani Santosh

Here's some jsp code that will parse a xml file and display its contents in a
HTML table


***Start**
<%@ page import="java.sql.*,javax.xml.parsers.*,org.w3c.dom.*,java.io.*"%>

<%  //Parse a XML file and print its contents using DOM

String xmlFile = "\\financialpassport\\basic_data.xml";
//create a DocumentBuilderFactory
 DocumentBuilderFactory dbf =  DocumentBuilderFactory.newInstance();

//create a DocumentBuilder
 DocumentBuilder db = dbf.newDocumentBuilder();

//parse the input file to get  a Document object
 Document doc = db.parse(new File(xmlFile));
%>


Your Title Here



whatever you want as heading 

<%
traverseTree(doc, out);
%>

<%! private void traverseTree(Node node,JspWriter out) throws Exception {
if(node == null) {
   return;
}
int type = node.getNodeType();

switch (type) {
   // handle document nodes
   case Node.DOCUMENT_NODE: {
 out.println("");
 traverseTree(((Document)node).getDocumentElement(),
 out);
 break;
  }
  // handle element nodes
  case Node.ELEMENT_NODE: {
String elementName = node.getNodeName();
 if(elementName.equals("record")) {
   out.println("");
 }
 NodeList childNodes = node.getChildNodes();
 if(childNodes != null) {
int length = childNodes.getLength();
for (int loopIndex = 0; loopIndex < length ; loopIndex++)
{
 traverseTree(childNodes.item(loopIndex),out);
}
  }
  break;
   }
   // handle text nodes
   case Node.TEXT_NODE: {
  String data = node.getNodeValue().trim();

  if((data.indexOf("\n")  <0) && (data.length() > 0)) {
out.println(""+data+"");
  }
}
 }
}
%>



***End**

In the section "case Node.ELEMENT_NODE: " replace records with the tag_name
you want to begin parsing


hope this helps
santosh








Dmitry Namiot <[EMAIL PROTECTED]> on 10/30/2001 08:32:09 AM

Please respond to A mailing list about Java Server Pages specification and
  reference <[EMAIL PROTECTED]>

To:   [EMAIL PROTECTED]
cc:(bcc: Santosh Daryani/IT/Aon Consulting)

Subject:  Re: Need Some Help with xml and jsp!



>What is the best way to read a xml docuement in jsp going node to node.

Check out Coldtags suite on http://www.servletsuite.com/jsp.htm
XMLTextReader taglib does this job.
--
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



Re: SSL

2001-10-30 Thread Daryani Santosh

In the IIS manager , there is an option to change the port number. Change it to
443






VENKATACHALAPATHY Duraiswamy <[EMAIL PROTECTED]> on 10/30/2001 07:36:04 AM

Please respond to A mailing list about Java Server Pages specification and
  reference <[EMAIL PROTECTED]>

To:   [EMAIL PROTECTED]
cc:(bcc: Santosh Daryani/IT/Aon Consulting)

Subject:  SSL



Hi All:
How do I make a web application running on the websphere application
server as a SSL enabled one? Actually we are using IIS as the web server.


Thanks
Venkat

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

2001-10-29 Thread Daryani Santosh

kawa , forte , homesite






Joe Cheng <[EMAIL PROTECTED]> on 10/29/2001 12:33:11 PM

Please respond to A mailing list about Java Server Pages specification and
  reference <[EMAIL PROTECTED]>

To:   [EMAIL PROTECTED]
cc:(bcc: Santosh Daryani/IT/Aon Consulting)

Subject:  Re: JSP editor



>> Is there a good JSP editor available anywhere to download? Such as MS
Visual
Studio for ASP... <<

I've heard good things from a coworker about IntelliJ IDEA but haven't had a
chance to try it myself.  And there's an article on Orion's site about it
that explains some of its features:

http://www.orionserver.com/tools/idea/

-jmc

===
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: Rounding in Java

2001-10-23 Thread Daryani Santosh

Here's some code that will help you accomplish rounding to fix decimal places.
All my code may not be needed ,
pick the pieces you need.

public static String format(double source) {
synchronized (cacheLocale) {
updateCache();
return cacheNumberFormat.format(source);
}
}

public static Number parse(String source) {
synchronized (cacheLocale) {
updateCache();
try {
return cacheNumberFormat.parse(source);
} catch (ParseException p) {
return INVALID;
}
}
}

// = privates =
private static void updateCache() {
Locale current = Locale.getDefault();
if (!current.equals(cacheLocale)) {
cacheLocale = current;
cacheNumberFormat = NumberFormat.getInstance(cacheLocale);
   cacheNumberFormat.setMaximumFractionDigits(2);
   cacheNumberFormat.setMinimumFractionDigits(2);
}
}

 public double getDouble(String num)  {

 if (num==null) return 0.00;

 if(num.startsWith("$"))
  num = num.substring(1);
 if(num.startsWith("N/A"))
  num = "0.0";

  Number parsedNum = this.parse(num);
  return
Double.isNaN(parsedNum.doubleValue())?0.0:parsedNum.doubleValue();
 }

 public String fixDecimalPlaces(double num){
  return Double.isNaN(num)?"0.00":this.format(num);
 }

 public static final Double INVALID = new Double(Double.NaN);
 private static Locale cacheLocale = new Locale("NONE","","");
private static NumberFormat cacheNumberFormat;


hope that helps
santosh









Alireza Nahavandi <[EMAIL PROTECTED]> on 10/23/2001 09:50:42 AM

Please respond to A mailing list about Java Server Pages specification and
  reference <[EMAIL PROTECTED]>

To:   [EMAIL PROTECTED]
cc:(bcc: Santosh Daryani/IT/Aon Consulting)

Subject:  Rounding in Java



In Java, how can I round a double value with specific precision. Example :
value 1.715 need to be round up to 1.72 and 1.714 need to be round down to
1.71.

Thank you.

===
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: any maillist FAQ?

2001-10-18 Thread Daryani Santosh

If you scroll to the bottom of every JSP mailing list email ( including this one
) , you will find a link to
the archives and a couple of FAQ sites






Alex Kachanov <[EMAIL PROTECTED]> on 10/18/2001 01:06:30 AM

Please respond to A mailing list about Java Server Pages specification and
  reference <[EMAIL PROTECTED]>

To:   [EMAIL PROTECTED]
cc:(bcc: Santosh Daryani/IT/Aon Consulting)

Subject:  any maillist FAQ?



Does this mail list have any FAQ?

'Cause the qustion about Apache + Tomcat is coming
second time this week


with best wishes
Alexander Kachanov

-Original Message-
From: Steve Curd [mailto:[EMAIL PROTECTED]]
Sent: 18 ??? 2001 ?. 7:15
To: [EMAIL PROTECTED]
Subject: Re: configuring Apache with Tomcat.


It depends on what version of Tomcat you are running.  To get it
configured, I recommend the following steps.

To: [EMAIL PROTECTED]
Subject: configuring Apache with Tomcat.



Hi,
How do i configure Apache to run with Tomcat ??

regards
arun.

=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: Upload Via JSP

2001-10-02 Thread Daryani Santosh

You can do this using a servlet. Browse any file from a client's machine using
the "FILE" type within a HTML form or JSP. Post he form to a servlet that
downloads this file onto the server using a ServletInputStream.
   The code to do this is available on servlet.com , it is also described in
Jason Hunter's book Java Servlet Programming by O'reilly publication.
   Other than the O'Reilly package there are other packages available for
download. If you cannot get it to work let me know I'll mail you the code.


Santosh








Mozhgan Eslami <[EMAIL PROTECTED]> on 10/02/2001 04:29:09 PM

Please respond to A mailing list about Java Server Pages specification and
  reference <[EMAIL PROTECTED]>

To:   [EMAIL PROTECTED]
cc:(bcc: Santosh Daryani/IT/Aon Consulting)

Subject:  Upload Via JSP



Hi All,
I want to upload a file via JSP.
I want to write a program that User select a file from client and then
upload the file to Server for process.
How can I do Upload?
Thanks a lot for your helps,
Mozhgan.

===
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://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".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
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: using Load balancers with JSP pages

2001-08-30 Thread Daryani Santosh

There is a configuration setting on the load balancing tool that allows a
session connection to be linked to the same machine for the duration of the
session.

We use a load balancing tool called radware and some of our applications are
balanced on 50 servers. It works fine , different requests from the associated
with the same session are handled appropriately.

Santosh








"sumabala v.Jilludumudi" <[EMAIL PROTECTED]> on 08/30/2001 08:42:16 AM

Please respond to A mailing list about Java Server Pages specification and
  reference <[EMAIL PROTECTED]>

To:   [EMAIL PROTECTED]
cc:(bcc: Santosh Daryani/IT/Aon Consulting)

Subject:  using Load balancers with JSP pages



We are using a load balancer which routes the request to one of the machines. we
have JavaWebServer2.0 running on both the machines and one of the machines
serves the content.

We are using sessions in our jsp pages. First when a jsp page is requested, we
are storing some values in the session. later when another jsp page is accesses
we are using the values stored in the session earlier. now hte problem is if the
next request is also routed to the same machine, the session values are being
retrieved and everything works fine. but if the next request is routed to
another machine the values stored in the earlier erquest on the first machine
are not being accessessible and the session values are returning null.

So if JSP pages are being served from 2 different machines, how can the same
session be maintained on both the machines.

===
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://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".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
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: How to write a scheduler????

2001-08-30 Thread Daryani Santosh

You can do it either way. Database or application level.

At the database level , you can write a stored procedure that executes
automatically at a scheduled time.
Most RDBMS have a scheduling functionality.

At the application level you can write a class or a servlet and execute it at a
scheduled interval.  On the MS platform you can use NT Scheduled tasks , on a
UNIX environment you can use a cron job to execute the class or servlet.

I think it would be easier to do it at the database level because if you do it
at the application level you will finally be interacting with the database. By
doing it in the database you remove an added layer.Another advantage at the DB
level is security , you can associate a restricted user account to execute the
procedure, no one else can execute that without privileges.

Santosh







Shuja <[EMAIL PROTECTED]> on 08/29/2001 01:45:58 PM

Please respond to A mailing list about Java Server Pages specification and
  reference <[EMAIL PROTECTED]>

To:   [EMAIL PROTECTED]
cc:(bcc: Santosh Daryani/IT/Aon Consulting)

Subject:  How to write a scheduler



Hi,

I want to write a scheduler to delete certain records from the database
after a certain time e.g. the expired listings should be removed.

Should I use it on database level or application servers do support
features like this. Any suggestion ? Thank you in anticipation.

From:
Shuja Nawaz.
Software Developer.
Visualsoft-inc.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://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".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
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: offtopic

2001-08-30 Thread Daryani Santosh

The i in 8i stands for Internet. Oracle's embrace of the Java programming
language, bundled with an array of proprietary and common Web-enabling
technologies, makes it possible to fuse Oracle's traditional relational database
programming with Internet-applications development.

 It has more web functionality , added java integration , provides connection
pooling classes
to be used with JSPs. Also it has a lot of XML features built in.

Santosh







Rajinder Sandhu <[EMAIL PROTECTED]> on 08/30/2001 07:31:49 AM

Please respond to A mailing list about Java Server Pages specification and
  reference <[EMAIL PROTECTED]>

To:   [EMAIL PROTECTED]
cc:(bcc: Santosh Daryani/IT/Aon Consulting)

Subject:  offtopic



though it is a scilly to ask this over here but there is an argument going
over here.

any body can tell me what does i stands for in oracle 8i ?

===
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://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".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
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: Creating a JSP function

2001-08-29 Thread Daryani Santosh

Make sure you include the jsp file if the function is not in the same jsp.
Another thing you might wanna check is the datatype you are passing. The method
may already be available but you may be passing a value other than double.
  If you still cannot figure it out, send your code , I can take a look.

Santosh






Gustavo Gallas <[EMAIL PROTECTED]> on 08/29/2001 01:59:12 PM

Please respond to A mailing list about Java Server Pages specification and
  reference <[EMAIL PROTECTED]>

To:   [EMAIL PROTECTED]
cc:(bcc: Santosh Daryani/IT/Aon Consulting)

Subject:  Re: Creating a JSP function



When calling a function dbToMoney I declared, I'm getting the following
error message:

500 Internal Server Error
/Eponte/hc_compre2.jsp:

javax.servlet.ServletException: Compilation error occured:
 Found 8 errors in JSP file:
E:\\Servers\\JRun\\servers\\default\\default-app\\Eponte\\parametros.jsp:232
: Error: No match was found for method "dbToMoney(double)".

Is there any hint to call this function I declared?

thanx


- Original Message -
From: "Rajesh Nair" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, August 29, 2001 2:26 PM
Subject: Re: Creating a JSP function


> Jsp allows any valid Java constructs and functions. You can write  a
> funciton
> within the <%! %> tags.
>
>
>
> -Original Message-
> From: Miihir Sahu [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, August 29, 2001 10:18 AM
> To: [EMAIL PROTECTED]
> Subject: Re: Creating a JSP function
>
>
> Hi,
> As far as I know, we cannot have a function in JSP.  This is due to
> the fact that whatever we are writing in the JSP is combined into a
> function in a servlet.  So if we are to write JSP function, that means
> function within a function, whichi is not possiblethis is what I
> know from the knowledge of JSP.  If anyone has really done it, please do
> inform me, as I think it is a really a surprise to me.  Thanks
> Regards
> Mihir
>
>
===
> 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://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".
> For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
DIGEST".
> 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".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
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".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
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: Creating a JSP function

2001-08-29 Thread Daryani Santosh

You can create a function a JSP . JSP gets converted by the JSP container into a
java file and compiled into a class file. The JSP is converted into a class and
not a function. So if you have a function in your JSP  it becomes a part of the
CLASS and NOT FUNCTION.

Here is an JSP code snippet and its corresponding generated class.The function
doLogin gets included as a function
in the generated class jrun__2e__login2ejspc.


JSP Code
<%@ include file="include/login_inc.jsp" %>
<%
String szError = new String("");
String USER_ID = (String)request.getParameter("UserID");
String PASSWORD = (String)request.getParameter("Password");

if (USER_ID != null) {
 if(doLogin(USER_ID, PASSWORD, session) == SUCCESS){
  response.sendRedirect(returnMsg);
 } else {
  szError = returnMsg;
 }
}
%>




JSP Code from included file login_inc.jsp
<%@ page import="java.sql.*"%>
<%!
public int doLogin(String USER_ID, String PASSWORD, HttpSession session)
{
 ResultSet rs;
 Statement stmt;
 Connection dbConn;

 try {
  Class.forName("oracle.jdbc.driver.OracleDriver");
  dbConn = DriverManager.getConnection(database, userid, password);

 }

 catch(Exception e) {
  returnMsg = "doLogin: " + e.getMessage();
  return FAILURE;
 }
}
%>



Generaed JAVA Code
// Generated by JRun, do not edit


import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;
import javax.servlet.jsp.tagext.*;
import allaire.jrun.jsp.JRunJSPStaticHelpers;

/*##E:\\benefacts\\TR\\dev\\login.jsp##*/
/*#1#1#*/import java.sql.*;public class jrun__2e__login2ejspc extends
allaire.jrun.jsp.HttpJSPServlet implements allaire.jrun.jsp.JRunJspPage
{
private ServletConfig config;
private ServletContext application;
private Object page = this;
private JspFactory __jspFactory = JspFactory.getDefaultFactory();

public void _jspService(HttpServletRequest request, HttpServletResponse
response)
 throws ServletException, java.io.IOException
{
if(config == null) {
config = getServletConfig();
application = config.getServletContext();
}
response.setContentType("text/html; charset=ISO-8859-1");
PageContext pageContext = __jspFactory.getPageContext(this, request,
response,  null, true, 8192, true);
JspWriter out = pageContext.getOut();
HttpSession session = pageContext.getSession();

try {
/*##E:\\benefacts\\TR\\dev\\include\\login_inc.jsp##*/out.print("\r\n");

/*#3#11#*/String szError = new String("");
String USER_ID = (String)request.getParameter("UserID");
String PASSWORD = (String)request.getParameter("Password");

if (USER_ID != null) {
 if(doLogin(USER_ID, PASSWORD, session) == SUCCESS){
  response.sendRedirect(returnMsg);
 } else {
  szError = returnMsg;
 }
}

} catch(Throwable t) {
if(t instanceof ServletException)
throw (ServletException) t;
if(t instanceof java.io.IOException)
throw (java.io.IOException) t;
if(t instanceof RuntimeException)
throw (RuntimeException) t;
throw JRunJSPStaticHelpers.handleException(t, pageContext);

} finally {
__jspFactory.releasePageContext(pageContext);
}
}

public int doLogin(String USER_ID, String PASSWORD, HttpSession session)
{
 ResultSet rs;
 Statement stmt;
 Connection dbConn;

 try {
  Class.forName("oracle.jdbc.driver.OracleDriver");
  dbConn = DriverManager.getConnection(database, userid, password);
}

  catch(Exception e) {
  returnMsg = "doLogin: " + e.getMessage();
  return FAILURE;
 }
}
}


Santosh









Miihir Sahu <[EMAIL PROTECTED]> on 08/29/2001 11:18:01 AM

Please respond to A mailing list about Java Server Pages specification and
  reference <[EMAIL PROTECTED]>

To:   [EMAIL PROTECTED]
cc:(bcc: Santosh Daryani/IT/Aon Consulting)

Subject:  Re: Creating a JSP function



Hi,
As far as I know, we cannot have a function in JSP.  This is due to
the fact that whatever we are writing in the JSP is combined into a
function in a servlet.  So if we are to write JSP function, that means
function within a function, whichi is not possiblethis is what I
know from the knowledge of JSP.  If anyone has really done it, please do
inform me, as I think it is a really a surprise to me.  Thanks
Regards
Mihir

===
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://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: What is equivalent of EJB in ASP?

2001-08-24 Thread Daryani Santosh



Wrong ! Wrong ! Totally Incorrect !
ASP include files or Design time controls have no comparison with EJB.

There is no 100% equivalent of EJB in ASP , but there are Microsoft technologies
avaiable that can do similar
functions as EJBs such as DCOM , COM+ . I am not sure but I believe the new DNA
architecture of .NET has more distributed enterprise level components.

Santosh








"Conyers, Dwayne" <[EMAIL PROTECTED]> on 08/20/2001 02:46:40 PM

Please respond to A mailing list about Java Server Pages specification and
  reference <[EMAIL PROTECTED]>

To:   [EMAIL PROTECTED]
cc:(bcc: Santosh Daryani/IT/Aon Consulting)

Subject:  Re: What is equivalent of EJB in ASP?



In ASP, an include file may be equivalent to an EJB... in a matter of
speaking.  In Visual InterDev, the design time controls (DTC) seem to have
equivalent functionality to EJB.








???
©?©¬
 =   Awful tired now, boss...
 Dog tired.
http://www.dwacon.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://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?nameJSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?nameServlets







Re: O'reilly Upload Problem

2001-07-19 Thread Daryani Santosh

Its probably a content-type error , the default content type I believe is
text/html.

Change it to
response.setContentType("application/octet-stream");

This will allow uploading of file types like gif, jpg,txt  etc


Santosh













SUBSCRIBE JSP-INTEREST Gillian <[EMAIL PROTECTED]> on 07/19/2001 05:14:10 PM

Please respond to A mailing list about Java Server Pages specification and
  reference <[EMAIL PROTECTED]>

To:   [EMAIL PROTECTED]
cc:(bcc: Santosh Daryani/IT/Aon Consulting)

Subject:  O'reilly Upload Problem



Hi,

I am trying to get file upload functionality working, using the O'reilly
multipart classes. I have some sample code that seems to work fine on other
installs, but on both my local machine and the development server we are working
on, I get the following error when the code is executed.  I can upload .txt
files without a problem, but not .gif or .jpg files, regardless of size.

code fragment:

   else if ( part.isFile() )

// it's a file part

filePart = (FilePart) part;

fileName = filePart.getFileName();

   if ( fileName != null ) {
// the part actually contained a file

ByteArrayOutputStream bos = new ByteArrayOutputStream();

long size = 0;

try{
  size = filePart.writeTo( bos );

} catch(IOException e){

 System.out.println("writeTo(bos) exception = " + e.getMessage());

 }

The exception that is caught is:  "unexpected end of part"

Also, there is a servlet exception thrown:  javax.servlet.ServletException:
Broken pipe

Please help!

Thanks,
Gillian

===
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://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".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
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 in Database

2001-07-10 Thread Daryani Santosh

You can use Oracle 8i database to store your java code , you can store an entire
package in the database.The methods inside that classes can be called similar to
accessing database objects. I haven't done it , but one of my colleagues
demonstrated an example. So I know it can be done but I do not the exact
details.
  Again this was java code , I am not sure about JSPs


Santosh








Mihir Sahu <[EMAIL PROTECTED]> on 07/10/2001 11:24:20 AM

Please respond to A mailing list about Java Server Pages specification and
  reference <[EMAIL PROTECTED]>

To:   [EMAIL PROTECTED]
cc:(bcc: Santosh Daryani/IT/Aon Consulting)

Subject:  Jsp in Database



Hi,
  Has anybody stored jsp pages in a RDBMS database, and then retrieved it from
database and display it...If yes, can you please inform me how to do it...I
think
it would be using LOBs..but not sure how to do it...Thanks
Regards
Mihir

===
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://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".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
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: File Upload

2001-07-09 Thread Daryani Santosh

You can do a HTTP post from your JSP to a servlet. Code your JSP page to have a
form that has an input type ="file" ,
this will allow you to select any file from the client . Post this form to a
servlet.
  The servlet reads the InputStream and downloads the stream to the server.
Once you have the file on the server,
you can use a BLOB variable to insert in into the database . Most of the RDBMS
have a BLOB data type.
   You can write the servlet for downloading the bitmap , or use a existing
package provided by O'Reilly. Visit servlets.com or oreilly web site. The
example is explained in Jason Hunters, Servlet programming book.


Santosh









"Richie Bab A. Boyboy" <[EMAIL PROTECTED]> on 07/08/2001 11:12:55 PM

Please respond to A mailing list about Java Server Pages specification and
  reference <[EMAIL PROTECTED]>

To:   [EMAIL PROTECTED]
cc:(bcc: Santosh Daryani/IT/Aon Consulting)

Subject:  File Upload



People,

Do you have any idea on how to upload a file?
For example,from my JSP page I want to upload a bitmap file and save it
in the database.

Richie

===
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://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".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
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: How to directly open Excel document in the browser

2001-06-04 Thread Daryani Santosh

Set your response type to MS-Excel

response.setContentType("application/vnd.ms-exel");

Santosh








Raghu Babu <[EMAIL PROTECTED]> on 07/05/2000 11:12:19 AM

Please respond to A mailing list about Java Server Pages specification and
  reference <[EMAIL PROTECTED]>

To:   [EMAIL PROTECTED]
cc:(bcc: Santosh Daryani/IT/Aon Consulting)

Subject:  How to directly open Excel document in the browser



Hi all,
   When I am trying to open an excel document in the browser It is popping
up "save as" dialog box.  I don't want that dialog box to come.  Instead the
Excel file should be directly opened.
Any help Gurus,

Regards
Raghu

===
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://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".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
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: free hosting site for JSp

2001-06-01 Thread Daryani Santosh

http://www.webappcabaret.com

Santosh






Preeti <[EMAIL PROTECTED]> on 06/01/2001 02:55:47 PM

Please respond to A mailing list about Java Server Pages specification and
  reference <[EMAIL PROTECTED]>

To:   [EMAIL PROTECTED]
cc:(bcc: Santosh Daryani/IT/Aon Consulting)

Subject:  free hosting site for JSp



hi friends
Hey if any one knows the Free hosting web sites for JSP please let me know
as I need it urgently
Regards Preeti

- Original Message -
From: Sachin S. Khanna <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, May 18, 2001 7:02 AM


> Find the modified jsp and bean files below :
> They are working :-)
> bean file :
>
> mport java.sql.*;
> import java.util.*;
>
> public class databank {
>
> private String driver = "sun.jdbc.odbc.JdbcOdbcDriver";
> private String url = "jdbc:odbc:db1";
> private Connection connection;
> private Statement statement;
> private ResultSet res;
> private ResultSetMetaData meta;
> private String naam;
> private int aantal;
>
> public databank(){}
>
> public ResultSet lijst(){
>   try {
>String query = "select * from klant";
>Class.forName(driver);
>connection = DriverManager.getConnection(url);
>statement = connection.createStatement();
>res = statement.executeQuery(query);
>   }
>   catch (SQLException e){
>   }
>   catch (ClassNotFoundException cnfex){}
>
>   return res;
> }
> }
> --
> jsp file
>
> html>
> 
>
> <%@ page import="databank" %>
> <%@ page import="java.sql.*" %>
>
> 
>
> <%!  ResultSet res;
>  ResultSetMetaData meta;
>  int aantal;
>  int kol;
> %>
>
> <% res = db.lijst();
>  %>
>
> <% if(!res.next()) {
> System.out.println("Reached here again");
> out.println("Deze instructie heeft geen resultaten");
> }
> else
>
>   res.next();
> %>
> <%= res.getString(0) %>
> <% } %>
>
>
> 
> 
>
>
>
> Have a nice day.
> With regards,
> Sachin S. Khanna
> http://www.emailanorder.com
> - Original Message -
> From: Jonas Devries <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Friday, May 18, 2001 3:14 PM
>
>
> > This is the whole jsp-file!!!
> >
> > Hope you can do something with it!!
> >
> > Thanx
> > Jonas
> >
> > 
> > 
> >
> > <%@ page import="databank" import="java.sql.*" %>
> >
> > 
> >
> > <%!  ResultSet res;
> >  ResultSetMetaData meta;
> >  int aantal;
> >  int kol;
> > %>
> >
> > <% res = db.lijst("select * from klant"); %>
> >
> > <% if(!res.next()) {
> > out.println("Deze instructie heeft geen resultaten");
> > }
> > else { %>
> > <%= res.getString(0) %>
> > <% } %>
> >
> >
> > 
> > 
> >
> >
> > >From: "Sachin S. Khanna" <[EMAIL PROTECTED]>
> > >Reply-To: A mailing list about Java Server Pages specification and
> > > reference <[EMAIL PROTECTED]>
> > >To: [EMAIL PROTECTED]
> > >Date: Fri, 18 May 2001 14:37:47 +0530
> > >
> > >Couple of things :
> > >a) Provide the complete source code for the jsp.
> > >b) Apparently nothing seems to be wrong with your java bean code.
> > >Have a nice day.
> > >With regards,
> > >Sachin S. Khanna
> > >http://www.emailanorder.com
> > >- Original Message -
> > >From: Jonas Devries <[EMAIL PROTECTED]>
> > >To: <[EMAIL PROTECTED]>
> > >Sent: Friday, May 18, 2001 1:04 PM
> > >
> > >
> > > > Does somebody knows why this code doesn't work?  I want to acces a
MS
> =
> > > > Access DB and give a simple query.  I give the ResultSet back to my
> JSP
> > >=
> > > > file but he gives some errors.  JSP and Java-bean are included.
> Errors
> > >=
> > > > also.  There is data in the db and the odbc-jdbc driver is
installed.
> > > >
> > > > Thank you very much in advance
> > > >
> > > > Jonas
> > > >
> > > >
> > > > import java.sql.*;
> > > > import java.util.*;
> > > >
> > > > public class databank {
> > > >
> > > > private String driver =3D "sun.jdbc.odbc.Jdbc.OdbcDriver";
> > > > private String url =3D "jdbc:odbc:db1";
> > > > private Connection connection;
> > > > private Statement statement;
> > > > private ResultSet res;
> > > > private ResultSetMetaData meta;
> > > > private String naam;
> > > > private int aantal;
> > > >
> > > > public databank(){}
> > > > =20
> > > > =20
> > > > public ResultSet lijst(){
> > > >
> > > >   try {
> > > >String query =3D "select * from klant";
> > > >Class.forName(driver);
> > > >connection =3D DriverManager.getConnection(url);=20
> > > >statement =3D connection.createStatement();
> > > >res =3D statement.executeQuery(query);=20
> > > > =20
> > > >   }
> > > >   catch (SQLException e){}
> > > >   catch (ClassNotFoundException cnfex){}=20
> > > >
> > > >   return res;
> > > >
> > > > }
> > > >
> > > > }
> > > >
> > > >
> > > >
> > > >
> > > > ResultSetMetaData meta =3D res.getMetaData(); int aantal =3D
> > > > meta.getColumnCount(); %> while (res.next()){ for (kol =3D 1; kol
<=3D
> > > > aantal; kol++) %>
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > Error: 500
> > > > Location: /test9.jsp
> > > > Int

Re: Database connection Pool in Tomcat

2001-05-30 Thread Daryani Santosh

Oracle provides classes for connection pooling. There is a good description of
the classes and how to implement them.
You can read more at
http://technet.oracle.com/docs/products/oracle8i/doc_library/817_doc/java.817/a83724/connpoc2.htm


Santosh









Hans Bergsten <[EMAIL PROTECTED]> on 05/29/2001 10:30:57 PM

Please respond to A mailing list about Java Server Pages specification and
  reference <[EMAIL PROTECTED]>

To:   [EMAIL PROTECTED]
cc:(bcc: Santosh Daryani/IT/Aon Consulting)

Subject:  Re: Database connection Pool in Tomcat



"Chawla, Mehar" wrote:
>
> Hi all,
>
> Can anyone tell me how to implement JDBC connection pooling in Tomcat.
> Basically I want the following things :
>
> 1. Setup the connection pool in web.xml or server.xml with oracle user
> name and password set up in that file itself to avoid harcoding the username
> and password
> in the servlets or jsp files.

You can use either servlet or context init parameters in the web.xml
file to specify this type of information. The values you specify can
be read with ServletConfig.getInitParameter() and
ServletContext.getInitParameter()
respectively. See also below.

> 2. Create a Servlet with methods GetConnection and ReleaseConnection
> (not close connection) to return the connection back to the pool and which
> should be loaded on startup of the web server (Tomcat)

First, I believe Tomcat 4.0 (currently in beta) implements the part of
the Servlet specification that allows you to specify a JDBC DataSource-based
connection pool as  in the web.xml (even though this is only
mandatory for a complete J2EE product, as opposed to a simple web container).
With this approach you get a reference to the pool using JNDI. Other web
containers may do the same, but since it's not mandated by the spec, it
may not be available in all simple web containers.

If you don't want to use this approach, what you have in mind is also
possible. I would, however, recommend that you use a servlet to create
an instance of a separate pool class (there are many available on the net)
and make it available to the rest of the application as a ServletContext
attribute.

> 3. And finally the jsp code to get the connection from that servlet.

I strongly recommend that you either put all the database code in a
servlet instead (acting as the Controller in the MVC model), or use a
set of custom actions in the JSP pages that know how to get hold of
connections from the pool. Otherwise you'll soon run into reliability
problems (for instance, making sure the connection is always returned to
the pool is not trivial if you use scriptlets in the JSP page) and
maintenance problems (the amount if Java code to do this right as way to
much to put directly in a JSP page; it's harder to debug the generated
servlet than it is to debug a standard Java class that you have full
control over).

Either way, if you have the pool available as a context attribute, all
you need to do to access it is something like this:

  DataSource pool = (DataSource) context.getAttribute("mypool");
  Connection conn = pool.getConnection();

> I would appericiate if you could help me in setting this up by providing
> the sample code.

I describe using a servlet to create a pool and make it available as
a context attribute and a set of custom actions for accessing the
database in my JSP book, along with the source code for all of it:

  

There are also similar custom actions within the Jakarta Taglibs
project:

  

Hans
--
Hans Bergsten   [EMAIL PROTECTED]
Gefion Software http://www.gefionsoftware.com
Author of JavaServer Pages (O'Reilly), http://TheJSPBook.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://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".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
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: JRun

2001-05-25 Thread Daryani Santosh

What version of JRun are you running ?

In JRun 3.0

JRun\servers\default\default-app -> maps to http://servername:portnumber/

If you have a firstjsp.jsp under JRun\servers\default\default-app
you should be able to serve it with this url
http://servername:portnumber/firstjsp.jsp

You can put JSPs wherever you want , provided you map a virtual directory to
your physical path.

To test your JRun settings, if using 3.0 , start teh Admin Server and go to
Administrator .
You can run samples from that page.If your samples work , that proves JRun is
serving
pages , but there might be something else wrong.

Santosh









"[Qari Qasim]" <[EMAIL PROTECTED]> on 05/25/2001 10:45:59 AM

Please respond to A mailing list about Java Server Pages specification and
  reference <[EMAIL PROTECTED]>

To:   [EMAIL PROTECTED]
cc:(bcc: Santosh Daryani/IT/Aon Consulting)

Subject:  JRun



Does anyone know where to put JSP files in Jrun.
According to document, we should put the JSP files under:

/servers/default/default-app

I have put a jsp file in this directory, however, when I try to run this
file, I get the following error:

404 Not Found
/firstjsp.jsp:

allaire.jrun.JRunServletException: The page /firstjsp.jsp could not be
found.
.

does anyone know what I need to do

Regards,

===
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://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".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
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: How to prevent IE from cacheing a JSP page

2001-05-24 Thread Daryani Santosh

Try this
Create a JSP file cache_buster.jsp

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

Include this JSP in your page


Santosh







Celeste Haseltine <[EMAIL PROTECTED]> on 05/17/2001 03:49:40 PM

Please respond to A mailing list about Java Server Pages specification and
  reference <[EMAIL PROTECTED]>

To:   [EMAIL PROTECTED]
cc:(bcc: Santosh Daryani/IT/Aon Consulting)

Subject:  How to prevent IE from cacheing a JSP page



I'm hoping someone out here has run into this problem, and has found a way
to address this.  I've researched this for two days, and have not found a
solution.

I have 2 jsp files, one that includes server side JavaScript to create a
DHTML menu dynamically.  In order for these two jsp's to work properly, I
have to determine what JS files to "include" in the JSP page based off of
the user's login, and I also do this dynamically.  Both of these files work
perfectly if I test my web site using Netscape, but not with IE.  From doing
some research, I have discovered that Netscape does not cache pages, and
that I can set the expiration of a page to "0" so that a particular JSP is
always recompiled, regardless of the date. But IE does cache pages, and
ignores any commands to set a page's expiration to 0.  So if I am using
Netscape, both the JSP's are recompiled to include their user specific JS
code based off of the user's login, and each user get his/her specific menu
JS code.  But in IE, the most recent JSP page on the server, inclusive of
that page's menu specific JS code, is sent to the browser, regardless of
what the user's login is.  I've tried to work around this by using the META
tags in my JSP files as follows:






which had no effect at all on IE.  I have since discovered that the current
version of IE ignores MetaTags.  So I tried to use the response.setHeader
method in the jsp's as follows:


<% response.setHeader("expires","0");
   response.setIntHeader("expires",0);
   response.setHeader("Pragma","no-cache");
%>


which also doesn't work.  Does anyone know how to send IE a "message" via
the HTTP header telling it NOT to cache a jsp page, and to also set the
expiration on a particular page to "0", which means "page has immediate
expiration"?  Or is there a way to "set" the expiration of a jsp page in
JRUN 3.1 environment (I could not find one)?  I do want both of these JSP
pages to be "recompiled" on the server side to include their menu specific
JS, based off of the user's login.  I know that I take a performance hit by
doing this, but since it is only two pages out of 300, and it occurs as part
of the log in process, it's a performance hit I can live with.  And it beats
the heck out of writing 11 different JSP's, each with their unique
respective JS menu code.

Any advice/insight would be appreciated.

Celeste

===
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://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".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
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".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
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: Send and get flies by FTP

2001-05-18 Thread Daryani Santosh

Yes.
Here's  the code , it uses the com.oroinc.net.ftp package , you can download it
from
http://www.savarese.org/oro/developers/docs/NetComponents/api/com.oroinc.net.ftp.FTPClient.html

import java.io.*;
import com.oroinc.net.ftp.*;


public final class ftp {
public ftp(String filename, String ftp_type)
{
boolean result , login_status;
FTPClient  client;
String ftpfile;

client = new FTPClient();

try{
 client.connect("servername.com");//replace servername with your server
 if(!FTPReply.isPositiveCompletion(client.getReplyCode()))
 {
  client.disconnect();
  System.err.println("FTP server refused connection");
  return;
 }

 if ( client.isConnected() )

 System.out.println("Connection Established");


 login_status = client.login("userid","passowrd");
 System.out.println("Login status "+login_status+client.getReplyString());

 result = client.setFileType(com.oroinc.net.ftp.FTP.BINARY_FILE_TYPE);
 System.out.println("FTP set file type status "+result);



 if ( ftp_type.equalsIgnoreCase("send") )
 {
result = client.storeFile("foldername/"+filename,new
FileInputStream(filename));
System.out.println("FTP store status "+result);
 }
 else
 {
 result = client.retrieveFile("foldername"+filename,new
FileOutputStream(filename));
 System.out.println("FTP retrieve statusfor  "+filename+" "+result);
 System.out.println("FTP retrieve status "+client.getReplyString());

 System.out.println("Reading index file to retrieve log files");
 BufferedReader in = new BufferedReader( new FileReader(filename));


 //retrieve each file found in the index file
 while ( (ftpfile = in.readLine()) != null )
 {
  result = client.retrieveFile(ftpfile,new FileOutputStream(ftpfile));
 System.out.println("FTP retrieve statusfor  "+ftpfile+" "+result);
 System.out.println("FTP retrieve status "+client.getReplyString());

}



 }


client.quit();
client.disconnect();
}
catch(IOException e)
{
 e.printStackTrace();
}
}
}

You may have to tweak it a bit to suit your requirement and environment
hope it helps
Santosh










Alexander Bonilla <[EMAIL PROTECTED]> on 05/18/2001 10:40:30 AM

Please respond to A mailing list about Java Server Pages specification and
  reference <[EMAIL PROTECTED]>

To:   [EMAIL PROTECTED]
cc:(bcc: Santosh Daryani/IT/Aon Consulting)

Subject:  Send and get flies by FTP



Hello!
Does anyone of you to know how to send and get files by FTP in Java?

Thanks,
Alex


_
Get Your Private, Free E-mail from MSN Hotmail at 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://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".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
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: where to store my servlet

2001-05-16 Thread Daryani Santosh

In the Servlets folder , the Servlets folder is located under the JRUN root
In JRUN 2.3 it is  C:\program files\jrun\servlets

In JRUN3.0 it is c:\program files\allaire\jrun\servlets

You can access the servlet as http://server:portnumber/servlet/servlet_name
or http://server/servlet/servlet_name

Santosh







Chandralal Aruketty Velayudhan <[EMAIL PROTECTED]> on 05/16/2001 09:33:54 AM

Please respond to A mailing list about Java Server Pages specification and
  reference <[EMAIL PROTECTED]>

To:   [EMAIL PROTECTED]
cc:(bcc: Santosh Daryani/IT/Aon Consulting)

Subject:  where to store my servlet



hi there,
  where i can store my servlets in JRUN
regards chandralal

===
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://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".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
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: Supressing Email Header info...Using Javamail

2001-05-15 Thread Daryani Santosh

Is this header information visible alongwith the message body or you have to
click "Delivery Information"
to see this header information.
I had used Javamail earlier with Lotus Notes as the SMTP server , my
outgoing mails showed only the
message body , but when I click on delivery information I can see all the IP
address and routing information.
But that is true for all my emails , even other than the ones sent out by
JavaMail API. I think its Lotus Notes that
is attaching  this additional info and not javamail api , but I am not sure .


Santosh






Meraj Beg <[EMAIL PROTECTED]> on 05/15/2001 02:33:48 PM

Please respond to A mailing list about Java Server Pages specification and
  reference <[EMAIL PROTECTED]>

To:   [EMAIL PROTECTED]
cc:(bcc: Santosh Daryani/IT/Aon Consulting)

Subject:  Supressing Email Header info...Using Javamail



Hi,
I am using Javamail for sending the emails. Problem is mails which are going out
from my SMTP server contains lots of header information including IP address,
routing info etc along with the body of the email.
does anyone know how can I supress this header information from going out.
SMTP Server is Lotus Note and Webserver is IBM Websphere 3.5.
Thanks,
Meraj

===
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://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".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
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: important ..................

2001-05-15 Thread Daryani Santosh

Is this what you are looking for?

TimeZone gmtz = TimeZone.getTimeZone("GMT");
Calendar gmtCalendar = Calendar.getInstance(gmtz);

long gmtTime = gmtCalendar.getTimeInMillis() ;


If the time zone you want is not represented by one of the supported IDs, then
you can create a custom time zone ID
with the following syntax:

GMT[+|-]hh[[:]mm]



Santosh






sandarbh <[EMAIL PROTECTED]> on 05/15/2001 12:57:20 PM

Please respond to A mailing list about Java Server Pages specification and
  reference <[EMAIL PROTECTED]>

To:   [EMAIL PROTECTED]
cc:(bcc: Santosh Daryani/IT/Aon Consulting)

Subject:  Re: important ..



this will give me current time in milliseconds. can we try getting this
value for some other time in GMT format

sandarbh
- Original Message -
From: "Clayton Nash" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, May 15, 2001 5:19 PM
Subject: Re: important ..


> just try
> long thetime=System.currentTimeMillis();
>
> Clayton
>
> -Original Message-
> From: A mailing list about Java Server Pages specification and reference
> [mailto:[EMAIL PROTECTED]]On Behalf Of sandarbh
> Sent: 15 May 2001 13:49
> To: [EMAIL PROTECTED]
> Subject: important ..
>
>
> Hi all,
> I have a basic simple question to ask.
> I need to know exact difference between two times in milliseconds in a
bean
> which i am callig thru a JSP page. If i use calender class and use compute
> time then it is abstract in nature so i have to blah blah blahu
know
>
> The other option is -->>
> select sysdate - (select max(logdatetime) from module_log) from dual,  get
> the result and proceed the .. the connection is already there so question
is
> only of creating resultset and blah blah.
>
> which of these options will take less system resources and why??
>
> Sandarbh
>
>
===
> 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://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".
> For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
DIGEST".
> 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".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
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".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
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 Upload

2001-05-15 Thread Daryani Santosh

Hi Simon,
 You can post files to a servlet. The servlet can read from the
input stream and save to a desired location.
The other way is to use a MultiPart file upload program provided by O'reilly.
You can download this package from
servlets.com , this logic is also explained in the Jason Hunter book Java
Servlet Programming , O'reilly Publication.

However if you want code I'm using , here it is. Although this code has file
size and type limitation.

Here is the code , you may have to alter it to suit your scenario and
requirements


Santosh


Client Code - where client is your interface that will post files , could be JSP
, Servlet or even a Java app

// Get connection to Upload Servlet

  String url ="http://your_server/servlet/UploadServlet?filename="+filename;


  URL theURL = new URL(url);

  HttpURLConnection theConnection =
(HttpURLConnection)theURL.openConnection();
  theConnection.setRequestMethod("POST");
  theConnection.setDoOutput(true);
  theConnection.setUseCaches(false);

  PrintWriter out = new PrintWriter(theConnection.getOutputStream());

  // Read File

  String line = null;
  FileReader f1 = new FileReader(filename);
  BufferedReader theReader = new BufferedReader(f1);

  // Send each line to Servlet
  while ((line = theReader.readLine()) != null)
  {
out.println(line);
  }

  out.close();
  System.out.println("Data Written");


  // Get Response
  System.out.println("Response: ");

  String inputLine;
  InputStream in = theConnection.getInputStream();

  BufferedReader responseReader =
new BufferedReader(new InputStreamReader(in));

 //StringBuffer buf = new StringBuffer();

  System.out.println("before while");
  while ((inputLine = responseReader.readLine()) != null)
  {
System.out.println(inputLine);
  }
 }
catch (UnknownServiceException e)
{
  System.out.println("Unknown Service Exception Caught: \n" + e);
}
  }

UploadServlet Code


import java.io.*;
import java.util.*;
import javax.servlet.*;
import javax.servlet.http.*;


/*--
* Upload Servlet
*-*/
public class UploadServlet extends HttpServlet
{

  /*
  * Data
  * Modify directory to where you want to store uploaded files!
  *---*/

private static String m_uploadDirectory = "E:\\uploadlog";


  /*
  * doGet
  *---*/
  public void doGet (HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException
  {

System.out.println("UploadServlet.doGet()");

response.setContentType("application/octet-stream");

// Write the data of the response
PrintWriter out = response.getWriter();

out.println("");
out.println(title);
out.println("");
out.println("" + title + "");
out.println("This is output from UploadServlet");
out.println("");
out.close();
  }

  /*
  * doPost
  *---*/
  public void doPost (HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException
  {
BufferedWriter uploadFile = null;
try
{


  System.out.println("UploadServlet.doPost()");
  System.out.println("CONTENT: " + request.getContentType());
  System.out.println("LENGTH : " + request.getContentLength());

  // Get the Input Stream
  ServletInputStream input = request.getInputStream();
  BufferedReader theReader =
  new BufferedReader(new InputStreamReader(input));

  filename = request.getParameter("filename");


  String uploadFileName = m_uploadDirectory + '\\' + filename;


  System.out.println("Creating File "+filename);
  uploadFile = new BufferedWriter(new FileWriter(uploadFileName));
  System.out.println("File Creation Completed"+filename);

  String line = null;
  while ((line = theReader.readLine()) != null)
  {
uploadFile.write(line);
uploadFile.newLine();
  }

  response.setContentType("application/octet-stream");

  System.out.println("CONTENT: " + request.getContentType());
  System.out.println("LENGTH : " + request.getContentLength());


  PrintWriter out = response.getWriter();
  out.println("any message u want to send back to the client");
  out.close();
}
catch (Exception e)
{
   System.out.println(e);
  response.setContentType("application/octet-stream"

Re: Problem with the absolute path of a file

2001-05-08 Thread Daryani Santosh

You can use getRealPath to get a physical mapping for a virtual path

ServletContext sc = ServletConfig.getServletContext() ;

sc.getRealPath();

You can use an existing virtual path or create a new virtual directory for your
user files.

If you do not want to use a virtual directory , you can parse the drive letter
from the getRealPath and append your folder name and users.txt to it.



Santosh







kumar seema <[EMAIL PROTECTED]> on 05/08/2001 11:48:09 AM

Please respond to A mailing list about Java Server Pages specification and
  reference <[EMAIL PROTECTED]>

To:   [EMAIL PROTECTED]
cc:(bcc: Santosh Daryani/IT/Aon Consulting)

Subject:  Problem with the absolute path of a file



Hi all,

I use JavaWebServer2.0 to run my JSP pages.
I have a text file from which my JSP page reads from.
I use the RandomAccessFile object in java to read and
write into the file. The file is currently placed in
the "public_html" directory of the JavaWebServer.

My problem is that while opening the file I have to
specify the entire path as in :
file = new
RandomAccessFile("c:\\JavaWebServer2.0\\public_html\\users.txt","r");


Is there any way in which I can get rid of the entire
path and just specify "users.txt" as the path so that
the page will pick it up from there ? Is there any
predefined directory to keep the txt files ?
Please help as I require this to make my code
portable.

Thanks,
Seema

__
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.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 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".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
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: xml ??

2001-04-30 Thread Daryani Santosh

Xin,
  This is a URL for a XML portal , it has links to various tools and
technologies related to XML development.
http://www.startkabel.nl/k/xml/. The site has a ton of XML resources


Santosh





xin_kang <[EMAIL PROTECTED]> on 04/28/2001 01:39:12 AM

Please respond to A mailing list about Java Server Pages specification and
  reference <[EMAIL PROTECTED]>

To:   [EMAIL PROTECTED]
cc:(bcc: Santosh Daryani/IT/Aon Consulting)

Subject:  xml ??



hi

i'm a newer for xml developing with jsp. Is there any one give some suggestion
abuot the evirement and tools and anything else useful.


xin_kang
[EMAIL PROTECTED]

===
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://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".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
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



No valid JDBC driver specified

2001-04-23 Thread Daryani Santosh

Hi All,
   I am tring to use connection pooling in my servlet. using JRun as my
container.
  I get the this (java.sql.SQLException: No valid JDBC driver is specified.)
 error when I try to get a connection from a
datasource.

Here is my code
// Get the JNDI context
InitialContext context = new InitialContext();
// Lookup the datasource
DataSource ds = (DataSource) context.lookup ("java:comp/env/jdbc/benmgmt");
// Get the connection from the datasource
conn = ds.getConnection();

The above line throws the "No valid JDBC driver is specified"

I know that the driver class is accessible because , if I change the code to use
 a direct connection instead of the
DataSource , it works. So I think , its not a classpath issue , I could be wrong
 though.

I have started the server a couple of times.

When I test the connection using the JRun management console , it connects
succesfully.

Any help , suggestions or tips on this issue will be highly appreciated. I have
searched the web , JRun documentation ,
various Forums including Jrun but in vain.

Thanks in advance
Santosh

===
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://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: PDF format

2001-04-17 Thread Daryani Santosh

You can use XML and FO to accomplish this. using Xerces parser from Apache XML
and XSL-FO files can be transformed into PDF format. XML files contains the data
elements and the XSL-FO contains the styling and formatting structure for the
document to be generated.
Download a copy of Xerces , it has sample examples for generating PDF
files using XML . It is available via the Apache site.


Santosh








Mihir Sahu <[EMAIL PROTECTED]> on 04/17/2001 03:52:02 PM

Please respond to A mailing list about Java Server Pages specification and
  reference <[EMAIL PROTECTED]>

To:   [EMAIL PROTECTED]
cc:(bcc: Santosh Daryani/IT/Aon Consulting)

Subject:  PDF format



Hi,
  Can somebody give me any idea about moving data from a JSP form to PDF format
for
printing.  I know XML  cab be used to do it, but not sure about how to do
it..Thanks
Regards
Mihir

Ganesh MohanRao wrote:

> Dear All,
>
> Please help me to do the following.
>
> 1. How to send XML String from Servlet to JSP?
>
> 2. How to retreieve the XML sent by Servlet?
>
> Thank you
>
> Ganesh
>
> ===
> 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://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".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
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".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
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: Plotting Graphs

2001-04-03 Thread Daryani Santosh

There are a quite a few applications that let you integrate charts/graphs with
your JSP's
Most of them are NOT freeware , you can search for some shareware.

Chartworks and  JChart let you integrate graphs, Sitraka also has something
similar, visit sitraka.com for more details.
You can download a 30  day evaluation copy of these apps.There are more than I
mentioined , I cannot remember all
the names.


Santosh







"Damodaran, Rajakumar (CORP, Consultant)" <[EMAIL PROTECTED]>
on 04/03/2001 05:21:52 PM

Please respond to A mailing list about Java Server Pages specification and
  reference <[EMAIL PROTECTED]>

To:   [EMAIL PROTECTED]
cc:(bcc: Santosh Daryani/IT/Aon Consulting)

Subject:  Plotting Graphs



HI
Is there any tool which could be integrated with jsp pages for
plotting graphs


Thanks in advance
D.rajakumar

===
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://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".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
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: urgent, help on sorting records in xml?

2001-03-30 Thread Daryani Santosh

You can use XSL to sort XML nodes before processing

Here's some sample code

sort.xslt















try this
Santosh






cedric sk chin <[EMAIL PROTECTED]> on 03/30/2001 10:23:20 AM

Please respond to A mailing list about Java Server Pages specification and
  reference <[EMAIL PROTECTED]>

To:   [EMAIL PROTECTED]
cc:(bcc: Santosh Daryani/IT/Aon Consulting)

Subject:  urgent, help on sorting records in xml?



hi fellow developers,

can anyone give me some ideas on how to sort records in xml?  perhaps a sample
code would do, i need this urgently, i'm using jdom as my back-end.

appreciate if anyone could shed some light on this

thanks for any help and suggestions.

ced.

for example in this xml file, how do i sort it by the servlet name:




snoop


SnoopServlet





login


LoginServlet





file


ViewFile





__
Get your own FREE, personal Netscape Webmail 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://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".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
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: srinivas reddy garu namasthe

2001-03-27 Thread Daryani Santosh

Gentlemen please be courteous to other developers on the list , reply personal
messages only to the intended people
and not to the entire mailing list


Santosh






Amit Parmar <[EMAIL PROTECTED]> on 03/26/2001 03:14:57 AM

Please respond to A mailing list about Java Server Pages specification and
  reference <[EMAIL PROTECTED]>

To:   [EMAIL PROTECTED]
cc:(bcc: Santosh Daryani/IT/Aon Consulting)

Subject:  srinivas reddy garu namasthe



namasthe srinivas reddy anthaa baagena.
pani chaala undi
- Original Message -
From: Srinivasa Reddy <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, March 27, 2001 12:24 PM
Subject: Re: signoff


> ni yabba.. pani modda leda..
>
>
> > K. Srinivas Reddy
> > Associate E-Solutions Consultant(E-Business)
> > B-65, J B Sawant Marg,
> > Road No.21, Wagle Industrial Esttate,
> > THANE-400604
> > Ph: 91-22-5834643/44/45
> > Extn: 2221
> > MaiIID: [EMAIL PROTECTED]
> >   : [EMAIL PROTECTED]
> >
> >
> >
> > -Original Message-
> > From: Jithesh Kollarkandy [SMTP:[EMAIL PROTECTED]]
> > Sent: Tuesday, March 27, 2001 11:38 AM
> > To:   [EMAIL PROTECTED]
> > Subject:  Re: signoff
> >
> > Hi Malini:
> >
> > How are u dear?
> > Shall we be friends?
> >
> > Regards,
> > Jithesh Kollarkandy,
> > Software Engineer,
> > IT Solutions (India) Pvt Limited,
> > South End Road,
> > Bangalore,
> > India.
> > Phone : 6655122/44 Extn : 2134
> >
> >
> >
> > "[Malini Iyer]"
> >  > [EMAIL PROTECTED]
> > DIA.COM> cc:
> > Sent by: A   Subject: signoff
> > mailing list
> > about Java Server
> > Pages
> > specification and
> > reference
> >  > a.sun.com>
> >
> >
> > 03/27/01 11:02 AM
> > Please respond to
> > A mailing list
> > about Java Server
> > Pages
> > specification and
> > reference
> >
> >
> >
> >
> >
> >
> >
==
> > =
> > 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://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".
> > For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
> > DIGEST".
> > 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
> > ---
> > Incoming mail is certified Virus Free.
> > Checked by AVG anti-virus system (http://www.grisoft.com).
> > Version: 6.0.237 / Virus Database: 115 - Release Date: 3/7/2001
> >
> ---
> Outgoing mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.237 / Virus Database: 115 - Release Date: 3/7/2001
>
>
===
> 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://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".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
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".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
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

Re: off topic -- urgent

2001-03-20 Thread Daryani Santosh

The following is valid syntax for inserting a date and time value into a oracle
date column


insert into test values ('5',to_date('3-17-01 10:12:13','mm/dd/yy hh:mi:ss'))

Test is a table with 2 columns  a varchar and a date column


Santosh







sandarbh <[EMAIL PROTECTED]> on 03/20/2001 07:59:16 AM

Please respond to A mailing list about Java Server Pages specification and
  reference <[EMAIL PROTECTED]>

To:   [EMAIL PROTECTED]
cc:(bcc: Santosh Daryani/IT/Aon Consulting)

Subject:  off topic -- urgent



hi all,
please tell what will be the format of string to be inserted into oracle so
that time is also stored

example 17-mar-2001 12:34:01

insert into date1 values('')

sandarbh

===
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://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".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
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, JRun, and Beans

2001-02-13 Thread Daryani Santosh

One thing you might wanna check is the argument types of the method and return
value if you are accessing it.
For ex if getMessage has a string argument and you calling it without the
argument you will get the method not found error
because the function declaration does not match the call.Check the scope of the
method too.
   The error isn't exactly "Method   does not exist" , but "method
declaration does not match call" . The error message is not very descriptive . I
have been through similar errors before , it may not necessarily be the same in
your case, you can try it though

Santosh






Dave McHale <[EMAIL PROTECTED]> on 02/13/2001 10:59:33 AM

Please respond to A mailing list about Java Server Pages specification and
  reference <[EMAIL PROTECTED]>

To:   [EMAIL PROTECTED]
cc:(bcc: Santosh Daryani/IT/Aon Consulting)

Subject:  JSP, JRun, and Beans



hi,

  I'm running a simple test.jsp file on our JRun server, everything has been
working fine until I try and use beans. I can compile the file fine, put the
class file on the server, and make sure that the classpath includes the
directory where I'm storing the class. (well, the directory where I'm
storing the subdirectory, since the class is in a package) So my class file
is in d:\jrun\jsm-default\classes\dave directory. Any time I try and use the
bean, I get a 500 error saying

Found 1 semantic error compiling
"d:/Jrun/jsm-default/services/jse/servlets/jsp/javadev/ravage/test.java":
89. test.getMessage();
<--->
*** Error: No method named "getMessage" was found in type
"jsp/javadev/ravage/test"

the getMessage method EXISTS, the classpath is set properly (from what I can
tell) and I see nothing glaring that I have done wrong. *Please* reply if
you can help me, this is becoming more annoying than simply frustrating.
Thanks in advance for any help. Below is the entire contents of my
Bean

-Dave

package ravage;
public class SimpleBean {
  private String message = "No message specified";
  public String getMessage() {
return(message);
  }
  public void setMessage(String message) {
this.message = message;
  }
}

===
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://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".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
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



File Upload Servlet Error

2001-02-13 Thread Daryani Santosh

I am trying to upload a file to a server using a HTTP Post Client.
At the client side I have a Java program that reads it and posts it to the
servlet.
The servlet reads the incoming stream of data and writes it to the disk. Simple
enough.

This works like a charm most of the times , but in certain cases when the file
size exceeds 4-5 Meg , it fails.
I tweaked it a little bit but still could'nt figure out what's causing it to
fail.

Any help , suggestion or pointer is appreciated.

Here's the code

Client Side

 String url ="http://benetestw2k/servlet/UploadServlet?filename="+args[0];
 URL theURL = new URL(url);

  HttpURLConnection theConnection =
(HttpURLConnection)theURL.openConnection();
  theConnection.setDoOutput(true);
  theConnection.setUseCaches(false);

  PrintWriter out = new PrintWriter(theConnection.getOutputStream());

  // Read File

  String fileContents = "";
  String line = null;
  FileReader f1 = new FileReader(args[0]);
  BufferedReader theReader = new BufferedReader(f1);

  // Send each line to Servlet
  while ((line = theReader.readLine()) != null)
  {
out.println(line);
  }

Server Side
  public void doPost (HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException
  {
BufferedWriter uploadFile = null;

filename = request.getParameter("filename");
String uploadFileName = uploadDirectory + '\\' + filename;

try
{

 // Get the Input Stream
  ServletInputStream input = request.getInputStream();
  BufferedReader theReader =
  new BufferedReader(new InputStreamReader(input));

  uploadFile = new BufferedWriter(new FileWriter(uploadFileName));

  String line = null;
  while ((line = theReader.readLine()) != null)
  {
uploadFile.write(line);
uploadFile.newLine();
   }


Thanks in advance
Santosh

===
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://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: A little Grasshopper + JSP ???

2001-02-12 Thread Daryani Santosh

Shawn,
   I cannot compare because I've never used JBuilder , although in a recent
reader choice poll conducted by JavaDevelopersJournal JBuilder was one of the
top ranking IDEs , far out ranking Forte.

No , I've never used the compile all option in Forte , so really don't know the
answer to your question.


Santosh






Shawn Zhu <[EMAIL PROTECTED]> on 02/12/2001 04:13:57 PM

Please respond to A mailing list about Java Server Pages specification and
  reference <[EMAIL PROTECTED]>

To:   [EMAIL PROTECTED]
cc:(bcc: Santosh Daryani/IT/Aon Consulting)

Subject:  Re: A little Grasshopper + JSP ???



talking about Forte for J, it seems abit better than Jbuilder IMHO.

Daryani, did you ever use Forte's compile all function?  It seems that
it will stop compiling the rest of the .java files in the project if
it encounter some errors compiling the first few.  Is there a way to
have it continue to compile the rest of the files in the project?

> -Original Message-
> From: Daryani Santosh [mailto:[EMAIL PROTECTED]]
> Sent: Monday, February 12, 2001 12:45 PM
> To: [EMAIL PROTECTED]
> Subject: Re: A little Grasshopper + JSP ???
>
>
> Joe,
> We can surely help you out. The softwares you need will be
> An JSP/Servlet Container
> A Web Server
> JDK
> IDE - an interface for writing java programs , jsps and servlets.
>
> You can get the latest JDK from the sun site at java.sun.com
> , also download the
> documentation
>
> For a web server if you are using microsoft as your platform
> you can Personal
> Web Server or IIS.
> If you want to go with free ware you can get Apache Web server.
>
> Finally getting a JSP/Servlet container.
> There are a lot of containers available for free , most of
> them also have a
> specific forum that addresses
> their installation , troubleshooting and configuration issues.
>
> This is a decision you have to make. Some of the popular and
> easy to configure
> engines are Tomcat and JRun
> You can get JRun from allaire web site. JRun as a JSP
> container can use IIS ,
> Personal Web Server , Apache or
> you can use JRun without any web server and use JRun itself
> as a web server.
>
> Tomcat is also pretty good.
>
> For writing JSPs you can get any free development tool like
> Forte , Kawa ,
> Homesite . If you don't like to use an IDE
> directly use Textpad , notepad or any other text editor .
>
> There are a lot of sites that have JSP tutorials , visit some
> useful JSP sites
> JSPInsider.com , JGuru.com , java.sun.com.products/jsp ,
> coreservlets.com.
>
>
>
>
> hope that helps
> Santosh
>
>
>
>
>
>
>
>
> Jsp Joe <[EMAIL PROTECTED]> on 02/12/2001 01:10:04 PM
>
> Please respond to A mailing list about Java Server Pages
> specification and
>   reference <[EMAIL PROTECTED]>
>
> To:   [EMAIL PROTECTED]
> cc:(bcc: Santosh Daryani/IT/Aon Consulting)
>
> Subject:  A little Grasshopper + JSP ???
>
>
>
> Hi,
>
> Everybody's heard of the story of the grasshopper who sang all
> summer...well time to meet one.
>
> Whats this to do with JSP, I hear you ask.its a long story.
>
> It all starts off with project that I have to do as my final year
> engineering project. Me and my group contact this company
> who agree to
> give us a project. Before that they ask us to learn JSP and do a small
> program and submit within a week. That was 8 mths ago.
>
> After that starts  a saga of downloading Apache web server,
> Tomcat, Java
> engines...and actually tryin to set them up on my Celeron
> 466Well 2 mths
> and a lot of mails, JUGS, Boards later.I finally get
> JSWDK-1.0.1  up and
> runnin...then the exam dates are announced.so its bye
> bye project
> ..down to the books...
>
> I study for my exams and decide that as soon as the exams are
> over i am
> gonna dive right into making this small example for the
> company guyz  so
> that we can at least start the project...but a few days
> before the exams
> ..NEWS: Exams postponed..
>
> Well the exams finally got over a month ago. and i get
> working on  a
> small JSP prog using beans..A month later..here I
> amfrustruated,
> depressed...looking for one last hope...
>
> If you are wondering where exactly are the other members of
> my group through
> all this.beats methe poor ppls proggramming knowledge
> is limited to
> a very basic C so even if they wanted to they wouldn't be of
> very much help.
>
> Now I really need to do this project well..because after I
> finish this I
> want to work in the same company  Its like my dream place to 

Re: A little Grasshopper + JSP ???

2001-02-12 Thread Daryani Santosh

Joe,
We can surely help you out. The softwares you need will be
An JSP/Servlet Container
A Web Server
JDK
IDE - an interface for writing java programs , jsps and servlets.

You can get the latest JDK from the sun site at java.sun.com , also download the
documentation

For a web server if you are using microsoft as your platform you can Personal
Web Server or IIS.
If you want to go with free ware you can get Apache Web server.

Finally getting a JSP/Servlet container.
There are a lot of containers available for free , most of them also have a
specific forum that addresses
their installation , troubleshooting and configuration issues.

This is a decision you have to make. Some of the popular and easy to configure
engines are Tomcat and JRun
You can get JRun from allaire web site. JRun as a JSP container can use IIS ,
Personal Web Server , Apache or
you can use JRun without any web server and use JRun itself as a web server.

Tomcat is also pretty good.

For writing JSPs you can get any free development tool like Forte , Kawa ,
Homesite . If you don't like to use an IDE
directly use Textpad , notepad or any other text editor .

There are a lot of sites that have JSP tutorials , visit some useful JSP sites
JSPInsider.com , JGuru.com , java.sun.com.products/jsp , coreservlets.com.




hope that helps
Santosh








Jsp Joe <[EMAIL PROTECTED]> on 02/12/2001 01:10:04 PM

Please respond to A mailing list about Java Server Pages specification and
  reference <[EMAIL PROTECTED]>

To:   [EMAIL PROTECTED]
cc:(bcc: Santosh Daryani/IT/Aon Consulting)

Subject:  A little Grasshopper + JSP ???



Hi,

Everybody's heard of the story of the grasshopper who sang all
summer...well time to meet one.

Whats this to do with JSP, I hear you ask.its a long story.

It all starts off with project that I have to do as my final year
engineering project. Me and my group contact this company who agree to
give us a project. Before that they ask us to learn JSP and do a small
program and submit within a week. That was 8 mths ago.

After that starts  a saga of downloading Apache web server, Tomcat, Java
engines...and actually tryin to set them up on my Celeron 466Well 2 mths
and a lot of mails, JUGS, Boards later.I finally get JSWDK-1.0.1  up and
runnin...then the exam dates are announced.so its bye bye project
..down to the books...

I study for my exams and decide that as soon as the exams are over i am
gonna dive right into making this small example for the company guyz  so
that we can at least start the project...but a few days before the exams
..NEWS: Exams postponed..

Well the exams finally got over a month ago. and i get working on  a
small JSP prog using beans..A month later..here I amfrustruated,
depressed...looking for one last hope...

If you are wondering where exactly are the other members of my group through
all this.beats methe poor ppls proggramming knowledge is limited to
a very basic C so even if they wanted to they wouldn't be of very much help.

Now I really need to do this project well..because after I finish this I
want to work in the same company  Its like my dream place to work
in.small place..but so much potential for growth

So, I need a messiah..

Someone to help me get done in a couple of months what was supposed to have
been done over a period of 6 mths...

If there is someone out there who is willing to help this poor grasshopper
in need...I'll be indebted to them all my life...I'll clean your floors
.do the dishes..anything.JUST HELP ME!!

===
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://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".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
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 Date Class problem

2001-02-12 Thread Daryani Santosh

check your for loop , it says i=1 , i < 27 ofcourse it will print 25 values ,
change your for loop terminating condition

Santosh








Senaka Suriyaarachchi <[EMAIL PROTECTED]> on 12/22/2000 03:15:37 AM

Please respond to A mailing list about Java Server Pages specification and
  reference <[EMAIL PROTECTED]>

To:   [EMAIL PROTECTED]
cc:(bcc: Santosh Daryani/IT/Aon Consulting)

Subject:  Java Date Class problem



Hi All
I tried to show drop down list with next 30 dates. but it doesn't work. It
correctly add up to 25 days after that it show previous days. Please advice
me.

BR
Senaka



<%@ page language="java" import="java.sql.*, java.util.Date"%>



Untitled



<%
Date nd = new Date();
long lnd = nd.getTime();
Date todate = new Date(lnd);
String today = todate.toString();
java.sql.Date dbday = new  java.sql.Date(lnd);
long lndnew = lnd;
%>



Reservation Date

<% for(int i=1; i<27; i++){%>
<%= (new
java.sql.Date(lndnew + i*24*60*60*1000))%>
<% }%>










===
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://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".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
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".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
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 Server with IIS

2001-02-12 Thread Daryani Santosh

You can download JRun 3.0 from Allaire.com.  Configuring it with IIS 5.0 is easy
, once you begin installing
throught the install wizard you come to a section that says "Connection Wizard"
. This section provides a dropdown for
the available web server , IIS 5.0 is one of the the options. Select that and
set the scripts directory.
   JRun 3.0 CD was distributed free a few months back with the JavaDevelopers
Journal , so if you know anyone who subsribes to that you can get a copy, but
its a developer license.
Allaire is conducting a free seminar for JRun all over US in the next few
months , if interested check their website to find the one nearest to you.




Santosh






suying <[EMAIL PROTECTED]> on 12/22/2000 01:34:53 AM

Please respond to A mailing list about Java Server Pages specification and
  reference <[EMAIL PROTECTED]>

To:   [EMAIL PROTECTED]
cc:(bcc: Santosh Daryani/IT/Aon Consulting)

Subject:  Re: JSP Server with IIS



Hello,Can you tell me where to get jrun3.0 and configure it with IIS?
suying
- Original Message -
From: "amar singhal" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, December 19, 2000 5:44 PM
Subject: Re: JSP Server with IIS


> Hi
> Jrun 3.0 can be configured with the iis 5.0 as the jsp and servlet engine
>
>
> >From: Zahid Khan <[EMAIL PROTECTED]>
> >Reply-To: A mailing list about Java Server Pages specification and
> > reference <[EMAIL PROTECTED]>
> >To: [EMAIL PROTECTED]
> >Subject: JSP Server with IIS
> >Date: Tue, 19 Dec 2000 14:15:36 +0500
> >
> >Hi Dear,
> >
> >Which JSP Engines can be configured with IIS 5.0 except ServletExec.
> >Wchi JSP Server Provides integrated team development envoirnment?
> >
> >Thanks in Advance,
> >Zahid Khan
> >
> >
> >_
> >Do You Yahoo!?
> >Get your free @yahoo.com address at http://mail.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 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
>
> _
> Get Your Private, Free E-mail from MSN Hotmail at 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://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".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
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".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
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".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
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: Websphere VS JRun

2001-02-08 Thread Daryani Santosh

I too personally like JRun . We were using JRun 2.3 earlier then moved  to JRun
3.0. But earlier this month our corporation decided to go with Websphere. After
feature , performance and support comparisons , Websphere out ranked JRun.
Java Developers Journal is conducting readers choice awards 2001. If you visit
their site http://www.sys-con.com/java/readerschoice2001/  you can see that
Websphere is far up in the list compared to JRun.


Santosh







"Boemio, Neil (CAP, FGI)" <[EMAIL PROTECTED]> on 02/08/2001 11:05:29 AM

Please respond to A mailing list about Java Server Pages specification and
  reference <[EMAIL PROTECTED]>

To:   [EMAIL PROTECTED]
cc:(bcc: Santosh Daryani/IT/Aon Consulting)

Subject:  Websphere VS JRun



I am currently using JRun 2.3.3 and want to upgrade to 3.0 . BUT . I
need to make a business case for the BIG expense.  I say this because purchasing
Websphere will be MUCH
MUCH cheaper for me due to significant discounts that my company gets with IBM.

But I don't want to go to Websphere  I want JRun.   Unfortunately, my wants
are not enough!

Can anyone help with a simple bullet point list that shows why JRun is the
better choice over Websphere?

Thanks so much!

Neil

===
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://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".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
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: Any views on the Java Web market in the US ???

2001-02-07 Thread Daryani Santosh

This is what I think

Myth : there is a downfall of Java web based technologies like JSP, Servlets,
XML ???
Fact :The number of organizations moving towards the Java platform is contantly
increasing .Our company was
primarily a MS shop , recently a decision was made to move to the Java platform
across the board , its a fortune 500
company with offices in more than 70 countries.
  The companies adopting XML is growing rapidly , the number of products
that use XML technology is unbelievable.
A year ago there were a handful of XML editors , style sheet editors and parsers
,today you can find more than 50 editors.

Myth : No Java projects and the Java demand is down
Fact : Considering some changes in economy , total no of layoffs and closing of
a lot of dot coms has affected
the job market , but that is all sectors and all technologies , its not just
"JAVA" people and projects that are affected.
There is still demand for good Java people , although the total demand in
numbers may be less than what it was a year ago



Myth : .Net and C# will overrule Java technology
Fact : .Net is in beta version 1 , it will move to beta version 2 and then to
production, which is anywhere between
6-12 months.It still has a lot of bugs.
I had the oppurtunity to attend a C# demo at a Microsoft Conference this week ,
C# has no advantage or additonal
features compared to Java , I have been working with java for more than a year ,
and I did'nt see anything that C#
had to offer which Java does not already do.
Microsoft is implementing try catch exception handling and concept of classes in
other .Net products, this says
for itself what affect Java has had on the Microsoft camp.


Santosh












"Duffey, Kevin" <[EMAIL PROTECTED]> on 02/07/2001 05:35:21 PM

Please respond to A mailing list about Java Server Pages specification and
  reference <[EMAIL PROTECTED]>

To:   [EMAIL PROTECTED]
cc:(bcc: Santosh Daryani/IT/Aon Consulting)

Subject:  Re: Any views on the Java Web market in the US ???



the .net camp has a lot to worry about, so I can see them trying to do
something like that. However, there are a lot of jobs for java engineers in
silicon valley. The problem is right now is that there are also alot of
engineers becuase of the massive layoffs.

> -Original Message-
> From: Sanjay Gomes [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, February 06, 2001 2:02 AM
> To: [EMAIL PROTECTED]
> Subject: Re: Any views on the Java Web market in the US ???
>
>
> Hello,
> Probably from a newsgroup
> Well I am subscribed to another Java Newsgrooup and a message
> is doing the
> rounds over there
> which was posted by a guy who went through a bodyshopper to the US and
> allegedly was sent back because
> as the employer said that he had no Java projects and that
> the Java demand
> was down
>
>
> I dont know whether the message  is a Rumour floated by the
> .net group in an
> attempt to demoralise the
> Java camp in India ..It seems so
>
> Although I dont approve of this type of message floating in the group,
> I am sending this to the group because it would be a cause of
> concern to
> many in the group
> Regards
> Sanjay
>
> -Original Message-
> From: Geert Van Damme [mailto:[EMAIL PROTECTED]]
> Sent: 06 February 2001 09:17
> To: [EMAIL PROTECTED]
> Subject: Re: Any views on the Java Web market in the US ???
>
>
> Where did you here that?
>
> on a M$ .Net event?
>
> Geert Van Damme
>
> > -Original Message-
> > From: A mailing list about Java Server Pages specification
> and reference
> > [mailto:[EMAIL PROTECTED]]On Behalf Of Mathew, Binoy (CORP,
> > GEITC)
> > Sent: dinsdag 6 februari 2001 10:04
> > To: [EMAIL PROTECTED]
> > Subject: Any views on the Java Web market in the US ???
> >
> >
> > Hi all,
> >
> > We keep hearing news on the downtrends of the Java web
> market in the US?
> >
> > How true is this and is this a slug or a permanent downfall
> of Java web
> > based
> > technologies like JSP, Servlets, XML ???
> >
> > What about Europe?
> >
> > Would like your thoughts.
> >
> > Rgds,
> > Binoy.
> >
> > ==
> > =
> > 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://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".
> For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
> DIGEST".
> 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

Re: Diff bet asp & jsp

2001-02-05 Thread Daryani Santosh

Check this URL , its compares ASP vs JSP performance on ORION server with a page
NOT as simple as a HelloWorld


http://www.orionserver.com/benchmarks/benchmark.html


Santosh







Joseph Ottinger <[EMAIL PROTECTED]> on 02/05/2001 03:17:34 PM

Please respond to A mailing list about Java Server Pages specification and
  reference <[EMAIL PROTECTED]>

To:   [EMAIL PROTECTED]
cc:(bcc: Santosh Daryani/IT/Aon Consulting)

Subject:  Re: Diff bet asp & jsp



>Yes but lets talk speed.

Yes, let's.

>For some reason i just don't have faith in Java as being
>a fast language.

What reason would that be? Based on what? Careful observation? Use? Swing?

Swing I can understand, although I'm willing to say that's because I rarely
if ever use it. (I don't do GUIs.)

However... Java is fully servicable as a server-side language, where you
have a VM that runs for long periods of time. For Java, VM startup is
expensive; little else is, unless you want to count Swing against it. Again,
I don't have a lot of experience with Swing; it just FEELS slow. The rest of
Java is quite nice with regard to speed.

>Can someone shed some light on the issue?
>I have read some benchmarks but the test scripts were very
>simple and I dont' think a simple hello world test can provide
>meaningful test data.  Ive read articles which claim that JSP
>is "almost" as fast as static pages.

I've been using JSP for my site for quite some time; the response time is
fine. I do a lot more than "hello world,"  including XML transforms on the
fly, EJB lookups, etc.

>Yes maybe this is true for a simple string output or hello world,
>but what about a database connection , and a page that
>is always chaning eg. forum so reading off a already compiled page
>is very unlikely.

A JSP page that changed its source all the time has a fool for an author.
You can swap "JSP" for any other technology in that phrase.

>
>comments?
>
>-Original Message-
>From: JSP Insider [mailto:[EMAIL PROTECTED]]
>Sent: Monday, February 05, 2001 2:45 PM
>To: [EMAIL PROTECTED]
>Subject: Re: Diff bet asp & jsp
>
>
>HI Srinivas,
>
>I have written quite a bit on the differences between ASP and JSP which you
>can find at www.jspinsider.com.
>
>However, the reason I am responding is I wanted to add something additional
>to what can be found in the asp / jsp articles I have written
>
>I now feel as a general rule of thumb JSP should be your first choice over
>ASP unless you have a overriding business reason to use ASP.
>
>The reason: Tag libraries and JSP version 1.2 coming out in the future
>
>ASP has nothing like tag libraries and they add flexiblity and ease of
>maintenance you will never see in ASP.
>
>Also version 1.2 of JSP improves JSP to the point that I feel JSP is
>currently a stronger platform for server side development. Overall, I feel
>JSP offers a better solution for long term maintainance and ease of
>programming over ASP.
>
>Casey Kochmer
>President Amberjack Software LLC
>[EMAIL PROTECTED]
>
> >From: "Srinivas K. R." <[EMAIL PROTECTED]>
> >Reply-To: A mailing list about Java Server Pages specification and
> > reference <[EMAIL PROTECTED]>
> >To: [EMAIL PROTECTED]
> >Subject: Diff bet asp & jsp
> >Date: Tue, 6 Feb 2001 00:58:12 +0530
> >
> >Hi
> >I am developing an Web application
> >I am in a confussion whether i use ASP or JSP.
> >I want to know the difference between ASP & JSP
> >and also tell me which technology is better and why?
> >
> >Cheers
> >Srinivas
> >
> >===
> >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://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
>
>_
>Get your FREE download of MSN Explorer at http://explorer.msn.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://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".
>For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
>DIGEST".
>Some relevant FAQs on JSP/Servlets can be found at:
>
>  http://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp

Re: Diff bet asp & jsp

2001-02-05 Thread Daryani Santosh

Hi,
 I am not an expert on technology evaluation, but i can definetely share
my experiences.
  I have developed applications using both technologies ASP and JSP.
Here are a few differences

ASP works only with Microsoft IIS server , it does work with Apache also but you
need Chillisoft for that.
JSP pages can be served on a large number of JSP/servlet  containers.
You can choose the one that best suits your requirements and budget , a lot of
them are available for free too.

The scripting language for ASP is VBScript
The scripting language for JSP is Java , so it gives more development power , as
you can use all the available features of java .

A JSP page is not compiled everytime you serve it.Also the container does not
start a new process for every page , this gives a performance gain.


Javabeans can be used with JSPs for easy retrieval and updates of database
fields.

JSPs are based on Java which allows you to extend and reuse your pages if you
want to.

On the other hand the learning curve on JSP is a little more compared to ASP.
You need to know Java  basics.
ASP are comparatively easy to write , they provide a lot of wrapper functions.

JSP being based on JAVA makes development more structured and object oriented.
Error trapping is better in JSP , using try and catch statements

hope this helps
Santosh








"Srinivas K. R." <[EMAIL PROTECTED]> on 02/05/2001 02:28:12 PM

Please respond to A mailing list about Java Server Pages specification and
  reference <[EMAIL PROTECTED]>

To:   [EMAIL PROTECTED]
cc:(bcc: Santosh Daryani/IT/Aon Consulting)

Subject:  Diff bet asp & jsp



Hi
I am developing an Web application
I am in a confussion whether i use ASP or JSP.
I want to know the difference between ASP & JSP
and also tell me which technology is better and why?

Cheers
Srinivas

===
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://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".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
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: Asking sample on JSP to access the SqlServer Database

2001-01-24 Thread Daryani Santosh

import java.sql.*;

public class dataExtract
{
 public static void main (String args [])

{
  try{


  Statement   sqlStmt;
  String   userid;
  String   password;
  ResultSet   resultSet;

  userid = "userid";//hard code or get it from arguments
  password = "password";//hard code or get it from arguments

  Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
  dbConn =
DriverManager.getConnection("jdbc:odbc:ODBCdsnName);//substitute ODBCdsnName
  //with anem of your dsn

  sqlCmd = "SELECT * FROM whatever table";
  sqlStmt = dbConn.createStatement();
  resultSet = sqlStmt.executeQuery(sqlCmd);

Santosh






"Zhang, David" <[EMAIL PROTECTED]> on 01/24/2001 03:59:16 PM

Please respond to A mailing list about Java Server Pages specification and
  reference <[EMAIL PROTECTED]>

To:   [EMAIL PROTECTED]
cc:(bcc: Santosh Daryani/IT/Aon Consulting)

Subject:  Asking sample on JSP to access the SqlServer Database



Hi all,

I am new at JSP. I want use JSP to access the SqlServer Database (I have set
the ODBC)
 please point me to some JSP samples on this .

Thanks
Dave

===
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://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".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
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: Help in JSP using jdom

2001-01-24 Thread Daryani Santosh

You may check the following things

What version of JRE you are using ? because Jaguar 3.5 supported 1.1.8 or below
, it was not compatible with 1.2.2

So if you have multiple version of the JDK on your box , the class files may
seem to work because they are using a newer version.

Is tree.xml located in a folder that is visible to Jaguar.

If you made any classpath changes and have not restarted the Jag server , try
doing that , because Jaguar loads classes when it starts and does not recognize
class path changes until it is restarted.


Santosh









Sebouh <[EMAIL PROTECTED]> on 01/24/2001 04:26:35 AM

Please respond to A mailing list about Java Server Pages specification and
  reference <[EMAIL PROTECTED]>

To:   [EMAIL PROTECTED]
cc:(bcc: Santosh Daryani/IT/Aon Consulting)

Subject:  Help in JSP using jdom



hello guys i have this jsp file which i like to load an XML file, so that i
can manipulate later.
i'm using jdom classes to do so. i have a java class that works perfectly,
but i can't run it in jsp.
(i'm using Jaguar CTS)
my jsp file and the xml file are in the same directory, when i load this
page it gives

500 Servlet jspservlet: unable to service request: tree.xml: tree.xml
Server:Jaguar Server Version 3.6 Connection:Keep-Alive



<%@ page
import="java.io.*,java.util.*,org.jdom.*,org.jdom.input.*,org.jdom.output.*"
%>

<%
DOMBuilder dom = new DOMBuilder();
Document doc = dom.build (new File ("tree.xml"));
%>




===
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://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".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
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: Fetching Data from Bean

2001-01-22 Thread Daryani Santosh

This is how I was converting resultset to a vector , in a bean and returning the
vector back to the JSP page

Following code is from a  bean method , create a vector of vectors to hold the
resultset


Vector rsVector = new Vector() ;

try{
Statement stmt =null;
stmt = con.createStatement();
rs = stmt.executeQuery(query);

ResultSetMetaData rsmd = rs.getMetaData();
int colCount = rsmd.getColumnCount();
int rowCount = 0;

  while ( rs.next() )
 {
  Vector newRow = new Vector();
  rowCount ++;
  for (int i = 1 ; i <= colCount; i++ )
  {
  newRow.addElement(rs.getObject(i));
 }
 rsVector.addElement(newRow);
 }
rs.close();
stmt.close();
}
catch(SQLException se)
{
 System.out.println(se);
}
return rsVector;
}

//At the JSP end you can take the size of the vector , that will be number of
rows , for all those rows
//get values of all columns


hope this helps
Santosh










"Puneet Kathuria, Gurgaon" <[EMAIL PROTECTED]> on 01/21/2001 11:26:31 PM

Please respond to A mailing list about Java Server Pages specification and
  reference <[EMAIL PROTECTED]>

To:   [EMAIL PROTECTED]
cc:(bcc: Santosh Daryani/IT/Aon Consulting)

Subject:  Re: Fetching Data from Bean



Thanks for the suggestion but i don't think this is an adequate way of
writing JSP. For an enterprise wide solution, it's not a proper approach to
write db access mechanism embedded in web pages.

Ok my real question, is how to pass a resultset back to JSP from a bean ? I
don't want to return back the resultset object even as for a thumb rule that
front end should never know about data access.

How can i convert say a resultset to a 2-dimension array or vector of
vectors or any other methodology for tranferring data back to web page.

Is there any sample application available on web that can be used a model
for writing the JSP applications, ie. following n-tier architecture.

Thanks very much

regards

Puneet


> --
> From: homai[SMTP:[EMAIL PROTECTED]]
> Reply To: A mailing list about Java Server Pages specification and
> reference
> Sent: Saturday, January 20, 2001 9:56 PM
> To:   [EMAIL PROTECTED]
> Subject:  Re: Fetching Data from Bean
>
> - Original Message -
> From: "kishore" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Friday, January 19, 2001 8:24 PM
> Subject: Re: Fetching Data from Bean
>
>
> > try this way ...
> >
> > 
> >  
> >  name 
> >  address
> > 
> > <%
> > try {
> > //
> >  Connection c =
> DriverManager.getConnection("jdbc:odbc:TABLE","usr","pwd");
> >  Statement s = c.createStatement();
> >  ResultSet r = s.executeQuery("select name , address  from usertable
> where
> > username = '"+loginBean.getUsername()+"'");
> > while( r.next())
> >
> >
> > %>
> > 
> >  <%= r.getString("name") %> 
> >  <%= r.getString("address") %> 
> > 
> > <%
> >   }
> > r.close();
> >s.close();
> >
> >}catch(SQLException e){
> >   System.out.println("SQLException thrown @ xyz.jso");
> > }catch(ClassNotFoundException ee){
> >   System.out.println("sun.jdbc.odbc.JdbcOdbcDriver class not
> fount
> > 2 xyz.jsp ");
> >  }
> > %>
> > 
> > - Original Message -
> > From: Puneet Kathuria, Gurgaon <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Friday, January 19, 2001 9:58 PM
> > Subject: Fetching Data from Bean
> >
> >
> > > Hello All:
> > >
> > > I have a jsp page that displays data in tabular format.
> > > I have written a bean that performs the database queries & creates a
> long
> > > string (html) and it's returned back to display on the page.
> > >
> > > Can i bring the whole resultset in any form to jsp page & then display
> > > (maybe as arrays)
> > >
> > > Any suggestions as to how / in what form to bring data to jsp page
> apart
> > > from the strategy am following ?
> > >
> > > regards
> > >
> > >
> >
> ==
> =
> > > 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://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
> >
> >
> > _
> > Do You Yahoo!?
> > Get your free @yahoo.com address at http://mail.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 FAQs on JSP/Servlets can be found at:
> >
> >  http://java.sun.com/products/jsp/faq.html
> >  http://www.esp

Re: driver prob

2001-01-22 Thread Daryani Santosh

You can use oracle.jdbc.driver.OracleDriver class for connecting to oracle using
thin driver.

Class.forName("oracle.jdbc.driver.OracleDriver");
dbConn =
DriverManager.getConnection("jdbc:oracle:thin:@servername:portnumber:"+hostname,userid,password);
 The class mentioned above is available in classes111.zip.


hope this helps
Santosh





Prasanjeet Das <[EMAIL PROTECTED]> on 01/22/2001 02:34:00 AM

Please respond to A mailing list about Java Server Pages specification and
  reference <[EMAIL PROTECTED]>

To:   [EMAIL PROTECTED]
cc:(bcc: Santosh Daryani/IT/Aon Consulting)

Subject:  driver prob



Hi Gurus,
I had posted the query earlier but did not get any response , hope i get it
this time
Can anybody suggest me what  oracle JDBC driver to use in order to
coonect as a thin client to the oracle adata base.

The problem is that when i am calling the function getImportedkey(...) of
the  DatabaseMetaData class it's returns null value even though the table
has foreign keys . Bsaically i am trying to obtain the list of foreign keys
present in a table.

At present i am using the , jswdk, oracle 8i, thin client driver (classes
11.zip).

Hope to get a quick response .
regards
Prasanjeet

- Original Message -
From: "Mathew, Binoy (CORP, GEITC)" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, January 22, 2001 12:23 PM
Subject: Re: Session Variable


> Hi,
> Session variables are meant to store user profiles and data needed to
> identify a user and his preferences, obviously if one fetches data from a
> database and stores it in the session, this will not only clog up the
> session variable but only defeat the very purpose of a database. Databases
> are meant to be queried but ultimately it is a tradeof b/w (a) memory
> required to store the data in the session and (b) connecting to the db
which
> is time-consuming.
> Hope this helps.
> Binoy.
>
> -Original Message-
> From: Ritu Kamboj [mailto:[EMAIL PROTECTED]]
> Sent: Monday, January 22, 2001 12:02 PM
> To: [EMAIL PROTECTED]
> Subject: Session Variable
>
>
> Hi All,
>
> Can anybody suggest  what all difference does it make  fetch data once
from
> the database
> and  store it  in the session variable, rather fetching every time from
the
> database.
> for example in case of any  report showing data in the  form  of Previous
> and next.
> is it better once fetch all data  and store them into session variable or
> fire a query for
> fetching data on every click  of previous and next.
> Thanks
> Regards
> ritu
>
>
> _
>
> Visit http://www.PalmGreetings.com The Most Happening and
> The first & only Mobile greeting site.
> * Send & Receive e-cards using your Hand held/Palm top/WAP Phone
> * Pleasure viewing animated cards on your device
> * Unleash your creativity by creating your own cards
>
>
===
> 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://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".
> For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
DIGEST".
> 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".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
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".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
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: Resultset limit

2001-01-17 Thread Daryani Santosh

My first guess would be the data itself. I don't think you should have any
problem with displaying that many rows.
Probably the data has some special characters or null values that are ignored by
your drop down and after your javascript
hits this record it bails out. Try displaying the values in a text area instead
, that will tell you whether its a data problem or
some other limitation

Santosh






"Singh, Jasbinder" <[EMAIL PROTECTED]> on 01/17/2001 02:14:49 PM

Please respond to A mailing list about Java Server Pages specification and
  reference <[EMAIL PROTECTED]>

To:   [EMAIL PROTECTED]
cc:(bcc: Santosh Daryani/IT/Aon Consulting)

Subject:  Resultset limit



Hi All,

Is there a limit on the number of records that ResultSet can retrieve.
I have a jsp which has a drop-down box. This is populated from a drop
down box. I use a bean to connect to the database and retrieve the values
from the table. The table has close to 2000 entries. But only about 70
values
are getting populated in the drop down box and the page ends there and
doesn't
display the other fields. Is this a problem with the ResultSet or with the
drop-down box.
I wrote a sample java program. It is able to retrieve all the rows from the
table.

Here is a portion of the jsp.

<%
  java.sql.ResultSet rs = null;
  try
  {
  rs=rangeBean.getMembers();
  }
  catch(java.sql.SQLException e)
  {  }
  catch(Exception e)
  { }
%>
..


Member Name

Select a member
<%
 while(rs.next())
 {
   out.println(""+rs.getString(1)+"");
 }
%>



<%...
...
%>

...




Could somebody help !

Thanks
JS

===
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://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".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
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: javabean setPropert

2001-01-16 Thread Daryani Santosh

Create a button , On click of this button
put button value in a variable

The button has to submit a form , if you want to do it without submitting the
form
go to Method2

<%
if request.getParameter("button_name") != null
{
String btnValue = request.getParamter("button_name")
if btnValue.equals("setProperty")

or
 //star sets all
}
%>



Method2




function setproperty()

{
<%



%>

I am not 100% sure about method 2 , but I think it should work


}











Idrees Ali Aashi <[EMAIL PROTECTED]> on 01/16/2001 11:35:25 AM

Please respond to A mailing list about Java Server Pages specification and
  reference <[EMAIL PROTECTED]>

To:   [EMAIL PROTECTED]
cc:(bcc: Santosh Daryani/IT/Aon Consulting)

Subject:  javabean setPropert



can I call JavaBean SetProperty from JavaScript if yes how else tell me some
alternate to do this.

thanks in advance for any help.

===
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://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".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
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: how to show timezone specific time

2001-01-15 Thread Daryani Santosh

You can use JavaScript to do this


function getworldtime()
{
now = new Date();
var localTime ;
localTime  = now.toLocaleString();
document.write(localTime);

}




hope this helps
Santosh







Bhushan Bhangale <[EMAIL PROTECTED]> on 01/15/2001 03:42:17 PM

Please respond to A mailing list about Java Server Pages specification and
  reference <[EMAIL PROTECTED]>

To:   [EMAIL PROTECTED]
cc:(bcc: Santosh Daryani/IT/Aon Consulting)

Subject:  how to show timezone specific time



Hi

I am asking this question again because nobody has answered it before when I
aksed it. I have a multi locale site including(US,UK,JP,FR,DE,MX,SW). It is
running on Solaris machine which is set to GMT timezone. I want to show timezone
specific time to the users. Suppose a person is seeing the site in japanese
locale then he should see time according to the Japan TimeZone.

An urgent reply would be a great help.

thanks in advance

Thanks & Regards
Bhushan Bhangale
Consultant
http://www.netacross.com
Chequemail.com - a free web based e-mail service that also pays!!!
http://www.chequemail.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://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".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
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: FW: Runtime.exec() within servlet

2001-01-03 Thread Daryani Santosh

 XML to PDF

Another way of converting your XMl using XSL to PDF is using FO ( Formatting
Objects ). Check FOP parser
from APACHE , it has servlets and command line programs that allow you to style
and convert a xml into
PDF . Also Cocoon from Apache does something similar.


FOP is the world's first print formatter driven by XSL formatting objects. It is
 a Java application that reads a
 formatting object tree and then turns it into a PDF document. The formatting
object tree, can be in the form of an
 XML document (output by an XSLT engine like XT or Xalan) or can be passed in
memory as a DOM Document
 or (in the case of XT) SAX events.


Santosh








"Bansal, Monika" <[EMAIL PROTECTED]> on 01/03/2001 03:04:05 PM

Please respond to A mailing list about Java Server Pages specification and
  reference <[EMAIL PROTECTED]>

To:   [EMAIL PROTECTED]
cc:(bcc: Santosh Daryani/IT/Aon Consulting)

Subject:  FW: Runtime.exec() within servlet



Hi Craig,

Where can I find and buy the package 'JClass Pagelayout' as mentioned in
your earlier post? I need to generate pdf reports from XML using XSL.
How good is this package?

Thanks in advance.

Monika


-Original Message-
From: Sullivan, Craig R. [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 03, 2001 10:57 AM
To: [EMAIL PROTECTED]
Subject: Runtime.exec() within servlet


Hello,

I am trying to start another JVM within a servlet.  The code is running on a
linux box with the Apache JServ Engine.

Inside my servlet, I have this try block:

--

 String command = "/usr/local/apache/servlets/startPopulate.sh";

 try {
Runtime runtime = Runtime.getRuntime();
runtime.exec(command);
 }
 catch (Exception e) {
e.printStackTrace(System.out);
out.println("An error occured while trying to execute the process in " +
"populateAllCourses()");
 }
---

startPopulate.sh is a shell script that contains the following:

-
#!/bin/bash
cd /usr/local/apache/servlets
export CLASSPATH=.:$CLASSPATH
java PopulateCourses [EMAIL PROTECTED] > /tmp/dump.txt
--

This shell script runs fine if I start it from the command line, but only
creates an empty "/tmp/dump.txt" file when started from the servlet.
"PopulateCourses" is a class that has rwx permission for everyone.  I need
to run the PopulateCourses class within its own process, because it takes
about an hour to complete.  Once the process is started, the servlet tells
the user that they will be e-mailed after PopulateCourses is complete.

Anyone see what I'm doing wrong?

Thanks,
Craig Sullivan


-Original Message-
From: Pradeep Shekade [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 03, 2001 9:15 AM
To: [EMAIL PROTECTED]
Subject: Re: How to produce Reports


Hi,

I too was involved with this problem. You can write a
servlet to create reports. You can convert the report
in html form or pdf.

There is this package called as JClass Pagelayout
available which will allow you to create reports. This
package uses XML/XSL to create pdfs. If you do not
want to buy this package you can write classes to
create the pdfs (I have used only the JClass package).
If u want to write ur own classes you would have to
use XSLFO.

I hope this answers ur query.

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

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

===
To unsubscribe: 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://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".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
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: Database is freaking out!!!!

2000-12-22 Thread Daryani Santosh

 What does your update statement look like. ? Are you specifying and Insert or
an update ? What are you using to update
the tables , is it a entity bean ?


Santosh






Panos Konstantinidis <[EMAIL PROTECTED]> on 12/22/2000 04:28:26 AM

Please respond to A mailing list about Java Server Pages specification and
  reference <[EMAIL PROTECTED]>

To:   [EMAIL PROTECTED]
cc:(bcc: Santosh Daryani/IT/Aon Consulting)

Subject:  Database is freaking out



  Hello there. I have written a jsp file that opens a connection with a
database on the local network. This database has a table (lets say users)
that has two fields (lets say created and last_cist)of type timestamp(14). I
have a login and a registration form for the user. The first time the user
registers I get the current date and write it in the "created" field. From
then, everytime the user loggs in I update the "last_vist" field. Now every
time I update the "last_visit" field the "created" field is beeing updated
automatically!!! (and it is always almost five minutes before the
"last_visit" field (lets say "created" is 20001222091839 and "last_visit" is
20001222092315). The database I am using is mySQL. Is it a bug with the
mySQL or is there something else I never thought about. Please help, it is
really annoying.

   Thanks.

   Panos
_
Get Your Private, Free E-mail from MSN Hotmail at 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://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".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
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: Using xml with jsp

2000-11-30 Thread Daryani Santosh

Here's the code

Part 1 - This class writes xml node data to a file


import org.w3c.dom.*; // W3C DOM classes for traversing the document
import java.io.*;

/**
 * Output a DOM Level 1 Document object to a java.io.PrintWriter as a simple
 * XML document.  This class does not handle every type of DOM node, and it
 * doesn't deal with all the details of XML like DTDs, character encodings and
 * preserved and ignored whitespace.  However, it does output basic
 * well-formed XML that can be parsed by a non-validating parser.
 **/
public class XMLDocumentWriter {
PrintWriter out;  // the stream to send output to

/** Initialize the output stream */
public XMLDocumentWriter(PrintWriter out) { this.out = out; }

/** Close the output stream. */
public void close() { out.close(); }

/** Output a DOM Node (such as a Document) to the output stream */
public void write(Node node) { write(node, ""); }

/**
 * Output the specified DOM Node object, printing it using the specified
 * indentation string
 **/
public void write(Node node, String indent) {
// The output depends on the type of the node
switch(node.getNodeType()) {
case Node.DOCUMENT_NODE: {   // If its a Document node
Document doc = (Document)node;
out.println(indent + "");  // Output header
Node child = doc.getFirstChild();   // Get the first node
while(child != null) {  // Loop 'till no more nodes
write(child, indent);   // Output node
child = child.getNextSibling(); // Get next node
}
break;
}
case Node.DOCUMENT_TYPE_NODE: {  // It is a  tag
DocumentType doctype = (DocumentType) node;
// Note that the DOM Level 1 does not give us information about
// the the public or system ids of the doctype, so we can't output
// a complete  tag here.  We can do better with Level 2.
out.println("");
break;
}
case Node.ELEMENT_NODE: {// Most nodes are Elements
Element elt = (Element) node;
out.print(indent + "<" + elt.getTagName());   // Begin start tag
NamedNodeMap attrs = elt.getAttributes(); // Get attributes
for(int i = 0; i < attrs.getLength(); i++) {  // Loop through them
Node a = attrs.item(i);
out.print(" " + a.getNodeName() + "='" +  // Print attr. name
  fixup(a.getNodeValue()) + "'"); // Print attr. value
}
out.println(">"); // Finish start tag

String newindent = indent + "";   // Increase indent
Node child = elt.getFirstChild(); // Get child
while(child != null) {// Loop
write(child, newindent);  // Output child
child = child.getNextSibling();   // Get next child
}

out.println(indent + "");
break;
}
case Node.TEXT_NODE: {   // Plain text node
Text textNode = (Text)node;
String text = textNode.getData().trim();   // Strip off space
if ((text != null) && text.length() > 0)   // If non-empty
out.println(indent + fixup(text)); // print text
break;
}
case Node.PROCESSING_INSTRUCTION_NODE: {  // Handle PI nodes
ProcessingInstruction pi = (ProcessingInstruction)node;
out.println(indent + "");
break;
}
case Node.ENTITY_REFERENCE_NODE: {// Handle entities
out.println(indent + "&" + node.getNodeName() + ";");
break;
}
case Node.CDATA_SECTION_NODE: {   // Output CDATA sections
CDATASection cdata = (CDATASection)node;
// Careful! Don't put a CDATA section in the program itself!
out.println(indent + "<" + "![CDATA[" + cdata.getData() +
"]]" + ">");
break;
}
case Node.COMMENT_NODE: { // Comments
Comment c = (Comment)node;
out.println(indent + "");
break;
}
default:   // Hopefully, this won't happen too much!
System.err.println("Ignoring node: " + node.getClass().getName());
break;
}
}

// This method replaces reserved characters with entities.
String fixup(String s) {
StringBuffer sb = new StringBuffer();
int len = s.length();
for(int i = 0; i < len; i++) {
char c = s.charAt(i);
switch(c) {
default: sb.append(c); break;
case '<': sb.append("<"); break;
case '>': sb.append(">"); break;
case '&': sb.append("&"); break;

Re: Using xml with jsp

2000-11-30 Thread Daryani Santosh

Here's the code

Part 1 - This class writes xml node data to a file


import org.w3c.dom.*; // W3C DOM classes for traversing the document
import java.io.*;

/**
 * Output a DOM Level 1 Document object to a java.io.PrintWriter as a simple
 * XML document.  This class does not handle every type of DOM node, and it
 * doesn't deal with all the details of XML like DTDs, character encodings and
 * preserved and ignored whitespace.  However, it does output basic
 * well-formed XML that can be parsed by a non-validating parser.
 **/
public class XMLDocumentWriter {
PrintWriter out;  // the stream to send output to

/** Initialize the output stream */
public XMLDocumentWriter(PrintWriter out) { this.out = out; }

/** Close the output stream. */
public void close() { out.close(); }

/** Output a DOM Node (such as a Document) to the output stream */
public void write(Node node) { write(node, ""); }

/**
 * Output the specified DOM Node object, printing it using the specified
 * indentation string
 **/
public void write(Node node, String indent) {
// The output depends on the type of the node
switch(node.getNodeType()) {
case Node.DOCUMENT_NODE: {   // If its a Document node
Document doc = (Document)node;
out.println(indent + "");  // Output header
Node child = doc.getFirstChild();   // Get the first node
while(child != null) {  // Loop 'till no more nodes
write(child, indent);   // Output node
child = child.getNextSibling(); // Get next node
}
break;
}
case Node.DOCUMENT_TYPE_NODE: {  // It is a  tag
DocumentType doctype = (DocumentType) node;
// Note that the DOM Level 1 does not give us information about
// the the public or system ids of the doctype, so we can't output
// a complete  tag here.  We can do better with Level 2.
out.println("");
break;
}
case Node.ELEMENT_NODE: {// Most nodes are Elements
Element elt = (Element) node;
out.print(indent + "<" + elt.getTagName());   // Begin start tag
NamedNodeMap attrs = elt.getAttributes(); // Get attributes
for(int i = 0; i < attrs.getLength(); i++) {  // Loop through them
Node a = attrs.item(i);
out.print(" " + a.getNodeName() + "='" +  // Print attr. name
  fixup(a.getNodeValue()) + "'"); // Print attr. value
}
out.println(">"); // Finish start tag

String newindent = indent + "";   // Increase indent
Node child = elt.getFirstChild(); // Get child
while(child != null) {// Loop
write(child, newindent);  // Output child
child = child.getNextSibling();   // Get next child
}

out.println(indent + "");
break;
}
case Node.TEXT_NODE: {   // Plain text node
Text textNode = (Text)node;
String text = textNode.getData().trim();   // Strip off space
if ((text != null) && text.length() > 0)   // If non-empty
out.println(indent + fixup(text)); // print text
break;
}
case Node.PROCESSING_INSTRUCTION_NODE: {  // Handle PI nodes
ProcessingInstruction pi = (ProcessingInstruction)node;
out.println(indent + "");
break;
}
case Node.ENTITY_REFERENCE_NODE: {// Handle entities
out.println(indent + "&" + node.getNodeName() + ";");
break;
}
case Node.CDATA_SECTION_NODE: {   // Output CDATA sections
CDATASection cdata = (CDATASection)node;
// Careful! Don't put a CDATA section in the program itself!
out.println(indent + "<" + "![CDATA[" + cdata.getData() +
"]]" + ">");
break;
}
case Node.COMMENT_NODE: { // Comments
Comment c = (Comment)node;
out.println(indent + "");
break;
}
default:   // Hopefully, this won't happen too much!
System.err.println("Ignoring node: " + node.getClass().getName());
break;
}
}

// This method replaces reserved characters with entities.
String fixup(String s) {
StringBuffer sb = new StringBuffer();
int len = s.length();
for(int i = 0; i < len; i++) {
char c = s.charAt(i);
switch(c) {
default: sb.append(c); break;
case '<': sb.append("<"); break;
case '>': sb.append(">"); break;
case '&': sb.append("&"); break;

Re: Hi Can anyone help me ! - JRun configuration

2000-11-20 Thread Daryani Santosh

That's not true . You can run servlets and JSP on JRun 2.3 / 3.0 configured with
IIS as web server.
I've worked on both. Your JSP's need to be in a the correct folder to run them,
with the default configuration.

http://localhost:portnumber/jsp points to
c:\jrun\jsm-default\services\jws\htdocs\jsp

So if you put any of your JSP's under this location example vedaTest.jsp in the
above folder
you can call it using http://localhost:portnumber/jsp/vedaTest.jsp

If you want you can create a folder in any other location , but will have to
configure JRun to look
at that folder. Also make sure you have the jar files in path ,
jspengine.jar.Restart Jrun service
or server after configuration.

that should work
Santosh








suhdkaar asdas <[EMAIL PROTECTED]> on 11/20/2000 02:25:28 PM

Please respond to A mailing list about Java Server Pages specification and
  reference <[EMAIL PROTECTED]>

To:   [EMAIL PROTECTED]
cc:(bcc: Santosh Daryani/IT/Aon Consulting)

Subject:  Re: Hi Can anyone help me !



Hi
 IIS doent support servlets i suppose.. it needs an iPlanet Web server
or java web server for running servlets .. and JSP..
hope this helps..
bye
sudhakar


>From: VEDA <[EMAIL PROTECTED]>
>Reply-To: A mailing list about Java Server Pages specification and
> reference <[EMAIL PROTECTED]>
>To: [EMAIL PROTECTED]
>Subject: Hi Can anyone help me !
>Date: Mon, 20 Nov 2000 18:57:50 +0530
>
>Hi JSP Gurus !
>
>I am new to JSP.
>
>When  I tested with small JSP examples after installing  JRUN 2.3
>Configured with
>
>IIS  (ie)  it shows errror.
>
>I have tested by clicking the examples at the  home page  of JRUN i am
>able to run
>
>the servlets examples but not the JSP examples in the browser.
>
>Kindly help me in this regard.
>
>
>Thanks in advance.
>
>veda
>
>===
>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://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

_
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.

Share information about yourself, create your own public profile at
http://profiles.msn.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://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".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
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: " UPLOAD of FILES " in JSP/SERVLETS

2000-11-17 Thread Daryani Santosh

Sunil,
  Here's the code for uploading files

//Example
//c:\projects\java HTTPPostClient c:\adm2fp\SS00_2000_08_10_01.xml


import java.net.*;
import java.io.*;

public class HTTPPostClient
{

  /*
  * usage
  *---*/
  private static void usage()
  {
System.out.println("Usage: HTTPostClient file");
  }

  /*
  * main
  *---*/
  public static void main(String args[])
  {
try
{

  if (args.length != 1)
  {
usage();
return;
  }

  // Get connection to Upload Servlet
  URL theURL = new URL("http://servername/servlet/UploadServlet");
  //UploadServlet is a servlet that reads incoming file and copies
  //onto the server

  HttpURLConnection theConnection =
(HttpURLConnection)theURL.openConnection();
  theConnection.setRequestProperty("Content-Type", "text/xml");
  theConnection.setRequestMethod("POST");
  theConnection.setDoOutput(true);
  PrintWriter out = new PrintWriter(theConnection.getOutputStream());

  // Read XML File
  String fileContents = "";
  String line = null;
  FileReader f1 = new FileReader(args[0]);
  BufferedReader theReader = new BufferedReader(f1);

  // Send each line to Servlet
  while ((line = theReader.readLine()) != null)
  {
System.out.println(line);
out.println(line);
  }
  out.close();
  System.out.println("Data Written");

  // Get Response
  System.out.println("Response: ");
  String inputLine;
  InputStream in = theConnection.getInputStream();
  BufferedReader responseReader =
new BufferedReader(new InputStreamReader(in));
  while ((inputLine = responseReader.readLine()) != null)
  {
System.out.println(inputLine);
  }
  in.close();

}
catch (Exception e)
{
  System.out.println("Exception Caught:\n" + e);
}
  }
}

Hope that helps
Santosh







Sunil Roy <[EMAIL PROTECTED]> on 10/02/2000 03:58:29 PM

Please respond to A mailing list about Java Server Pages specification and
  reference <[EMAIL PROTECTED]>

To:   [EMAIL PROTECTED]
cc:(bcc: Santosh Daryani/IT/Aon Consulting)

Subject:  " UPLOAD of FILES  "  in JSP/SERVLETS



Dear JSp Gurus,

Is their any site giving the sourcecode for
" UPLOAD of FILES "  in JSP/SERVLETS."

Thanks in anticipation

Bye
Sunil Roy

===
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://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".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
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: Execute aplication in other process

2000-11-02 Thread Daryani Santosh

I too played around with this for a while , trying to invoke java.exe from
within java.exe and it does'nt seem to work. I was able to call all other
applications using runtime exec but not java itself  , I don't think its
possible , not any way that I know of. I'd like to know if it there is a way of
doing it .

Santosh







Santiago Benito Rebollo <[EMAIL PROTECTED]> on 11/02/2000 10:25:19 AM

Please respond to A mailing list about Java Server Pages specification and
  reference <[EMAIL PROTECTED]>

To:   [EMAIL PROTECTED]
cc:(bcc: Santosh Daryani/IT/Aon Consulting)

Subject:  Re: Execute aplication in other process



Thanks. It works fine, buts  I have a problem when I try to run java class
files.

For example,

this works:
c:/jdk1.2.2/bin/java Mensajeria

but this doesn't work

c:/jdk1.2.2/bin/java -cp c:/Temporal/ProcesosBatch;%CLASSPATH% Mensajeria
(in dos window, it always work)


Do you know how i can do it?

Thanks for all.


>
> Hi,
>
> First get the Runtime object then use its exec method to run your .exe
> application.
>
> Runtime r = Runtime.getRuntime();
> r.exec("notepad");
>
> Note : notepad.exe should be in the system Path.
>
> Hope this helps you.
>

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

2000-11-02 Thread Daryani Santosh

This should work

<%@page import="import java.sql.*"%>

Santosh






Daniel Lynn <[EMAIL PROTECTED]> on 11/02/2000 10:04:46 AM

Please respond to A mailing list about Java Server Pages specification and
  reference <[EMAIL PROTECTED]>

To:   [EMAIL PROTECTED]
cc:(bcc: Santosh Daryani/IT/Aon Consulting)

Subject:  imports



ok, so I'm trying to pu in the following line of code

import java.sql.*;

into my JSP page. I put it in with the <% %> around it... Unfortunately,
the compiler says it's invalid. Any ideas?

-Daniel

===
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: JSP - CORBA

2000-11-01 Thread Daryani Santosh

<%@page import="org.omg.CORBA.ORB"%>
<%@page import="org.omg.CosNaming.NamingContext"%>
<%@page import="org.omg.CosNaming.NamingContextHelper"%>
<%@page import="org.omg.CosNaming.NameComponent"%>
<%@page import="packagename.*"%>
<%
//create stubs of corba components and compile them into classes
//packagename is package that contains your component
%>


 <%

  java.util.Properties props = new java.util.Properties();

  props.put("org.omg.CORBA.ORBClass","com.sybase.CORBA.ORB");
  props.put("com.sybase.CORBA.NameServiceURL","iiop://santosh:9000");
  ORB orb = ORB.init((String[]) null, props);

  //com.sybase.CORBA.ORB can be replaced with any other package that contains
CORBA classes

  int rows =0;
  componentname corbaComponent=null;
  //declare the component
  String status="";

  try {
 NamingContext context = NamingContextHelper.narrow(
orb.resolve_initial_references("NameService"));

 NameComponent[] name = { new NameComponent("packagename/componentname","")
};

 SessionManager.Factory factory =
SessionManager.FactoryHelper.narrow(context.resolve(name));

 corbaComponent =
aon_fp_n_passport_connectHelper.narrow(factory.create("userid","password"));
 //userid and password of app server where component is loacted

 }//end of try block

  catch (org.omg.CORBA.ORBPackage.InvalidName aException) {}
  catch (org.omg.CosNaming.NamingContextPackage.NotFound aException) {}
  catch (org.omg.CosNaming.NamingContextPackage.CannotProceed aException)
{  }
  catch (org.omg.CosNaming.NamingContextPackage.InvalidName aException) {}
  try
 {


  corbaComponent.of_methodname(arguments);
  out.print(value returned from method);

<%
 }
  catch (Exception aException)  {}

 %>



hope that helps
Santosh






Chen Shirley <[EMAIL PROTECTED]> on 11/01/2000 04:04:41 PM

Please respond to A mailing list about Java Server Pages specification and
  reference <[EMAIL PROTECTED]>

To:   [EMAIL PROTECTED]
cc:(bcc: Santosh Daryani/IT/Aon Consulting)

Subject:  JSP - CORBA



Hi everyone,

I am working on retriving a string array from other
application(which gets the data from the database) to
one of my jsp page through corba service.  How do I
write code to access CORBA objects from my jsp page?
Anyone has samples about jsp page using corba service?

Thanks a lot

__
Do You Yahoo!?
>From homework help to love advice, Yahoo! Experts has your answer.
http://experts.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: Jsp to Servlet and ViceVersa

2000-10-31 Thread Daryani Santosh

Calling Servlet to JSP

public class ServletToJsp extends HttpServlet {

 public void doGet (HttpServletRequest request , HttpServletResponse response)
  throws ServletException , IOException
  {
request.setAttribute("servletName","ServletToJsp");
 getServletContext().getRequestDispatcher("/jsp/hello.jsp").forward(request
, response );


Calling JSP to Servlet
Add Servlet URL  in your call , either while doing a post or forward


Santosh









"Ganesh N.M" <[EMAIL PROTECTED]> on 10/31/2000 04:15:24 PM

Please respond to A mailing list about Java Server Pages specification and
  reference <[EMAIL PROTECTED]>

To:   [EMAIL PROTECTED]
cc:(bcc: Santosh Daryani/IT/Aon Consulting)

Subject:  Jsp to Servlet and ViceVersa



Hi All,

Can any one give me sample code for calling servlet from JSP and viceversa?

thanx in Advance.

Bye,

Ganesh

===
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: JSP to XML

2000-10-11 Thread Daryani Santosh

You can use Oracle's XSQL utility to create a XML document from the database ,
the tag names are the column names.
ex if you select columsn a,b,c from a table then a , b and c will be your tag
names and the content of the tags is the value of the columns
 You can download this utility from Oracle's site. Once you have the XML
document created you can use XSL to transform it into HTML.

Santosh








Arunkumar S Keserla <[EMAIL PROTECTED]> on 10/11/2000 01:34:11 PM

Please respond to A mailing list about Java Server Pages specification and
  reference <[EMAIL PROTECTED]>

To:   [EMAIL PROTECTED]
cc:(bcc: Santosh Daryani/IT/Aon Consulting)

Subject:  JSP to XML



Hi

I was trying to implement an application in which I was supposed to get data
from a Database. I wanted to use XML as a Middle tier and then use XSL to
convert it to HTML or WML appropriately.

I am not sure how to convert data in Database to XML format, should i try to
put tags on my own or is there any cleaner way of doing it.

Thanks
Arun

--
1031 S Racine Ave, 1st Floor
Chicag0, IL - 60607
ph: (h) 312 666 7686
(w) 312 996 5802
--

===
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: URL Connection

2000-10-10 Thread Daryani Santosh

Peter,
  I was using the following code to connect to secure site , also the code
is a little old , it may not work out of the box , but atleast you'll get an
idea , may be you could  modify it to work  for your requirement.The files
imported are from JSSE jar

Hope that helps
Santosh

import java.net.*;
import java.io.*;
import java.util.Date;
import java.util.StringTokenizer;
import java.util.*;
import javax.net.*;
import javax.net.ssl.*;
import javax.security.cert.*;
import java.security.*;
import com.sun.net.ssl.*;

public class connURL implements ContentHandlerFactory
{

  public ContentHandler createContentHandler(String mimetype)
   {
   return this.createContentHandler(mimetype);
}


  public static void main(String args[])
  {(String


  if (args.length < 1)
  {
  System.err.println
   ("usage: java copyURL URL [LocalFile]");
  System.exit(1);
  }

  try
  {
// Set Authenticator
   String userID = "userid";
   String password = "password";
Authenticator.setDefault(new Authenticator(userID, password));

   // Set Properties
   System.setProperty("java.protocol.handler.pkgs",
  "com.sun.net.ssl.internal.www.protocol");
   Security.addProvider(new
com.sun.net.ssl.internal.ssl.Provider());
   //Security.addProvider(new Provider());

   System.out.println("Opening connection:\n" + '[' + args[0] +
']');

  URL url = new URL(args[0]);
  System.out.println("Opening connection to " + args[0] + "...");
  URLConnection urlC = url.openConnection();

  InputStream is = url.openStream();

  // Print info about resource
  System.out.print("Copying resource (type: " + urlC.getContentType());
  Date date=new Date(urlC.getLastModified());
  System.out.println(", modified on: " + date.toLocaleString() +
")...");
  System.out.flush();

  FileOutputStream fos=null;
  if (args.length < 2)
  {
  String localFile=null;

  // Get only file name
  StringTokenizer st=new StringTokenizer(url.getFile(), "/");
  while (st.hasMoreTokens())
 localFile=st.nextToken();
  fos = new FileOutputStream(localFile);
  }
  else
  fos = new FileOutputStream(args[1]);

  int oneChar, count=0;

  while ((oneChar=is.read()) != -1)
  {
 fos.write(oneChar);
 count++;
  }
  is.close();
  fos.close();

  System.out.println(count + " byte(s) copied");
  }
  catch (MalformedURLException e)
  { System.err.println(e.toString()); }
  catch (IOException e)
  { System.err.println(e.toString()); }
  }
}











"Norr, Peter" <[EMAIL PROTECTED]> on 10/10/2000 02:57:04 PM

Please respond to A mailing list about Java Server Pages specification and
  reference <[EMAIL PROTECTED]>

To:   [EMAIL PROTECTED]
cc:(bcc: Santosh Daryani/IT/Aon Consulting)

Subject:  URL Connection



How do I open a URL connection to a site that has basic authentication on?

I have the user name and password!!

Pete

===
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: Idiot Friday afternoon question

2000-10-06 Thread Daryani Santosh

Use Last-Modified , its a HEADER attribute

request.getHeader("Last-Modified")

Santosh





Jody Kerr <[EMAIL PROTECTED]> on 10/06/2000 05:42:53 PM

Please respond to A mailing list about Java Server Pages specification and
  reference <[EMAIL PROTECTED]>

To:   [EMAIL PROTECTED]
cc:(bcc: Santosh Daryani/IT/Aon Consulting)

Subject:  Idiot Friday afternoon question



Hello folks,

It's friday afternoon and my brain is jello. How do I return a page's last
modified date?

Thanks,

Jody

===
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: mail by jsp

2000-10-06 Thread Daryani Santosh

If you are using JRun check out JSPMail class at
com.livesoftware.jrun.plugins.jsp.beans.JSPMail.class ,
this class file is located in jrun.jar .

Class Documentation
com.livesoftware.jrun.plugins.jsp.beans.JSPMail

public synchronized class com.livesoftware.jrun.plugins.jsp.beans.JSPMail
extends java.lang.Object implements com.livesoftware.jrun.plugins.jsp.J
SPBean , com.livesoftware.smtp.MailSource
{
public com.livesoftware.jrun.plugins.jsp.beans.JSPMail();
public java.lang.String cc()[];
public void data(java.io.PrintStream);
public void done(boolean);
public java.lang.String from();
public java.lang.String host();
public java.lang.String mimetype();
public java.lang.String name();
public void sendMail();
   public void setBodyText(java.lang.String);
   public void setCcRecipient(java.lang.String);
   public void setFromAddress(java.lang.String);
   public void setFromName(java.lang.String);
   public void setMailHost(java.lang.String);
public void setMimeType(java.lang.String);
   public void setRecipient(java.lang.String);
public void setSubject(java.lang.String);
public void status(java.lang.String);
public java.lang.String subject();
public java.lang.String to()[];
public java.lang.String toString();
}

Santosh







James Klicman <[EMAIL PROTECTED]> on 10/06/2000 10:14:36 AM

Please respond to A mailing list about Java Server Pages specification and
  reference <[EMAIL PROTECTED]>

To:   [EMAIL PROTECTED]
cc:(bcc: Santosh Daryani/IT/Aon Consulting)

Subject:  Re: mail by jsp



You could check out mailtags from the IN16 JSP Tag Library.
http://sourceforge.net/projects/jsptags/

-James

On Fri, Oct 06, 2000 at 04:16:15PM +0500, Muhammad Asim Ajmal wrote:
> how can send the mail by the jsp page? which mail API of java can we
> use plzzz help me by the refrance of some small example
>
> regards
> asim
>
> ===
> 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

===
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 - bean in weblogic

2000-10-03 Thread Daryani Santosh

You probably need to put your bean into a package and then include the package
folder in your weblogic beans folder and add it to your classpath.

HTH
Santosh






Lakshmi Perumal <[EMAIL PROTECTED]> on 10/03/2000 02:38:27 PM

Please respond to A mailing list about Java Server Pages specification and
  reference <[EMAIL PROTECTED]>

To:   [EMAIL PROTECTED]
cc:(bcc: Santosh Daryani/IT/Aon Consulting)

Subject:  jsp - bean in weblogic



hi all
   when i try to run jsp which is using a bean,with weblogic server,i am
getting compilation error saying that bean class not found.i placed bean class
file at classes folder of weblogic root directiory.can any one suggest on
this

thanx in advance
rang



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

===
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: 500 Internal Server Error ???

2000-09-22 Thread Daryani Santosh

You are probably missing a .*
Try replacing this <%@ page import="myproject.beans" errorPage="error.jsp" %>
With <%@ page import="myproject.beans.*" errorPage="error.jsp" %>


Santosh





sufi malak <[EMAIL PROTECTED]> on 09/22/2000 04:03:55 PM

Please respond to A mailing list about Java Server Pages specification and
  reference <[EMAIL PROTECTED]>

To:   [EMAIL PROTECTED]
cc:(bcc: Santosh Daryani/IT/Aon Consulting)

Subject:  500 Internal Server Error ???



Hi, I have a jsp file called browse.jsp that starts with :
<%@ page import="myproject.beans"
errorPage="error.jsp" %>

<%
  ConceptBean[] concepts = ConceptBeanrequest.getConceptBeans();
%>

And I have my bean called ConceptBean.class in :
Javawebserver2.0/classes/myproject/beans/

And when I call browse.jsp I get this error :
500 Internal Server Error

Java Server Page Translation Error

Error during compilation :

D:\JavaWebServer2.0\tmpdir\default\pagecompile\jsp\_myproj\_browse.java:14:
Class myproject.beans not found in import.
import myproject.beans;
   ^
D:\JavaWebServer2.0\tmpdir\default\pagecompile\jsp\_myproj\_browse.java:19:
'}' expected.
static char[][] _jspx_html_data = null;
   ^
2 errors

Thanks
_
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.

Share information about yourself, create your own public profile at
http://profiles.msn.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: Problem with getProperty

2000-09-22 Thread Daryani Santosh

getProperty property name must be identical to the elment name on the form , it
they are differently spelled or have a different case getProperty cannot find it
and returns null

Santosh






Gopi Mandava <[EMAIL PROTECTED]> on 09/22/2000 03:16:32 PM

Please respond to A mailing list about Java Server Pages specification and
  reference <[EMAIL PROTECTED]>

To:   [EMAIL PROTECTED]
cc:(bcc: Santosh Daryani/IT/Aon Consulting)

Subject:  Problem with getProperty



Hi,

 is always returning a
null in the following case(when I iterate through a list and set the value
of the bean). But it works fine if I just call the get method on the bean.
Here is the jsp code:

I'm running Tomcat 3.0 and JDK 1.3 on a Linux RedHat 6.2





<%@ page import="java.util.*" %>
<%@ page import="Issue" %>

<%@ page errorPage="error.jsp" %>










Issue
Description

<%
 ArrayList issues = (ArrayList) request.getAttribute("issues");
 Iterator iterator = issues.iterator();
 while (iterator.hasNext())
 {
 issue = (Issue) iterator.next();
%>








<%= issue.getIssueName() %>



<%}%>










--

Thanks,
Gopi
---
Gopi Mandava(703) 267-1735 x307
CoManage Inc.

"The pedestrian had no clue which way to go, so I ran him over"
 - a real statement from an insurance form

===
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: Replace " "

2000-09-21 Thread Daryani Santosh

trim() will remove any leading or trailing spaces , but does not remove spaces
within the string if any. AFIAK , breaking the string and using concat seems to
be the best known solution , you could consider using a stringbuffer and
appending the portions of the string without spaces , but even that is not any
better than breaking the string and doing a concat

Santosh






Kevin Citron <[EMAIL PROTECTED]> on 09/21/2000 02:01:46 PM

Please respond to A mailing list about Java Server Pages specification and
  reference <[EMAIL PROTECTED]>

To:   [EMAIL PROTECTED]
cc:(bcc: Santosh Daryani/IT/Aon Consulting)

Subject:  Re: Replace " "



try Str.trim();

-Original Message-
From: sumit shah [mailto:[EMAIL PROTECTED]]
Sent: Thursday, September 21, 2000 10:59 AM
To: [EMAIL PROTECTED]
Subject: Replace " "


hi,
  is there any method of the String class which will allow me to get rid of
the blank spaces in a string.
  i tried Str.replace(' ', '') but jvm does not agree with the 2nd argument
saying incompatible type. Is there any direct method other than breaking the
string into substring and then concat() it. or if something that i can put
instead of ''.

thanks,
sumit.
_
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.

Share information about yourself, create your own public profile at
http://profiles.msn.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

===
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: how to write comma delimited string which already contains comma in some data?

2000-09-21 Thread Daryani Santosh

I don't know how feasible my soultion may be for your problem, but this is what
you can try .
When creating the CSV file , replace all , "commas" with a ; "semicolon" , this
way when you open the csv
in excel it will show only 4 columns. But the first column will show smith;susan
. To overcome this problem ,
provide your client with an excel macro that will replace all semicolon in the
cells with a comma.
May not be  a perfect solution , but may be a good workaround.

Santosh





hua ge <[EMAIL PROTECTED]> on 09/20/2000 10:52:03 PM

Please respond to A mailing list about Java Server Pages specification and
  reference <[EMAIL PROTECTED]>

To:   [EMAIL PROTECTED]
cc:(bcc: Santosh Daryani/IT/Aon Consulting)

Subject:  how to write comma delimited string which already contains comma
  in some data?



Hi,
I have a jsp page which set proper header and write data out in comma
delimited format so the client can download it as a .csv file and open it in
Excel later .

the data columns are :
NAME SSN PHONE EMAIL
smith,susan 123-45-4567 123-456-7890 [EMAIL PROTECTED]

notice that the NAME column should contains lastname,firstname together with
comma separated.


my problem is since the NAME field already contains "," which is in this
format (LastName,FirstName). so if I treat NAME field as one whole field and
write out in comma delimited format, then later in the excel .csv file, the
name field actually will be displayed as two separate columns and expand the
whole line records as total 5 columns (actually should be 4 columns).

my client don't like to make the NAME column shown as
(fname lname) with no comma (if so, I will have no problem). they want the
(lname,fname) format for this column.

So I have to figure out how can I write the comma delimited string which
already contains comma in it???

I tried out.println(lname +"\"" + "," + "\"" + fname + "," +
SSN + "," +
PHONE + "," +
EMAIL );

it still break down NAME column as two columns with lname value as smith"
and fname value as "susan

can someone give me a hint? and help me out here??

Thanks in advance.

Helen Ge

_
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.

Share information about yourself, create your own public profile at
http://profiles.msn.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: Generating simple graphs at real time

2000-09-20 Thread Daryani Santosh

 Take a look at www.chartworks.com , chartworks specializes in serving and
displaying java charts.

Santosh





Atchutarao Killamsetty <[EMAIL PROTECTED]> on 09/20/2000 09:26:12 AM

Please respond to A mailing list about Java Server Pages specification and
  reference <[EMAIL PROTECTED]>

To:   [EMAIL PROTECTED]
cc:(bcc: Santosh Daryani/IT/Aon Consulting)

Subject:  Generating simple graphs at real time



Hi,

I am looking for a way to generate simple graphs (Bar, Pie) on real time
from the options selected on one JSP and display it on the next JSP when the
user presses the submit button.

The data is realtime and hence I can not generate them during overnight
batch or something like that.

Your help or pointers is very much appreciated.

Thanks & Regards,
Atchutarao Killamsetty,
http://atchutworld.tripod.com/myjava.html

- Original Message -
From: Jacek Laskowski <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, September 20, 2000 9:57 PM
Subject: Another book ? (was Re: question about import)


> Hans Bergsten wrote:
> >
> > 
> > My own JSP book will soon be released, and it describes what the spec
> > says in this regard ;-)
> > 
>
> Oh, really ? Where can we read about it - maybe web page or something ?
> Is there any chance to read a chapter or so *before* buying it ? What
> servlet engine do you use to test your examples (Tomcat ?) and what spec
> will it describe - JSP 1.1 or 1.2 ?
>
> Don't be surprised that I'm asking so many questions, as I've seen you
> on Tomcat-related mailing lists and others and your help was always very
> valuable, so probably does book. Besides, there're several books on the
> topic, but in most cases, the spec was only reliable source of
> information.
>
> > Hans
>
> Jacek Laskowski
>
>
===
> 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

===
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: How to run servlets in JRun3.0

2000-09-20 Thread Daryani Santosh

Replace servlets with servlet in you call

Your url should look like http://localhost:8000/servlet/hello , notice servlets
replaced with servlet

Santosh






"C.V.S.Brahammananda Rao" <[EMAIL PROTECTED]> on 09/20/2000 07:16:09 PM

Please respond to A mailing list about Java Server Pages specification and
  reference <[EMAIL PROTECTED]>

To:   [EMAIL PROTECTED]
cc:(bcc: Santosh Daryani/IT/Aon Consulting)

Subject:  How to run servlets in JRun3.0



Hello friends,

can anyone help me how to run sevlets in JRun3.0.

I created a simple class file (hello.class)and put in the JRun/servlets
directory.
I tried to access by using http://localhost:8000/servlets/hello.

It says the following
404 Not Found
/servlets/Hello
allaire.jrun.JRunServletException: not found
at allaire.jrun.file.FileServlet.service(FileServlet.java,
Compiled Code)
at java.lang.Exception.(Unknown Source)
at javax.servlet.ServletException.(ServletException.java, Compiled
Code)
at allaire.jrun.JRunServletException.(JRunServletException.java,
Compiled Code)
at allaire.jrun.JRunServletException.(JRunServletException.java,
Compiled Code)
at allaire.jrun.file.FileServlet.service(FileServlet.java,
Compiled Code)
at
allaire.jrun.servlet.JRunServletPool.service(JRunServletPool.java,
Compiled Code)
at allaire.jrun.servlet.JRunSE.service(JRunSE.java, Compiled Code)
at allaire.jrun.servlet.JRunSE.runServlet(JRunSE.java, Compiled
Code)
at
allaire.jrun.servlet.JRunRequestDispatcher.forward(JRunRequestDispatcher.java,
Compiled Code)
at allaire.jrun.servlet.JRunSE.service(JRunSE.java, Compiled Code)
at allaire.jrun.servlet.JvmContext.dispatch(JvmContext.java,
Compiled Code)
at allaire.jrun.http.WebEndpoint.run(WebEndpoint.java, Compiled
Code)
at allaire.jrun.ThreadPool.run(ThreadPool.java, Compiled Code)
at allaire.jrun.WorkerThread.run(WorkerThread.java, Compiled Code)


Where have i gone wrong.
Thanks in advance.
Bye
Brahmananda Rao

===
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: JSP: Examples

2000-09-18 Thread Daryani Santosh

Here's an example jsp followed by the bean . You may have to make some changes
to run in your environment , also need
to put the bean in the appropriate folder.

hope this gives you some direction
Santosh

JSP
<%@page import="hello.*;" errorPage="DisplayError.jsp"%>



New User Registration





LoginId
Password  
First Name 
last name 
Company   
StreetAddr  
City  
State  
Zip   
Phone  





<%
if ( request.getParameter("create")!=null)
{
String btnvalue = request.getParameter("create");
String loginid = request.getParameter("loginid");
if ( btnvalue.equals("Create"))
{
 if ( DbBean.exists(loginid))
 {
 out.println("User Already Exists");
 }
 else
 {
 %>
  
  
  
  
  
  
  
  
  
 <%
 if (DbBean.setLoginId(loginid))
 {
  out.println("User "+loginid+" created");
 }
  }
  }
}
%>




Bean

package databean;

import java.sql.*;

public class DbBean {
 static Connection con;
 static String dsnName ="jdbc:odbc:yourdsnname" ;

 public DbBean() throws ClassNotFoundException,SQLException {
  }
 public static Connection getDBConnection()  {
  try {
   Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
   con = DriverManager.getConnection(dsnName);
  }catch(ClassNotFoundException e){
  }catch(SQLException e){
  }
  return con;
 }

 public String[] getResultSet(String query) throws SQLException {
  ResultSet rs1 = null,rs2=null;
  int i=0,counter=0;
  String[] name = null;
  Statement stmt1=null,stmt2=null;
  try {
   stmt1 = DbBean.getDBConnection().createStatement();
   rs2 = stmt1.executeQuery(query);
   while(rs2.next()){
counter++;
   }


   stmt2 = DbBean.getDBConnection().createStatement();
   rs1 = stmt2.executeQuery(query);
   name = new String[counter];
   while(rs1.next()) {
name[i] = new String();
name[i] = rs1.getString(1);
i++;
   }



  }
  catch(SQLException e){
   e.printStackTrace() ;
  }
  return name;
 }

 public int getUpdataInsertDeleteCount(String query) throws SQLException {
  int count=0;
  Statement stmt=null;
  try {
   stmt = DbBean.getDBConnection().createStatement();
   count = stmt.executeUpdate(query);


  }
  catch(SQLException e){}
  return count;
 }
}













Sushil Singh <[EMAIL PROTECTED]> on 09/18/2000 03:13:56 PM

Please respond to A mailing list about Java Server Pages specification and
  reference <[EMAIL PROTECTED]>

To:   [EMAIL PROTECTED]
cc:(bcc: Santosh Daryani/IT/Aon Consulting)

Subject:  JSP: Examples



Hi,
I have never used any beans in JSP, if anybody can provide me a simple
JSP which uses a BEAN (Database bean etc), in order to understand the
concept/advantages. it will be highly appreciated.

Thanks.
Sushil

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



How to find files within a web folder

2000-09-12 Thread Daryani Santosh

I need to do a file search within a particular directory. I have no problems
searching files on my local machine , but when I am connected to a web server ,
the search fails. I think i am missing something , can anyone help.
The connection is OK because when I am able to establish a FileIntputStream and
download a file from the same location

Here's the code

URL url = new URL("https://beta.something.com/logs"); //This location stores all
 log files , I need to get these file names
URLConnection urlC = url.openConnection();

 String[] filelist ;
 File logfile = new File(url.toString());
 if (logfile.exists())
{
filelist = logfile.list();
for(int i= 0 ;i < filelist.length ; i++)
{
System.out.println(filelist[i]);
   }
}


Appreciate your responses
Santosh

===
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: XML, XSL and DB

2000-09-12 Thread Daryani Santosh

Here is some code that I am using , it used Oracle's XSQL to create a XML
document from data extracted from the oracle
database. You will have to download the oracle.xml package from the oracle site.

hope that's useful
Santosh

import java.io.*;
import java.sql.*;
import java.math.*;
import oracle.xml.sql.query.*;

public class query2xml
{

  public static void main(String args[]) throws SQLException
  {
String tabName = "employee";
 String xmlfile;
 try
 {

 String productname;
 DataInputStream dis;
 FileOutputStream fos;
 Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
 String url = "jdbc:odbc:benmgmt";//replace benmgmt with your odbc dsn
 Connection conn = DriverManager.getConnection(url,"userid","password"); //
replace usrid & pwd with actual values

 // initialize the OracleXMLQuery
 OracleXMLQuery qry = new OracleXMLQuery(conn,"select * from "+tabName
);

 // structure the generated XML document
 qry.setMaxRows(5);  // set the maximum number of rows to be returned
 qry.setRowsetTag("RECORDSET"); // set the root document tag
 qry.setRowTag("RECORD"); // sets the row separator tag
 qry.setStyleSheet("whatever.xsl"); // sets the stylesheet

 // get the XML document in string format
 String xmlString = qry.getXMLString();

 System.out.println("Enter name of XML to be generated");
 dis = new DataInputStream(System.in);
 xmlfile = dis.readLine();
 fos = new FileOutputStream(xmlfile);

 byte[] sqlresult = new byte[xmlString.length()];
 xmlString.getBytes(0,sqlresult.length,sqlresult,0);
 fos.write(sqlresult);
 //}
 fos.close();
 dis.close();
System.out.println(" OUTPUT IS:\n"+xmlString);
}
 catch(Exception CE)
 {
  System.out.println(CE.getMessage());
 }


 }
}









sun_king <[EMAIL PROTECTED]> on 09/12/2000 01:22:58 PM

Please respond to A mailing list about Java Server Pages specification and
  reference <[EMAIL PROTECTED]>

To:   [EMAIL PROTECTED]
cc:(bcc: Santosh Daryani/IT/Aon Consulting)

Subject:  XML, XSL and DB



greetings,

any examples, tutorials about populating a XML file with a DB, then
reading it through an XSL and JSP?

thanks

ejf

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



File retrieve using HTTPS connection

2000-09-07 Thread Daryani Santosh

Sorry for posting this question on the JSP list , this is not a very JSP
specific issue , but I am running out of resources , thought someone on this
list may have an answer. Appreciate your responses.

I am trying to retrieve a file from a https connection, while doing so I get an
access denied error. I have verified the userid and password , they are correct
because I am able to post a file on to the same location with the same user id
and password. The file extension is .log  and my content-type has a value of
text/html , but I have'nt had success in changing the Content-type.

This is my code

  URL url = new URL("https://file location");
  URLConnection urlC = url.openConnection();


  HttpsURLConnection theConnection = (HttpsURLConnection)urlC;
  // Print info about resource
  for (int i = 0; i < 10; i++)
  {
String headerKey = theConnection.getHeaderFieldKey(i);
System.out.print("HeaderKey " + i + ": " + headerKey);
System.out.println(" Value: " + theConnection.getHeaderField(i));
  }


  // Copy resource to local file, use remote file

  InputStream is = urlC.getInputStream();

  // Get File Name
  StringTokenizer st = new StringTokenizer(url.getFile(), "/");
  String fileName = null;
  while (st.hasMoreTokens())
  {
fileName = st.nextToken();
  }

  FileOutputStream fos = new FileOutputStream(fileName);

  int oneChar, count=0;
  while ((oneChar=is.read()) != -1)
  {
fos.write(oneChar);
count++;
  }
  is.close();
  fos.close();


This is the output

Opening connection:
[https://benetest.selfservicenow.com/servicecenter/upload/SS00_2000_09_07_01.log]

Connection opened:
com.sun.net.ssl.internal.www.protocol.https.HttpsURLConnection:https://benetest.selfservicenow.com/servicecente

Connection Type: com.sun.net.ssl.internal.www.protocol.https.HttpsURLConnection
HeaderKey 0: null Value: HTTP/1.1 401 Access Denied
HeaderKey 1: WWW-Authenticate Value: NTLM
HeaderKey 2: Connection Value: close
HeaderKey 3: Content-Length Value: 644
HeaderKey 4: Content-Type Value: text/html
HeaderKey 5: null Value: null
HeaderKey 6: null Value: null
HeaderKey 7: null Value: null
HeaderKey 8: null Value: null
HeaderKey 9: null Value: null
Expected size is: 644
Resource type: text/html
Last modified on: Wed Dec 31 19:00:00 EST 1969...
Permission is: (java.net.SocketPermission benetest.selfservicenow.com:80
connect,resolve)
OPENING STREAM
java.io.FileNotFoundException:
https://benetest.selfservicenow.com/servicecenter/upload/SS00_2000_09_07_01.log

The file does exist , because I can see it when I view it through the browser

Thanks in advance
Santosh

===
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: how to use Oracle Stored Procedure

2000-09-07 Thread Daryani Santosh

Code for calling a stored procedure

Use Callable Statement

//con is your connection object


CallableStatement cstmt = con.prepareCall("{call sp_yourprocedurename(?,?}");
cstmt.registerOutparameter(2,java.sql.Types.FLOAT);
cstmt.setint(1,parameter1);
cstmt.execute();
out.println("Procedure output is :"+cstmt.getFloat(2));

The above example has a stored proc with 2 arguments , 2nd is output. You don't
need to registerOutparameter if
procedure has no out parameters , also no need to set values if there are no
input args.
This code can be called directly from the JSP if you have the connection object
or code it in a bean and access
bean methods from the JSP.

Santosh






Naveen Gupta <[EMAIL PROTECTED]> on 09/07/2000 07:56:43 AM

Please respond to A mailing list about Java Server Pages specification and
  reference <[EMAIL PROTECTED]>

To:   [EMAIL PROTECTED]
cc:(bcc: Santosh Daryani/IT/Aon Consulting)

Subject:  how to use Oracle Stored Procedure



Pls tell me how to use Oracle Stored Procedure in JSP's

Naveen Gupta

===
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: Writing file to disk

2000-09-05 Thread Daryani Santosh

Here's some code that may help . You have to make slight modifications based on
where you are getting the data to be written .

Santosh.

  FileOutputStream fos=null;
  String filename="your_filename";
  fos = new FileOutputStream(filename);

 int offset ,len ,oneChar, count=0;
 bytes[] xmldata;
  //xmldata = get xml data from your string variable and convert it to
byte array
  //write each line of xml into file
  {
 fos.write(xmldata,offset,;len);
 count = count + xmldata.length ;
  }
  fos.close();
  System.out.println(count + " byte(s) copied");








Aaron Prohaska <[EMAIL PROTECTED]> on 09/05/2000 03:16:47 PM

Please respond to A mailing list about Java Server Pages specification and
  reference <[EMAIL PROTECTED]>

To:   [EMAIL PROTECTED]
cc:(bcc: Santosh Daryani/IT/Aon Consulting)

Subject:  Writing file to disk



Can someone show a newbie a simple example of writing a file to disk? I am
trying to dynamically write a xml file to a folder so that cocoon can
process that file.

thanks,

Aaron

<<:::..:::...::: Aaron Prohaska :::..:::...:::>>
VerdeSoft Internet Services
mailto:[EMAIL PROTECTED]  http://www.verdesoft.net/

===
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: Unable to use Session variable

2000-08-30 Thread Daryani Santosh

You may have to get  the session object by
HttpSession session = request.getSession();
then call any methods you want on your session variable

Santosh





Sushil Singh <[EMAIL PROTECTED]> on 08/30/2000 12:52:01 PM

Please respond to A mailing list about Java Server Pages specification and
  reference <[EMAIL PROTECTED]>

To:   [EMAIL PROTECTED]
cc:(bcc: Santosh Daryani/IT/Aon Consulting)

Subject:  Unable to use Session variable



Hi,

I am having HTTP and WebSphere running under Win NT, I am unable to use the
session
variables, its giving error:
Undefined variable or class name: session out.println(ServletUtil.toString(
session.getId() ));

The code is:

<%@ import="java.util.*" %>
<%@ session="true" %>

Test Jsp
<% for (int i=0;i < 5;i++)
  { %>
Hello World, Current Time is <%= new Date()
%> 
<%}%>

Session id is <%= session.getId() %>


Thanks in advance.

Sushil

===
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: Detecting Browser Version

2000-08-28 Thread Daryani Santosh

Hi Jeff,

This will return the browser type
request.getHeader("user-agent");


 You can also get the browser value using JavaScript .

document.write(navigator.appName);



Santosh








JeffRyan <[EMAIL PROTECTED]> on 08/28/2000 10:40:12 AM

Please respond to A mailing list about Java Server Pages specification and
  reference <[EMAIL PROTECTED]>

To:   [EMAIL PROTECTED]
cc:(bcc: Santosh Daryani/IT/Aon Consulting)

Subject:  Detecting Browser Version



Hi,

Is there a way to detect the browser version from the request object so that you
can generate the appropriate HTML in your JSP?

Thanks, Jeff Ryan

Experience is the best teacher; it always gives the test before the lesson.-
H.T. Leslie

Jeff Ryan
Hartford Financial Services
[EMAIL PROTECTED]
860.547.4237

===
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: Undefined variable or class name

2000-08-25 Thread Daryani Santosh

Your resultset variable is defined inside the try-catch block , it is local to
that block . The variable rek is not available outside the block.

Solution : Define your variable rek outside the block or move out.println inside
the block

Santosh





Erwan TROEL <[EMAIL PROTECTED]> on 08/25/2000 10:30:59 AM

Please respond to A mailing list about Java Server Pages specification and
  reference <[EMAIL PROTECTED]>

To:   [EMAIL PROTECTED]
cc:(bcc: Santosh Daryani/IT/Aon Consulting)

Subject:  Undefined variable or class name



<%@ page info="database handler"%>
<%@ page import="java.io.*"%>
<%@ page import="java.util.*"%>
<%@ page import="java.sql.*"%>
<%@ page import="javax.servlet.*"%>
<%@ page import="javax.servlet.http.*"%>
<%
try
{

Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
String url="jdbc:odbc:test";

Connection con=DriverManager.getConnection(url, "administrator",
"password");
Statement stmt = con.createStatement();
ResultSet rek = stmt.executeQuery (
"SELECT TOTAL FROM COFFEES WHERE COF_NAME='ARABICA'");
}
catch (Exception e) {}

out.println(rek.getString());
%>
Does any body know the Pb? error 500:
org.apache.jasper.JasperException: Unable to compile class for
JSPC:\jakarta-tomcat\work\localhost_8080\_0002ftest_0002ejsptest_jsp_3.java:
98: Undefined variable or class name: rek out.println(rek.getString()); ^ 1
error

===
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: Is There any Free Shopping Cart Code In Jsp

2000-08-25 Thread Daryani Santosh

Apologies . I had both the versions of JRun ( 2.3 & 3.0 ) installed on my server
, the path I pointed to you belonged to
JRun 2.3 , I browsed all the sub-folders of Version 3.0 installation for a
Shoppping Cart example , but could'nt find one. You can either install the 2.3
version to get to the example or I can send you a zip file for those specific
folders from version 2.3.

Santosh





Raja Nagendra Kumar <[EMAIL PROTECTED]> on 08/25/2000 03:57:46 AM

Please respond to A mailing list about Java Server Pages specification and
  reference <[EMAIL PROTECTED]>

To:   [EMAIL PROTECTED]
cc:(bcc: Santosh Daryani/IT/Aon Consulting)

Subject:  Re: Is There any Free Shopping Cart Code In Jsp



Hi Santhosh!

I don't see the directory you have pointed out..  I am using

 JRun 3.0



Please re-confirm the directory..

Regards,
Nagendra




      Placed At :


Daryani Santosh <[EMAIL PROTECTED]> on 08/24/2000 07:15:59 PM

Please respond to A mailing list about Java Server Pages specification and
  reference <[EMAIL PROTECTED]>

To:   [EMAIL PROTECTED]
cc:(bcc: Nagendra R/Satyam)

Subject:  Re: Is There any Free Shopping Cart Code In Jsp




There is a Cart JSP example that comes alongwith the installation of JRun 3.0 ,
you can download the developer
version for free. If you install JRun on the root of C drive , you will find the
cart example in the following folder

C:\JRun\jsm-default\services\jws\htdocs\jsp\jspsamp\jspcart

Santosh







Kanojia Jogesh <[EMAIL PROTECTED]> on 08/24/2000 09:21:33 AM

Please respond to A mailing list about Java Server Pages specification and
  reference <[EMAIL PROTECTED]>

To:   [EMAIL PROTECTED]
cc:(bcc: Santosh Daryani/IT/Aon Consulting)

Subject:  Is There any Free Shopping Cart Code In Jsp



Hi

Can Anybody tell, is there any Free shopping Cart Application Code
build in jsp

Please Let me know

Waiting  for the reply



Regards :-)
Kanojia Jogesh(Senior Web Developer)
IG Technologies Ltd,Mumbai
We are in Web Development and B2B and B2C Solution provider

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

===
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: Is There any Free Shopping Cart Code In Jsp

2000-08-24 Thread Daryani Santosh

There is a Cart JSP example that comes alongwith the installation of JRun 3.0 ,
you can download the developer
version for free. If you install JRun on the root of C drive , you will find the
cart example in the following folder

C:\JRun\jsm-default\services\jws\htdocs\jsp\jspsamp\jspcart

Santosh







Kanojia Jogesh <[EMAIL PROTECTED]> on 08/24/2000 09:21:33 AM

Please respond to A mailing list about Java Server Pages specification and
  reference <[EMAIL PROTECTED]>

To:   [EMAIL PROTECTED]
cc:(bcc: Santosh Daryani/IT/Aon Consulting)

Subject:  Is There any Free Shopping Cart Code In Jsp



Hi

Can Anybody tell, is there any Free shopping Cart Application Code
build in jsp

Please Let me know

Waiting  for the reply



Regards :-)
Kanojia Jogesh(Senior Web Developer)
IG Technologies Ltd,Mumbai
We are in Web Development and B2B and B2C Solution provider

===
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: re pb

2000-08-24 Thread Daryani Santosh

Possible Scenarios

Your file is not saved with a dot java extension
It is a path problem , your javac cannot see your java files , either provide
complete path , go to
the location where your java file is located and compile from there , instead
from c:\jdk\bin
Your HelloWorld file has a different case , ex helloWorld or HELLOWORLD etc

Santosh





Erwan TROEL <[EMAIL PROTECTED]> on 08/24/2000 07:56:56 AM

Please respond to A mailing list about Java Server Pages specification and
  reference <[EMAIL PROTECTED]>

To:   [EMAIL PROTECTED]
cc:(bcc: Santosh Daryani/IT/Aon Consulting)

Subject:  re pb



If I run it by typing "c:\jdk1.2\bin\javac HelloWorld.java:
error can not read HelloWorld?thanks

===
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: JDBC: want to know the no of record fetch my any select query

2000-08-22 Thread Daryani Santosh

There is no direct way of getting the record count using JDBC 1.1 , you can do
it with JDBC 2.0 though.
 With JDBC 1.1 , you can do a resultset.last() , that takes you to the last
record , this is an indirect way of
getting the record count. That's all I can think of.

Santosh





amar singhal <[EMAIL PROTECTED]> on 08/22/2000 02:09:27 PM

Please respond to A mailing list about Java Server Pages specification and
  reference <[EMAIL PROTECTED]>

To:   [EMAIL PROTECTED]
cc:(bcc: Santosh Daryani/IT/Aon Consulting)

Subject:  JDBC: want to know the no of record fetch my any select query



Hi,
I am using jdbc 1.1 driver. I want to know the records fetch by any select
query statment.

thanks.
Amar Singhal



Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.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: New Web Application

2000-08-21 Thread Daryani Santosh

This can be achieved with JavaScript , use  RegExp object. The RegExp()
represents a regular expression
that is used for pattern matching.

 
//function to check for numeric value

function isNum(str)
{
//define a RegExp object which checks for numeric input

var regexp=/^d({9})$/;
return regexp.test(str);

//d stand for digit

}

RegExp.test return a boolean , in this case if your input is not numeric
a false is returned , based on this boolean value you can
display messages or reject value  or whatever you want to do

Santosh







Suresh kumar K Badiga <[EMAIL PROTECTED]> on 08/21/2000 08:01:00 AM

Please respond to A mailing list about Java Server Pages specification and
  reference <[EMAIL PROTECTED]>

To:   [EMAIL PROTECTED]
cc:(bcc: Santosh Daryani/IT/Aon Consulting)

Subject:  New Web Application



Hi all

I am Using Microsoft FrontPage 2000 Using this i created one edit box in
this i wanted to enter only numbers so how to do this please tell me ?

I had done like this I selected that edit box and went to properties their i
selected numbers even though i am able to enter characters in that edit box.

Please tell me how to do this

Thanks in advance.

-Suresh

===
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: Includes in JSP

2000-08-18 Thread Daryani Santosh

The example I sent used INCLUDE as an action , try it as a directive

Here's a table that shows the difference between dynamic and static include

Include   Syntax   Done When
 Include Content Parsing

Directive <%@ include file ="filename"%>
Compilation Time  Static  Parsed by
  Container

Action Request
Processing Static or   not parsed but
TimeDynamic  included in
place



Santosh







Mutahar Qayum <[EMAIL PROTECTED]> on 08/18/2000 03:21:07 PM

Please respond to A mailing list about Java Server Pages specification and
  reference <[EMAIL PROTECTED]>

To:   [EMAIL PROTECTED]
cc:(bcc: Santosh Daryani/IT/Aon Consulting)

Subject:  Re: Includes in JSP



its just adds a html page, if i try to add page with JAVA code it doesnot
work...
need help

-Original Message-
From: Daryani Santosh [mailto:[EMAIL PROTECTED]]
Sent: Friday, August 18, 2000 10:58 AM
To: [EMAIL PROTECTED]
Subject: Re: Includes in JSP


You can use jsp:include
Here's a simple example that may give you some idea




Demo JSp testing JSP:INCLUDE declarative


 JSP:INCLUDE Feature Demo
<%
//what ever you want here

//process some other pages
%>





<%
//back to your main page
%>




Santosh










Mutahar Qayum <[EMAIL PROTECTED]> on 08/18/2000 01:22:50 PM

Please respond to A mailing list about Java Server Pages specification and
  reference <[EMAIL PROTECTED]>

To:   [EMAIL PROTECTED]
cc:(bcc: Santosh Daryani/IT/Aon Consulting)

Subject:  Includes in JSP



I have been includes files thru this command in ASPs, can you tell me what
is similar command in JSP for that. It helped me a lot in ASP,
the command in ASP is



thanks

Mutahar

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

===
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: Includes in JSP

2000-08-18 Thread Daryani Santosh

You can use jsp:include
Here's a simple example that may give you some idea




Demo JSp testing JSP:INCLUDE declarative


 JSP:INCLUDE Feature Demo
<%
//what ever you want here

//process some other pages
%>





<%
//back to your main page
%>




Santosh










Mutahar Qayum <[EMAIL PROTECTED]> on 08/18/2000 01:22:50 PM

Please respond to A mailing list about Java Server Pages specification and
  reference <[EMAIL PROTECTED]>

To:   [EMAIL PROTECTED]
cc:(bcc: Santosh Daryani/IT/Aon Consulting)

Subject:  Includes in JSP



I have been includes files thru this command in ASPs, can you tell me what
is similar command in JSP for that. It helped me a lot in ASP,
the command in ASP is



thanks

Mutahar

===
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: searching this mailing list?

2000-08-18 Thread Daryani Santosh

The archives of this list are available at:

http://archives.java.sun.com/archives/jsp-interest.html


Santosh







Peter Feng <[EMAIL PROTECTED]> on 08/18/2000 07:17:20 AM

Please respond to A mailing list about Java Server Pages specification and
  reference <[EMAIL PROTECTED]>

To:   [EMAIL PROTECTED]
cc:(bcc: Santosh Daryani/IT/Aon Consulting)

Subject:  Re: searching this mailing list?



http://developer.java.sun.com/developer/community/index.html
 Happy searching!!!
--- Greg Ball <[EMAIL PROTECTED]> wrote:
> Is there some sort of Web interface for searching
> this mailing list? I
> cannot find any reference to a web archive.
>
> Thanks,
> Greg
>
>
===
> 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


__
Do You Yahoo!?
Send instant messages & get email alerts 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: loop terminating

2000-08-17 Thread Daryani Santosh

What is your query ? If you can send it , I can trying running on our oracle
database ,you may want to include the table structure of the tables used in your
query ,  so that I can create a similar scenario.

Santosh







subramanian Athimoolam <[EMAIL PROTECTED]> on 08/17/2000 02:17:33 AM

Please respond to A mailing list about Java Server Pages specification and
  reference <[EMAIL PROTECTED]>

To:   [EMAIL PROTECTED]
cc:(bcc: Santosh Daryani/IT/Aon Consulting)

Subject:  loop terminating



hi  friends
i have small pb.i am using jsp  msacess the querey will be working fine
the same query i am conver to oracle database
the loop will be terminated some where . what is the problems.

awaiting for  yours reply


subu



Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.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: what happened to allaire?

2000-08-15 Thread Daryani Santosh

Where did you get the information that allaire website is gone ? It's there , as
of 8/15/2000 4:45:32 PM EST , I verified before sending this mail, you must have
hit an older hyperlink that points to some incorrect path , maybe ?

Santosh.





Calixto Melean <[EMAIL PROTECTED]> on 08/15/2000 04:30:04 PM

Please respond to A mailing list about Java Server Pages specification and
  reference <[EMAIL PROTECTED]>

To:   [EMAIL PROTECTED]
cc:(bcc: Santosh Daryani/IT/Aon Consulting)

Subject:  what happened to allaire?



did it go out of business or what? website is gone

===
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: bit off topic - HELP on books

2000-08-14 Thread Daryani Santosh

Servlets - Java  Servlet Programming by jason Hunter O'Reilley publication
Servlets - Professional java Server Programming Wrox Publication
Servlets and JSPs - Core Servlets and Java Server Pages - check fatbrain.com
they have a very special offer for this book

JSP - Professional JSP by Wrox Publication
JSP - Java Server Pages - by Fields and Kolb - recommended by a lot of
developers

EJB - Mastering EJB by Wiley Publication - does not have lot of code examples
but good overview of the concept.


Don't know any for Weblogic and Websphere

Santosh











Abudhahir A <[EMAIL PROTECTED]> on 08/14/2000 03:05:51 PM

Please respond to A mailing list about Java Server Pages specification and
  reference <[EMAIL PROTECTED]>

To:   [EMAIL PROTECTED]
cc:(bcc: Santosh Daryani/IT/Aon Consulting)

Subject:  bit off topic - HELP on books



hi guys there
I want to equip as you guys are can any body suggest good book on
1. Web Sphere
2. Web Logic
3. EJB
4. Servlets & JSP
Thanks for your time and guidance

abudhahir

===
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: detecting browser type

2000-08-14 Thread Daryani Santosh

Try this , its Javascript
App name returns the type of browser

 
document.write(navigator.appName);
document.write(navigator.platform);








Brad Miley <[EMAIL PROTECTED]> on 08/14/2000 12:17:05 PM

Please respond to A mailing list about Java Server Pages specification and
  reference <[EMAIL PROTECTED]>

To:   [EMAIL PROTECTED]
cc:(bcc: Santosh Daryani/IT/Aon Consulting)

Subject:  detecting browser type



How do you detect what type of browser the client is using?


Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.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: Posting data between two JSP/Servlets

2000-08-11 Thread Daryani Santosh

Here is how we did it , this can be implemented right away , you may have to
modify a little because I was passing data from a Java client app to a servlet ,
you may have to code it ot post from a JSP instead of a Java client app.
  Alos my code copies the posted data into a file , you can eliminate that step
, because you just want the data to get there

1 . Java client app posts data to a  2. Upload Servlet

hope this helps
Santosh


1. Code for part one

import java.net.*;
import java.io.*;

public class HTTPPostClient
{

  /*
  * usage
  *---*/
  private static void usage()
  {
System.out.println("Usage: HTTPostClient file");
  }

  /*
  * main
  *---*/
  public static void main(String args[])
  {
try
{

  if (args.length != 1)
  {
usage();
return;
  }

  // Get connection to Upload Servlet
  URL theURL = new URL("http://localhost:8000/servlet/UploadServlet");
  HttpURLConnection theConnection =
(HttpURLConnection)theURL.openConnection();
  theConnection.setRequestProperty("Content-Type", "text/xml");
  theConnection.setRequestMethod("POST");
  theConnection.setDoOutput(true);
  PrintWriter out = new PrintWriter(theConnection.getOutputStream());


  // Read XML File
  String fileContents = "";
  String line = null;
  FileReader f1 = new FileReader(args[0]);
  BufferedReader theReader = new BufferedReader(f1);

//   In your case you don't have to read data from a file to send it , you
may collect your data from
   //  a form , from the database ,or any other source of input



  // Send each line to Servlet
  while ((line = theReader.readLine()) != null)
  {
System.out.println(line);
out.println(line);
  }
  out.close();
  System.out.println("Data Written");

  // Get Response
  System.out.println("Response: ");
  String inputLine;
  InputStream in = theConnection.getInputStream();
  BufferedReader responseReader =
new BufferedReader(new InputStreamReader(in));
  while ((inputLine = responseReader.readLine()) != null)
  {
System.out.println(inputLine);
  }
  in.close();

}
catch (Exception e)
{
  System.out.println("Exception Caught:\n" + e);
}
  }
}


2. Code for upload servlet


import java.io.*;
import java.util.*;
import javax.servlet.*;
import javax.servlet.http.*;

/*--
* Upload Servlet
*-*/
public class UploadServlet extends HttpServlet
{(in));

  /*
  * Data
  * Modify directory to where you want to store uploaded files!
  *---*/

  private static String m_uploadDirectory = "\\upload";


  /*
  * doGet
  *---*/
  public void doGet (HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException
  {

System.out.println("UploadServlet.doGet()");

// Set content type and other response header fields first
String title = "Simple Servlet Output";
response.setContentType("text/html");

// Write the data of the response
PrintWriter out = response.getWriter();

out.println("");
out.println(title);
out.println("");
out.println("" + title + "");
out.println("This is output from UploadServlet");
out.println("");
out.close();
  }

  /*
  * doPost
  *---*/
  public void doPost (HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException
  {
BufferedWriter uploadFile = null;
try
{

  System.out.println("UploadServlet.doPost()");
  System.out.println("CONTENT: " + request.getContentType());
  System.out.println("LENGTH : " + request.getContentLength());

  // Get the Input Stream
  ServletInputStream input = request.getInputStream();
  BufferedReader theReader =
  new BufferedReader(new InputStreamReader(input));

  // Create output file
  String uploadFileName = m_uploadDirectory + '\\' + filename;

  uploadFile = new BufferedWriter(new FileWriter(uploadFileName));

  String line = null;
  while ((line = theReader.readLine()) != null)
  {

Re: UML Tutorial Pointers

2000-08-09 Thread Daryani Santosh

I don't think asking for a reference site or pointers on the web is always being
lazy and inconsiderate of others , its very much true that there are serach
engines , but for a given topic a serach engine could come up with a 170 sites
and you may have to spend hours before you get the best one. If somebody already
knows a good resource it can be very useful for another developer.
  Ex search for "sax parser tutorial" you'll end up with more than a 1000 pages
, the best resource for this is a recent article in the JavaWorld magazine
http://www.javaworld.com/javaworld/jw-08-2000/jw-0804-sax_p.html , you won't
find this link in the first 50.


Santosh

===
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: Help! XML intergration!

2000-08-04 Thread Daryani Santosh

I am doing something similar to your requirement.

I know of 2 possible ways

If either of the 2 sites has an FTP server , the XML file can be stored on the
FTP directory and your java client application
can retrieve the file from the FTP site.(using net.FTPClient class)

The other option is to upload the xml file via a HTTP post using a file
uploadservlet and then have your application get that file.

Make a url connection
URl url = new URl("otherserver/xml_folder/xml_filename")
URlConnection urlC= url.openConnection();

InputStream is = url.openStream()

FileOutputStream fos = new("yourserver/xml_directory/xml_filename")

int xmlchar;

while ( (xmlchar=is.read()) != -1 )
{
 fos.write(xmlchar);
}
is.close
fos.close;

hope this gives you some direction
Santosh






Howard Lee <[EMAIL PROTECTED]> on 08/04/2000 01:12:30 PM

Please respond to A mailing list about Java Server Pages specification and
  reference <[EMAIL PROTECTED]>

To:   [EMAIL PROTECTED]
cc:(bcc: Santosh Daryani/IT/Aon Consulting)

Subject:  Help! XML intergration!



Hi folks,

Maybe some of you have done this before and shed some light on me. We have a
third party vendor who is working on web pages which basically collect
information and turn it into XML and wants to give it to us (they are on a
separate web server). Our environment is EJB/JSP/Servlet, and my question is
how should I receive that XML file? I thought about them passing me URI of
the XML file and from that URI I go grab the XML file, but I thought it
could get messy (cleaning up old XML files etc). Any idea how I should
approach this? What would be the best approach to this? Thank you very much
folks!

===
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: How can I schedule a Job in JSP or servlet...

2000-08-02 Thread Daryani Santosh

I had to do a similar kind of operation which involved running a JSP or servlet
at midnight everyday , i could'nt figure out a simpler way to do , so I ended up
converting the JSP to a stand alone JAVA application , since the process did not
involve human intervention it was ok to convert all the functionality into a
java app , without losing anything.
I then configured the NT scheduler to run the java app at a specified time
with the needed arguments. The java app produced a log file that can be stored
at a specific location so that its available on the net , doing so enables any
other person or dependent application to share the output.

Santosh






Richard Yee <[EMAIL PROTECTED]> on 08/02/2000 09:53:52 AM

Please respond to A mailing list about Java Server Pages specification and
  reference <[EMAIL PROTECTED]>

To:   [EMAIL PROTECTED]
cc:(bcc: Santosh Daryani/IT/Aon Consulting)

Subject:  Re: How can I schedule a Job in JSP or servlet...



Krishnan,
   Why don't you just convert the servlet into a Java application and set up
a cron job (Unix) to run it at the appropriate time?

-Richard


-Original Message-
From: Krishnan [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, August 02, 2000 5:31 AM
To: [EMAIL PROTECTED]
Subject: How can I schedule a Job in JSP or servlet...


Hi pals,
We have to run a servlet or JSP automatically on saturday night at 12. We
are planning to write a servlet and in the init method of that servlet,
planning to invoke a thread which checks for the specified time and if
satisfies, do the necessary operations. We will load that servlet at startup
of the server. I want to know, is there is any other possible way of
achieving the same.
Your replies are highly appreciated.

rgds
krishnan

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

===
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: error 404 when I run my own JSP

2000-08-01 Thread Daryani Santosh

Possible causes

 1 Check the name of the servlet you are trying to serve , it is case sensitive
, you may have a typo
 2 Sometimes you have to restart the JSWDK server after your servlet generated
errors
 3 Verify if you are calling any page within your main page and its
availablility

These may not necessarily be the causes , but you can try

Santosh






Wei Qin <[EMAIL PROTECTED]> on 08/01/2000 01:16:26 PM

Please respond to A mailing list about Java Server Pages specification and
  reference <[EMAIL PROTECTED]>

To:   [EMAIL PROTECTED]
cc:(bcc: Santosh Daryani/IT/Aon Consulting)

Subject:  Re: error 404 when I run my own JSP



Hello,

I installed JDK 1.2.2 and JSWDK , and now I can run examples in JSWDK. =
But when I put my own JSP files in /examples/jsp, either directly or in =
their own subdirectory, I got 404 error(The page cannot be found)

Can some one can tell me what the reason is?=20

Thanks a lot.

===
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: Corba and JSP integration

2000-08-01 Thread Daryani Santosh

It can be done using different techniques , from JSP directly or through a bean

Here is some sample code that implements direct calling of corba components from
JSP

Replace all the variables marked ._x with your appropriate names

Santosh

<%@page import="org.omg.CORBA.ORB"%>
<%@page import="org.omg.CosNaming.NamingContext"%>
<%@page import="org.omg.CosNaming.NamingContextHelper"%>
<%@page import="org.omg.CosNaming.NameComponent"%>
<%@page import="package_x.*"%>


Calling Corba Components from JSP

 <%

  java.util.Properties props = new java.util.Properties();
  props.put("org.omg.CORBA.ORBClass","com.sybase.CORBA.ORB");
  props.put("com.sybase.CORBA.NameServiceURL","iiop://server_x:port_x");
  ORB orb = ORB.init((String[]) null, props);

  String returnvalue_x = new String("");
  component_x iJagComponent=null;

  try {


 NamingContext context = NamingContextHelper.narrow(
orb.resolve_initial_references("NameService"));


 NameComponent[] name = { new NameComponent("package_x/component_x","") };

 SessionManager.Factory factory =
SessionManager.FactoryHelper.narrow(context.resolve(name));

 iJagComponent =
component_xHelper.narrow(factory.create("user_x","password_x"));

 }//end of try block

  catch (org.omg.CORBA.ORBPackage.InvalidName aException)  {   }
  catch (org.omg.CosNaming.NamingContextPackage.NotFound aException) {
}
  catch (org.omg.CosNaming.NamingContextPackage.CannotProceed aException)  {
 }
  catch (org.omg.CosNaming.NamingContextPackage.InvalidName aException)  {
}
   try
 {
  returnvalue_x = iJagComponent.methodname_x();
  out.print(returnvalue_x);
 }
  catch (Exception aException)
  {
  out.print(aException.getMessage());
  }

  %>












Karanjit Singh <[EMAIL PROTECTED]> on 08/01/2000 10:50:39 AM

Please respond to A mailing list about Java Server Pages specification and
  reference <[EMAIL PROTECTED]>

To:   [EMAIL PROTECTED]
cc:(bcc: Santosh Daryani/IT/Aon Consulting)

Subject:  Corba and JSP integration



Dear Members,
  Iam goin to work on accessing database thru corba objects from my jsp
pages, if anyone has worked on this then pls put some light on this. I mean
to say where should i took connection, in some bean or in jsp page itself ?
Thx in advance,
Karan



Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.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: Proprtionate String Padding

2000-07-28 Thread Daryani Santosh

Try this
{

String desiredstring ="", string1 ="";
string1="column_name";
desiredstring = string1;

if ( string1.length() != 35 )
{
desiredstring = string1 + "00";
desiredstring = desiredstring.substring(0,35);
System.out.println("Desired String Length is "+desiredstring.length()+"
"+desiredstring);
}

If this looks OK to you , replace zeroes with equal number of spaces

Hope this helps
Santosh








B R Nair <[EMAIL PROTECTED]> on 07/28/2000 09:26:13 AM

Please respond to A mailing list about Java Server Pages specification and
  reference <[EMAIL PROTECTED]>

To:   [EMAIL PROTECTED]
cc:(bcc: Santosh Daryani/IT/Aon Consulting)

Subject:  Proprtionate String Padding



Hello,

How can I pad a string with variable spaces?


When I query a database, the columns I get are not of fixed length. I would
like to make it uniform length. Is there any short cut to add spaces at the
end of a string? In other words can anyone give me the Java equivalent to
this pseudo code?

desiredString = string1 +  (35 - string1.length()) spaces.

Thanks in advance
BRN

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



  1   2   >