Re: How to avoid entire directory tree display

2002-07-23 Thread Vikramjit Singh

When a request URI refers to a directory, the default servlet looks for a
"welcome file" within that directory and, if present, to the corresponding
resource URI for display.  If no welcome file is present, the default
servlet either serves a directory listing, or returns a 404 status,
depending on how it is configured.
If you define welcome files in your own application's web.xml deployment
descriptor, that list *replaces* the list configured here, so be sure that
you include any of the default values that you wish to include.

In your context's web.xml make the listings to false.


listings
false


by default it is true. Full example.


default

  com.DefaultServlet


listings
true

1



Regards,
Vikram.


-Original Message-
From: Bhushan_Bhangale [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 23, 2002 4:55 AM
To: [EMAIL PROTECTED]
Subject: Re: How to avoid entire directory tree display


Some where in your app server you need to stop directory browsing.

-Original Message-
From: Arunkumar_N [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 23, 2002 4:55 PM
To: [EMAIL PROTECTED]
Subject: How to avoid entire directory tree display


Hello,
In one of my portal development application,I am making use of
websphere.
if I type in the browser the IP address for
Ex: xxx.xx.xx.xxx,it goes to the root of the HTTP server where
we can browse the entire directory tree.

How to avoid this problem.

Thanks & Regards
Arun

> -
**
This email (including any attachments) is intended for the sole use of the
intended recipient/s and may contain material that is CONFIDENTIAL AND
PRIVATE COMPANY INFORMATION. Any review or reliance by others or copying or
distribution or forwarding of any or all of the contents in this message is
STRICTLY PROHIBITED. If you are not the intended recipient, please contact
the sender by email and delete all copies; your cooperation in this regard
is appreciated.
**

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

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

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

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

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

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



Re: JavaMail in servlet 2

2002-07-23 Thread Ritesh Gupta

Hi Taro,

In your servlet code you are calling :

String content =  req.getParameter("content");

However, from what I gather, you are calling this servlet
directly. Therefore, the poor mailer does not get anything
from the request object.

Try replacing it with some static text like :

String content = "This is the text to be sent";

If the host name and other values that you have specified
are correct, you should be able to send your mail.

Regards,
Ritesh

- Original Message -
From: Taro Kondo <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, July 24, 2002 9:42 AM
Subject: Re: JavaMail in servlet 2


Hi Ritesh and everyone else who knows about JavaMail,

I've tried pretty much everything to get my code to work, but even with the
successful compiration, the page doesn't work at all. Instead, I get an
internal error shown in below. Is there anything I can do?


Taro


--
Error: 500
Location: /taiken/servlet/SendMail
Internal Servlet Error:

java.lang.NullPointerException
at com.sun.mail.handlers.text_plain.writeTo(text_plain.java:98)
at
javax.activation.ObjectDataContentHandler.writeTo(DataHandler.java:839)
at javax.activation.DataHandler.writeTo(DataHandler.java:295)
at javax.mail.internet.MimeUtility.getEncoding(MimeUtility.java:222)
at
javax.mail.internet.MimeBodyPart.updateHeaders(MimeBodyPart.java:1065)
at
javax.mail.internet.MimeMessage.updateHeaders(MimeMessage.java:1914)
at
javax.mail.internet.MimeMessage.saveChanges(MimeMessage.java:1895)
at javax.mail.Transport.send(Transport.java:79)
at SendMail.doGet(SendMail.java:53)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405)
at org.apache.tomcat.core.Handler.service(Handler.java:287)
at
org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
at
org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:81
2)
at
org.apache.tomcat.core.ContextManager.service(ContextManager.java:758)
at
org.apache.tomcat.service.connector.Ajp12ConnectionHandler.processConnection
(Ajp12ConnectionHandler.java:166)
at
org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
at
org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:501)
at java.lang.Thread.run(Thread.java:484)

