Re: exceuting oracle stored procedure in jsp

2001-10-30 Thread Francisco Manuel Martínez Suárez

> -Mensaje original-
> De:   charu gupta [SMTP:[EMAIL PROTECTED]]
> Enviado el:   martes 30 de octubre de 2001 0:42
> Para: [EMAIL PROTECTED]
> Asunto:   exceuting oracle stored procedure in jsp
>
> Hi ,
>
> I have a oracle stored procedure which I call from my
> jsp.It is working fine.
> How can I check if the stored procedure was executed
> succesfully? Is there any value returned by the stored
> procedure which I can check in my jsp?
>
> Thanks,
> Charu
>
>
>
You may add a returning value to your stored procedure (it will
become a stored function ;)) and inside the code of the java stored, catch
any exception may occur and return a code or a message that you desire to
your JSP file.

Hope this helps

Fran
>

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

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



How to print error messages thru System

2001-11-26 Thread Francisco Manuel Martínez Suárez

Hi to all !

I have a web application running on iAS 1.1. against a Oracle8i
database. Some pages call a Java StoredProcedure which is working bad. I'm
trying to set an error file as the output for the System.out.println method
to catch the error from the Java Stored itself but I don´t know how to do
this way. Does anyone know which classes and methods I have to use to have
my error saved in a file... 

   TIA

Fran Martínez

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

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



Virus Alert!!!

2001-11-30 Thread Francisco Manuel Martínez Suárez

   I've received a virus alert in my Microsoft Outlook  in two messages from
Lorena Carlo and Orlando Perdomo.

Archive :   YOU_ARE_.scr
Virus name  :   W32/BadTrans@MM

Please check your systems.

   Thanks to all

  Fran Martinez

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

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



Re: Importing classes

2002-01-14 Thread Francisco Manuel Martínez Suárez

Your ClassPath variable must content the path to the file that contents
your class. I think you can also write the whole path in the code as:

   <%@ page import="dir1\dir2\dir3\travel.*" %>

Hope this helps...

 Fran



> -Mensaje original-
> De:   panos periorellis [SMTP:[EMAIL PROTECTED]]
> Enviado el:   lunes 14 de enero de 2002 15:59
> Para: [EMAIL PROTECTED]
> Asunto:   Importing classes
>
> I have developed some java classes which i want to import in my JSP code..
>
> can somebody tell me how do i do this.
>
> i have a list of classes in a package called travel
>
> but
>
> this <%@ page import="travel.*" %> produces errors. In fact it says that
> the
> package cannot be found?
> Anyone with similar problems?
> thanks
> P
>
> ==
> =
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
> JSP-INTEREST".
> For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
> DIGEST".
> Some relevant FAQs on JSP/Servlets can be found at:
>
>  http://archives.java.sun.com/jsp-interest.html
>  http://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.jsp
>  http://www.jguru.com/faq/index.jsp
>  http://www.jspinsider.com

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

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



Re: Static variables

2002-02-05 Thread Francisco Manuel Martínez Suárez

I would say yes. A static variable is common for all the instances of the
class that contains it. But the User B will only see the change if the page
is sent to the browser after the varible changes

Fran.

> -Mensaje original-
> De:   Gardner Monte [SMTP:[EMAIL PROTECTED]]
> Enviado el:   martes 5 de febrero de 2002 1:29
> Para: [EMAIL PROTECTED]
> Asunto:   Static variables
>
> Hypothetical situation:
>   Say I have a class called Market as such
>
> Class Market
> {
>   static int price = 5;
> }
>
> and I have two different users using JSP pages that access the
> class Market.  If user A runs a JSP page that causes the Market.price
> variable to change, then shortly afterwards, User B runs a page that
> displays the value of Market.price, will the change that user A made be
> reflected on User B's page?
>
> --Monte Glenn Gardner
>
> ==
> =
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
> JSP-INTEREST".
> For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
> DIGEST".
> Some relevant FAQs on JSP/Servlets can be found at:
>
>  http://archives.java.sun.com/jsp-interest.html
>  http://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.jsp
>  http://www.jguru.com/faq/index.jsp
>  http://www.jspinsider.com

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

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



Errors handling App Module Pool

2002-03-15 Thread Francisco Manuel Martínez Suárez

Hi to all! 

We have an JSP application (created with JDeveloper 3.1.1.2) running on
Oracle iAS 1.0.1 server. The data management framework is BC4J objects. The
application modules handling is set to statefull (by default). There is a
problem when giving the application modules instances to the HTTP sessions.
Details: 
1. A browser (user) enters de application and gets a new application module
instance. 
2. It executes a query on a ViewObject that returns a certain data set. 
3. After a while, the browser is closed. 
4. Another browser enters the application elsewhere. 
5. Usually (not always) it is given the instance that displays the
ViewObject with the last data set queried. 

Another case, following the same steps, happens when the first user makes a
transaction (remember we are in statefull) and doesn´t click Commit. Then
the browser is closed. A second browser (opened later) can get the session
with the Commit and Rollback links activated. 

This two cases produce errors on the seconds (and further) browsers which
try to do transactions or simple queries in this "non-valid" instances. This
is not a secure way to work because a user may see data not having
permissions to. 

How can we work around this? Is this normal? Is there any way through which
we can close or destroy the instances assigned to closed HTTP sessions? 

We´re having real troubles with this. 

Thank in advance... 

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

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



Re: Question about page parameters type. String?

2002-04-19 Thread Francisco Manuel Martínez Suárez

The fact is that color is not a string, it is a reference variable to a
String object. The value returned by request.getParameter("color") is an
address to a memory allocation where a String object resides. Inside this
object is the string "red". So if you use == to compare the reference
variable color with the string "red" you will never get a true.

Hope this helps

Fran

