Re: getString( ) question

2001-05-11 Thread Rishabh Agarwal

Java String can hold upto 255 characters.

Now that is something!
Hope this is a Java mailing list!
Buddy...went thru your replies to other question too.
Wake up pls!!


-Original Message-
From:   Amarnath N [mailto:[EMAIL PROTECTED]]
Sent:   Friday, May 11, 2001 12:10 PM
To: [EMAIL PROTECTED]
Subject:Re: getString( ) question

Java String can hold upto 255 characters.
getString() will return what u r expectingbut u cannot
store in a
string...u can test whether u r getting what u
expectedjust print
getString()...do not assign it to a String var...
- Original Message -
From: Lenin Lopez [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, May 11, 2001 12:33 AM
Subject: getString( ) question


 Hi All,

 I am trying to get a varchar(2000) value from my DB using
a store
prodedure
 I know the store procedure works and returns the value I
am expecting
 However, when I try to retreive the value using
getString(myValue) in
 java,
 the lenght of what I get is less than the actual velue in
the DB,

 am I using the right getXXX method??
 Or is there any other method I can use??



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



response already commited

2001-05-11 Thread Patrick Pierra

Hello,

I' try to create an Object in a JSP :

%
 User tUser = new User();
..
%

When i run this JSP on Tomcat i receive this error message :

Error: 500
Location: /odata1/Registration.jsp
Internal Servlet Error:
java.lang.IllegalStateException: Response has already been committed
   java.lang.Throwable(java.lang.String)
   java.lang.Exception(java.lang.String)
   java.lang.RuntimeException(java.lang.String)
   java.lang.IllegalStateException(java.lang.String)
   void
org.apache.tomcat.core.HttpServletResponseFacade.sendError(int,
java.lang.String)
   void
org.apache.jasper.runtime.JspServlet.unknownException(javax.servlet.http.HttpServletResponse,

java.lang.Throwable)
   void
org.apache.jasper.runtime.JspServlet.service(javax.servlet.http.HttpServletRequest,

javax.servlet.http.HttpServletResponse)
   void
javax.servlet.http.HttpServlet.service(javax.servlet.ServletRequest,
javax.servlet.ServletResponse)
   void
org.apache.tomcat.core.ServletWrapper.handleRequest(org.apache.tomcat.core.Request,

org.apache.tomcat.core.Response)
   void
org.apache.tomcat.core.ContextManager.service(org.apache.tomcat.core.Request,

org.apache.tomcat.core.Response)
   void
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(org.apache.tomcat.service.TcpConnection,

java.lang.Object [])
   void org.apache.tomcat.service.TcpConnectionThread.run()
   void java.lang.Thread.run()


any explication ?

Patrick PIERRA

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



LDAP / TOMCAT / AUTHENTICATION

2001-05-11 Thread Marc J. Boerma

I've build a site where based on the user's role he will see a different
look. I used the standard authentication meganism that's defined in the
Servlet API. Tomcat has a tomcat-users.xml file where you define the users
id, passwords and their roles. I found an article how I can use a database
where I can put this information in. In the server.xml file of tomcat I then
can define that I want to use a database for authentication.

My Question:

I don't want to put userid / password into a database, instead I want Tomcat
to use our LDAP server in order to authenticate users. Where can I find
information about this?

Thanks,

Marc

===
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: response already commited

2001-05-11 Thread Abhishek Sharan

hi,
i think the problem is with your classpath setings.tomcat is not able to
instantiate the object..

 -Original Message-
 From: ext Patrick Pierra [mailto:[EMAIL PROTECTED]]
 Sent: 11. May 2001 12:25
 To: [EMAIL PROTECTED]
 Subject: response already commited


 Hello,

 I' try to create an Object in a JSP :

 %
  User tUser = new User();
 ..
 %

 When i run this JSP on Tomcat i receive this error message :

 Error: 500
 Location: /odata1/Registration.jsp
 Internal Servlet Error:
 java.lang.IllegalStateException: Response has already been committed
java.lang.Throwable(java.lang.String)
java.lang.Exception(java.lang.String)
java.lang.RuntimeException(java.lang.String)
java.lang.IllegalStateException(java.lang.String)
void
 org.apache.tomcat.core.HttpServletResponseFacade.sendError(int,
 java.lang.String)
void
 org.apache.jasper.runtime.JspServlet.unknownException(javax.se
 rvlet.http.HttpServletResponse,

 java.lang.Throwable)
void
 org.apache.jasper.runtime.JspServlet.service(javax.servlet.htt
 p.HttpServletRequest,

 javax.servlet.http.HttpServletResponse)
void
 javax.servlet.http.HttpServlet.service(javax.servlet.ServletRequest,
 javax.servlet.ServletResponse)
void
 org.apache.tomcat.core.ServletWrapper.handleRequest(org.apache
 .tomcat.core.Request,

 org.apache.tomcat.core.Response)
void
 org.apache.tomcat.core.ContextManager.service(org.apache.tomca
 t.core.Request,

 org.apache.tomcat.core.Response)
void
 org.apache.tomcat.service.http.HttpConnectionHandler.processCo
 nnection(org.apache.tomcat.service.TcpConnection,

 java.lang.Object [])
void org.apache.tomcat.service.TcpConnectionThread.run()
void java.lang.Thread.run()


 any explication ?

 Patrick PIERRA

 ==
 =
 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: response already commited

2001-05-11 Thread Sachin S. Khanna

Post the entire code of your jsp.
Its quite possible that the problem code lie somewhere else.

Have a nice day.
With regards,
Sachin S. Khanna
http://www.emailanorder.com
- Original Message -
From: Patrick Pierra [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, May 11, 2001 2:54 PM
Subject: response already commited


 Hello,

 I' try to create an Object in a JSP :

 %
  User tUser = new User();
 ..
 %

 When i run this JSP on Tomcat i receive this error message :

 Error: 500
 Location: /odata1/Registration.jsp
 Internal Servlet Error:
 java.lang.IllegalStateException: Response has already been committed
java.lang.Throwable(java.lang.String)
java.lang.Exception(java.lang.String)
java.lang.RuntimeException(java.lang.String)
java.lang.IllegalStateException(java.lang.String)
void
 org.apache.tomcat.core.HttpServletResponseFacade.sendError(int,
 java.lang.String)
void

org.apache.jasper.runtime.JspServlet.unknownException(javax.servlet.http.Htt
pServletResponse,

 java.lang.Throwable)
void

org.apache.jasper.runtime.JspServlet.service(javax.servlet.http.HttpServletR
equest,

 javax.servlet.http.HttpServletResponse)
void
 javax.servlet.http.HttpServlet.service(javax.servlet.ServletRequest,
 javax.servlet.ServletResponse)
void

org.apache.tomcat.core.ServletWrapper.handleRequest(org.apache.tomcat.core.R
equest,

 org.apache.tomcat.core.Response)
void

org.apache.tomcat.core.ContextManager.service(org.apache.tomcat.core.Request
,

 org.apache.tomcat.core.Response)
void

org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(org.a
pache.tomcat.service.TcpConnection,

 java.lang.Object [])
void org.apache.tomcat.service.TcpConnectionThread.run()
void java.lang.Thread.run()


 any explication ?

 Patrick PIERRA


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



Display a value in the Text Area of JSP Entry form

2001-05-11 Thread Joe / NeoSoft

Hi,
How to assign a value  display it properly in the text area.
Any help on this please
Regards
JOE

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



HELP.. How to Trigger Javascript Onchange Event

2001-05-11 Thread Joe / NeoSoft

Hi,

In an JSP Entry form, for Validating various field values, we are using
ONCHANGE event.
It triggers when we position the cursor using tab. When it is done thru
mouse click, and entering
a single character in the field, it doesnot trigger.
Any solution to this problem is welcome.

Regards
JOE

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



Help on JSP Entry Form

2001-05-11 Thread Joe / NeoSoft

Hi,

In the modify mode of a JSP Entry form, when tab is pressed, the cursor
should go to a
field and highlight the complete value in that field. So when a new value is
entered it replaces
the old value completely.
In our case, the cursor gets positioned in the field but doesn't highlight
the old value. So to enter
the new value, manually we have to delete the old value and then enter the
new value.
Any help on this would be appreciated.

Regards
JOE

===
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: response already commited

2001-05-11 Thread Patrick Pierra

may be, but therefore i not understand why that's work well in other
jsp

Patrick PIERRA



Abhishek Sharan
Abhishek.Sharan@To: [EMAIL PROTECTED]
NOKIA.COM   cc:
Sent by: A   Subject: Re: response already commited
mailing list
about Java Server
Pages
specification and
reference
JSP-INTEREST@JAV
A.SUN.COM


05/11/01 12:22 PM
Please respond to
A mailing list
about Java Server
Pages
specification and
reference






hi,
i think the problem is with your classpath setings.tomcat is not able to
instantiate the object..

 -Original Message-
 From: ext Patrick Pierra [mailto:[EMAIL PROTECTED]]
 Sent: 11. May 2001 12:25
 To: [EMAIL PROTECTED]
 Subject: response already commited


 Hello,

 I' try to create an Object in a JSP :

 %
  User tUser = new User();
 ..
 %

 When i run this JSP on Tomcat i receive this error message :

 Error: 500
 Location: /odata1/Registration.jsp
 Internal Servlet Error:
 java.lang.IllegalStateException: Response has already been committed
java.lang.Throwable(java.lang.String)
java.lang.Exception(java.lang.String)
java.lang.RuntimeException(java.lang.String)
java.lang.IllegalStateException(java.lang.String)
void
 org.apache.tomcat.core.HttpServletResponseFacade.sendError(int,
 java.lang.String)
void
 org.apache.jasper.runtime.JspServlet.unknownException(javax.se
 rvlet.http.HttpServletResponse,

 java.lang.Throwable)
void
 org.apache.jasper.runtime.JspServlet.service(javax.servlet.htt
 p.HttpServletRequest,

 javax.servlet.http.HttpServletResponse)
void
 javax.servlet.http.HttpServlet.service(javax.servlet.ServletRequest,
 javax.servlet.ServletResponse)
void
 org.apache.tomcat.core.ServletWrapper.handleRequest(org.apache
 .tomcat.core.Request,

 org.apache.tomcat.core.Response)
void
 org.apache.tomcat.core.ContextManager.service(org.apache.tomca
 t.core.Request,

 org.apache.tomcat.core.Response)
void
 org.apache.tomcat.service.http.HttpConnectionHandler.processCo
 nnection(org.apache.tomcat.service.TcpConnection,

 java.lang.Object [])
void org.apache.tomcat.service.TcpConnectionThread.run()
void java.lang.Thread.run()


 any explication ?

 Patrick PIERRA

 ==
 =
 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: Display a value in the Text Area of JSP Entry form

2001-05-11 Thread Patrick Pierra

try
%
String str =input type=\text\ name=\xx\ value=\ +
theNameOfTheVariable + \;
%
puis
TD%=str%/TD

Patrick PIERRA



Joe / NeoSoft
neosoft_sd@BPLNETo: [EMAIL PROTECTED]
T.COM   cc:
Sent by: A   Subject: Display a value in the Text 
Area of JSP Entry form
mailing list
about Java Server
Pages
specification and
reference
JSP-INTEREST@JAV
A.SUN.COM


05/11/01 01:58 PM
Please respond to
A mailing list
about Java Server
Pages
specification and
reference






Hi,
How to assign a value  display it properly in the text area.
Any help on this please
Regards
JOE

===
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: getString( ) question

2001-05-11 Thread erik morton

I'm not sure if you went to the spec for this information but it is not correct in
every implementation of the JVM that I have used. If you read the source of the
java.lang.String class you will not find any upper bounds on the size of the
underlying character array.

please correct me if I am wrong.
Amarnath N wrote:

 Java String can hold upto 255 characters.
 getString() will return what u r expectingbut u cannot store in a
 string...u can test whether u r getting what u expectedjust print
 getString()...do not assign it to a String var...
 - Original Message -
 From: Lenin Lopez [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Friday, May 11, 2001 12:33 AM
 Subject: getString( ) question

  Hi All,
 
  I am trying to get a varchar(2000) value from my DB using a store
 prodedure
  I know the store procedure works and returns the value I am expecting
  However, when I try to retreive the value using getString(myValue) in
  java,
  the lenght of what I get is less than the actual velue in the DB,
 
  am I using the right getXXX method??
  Or is there any other method I can use??
 
 
 ===
  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

--
Erik I Morton
Software Developer
--
CommerceHub
http://www.commercehub.com
518-886-0704
21 Corporate Drive
Clifton Park, NY 12065

===
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: response already commited

2001-05-11 Thread Patrick Pierra

%@ page import =
 java.io.*,sun.net.smtp.*, java.util.*, lds.gui.user.User
%

%!
  private final String formRecipient = [EMAIL PROTECTED];
  private final String mailhost = korba;
  private final String senderAddress = [EMAIL PROTECTED];
  private User tUser;
 //private lds.gui.user.User tUser = new lds.gui.user.User();

  class formField {
String name;

formField (String name) {
  this.name = name;
 }
  }

  Vector fieldList = new Vector();

  public void jspInit() {
fieldList.add(new formField(FirstName));
fieldList.add(new formField(LastName));
fieldList.add(new formField(Civility));
fieldList.add(new formField(UserName));
fieldList.add(new formField(Password));
}

  String displayField (String name) {
StringBuffer formOut = new StringBuffer();

 if (name.equals(Password) || name.equals(Password again)) {
   formOut.append(input type=\password\ name=\)
 .append(name)
 .append(\\n);

 } else {
   formOut.append(input type=\text\ name=\)
 .append(name)
 .append(\\n);
 }

return (formOut.toString());
  }

  String storeField (String name, String value) {
StringBuffer formOut = new StringBuffer();

formOut.append(input type=\hidden\ name=\)
 .append(name)
 .append(\ value=\)
 .append(value)
 .append(\\n);

return (formOut.toString());
  }

  boolean isValidForm (HttpServletRequest req) {
boolean valid = true;
Enumeration need = fieldList.elements();

while (need.hasMoreElements()) {
  formField field = (formField)need.nextElement();
   String value = req.getParameter(field.name);
   if (!field.name.equals(Password)) {
if (value == null || value.equals()) {
  valid = false;
}
  } else {
   if (value == null || value.compareTo() == 0 ||
req.getParameter(Password again).equals() ||
   (!req.getParameter(Password again).equals() 
!value.equals()  !req.getParameter(Password again).equals(value)))
   valid = false;
 }
 }
return (valid);
  }

  String mailForm (HttpServletRequest req) throws JspException{
   StringBuffer message = new StringBuffer();

  Enumeration fields = fieldList.elements();

while (fields.hasMoreElements()) {
  formField field = (formField)fields.nextElement();

  message.append(field.name)
 .append( : )
 .append(req.getParameter(field.name))
 .append(\n);
}
 System.out.println(message.toString());
//  Nouveau JavaMail here.

try {
  SmtpClient client = new SmtpClient(mailhost);
  client.from(senderAddress);
  client.to(formRecipient);
  PrintStream msg = client.startMessage();
  msg.println();
  msg.println();
  msg.println(Sujet : Feedback Web);
  msg.println();
  msg.println(message.toString());
  msg.println(--);
  msg.println(Message from [EMAIL PROTECTED]);
  client.closeServer();
  } catch (IOException e) {
   e.printStackTrace();
  }

return (message.toString());
  }

%

%
 if (isValidForm(request)) {
 User tUser = new User();  // here is the problem

 /*tUser.setMUserName(request.getParameter(UserName));
 tUser.setMPassword(request.getParameter(Password));
 session.setAttribute(user, tUser);*/
mailForm(request);

// need to create a 'thanks for your comments' page
//response.sendRedirect(footer_help/thanks.jsp);
 %
 jsp:forward page=thanks.jsp/
 % }
%


%@ include file=header.jsp %
STYLE
!--
TD {
  font-family: Verdana;
  font-size:12pt;
  color: #6C;
}
TABLE {
  background-color: #e3;
}
--
/STYLE
table heigth=30 width=802 cellpadding=10
  tr
td height=130 width=126 valign=topimg src=image/passport.gif
width=130 height=130/td
td valign=top width=622
  div align=center
pbfont face=Verdana color=#232349Registration
Form/font/b/p
p align=leftfont face=Verdana color=#6CWelcome to the
ODATA
  Passport. By filling in and submitting the form below you will
obtain
  a full access to ODATA. All fields are mandatory. You will
receive an
  email which recapitule all informations./font/p
  /div
/td
%
  if (request.getParameter(Init) != null) {
 %
  tr
td height=32 valign=top colspan=2font face=Verdana color=
#FFInvalid
  Form, complete the mandatory fields below : /font/td
  /tr
  %
  }  %
/table
FORM ACTION=Registration.jsp METHOD=POST

TABLE CELLPADDING=5 CELLSPACING=0 BORDER=0
%
  Enumeration fields = fieldList.elements();

  while (fields.hasMoreElements()) {

formField field = (formField)fields.nextElement();
String value = request.getParameter(field.name);
 if (!field.name.equals(Password)) {
if ( value == null || value.compareTo() == 0)
   {

 

Login Page Problem???

2001-05-11 Thread Ruaidhrí Fernandes

Hi,
I have a login page that lets a user enter his/her
username and password. If valid it takes them to a
page where they can administer a table in their
database using form fields.
My question is, if another user comes along after
somebody has been logged in,and presses the back
button or forward button on the browser and gets
passed the login page to see the administraion page ,
how can I stop this.
Could anyone tell me how I can stop this from
happening. I'd like to use sessions but i'm not sure
on how to go about it.
Thanks
Rui

=
If a rabbit's foot is so lucky,. what happened to the rabbit?

__
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



Re: Login Page Problem???

2001-05-11 Thread Patrick Pierra

I'm not sure, but i'have operated like that for my application. You have to
create a logout link. When the user click on it, the user object stored in
session is removed.

%@ page import= lds.gui.user.User %

%
 User tUser = (User)session.getAttribute(user);
 if  ( tUser != null)
 session.removeAttribute(user);
%

jsp:forward page=index.jsp/

Patrick PIERRA



Ruaidhrí Fernandes
ruaidhri_fernandes@To: [EMAIL PROTECTED]
YAHOO.COM  cc:
Sent by: A mailing  Subject: Login Page Problem???
list about Java
Server Pages
specification and
reference
[EMAIL PROTECTED]
UN.COM


05/11/01 02:40 PM
Please respond to A
mailing list about
Java Server Pages
specification and
reference






Hi,
I have a login page that lets a user enter his/her
username and password. If valid it takes them to a
page where they can administer a table in their
database using form fields.
My question is, if another user comes along after
somebody has been logged in,and presses the back
button or forward button on the browser and gets
passed the login page to see the administraion page ,
how can I stop this.
Could anyone tell me how I can stop this from
happening. I'd like to use sessions but i'm not sure
on how to go about it.
Thanks
Rui

=
If a rabbit's foot is so lucky,. what happened to the rabbit?

__
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: Login Page Problem???

2001-05-11 Thread Joseph Ottinger

You shouldn't use application-level security like that - get the container
to authenticate users.

Then, if you really want to force the back button to not work, force no
caching on the pages in question. See the list archives for details if you
don't know how to do this.


From: Ruaidhrí Fernandes [EMAIL PROTECTED]
Reply-To: A mailing list about Java Server Pages specification and
 reference [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: Re: Login Page Problem???
Date: Fri, 11 May 2001 06:27:20 -0700

Hi,
ok, so on my main login page, if the user has a valid
username and password, then I create a session and
store his username in the session and on my log out
page I remove this from the session. But what check
should i perform on pages to see if the the user has
logged in or not? Like after a user logs out using the
log out page and the hits the back button, they should
not be allowed to see the previous pages because they
have logged out.How can I chack this?
thanks
Rui
--- Patrick Pierra [EMAIL PROTECTED]
wrote:
  I'm not sure, but i'have operated like that for my
  application. You have to
  create a logout link. When the user click on it, the
  user object stored in
  session is removed.
 
  %@ page import= lds.gui.user.User %
 
  %
   User tUser =
  (User)session.getAttribute(user);
   if  ( tUser != null)
   session.removeAttribute(user);
  %
 
  jsp:forward page=index.jsp/
 
  Patrick PIERRA
 
 
 
  Ruaidhrí Fernandes
  ruaidhri_fernandes@To:
 [EMAIL PROTECTED]
  YAHOO.COM  cc:
  Sent by: A mailing
  Subject: Login Page Problem???
  list about Java
  Server Pages
  specification and
  reference
  [EMAIL PROTECTED]
  UN.COM
 
 
  05/11/01 02:40 PM
  Please respond to A
  mailing list about
  Java Server Pages
  specification and
  reference
 
 
 
 
 
 
  Hi,
  I have a login page that lets a user enter his/her
  username and password. If valid it takes them to a
  page where they can administer a table in their
  database using form fields.
  My question is, if another user comes along after
  somebody has been logged in,and presses the back
  button or forward button on the browser and gets
  passed the login page to see the administraion page
  ,
  how can I stop this.
  Could anyone tell me how I can stop this from
  happening. I'd like to use sessions but i'm not sure
  on how to go about it.
  Thanks
  Rui
 
  =
  If a rabbit's foot is so lucky,. what happened
  to the rabbit?
 
  __
  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


=
If a rabbit's foot is so lucky,. what happened to the rabbit?

__
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

_
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 

Re: Login Page Problem???

2001-05-11 Thread Ruaidhrí Fernandes

Hi,
ok, so on my main login page, if the user has a valid
username and password, then I create a session and
store his username in the session and on my log out
page I remove this from the session. But what check
should i perform on pages to see if the the user has
logged in or not? Like after a user logs out using the
log out page and the hits the back button, they should
not be allowed to see the previous pages because they
have logged out.How can I chack this?
thanks
Rui
--- Patrick Pierra [EMAIL PROTECTED]
wrote:
 I'm not sure, but i'have operated like that for my
 application. You have to
 create a logout link. When the user click on it, the
 user object stored in
 session is removed.

 %@ page import= lds.gui.user.User %

 %
  User tUser =
 (User)session.getAttribute(user);
  if  ( tUser != null)
  session.removeAttribute(user);
 %

 jsp:forward page=index.jsp/

 Patrick PIERRA



 Ruaidhrí Fernandes
 ruaidhri_fernandes@To:
[EMAIL PROTECTED]
 YAHOO.COM  cc:
 Sent by: A mailing
 Subject: Login Page Problem???
 list about Java
 Server Pages
 specification and
 reference
 [EMAIL PROTECTED]
 UN.COM


 05/11/01 02:40 PM
 Please respond to A
 mailing list about
 Java Server Pages
 specification and
 reference






 Hi,
 I have a login page that lets a user enter his/her
 username and password. If valid it takes them to a
 page where they can administer a table in their
 database using form fields.
 My question is, if another user comes along after
 somebody has been logged in,and presses the back
 button or forward button on the browser and gets
 passed the login page to see the administraion page
 ,
 how can I stop this.
 Could anyone tell me how I can stop this from
 happening. I'd like to use sessions but i'm not sure
 on how to go about it.
 Thanks
 Rui

 =
 If a rabbit's foot is so lucky,. what happened
 to the rabbit?

 __
 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


=
If a rabbit's foot is so lucky,. what happened to the rabbit?

__
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



Re: getString( ) question

2001-05-11 Thread Amarnath N

thanks erik
- Original Message -
From: erik morton [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, May 11, 2001 5:32 PM
Subject: Re: getString( ) question


 I'm not sure if you went to the spec for this information but it is not
correct in
 every implementation of the JVM that I have used. If you read the source
of the
 java.lang.String class you will not find any upper bounds on the size of
the
 underlying character array.

 please correct me if I am wrong.
 Amarnath N wrote:

  Java String can hold upto 255 characters.
  getString() will return what u r expectingbut u cannot store in a
  string...u can test whether u r getting what u expectedjust
print
  getString()...do not assign it to a String var...
  - Original Message -
  From: Lenin Lopez [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Sent: Friday, May 11, 2001 12:33 AM
  Subject: getString( ) question
 
   Hi All,
  
   I am trying to get a varchar(2000) value from my DB using a store
  prodedure
   I know the store procedure works and returns the value I am expecting
   However, when I try to retreive the value using getString(myValue)
in
   java,
   the lenght of what I get is less than the actual velue in the DB,
  
   am I using the right getXXX method??
   Or is there any other method I can use??
  
  
 
===
   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

 --
 Erik I Morton
 Software Developer
 --
 CommerceHub
 http://www.commercehub.com
 518-886-0704
 21 Corporate Drive
 Clifton Park, NY 12065


===
 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: Login Page Problem???

2001-05-11 Thread Patrick Pierra

ok, I've the same problem after verification
an idea : may be playing with the history object and javascript




Ruaidhrí Fernandes
ruaidhri_fernandes@To: [EMAIL PROTECTED]
YAHOO.COM  cc:
Sent by: A mailing  Subject: Re: Login Page Problem???
list about Java
Server Pages
specification and
reference
[EMAIL PROTECTED]
UN.COM


05/11/01 03:27 PM
Please respond to A
mailing list about
Java Server Pages
specification and
reference






Hi,
ok, so on my main login page, if the user has a valid
username and password, then I create a session and
store his username in the session and on my log out
page I remove this from the session. But what check
should i perform on pages to see if the the user has
logged in or not? Like after a user logs out using the
log out page and the hits the back button, they should
not be allowed to see the previous pages because they
have logged out.How can I chack this?
thanks
Rui
--- Patrick Pierra [EMAIL PROTECTED]
wrote:
 I'm not sure, but i'have operated like that for my
 application. You have to
 create a logout link. When the user click on it, the
 user object stored in
 session is removed.

 %@ page import= lds.gui.user.User %

 %
  User tUser =
 (User)session.getAttribute(user);
  if  ( tUser != null)
  session.removeAttribute(user);
 %

 jsp:forward page=index.jsp/

 Patrick PIERRA



 Ruaidhrí Fernandes
 ruaidhri_fernandes@To:
[EMAIL PROTECTED]
 YAHOO.COM  cc:
 Sent by: A mailing
 Subject: Login Page Problem???
 list about Java
 Server Pages
 specification and
 reference
 [EMAIL PROTECTED]
 UN.COM


 05/11/01 02:40 PM
 Please respond to A
 mailing list about
 Java Server Pages
 specification and
 reference






 Hi,
 I have a login page that lets a user enter his/her
 username and password. If valid it takes them to a
 page where they can administer a table in their
 database using form fields.
 My question is, if another user comes along after
 somebody has been logged in,and presses the back
 button or forward button on the browser and gets
 passed the login page to see the administraion page
 ,
 how can I stop this.
 Could anyone tell me how I can stop this from
 happening. I'd like to use sessions but i'm not sure
 on how to go about it.
 Thanks
 Rui

 =
 If a rabbit's foot is so lucky,. what happened
 to the rabbit?

 __
 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


=
If a rabbit's foot is so lucky,. what happened to the rabbit?

__
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 

Preparecall registeringOutparameter

2001-05-11 Thread ILHAN DOGAN

 Hi All,

 I am trying call  Oracle PL/SQL function which returns a rowset of
Database table as result.

I am calling that funcition as follows :
  CallableStatement cstmt = conn.prepareCall(
{? = call Pck_return_all.fn_ret_acc (?,?,?)});

And registering parameters as :
 cstmt.registerOutParameter(2, java.sql.Types.NUMERIC);
 cstmt.registerOutParameter(3, java.sql.Types.NUMERIC);
 cstmt.registerOutParameter(4, java.sql.Types.NUMERIC);

But I do not know how to register first parameter which is the rowset as
mentioned above.

For doing this I created an object in Database which is equivalent to the
rowset of table. And with
Jpublisher wizard I crated .sqlj and .java files of it.

Could you please help me for registering the first parameter and getting
the resultant columns ?

Thanks.
Ilhan

===
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: sending emails

2001-05-11 Thread King Maurice

How would you implement the javamail api

Do you need to download the javamail.
What are the steps involved to set this up?
Newbie @ java, please forgive

What are the benifits of javamail over let's say sendmail program that are
out there that are free, etc...




- Original Message -
From: Jim Rueschhoff [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, May 10, 2001 9:54 AM
Subject: Re: sending emails


 A entirely java based email server is Enigma.  It can be found at
 enigma.intouch.ca .  It is a java based email server that offers pop3,
smtp
 and imap protocols and also offers full public key encryption.  JavaMail
and
 Engima working together allows for a entirely java based email solution.



 -Original Message-
 From: A mailing list about Java Server Pages specification and reference
 [mailto:[EMAIL PROTECTED]]On Behalf Of Nishit Trivedi
 Sent: Wednesday, May 09, 2001 2:48 PM
 To: [EMAIL PROTECTED]
 Subject: Re: [JSP-INTEREST] sending emails


 Supreme Being,
 I am not aware of any application server that comes
 with JavaMail. See, JavaMail is not that huge
 api that app server should include. I think there
 are only two jar files that you have to include in
 your classpath for JavaMail..that's it!!!

 one more thing..i didn't try this. But the other thing
 what you can do is : Have a simple function (call it
 sendMail()) which gets called from within jsp page
 and this sendMail function will execute unix process,
 and this unix process will use SendMail program which
 sends email..(as we do in perl)..as i told you, this is
 just my thinking..i did not try this..so this might work for
 you. Otherwise for sending mail from jsp page, JavaMail api
 is the best solution...as above, write sendMail function
 which gets called in jsp page.

 Nishit

 -Original Message-
 From: Supreme Being [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, May 09, 2001 5:18 PM
 To: [EMAIL PROTECTED]
 Cc: [EMAIL PROTECTED]
 Subject: Re: sending emails


 Nishit, i do have the coding that needs to be applied in sending email
 through JavaMail in a JSP page. I'm using JRun studio on my win98 PC. Tell
 me something, do most servers supporting JSP have JavaMail? because if
they
 don't ... is there an alternate? in any case, is there some other way
other
 than JavaMail by which you can send email using JSP? Also, i still have to
 download and install JavaMail onto my machine, if you've done such a thing
 before..can you tell me if there's any big problem that i might face?

 Thanx,
 SupremeBeing



 Date: Wed, 9 May 2001 16:29:34 -0400
 From: Nishit Trivedi [EMAIL PROTECTED]
 SUBJECTTo: [EMAIL PROTECTED]
 
 Koustubh,
 
 Yes. u can use JavaMail api.
 if you don't get success through it, let me know..
 
 Nishit
 
 -Original Message-
 From: Warty, Koustubh [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, May 09, 2001 4:19 PM
 To: [EMAIL PROTECTED]
 Subject: sending emails
 
 
  Hello ,
 In my application suppose the customer places an Order through a
 JSP
 page by clicking on the Submit Order button. Is it possible to send an
 automatic email response back to the client giving him his order details
??
 
  Please do let me know .
 
  thanks,
  - Koustubh
 
 
 
 
 
 
 
 
 

==
 =
 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
 
 
 
 Are you a Hoboe?  Hobnob at http://www.hoboe.com
 Click here - http://www.hoboe.com Global Mail Access
 

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

Re: Building Graphs dynamically

2001-05-11 Thread Eoin Shalloo

Clayton,

Check out objectplanet.com . They have an object you can use with a gif
encoder to generate the file server side and then have the HTML page
reference it from the client.

We used it to generate graphs with up to 21,000 datapoints and it worked
fine.

Regards,
Eoin
- Original Message -
From: Clayton Nash [EMAIL PROTECTED]
Sent: Thursday, May 10, 2001 11:10 AM
Subject: Building Graphs dynamically


 Hi,

 Are there any good tools for building graphs (As a gif or something) under
a
 Java framework? I need to process some data from a database and build bar
 and line graphs dynamically. Clients are spread across IE and Netscape so
 clever ActiveX controls are verboten.

 Thanks,

 Clayton


===
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: sending emails

2001-05-11 Thread Joseph Ottinger

JavaMail has a reference, freely available on http://java.sun.com. Check it
out.

Why use it over other solutions? Abstraction good, two legs bad. Abstraction
good, two legs bad. Basically, javamail USES the lower-level stuff (from the
socket level, I should say) which removes from YOU the burden of knowing
specifically what lower-level stuff you're using, generally. (I'm
generalizing, which is why I said generally, but I'm sure you get the
picture. I'm also being a bit fuzzy because I'm kinda busy with other things
and focusing on this isn't easy right now.)


From: King Maurice [EMAIL PROTECTED]
Reply-To: A mailing list about Java Server Pages specification and
 reference [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: Re: sending emails
Date: Fri, 11 May 2001 10:52:45 -0400

How would you implement the javamail api

Do you need to download the javamail.
What are the steps involved to set this up?
Newbie @ java, please forgive

What are the benifits of javamail over let's say sendmail program that are
out there that are free, etc...




- Original Message -
From: Jim Rueschhoff [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, May 10, 2001 9:54 AM
Subject: Re: sending emails


  A entirely java based email server is Enigma.  It can be found at
  enigma.intouch.ca .  It is a java based email server that offers pop3,
smtp
  and imap protocols and also offers full public key encryption.  JavaMail
and
  Engima working together allows for a entirely java based email solution.
 
 
 
  -Original Message-
  From: A mailing list about Java Server Pages specification and reference
  [mailto:[EMAIL PROTECTED]]On Behalf Of Nishit Trivedi
  Sent: Wednesday, May 09, 2001 2:48 PM
  To: [EMAIL PROTECTED]
  Subject: Re: [JSP-INTEREST] sending emails
 
 
  Supreme Being,
  I am not aware of any application server that comes
  with JavaMail. See, JavaMail is not that huge
  api that app server should include. I think there
  are only two jar files that you have to include in
  your classpath for JavaMail..that's it!!!
 
  one more thing..i didn't try this. But the other thing
  what you can do is : Have a simple function (call it
  sendMail()) which gets called from within jsp page
  and this sendMail function will execute unix process,
  and this unix process will use SendMail program which
  sends email..(as we do in perl)..as i told you, this is
  just my thinking..i did not try this..so this might work for
  you. Otherwise for sending mail from jsp page, JavaMail api
  is the best solution...as above, write sendMail function
  which gets called in jsp page.
 
  Nishit
 
  -Original Message-
  From: Supreme Being [mailto:[EMAIL PROTECTED]]
  Sent: Wednesday, May 09, 2001 5:18 PM
  To: [EMAIL PROTECTED]
  Cc: [EMAIL PROTECTED]
  Subject: Re: sending emails
 
 
  Nishit, i do have the coding that needs to be applied in sending email
  through JavaMail in a JSP page. I'm using JRun studio on my win98 PC.
Tell
  me something, do most servers supporting JSP have JavaMail? because if
they
  don't ... is there an alternate? in any case, is there some other way
other
  than JavaMail by which you can send email using JSP? Also, i still have
to
  download and install JavaMail onto my machine, if you've done such a
thing
  before..can you tell me if there's any big problem that i might face?
 
  Thanx,
  SupremeBeing
 
 
 
  Date: Wed, 9 May 2001 16:29:34 -0400
  From: Nishit Trivedi [EMAIL PROTECTED]
  SUBJECTTo: [EMAIL PROTECTED]
  
  Koustubh,
  
  Yes. u can use JavaMail api.
  if you don't get success through it, let me know..
  
  Nishit
  
  -Original Message-
  From: Warty, Koustubh [mailto:[EMAIL PROTECTED]]
  Sent: Wednesday, May 09, 2001 4:19 PM
  To: [EMAIL PROTECTED]
  Subject: sending emails
  
  
   Hello ,
  In my application suppose the customer places an Order through
a
  JSP
  page by clicking on the Submit Order button. Is it possible to send
an
  automatic email response back to the client giving him his order
details
??
  
   Please do let me know .
  
   thanks,
   - Koustubh
  
  
  
  
  
  
  
  
  
 
 ==
  =
  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
   

Re: Standar Template

2001-05-11 Thread Celeste Haseltine

Dave,

You can also consider encapsulating your menu functionality and attributes
in pure JS files.  Then, on a JSP file that you can call FirstPage, you
include both your JS menu file, and your standard header at the top.  Play
around with where you want the menu and header positioned on
FirstPage.jsp.  Then all your other JSP's can use the JSP include tag,
to include your FirstPage.jsp.  This will give a standard look and feel to
your web site.

The current web site I am designing has a requirement for using menu's
without frame sets, but the menu's will be different based on the security
level assigned to the user's login password.  I borrowed the menu concept
from HierMenu central's Dynamic HTML lab, which has an EXCELLENT set of
shareware JS menu code that works in ALL browsers.  You can change the
menu's attributes from a top loading to a side loading menu with just a
property change.  You can find this code at
http://www.webreference.com/dhtml/column52/.  In my case, I had to modify
their concept to allow me to load different menu's based on a user's
security level, and I did this via an XML file that associates a different
JS file to a given security level, which in turn contains that user's menu
attributes.

By the way, if your wondering why I did this in an XML file and NOT in the
database, the requirement via the customer was NOT to allow the user to
establish a connection to the db, until they had passed a first level
security screen.  The first level security screen is contained in an XML
file.  Once the user passes the first level security screen, the user is
then allowed to establish a connection to the db, which in turn runs a
second level security screen (which MUST be different from the first level
test) before the user can proceed to his first page, which in turn
contains the security specific menu.  Never work on a government contract
UNLESS you enjoy having your brain twisted by bizarre requirements and high
level mathematical algorithms.

Celeste

-Original Message-
From: A mailing list about Java Server Pages specification and reference
[mailto:[EMAIL PROTECTED]]On Behalf Of Dave Ford
Sent: Thursday, May 10, 2001 2:17 PM
To: [EMAIL PROTECTED]
Subject: Standar Template


I want to create a web app in which every page on the site has a standard
header along the top and a standard menu along the left edge (a pretty
standard thing).

I came up with 2 ways of doing this:

1. Use a table tag and jsp:include tags on EVERY page:

table
  tr
tdjsp:include page=standardHeader.jsp//td
  /tr
  tr
td colspan=2
table
  tr
td valign=topjsp:include page=/menu.jsp //td
td valign=top
 THIS IS WHERE THE PAGE-SPECIFIC CONTENT (i.e. the body)*
/td
  /tr
/table
/td
  /tr
/table

2. Invert the above solution to create one master template (or controller)
and have the content page name passed in as a parameter. Here would be the
master template-controller page:

table
  tr
tdjsp:include page=standardHeader.jsp//td
  /tr
  tr
td colspan=2
table
  tr
td valign=topjsp:include page=/menu.jsp //td
td valign=top
 jsp:include page=%=request.getParameter(contentPage)% /*
/td
  /tr
/table
/td
  /tr
/table

The key difference between these two architectures are best understood by
looking at the 2 lines with the * at the end. Also, in option 2, there is
only one copy of the above code. In option 1, there is one copy per content
page

Q1: Does anyone have any preference between options 1 and 2?
Q2: Is there a better way of achieving this result?
Q3: Do either have any negetive drawback I need to consider? (I will be
converting an entire site)

By the way, I'm currently achieving this effect VERY easily using good old
client-side html frames. But due to popular demand, framse must go.

Dave Ford
Smart Soft - The Java Training Company
http://www.smart-soft.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: HELP.. How to Trigger Javascript Onchange Event

2001-05-11 Thread Shannon Rose

This information is *easily* had on the web.

OnChange() works when you change the contents of the field and then LEAVE.
OnBlur() triggers when you simply LEAVE.  OnKeyUp(orDown)() will trigger
with each keystroke.

An excellent source for Javascript questions is www.irt.org.

~Shannon

 -Original Message-
 From: A mailing list about Java Server Pages specification
 and reference
 [mailto:[EMAIL PROTECTED]]On Behalf Of Joe / NeoSoft
 Sent: Friday, May 11, 2001 5:50 AM
 To: [EMAIL PROTECTED]
 Subject: HELP.. How to Trigger Javascript Onchange Event


 Hi,

 In an JSP Entry form, for Validating various field values, we
 are using
 ONCHANGE event.
 It triggers when we position the cursor using tab. When it is
 done thru
 mouse click, and entering
 a single character in the field, it doesnot trigger.
 Any solution to this problem is welcome.

 Regards
 JOE

 ==
 =
 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: Building Graphs dynamically

2001-05-11 Thread David Morton

 I've been testing:
http://www.jrefinery.com 's JFreeChart...any others I should know about/test?

David


At 10:46 AM 5/11/01 +0100, you wrote:
Clayton,

Check out objectplanet.com . They have an object you can use with a gif
encoder to generate the file server side and then have the HTML page
reference it from the client.

We used it to generate graphs with up to 21,000 datapoints and it worked
fine.

Regards,
Eoin
- Original Message -
From: Clayton Nash [EMAIL PROTECTED]
Sent: Thursday, May 10, 2001 11:10 AM
Subject: Building Graphs dynamically


  Hi,
 
  Are there any good tools for building graphs (As a gif or something) under
a
  Java framework? I need to process some data from a database and build bar
  and line graphs dynamically. Clients are spread across IE and Netscape so
  clever ActiveX controls are verboten.
 
  Thanks,
 
  Clayton
 

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



Printing problem in JSP

2001-05-11 Thread anil yeola

Hi,
  Can any one tell me if it is possible to print the
current JSP page in compressed way so that day can fit
on one page on printer.
Thanx
Anil

__
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



Re: sending emails

2001-05-11 Thread Jim Rueschhoff

JavaMail is free and is supported by Sun.  It is available at
http://www.java.sun.com/products/javamail/index.html
JavaMail is implemented entirely in Java and is fully compatible with java,
jsp, etc. and, as such, is also processor independent.  The site mentioned
above has all the information on how to download it, set it up, etc.
JavaMail is a optional java extension package (javax).  The problem with
sendmail is that it is not processor/operating system independent and you
would have to develop the interface between java and that program.

The answer to the question as to why to use it is the same as why we use any
java provided package.  We are paid to implement programs for our companies.
We do not need to continually reinvent work that has been completed,
debugged and is openly available.  We need to do the job we were hired to
do.  Why spend a lot of time and effort dealing with other mail interfaces
when javamail can be installed and in use within a JSP in under 2 hours?

-Original Message-
From: A mailing list about Java Server Pages specification and reference
[mailto:[EMAIL PROTECTED]]On Behalf Of King Maurice
Sent: Friday, May 11, 2001 7:53 AM
To: [EMAIL PROTECTED]
Subject: Re: [JSP-INTEREST] sending emails


How would you implement the javamail api

Do you need to download the javamail.
What are the steps involved to set this up?
Newbie @ java, please forgive

What are the benifits of javamail over let's say sendmail program that are
out there that are free, etc...




- Original Message -
From: Jim Rueschhoff [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, May 10, 2001 9:54 AM
Subject: Re: sending emails


 A entirely java based email server is Enigma.  It can be found at
 enigma.intouch.ca .  It is a java based email server that offers pop3,
smtp
 and imap protocols and also offers full public key encryption.  JavaMail
and
 Engima working together allows for a entirely java based email solution.



 -Original Message-
 From: A mailing list about Java Server Pages specification and reference
 [mailto:[EMAIL PROTECTED]]On Behalf Of Nishit Trivedi
 Sent: Wednesday, May 09, 2001 2:48 PM
 To: [EMAIL PROTECTED]
 Subject: Re: [JSP-INTEREST] sending emails


 Supreme Being,
 I am not aware of any application server that comes
 with JavaMail. See, JavaMail is not that huge
 api that app server should include. I think there
 are only two jar files that you have to include in
 your classpath for JavaMail..that's it!!!

 one more thing..i didn't try this. But the other thing
 what you can do is : Have a simple function (call it
 sendMail()) which gets called from within jsp page
 and this sendMail function will execute unix process,
 and this unix process will use SendMail program which
 sends email..(as we do in perl)..as i told you, this is
 just my thinking..i did not try this..so this might work for
 you. Otherwise for sending mail from jsp page, JavaMail api
 is the best solution...as above, write sendMail function
 which gets called in jsp page.

 Nishit

 -Original Message-
 From: Supreme Being [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, May 09, 2001 5:18 PM
 To: [EMAIL PROTECTED]
 Cc: [EMAIL PROTECTED]
 Subject: Re: sending emails


 Nishit, i do have the coding that needs to be applied in sending email
 through JavaMail in a JSP page. I'm using JRun studio on my win98 PC. Tell
 me something, do most servers supporting JSP have JavaMail? because if
they
 don't ... is there an alternate? in any case, is there some other way
other
 than JavaMail by which you can send email using JSP? Also, i still have to
 download and install JavaMail onto my machine, if you've done such a thing
 before..can you tell me if there's any big problem that i might face?

 Thanx,
 SupremeBeing



 Date: Wed, 9 May 2001 16:29:34 -0400
 From: Nishit Trivedi [EMAIL PROTECTED]
 SUBJECTTo: [EMAIL PROTECTED]
 
 Koustubh,
 
 Yes. u can use JavaMail api.
 if you don't get success through it, let me know..
 
 Nishit
 
 -Original Message-
 From: Warty, Koustubh [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, May 09, 2001 4:19 PM
 To: [EMAIL PROTECTED]
 Subject: sending emails
 
 
  Hello ,
 In my application suppose the customer places an Order through a
 JSP
 page by clicking on the Submit Order button. Is it possible to send an
 automatic email response back to the client giving him his order details
??
 
  Please do let me know .
 
  thanks,
  - Koustubh
 
 
 
 
 
 
 
 
 

==
 =
 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.. How to Trigger Javascript Onchange Event

2001-05-11 Thread M. Simms

Roll your own change detection.
store the initial field values in Javascript variables marked with prefix
old_
and then set-up the comparison to any new values coming from the form in an
onsubmit validation function.

you can employe JSP to generate some of this Javascript for you.

 -Original Message-
 From: A mailing list about Java Server Pages specification and reference
 [mailto:[EMAIL PROTECTED]]On Behalf Of Joe / NeoSoft
 Sent: Friday, May 11, 2001 7:50 AM
 To: [EMAIL PROTECTED]
 Subject: HELP.. How to Trigger Javascript Onchange Event


 Hi,

 In an JSP Entry form, for Validating various field values, we are using
 ONCHANGE event.
 It triggers when we position the cursor using tab. When it is done thru
 mouse click, and entering
 a single character in the field, it doesnot trigger.
 Any solution to this problem is welcome.

 Regards
 JOE

 ==
 =
 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 on JSP Entry Form

2001-05-11 Thread Joe Blow

Call a javascript which says:

document.UrFormName.UrFieldName.select();
document.UrFormName.UrFieldName.focus();

-Original Message-
From: Joe / NeoSoft [mailto:[EMAIL PROTECTED]]
Sent: Friday, May 11, 2001 7:55 AM
To: [EMAIL PROTECTED]
Subject: Help on JSP Entry Form


Hi,

In the modify mode of a JSP Entry form, when tab is pressed, the cursor
should go to a
field and highlight the complete value in that field. So when a new value is
entered it replaces
the old value completely.
In our case, the cursor gets positioned in the field but doesn't highlight
the old value. So to enter
the new value, manually we have to delete the old value and then enter the
new value.
Any help on this would be appreciated.

Regards
JOE

===
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: package not found

2001-05-11 Thread Sharon Om

Thank you so much.
Now I feel dumb but at least I am happy.

Have a nice day to you, too

Shar

-Original Message-
From: A mailing list about Java Server Pages specification and reference
[mailto:[EMAIL PROTECTED]]On Behalf Of Sachin S. Khanna
Sent: Thursday, May 10, 2001 9:49 PM
To: [EMAIL PROTECTED]
Subject: Re: package not found


It looks that the web application can't find your bean. Where have you
placed it ?
You need to place it in the /WEB-INF/classes or /WEB-INF/lib (if its in a
.jar file) folder so that your web app can find it.
Have a nice day.
With regards,
Sachin S. Khanna
http://www.emailanorder.com
- Original Message -
From: Sharon Om [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, May 11, 2001 7:10 AM
Subject: package not found


 Hello.  I am just a beginner in JSP and I am having a little bit of
trouble
 instantiating a bean.
 My bean1.java is contained in a package called property and I am calling
 the bean in my JSP file called LTMerch.jsp using the following line:

 !- Find and instantiate the bean, and refer to it as myBean --
 jsp:useBean id=myBean scope=page class=property.bean1/

 I get the following error and I am unable to find out why.  All the files
 seem to be in place. (bean1.class is in the property folder...).

 org.apache.jasper.JasperException: Unable to compile class for

JSPC:\Apache\jakarta-tomcat\work\localhost_8080%2Fexamples\_0002fJSP_0002fLT
 Merch_0002ejspLTMerch_jsp_0.java:72: Class property.bean1 not found.
 property.bean1 myBean = null;
 ^

 Could someone please help me pointing out what might be my problem?
 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://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



help @=sysdate%

2001-05-11 Thread Carroll, Moira

I want to insert a sysdate into my facquiredate column anytime something is
added - where and how do I put the sysdate? - I want the date and the time.
Thanks in advance

I use a bean and a servlet
here is the code from the first jsp page

TR
   TDbAcquire Date: /b/tdtd input type=date name=ffacquiredate
width =15
/td

here is the bean that retrieves it

%@ page language=java %

jsp:useBean id=insertBean scope=request class=jdbc.InsertHandheld/

%
insertBean.setFdeviceid(request.getParameter(ffdeviceid));
insertBean.setFacquiredate(request.getParameter(ffacquiredate));
%

p
The Following HandHeld has been Added:
p
Device Id: %= insertBean.getFdeviceid() %
br
Acquire Date: %= insertBean.getFacquiredate() %
br
/body
/html
Thanks
[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



Re: Printing problem in JSP

2001-05-11 Thread Karau, Joe

well, if you are talking about the output of the jsp (which I'm assuming you
are) not really.  Most browsers will print as much of the page as they can,
and then truncate the rest (speaking about width of course).  The best you
can do is try to design the page so that it will fit onto one page when
printed.





Joseph Karau
Kingland Systems
[EMAIL PROTECTED]
507-536-3629
AIM: jkara3629


-Original Message-
From: anil yeola [mailto:[EMAIL PROTECTED]]
Sent: Friday, May 11, 2001 10:19 AM
To: [EMAIL PROTECTED]
Subject: Printing problem in JSP


Hi,
  Can any one tell me if it is possible to print the
current JSP page in compressed way so that day can fit
on one page on printer.
Thanx
Anil

__
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: Help on JSP Entry Form

2001-05-11 Thread Jann VanOver

This is a JavaScript problem.  http://irt.org/ is a good sight for
Javascript resources.

-Original Message-
From: Joe / NeoSoft [mailto:[EMAIL PROTECTED]]
Sent: Friday, May 11, 2001 4:55 AM
To: [EMAIL PROTECTED]
Subject: Help on JSP Entry Form


Hi,

In the modify mode of a JSP Entry form, when tab is pressed, the cursor
should go to a
field and highlight the complete value in that field. So when a new value is
entered it replaces
the old value completely.
In our case, the cursor gets positioned in the field but doesn't highlight
the old value. So to enter
the new value, manually we have to delete the old value and then enter the
new value.
Any help on this would be appreciated.

Regards
JOE

===
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: JavaMail with JSP

2001-05-11 Thread Nishit Trivedi

hi..
Following code is used to send email (using JavaMail api)
thru one of my xml apps..try this...remove all
xml stuff and make it simple java program (or function)..
this code facilitates also sending attachments with email...
--
xsp:includejavax.mail.*/xsp:include
xsp:includejavax.mail.internet.*/xsp:include
  /xsp:structure

  xsp:logic
private static String SendMailTest() {
  String mailTo = [EMAIL PROTECTED];
  String mailFrom = [EMAIL PROTECTED];
  String mailHost = corporate.planet.net;
  boolean debug = true; // change to get more information
  String msgText = This is just a test mail.\nThis email is from
JavaMail app.;
  String msgText2 = You can write more lines from here.;
  String[] filesToBeAttached =
{C:+File.separator+XmlDTD.ppt,C:+File.separator+Introduction.xml,C:
+File.separator+Introduction.xsl};

  //boolean sendmultipart = Boolean.valueOf(debug).booleanValue();
  boolean sendmultipart = true;
  // set the host
  Properties props = new Properties();
  props.put(mail.smtp.host, mailHost);
  // create some properties and get the default Session
  Session session = Session.getDefaultInstance(props, null);
  session.setDebug(debug);
  try {
   // create a message
   Message msg = new MimeMessage(session);
   // set the from
   InternetAddress from = new InternetAddress(mailFrom);
   msg.setFrom(from);
   InternetAddress[] address = {new InternetAddress(mailTo)};
   msg.setRecipients(Message.RecipientType.TO, address);
   msg.setSubject(JavaMail APIs Test);
   if (!sendmultipart) {
// send a plain text message
msg.setContent(msgText, text/plain);
   } else {
// send a multipart message

//create the Multipart and its parts to it
Multipart mp = new MimeMultipart();

// create and fill the first message part
MimeBodyPart mbp1 = new MimeBodyPart();
mbp1.setContent(msgText, text/plain);
mp.addBodyPart(mbp1);

//mbp2.setContent(msgText2, text/plain);

![CDATA[
//attach the file to the message
for(int i=0;ifilesToBeAttached.length;i++){
 // create and fill the second message part
 MimeBodyPart mbp2 = new MimeBodyPart();
 javax.activation.FileDataSource fds = new
javax.activation.FileDataSource(filesToBeAttached[i]);
 mbp2.setDataHandler(new javax.activation.DataHandler(fds));
 mbp2.setFileName(filesToBeAttached[i]);
 mp.addBodyPart(mbp2);
}
]]

// add the Multipart to the message
msg.setContent(mp);
   }
   Transport.send(msg);
   return successfully sent email;
  } catch (MessagingException mex) {
mex.printStackTrace() ;
  }
  return unsuccessful to send email;
}
  /xsp:logic


hope this helps you..

Nishit
-Original Message-
From: Supreme Being [mailto:[EMAIL PROTECTED]]
Sent: Friday, May 11, 2001 2:24 PM
To: [EMAIL PROTECTED]
Subject: JavaMail with JSP


i succesfully downloaded the JavaMail and JAF from sun's site in order to
use them with my JSP which i'm running on JRun Studio on my win98 PC. i
added the CLASSPATH (in autoexec.bat) as told by the docs along with them.
Now what? coz nothing is working. I have this HTML page and a JSP page which
is supposed to send email...but it's not working... i'm getting a
java.SendMailException error. what do i have to do? is there something i
missed?
The codes i'm using are as follows :
[The HTML Page] : javamail.html

FORM action=sendjavamail.jsp method=post
 TABLE
  TR
   TD width=50%font face=arial color=#ffdead size=2
To:BRINPUT name=to size=25
   /TD
   TD width=50%font face=arial color=#ffdead size=2
From:BRINPUT name=from size=25
   /TD
  /TR
  TR
   TD colspan=2font face=arial color=#ffdead size=2
Subject:BRINPUT name=subject size=50
   /TD
  /TR
  TR
   TD colspan=2font face=arial color=#ffdead size=2
PMessage:BRTEXTAREA name=text rows=5 cols=30/TEXTAREA/P
   /TD
  /TR
 /TABLE
 INPUT type=submit name=cb_submit value= Send 
 INPUT type=reset name=cb_reset value= Clear 
/FORM

[The JSP Page] : javasendmail.jsp

%@ page
  import= javax.mail.*, javax.mail.internet.*,
javax.activation.*,java.util.*
  %
html
body
%

 try{
   Properties props = new Properties();
   Session sendMailSession;
   Store store;
   Transport transport;


  sendMailSession = Session.getInstance(props, null);

  props.put(mail.smtp.host, smtp.jspinsider.com);

  Message newMessage = new MimeMessage(sendMailSession);
  newMessage.setFrom(new InternetAddress(request.getParameter(from)));
  

AW: response already commited

2001-05-11 Thread Michael Jager

To me it looks like the problem with your code is, that you try to forward
after already having committed a response to the out-object (via your
mailForm, which instantiates a PrintStream), which is not possible.

Hope this helps

Michael

-Ursprungliche Nachricht-
Von: A mailing list about Java Server Pages specification and reference
[mailto:[EMAIL PROTECTED]]Im Auftrag von Patrick Pierra
Gesendet: Freitag, 11. Mai 2001 14:07
An: [EMAIL PROTECTED]
Betreff: Re: response already commited


  String mailForm (HttpServletRequest req) throws JspException{
   StringBuffer message = new StringBuffer();

  Enumeration fields = fieldList.elements();

while (fields.hasMoreElements()) {
  formField field = (formField)fields.nextElement();

  message.append(field.name)
 .append( : )
 .append(req.getParameter(field.name))
 .append(\n);
}
 System.out.println(message.toString());
//  Nouveau JavaMail here.

try {
  SmtpClient client = new SmtpClient(mailhost);
  client.from(senderAddress);
  client.to(formRecipient);
  PrintStream msg = client.startMessage();
  msg.println();
  msg.println();
  msg.println(Sujet : Feedback Web);
  msg.println();
  msg.println(message.toString());
  msg.println(--);
  msg.println(Message from [EMAIL PROTECTED]);
  client.closeServer();
  } catch (IOException e) {
   e.printStackTrace();
  }

return (message.toString());
  }

%

%
 if (isValidForm(request)) {
 User tUser = new User();  // here is the problem

 /*tUser.setMUserName(request.getParameter(UserName));
 tUser.setMPassword(request.getParameter(Password));
 session.setAttribute(user, tUser);*/
mailForm(request);

// need to create a 'thanks for your comments' page
//response.sendRedirect(footer_help/thanks.jsp);
 %
 jsp:forward page=thanks.jsp/
 % }
%

 Hello,

 I' try to create an Object in a JSP :

 %
  User tUser = new User();
 ..
 %

 When i run this JSP on Tomcat i receive this error message :

 Error: 500
 Location: /odata1/Registration.jsp
 Internal Servlet Error:
 java.lang.IllegalStateException: Response has already been committed
java.lang.Throwable(java.lang.String)
java.lang.Exception(java.lang.String)
java.lang.RuntimeException(java.lang.String)
java.lang.IllegalStateException(java.lang.String)
void
 org.apache.tomcat.core.HttpServletResponseFacade.sendError(int,
 java.lang.String)
void

org.apache.jasper.runtime.JspServlet.unknownException(javax.servlet.http.Htt

pServletResponse,

 java.lang.Throwable)
void

org.apache.jasper.runtime.JspServlet.service(javax.servlet.http.HttpServletR

equest,

 javax.servlet.http.HttpServletResponse)
void
 javax.servlet.http.HttpServlet.service(javax.servlet.ServletRequest,
 javax.servlet.ServletResponse)
void

org.apache.tomcat.core.ServletWrapper.handleRequest(org.apache.tomcat.core.R

equest,

 org.apache.tomcat.core.Response)
void

org.apache.tomcat.core.ContextManager.service(org.apache.tomcat.core.Request

,

 org.apache.tomcat.core.Response)
void

org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(org.a

pache.tomcat.service.TcpConnection,

 java.lang.Object [])
void org.apache.tomcat.service.TcpConnectionThread.run()
void java.lang.Thread.run()


 any explication ?

 Patrick PIERRA


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

AW: mySQL with JSP

2001-05-11 Thread Michael Jäger

As the handling of database access with JSP is the same as with
applications, applets or servlets, you need to know JDBC (and the link below
is a good one) and SQL. For articles on SQL go to
http://www.onlamp.com/onlamp/general/mysql.csp. Some of the articles there
are specially for beginners. Because you are working with MySQL, another
source might be http://www.mysql.com/articles/index.html although there is
currently only one article posted.

Have a good day

Michael


-Ursprüngliche Nachricht-
Von: A mailing list about Java Server Pages specification and reference
[mailto:[EMAIL PROTECTED]]Im Auftrag von Yee, Hung
Gesendet: Mittwoch, 9. Mai 2001 23:05
An: [EMAIL PROTECTED]
Betreff: Re: AW: mySQL with JSP


You can try this tutorial from Sun's website:
http://www.java.sun.com/docs/books/tutorial/jdbc/index.html

General info on JDBC from Sun:
http://www.java.sun.com/products/jdbc/index.html

-Original Message-
From: Supreme Being [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 09, 2001 11:36 AM
To: [EMAIL PROTECTED]
Subject: Re: AW: mySQL with JSP


great...i had all those directories and i put my .jar file in the right
places. so i think that's happened great. thanks. could you also guide me
towarsd a good tutorial or something on using databases with JSP on the web
or so? one that is good for begginers...
thanks.

SupremeBeing

Date: Mon, 7 May 2001 19:59:45 +0200
From: =?iso-8859-1?Q?Michael_J=E4ger?= [EMAIL PROTECTED]
SUBJECTTo: [EMAIL PROTECTED]

I'm not quite sure about JRun but I suppose it should be the same as with
Tomcat, because it is layed down in the Servlet specifications: If you need
database access only in your web-application, then just put the jar file in
the /WEB-INF/lib-directory of your web-application.
If this directory does not exist yet, simply create it.

So your directory structure should be similar to this:
jrun_path/webapps/your_webapp/WEB-INF/lib/*.jar (with your JSP in the
your_webapp directory).

When starting JRun, all jar files in this lib directory should
automatically
be included in your classpath. However, I think this does not work with
Tomcat under Win98 and I do not know if it works with JRun/Win98.

Alternatively, you can just add the path to your jar file to the classpath
set in your autoexec.bat. If the there is no classpath set in your
autoexec.bat, simply add a line like:
set CLASSPATH=.;C:\path_to_the_jar_file
to the autoexec.bat file (and do not forget to restart your computer aver
having done so).

Good luck

Michael

-Ursprüngliche Nachricht-
Von: A mailing list about Java Server Pages specification and reference
[mailto:[EMAIL PROTECTED]]Im Auftrag von Supreme Being
Gesendet: Montag, 7. Mai 2001 06:53
An: [EMAIL PROTECTED]
Betreff: Re: AW: mySQL with JSP


Simply include the jar file in your classpath and access your
MySQL-databases through the classes of the JDBC-API.

thanks a lot. but can you tell me where exactly (as in, which folder?) do i
have to place my .jar file? i'm using the JRun server. where should i keep
the .jar file so that it's usable when include it in the classpath.

cheers,
T. Edison jr.




Are you a Hoboe?  Hobnob at http://www.hoboe.com
Click here - http://www.hoboe.com Global Mail Access

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



Are you a Hoboe?  Hobnob at http://www.hoboe.com
Click here - http://www.hoboe.com Global Mail Access

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

Re: response already commited

2001-05-11 Thread WANGYU/WANG, YUE (ISDC-ISD-OOCL/SNT)

You are right. When you try to use the forward method, you'll give another
resourse the responsibility of manipulating the Response object. So you
can't use forward if in your code you've already accessed a PrintWriter or
ServletOutputStream object. May wanna try include instead?

Regards,

-Yue

-Original Message-
From: Michael Jager [mailto:[EMAIL PROTECTED]]
Sent: Friday, May 11, 2001 11:44 AM
To: [EMAIL PROTECTED]
Subject: AW: response already commited


To me it looks like the problem with your code is, that you try to forward
after already having committed a response to the out-object (via your
mailForm, which instantiates a PrintStream), which is not possible.

Hope this helps

Michael

-Ursprungliche Nachricht-
Von: A mailing list about Java Server Pages specification and reference
[mailto:[EMAIL PROTECTED]]Im Auftrag von Patrick Pierra
Gesendet: Freitag, 11. Mai 2001 14:07
An: [EMAIL PROTECTED]
Betreff: Re: response already commited


  String mailForm (HttpServletRequest req) throws JspException{
   StringBuffer message = new StringBuffer();

  Enumeration fields = fieldList.elements();

while (fields.hasMoreElements()) {
  formField field = (formField)fields.nextElement();

  message.append(field.name)
 .append( : )
 .append(req.getParameter(field.name))
 .append(\n);
}
 System.out.println(message.toString());
//  Nouveau JavaMail here.

try {
  SmtpClient client = new SmtpClient(mailhost);
  client.from(senderAddress);
  client.to(formRecipient);
  PrintStream msg = client.startMessage();
  msg.println();
  msg.println();
  msg.println(Sujet : Feedback Web);
  msg.println();
  msg.println(message.toString());
  msg.println(--);
  msg.println(Message from [EMAIL PROTECTED]);
  client.closeServer();
  } catch (IOException e) {
   e.printStackTrace();
  }

return (message.toString());
  }

%

%
 if (isValidForm(request)) {
 User tUser = new User();  // here is the problem

 /*tUser.setMUserName(request.getParameter(UserName));
 tUser.setMPassword(request.getParameter(Password));
 session.setAttribute(user, tUser);*/
mailForm(request);

// need to create a 'thanks for your comments' page
//response.sendRedirect(footer_help/thanks.jsp);
 %
 jsp:forward page=thanks.jsp/
 % }
%

 Hello,

 I' try to create an Object in a JSP :

 %
  User tUser = new User();
 ..
 %

 When i run this JSP on Tomcat i receive this error message :

 Error: 500
 Location: /odata1/Registration.jsp
 Internal Servlet Error:
 java.lang.IllegalStateException: Response has already been committed
java.lang.Throwable(java.lang.String)
java.lang.Exception(java.lang.String)
java.lang.RuntimeException(java.lang.String)
java.lang.IllegalStateException(java.lang.String)
void
 org.apache.tomcat.core.HttpServletResponseFacade.sendError(int,
 java.lang.String)
void

org.apache.jasper.runtime.JspServlet.unknownException(javax.servlet.http.Htt

pServletResponse,

 java.lang.Throwable)
void

org.apache.jasper.runtime.JspServlet.service(javax.servlet.http.HttpServletR

equest,

 javax.servlet.http.HttpServletResponse)
void
 javax.servlet.http.HttpServlet.service(javax.servlet.ServletRequest,
 javax.servlet.ServletResponse)
void

org.apache.tomcat.core.ServletWrapper.handleRequest(org.apache.tomcat.core.R

equest,

 org.apache.tomcat.core.Response)
void

org.apache.tomcat.core.ContextManager.service(org.apache.tomcat.core.Request

,

 org.apache.tomcat.core.Response)
void

org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(org.a

pache.tomcat.service.TcpConnection,

 java.lang.Object [])
void org.apache.tomcat.service.TcpConnectionThread.run()
void java.lang.Thread.run()


 any explication ?

 Patrick PIERRA


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

What is SQL SELECT Syntax for strings?

2001-05-11 Thread Ruaidhrí Fernandes

Hi all,
I have a page where a user fills in a form field.
When they hit submit the page is sent to a database
checker page where I want to retrieve all rows in the
table containing the string the user entered in the
form field. I'm not sure how to write this SELECT
statement.
I get this error when I hit the submit button:
javax.servlet.ServletException: [Microsoft][ODBC
Microsoft Access 97 Driver] The SELECT statement
includes a reserved word or an argument name that is
misspelled or missing, or the punctuation is
incorrect
Heres the part of my code:
Basically I want to retrieve all the rows containing
the string the user entered in the form field.
%
 if((request.getParameter(KenSearch)) != null)
 {
String index = request.getParameter(KenwoodChoice);
PreparedStatement pstmt =
conn.prepareStatement(SELECT FROM PRODUCTS WHERE DESC
= (?));
pstmt.clearParameters();
pstmt.setString(1, index);
ResultSet rs = pstmt.executeQuery();

}

Thanks
Rui

=
If a rabbit's foot is so lucky,. what happened to the rabbit?

__
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



JDBC connection

2001-05-11 Thread Sharon Om

Hello.  I have the following code for connecting to the jdbc:odbc pool.
While compiling the Java code, I keep getting an ClassNotFoundException in
Class.forName.
I also tried declaring Class T and have T.forName.  I get the similar error
for T.forName. How can I get this to work?

Thank you for your help.
Sharon

package property;


import java.sql.*;
import java.io.Serializable;

public class database implements java.io.Serializable
{

  public database() {

  }

public String runSql()
{
 String browserOutput = ;
 Connection sqlca = null;
 Statement sqlStatement = null;
 ResultSet myResultSet=null;


 /*Connect to database, run SQL and produce output */

 try {
/* Connection to the database */
Class.forName(sun.jdbc.odbc.JdbcOdbcDrive);
String theDatabase = jdbc:odbc:loadtool;
sqlca = DriverManager.getConnection(theDatabase,loadtool,loadtool);
  }
 catch (SQLException e) {

browserOutput = Error:SQL error of: +e.getMessage();
  }

 return browserOutput;
}

}

===
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: response already commited

2001-05-11 Thread horwat

You can get an IllegalStateException when you attempt to grab the output
stream after something else has written to it.

For example if you use jsp:include, the outer jsp has already called
getWriter() on the response object, the inner jsp will get an
IllegalStateException if it calls getOutputStream() on the same response
object.

Justy

- Original Message -

 Hello,

 I' try to create an Object in a JSP :

 %
  User tUser = new User();
 .
 %

 When i run this JSP on Tomcat i receive this error message :

 Error: 500
 Location: /odata1/Registration.jsp
 Internal Servlet Error:
 java.lang.IllegalStateException: Response has already been committed
java.lang.Throwable(java.lang.String)
java.lang.Exception(java.lang.String)
java.lang.RuntimeException(java.lang.String)
java.lang.IllegalStateException(java.lang.String)
void
 org.apache.tomcat.core.HttpServletResponseFacade.sendError(int,
 java.lang.String)
void

org.apache.jasper.runtime.JspServlet.unknownException(javax.servlet.http.Htt
pServletResponse,

 java.lang.Throwable)
void

org.apache.jasper.runtime.JspServlet.service(javax.servlet.http.HttpServletR
equest,

 javax.servlet.http.HttpServletResponse)
void
 javax.servlet.http.HttpServlet.service(javax.servlet.ServletRequest,
 javax.servlet.ServletResponse)
void

org.apache.tomcat.core.ServletWrapper.handleRequest(org.apache.tomcat.core.R
equest,

 org.apache.tomcat.core.Response)
void

org.apache.tomcat.core.ContextManager.service(org.apache.tomcat.core.Request
,

 org.apache.tomcat.core.Response)
void

org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(org.a
pache.tomcat.service.TcpConnection,

 java.lang.Object [])
void org.apache.tomcat.service.TcpConnectionThread.run()
void java.lang.Thread.run()


 any explication ?

 Patrick PIERRA


===
 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: What is SQL SELECT Syntax for strings?

2001-05-11 Thread dirk kredler

DESC is a reserved word - sorts the affected rows.



alter the table, use an other fieldname,

dirk



- Original Message - 
snip/
conn.prepareStatement(SELECT FROM PRODUCTS WHERE DESC
 = (?));
 pstmt.clearParameters();
 pstmt.setString(1, index);
 ResultSet rs = pstmt.executeQuery();

 }

 Thanks
 Rui
/snap

===
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: JDBC connection

2001-05-11 Thread Karau, Joe

make sure that the class that you are using for the forName([class name])
method is in your classpath.

(not so much a JSP question by the way, but hope this helps)

Joseph Karau
Kingland Systems
[EMAIL PROTECTED]
507-536-3629
AIM: jkara3629


-Original Message-
From: Sharon Om [mailto:[EMAIL PROTECTED]]
Sent: Friday, May 11, 2001 3:23 PM
To: [EMAIL PROTECTED]
Subject: JDBC connection


Hello.  I have the following code for connecting to the jdbc:odbc pool.
While compiling the Java code, I keep getting an ClassNotFoundException in
Class.forName.
I also tried declaring Class T and have T.forName.  I get the similar error
for T.forName. How can I get this to work?

Thank you for your help.
Sharon

package property;


import java.sql.*;
import java.io.Serializable;

public class database implements java.io.Serializable
{

  public database() {

  }

public String runSql()
{
 String browserOutput = ;
 Connection sqlca = null;
 Statement sqlStatement = null;
 ResultSet myResultSet=null;


 /*Connect to database, run SQL and produce output */

 try {
/* Connection to the database */
Class.forName(sun.jdbc.odbc.JdbcOdbcDrive);
String theDatabase = jdbc:odbc:loadtool;
sqlca =
DriverManager.getConnection(theDatabase,loadtool,loadtool);
  }
 catch (SQLException e) {

browserOutput = Error:SQL error of: +e.getMessage();
  }

 return browserOutput;
}

}

===
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: What is SQL SELECT Syntax for strings?

2001-05-11 Thread Kai Hackemesser

 conn.prepareStatement(SELECT FROM PRODUCTS WHERE DESC
 = (?));

should be SELECT * FROM PRODUCTS WHERE DESC LIKE '%?%'

===
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: sending emails

2001-05-11 Thread horwat

One great place to start would be the javamail faq located at
http://java.sun.com/products/javamail/FAQ.html

One of the cool aspects of javaMail is that messages are considered objects.
Manipulating the message can be very easy, just get and set properties on
the message object.


  Message myMessage = new MimeMessage(mailSession);
  myMessage.setFrom(fromAddress);
  myMessage.setRecipient(recipient);
  myMessage.setSubject(subject);
  myMessage.setSentDate(new Date());
  myMessage.setText(messageBody);

  transport = mailSession.getTransport(smtp);
  transport.send(myMessage);


Justy

- Original Message -

 How would you implement the javamail api

 Do you need to download the javamail.
 What are the steps involved to set this up?
 Newbie @ java, please forgive

 What are the benifits of javamail over let's say sendmail program that are
 out there that are free, etc...




 - Original Message -
 From: Jim Rueschhoff [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Thursday, May 10, 2001 9:54 AM
 Subject: Re: sending emails


  A entirely java based email server is Enigma.  It can be found at
  enigma.intouch.ca .  It is a java based email server that offers pop3,
 smtp
  and imap protocols and also offers full public key encryption.  JavaMail
 and
  Engima working together allows for a entirely java based email solution.
 
 
 
  -Original Message-
  From: A mailing list about Java Server Pages specification and reference
  [mailto:[EMAIL PROTECTED]]On Behalf Of Nishit Trivedi
  Sent: Wednesday, May 09, 2001 2:48 PM
  To: [EMAIL PROTECTED]
  Subject: Re: [JSP-INTEREST] sending emails
 
 
  Supreme Being,
  I am not aware of any application server that comes
  with JavaMail. See, JavaMail is not that huge
  api that app server should include. I think there
  are only two jar files that you have to include in
  your classpath for JavaMail..that's it!!!
 
  one more thing..i didn't try this. But the other thing
  what you can do is : Have a simple function (call it
  sendMail()) which gets called from within jsp page
  and this sendMail function will execute unix process,
  and this unix process will use SendMail program which
  sends email..(as we do in perl)..as i told you, this is
  just my thinking..i did not try this..so this might work for
  you. Otherwise for sending mail from jsp page, JavaMail api
  is the best solution...as above, write sendMail function
  which gets called in jsp page.
 
  Nishit
 
  -Original Message-
  From: Supreme Being [mailto:[EMAIL PROTECTED]]
  Sent: Wednesday, May 09, 2001 5:18 PM
  To: [EMAIL PROTECTED]
  Cc: [EMAIL PROTECTED]
  Subject: Re: sending emails
 
 
  Nishit, i do have the coding that needs to be applied in sending email
  through JavaMail in a JSP page. I'm using JRun studio on my win98 PC.
Tell
  me something, do most servers supporting JSP have JavaMail? because if
 they
  don't ... is there an alternate? in any case, is there some other way
 other
  than JavaMail by which you can send email using JSP? Also, i still have
to
  download and install JavaMail onto my machine, if you've done such a
thing
  before..can you tell me if there's any big problem that i might face?
 
  Thanx,
  SupremeBeing
 
 
 
  Date: Wed, 9 May 2001 16:29:34 -0400
  From: Nishit Trivedi [EMAIL PROTECTED]
  SUBJECTTo: [EMAIL PROTECTED]
  
  Koustubh,
  
  Yes. u can use JavaMail api.
  if you don't get success through it, let me know..
  
  Nishit
  
  -Original Message-
  From: Warty, Koustubh [mailto:[EMAIL PROTECTED]]
  Sent: Wednesday, May 09, 2001 4:19 PM
  To: [EMAIL PROTECTED]
  Subject: sending emails
  
  
   Hello ,
  In my application suppose the customer places an Order through
a
  JSP
  page by clicking on the Submit Order button. Is it possible to send
an
  automatic email response back to the client giving him his order
details
 ??
  
   Please do let me know .
  
   thanks,
   - Koustubh
  
  
  
  
  
  
  
  
  
 

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

VisualAge and WebLogic

2001-05-11 Thread Nevarez, Benjamin

Hello,

Anybody using VisualAge for Java and WebLogic. How can I package and deploy
JSP/servlets/EJBs in this environment?

Thanks,

Benjamin

===
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: JDBC connection

2001-05-11 Thread drew w

this is what I have in mine
Class.forName(sun.jdbc.odbc.JdbcOdbcDriver).newInstance();


From: Sharon Om [EMAIL PROTECTED]
Reply-To: A mailing list about Java Server Pages specification and
 reference [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: JDBC connection
Date: Fri, 11 May 2001 13:23:25 -0700

Hello.  I have the following code for connecting to the jdbc:odbc pool.
While compiling the Java code, I keep getting an ClassNotFoundException
in
Class.forName.
I also tried declaring Class T and have T.forName.  I get the similar error
for T.forName. How can I get this to work?

Thank you for your help.
Sharon

package property;


import java.sql.*;
import java.io.Serializable;

public class database implements java.io.Serializable
{

   public database() {

   }

public String runSql()
{
  String browserOutput = ;
  Connection sqlca = null;
  Statement sqlStatement = null;
  ResultSet myResultSet=null;


  /*Connect to database, run SQL and produce output */

  try {
 /* Connection to the database */
 Class.forName(sun.jdbc.odbc.JdbcOdbcDrive);
 String theDatabase = jdbc:odbc:loadtool;
 sqlca =
DriverManager.getConnection(theDatabase,loadtool,loadtool);
   }
  catch (SQLException e) {

 browserOutput = Error:SQL error of: +e.getMessage();
   }

  return browserOutput;
}

}

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



Re: LDAP / TOMCAT / AUTHENTICATION

2001-05-11 Thread horwat

JNDI has a naming API that allows Java applications to access naming systems
like CORBA's Naming services and a directory API that extends the naming
service to provide access to directory services like LDAP. You can take a
look at Tomcat's JNDIRealm.

There is also a recently submitted proposal for a LDAPRealm implementation
in Tomcat 4.0.

Justy

- Original Message -
From: Marc J. Boerma [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, May 11, 2001 2:59 AM
Subject: LDAP / TOMCAT / AUTHENTICATION


 I've build a site where based on the user's role he will see a different
 look. I used the standard authentication meganism that's defined in the
 Servlet API. Tomcat has a tomcat-users.xml file where you define the users
 id, passwords and their roles. I found an article how I can use a database
 where I can put this information in. In the server.xml file of tomcat I
then
 can define that I want to use a database for authentication.

 My Question:

 I don't want to put userid / password into a database, instead I want
Tomcat
 to use our LDAP server in order to authenticate users. Where can I find
 information about this?

 Thanks,

 Marc


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



GET and POST at the same time

2001-05-11 Thread Luis Javier Beltran

Hi all,

I'm trying to upload a file as well as some other parameters. I read some
post before that said that I have to set enctype=multipart/form-data in
the form tag, but that won't let my jsp (I'm handling the upload with a jsp)
to get the other parameters. Does anybody know some other way to upload a
file and some parameters at the same time??

Thanks a lot!

Luis Javier

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



404 Question?

2001-05-11 Thread A Stephen

I would like to know if there is a method we can use to find out is a file
exists ?
Thanks,
Cheers!
S.
_
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



Re: GET and POST at the same time

2001-05-11 Thread Yee, Hung

Take a look at the MultipartRequest package by Jason Hunter.  This will do
want you want, and more:
http://www.servlets.com/cos/index.html



-Original Message-
From: Luis Javier Beltran [mailto:[EMAIL PROTECTED]]
Sent: Friday, May 11, 2001 4:36 PM
To: [EMAIL PROTECTED]
Subject: GET and POST at the same time


Hi all,

I'm trying to upload a file as well as some other parameters. I read some
post before that said that I have to set enctype=multipart/form-data in
the form tag, but that won't let my jsp (I'm handling the upload with a jsp)
to get the other parameters. Does anybody know some other way to upload a
file and some parameters at the same time??

Thanks a lot!

Luis Javier

===
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
This email message is for the sole use of the intended recipient(s) and may
contain proprietary and confidential information. Any unauthorized review,
use, disclosure or distribution is prohibited. If you are not the intended
recipient, please contact the sender by reply email and destroy all copies
of the original message. 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://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



Can anyone answer this??? HELP

2001-05-11 Thread Ruaidhrí Fernandes

Hi all,
Ok, I have a MS Acess database.(I'm using Access cause
I'm doing a small project andi'm a beginner in Jsp)

In the database is a table with 4 columns. I want one
column to contain links so when I retrieve data from
the table and put them in a HTML table, users will be
able to click the links. I also have a page whereby a
user can edit a the database table. This works by
retrieving the data from the table and putting it in
form fields on a web page so the user can edit the
fields and update the database.

The links in the database table are stored as :
a href =urllink/a

When this is retrieved and put in a html table it is
displayed as a link, but the problem occurs when I
retrieve the data to be put in the form fields. I just
want the a href =urllink/a to be displayed,but
only the a href is displayed and part of the link is
displayed outside the form.
Strange stuff.

Anyone know a solution.

Thanks Rui

=
If a rabbit's foot is so lucky,. what happened to the rabbit?

__
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



Another EJB in JSP

2001-05-11 Thread Jimmy

Hello...

I made my own EJB and can be successfully compiled and archived into JAR
file.
I also succeeded in deploying this EJB into Weblogic 5.1.0 ( I noticed : 1
EJB deployed message).

But when I make a reference into this BEAN from JSP :

jsp:useBean id=mybean class=yasa.ejb.myejb.mybean
/jsp:useBean

Believe me, those package name is correct !

The browser said java error...(something about missing class) and at the
weblogic console there are
a lot of exception message.

Why my bean cannot be recognized by the JSP eventhough it can be deployed
successfully ?

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://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 retrieve HTML data to Excel?

2001-05-11 Thread Arnab Nandi

Hi,
I am trying to convert an HTML table generated by the JSP request
objects to Excel. Can you tell me how to do it? I have set the
contentType=application/vnd.ms-excel but how do I retrieve the HTML
table to Excel? The body of the HTML generated by JSP is not coming to
Excel.
Regards,
Arnab Nandi

===
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: Standar Template

2001-05-11 Thread Dmitry Namiot

check out Portal tag on
http://coldjava.hypermart.net/jsp.htm

you may automate creating your tables.

--
Coldjava - server-side Java components
http://coldjava.hypermart.net
__
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



JavaMail with JSP

2001-05-11 Thread Supreme Being

i succesfully downloaded the JavaMail and JAF from sun's site in order to use them 
with my JSP which i'm running on JRun Studio on my win98 PC. i added the CLASSPATH (in 
autoexec.bat) as told by the docs along with them. Now what? coz nothing is working. I 
have this HTML page and a JSP page which is supposed to send email...but it's not 
working... i'm getting a java.SendMailException error. what do i have to do? is there 
something i missed?
The codes i'm using are as follows :
[The HTML Page] : javamail.html

FORM action=sendjavamail.jsp method=post
 TABLE
  TR
   TD width=50%font face=arial color=#ffdead size=2
To:BRINPUT name=to size=25
   /TD
   TD width=50%font face=arial color=#ffdead size=2
From:BRINPUT name=from size=25
   /TD
  /TR
  TR
   TD colspan=2font face=arial color=#ffdead size=2
Subject:BRINPUT name=subject size=50
   /TD
  /TR
  TR
   TD colspan=2font face=arial color=#ffdead size=2
PMessage:BRTEXTAREA name=text rows=5 cols=30/TEXTAREA/P
   /TD
  /TR
 /TABLE
 INPUT type=submit name=cb_submit value= Send 
 INPUT type=reset name=cb_reset value= Clear 
/FORM

[The JSP Page] : javasendmail.jsp

%@ page
  import= javax.mail.*, javax.mail.internet.*, javax.activation.*,java.util.*
  %
html
body
%

 try{
   Properties props = new Properties();
   Session sendMailSession;
   Store store;
   Transport transport;


  sendMailSession = Session.getInstance(props, null);

  props.put(mail.smtp.host, smtp.jspinsider.com);

  Message newMessage = new MimeMessage(sendMailSession);
  newMessage.setFrom(new InternetAddress(request.getParameter(from)));
  newMessage.setRecipient(Message.RecipientType.TO, new 
InternetAddress(request.getParameter(to)));
  newMessage.setSubject(request.getParameter(subject));
  newMessage.setSentDate(new Date());
  newMessage.setText(request.getParameter(text));

  transport = sendMailSession.getTransport(smtp);
  transport.send(newMessage);
   %
PYour mail has been sent./P
%
  }
 catch(MessagingException m)
  {
  out.println(m.toString());
  }
%
/body
/html


Tell me what i'm doing wrong? or if i have to do some other thing or use some other 
codes

Regards,
T. Edison jr.




Are you a Hoboe?  Hobnob at http://www.hoboe.com
Click here - http://www.hoboe.com Global Mail Access

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