-Original Message-
From: Ritesh Gupta [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 23, 2002 4:44 PM
To: [EMAIL PROTECTED]
Subject: Re: JavaMail in servlet 2


Hi Taro,

I tried your code with the doGet method, that is the only change I
made. As far as html tags are concerned, you should get an output
even if they are not corrected. I got some runtime Exception while
execution of your java code in the servlet.

The only other issue I could find (which would have been found
when you compiled the servlet) was the first line :

iimport java.io.*;

There is a typo here with the import statement.

Ensure that your servlet is properly re-compiled and replaces your
earlier servlet.

To ensure whether any servlet is getting called at all you could
try with another sample Servlet. Maybe the foll :

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

public class test extends HttpServlet {
public void doPost(HttpServletRequest req,HttpServletResponse res)
throws ServletException,IOException {
res.setContentType("text/html; charset=\"iso-2022-jp\"");
PrintWriter out = res.getWriter();
out.println("Ritesh is mad");
out.close();
}
public void doGet(HttpServletRequest req,HttpServletResponse res)
throws ServletException,IOException {
res.setContentType("text/html; charset=\"iso-2022-jp\"");
PrintWriter out = res.getWriter();
out.println("Ritesh is totally insane");
out.close();
}
}


Regards,
Ritesh

- Original Message -
From: Taro Kondo <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, July 23, 2002 12:56 PM
Subject: Re: JavaMail in servlet 2


Thank you both of you!

However, with the two corrections, the page in the browser still says, "Page
cannot be found". Why is that?

What I have changes is replace Post with Get, but is there anything else to
do beside that?
Please let me know.
Taro


public class SendMail extends HttpServlet {
public void doGet(HttpServletRequest req,HttpServletResponse res)
throws ServletException,IOException {

-Original Message-
From: Ritesh Gupta [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 23, 2002 4:10 PM
To: [EMAIL PROTECTED]
Subject: Re: JavaMail in servlet 2


Hi Taro,


Re: JavaMail in servlet 2

2002-07-23 Thread 崔 建偉

can you show your code here?
- Original Message -
From: "Taro Kondo" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, July 24, 2002 1:12 PM
Subject: Re: JavaMail in servlet 2


> Hi Ritesh and everyone else who knows about JavaMail,
>
> I've tried pretty much everything to get my code to work, but even with
the
> successful compiration, the page doesn't work at all. Instead, I get an
> internal error shown in below. Is there anything I can do?
>
>
> Taro
>
>
> --
> Error: 500
> Location: /taiken/servlet/SendMail
> Internal Servlet Error:
>
> java.lang.NullPointerException
> at com.sun.mail.handlers.text_plain.writeTo(text_plain.java:98)
> at
> javax.activation.ObjectDataContentHandler.writeTo(DataHandler.java:839)
> at javax.activation.DataHandler.writeTo(DataHandler.java:295)
> at
javax.mail.internet.MimeUtility.getEncoding(MimeUtility.java:222)
> at
> javax.mail.internet.MimeBodyPart.updateHeaders(MimeBodyPart.java:1065)
> at
> javax.mail.internet.MimeMessage.updateHeaders(MimeMessage.java:1914)
> at
> javax.mail.internet.MimeMessage.saveChanges(MimeMessage.java:1895)
> at javax.mail.Transport.send(Transport.java:79)
> at SendMail.doGet(SendMail.java:53)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> at
> org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405)
> at org.apache.tomcat.core.Handler.service(Handler.java:287)
> at
> org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
> at
>
org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:81
> 2)
> at
> org.apache.tomcat.core.ContextManager.service(ContextManager.java:758)
> at
>
org.apache.tomcat.service.connector.Ajp12ConnectionHandler.processConnection
> (Ajp12ConnectionHandler.java:166)
> at
> org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
> at
> org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:501)
> at java.lang.Thread.run(Thread.java:484)
>
> -Original Message-
> From: Ritesh Gupta [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, July 23, 2002 4:44 PM
> To: [EMAIL PROTECTED]
> Subject: Re: JavaMail in servlet 2
>
>
> Hi Taro,
>
> I tried your code with the doGet method, that is the only change I
> made. As far as html tags are concerned, you should get an output
> even if they are not corrected. I got some runtime Exception while
> execution of your java code in the servlet.
>
> The only other issue I could find (which would have been found
> when you compiled the servlet) was the first line :
>
> iimport java.io.*;
>
> There is a typo here with the import statement.
>
> Ensure that your servlet is properly re-compiled and replaces your
> earlier servlet.
>
> To ensure whether any servlet is getting called at all you could
> try with another sample Servlet. Maybe the foll :
>
> import java.io.*;
> import javax.servlet.*;
> import javax.servlet.http.*;
>
> public class test extends HttpServlet {
> public void doPost(HttpServletRequest req,HttpServletResponse res)
> throws ServletException,IOException {
> res.setContentType("text/html; charset=\"iso-2022-jp\"");
> PrintWriter out = res.getWriter();
> out.println("Ritesh is mad");
> out.close();
> }
> public void doGet(HttpServletRequest req,HttpServletResponse res)
> throws ServletException,IOException {
> res.setContentType("text/html; charset=\"iso-2022-jp\"");
> PrintWriter out = res.getWriter();
> out.println("Ritesh is totally insane");
> out.close();
> }
> }
>
>
> Regards,
> Ritesh
>
> - Original Message -
> From: Taro Kondo <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Tuesday, July 23, 2002 12:56 PM
> Subject: Re: JavaMail in servlet 2
>
>
> Thank you both of you!
>
> However, with the two corrections, the page in the browser still says,
"Page
> cannot be found". Why is that?
>
> What I have changes is replace Post with Get, but is there anything else
to
> do beside that?
> Please let me know.
> Taro
>
>
> public class SendMail extends HttpServlet {
> public void doGet(HttpServletRequest req,HttpServletResponse res)
> throws ServletException,IOException {
>
> -Original Message-
> From: Ritesh Gupta [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, July 23, 2002 4:10 PM
> To: [EMAIL PROTECTED]
> Subject: Re: JavaMail in servlet 2
>
>
> Hi Taro,
>
> By default the request that goes to the servlet when you invoke
> it from the browser is GET. Modify (or add) your code to the
> doGet method and try.
> Hope that helps.
>
> Regards,
> Ritesh
> -

Re: JavaMail in servlet 2

2002-07-23 Thread Taro Kondo

Hi Ritesh and everyone else who knows about JavaMail,

I've tried pretty much everything to get my code to work, but even with the
successful compiration, the page doesn't work at all. Instead, I get an
internal error shown in below. Is there anything I can do?


Taro


--
Error: 500
Location: /taiken/servlet/SendMail
Internal Servlet Error:

java.lang.NullPointerException
at com.sun.mail.handlers.text_plain.writeTo(text_plain.java:98)
at
javax.activation.ObjectDataContentHandler.writeTo(DataHandler.java:839)
at javax.activation.DataHandler.writeTo(DataHandler.java:295)
at javax.mail.internet.MimeUtility.getEncoding(MimeUtility.java:222)
at
javax.mail.internet.MimeBodyPart.updateHeaders(MimeBodyPart.java:1065)
at
javax.mail.internet.MimeMessage.updateHeaders(MimeMessage.java:1914)
at
javax.mail.internet.MimeMessage.saveChanges(MimeMessage.java:1895)
at javax.mail.Transport.send(Transport.java:79)
at SendMail.doGet(SendMail.java:53)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405)
at org.apache.tomcat.core.Handler.service(Handler.java:287)
at
org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
at
org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:81
2)
at
org.apache.tomcat.core.ContextManager.service(ContextManager.java:758)
at
org.apache.tomcat.service.connector.Ajp12ConnectionHandler.processConnection
(Ajp12ConnectionHandler.java:166)
at
org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
at
org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:501)
at java.lang.Thread.run(Thread.java:484)

-Original Message-
From: Ritesh Gupta [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 23, 2002 4:44 PM
To: [EMAIL PROTECTED]
Subject: Re: JavaMail in servlet 2


Hi Taro,

I tried your code with the doGet method, that is the only change I
made. As far as html tags are concerned, you should get an output
even if they are not corrected. I got some runtime Exception while
execution of your java code in the servlet.

The only other issue I could find (which would have been found
when you compiled the servlet) was the first line :

iimport java.io.*;

There is a typo here with the import statement.

Ensure that your servlet is properly re-compiled and replaces your
earlier servlet.

To ensure whether any servlet is getting called at all you could
try with another sample Servlet. Maybe the foll :

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

public class test extends HttpServlet {
public void doPost(HttpServletRequest req,HttpServletResponse res)
throws ServletException,IOException {
res.setContentType("text/html; charset=\"iso-2022-jp\"");
PrintWriter out = res.getWriter();
out.println("Ritesh is mad");
out.close();
}
public void doGet(HttpServletRequest req,HttpServletResponse res)
throws ServletException,IOException {
res.setContentType("text/html; charset=\"iso-2022-jp\"");
PrintWriter out = res.getWriter();
out.println("Ritesh is totally insane");
out.close();
}
}


Regards,
Ritesh

- Original Message -
From: Taro Kondo <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, July 23, 2002 12:56 PM
Subject: Re: JavaMail in servlet 2


Thank you both of you!

However, with the two corrections, the page in the browser still says, "Page
cannot be found". Why is that?

What I have changes is replace Post with Get, but is there anything else to
do beside that?
Please let me know.
Taro


public class SendMail extends HttpServlet {
public void doGet(HttpServletRequest req,HttpServletResponse res)
throws ServletException,IOException {

-Original Message-
From: Ritesh Gupta [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 23, 2002 4:10 PM
To: [EMAIL PROTECTED]
Subject: Re: JavaMail in servlet 2


Hi Taro,

By default the request that goes to the servlet when you invoke
it from the browser is GET. Modify (or add) your code to the
doGet method and try.
Hope that helps.

Regards,
Ritesh
- Original Message -
From: Taro Kondo <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, July 23, 2002 12:21 PM
Subject: JavaMail in servlet 2


I have a question in JavaMail.

I don't know why the page generated by servlet doesn't even show up even the
java file was compiled successfully. I mean even though JavaMail function
doesn't work properly, at lease the html part should show up in the page...
Does anyone know why it doesn

Re: Form Processing

2002-07-23 Thread Erwin Dwight V. Ruiz

thanks it is now working. i'm really new to java
and i'm only familiar with C. that's the reason
why i still copied the values of the array and
not simply equate it. anyway thanks again for
your help.

On Tue, 23 Jul 2002, Hans Bergsten wrote:

> Erwin Dwight V. Ruiz wrote:
> > thanks for the reply but i still have one more problem.
> > i tried to set as what you've said as a
> > String array but the values that i retrieved was null.
> > here is my code:
> >
> > public void setName(String[] values){
> >   String[] name=new String[values.length];
> >   for(int i=0;i >  name[i]=values[i];
> >   }
> > }
> >
> > public String[] getName(){ return name; }
> >
> > thanks. :)
>
> First, there's no need to copy the array like you do in setName().
> Second, you assign the value to a local variable named "name" in
> setName() but you return the value of a variable named "name"
> declared somewhere else in getName(). That's why it's empty; you
> never set it. Try this instead:
>
>public class MyBean {
>  private String[] name;
>  public void setName(String[] value) {
>name = value;
>  }
>  public String[] getName() {
>return name;
>  }
>}
>
> Hans
>
> > On Tue, 23 Jul 2002, Hans Bergsten wrote:
> >
> >
> >>Erwin Dwight V. Ruiz wrote:
> >>
> >>>Hello I'm new to jsp and i'd like to know
> >>>how multiple text boxes or form elements
> >>>with the same name can be processed in a
> >>>jsp application. if the names of the form elements
> >>>are unique you could easily map the elements to a
> >>>java bean through accessor and setter methods. what
> >>>happens if the form elements name are not
> >>>unique can we still map the elements to a
> >>>java bean? if possible how do i do it?
> >>
> >>You can capture them in a bean with a setter method that takes an
> >>array:
> >>
> >>   setMyProperty(String[] values)
> >>
> >>Hans
> >>--
> >>Hans Bergsten   [EMAIL PROTECTED]
> >>Gefion Software http://www.gefionsoftware.com
> >>JavaServer Pageshttp://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://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
> >
>
>
> --
> Hans Bergsten   [EMAIL PROTECTED]
> Gefion Software http://www.gefionsoftware.com
> JavaServer Pageshttp://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://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: Form Processing

2002-07-23 Thread 崔 建偉

you can.t definite String[] name in the method setName
it.s local variable.

- Original Message -
From: "Erwin Dwight V. Ruiz" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, July 24, 2002 10:53 AM
Subject: Re: Form Processing


> thanks for the reply but i still have one more problem.
> i tried to set as what you've said as a
> String array but the values that i retrieved was null.
> here is my code:
>
> public void setName(String[] values){
>   String[] name=new String[values.length];
>   for(int i=0;i  name[i]=values[i];
>   }
> }
>
> public String[] getName(){ return name; }
>
> thanks. :)
>
> On Tue, 23 Jul 2002, Hans Bergsten wrote:
>
> > Erwin Dwight V. Ruiz wrote:
> > > Hello I'm new to jsp and i'd like to know
> > > how multiple text boxes or form elements
> > > with the same name can be processed in a
> > > jsp application. if the names of the form elements
> > > are unique you could easily map the elements to a
> > > java bean through accessor and setter methods. what
> > > happens if the form elements name are not
> > > unique can we still map the elements to a
> > > java bean? if possible how do i do it?
> >
> > You can capture them in a bean with a setter method that takes an
> > array:
> >
> >setMyProperty(String[] values)
> >
> > Hans
> > --
> > Hans Bergsten   [EMAIL PROTECTED]
> > Gefion Software http://www.gefionsoftware.com
> > JavaServer Pageshttp://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://archives.java.sun.com/jsp-interest.html
> >  http://java.sun.com/products/jsp/faq.html
> >  http://www.esperanto.org.nz/jsp/jspfaq.jsp
> >  http://www.jguru.com/faq/index.jsp
> >  http://www.jspinsider.com
> >
>
> --
>
>
===
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
> For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
DIGEST".
> Some relevant FAQs on JSP/Servlets can be found at:
>
>  http://archives.java.sun.com/jsp-interest.html
>  http://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.jsp
>  http://www.jguru.com/faq/index.jsp
>  http://www.jspinsider.com
>

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

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



Re: Form Processing

2002-07-23 Thread Hans Bergsten

Erwin Dwight V. Ruiz wrote:
> thanks for the reply but i still have one more problem.
> i tried to set as what you've said as a
> String array but the values that i retrieved was null.
> here is my code:
>
> public void setName(String[] values){
>   String[] name=new String[values.length];
>   for(int i=0;i  name[i]=values[i];
>   }
> }
>
> public String[] getName(){ return name; }
>
> thanks. :)

First, there's no need to copy the array like you do in setName().
Second, you assign the value to a local variable named "name" in
setName() but you return the value of a variable named "name"
declared somewhere else in getName(). That's why it's empty; you
never set it. Try this instead:

   public class MyBean {
 private String[] name;
 public void setName(String[] value) {
   name = value;
 }
 public String[] getName() {
   return name;
 }
   }

Hans

> On Tue, 23 Jul 2002, Hans Bergsten wrote:
>
>
>>Erwin Dwight V. Ruiz wrote:
>>
>>>Hello I'm new to jsp and i'd like to know
>>>how multiple text boxes or form elements
>>>with the same name can be processed in a
>>>jsp application. if the names of the form elements
>>>are unique you could easily map the elements to a
>>>java bean through accessor and setter methods. what
>>>happens if the form elements name are not
>>>unique can we still map the elements to a
>>>java bean? if possible how do i do it?
>>
>>You can capture them in a bean with a setter method that takes an
>>array:
>>
>>   setMyProperty(String[] values)
>>
>>Hans
>>--
>>Hans Bergsten   [EMAIL PROTECTED]
>>Gefion Software http://www.gefionsoftware.com
>>JavaServer Pageshttp://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://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
>


--
Hans Bergsten   [EMAIL PROTECTED]
Gefion Software http://www.gefionsoftware.com
JavaServer Pageshttp://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://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: Form Processing

2002-07-23 Thread Erwin Dwight V. Ruiz

thanks for the reply but i still have one more problem.
i tried to set as what you've said as a
String array but the values that i retrieved was null.
here is my code:

public void setName(String[] values){
  String[] name=new String[values.length];
  for(int i=0;i Erwin Dwight V. Ruiz wrote:
> > Hello I'm new to jsp and i'd like to know
> > how multiple text boxes or form elements
> > with the same name can be processed in a
> > jsp application. if the names of the form elements
> > are unique you could easily map the elements to a
> > java bean through accessor and setter methods. what
> > happens if the form elements name are not
> > unique can we still map the elements to a
> > java bean? if possible how do i do it?
>
> You can capture them in a bean with a setter method that takes an
> array:
>
>setMyProperty(String[] values)
>
> Hans
> --
> Hans Bergsten   [EMAIL PROTECTED]
> Gefion Software http://www.gefionsoftware.com
> JavaServer Pageshttp://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://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



Announce: JSTL (Standard Tags) + Struts (MVC) live web Demo (open source)

2002-07-23 Thread Vic C.

If you are starting a Java Web, you should use MVC and Standard tags,
this "kit" is a sample of "best" (at least good) practices.

It is MVC (Struts/Tiles)+JSTL +XSLT+ DAO (Open Source Data Access Object
w/ SQL) + DB CRUD (Create update delete and SQL DLL scripts)+ J2EE
Security ( to make Tomcat run like Apache )

It is KISS (you'll see how simple and how very standard) , good
practices Free Open Source Framework to develop any web app, with the
aim of being 80% of any app, but done as simple as possible and easy to
teach. Again, everything is standard and simple. And it is the fastest,
most efficient way to develop maintainable code I know of.

Samples include CMS (Authorize content, XSLT, CMS Comments, sinkable,
single sign on, etc.),  Issue tracking, + more coming.

Please download and install and see if you want to attend. Details:
http://basicportal.sourceforge.net

I use it to teach Struts + JSTL public and private classes. I epically
teach WHY you should want to do something in a certain way, not just how.

To attend and see "best practices"
http://www.basebeans.com/webEx.jsp
The seminar requires you know servlets, jsp,  SQL, JDBC, and at least
some MVC. (a plus is if you have already deployed and MVC web app in the
past) Oh...it is $10.00 ( but free to baseBeans clients and/or apache.org
committers.)

To keep in touch on this join "MVC-Programmers" mail list at
http://www.netbean.net/mailman/listinfo/mvc-programmers

To keep in touch with open source projects go to
http://news.netbean.net/cgi-bin/webnews.cgi

Future plans include more docs, Dream weaver support,  mail client, RSS
feeds, BLOG, Shopping Cart Store, etc. etc.

Did I say everything is standard and as simple as possible?

Vic

"Always code to the least amount of astonishment"
-
Elements of Java Style

"If you want to build a ship, do not order your men to gather wood and
nails, but teach them to yearn for the open sea"

===
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: Form Processing

2002-07-23 Thread Hans Bergsten

Erwin Dwight V. Ruiz wrote:
> Hello I'm new to jsp and i'd like to know
> how multiple text boxes or form elements
> with the same name can be processed in a
> jsp application. if the names of the form elements
> are unique you could easily map the elements to a
> java bean through accessor and setter methods. what
> happens if the form elements name are not
> unique can we still map the elements to a
> java bean? if possible how do i do it?

You can capture them in a bean with a setter method that takes an
array:

   setMyProperty(String[] values)

Hans
--
Hans Bergsten   [EMAIL PROTECTED]
Gefion Software http://www.gefionsoftware.com
JavaServer Pageshttp://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://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: How to avoid entire directory tree display

2002-07-23 Thread sreenath.v

keep one index.html in the root it will solve ur problems!
- Original Message -
From: "Arunkumar_N" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, July 23, 2002 4:54 PM
Subject: How to avoid entire directory tree display


> Hello,
> In one of my portal development application,I am making use of
> websphere.
> if I type in the browser the IP address for
> Ex: xxx.xx.xx.xxx,it goes to the root of the HTTP server where
> we can browse the entire directory tree.
>
> How to avoid this problem.
>
> Thanks & Regards
> Arun
>
> > -
> **
> This email (including any attachments) is intended for the sole use of the
> intended recipient/s and may contain material that is CONFIDENTIAL AND
> PRIVATE COMPANY INFORMATION. Any review or reliance by others or copying
or
> distribution or forwarding of any or all of the contents in this message
is
> STRICTLY PROHIBITED. If you are not the intended recipient, please contact
> the sender by email and delete all copies; your cooperation in this regard
> is appreciated.
> **
>
>
===
> 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



**Disclaimer**

 Information contained in this E-MAIL being proprietary to Wipro Limited is 
'privileged'
and 'confidential' and intended for use only by the individual or entity to which it is
addressed. You are notified that any use, copying or dissemination of the information
contained in the E-MAIL in any manner whatsoever is strictly prohibited.





Re: How to avoid entire directory tree display

2002-07-23 Thread Bhushan_Bhangale

Some where in your app server you need to stop directory browsing.

-Original Message-
From: Arunkumar_N [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 23, 2002 4:55 PM
To: [EMAIL PROTECTED]
Subject: How to avoid entire directory tree display


Hello,
In one of my portal development application,I am making use of
websphere.
if I type in the browser the IP address for
Ex: xxx.xx.xx.xxx,it goes to the root of the HTTP server where
we can browse the entire directory tree.

How to avoid this problem.

Thanks & Regards
Arun

> -
**
This email (including any attachments) is intended for the sole use of the
intended recipient/s and may contain material that is CONFIDENTIAL AND
PRIVATE COMPANY INFORMATION. Any review or reliance by others or copying or
distribution or forwarding of any or all of the contents in this message is
STRICTLY PROHIBITED. If you are not the intended recipient, please contact
the sender by email and delete all copies; your cooperation in this regard
is appreciated.
**

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



How to avoid entire directory tree display

2002-07-23 Thread Arunkumar_N

Hello,
In one of my portal development application,I am making use of
websphere.
if I type in the browser the IP address for
Ex: xxx.xx.xx.xxx,it goes to the root of the HTTP server where
we can browse the entire directory tree.

How to avoid this problem.

Thanks & Regards
Arun

> -
**
This email (including any attachments) is intended for the sole use of the
intended recipient/s and may contain material that is CONFIDENTIAL AND
PRIVATE COMPANY INFORMATION. Any review or reliance by others or copying or
distribution or forwarding of any or all of the contents in this message is
STRICTLY PROHIBITED. If you are not the intended recipient, please contact
the sender by email and delete all copies; your cooperation in this regard
is appreciated.
**

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



Form Processing

2002-07-23 Thread Erwin Dwight V. Ruiz

Hello I'm new to jsp and i'd like to know
how multiple text boxes or form elements
with the same name can be processed in a
jsp application. if the names of the form elements
are unique you could easily map the elements to a
java bean through accessor and setter methods. what
happens if the form elements name are not
unique can we still map the elements to a
java bean? if possible how do i do it?

thanks.

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

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



Re: jdbc url for sqlServer

2002-07-23 Thread Shahata, Ash

Thanks... this is the one I was looking for, it's the opta2000 driver
specific.

cheers

-Original Message-
From: Ritesh Gupta [mailto:[EMAIL PROTECTED]]
Sent: 23 July 2001 09:54
To: [EMAIL PROTECTED]
Subject: Re: jdbc url for sqlServer


Hi Ash,

For OPTA the :

URL : jdbc:inetdae7:localhost:1433:Database=pramati
replace database with the one that you want to connect to.

Driver Class : com.inet.tds.TdsDriver

If you create a DSN in your machine, you can also connect using
the SUNs JDBC-ODBC bridge driver as suggested by Aruniima.

Regards,
Ritesh

- Original Message -
From: Aruniima Chakrabarti <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, July 23, 2002 2:19 PM
Subject: Re: jdbc url for sqlServer


Jdbc url for MS SQL Server   "jdbc:odbc:DSNname" ...

Regards,
aruniima

 -Original Message-
From:   Shahata, Ash [mailto:[EMAIL PROTECTED]]
Sent:   23 Jul,2002 2:02 PM
To: [EMAIL PROTECTED]
Subject:jdbc url for sqlServer

Hi all,
does anyone know what would the jdbc url value be if I'm using Microsoft Sql
Server? I want to use opta2000 as the jdbc driver. I already have a
connection with mySQL :

try{
Class.forName("org.gjt.mm.mysql.Driver").newInstance();
con = DriverManager.getConnection("jdbc:mysql://localhost/test
?user=name&password=pass");
..
..
}

I want to find out which values would I use with forName and getConnection
if I'm using the opta2000 driver to connect to sql Server?

Thanks
Ash

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

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


This message contains privileged and confidential information and is
intended only for the individual named. If you are not the intended
recepient you should not disseminate, distribute, store, print, copy or
deliver this message. Please notify the sender immediately by e-mail if you
have received this e-mail by mistake and immediately delete this e-mail from
your system.


E-mail transmission cannot be guaranteed to be secure or error-free as
information could be intercepted, corrupted, lost, destroyed, arrive late or
incomplete, or contain viruses. The sender therefore does not accept
liability for any errors or omissions in the contents of this message which
arise as a result of e-mail transmission.  If verification is required
please request a hard-copy version.


--

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

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

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

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

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

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



Re: jdbc url for sqlServer

2002-07-23 Thread Ritesh Gupta

Hi Ash,

For OPTA the :

URL : jdbc:inetdae7:localhost:1433:Database=pramati
replace database with the one that you want to connect to.

Driver Class : com.inet.tds.TdsDriver

If you create a DSN in your machine, you can also connect using
the SUNs JDBC-ODBC bridge driver as suggested by Aruniima.

Regards,
Ritesh

- Original Message -
From: Aruniima Chakrabarti <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, July 23, 2002 2:19 PM
Subject: Re: jdbc url for sqlServer


Jdbc url for MS SQL Server   "jdbc:odbc:DSNname" ...

Regards,
aruniima

 -Original Message-
From:   Shahata, Ash [mailto:[EMAIL PROTECTED]]
Sent:   23 Jul,2002 2:02 PM
To: [EMAIL PROTECTED]
Subject:jdbc url for sqlServer

Hi all,
does anyone know what would the jdbc url value be if I'm using Microsoft Sql
Server? I want to use opta2000 as the jdbc driver. I already have a
connection with mySQL :

try{
Class.forName("org.gjt.mm.mysql.Driver").newInstance();
con = DriverManager.getConnection("jdbc:mysql://localhost/test
?user=name&password=pass");
..
..
}

I want to find out which values would I use with forName and getConnection
if I'm using the opta2000 driver to connect to sql Server?

Thanks
Ash

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

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


This message contains privileged and confidential information and is
intended only for the individual named. If you are not the intended
recepient you should not disseminate, distribute, store, print, copy or
deliver this message. Please notify the sender immediately by e-mail if you
have received this e-mail by mistake and immediately delete this e-mail from
your system.


E-mail transmission cannot be guaranteed to be secure or error-free as
information could be intercepted, corrupted, lost, destroyed, arrive late or
incomplete, or contain viruses. The sender therefore does not accept
liability for any errors or omissions in the contents of this message which
arise as a result of e-mail transmission.  If verification is required
please request a hard-copy version.


--

===
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: Regarding I-Planet

2002-07-23 Thread Bhushan_Bhangale

yaa at least u can start with... after doing this you can read other documents 
which come when u install iPlanet
all the best!!

-Original Message-
From: Vijayanand [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 23, 2002 7:53 AM
To: [EMAIL PROTECTED]
Subject: Re: Regarding I-Planet


thanks,

I will work into it as you said. I think it wil be more helpful for me
to work in I-Planet.

- Original Message -
From: "Bhushan_Bhangale" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, July 23, 2002 4:12 PM
Subject: Re: Regarding I-Planet


> Here is one which I hve made for one training earlier:-
>
> Installation Steps for iPlanet web server
>
> 1.  Pre-requisite JDK 1.2 or higher must be installed on your OS.
> 2.  Start the installation by clicking on iws60sp2-nt.exe file.
> 3.  Select installation type as Custom.
> 4.  The default installation directory will be C:\iPlanet\Servers. If
you want to change, you can but better to keep as it is, only drive should
be changed as per hard disk space.
> 5.  Specify username and password. It can be any, not necessarily of
OS.
> 6.  The default administration port is . If you want you can
change.
> 7.  The default HTTP port is 80. If you want you can change.
> 8.  The default Content Root is C:/iPlanet/Servers/docs. If you want
you can change, but no need to change as Web applications seldom uses it.
> 9.  Enable the Use custom java development kit check box. In JDK home
text field write the JDK home directory path, e.g., C:\ j2sdk1.4.0. Do not
specify anything in other text fields.
> 10. Now installation is complete.
> 11. To test installation, first start iPlanet administration from
program menu or from services. Go to http://localhost: to see the web
server web administration interface.
> 12. Now start the web server either from the Web administration
interface or services. Go to http://localhost, you will see iPlanetTM Web
Server, Enterprise Edition 6.0.
>
> Configuration Steps of Web Application in iPlanet web server
>
> 1.  Suppose IPLANET_HOME=C:\iPlanet\Servers and
HOST_MACHINE=https-PUNHJW13014.ad.infosys.com for my installation.
> 2.  Open \\config\web-apps.xml in notepad
and add  under
 tag.
> 3.  Create a directory C:/Assignment. Create a WEB-INF folder inside.
Now create a classes folder inside WEB-INF folder.
> 4.  Create web.xml file under WEB-INF folder. Here is an example of a
web.xml file.
>
> 
>  PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"
> "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd";>
> 
> 
> 
> StartupServlet
> 
> 
>
in.co.infosys.treasurehunt.common.handler.StartupServlet
> 
> 
> 2147483646
> 
> 
> 
> 
> RegisterServlet
> 
> 
>
in.co.infosys.treasurehunt.hunt.handler.RegisterServlet
> 
> 
>
> 
> 
> RegisterServlet
> 
> 
> /Register
> 
> 
>
> 
> 
> index.html
> 
> 
> 
>
> 5.  All the servlets needs to be registered in web.xml.
> 6.  Following table explains the attributes used in web.xml.
>
> Web.xml attributes  Description
> servlet-class   Fully qualified name of Servlet class
> servlet-nameAny name that you want for this Servlet, but it should be
unique for this web application.
> url-pattern URL pattern to access this Servlet
> welcome-fileFirst file which gets called when you will go to
http://localhost/assignment. It cannot be a Servlet.
> load-on-startup Time in seconds after which the Servlet will get
initialized again. If this attribute is specified with a Servlet it will
always initialize when the server will start. It can be used to start some
services as soon as the server starts.
>
> 7.  Put all your java classes under classes folder which you have
created above.
> 8.  Keep all your JSPs, HTML, Images, etc outside WEB-INF folder.
> 9.  Restart the web server.
> 10. To access your application go to http://localhost/assignment.
>
> -Original Message-
> From: Vijayanand [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, July 23, 2002 5:22 AM
> To: [EMAIL PROTECTED]
> Subject: Regarding I-Planet
>
>
> Hi All,
>
> Iam very new to I-Planet. I have never used it before. Just I wanted
to learn about I-Planet. Can any one send me the documents of how to
configure i-planet, how to run an application in it. It would be very
helpful, if any one can send me those.
>
> thanks in advance,
> vijay
>
> =
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST"

Re: jdbc url for sqlServer

2002-07-23 Thread Daniel

Hi

I think this should work .
I did long before ...,

If you are using the Microsoft driver (i.e.
com.microsoft.jdbc.sqlserver.SQLServerDriver), you'll need to use the
SelectMethod=cursor parameter in the JDBC connection string  Your
databaseUrl would look something like the following:

jdbc:microsoft:sqlserver://localhost:1433;DatabaseName=mydb;SelectMethod
=cursor

Daniel Jayapaul.E

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

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



Re: jdbc url for sqlServer

2002-07-23 Thread Bhushan_Bhangale

Hey Ash,

Check the documentation of the driver which you are using. The url is different for 
different drivers. Below are the two examples which I have used earlier in projects:-

jdbc:microsoft:sqlserver://Simple2SVR:1433 for SQLServerDriver

jdbc:JSQLConnect://Simple2SVR:1433 for JSQLDriver

-Original Message-
From: Shahata, Ash [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 23, 2002 2:02 PM
To: [EMAIL PROTECTED]
Subject: jdbc url for sqlServer


Hi all,
does anyone know what would the jdbc url value be if I'm using Microsoft Sql
Server? I want to use opta2000 as the jdbc driver. I already have a
connection with mySQL :

try{
Class.forName("org.gjt.mm.mysql.Driver").newInstance();
con = DriverManager.getConnection("jdbc:mysql://localhost/test
?user=name&password=pass");
..
..
}

I want to find out which values would I use with forName and getConnection
if I'm using the opta2000 driver to connect to sql Server?

Thanks
Ash

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

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

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

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



Re: jdbc url for sqlServer

2002-07-23 Thread Aruniima Chakrabarti

Jdbc url for MS SQL Server   "jdbc:odbc:DSNname" ...

Regards,
aruniima

 -Original Message-
From:   Shahata, Ash [mailto:[EMAIL PROTECTED]]
Sent:   23 Jul,2002 2:02 PM
To: [EMAIL PROTECTED]
Subject:jdbc url for sqlServer

Hi all,
does anyone know what would the jdbc url value be if I'm using Microsoft Sql
Server? I want to use opta2000 as the jdbc driver. I already have a
connection with mySQL :

try{
Class.forName("org.gjt.mm.mysql.Driver").newInstance();
con = DriverManager.getConnection("jdbc:mysql://localhost/test
?user=name&password=pass");
..
..
}

I want to find out which values would I use with forName and getConnection
if I'm using the opta2000 driver to connect to sql Server?

Thanks
Ash

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

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


This message contains privileged and confidential information and is
intended only for the individual named. If you are not the intended
recepient you should not disseminate, distribute, store, print, copy or
deliver this message. Please notify the sender immediately by e-mail if you
have received this e-mail by mistake and immediately delete this e-mail from
your system.


E-mail transmission cannot be guaranteed to be secure or error-free as
information could be intercepted, corrupted, lost, destroyed, arrive late or
incomplete, or contain viruses. The sender therefore does not accept
liability for any errors or omissions in the contents of this message which
arise as a result of e-mail transmission.  If verification is required
please request a hard-copy version.


--

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



jdbc url for sqlServer

2002-07-23 Thread Shahata, Ash

Hi all,
does anyone know what would the jdbc url value be if I'm using Microsoft Sql
Server? I want to use opta2000 as the jdbc driver. I already have a
connection with mySQL :

try{
Class.forName("org.gjt.mm.mysql.Driver").newInstance();
con = DriverManager.getConnection("jdbc:mysql://localhost/test
?user=name&password=pass");
..
..
}

I want to find out which values would I use with forName and getConnection
if I'm using the opta2000 driver to connect to sql Server?

Thanks
Ash

===
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: JavaMail in servlet 2

2002-07-23 Thread Ritesh Gupta

Hi Taro,

I tried your code with the doGet method, that is the only change I
made. As far as html tags are concerned, you should get an output
even if they are not corrected. I got some runtime Exception while
execution of your java code in the servlet.

The only other issue I could find (which would have been found
when you compiled the servlet) was the first line :

iimport java.io.*;

There is a typo here with the import statement.

Ensure that your servlet is properly re-compiled and replaces your
earlier servlet.

To ensure whether any servlet is getting called at all you could
try with another sample Servlet. Maybe the foll :

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

public class test extends HttpServlet {
public void doPost(HttpServletRequest req,HttpServletResponse res)
throws ServletException,IOException {
res.setContentType("text/html; charset=\"iso-2022-jp\"");
PrintWriter out = res.getWriter();
out.println("Ritesh is mad");
out.close();
}
public void doGet(HttpServletRequest req,HttpServletResponse res)
throws ServletException,IOException {
res.setContentType("text/html; charset=\"iso-2022-jp\"");
PrintWriter out = res.getWriter();
out.println("Ritesh is totally insane");
out.close();
}
}


Regards,
Ritesh

- Original Message -
From: Taro Kondo <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, July 23, 2002 12:56 PM
Subject: Re: JavaMail in servlet 2


Thank you both of you!

However, with the two corrections, the page in the browser still says, "Page
cannot be found". Why is that?

What I have changes is replace Post with Get, but is there anything else to
do beside that?
Please let me know.
Taro


public class SendMail extends HttpServlet {
public void doGet(HttpServletRequest req,HttpServletResponse res)
throws ServletException,IOException {

-Original Message-
From: Ritesh Gupta [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 23, 2002 4:10 PM
To: [EMAIL PROTECTED]
Subject: Re: JavaMail in servlet 2


Hi Taro,

By default the request that goes to the servlet when you invoke
it from the browser is GET. Modify (or add) your code to the
doGet method and try.
Hope that helps.

Regards,
Ritesh
- Original Message -
From: Taro Kondo <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, July 23, 2002 12:21 PM
Subject: JavaMail in servlet 2


I have a question in JavaMail.

I don't know why the page generated by servlet doesn't even show up even the
java file was compiled successfully. I mean even though JavaMail function
doesn't work properly, at lease the html part should show up in the page...
Does anyone know why it doesn't work with this code?

Please help me!

--- Here is the code ---

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


import javax.mail.*;
import javax.mail.internet.*;

public class SendMail extends HttpServlet {
public void doPost(HttpServletRequest req,HttpServletResponse res)
throws ServletException,IOException {


res.setContentType("text/html; charset=\"iso-2022-jp\"");
PrintWriter out = res.getWriter();

out.println("");
out.println("Send Mail");
out.println("");
out.println("Send Mail");
out.println("");

try {
Properties props = new Properties();
props.put("mail.smtp.host","my.mail.server");
props.put("mail.host","my.mail.server");
props.put("mail.user","servbook");
Session session = Session.getInstance(props,null);
MimeMessage msg = new MimeMessage(session);
InternetAddress[] tolist = new InternetAddress[2];

tolist[0] = new InternetAddress("[EMAIL PROTECTED]",

MimeUtility.encodeWord("recipient 1","iso-2022-jp","B"));

tolist[1] = new InternetAddress("[EMAIL PROTECTED]",

MimeUtility.encodeWord("recipient  2","iso-2022-jp","B"));

msg.setRecipients(Message.RecipientType.TO,tolist);

msg.setFrom(new InternetAddress("[EMAIL PROTECTED]",

MimeUtility.encodeWord("sender","iso-2022-jp","B")));

String subject = "sent from servlet";

msg.setSubject(MimeUtility.encodeText(subject,"iso-2022-jp","B"));


String content =  req.getParameter("content");;
msg.setContent(content,"text/plain;
charset=\"iso-2022-jp\"");

Transport.send(msg);

out.println("mail is sent");


out.println("");
ByteArrayOutputStream bos = new ByteArrayOutputStream();
msg.writeTo(bos);
bos.close();
out.pri

Re: JavaMail in servlet 2

2002-07-23 Thread Taro Kondo

Thank you both of you!

However, with the two corrections, the page in the browser still says, "Page
cannot be found". Why is that?

What I have changes is replace Post with Get, but is there anything else to
do beside that?
Please let me know.
Taro


public class SendMail extends HttpServlet {
public void doGet(HttpServletRequest req,HttpServletResponse res)
throws ServletException,IOException {

-Original Message-
From: Ritesh Gupta [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 23, 2002 4:10 PM
To: [EMAIL PROTECTED]
Subject: Re: JavaMail in servlet 2


Hi Taro,

By default the request that goes to the servlet when you invoke
it from the browser is GET. Modify (or add) your code to the
doGet method and try.
Hope that helps.

Regards,
Ritesh
- Original Message -
From: Taro Kondo <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, July 23, 2002 12:21 PM
Subject: JavaMail in servlet 2


I have a question in JavaMail.

I don't know why the page generated by servlet doesn't even show up even the
java file was compiled successfully. I mean even though JavaMail function
doesn't work properly, at lease the html part should show up in the page...
Does anyone know why it doesn't work with this code?

Please help me!

--- Here is the code ---

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


import javax.mail.*;
import javax.mail.internet.*;

public class SendMail extends HttpServlet {
public void doPost(HttpServletRequest req,HttpServletResponse res)
throws ServletException,IOException {


res.setContentType("text/html; charset=\"iso-2022-jp\"");
PrintWriter out = res.getWriter();

out.println("");
out.println("Send Mail");
out.println("");
out.println("Send Mail");
out.println("");

try {
Properties props = new Properties();
props.put("mail.smtp.host","my.mail.server");
props.put("mail.host","my.mail.server");
props.put("mail.user","servbook");
Session session = Session.getInstance(props,null);
MimeMessage msg = new MimeMessage(session);
InternetAddress[] tolist = new InternetAddress[2];

tolist[0] = new InternetAddress("[EMAIL PROTECTED]",

MimeUtility.encodeWord("recipient 1","iso-2022-jp","B"));

tolist[1] = new InternetAddress("[EMAIL PROTECTED]",

MimeUtility.encodeWord("recipient  2","iso-2022-jp","B"));

msg.setRecipients(Message.RecipientType.TO,tolist);

msg.setFrom(new InternetAddress("[EMAIL PROTECTED]",

MimeUtility.encodeWord("sender","iso-2022-jp","B")));

String subject = "sent from servlet";

msg.setSubject(MimeUtility.encodeText(subject,"iso-2022-jp","B"));


String content =  req.getParameter("content");;
msg.setContent(content,"text/plain;
charset=\"iso-2022-jp\"");

Transport.send(msg);

out.println("mail is sent");


out.println("");
ByteArrayOutputStream bos = new ByteArrayOutputStream();
msg.writeTo(bos);
bos.close();
out.println(bos.toString("ISO2022JP"));
out.println("");
} catch (MessagingException ex) {
out.println("fail to send mail");
}
out.println("");
out.close();
}

}




Taro

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

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

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

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

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

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.ht