> -Mensaje original-
> De:   "Villén Pizarro, Julia" [SMTP:[EMAIL PROTECTED]]
> Enviado el:   viernes 19 de abril de 2002 8:50
> Para: [EMAIL PROTECTED]
> Asunto:   Re: Question about  page parameters type. String?
> 
> This answers are very helpfull and my problem is solved, but not my
> curiosity. 
> As you can see I'm not a Java expert but I don't understand why do I have
> to use this methods when color is a String.
> Just curiosity, 
> thanks,
> Julia
> 
> 
> -Mensaje original-
> De: Vikramjit Singh [mailto:[EMAIL PROTECTED]]
> Enviado el: viernes, 19 de abril de 2002 5:54
> Para: [EMAIL PROTECTED]
> Asunto: Re: Question about page parameters type. String?
> 
> 
> or a much faster way is like this
> 
> <%
> String color;
> color=request.getParameter("color")
> 
> if (color.intern() =="red") {
> --
> whatever1
> }
> else {whatever2}
> 
> %>
> 
> using intern() is quite fast since in equals() each character is checked
> which is quite time consuming which intern() gives you the canonical
> representation of the string.
> in your applications try to use intern() rather than equals().
> 
> Regards,
> Vikramjit Singh,
> Systems Engineer,
> GTL Ltd.
> Ph. 7612929-1031
> 
> 
> -Original Message-
> From: Kesav, Ramesh [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, April 18, 2002 5:19 AM
> To: [EMAIL PROTECTED]
> Subject: Re: Question about page parameters type. String?
> 
> 
> Hi bhusan,
> 
>  That's one point  but she is trying to compare using == method which is
> for
> object referecne but not the value.
> 
> 
> No need of casting as paramater always comes as a String and your color
> variable in the code is also a String so no need of casting.
> -Original Message-
> From:   "Villén Pizarro, Julia" [mailto:[EMAIL PROTECTED]]
>  
> Sent:   Thursday, April 18, 2002 5:22 PM
> To: [EMAIL PROTECTED]  
> Subject:Question about page parameters type. String?
> 
> 
> Hi all!
> I call my_page.jsp this way
> http://my_server/my_page.jsp?color=red
>  
> 
> Then I retrieve the value of the parameter "color" and then try to match
> it,
> in the following way:
> 
> <%
> String color;
> color=request.getParameter("color")
> if (color=="red") {
> whatever1
> }
> else {whatever2}
> 
> %>
> 
> The answer is whatever2. I made sure the page is getting the parameter
> right
> by writing it out. The question is if I have to do any kind of casting.
> Thaks in advance,
> Julia
> 
> =
> To unsubscribe: mailto [EMAIL PROTECTED]
> 
> with body: "signoff JSP-INTEREST".
> For digest: mailto [EMAIL PROTECTED] 
> with body: "set JSP-INTEREST DIGEST".
> Some relevant FAQs on JSP/Servlets can be found at:
> http://archives.java.sun.com/jsp-interest.html
>  
> http://java.sun.com/products/jsp/faq.html
>  
> http://www.esperanto.org.nz/jsp/jspfaq.jsp
>  
> http://www.jguru.com/faq/index.jsp  
> http://www.jspinsider.com  
> 
> ==
> To
> unsubscribe: mailto [EMAIL PROTECTED] 
> with body: "signoff JSP-INTEREST".
> For digest: mailto [EMAIL PROTECTED] 
> with body: "set JSP-INTEREST DIGEST".
> Some relevant FAQs on JSP/Servlets can be found at:
> http://archives.java.sun.com/jsp-interest.html
>  
> http://java.sun.com/products/jsp/faq.html
>  
> http://www.esperanto.org.nz/jsp/jspfaq.jsp
>  
> http://www.jguru.com/faq/index.jsp  
> http://www.jspinsider.com  
> 
> ==
> To
> unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
> JSP-INTEREST".
> For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
> DIGEST".
> Some relevant FAQs on JSP/Servlets can be found at:
> 
>  http://archives.java.sun.com/jsp-interest.html
>  http://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.jsp
>  http://www.jguru.com/faq/index.jsp
>  http://www.jspinsider.com
> 
> =
> To unsubscribe: m

Re: pls try and tell me why not working

2002-05-03 Thread Francisco Manuel Martínez Suárez

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

Regards

Fran Martinez


> -Mensaje original-
> De:   [Vaishali S. Pandya] [SMTP:[EMAIL PROTECTED]]
> Enviado el:   viernes 3 de mayo de 2002 11:15
> Para: [EMAIL PROTECTED]
> Asunto:   pls try and tell me why not working
>
> hello.jsp
> 
> 
> Hello User
> 
>  function getfocus(){
>   document.hello.username.focus();
>  }
>  function submit1(){
>   document.hello.action="hello.jsp?check=1"
>   document.hello.submit()
>  }
>  function reset1(){
>   document.hello.action="hello.jsp?check=0"
>   document.hello.submit()
>  }
> 
> 
> 
> 
> 
> 
> Hi! I am Vaishali. Who are you?
> 
> 
> 
> 
> 
> 
> 
> <%
>  String name = request.getParameter("username");
>  String chk  = request.getParameter("check");
>  if (name != null && chk != null){
>   name = name.trim();
>   if (!(name.equals("")) && (chk.equals("1"))){
> %>
>
>Hello <%=name%>
> <%
>   }
>  }
> %>
> 
> 
> 
> 
> 
>
>
>
>
> login.jsp
> 
> 
>  Login Window 
> 
>  function getfocus(){
>   document.login.user.focus();
>  }
>  function submit1(){
>   document.login.action="login.jsp?check=1";
>   document.login.submit();
>  }
>  function reset1(){
>   document.login.user.value="";
>   document.login.pword.value="";
>   document.login.action="login.jsp?check=0";
>   document.login.submit();
>  }
> 
> 
> 
> 
> 
>  
>   Login
>   
>  
>  
>   Password
>   
>  
>  
>="submit1()">
>onclick="reset1
> ()">
>  
> 
> 
> 
>
> <%
>  String user = request.getParameter("user");
>  String pword = request.getParameter("pword");
>  String chk = request.getParameter("check");
>  if(user != null && pword != null && chk != null){
>   if (chk.equals("0")){
> %>
> 
>getfocus();
> 
> <%
>   }
>   else{
>user = user.trim();
>if (!(user.equals(""))){
> if (user.equals("ril") && pword.equals("india")){
> %>
> 
>  alert("Yes! You have done it!!!");
>  document.login.action="hello.jsp"
>  document.login.submit()
> 
> <%
> }
> else{
> %>
>  Sorry! Wrong User name or Password!!!
> <%
> }
>}
>   }
>  }
> %>
> 
> 
> 
>
>
>
> --
> i am opening login.jsp
> gives ril and india
> it gives me alert but hello.jsp is not opening and gives me
>
> Done, but with error on page.
>
> Thanks
> Vaishali
> Reliance Ind. Ltd
> Ahmedabad
>
> ==
> =
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
> JSP-INTEREST".
> For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
> DIGEST".
> Some relevant FAQs on JSP/Servlets can be found at:
>
>  http://archives.java.sun.com/jsp-interest.html
>  http://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.jsp
>  http://www.jguru.com/faq/index.jsp
>  http://www.jspinsider.com

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

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



Re: how to know what is there in jar file?

2002-05-07 Thread Francisco Manuel Martínez Suárez

You can view it using WinZip as it were a zip file. Probably you'll find
classes.

Regards


> -Mensaje original-
> De:   [Vaishali S. Pandya] [SMTP:[EMAIL PROTECTED]]
> Enviado el:   martes 7 de mayo de 2002 12:24
> Para: [EMAIL PROTECTED]
> Asunto:   how to know what is there in jar file?
>
> hi  all
>
> somebody sent me a jar file
> i don't know what is there in that jar file
> how to know?
>
> Vaishali
>
> ==
> =
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
> JSP-INTEREST".
> For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
> DIGEST".
> Some relevant FAQs on JSP/Servlets can be found at:
>
>  http://archives.java.sun.com/jsp-interest.html
>  http://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.jsp
>  http://www.jguru.com/faq/index.jsp
>  http://www.jspinsider.com

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

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



Re: how to know what is there in jar file?

2002-05-07 Thread Francisco Manuel Martínez Suárez

No, I think you're wrong. I can see the classes and I can extract them too.
They have their correct size.

See it again

Fran


> -Mensaje original-
> De:   [Vaishali S. Pandya] [SMTP:[EMAIL PROTECTED]]
> Enviado el:   martes 7 de mayo de 2002 13:07
> Para: [EMAIL PROTECTED]
> Asunto:   Re: how to know what is there in jar file?
>
> thank you
> well i did it unzip and i got a list of classes and java files with size
> of
> 0 bite (no content)
> as i think, using winzip u can know which classes are there in that
> particuler jar file
> but u can't know what the classes or java files have.
>
> Regards
> Vaishali
>
>
>
>
> You can view it using WinZip as it were a zip file. Probably you'll find
> classes.
>
> Regards
>
>
> > -Mensaje original-
> > De:   [Vaishali S. Pandya] [SMTP:[EMAIL PROTECTED]]
> > Enviado el:   martes 7 de mayo de 2002 12:24
> > Para: [EMAIL PROTECTED]
> > Asunto:   how to know what is there in jar file?
> >
> > hi  all
> >
> > somebody sent me a jar file
> > i don't know what is there in that jar file
> > how to know?
> >
> > Vaishali
> >
> >
> ==
> > =
> > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
> > JSP-INTEREST".
> > For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
> > DIGEST".
> > Some relevant FAQs on JSP/Servlets can be found at:
> >
> >  http://archives.java.sun.com/jsp-interest.html
> >  http://java.sun.com/products/jsp/faq.html
> >  http://www.esperanto.org.nz/jsp/jspfaq.jsp
> >  http://www.jguru.com/faq/index.jsp
> >  http://www.jspinsider.com
>
> ==
> =
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
> JSP-INTEREST".
> For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
> DIGEST".
> Some relevant FAQs on JSP/Servlets can be found at:
>
>  http://archives.java.sun.com/jsp-interest.html
>  http://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.jsp
>  http://www.jguru.com/faq/index.jsp
>  http://www.jspinsider.com
>
> ==
> =
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
> JSP-INTEREST".
> For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
> DIGEST".
> Some relevant FAQs on JSP/Servlets can be found at:
>
>  http://archives.java.sun.com/jsp-interest.html
>  http://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.jsp
>  http://www.jguru.com/faq/index.jsp
>  http://www.jspinsider.com

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

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



Re: JSP & Servlets

2002-05-20 Thread Francisco Manuel Martínez Suárez

I have three answers:

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

Regards

Fran

> -Mensaje original-
> De:   GW [SMTP:[EMAIL PROTECTED]]
> Enviado el:   lunes 20 de mayo de 2002 13:16
> Para: [EMAIL PROTECTED]
> Asunto:   JSP & Servlets
>
> Hi All
>
> As far as possible JSP pages should only contain presentation data (html)
> and not embedded java code. Programmatical logic should be handled in
> beans and servlets and not in jsp pages.
>
> Can someone please be kind enough to tell my why this is important?
>
> Kind Regards
> GW
>
> ==
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
> JSP-INTEREST".
> For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
> DIGEST".
> Some relevant FAQs on JSP/Servlets can be found at:
>
>  http://archives.java.sun.com/jsp-interest.html
>  http://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.jsp
>  http://www.jguru.com/faq/index.jsp
>  http://www.jspinsider.com

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

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



Re: convert a String to Boolean

2002-05-22 Thread Francisco Manuel Martínez Suárez

Intead of using 1 and 0, can you use 'true' and 'false'? . In the package
java.lang there is a class named Boolean which has two constructors. One of
them uses a String as argument and creates a Boolean with true value if the
given string  is 'true' (ignoring case). If the string is null or has any
other value it creates a false boolean variable.

See the java.lang.Boolean reference for more details on
http://java.sun.com/j2se/1.4/docs/api/java/lang/Boolean.html

Regards 

Fran


> -Mensaje original-
> De:   Carlos [SMTP:[EMAIL PROTECTED]]
> Enviado el:   miércoles 22 de mayo de 2002 9:39
> Para: [EMAIL PROTECTED]
> Asunto:   convert a String to Boolean
> 
> i have in a jsp page this:
> String state = request.getParameter("state");
> state can be 1 or 0.
> how can i convert this value to Boolean?
> thanks
> 
> ==
> =
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
> JSP-INTEREST".
> For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
> DIGEST".
> Some relevant FAQs on JSP/Servlets can be found at:
> 
>  http://archives.java.sun.com/jsp-interest.html
>  http://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.jsp
>  http://www.jguru.com/faq/index.jsp
>  http://www.jspinsider.com

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

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



Re: u can not get COLSPAN in javascript

2002-05-23 Thread Francisco Manuel Martínez Suárez

I´ve never done this before, but I have a text here that could be helpful.
Try this:

document.all.mytd.style.getAttribute("colspan",case)

where case is a string with value "true" if you want case sensitive or
"false" if you don´t.

Hope this works

Fran

> -Mensaje original-
> De:   [Vaishali S. Pandya] [SMTP:[EMAIL PROTECTED]]
> Enviado el:   jueves 23 de mayo de 2002 10:12
> Para: [EMAIL PROTECTED]
> Asunto:   u can not get COLSPAN in javascript
> 
> i have tried a lot
> and don't able to know colspan of mytd which is  colspan=5>
> in
> 
> alert(mytd.id)
> alert(mytd.width)
> alert(mytd.colspan)
> 
> it gives me
> 
> mytd
> 10%
> undefined
> 
> Why?
> 
> Vaishali
> Relience Ind Ltd
> A'bad
> 
> ==
> =
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
> JSP-INTEREST".
> For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
> DIGEST".
> Some relevant FAQs on JSP/Servlets can be found at:
> 
>  http://archives.java.sun.com/jsp-interest.html
>  http://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.jsp
>  http://www.jguru.com/faq/index.jsp
>  http://www.jspinsider.com

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

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



HTML LOV

2002-06-05 Thread Francisco Manuel Martínez Suárez

Hi all,

Does anyone know Javascript code, JSP tag, scriplet or something from which
I could make a LOV. The LOV has to appear in a different window from where
the users works. It should have the same behavior (or at least, very near)
than the Oracle Forms Developer ones, although any type of LOV would be
appreciate because I know Forms ones are very complex.

Thanks

Fran

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

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



Re: Problemas con la recursividad

2002-07-02 Thread Francisco Manuel Martínez Suárez

Could you pass these objects as arguments inside your recursively function?
I have to do this when I use beans which use session and out objects...

Fran
 

> -Mensaje original-
> De:   Manuel Rodriguez Diaz [SMTP:[EMAIL PROTECTED]]
> Enviado el:   martes 2 de julio de 2002 10:29
> Para: [EMAIL PROTECTED]
> Asunto:   Problemas con la recursividad
> 
> Hi,
> I have write a function inside the <%! %> tags of a JSP page that is
> called recursivelly.
> The fact is that i'm not able to access implicit JSP objects like
> session or out.
> ¿Is that true or am i doing something wrong?
> ¿How can i bypass this problem?
> 
> Thankyou
> 
> ==
> =
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
> JSP-INTEREST".
> For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
> DIGEST".
> Some relevant FAQs on JSP/Servlets can be found at:
> 
>  http://archives.java.sun.com/jsp-interest.html
>  http://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.jsp
>  http://www.jguru.com/faq/index.jsp
>  http://www.jspinsider.com

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

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



Re: source javascript in JSP

2002-07-14 Thread Francisco Manuel Martínez Suárez

JavaScript only works at client side, I mean, when the page arrives to the
browser. JSP works at the server, so you can, of course add JavaScript code
in your JSP but it will be executed when the page gets rendered at the
browser. To add JavaScript in JSP just add the html tags to do it. For
example:

// THIS IS A JSP PAGE





funtion setItem(ItemValue)
 document.forms[0].Item.value= 'BLABLA'



<% jsp scriptlet with java code %>

<% if request.getParameter("Param1").equals("VALUE") { %>

alert("Param1 has been set")
document.forms[1].Item3.selectedIndex=1

<% }  %>

<% ...more java code %>




// END OF JSP PAGE

As you see you can combine the code as you will. The static code will be
rendered always but that inside de if will be rendered only if Param1's
value is "VALUE". 

Hope this helps




> -Mensaje original-
> De:   SUBSCRIBE JSP-INTEREST Lennie Gu [SMTP:[EMAIL PROTECTED]]
> Enviado el:   sábado 13 de julio de 2002 2:21
> Para: [EMAIL PROTECTED]
> Asunto:   source javascript in JSP
> 
> I know we can import external javascript in html pages. But I tried to
> import the javascript in JSP, it seems that it can't work.  May I know is
> it posible to do it?  how should I do it?  I need the javascript to do
> some common input validations.  Thanks.
> 
> ==
> =
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
> JSP-INTEREST".
> For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
> DIGEST".
> Some relevant FAQs on JSP/Servlets can be found at:
> 
>  http://archives.java.sun.com/jsp-interest.html
>  http://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.jsp
>  http://www.jguru.com/faq/index.jsp
>  http://www.jspinsider.com

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

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



Re: JSP problem

2002-07-29 Thread Francisco Manuel Martínez Suárez

Perhaps you are usuing a HttpSession class which doesn´t have these method
yet, I mean, setAttribute and getAttribute are substitutes to setValue and
getValue (these two are deprecated).

Fran


> -Mensaje original-
> De:   Shankar [SMTP:[EMAIL PROTECTED]]
> Enviado el:   lunes 29 de julio de 2002 9:06
> Para: [EMAIL PROTECTED]
> Asunto:   Re: JSP problem
> 
> Hello,
> 
> Your code works fine.
> I guess it is the class path problem.
> 
> Shankar
> 
> Gopinath d schrieb:
> 
> > hi all,
> >
> > pl have a look at the code given below.
> >
> > The Current Session id is: <%= session.getId()%>
> > <%
> >  out.println("Click me");
> >  session.setAttribute("uname","ABC");
> >  out.println(session.getAttribute("uname"));
> > %>
> >
> > //End of the program
> >
> > If i execute the program, it displays an error message stating that
> >
> > E:\JavaWebServer2.0\tmpdir\default\pagecompile\jsp\_fst.java:78: Method
> setAttribute(java.lang.String, java.lang.String) not found in interface
> javax.servlet.http.HttpSession.
> >session.setAttribute("uname","ABC");
> >^
> > E:\JavaWebServer2.0\tmpdir\default\pagecompile\jsp\_fst.java:79: Method
> getAttribute(java.lang.String) not found in interface
> javax.servlet.http.HttpSession.
> >out.println(session.getAttribute("uname"));
> >^
> > 2 errors
> >
> > what may be the reason?
> >
> > Thanks in advance.
> >
> > Regards,
> > Gopi
> >
> >
> ==
> =
> > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
> JSP-INTEREST".
> > For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
> DIGEST".
> > Some relevant FAQs on JSP/Servlets can be found at:
> >
> >  http://archives.java.sun.com/jsp-interest.html
> >  http://java.sun.com/products/jsp/faq.html
> >  http://www.esperanto.org.nz/jsp/jspfaq.jsp
> >  http://www.jguru.com/faq/index.jsp
> >  http://www.jspinsider.com
> 
> ==
> =
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
> JSP-INTEREST".
> For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
> DIGEST".
> Some relevant FAQs on JSP/Servlets can be found at:
> 
>  http://archives.java.sun.com/jsp-interest.html
>  http://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.jsp
>  http://www.jguru.com/faq/index.jsp
>  http://www.jspinsider.com

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

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



Re: Checkboxes

2002-10-08 Thread Francisco Manuel Martínez Suárez

Perhaps you could read the state of the checkbox before submitting and
append to the target url using the name of the field in which the checkbox
is set and the value N if is not checked.

Something like this in JavaScript:

if ( ! yourfield.checked) {
document.yourform.action = "YourTargetPage.xxx?yourfield=N"
}else  document.yourform.action = "YourTargetPage.xxx"

document.yourform.submit()

On submit the browser will append the rest of the fields by itself.

Hope this helps

Fran





> -Mensaje original-
> De:   Kenny G. Dubuisson, Jr. [SMTP:[EMAIL PROTECTED]]
> Enviado el:   martes 8 de octubre de 2002 15:48
> Para: [EMAIL PROTECTED]
> Asunto:   Checkboxes
>
> I have a checkbox question.  I'm trying to retreive a value from an HTML
> checkbox in my JSP code.  I want the checkbox to have 3 states:  1) null
> meaning the page is hit the first time; 2) checked with a value of "Y"; 3)
> unchecked with a value of "N".  What I seem to be getting are the first
> two
> and not the third.  Instead of showing an unchecked value of "N", I get
> just
> a value of null.
>
> Any ideas on how to handle this?  Thanks,
> Kenny
>
> ==
> =
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
> JSP-INTEREST".
> For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
> DIGEST".
> Some relevant FAQs on JSP/Servlets can be found at:
>
>  http://archives.java.sun.com/jsp-interest.html
>  http://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.jsp
>  http://www.jguru.com/faq/index.jsp
>  http://www.jspinsider.com

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

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



Re: Checkboxes using JSPs

2002-11-05 Thread Francisco Manuel Martínez Suárez
Hi.
You can use JavaScript. Before you submit the form, call a JS function that
checks the state (checked==true or checked==false) of the checkbox and
construct the url with the value of this field. For example:

function mysubmit()
{
if ( ! document.myform.mycheckbox.checked) 
document.myform.action="mypage.jsp?mycheckboxname=false";

document.myform.submit(); // At this point the rest of values are
automatically appended to the URL
}

Is an idea, I haven´t test it although is well constructed.
Hope this helps.

Fran Martínez

> -Mensaje original-
> De:   Aruniima Chakrabarti [SMTP:[EMAIL PROTECTED]]
> Enviado el:   martes 5 de noviembre de 2002 11:34
> Para: [EMAIL PROTECTED]
> Asunto:   Re: Checkboxes using JSPs
> 
> There is a function getParameterValues which returns an array... 
> 
> Regards,
> aruniima
> 
>  -Original Message-
> From:   Amit Ghaste [mailto:amit@;GHASTE.COM] 
> Sent:   Tuesday, November 05, 2002 1:32 AM
> To: [EMAIL PROTECTED]
> Subject: Re: Checkboxes using JSPs
> 
> if the checkbox is not set the getparameter returns null, else it returns
> the corresponding value
> 
> -Original Message-
> From: A mailing list about Java Server Pages specification and reference
> [mailto:JSP-INTEREST@;JAVA.SUN.COM]On Behalf Of Graeme McLaren
> Sent: Sunday, November 03, 2002 7:26 AM
> To: [EMAIL PROTECTED]
> Subject: Checkboxes using JSPs
> 
> 
> Hi all, I was wondering how you would deal with checkboxes using JSPs.  In
> PHP one way is to use the isset() function.  How would you test to see if
> a
> checkbox has been checked with JSPs?
> 
> Do you have to use a similar function or can you simply do something like:
> 
> if(thecheckbox == 1)
> {
>   print "the checkbox was checked";
> }
> 
> else
> {
>   print "the checkbox wasn't checked";
> }
> 
> 
> Cheers,
> 
> Graeme :)
> 
> 
> Public Sub House()
> 
> On Error Resume drink
> 
>  If Pint.empty = True Then
>  Pint.refill
>Else
>  Pint.drink
>  End if
> 
> stomach.add Pint
> 
> MsgBox " I've had  " & stomach.count & " Pints"
> MsgBox "VERY DRUNK"
> 
> End Sub
> 
> 
> 
> _
> Surf the Web without missing calls! Get MSN Broadband.
> http://resourcecenter.msn.com/access/plans/freeactivation.asp
> 
> ==
> =
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
> JSP-INTEREST".
> For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
> DIGEST".
> Some relevant FAQs on JSP/Servlets can be found at:
> 
>  http://archives.java.sun.com/jsp-interest.html
>  http://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.jsp
>  http://www.jguru.com/faq/index.jsp
>  http://www.jspinsider.com
> 
> ==
> =
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
> JSP-INTEREST".
> For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
> DIGEST".
> Some relevant FAQs on JSP/Servlets can be found at:
> 
>  http://archives.java.sun.com/jsp-interest.html
>  http://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.jsp
>  http://www.jguru.com/faq/index.jsp
>  http://www.jspinsider.com
> 
> ==
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
> JSP-INTEREST".
> For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
> DIGEST".
> Some relevant FAQs on JSP/Servlets can be found at:
> 
>  http://archives.java.sun.com/jsp-interest.html
>  http://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.jsp
>  http://www.jguru.com/faq/index.jsp
>  http://www.jspinsider.com

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

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



Re: JSP inside Javascript

2002-12-10 Thread Francisco Manuel Martínez Suárez
You can use the tags JSP wherever you need as it:



//javascript sentences...

<%

// JSP sentences. See the tags starting and ending the JSP code

%>

// continue with JavaScript sentences



But, remember... JSP is executed at ServerSide. Actually, when the page
arrives to the browser, inside the JSP tags you will have the output (if
any) of the JSP code, but no JSP code will be executed at the client
(browser).

Hope this helps

Fran


> -Mensaje original-
> De:   Amit Gupta [SMTP:[EMAIL PROTECTED]]
> Enviado el:   lunes 9 de diciembre de 2002 3:12
> Para: [EMAIL PROTECTED]
> Asunto:   JSP inside Javascript
>
> Can we have JSP expression inside javascript? I have javascript which is
> generating tree structure but I want to have JSP expression inside the
> tree.
> If anybody knows how to put this I will appreciate if somebody forward me
> example or link.
> Thanx
> Amit
>
> ==
> =
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
> JSP-INTEREST".
> For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
> DIGEST".
> Some relevant FAQs on JSP/Servlets can be found at:
>
>  http://archives.java.sun.com/jsp-interest.html
>  http://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.jsp
>  http://www.jguru.com/faq/index.jsp
>  http://www.jspinsider.com

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

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



Re: exit from the current loop

2003-01-23 Thread Francisco Manuel Martínez Suárez
Use break; as well.

Regards

> -Mensaje original-
> De:   karthik s [SMTP:[EMAIL PROTECTED]]
> Enviado el:   jueves 23 de enero de 2003 11:52
> Para: [EMAIL PROTECTED]
> Asunto:   exit from the current loop
>
> hi all,
>   Is there any thing to exit from the current loop in Java as we hav
> break in c++.
> Rgds,
> Karthik
>
>
>
>
> _
> Add photos to your e-mail with MSN 8. Get 2 months FREE*.
> http://join.msn.com/?page=features/featuredemail
>
> ==
> =
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
> JSP-INTEREST".
> For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
> DIGEST".
>
> Some relevant archives, FAQs and Forums on JSPs can be found at:
>
>  http://java.sun.com/products/jsp
>  http://archives.java.sun.com/jsp-interest.html
>  http://forums.java.sun.com
>  http://www.jspinsider.com

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

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

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



Re: exit from the current loop

2003-01-23 Thread Francisco Manuel Martínez Suárez
Yes, but it will go to the condition to check it again. This may cause to be
in the loop again if the condition is true.

Regards
Fran


> -Mensaje original-
> De:   Jayant Kataria [SMTP:[EMAIL PROTECTED]]
> Enviado el:   jueves 23 de enero de 2003 12:05
> Para: [EMAIL PROTECTED]
> Asunto:   Re: exit from the current loop
>
> Hi,
> "continue" is what will take you out of the current iteration.
>
> regards
> Jayant
>
> -Original Message-
> From: Kuruba, Chandrashekar (Cognizant)
> [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, January 23, 2003 5:32 PM
> To: [EMAIL PROTECTED]
> Subject: Re: exit from the current loop
>
>
> i guess break is also there in java which is one of the keyword
>
> regards,
> KCS
>
> -Original Message-
> From: karthik s [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, January 23, 2003 5:22 PM
> To: [EMAIL PROTECTED]
> Subject: exit from the current loop
>
>
> hi all,
>   Is there any thing to exit from the current loop in Java as we hav
> break in c++.
> Rgds,
> Karthik
>
>
>
>
> _
> Add photos to your e-mail with MSN 8. Get 2 months FREE*.
> http://join.msn.com/?page=features/featuredemail
>
> ==
> =
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
> JSP-INTEREST".
> For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
> DIGEST".
>
> Some relevant archives, FAQs and Forums on JSPs can be found at:
>
>  http://java.sun.com/products/jsp
>  http://archives.java.sun.com/jsp-interest.html
>  http://forums.java.sun.com
>  http://www.jspinsider.com
>
> ==
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
> JSP-INTEREST".
> For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
> DIGEST".
>
> Some relevant archives, FAQs and Forums on JSPs can be found at:
>
>  http://java.sun.com/products/jsp
>  http://archives.java.sun.com/jsp-interest.html
>  http://forums.java.sun.com
>  http://www.jspinsider.com

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

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

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



JSP functions vs

2003-02-26 Thread Francisco Manuel Martínez Suárez
Hi all!

I wonder if are there strong reasons to choose one of these: include JSP or
 methods to include functions in a JSP.
What I want is to have in JSP's some methods, let's say, heavy mathematical
methods that can be accesed from any of the JSP's in a web application.

If I use a class to have these method, I would have to use  to
get instances of it. On the other hand, having those methods in a JSP I
would have to include that page in every JSP that use the methods.

Does any one know advantages and disadvantages has each one.

Thanks
Fran Martínez

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

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

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


JSP function page vs Static Class Bean

2003-02-27 Thread Francisco Manuel Martínez Suárez
Hi all!

Let's assume we want have some methods accesible from every JSP page in our
web site, mathematical or connection methods, for instance.

I propose two ways to do this:
1. Create a class with static methods and use it from the pages.
2. Create a JSP page with these methods in it, as you know:
<%!
function1_declaration {
code for function1
}
function2_declaration {
code for function2
}
%>

I wonder which are the benefits and harms of both aproaches. Does anyone
dare to replay? :D

Thanks to all
Regards
Fran

PS: I forgot to say that the second method implies to include this "function
JSP page" into every page that use the methods as
<%@ include file = "functions.jsp"%>

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

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

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


Re: Null pointer Exception while sending multiple list options

2003-03-14 Thread Francisco Manuel Martínez Suárez
Loading values into a select field doesn´t set the value of it. So if the
user doesn´t choose anything, the onChange event is not sent to the select
field and when submit, the field prog_name has no value. I can´t remember if
not having value makes the field not to be included in the url as parameter.
But if no value is selected you can´t ask for them. Ask first for the
existence of the parameter, then for its values. Here is a reference for
that method in javax.servlet.ServletRequest interface. 

REFERENCE
getParameterValues
public java.lang.String[] getParameterValues(java.lang.String name)
Returns an array of String objects containing all of the values the
given request parameter has, or null if the parameter does not exist. For
example, in an HTTP servlet, this method returns an array of String objects
containing the values of a query string or posted form. 
If the parameter has a single value, the array has a length of 1.
Parameters: 
name - a String containing the name of the parameter whose value is
requested 
Returns: 
an array of String objects containing the parameter's values 
See Also: 
getParameter(java.lang.String)
<../../javax/servlet/ServletRequest.html>






> -Mensaje original-
> De:   Venkat [SMTP:[EMAIL PROTECTED]
> Enviado el:   viernes 14 de marzo de 2003 10:18
> Para: [EMAIL PROTECTED]
> Asunto:   Null pointer Exception while sending multiple list options
> 
> Hi all,
> I am sending multiple list options from one jsp to another.
> 
> in my first jsp i am retrieving values from db and and displaying to user
> to
> select them.
> 
> 
> while(rs.next()){
> String str=rs.getString("prog_name");
> out.println(""+str+"");
> }
> 
> 
> I am retrieveing the selected (more than one or at least one)which user
> selects to my second jsp page
> 
> 
> try{
> String[] prog=null;
> prog=request.getParameterValues("prog_name");
> }catch(Exception e){}
> 
> 
> this works fine when user select at least one value.But if he doesn't
> selects anything
> i am getting null pointer exception.
> 
> Can any one help me where i went wrong.
> 
> Thanks in advance
> venkat
> 
> ==
> =
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
> JSP-INTEREST".
> For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
> DIGEST".
> 
> Some relevant archives, FAQs and Forums on JSPs can be found at:
> 
>  http://java.sun.com/products/jsp
>  http://archives.java.sun.com/jsp-interest.html
>  http://forums.java.sun.com
>  http://www.jspinsider.com

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

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

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


Re: Null pointer Exception while sending multiple list options

2003-03-14 Thread Francisco Manuel Martínez Suárez
Oh ok! Sorry for the explanation.

Respecting the NPE... perhaps it is happening before you the try catch
block...
That work around you implemented works fine so go ahead...
Good luck!


> -Mensaje original-
> De:   Venkat [SMTP:[EMAIL PROTECTED]
> Enviado el:   viernes 14 de marzo de 2003 11:43
> Para: [EMAIL PROTECTED]
> Asunto:   Re: Null pointer Exception while sending multiple list
> options
> 
> Hi,
> Thanks for the info. I know that it return you a string array if they
> selected and if not selected it return you a null.
> 
> But actually what i want to do is
> User MUST select at least one values.This is a mandatory field.
> I want to catch exception if user does'nt select any thing in server side.
> Ok i can do it using client side but i am not relie completely on client
> code.So i have to check in serverside as well.
> 
> Ok back to my problem if user doesn't selects any thing i am getting null
> pointer exception and i want to catch this and do some prosses.
> 
> I got a work around.
> Enumeration enum=reques.getParameterNames();
> This will retrun you all the parameters
> then by checking wether there is a parameter with the name prog_name i am
> proceding further.
> 
> But i didn't understand why can't i catch the nullpointer when i used the
> try catch block?
> 
> Thanks for any help
> venkat
> 
> -Original Message-
> From: A mailing list about Java Server Pages specification and reference
> [mailto:[EMAIL PROTECTED] Behalf Of Francisco Manuel Martínez
> Suárez
> Sent: Friday, March 14, 2003 3:57 PM
> To: [EMAIL PROTECTED]
> Subject: Re: Null pointer Exception while sending multiple list options
> 
> 
> Loading values into a select field doesn´t set the value of it. So if the
> user doesn´t choose anything, the onChange event is not sent to the select
> field and when submit, the field prog_name has no value. I can´t remember
> if
> not having value makes the field not to be included in the url as
> parameter.
> But if no value is selected you can´t ask for them. Ask first for the
> existence of the parameter, then for its values. Here is a reference for
> that method in javax.servlet.ServletRequest interface.
> 
> REFERENCE
> getParameterValues
> public java.lang.String[] getParameterValues(java.lang.String name)
> Returns an array of String objects containing all of the values
> the
> given request parameter has, or null if the parameter does not exist. For
> example, in an HTTP servlet, this method returns an array of String
> objects
> containing the values of a query string or posted form.
> If the parameter has a single value, the array has a length of 1.
> Parameters:
> name - a String containing the name of the parameter whose value
> is
> requested
> Returns:
> an array of String objects containing the parameter's values
> See Also:
> getParameter(java.lang.String)
> <../../javax/servlet/ServletRequest.html>
> 
> 
> 
> 
> 
> 
> > -Mensaje original-
> > De:   Venkat [SMTP:[EMAIL PROTECTED]
> > Enviado el:   viernes 14 de marzo de 2003 10:18
> > Para: [EMAIL PROTECTED]
> > Asunto:   Null pointer Exception while sending multiple list options
> >
> > Hi all,
> > I am sending multiple list options from one jsp to another.
> >
> > in my first jsp i am retrieving values from db and and displaying to
> user
> > to
> > select them.
> > 
> >
> > while(rs.next()){
> > String str=rs.getString("prog_name");
> > out.println(""+str+"");
> > }
> > 
> >
> > I am retrieveing the selected (more than one or at least one)which user
> > selects to my second jsp page
> >
> >
> > try{
> > String[] prog=null;
> > prog=request.getParameterValues("prog_name");
> > }catch(Exception e){}
> >
> >
> > this works fine when user select at least one value.But if he doesn't
> > selects anything
> > i am getting null pointer exception.
> >
> > Can any one help me where i went wrong.
> >
> > Thanks in advance
> > venkat
> >
> >
> ==
> > =
> > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
> > JSP-INTEREST".
> > For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
> > DIGEST".
> >
> > Some relevant archives, FAQs and Forums on JSPs can be found at:
> >
> >  http://java.sun.com/products/jsp
> >  http://archiv

Re: CachedRowSet

2003-06-12 Thread Francisco Manuel Martínez Suárez
Yeap! You can´t instantiate an abstract class, but you can derive it and
implement those abstract method that make this class to be abstract. Then
you would be able to instantiate the derived class. I don´t know
CachedRowSet class but you could take a look to the documentation looking
for a class that implement the abstract one: something like CachedRowSetImpl
perhaps.
Hope this helps.
I´ve been searching for a while at java.sun and google but no good answers
found. Sorry.
Fran

-Mensaje original-
De: Amjad Shahrour [SMTP:[EMAIL PROTECTED]
Enviado el: jueves 12 de junio de 2003 10:25
Para:   [EMAIL PROTECTED]
Asunto: Re: CachedRowSet

"CachedRowSet is an abstract class. It can't be
instantiated."

That's the problem DUHH!

-Original Message-
From: A mailing list about Java Server Pages specification and
reference
[mailto:[EMAIL PROTECTED] On Behalf Of Benoit Jodoin [ V7 ]
Sent: Thursday, June 12, 2003 9:57 AM
To: [EMAIL PROTECTED]
Subject: CachedRowSet

Anyone here using a CachedRowSet?

all examples i found looked like this :

import sun.jdnc.rowset.*;
sun.jdbc.rowset.CachedRowSet crs = new
sun.jdbc.rowset.CachedRowSet();

this is the error message i get:

class sun.jdbc.rowset.CachedRowSet is an abstract class. It can't be
instantiated. CachedRowSet crs = new CachedRowSet();

the .jar is in the classpath...i cant figure out whats the problem.


any ideas would be very helpful.
thanks in advance
Ben

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

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

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


Re: Charles, Re: What's a jar?

2003-09-18 Thread Francisco Manuel Martínez Suárez
Java guys, there is no reason for answering things like that. Do not forget
all of us had this same question in the beginning of our Java careers. Am I
right? If you don´t want to answer him just set him to another list. Do not
forget cortesy and nice manners.

Fran


-Mensaje original-
De: Jeff Fisher [mailto:[EMAIL PROTECTED]
Enviado el: miércoles, 17 de septiembre de 2003 21:53
Para: [EMAIL PROTECTED]
Asunto: Re: Charles, Re: What's a jar?


Do you have a job programming in Java?  If so, how did you get it?

> -Original Message-
> From: A mailing list about Java Server Pages specification
> and reference [mailto:[EMAIL PROTECTED] On Behalf Of
> Ed Ventura
> Sent: Wednesday, September 17, 2003 1:42 PM
> To: [EMAIL PROTECTED]
> Subject: Charles, Re: What's a jar?
>
>
> Sorry, master java guy, I have read a few manuals and
> searched the internet, but still just a beginner asking a
> beginner's question. Didn't mean to bother you from your
> morning coffee.
>
> > From: Charles Griswold <[EMAIL PROTECTED]>
> > Organization: LogixPartners
> > Reply-To: Charles Griswold <[EMAIL PROTECTED]>
> > Date: Wed, 17 Sep 2003 13:26:28 -0400
> > To: [EMAIL PROTECTED]
> > Subject: Re: What's a jar?
> >
> > This seems like a very basic question. How about RTM before posting
> > here.
> >
> > - Original Message -
> > From: "Cunningham, Steven" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Wednesday, September 17, 2003 1:12 PM
> > Subject: Re: What's a jar?
> >
> >
> >> jar's are also binary, executable files.
> >>
> >> Steven Cunningham
> >> Database Management Group
> >> Liberty Mutual
> >>
> >>
> >> -Original Message-
> >> From: Joaquin Perez [mailto:[EMAIL PROTECTED]
> >> Sent: Wednesday, September 17, 2003 12:52 PM
> >> To: [EMAIL PROTECTED]
> >> Subject: Re: What's a jar?
> >>
> >>
> >>> What is a .jar and how does it relate to a .java or a
> servlet file?
> >>
> >> A .jar it's kinda like a .zip (WinZip can open it) and it contains
> >> the .class files, packaged and ordered by directories. AFAIK, it's
> >> just an easier way of deploying a lot of classes...
> >>
> >> A .java file, compiled, becomes a .class, and that .class
> can go into
> >> a JAR.
> >>
> >> Please someone else correct me if I'm wrong (probably I am!). :-)
> >>
> >> Joaquin
> >>
> >>
> >
> ==
> > =
> >> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
> > JSP-INTEREST".
> >> For digest: mailto [EMAIL PROTECTED] with body: "set
> JSP-INTEREST
> > DIGEST".
> >>
> >> Some relevant archives, FAQs and Forums on JSPs can be found at:
> >>
> >>  http://java.sun.com/products/jsp
> >> http://archives.java.sun.com/jsp-interest.html
> >>  http://forums.java.sun.com
> >>  http://www.jspinsider.com
> >
> >
> ==
> > =
> > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
> > JSP-INTEREST".
> > For digest: mailto [EMAIL PROTECTED] with body: "set
> JSP-INTEREST DIGEST".
> >
> > Some relevant archives, FAQs and Forums on JSPs can be found at:
> >
> > http://java.sun.com/products/jsp
> > http://archives.java.sun.com/jsp-interest.html
> > http://forums.java.sun.com
> > http://www.jspinsider.com
>
> ==
> =
> To unsubscribe: mailto [EMAIL PROTECTED] with body:
> "signoff JSP-INTEREST". For digest: mailto
> [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
>
> Some relevant archives, FAQs and Forums on JSPs can be found at:
>
 http://java.sun.com/products/jsp
http://archives.java.sun.com/jsp-interest.html
 http://forums.java.sun.com
 http://www.jspinsider.com

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

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

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

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

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

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


Re: Regarding java.sql.Connection

2004-07-20 Thread Francisco Manuel Martínez Suárez
Hi!
They'are implemented in the vendor's specific jdbcdriver (see the vendor's
jdbcdrvier jar). Notice you cannot instantiate Connection nor Statement, you
can only get an instance using methods implemented by the vendor.
Hope this helps
Fran


-Mensaje original-
De: K R Viju [mailto:[EMAIL PROTECTED]
Enviado el: martes, 20 de julio de 2004 11:38
Para: [EMAIL PROTECTED]
Asunto: Regarding java.sql.Connection


Dear Ppl,

If java.sql.Connection or java.sql.Statement are interface. Where are they
implemented?

Viju

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

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

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

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

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

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


Re: Seeking help

2004-09-22 Thread Francisco Manuel Martínez Suárez
Did you Mark started your proffesional career knowing all about everithing?
Just set this guy to a web like java.sun.com as you did and forget about
inserting annoying and useless comments. Are you member of some kind of
'java sect' or what?

Fran


-Original Message-
From: Mark Galbreath [mailto:[EMAIL PROTECTED]
Sent: Monday, September 20, 2004 8:08 PM
To: [EMAIL PROTECTED]
Subject: Re: Seeking help


And you should probably keep programming in VB if you have to get on a
mailing list to ask.  Ever hear of the java.sun.com website?  There are
extensive tutorials for every aspect of the Java programming language.

And while you are at it,
http://www.catb.org/~esr/faqs/smart-questions.html would do you, and
many others here, a boat-load of insight.  But then, maybe not.

Mark


Kholofelo Makau wrote:

>Hi everyone
>
>I am new to JSP can you please help me on getting started because I
>have been trying , ut with no success
>
>kholo
>
>--
>This message has been scanned for viruses and
>dangerous content by MailScanner, and is
>believed to be clean.
>MailScanner thanks transtec Computers for their support.
>
>===
>To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
>For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
DIGEST".
>
>Some relevant archives, FAQs and Forums on JSPs can be found at:
>
> http://java.sun.com/products/jsp
> http://archives.java.sun.com/jsp-interest.html
> http://forums.java.sun.com
> http://www.jspinsider.com
>
>
>
>

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

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

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

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

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

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

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

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

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


Re: JSP and JAVAScript - dynamic content

2005-04-05 Thread Francisco Manuel Martínez Suárez
Hi!
JSP code just runs on server so calling it from a JS script will not work as
you've seen. If you don´t want to have the page reloaded, could you have all
the changing content in JS variables or in HTML layers? This way you can
show different contents just showing the container layer or changing the
content of a HTML element such as a table, or a span... acoording a certain
value of a variable. To switch the contents you can use a global JS variable
in the downloaded page and control it with HTML events an JS code.

Hope this helps,
Fran


-Mensaje original-
De: Jörg Wiesmann [mailto:[EMAIL PROTECTED]
Enviado el: martes, 05 de abril de 2005 7:49
Para: JSP-INTEREST@JAVA.SUN.COM
Asunto: JSP and JAVAScript - dynamic content


Hi @ all,

i am trying to find a solution for the following problem:
We want to show a website with different content without realoding the page.
I tried to solve this problem with a combination of javascript and jsp, but
i can not get it working.

here the code i tried.
I want to call the jsp function more than once, but it do not work.
It is just called when the page has been loaded or is reloaded.
Any suggestions ?

is it possible ? or do the server interprets the code just once and then
never again? it should be possible, or not ?

the javascriptfunctions:

function start() {
 timerID  = setTimeout("getEventJScript()", 2000);
}
function getEventJScript() {
 document.InputForm.TelephoneInputField.value = "test...";
 
  String reqAtt1 = "Instance";
  String reqAtt2 = "uniqueName";
  Server MyServer = (Server) request.getAttribute( reqAtt1 );
  String userNameGiven = (String) request.getAttribute(
reqAtt2 );
  EventHandling event = MyServer.getEvent(userNameGiven);
  String myStatus = event.getStatus();
 
 statusJS = "myStatus";
 document.InputForm.TelephoneInputField.value = statusJS;
 document.InputForm.TelephoneInputField2.value
= "userNameGiven";
 document.InputForm.TelephoneInputField5.value = count;
 count = count +1;
 timerID  = setTimeout("getEventJScript()", 2000);
}

Best regards
Jörg Wiesmann

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

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

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

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

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

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