Re: JavaScript/JSP Question

2004-11-24 Thread Andoni
Hi,

Yes, there is a way. It is not related to Tomcat in any way but...

what you need to use is string.indexOf(string2)

So, take the value of the current item in the combo box and see if it
contains the string you are searching for using the indexOf() method. This
is a JavaScript issue though so I suggest if you have further problems you
try addressing comp.lang.JavaScript (available from Google).

If the indexOf() method does not find the substring it will return -1 if it
does, it will return it's index.

HTH

Andoni.

- Original Message - 
From: Jack Lauman [EMAIL PROTECTED]
Newsgroups: gmane.comp.jakarta.tomcat.user
Sent: Wednesday, November 24, 2004 4:33 AM
Subject: JavaScript/JSP Question


 I'm using the following JavaScript to create lists of restaurants by
 Location and Cuisine.
 Is there a way to modify the script to accept a value for the restaurant
 name that would
 be similar to a %LIKE% function in MySQL when the user hits the submit
 button?

 Thanks,

 Jack

 script language=JavaScript
 !--
 function MM_jumpMenu(targ,selObj,restore, field){ //v3.0


eval(targ+.location='http://www.mydomain.com/restaurant/filter.jsp?field=+
field+value=+selObj.options[selObj.selectedIndex].value+');

  if (restore) selObj.selectedIndex=0;
 }
 //--
 /script

 form name=selectLocation method=get
 location=http://www.mydomain.com/restaurant/filter.jsp;
 input type=hidden name=field value=city
 select name=location size=1
 onChange=MM_jumpMenu('parent',this,0,'city')


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[OT] Re: JavaScript/JSP Question

2004-11-24 Thread Ben Souther
This question is not tomcat specific so I'm marking [OT].

I believe Javascript has the same startsWith/endsWith string
functionality that Java has.  
You should be able to simulate that pretty easily.





On Tue, 2004-11-23 at 23:33, Jack Lauman wrote:
 I'm using the following JavaScript to create lists of restaurants by 
 Location and Cuisine.
 Is there a way to modify the script to accept a value for the restaurant 
 name that would
 be similar to a %LIKE% function in MySQL when the user hits the submit 
 button?
 
 Thanks,
 
 Jack
 
 script language=JavaScript
 !--
 function MM_jumpMenu(targ,selObj,restore, field){ //v3.0

 eval(targ+.location='http://www.mydomain.com/restaurant/filter.jsp?field=+field+value=+selObj.options[selObj.selectedIndex].value+;');
 
  if (restore) selObj.selectedIndex=0;
 }
 //--
 /script
 
 form name=selectLocation method=get 
 location=http://www.mydomain.com/restaurant/filter.jsp;
 input type=hidden name=field value=city
 select name=location size=1 
 onChange=MM_jumpMenu('parent',this,0,'city')
 
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [OT] Re: JavaScript/JSP Question

2004-11-24 Thread erh
On Wed, Nov 24, 2004 at 07:11:31AM -0500, Ben Souther wrote:
 This question is not tomcat specific so I'm marking [OT].
 
 I believe Javascript has the same startsWith/endsWith string
 functionality that Java has.  
 You should be able to simulate that pretty easily.

js also has full regular expression support through the RegExp class
and the String.match function.   Although that's might be a more difficult
choice for exactly emulating the database LIKE function as all the other
regexp features would need to be escaped.

eric

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



JavaScript/JSP Question

2004-11-23 Thread Jack Lauman
I'm using the following JavaScript to create lists of restaurants by 
Location and Cuisine.
Is there a way to modify the script to accept a value for the restaurant 
name that would
be similar to a %LIKE% function in MySQL when the user hits the submit 
button?

Thanks,
Jack
script language=JavaScript
!--
function MM_jumpMenu(targ,selObj,restore, field){ //v3.0
  
eval(targ+.location='http://www.mydomain.com/restaurant/filter.jsp?field=+field+value=+selObj.options[selObj.selectedIndex].value+;'); 

if (restore) selObj.selectedIndex=0;
}
//--
/script
form name=selectLocation method=get 
location=http://www.mydomain.com/restaurant/filter.jsp;
input type=hidden name=field value=city
select name=location size=1 
onChange=MM_jumpMenu('parent',this,0,'city')


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


JSP question

2003-10-21 Thread epyonne
Hello All,

I am pulling my hair on this problem, and since there are many Java experts
on this mailing list, I hope someone can help me on this.

I have a simple servlet that calls a JSP page where the user can enter a
search value.  When the user clicks on the submit button, the search value
will be passed back to the servlet for processing and display.  All these
are running on Tomcat 4.1.24.

Everything works fine until I added the form validation routine in the JSP
page.  Initially, my input button type was submit.  I changed it to
button and leave the submission to the form validation routine which is in
JavaScript.  Now, when I click on the button, I get the error message of:
Object doesn't support this property or method
at the line of code:
document.form1.submit();

Does anyone know why?  The following is code of the JSP page:
//code begin--
html
head
titleblah blah blah/title
link rel=stylesheet href=css/standard.css type=text/css
/head

body
form name=form1 method=POST action=
center
bPlease enter ANI for query:/bbrbr
table
tr
 tdANI/td
 tdinput type=text name=ani/TD
/tr
tr
 td/td
 td COLSPAN=2
 input type=button name=submit value=Submit
onclick=javascript:validateForm();
 input type=Reset name=cmdReset value=Reset/td
/tr
/table
/center

 script LANGUAGE=JavaScript
  function validateForm(){
   if(document.form1.ani.value == ){
alert(Please enter an ANI);
return;
   }
   document.form1.submit();//This line generated error.  The
.submit() method is not supported.
  }
 /script
/form
nbsp;
%@ include file=footer.jsp%
/body
/html
//code end

Any help will be very much appreciated.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: JSP question

2003-10-21 Thread Matt Raible
A better solution for what you're doing is to leave the button as
type=submit and remove its onclick event.  Instead, add an onsubmit
handler to form that calls return validateForm() - return false in your
function when validation fails.

HTH,

Matt

-Original Message-
From: epyonne [mailto:[EMAIL PROTECTED]
Sent: Tuesday, October 21, 2003 9:35 AM
To: Tomcat Users List
Subject: JSP question


Hello All,

I am pulling my hair on this problem, and since there are many Java experts
on this mailing list, I hope someone can help me on this.

I have a simple servlet that calls a JSP page where the user can enter a
search value.  When the user clicks on the submit button, the search value
will be passed back to the servlet for processing and display.  All these
are running on Tomcat 4.1.24.

Everything works fine until I added the form validation routine in the JSP
page.  Initially, my input button type was submit.  I changed it to
button and leave the submission to the form validation routine which is in
JavaScript.  Now, when I click on the button, I get the error message of:
Object doesn't support this property or method
at the line of code:
document.form1.submit();

Does anyone know why?  The following is code of the JSP page:
//code begin--
html
head
titleblah blah blah/title
link rel=stylesheet href=css/standard.css type=text/css
/head

body
form name=form1 method=POST action=
center
bPlease enter ANI for query:/bbrbr
table
tr
 tdANI/td
 tdinput type=text name=ani/TD
/tr
tr
 td/td
 td COLSPAN=2
 input type=button name=submit value=Submit
onclick=javascript:validateForm();
 input type=Reset name=cmdReset value=Reset/td
/tr
/table
/center

 script LANGUAGE=JavaScript
  function validateForm(){
   if(document.form1.ani.value == ){
alert(Please enter an ANI);
return;
   }
   document.form1.submit();//This line generated error.  The
.submit() method is not supported.
  }
 /script
/form
nbsp;
%@ include file=footer.jsp%
/body
/html
//code end

Any help will be very much appreciated.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: JSP question

2003-10-21 Thread Peter Guyatt
Hi There,

Why dont you change the button back to a submit and then add a
onSubmit='return validation();' to you form ?

Thats what we do

Eg.
Script
function valid () {
if (document.form.val.value.length  1) {
alert(Please enter a value);
return false;
}
return true;
}
/Script

form onSubmit=return valid();
table
tr
td
input type=text name=val
/td
td
input type=submit
/td
/tr
/table
/form

Thanks

Pete

-Original Message-
From: epyonne [mailto:[EMAIL PROTECTED]
Sent: 21 October 2003 16:35
To: Tomcat Users List
Subject: JSP question


Hello All,

I am pulling my hair on this problem, and since there are many Java experts
on this mailing list, I hope someone can help me on this.

I have a simple servlet that calls a JSP page where the user can enter a
search value.  When the user clicks on the submit button, the search value
will be passed back to the servlet for processing and display.  All these
are running on Tomcat 4.1.24.

Everything works fine until I added the form validation routine in the JSP
page.  Initially, my input button type was submit.  I changed it to
button and leave the submission to the form validation routine which is in
JavaScript.  Now, when I click on the button, I get the error message of:
Object doesn't support this property or method
at the line of code:
document.form1.submit();

Does anyone know why?  The following is code of the JSP page:
//code begin--
html
head
titleblah blah blah/title
link rel=stylesheet href=css/standard.css type=text/css
/head

body
form name=form1 method=POST action=
center
bPlease enter ANI for query:/bbrbr
table
tr
 tdANI/td
 tdinput type=text name=ani/TD
/tr
tr
 td/td
 td COLSPAN=2
 input type=button name=submit value=Submit
onclick=javascript:validateForm();
 input type=Reset name=cmdReset value=Reset/td
/tr
/table
/center

 script LANGUAGE=JavaScript
  function validateForm(){
   if(document.form1.ani.value == ){
alert(Please enter an ANI);
return;
   }
   document.form1.submit();//This line generated error.  The
.submit() method is not supported.
  }
 /script
/form
nbsp;
%@ include file=footer.jsp%
/body
/html
//code end

Any help will be very much appreciated.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: JSP question

2003-10-21 Thread Walker Chris
Most likely document.form1 is not visible in the browser object model.
There are various ways to address the form, but the most portable in this
case is probably document.forms[0].

Chris

-Original Message-
From: epyonne [mailto:[EMAIL PROTECTED]
Sent: 21 October 2003 16:35
To: Tomcat Users List
Subject: JSP question


Hello All,

I am pulling my hair on this problem, and since there are many Java experts
on this mailing list, I hope someone can help me on this.

I have a simple servlet that calls a JSP page where the user can enter a
search value.  When the user clicks on the submit button, the search value
will be passed back to the servlet for processing and display.  All these
are running on Tomcat 4.1.24.

Everything works fine until I added the form validation routine in the JSP
page.  Initially, my input button type was submit.  I changed it to
button and leave the submission to the form validation routine which is in
JavaScript.  Now, when I click on the button, I get the error message of:
Object doesn't support this property or method
at the line of code:
document.form1.submit();

Does anyone know why?  The following is code of the JSP page:
//code begin--
html
head
titleblah blah blah/title
link rel=stylesheet href=css/standard.css type=text/css
/head

body
form name=form1 method=POST action=
center
bPlease enter ANI for query:/bbrbr
table
tr
 tdANI/td
 tdinput type=text name=ani/TD
/tr
tr
 td/td
 td COLSPAN=2
 input type=button name=submit value=Submit
onclick=javascript:validateForm();
 input type=Reset name=cmdReset value=Reset/td
/tr
/table
/center

 script LANGUAGE=JavaScript
  function validateForm(){
   if(document.form1.ani.value == ){
alert(Please enter an ANI);
return;
   }
   document.form1.submit();//This line generated error.  The
.submit() method is not supported.
  }
 /script
/form
nbsp;
%@ include file=footer.jsp%
/body
/html
//code end

Any help will be very much appreciated.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


The information in this e:mail and any attachments or any 
reproduction of this e:mail in whatever manner is confidential 
and for the use of the addressee(s) only.  If you are not the 
addressee then the distribution, use or reproduction of this 
e:mail or the information within it is strictly prohibited and 
may be unlawful.  If received in error please advise the 
sender and delete all record of it from your system.  
Although believed to be virus free, accurate and complete,  
responsibility for any loss or cost arising from its receipt or 
use or its incomplete or inaccurate transmission is hereby 
excluded to the fullest extent possible.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: JSP question

2003-10-21 Thread epyonne
Thanks for the reply.  But this cannot be true.  If I leave the textbox
blank, I got the alert.  That means it is seeing the document.form1
object.  It just does not like the .submit() method which I can't understand
why.

Thanks.


- Original Message -
From: Walker Chris [EMAIL PROTECTED]
To: 'Tomcat Users List' [EMAIL PROTECTED]
Sent: Tuesday, October 21, 2003 10:45 AM
Subject: RE: JSP question


 Most likely document.form1 is not visible in the browser object model.
 There are various ways to address the form, but the most portable in this
 case is probably document.forms[0].

 Chris

 -Original Message-
 From: epyonne [mailto:[EMAIL PROTECTED]
 Sent: 21 October 2003 16:35
 To: Tomcat Users List
 Subject: JSP question


 Hello All,

 I am pulling my hair on this problem, and since there are many Java
experts
 on this mailing list, I hope someone can help me on this.

 I have a simple servlet that calls a JSP page where the user can enter a
 search value.  When the user clicks on the submit button, the search value
 will be passed back to the servlet for processing and display.  All these
 are running on Tomcat 4.1.24.

 Everything works fine until I added the form validation routine in the JSP
 page.  Initially, my input button type was submit.  I changed it to
 button and leave the submission to the form validation routine which is
in
 JavaScript.  Now, when I click on the button, I get the error message of:
 Object doesn't support this property or method
 at the line of code:
 document.form1.submit();

 Does anyone know why?  The following is code of the JSP page:
 //code begin--
 html
 head
 titleblah blah blah/title
 link rel=stylesheet href=css/standard.css type=text/css
 /head

 body
 form name=form1 method=POST action=
 center
 bPlease enter ANI for query:/bbrbr
 table
 tr
  tdANI/td
  tdinput type=text name=ani/TD
 /tr
 tr
  td/td
  td COLSPAN=2
  input type=button name=submit value=Submit
 onclick=javascript:validateForm();
  input type=Reset name=cmdReset value=Reset/td
 /tr
 /table
 /center

  script LANGUAGE=JavaScript
   function validateForm(){
if(document.form1.ani.value == ){
 alert(Please enter an ANI);
 return;
}
document.form1.submit();//This line generated error.  The
 .submit() method is not supported.
   }
  /script
 /form
 nbsp;
 %@ include file=footer.jsp%
 /body
 /html
 //code end

 Any help will be very much appreciated.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: JSP question

2003-10-21 Thread epyonne
Thank you Matt and Peter for the suggestion.  It works!!!


- Original Message -
From: Peter Guyatt [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Tuesday, October 21, 2003 10:42 AM
Subject: RE: JSP question


 Hi There,

 Why dont you change the button back to a submit and then add a
 onSubmit='return validation();' to you form ?

 Thats what we do

 Eg.
 Script
 function valid () {
 if (document.form.val.value.length  1) {
 alert(Please enter a value);
 return false;
 }
 return true;
 }
 /Script

 form onSubmit=return valid();
 table
 tr
 td
 input type=text name=val
 /td
 td
 input type=submit
 /td
 /tr
 /table
 /form

 Thanks

 Pete

 -Original Message-
 From: epyonne [mailto:[EMAIL PROTECTED]
 Sent: 21 October 2003 16:35
 To: Tomcat Users List
 Subject: JSP question


 Hello All,

 I am pulling my hair on this problem, and since there are many Java
experts
 on this mailing list, I hope someone can help me on this.

 I have a simple servlet that calls a JSP page where the user can enter a
 search value.  When the user clicks on the submit button, the search value
 will be passed back to the servlet for processing and display.  All these
 are running on Tomcat 4.1.24.

 Everything works fine until I added the form validation routine in the JSP
 page.  Initially, my input button type was submit.  I changed it to
 button and leave the submission to the form validation routine which is
in
 JavaScript.  Now, when I click on the button, I get the error message of:
 Object doesn't support this property or method
 at the line of code:
 document.form1.submit();

 Does anyone know why?  The following is code of the JSP page:
 //code begin--
 html
 head
 titleblah blah blah/title
 link rel=stylesheet href=css/standard.css type=text/css
 /head

 body
 form name=form1 method=POST action=
 center
 bPlease enter ANI for query:/bbrbr
 table
 tr
  tdANI/td
  tdinput type=text name=ani/TD
 /tr
 tr
  td/td
  td COLSPAN=2
  input type=button name=submit value=Submit
 onclick=javascript:validateForm();
  input type=Reset name=cmdReset value=Reset/td
 /tr
 /table
 /center

  script LANGUAGE=JavaScript
   function validateForm(){
if(document.form1.ani.value == ){
 alert(Please enter an ANI);
 return;
}
document.form1.submit();//This line generated error.  The
 .submit() method is not supported.
   }
  /script
 /form
 nbsp;
 %@ include file=footer.jsp%
 /body
 /html
 //code end

 Any help will be very much appreciated.

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: JSP question [solved]

2003-10-21 Thread laurent marot
works fine written this way :

html
head
titleblah blah blah/title
link rel=stylesheet href=css/standard.css type=text/css
/head
body
script LANGUAGE=JavaScript
 function validateForm(){
  if(document.form1.ani.value == ){
   alert(Please enter an ANI);
   return;
  }
  document.form1.submit();
 }
/script
center
bPlease enter ANI for query:/bbrbr
form name=form1 method=POST action=
table
 tr
  tdANI/td
  tdinput type=text name=ani/td
 /tr
 tr
  td COLSPAN=2
   input type=button value=Send onclick=javascript:validateForm()
  /td
 /tr
table
/form
/body
/html
- Original Message - 
From: epyonne [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Tuesday, October 21, 2003 5:35 PM
Subject: JSP question


 Hello All,

 I am pulling my hair on this problem, and since there are many Java
experts
 on this mailing list, I hope someone can help me on this.

 I have a simple servlet that calls a JSP page where the user can enter a
 search value.  When the user clicks on the submit button, the search value
 will be passed back to the servlet for processing and display.  All these
 are running on Tomcat 4.1.24.

 Everything works fine until I added the form validation routine in the JSP
 page.  Initially, my input button type was submit.  I changed it to
 button and leave the submission to the form validation routine which is
in
 JavaScript.  Now, when I click on the button, I get the error message of:
 Object doesn't support this property or method
 at the line of code:
 document.form1.submit();

 Does anyone know why?  The following is code of the JSP page:
 //code begin--
 html
 head
 titleblah blah blah/title
 link rel=stylesheet href=css/standard.css type=text/css
 /head

 body
 form name=form1 method=POST action=
 center
 bPlease enter ANI for query:/bbrbr
 table
 tr
  tdANI/td
  tdinput type=text name=ani/TD
 /tr
 tr
  td/td
  td COLSPAN=2
  input type=button name=submit value=Submit
 onclick=javascript:validateForm();
  input type=Reset name=cmdReset value=Reset/td
 /tr
 /table
 /center

  script LANGUAGE=JavaScript
   function validateForm(){
if(document.form1.ani.value == ){
 alert(Please enter an ANI);
 return;
}
document.form1.submit();//This line generated error.  The
 .submit() method is not supported.
   }
  /script
 /form
 nbsp;
 %@ include file=footer.jsp%
 /body
 /html
 //code end

 Any help will be very much appreciated.

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



JSP Question

2003-01-08 Thread Luc Foisy

I am trying to use %@ include file=filename %

I am sending to the page that has this with the line:
response.sendRedirect(main.jsp?p=+applicationJar.getPageName());

So in main.jsp I would like to include an external file to insert into a default page, 
something like:

SOME DEFAULT PAGE STUFF HERE
%@ include file=filename %
SOME DEFAULT PAGE STUFF HERE

but I would like to replace filename with request.getParameter(p)

Any one have any idea how to do this?

--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




RE: JSP Question

2003-01-08 Thread Tim Moore
 -Original Message-
 From: Luc Foisy [mailto:[EMAIL PROTECTED]] 
 Sent: Wednesday, January 08, 2003 1:54 PM
 To: Tomcat User List (E-mail)
 Subject: JSP Question
 
 
 
 I am trying to use %@ include file=filename %
 
 I am sending to the page that has this with the line: 
 response.sendRedirect(main.jsp?p=+applicationJar.getPageName());
 
 So in main.jsp I would like to include an external file to 
 insert into a default page, something like:
 
 SOME DEFAULT PAGE STUFF HERE
 %@ include file=filename %
 SOME DEFAULT PAGE STUFF HERE
 
 but I would like to replace filename with request.getParameter(p)
 
 Any one have any idea how to do this?

The %@ include % syntax is a static inclusion that happens at
translation time, so it can't depend on runtime parameters.

You want to use:
jsp:include page='%= request.getParameter(p) %'/
(see the JSP spec for details)

Be forewarned that you won't be able to access the enclosing page's
local variables from within the included page (as you can with static
includes), but if you add those variables to the request context you'll
be able to access them that way.

-- 
Tim Moore / Blackboard Inc. / Software Engineer
1899 L Street, NW / 5th Floor / Washington, DC 20036
Phone 202-463-4860 ext. 258 / Fax 202-463-4863


--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




RE: JSP Question

2003-01-08 Thread Ricardo_Bosch
I may be referring to an oldschool version of tomcat but the include
directive occurs during compilation, not execution.  So to do what you want
you'd have to say
%  if(goo){%
%@ include file=filenameA %
%  }else{  %
%@ include file=filenameB %
%  }   %

or

do your thing the other way around and redirect to different pages with
SOME DEFAULT PAGE STUFF HERE incuded instead.

-rick

-Original Message-
From: Luc Foisy [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 08, 2003 1:54 PM
To: Tomcat User List (E-mail)
Subject: JSP Question



I am trying to use %@ include file=filename %

I am sending to the page that has this with the line:
response.sendRedirect(main.jsp?p=+applicationJar.getPageName());

So in main.jsp I would like to include an external file to insert into a
default page, something like:

SOME DEFAULT PAGE STUFF HERE
%@ include file=filename %
SOME DEFAULT PAGE STUFF HERE

but I would like to replace filename with request.getParameter(p)

Any one have any idea how to do this?

--
To unsubscribe, e-mail:
mailto:[EMAIL PROTECTED]
For additional commands, e-mail:
mailto:[EMAIL PROTECTED]

application/ms-tnef--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]


RE: JSP Question

2003-01-08 Thread Luc Foisy
Actually, after the post I figure using the %@ include filefilename % would be 
useless because it was static
So I started to look at %jsp:include ... \ for dynamic includes, and then soon 
realized it was more trouble that it was worth :)

So I have decided just to redirect to individual jsp pages based on 
applicationJar.getPageName() instead of including dynamic content in a common page

 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, January 08, 2003 3:16 PM
 To: [EMAIL PROTECTED]
 Subject: RE: JSP Question
 
 
 I may be referring to an oldschool version of tomcat but the 
 include directive occurs during compilation, not execution.  
 So to do what you want you'd have to say
 %if(goo){%
 %@ include file=filenameA %
 %}else{  %
 %@ include file=filenameB %
 %}   %
 
 or
 
 do your thing the other way around and redirect to different 
 pages with SOME DEFAULT PAGE STUFF HERE incuded instead.
 
 -rick
 
 -Original Message-
 From: Luc Foisy [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, January 08, 2003 1:54 PM
 To: Tomcat User List (E-mail)
 Subject: JSP Question
 
 
 
 I am trying to use %@ include file=filename %
 
 I am sending to the page that has this with the line:
 response.sendRedirect(main.jsp?p=+applicationJar.getPageName());
 
 So in main.jsp I would like to include an external file to 
 insert into a default page, something like:
 
 SOME DEFAULT PAGE STUFF HERE
 %@ include file=filename %
 SOME DEFAULT PAGE STUFF HERE
 
 but I would like to replace filename with request.getParameter(p)
 
 Any one have any idea how to do this?
 
 --
 To unsubscribe, e-mail:   
 mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: 
 mailto:[EMAIL PROTECTED]
 

--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




Re: General HTML/jsp question, any one

2002-09-04 Thread garrett smith

To convert the string to xml compliant string, you could use a custom tag to
convert  to quot;,  to lt;, et c.

instead of having an input tag, you could have a custom tag such as
filtered-input. This custom tag would replace  with quot; 

You could try to use single-quotes for attributes, but that will lead to a
problem if there is an ' in your attribute. Also,  is not allowed in attribute
values.

I hope this helps.



--- Dinesh Khetarpal [EMAIL PROTECTED] wrote:
 I have an html page generated dynamically by jsp, this page has input
 field and value=A string which has  in it. I should generate the page
 converting  to quot; but I don't and html assumes string ends early.
 Do you know a method to overcome this or utilities which will convert
 the string to xml compliant string, will be very well appreciated.
 thanks Dinesh
 


=
Garrett Needs A Job

__
Do You Yahoo!?
Yahoo! Finance - Get real-time stock quotes
http://finance.yahoo.com

--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




RE: General HTML/jsp question, any one

2002-09-04 Thread Rui Fernandes

I think you are generating you html by concatenation of strings or so.
If you generate it as you should (as if it was a XML DOM object, to be
serialized after) this would not happen.
- Original Message -
From: garrett smith [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Wednesday, September 04, 2002 7:43 PM
Subject: Re: General HTML/jsp question, any one


 To convert the string to xml compliant string, you could use a custom tag
to
 convert  to quot;,  to lt;, et c.

 instead of having an input tag, you could have a custom tag such as
 filtered-input. This custom tag would replace  with quot;

 You could try to use single-quotes for attributes, but that will lead to a
 problem if there is an ' in your attribute. Also,  is not allowed in
attribute
 values.

 I hope this helps.



 --- Dinesh Khetarpal [EMAIL PROTECTED] wrote:
  I have an html page generated dynamically by jsp, this page has input
  field and value=A string which has  in it. I should generate the page
  converting  to quot; but I don't and html assumes string ends early.
  Do you know a method to overcome this or utilities which will convert
  the string to xml compliant string, will be very well appreciated.
  thanks Dinesh
 


 =
 Garrett Needs A Job

 __
 Do You Yahoo!?
 Yahoo! Finance - Get real-time stock quotes
 http://finance.yahoo.com

 --
 To unsubscribe, e-mail:
mailto:[EMAIL PROTECTED]
 For additional commands, e-mail:
mailto:[EMAIL PROTECTED]



--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




General HTML/jsp question, any one

2002-09-03 Thread Dinesh Khetarpal

I have an html page generated dynamically by jsp, this page has input
field and value=A string which has  in it. I should generate the page
converting  to quot; but I don't and html assumes string ends early.
Do you know a method to overcome this or utilities which will convert
the string to xml compliant string, will be very well appreciated.
thanks Dinesh



JSP question

2002-03-28 Thread Michael Molloy

I'm working on a web application that will be used by about 150 people concurrently. 
One of the requirements is to show text field hints in the status bar whenever the 
mouse passes over a text field. All of the hints are stored in the database.

I need to write a class that will be available at the application level that returns 
some javascript along with the correct hint for whatever field the mouse is currently 
over. Since there are over 1000 fields in this web application, I'm looking for 
alternatives to writing a class with a get method for each field.

What would work very well is if I could pass an argument in a getProperty call. For 
example, 

jsp:getProperty name=testBean property=hintText value=firstName /

That way, I could store the values in a hashtable and just get whatever one was 
requested. Of course, I can't do that. I also can't set a property  then immediately 
call get property to get the one I just requested in the set since the class is going 
to be shared by all users.

Can anyone suggest a way to do this? I feel sure there must be a way, but I can't 
think of it.

Thanks
--Michael



Re: JSP question

2002-03-28 Thread Jeff Larsen

Assuming you have a controller servlet that could load
the hint text from the database, why not have a static
hashtable in your servlet code that is initialized with
the values from the database in the init() method. Then
as each session is initialized, you could put a reference
to the hashtable in each session with

session.setAttribute(hints, hintTable);

Then you have access to the hints wherever you need them.

jsp:useBean name=hints class=java.util.Hashtable scope=session
...
input type=text name=myField onMouseOver=self.status='%=
(String)hints.get(myField) %'


Or better yet you could write a custom taglib...

mytags:textWithHint name=myField

and then do the hint lookup in the custom tag code. You could even have your
hashtable stored and initialized in the taglib code. Then your pages would
never need to know about it.

I hope these ideas help...

Jeff



- Original Message -
From: Michael Molloy [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Thursday, March 28, 2002 9:11 AM
Subject: JSP question


I'm working on a web application that will be used by about 150 people concurrently. 
One
of the requirements is to show text field hints in the status bar whenever the mouse
passes over a text field. All of the hints are stored in the database.

I need to write a class that will be available at the application level that returns 
some
javascript along with the correct hint for whatever field the mouse is currently over.
Since there are over 1000 fields in this web application, I'm looking for alternatives 
to
writing a class with a get method for each field.

What would work very well is if I could pass an argument in a getProperty call. For
example,

jsp:getProperty name=testBean property=hintText value=firstName /

That way, I could store the values in a hashtable and just get whatever one was 
requested.
Of course, I can't do that. I also can't set a property  then immediately call get
property to get the one I just requested in the set since the class is going to be 
shared
by all users.

Can anyone suggest a way to do this? I feel sure there must be a way, but I can't 
think of
it.

Thanks
--Michael


--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




RE: RE: newbie jsp question

2002-03-20 Thread Randy Layman


From the Javadocs for java.lang.VerifyError (great source of information, by
the way):

Thrown when the verifier detects that a class file, though well formed,
contains some sort of internal inconsistency or security problem. 

So I would say that somehow your JDBC drivers are corrupt.  I have seen
JBuilder produce classes that caused this - a simple recompile fixed
everything for me.  The Stack Trace would seem to indicate the problem is in
interbase.interclient.ErrorKey.  I would suggest trying to create a
standalone application that exhibits this problem and contact the vendor's
technical support with the issue.

Randy


 -Original Message-
 From: Magnus Jansson [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, March 20, 2002 3:14 AM
 To: [EMAIL PROTECTED]
 Subject: Ang: RE: newbie jsp question
 
 
 Well! I already have a connection to the database, I can 
 extract information out from the database but when I use 
 execute procedure commando I only get that very hard to debug 
 error page from tomcat. here is a copy of it:
 
 java.lang.VerifyError: (class: 
 interbase/interclient/ErrorKey, method:  signature: ()V) 
 Expecting to find object/array on stack
   at interbase.interclient.SQLException.(SQLException.java:96)
   at 
 interbase.interclient.RecvMessage.createSQLException(RecvMessa
 ge.java:694)
   at 
 interbase.interclient.RecvMessage.makeSQLException(RecvMessage
 .java:593)
   at 
 interbase.interclient.RecvMessage.get_EXCEPTIONS(RecvMessage.j
 ava, Compiled Code)
   at 
 interbase.interclient.Statement.remote_EXECUTE_QUERY_STATEMENT
 (Statement.java, Compiled Code)
   at 
 interbase.interclient.Statement.executeQuery(Statement.java, 
 Compiled Code)
   at 
 matsedel.input.updatematsedel_13._jspService(updatematsedel_13
 .java:117)
   at org.apache.jasper.runtime.HttpJspBase.service(Unknown Source)
   at 
 javax.servlet.http.HttpServlet.service(HttpServlet.java, 
 Compiled Code)
   at 
 org.apache.tomcat.facade.ServletHandler.doService(Unknown Source)
   at org.apache.tomcat.core.Handler.invoke(Unknown Source)
   at org.apache.tomcat.core.Handler.service(Unknown Source)
   at 
 org.apache.tomcat.facade.ServletHandler.service(Unknown Source)
   at 
 org.apache.tomcat.core.ContextManager.internalService(Unknown Source)
   at org.apache.tomcat.core.ContextManager.service(Unknown Source)
   at 
 org.apache.tomcat.modules.server.Ajp13Interceptor.processConne
 ction(Unknown Source)
   at 
 org.apache.tomcat.util.net.TcpWorkerThread.runIt(Unknown Source)
   at 
 org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(
 Unknown Source)
   at java.lang.Thread.run(Unknown Source)
 
 I havent got a clue what is wrong.
 
 here is the execute procedure part of my jsp page
 
 
 if (request.getParameter(MandagLunchUID) == null)
   {
   MyQuery = EXECUTE PROCEDURE INSERT_INTO_MATSEDEL 'Mat 
 mat mat' '2002-03-18' 1 0;
   
 //MyQuery = EXECUTE PROCEDURE 
 INSERT_INTO_MATSEDEL (;
   //MyQuery = MyQuery + 
 request.getParameter(MandagLunchText) + ,;
   //MyQuery = MyQuery + 
 request.getParameter(MandagLunchDatum) + ,;
   //if (IsVego.booleanValue())
   //{
   //  MyQuery = MyQuery + 1 + ,;
   //}
   //else
   //{
 // MyQuery = MyQuery + 0 + ,; 
   //};
   //MyQuery = MyQuery + 0);
 
 MyRecordSet = 
 StatementRecordset1.executeQuery(MyQuery);
 
   out.print(OK insert måndag lunch);
   }
 
 As you can see there is a lot of remarks there, I only have 
 that static call right now for test purpose..
 
 
 
  [EMAIL PROTECTED] 2002-03-19 16:44:05 
 
   You will need to learn how to use JDBC to access 
 databases.  I would
 suggest either going to Sun's JDBC site or looking at 
 Interbase.  Once you
 know how to execute the stored procedure from regular Java, 
 JSP is trivial.
 
   Randy
 
 
  -Original Message-
  From: Magnus Jansson [mailto:[EMAIL PROTECTED]] 
  Sent: Tuesday, March 19, 2002 11:22 AM
  To: [EMAIL PROTECTED] 
  Subject: newbie jsp question
  
  
  I'm getting nuts I tries to execute a stored procedure that 
  looks like this:
  
  INSERT_INTO_MATSEDEL (MATTEXT BLOB, DATUM Date, ISVEGO 
  Integer, ISLUNCH Integer) 
  
  But I haven't got a clue how to write the jsp code to execute 
  that procedure.
  
  I'm using Interbase 6.5 Pleeeaseee help me.
  
  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
  - - - - - - - - - - - - - - 
  Magnus Jansson
  IT-Manager
  Väddö folkhögskola
  760 40 Väddö
  Sweden
  
  Phone: +46 (0) 176-528 00
  Cellular: +46 (0) 70-370 33 16
  Fax: +46 (0) 176-528 28
  http://www.vaddo.fhsk.se (work)
  http://www.jason.pp.se (private)
  
  
  
 
 --
 To unsubscribe:   mailto:[EMAIL PROTECTED]
 For additional commands: mailto:[EMAIL PROTECTED]
 Troubles with the list: mailto:[EMAIL PROTECTED]
 
 
 
 --
 To unsubscribe:   mailto:[EMAIL

Ang: RE: RE: newbie jsp question

2002-03-20 Thread Magnus Jansson

Thanks Ill do that

 [EMAIL PROTECTED] 2002-03-20 12:49:52 

From the Javadocs for java.lang.VerifyError (great source of information, by
the way):

Thrown when the verifier detects that a class file, though well formed,
contains some sort of internal inconsistency or security problem. 

So I would say that somehow your JDBC drivers are corrupt.  I have seen
JBuilder produce classes that caused this - a simple recompile fixed
everything for me.  The Stack Trace would seem to indicate the problem is in
interbase.interclient.ErrorKey.  I would suggest trying to create a
standalone application that exhibits this problem and contact the vendor's
technical support with the issue.

Randy


 -Original Message-
 From: Magnus Jansson [mailto:[EMAIL PROTECTED]] 
 Sent: Wednesday, March 20, 2002 3:14 AM
 To: [EMAIL PROTECTED] 
 Subject: Ang: RE: newbie jsp question
 
 
 Well! I already have a connection to the database, I can 
 extract information out from the database but when I use 
 execute procedure commando I only get that very hard to debug 
 error page from tomcat. here is a copy of it:
 
 java.lang.VerifyError: (class: 
 interbase/interclient/ErrorKey, method:  signature: ()V) 
 Expecting to find object/array on stack
   at interbase.interclient.SQLException.(SQLException.java:96)
   at 
 interbase.interclient.RecvMessage.createSQLException(RecvMessa
 ge.java:694)
   at 
 interbase.interclient.RecvMessage.makeSQLException(RecvMessage
 .java:593)
   at 
 interbase.interclient.RecvMessage.get_EXCEPTIONS(RecvMessage.j
 ava, Compiled Code)
   at 
 interbase.interclient.Statement.remote_EXECUTE_QUERY_STATEMENT
 (Statement.java, Compiled Code)
   at 
 interbase.interclient.Statement.executeQuery(Statement.java, 
 Compiled Code)
   at 
 matsedel.input.updatematsedel_13._jspService(updatematsedel_13
 .java:117)
   at org.apache.jasper.runtime.HttpJspBase.service(Unknown Source)
   at 
 javax.servlet.http.HttpServlet.service(HttpServlet.java, 
 Compiled Code)
   at 
 org.apache.tomcat.facade.ServletHandler.doService(Unknown Source)
   at org.apache.tomcat.core.Handler.invoke(Unknown Source)
   at org.apache.tomcat.core.Handler.service(Unknown Source)
   at 
 org.apache.tomcat.facade.ServletHandler.service(Unknown Source)
   at 
 org.apache.tomcat.core.ContextManager.internalService(Unknown Source)
   at org.apache.tomcat.core.ContextManager.service(Unknown Source)
   at 
 org.apache.tomcat.modules.server.Ajp13Interceptor.processConne
 ction(Unknown Source)
   at 
 org.apache.tomcat.util.net.TcpWorkerThread.runIt(Unknown Source)
   at 
 org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(
 Unknown Source)
   at java.lang.Thread.run(Unknown Source)
 
 I havent got a clue what is wrong.
 
 here is the execute procedure part of my jsp page
 
 
 if (request.getParameter(MandagLunchUID) == null)
   {
   MyQuery = EXECUTE PROCEDURE INSERT_INTO_MATSEDEL 'Mat 
 mat mat' '2002-03-18' 1 0;
   
 //MyQuery = EXECUTE PROCEDURE 
 INSERT_INTO_MATSEDEL (;
   //MyQuery = MyQuery + 
 request.getParameter(MandagLunchText) + ,;
   //MyQuery = MyQuery + 
 request.getParameter(MandagLunchDatum) + ,;
   //if (IsVego.booleanValue())
   //{
   //  MyQuery = MyQuery + 1 + ,;
   //}
   //else
   //{
 // MyQuery = MyQuery + 0 + ,; 
   //};
   //MyQuery = MyQuery + 0);
 
 MyRecordSet = 
 StatementRecordset1.executeQuery(MyQuery);
 
   out.print(OK insert måndag lunch);
   }
 
 As you can see there is a lot of remarks there, I only have 
 that static call right now for test purpose..
 
 
 
  [EMAIL PROTECTED] 2002-03-19 16:44:05 
 
   You will need to learn how to use JDBC to access 
 databases.  I would
 suggest either going to Sun's JDBC site or looking at 
 Interbase.  Once you
 know how to execute the stored procedure from regular Java, 
 JSP is trivial.
 
   Randy
 
 
  -Original Message-
  From: Magnus Jansson [mailto:[EMAIL PROTECTED]] 
  Sent: Tuesday, March 19, 2002 11:22 AM
  To: [EMAIL PROTECTED] 
  Subject: newbie jsp question
  
  
  I'm getting nuts I tries to execute a stored procedure that 
  looks like this:
  
  INSERT_INTO_MATSEDEL (MATTEXT BLOB, DATUM Date, ISVEGO 
  Integer, ISLUNCH Integer) 
  
  But I haven't got a clue how to write the jsp code to execute 
  that procedure.
  
  I'm using Interbase 6.5 Pleeeaseee help me.
  
  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
  - - - - - - - - - - - - - - 
  Magnus Jansson
  IT-Manager
  Väddö folkhögskola
  760 40 Väddö
  Sweden
  
  Phone: +46 (0) 176-528 00
  Cellular: +46 (0) 70-370 33 16
  Fax: +46 (0) 176-528 28
  http://www.vaddo.fhsk.se (work)
  http://www.jason.pp.se (private)
  
  
  
 
 --
 To unsubscribe:   mailto:[EMAIL PROTECTED]
 For additional commands: mailto:[EMAIL PROTECTED]
 Troubles with the list: mailto

newbie jsp question

2002-03-19 Thread Magnus Jansson

I'm getting nuts I tries to execute a stored procedure that looks like this:

INSERT_INTO_MATSEDEL (MATTEXT BLOB, DATUM Date, ISVEGO Integer, ISLUNCH Integer) 

But I haven't got a clue how to write the jsp code to execute that procedure.

I'm using Interbase 6.5 Pleeeaseee help me.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
- - 
Magnus Jansson
IT-Manager
Väddö folkhögskola
760 40 Väddö
Sweden

Phone: +46 (0) 176-528 00
Cellular: +46 (0) 70-370 33 16
Fax: +46 (0) 176-528 28
http://www.vaddo.fhsk.se (work)
http://www.jason.pp.se (private)




--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]


RE: newbie jsp question

2002-03-19 Thread Jeff Macomber

Jansson,

You are going to need a JDBC driver for Interbase 6.5 first.  Then I would
recommend looking at the examples that come with the driver on how they
handle insertion of BLOB data and escaping stored procedures.  

Hope this helps,
Jeff

-Original Message-
From: Magnus Jansson [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, March 19, 2002 11:22 AM
To: [EMAIL PROTECTED]
Subject: newbie jsp question


I'm getting nuts I tries to execute a stored procedure that looks like this:

INSERT_INTO_MATSEDEL (MATTEXT BLOB, DATUM Date, ISVEGO Integer, ISLUNCH
Integer) 

But I haven't got a clue how to write the jsp code to execute that
procedure.

I'm using Interbase 6.5 Pleeeaseee help me.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - 
Magnus Jansson
IT-Manager
Väddö folkhögskola
760 40 Väddö
Sweden

Phone: +46 (0) 176-528 00
Cellular: +46 (0) 70-370 33 16
Fax: +46 (0) 176-528 28
http://www.vaddo.fhsk.se (work)
http://www.jason.pp.se (private)



--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




RE: newbie jsp question

2002-03-19 Thread Randy Layman


You will need to learn how to use JDBC to access databases.  I would
suggest either going to Sun's JDBC site or looking at Interbase.  Once you
know how to execute the stored procedure from regular Java, JSP is trivial.

Randy


 -Original Message-
 From: Magnus Jansson [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, March 19, 2002 11:22 AM
 To: [EMAIL PROTECTED]
 Subject: newbie jsp question
 
 
 I'm getting nuts I tries to execute a stored procedure that 
 looks like this:
 
 INSERT_INTO_MATSEDEL (MATTEXT BLOB, DATUM Date, ISVEGO 
 Integer, ISLUNCH Integer) 
 
 But I haven't got a clue how to write the jsp code to execute 
 that procedure.
 
 I'm using Interbase 6.5 Pleeeaseee help me.
 
 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
 - - - - - - - - - - - - - - 
 Magnus Jansson
 IT-Manager
 Väddö folkhögskola
 760 40 Väddö
 Sweden
 
 Phone: +46 (0) 176-528 00
 Cellular: +46 (0) 70-370 33 16
 Fax: +46 (0) 176-528 28
 http://www.vaddo.fhsk.se (work)
 http://www.jason.pp.se (private)
 
 
 

--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Ang: RE: newbie jsp question

2002-03-19 Thread Magnus Jansson

Well! I already have a connection to the database, I can extract information out from 
the database but when I use execute procedure commando I only get that very hard to 
debug error page from tomcat. here is a copy of it:

java.lang.VerifyError: (class: interbase/interclient/ErrorKey, method:  signature: 
()V) Expecting to find object/array on stack
at interbase.interclient.SQLException.(SQLException.java:96)
at interbase.interclient.RecvMessage.createSQLException(RecvMessage.java:694)
at interbase.interclient.RecvMessage.makeSQLException(RecvMessage.java:593)
at interbase.interclient.RecvMessage.get_EXCEPTIONS(RecvMessage.java, Compiled 
Code)
at 
interbase.interclient.Statement.remote_EXECUTE_QUERY_STATEMENT(Statement.java, 
Compiled Code)
at interbase.interclient.Statement.executeQuery(Statement.java, Compiled Code)
at matsedel.input.updatematsedel_13._jspService(updatematsedel_13.java:117)
at org.apache.jasper.runtime.HttpJspBase.service(Unknown Source)
at javax.servlet.http.HttpServlet.service(HttpServlet.java, Compiled Code)
at org.apache.tomcat.facade.ServletHandler.doService(Unknown Source)
at org.apache.tomcat.core.Handler.invoke(Unknown Source)
at org.apache.tomcat.core.Handler.service(Unknown Source)
at org.apache.tomcat.facade.ServletHandler.service(Unknown Source)
at org.apache.tomcat.core.ContextManager.internalService(Unknown Source)
at org.apache.tomcat.core.ContextManager.service(Unknown Source)
at org.apache.tomcat.modules.server.Ajp13Interceptor.processConnection(Unknown 
Source)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(Unknown Source)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(Unknown 
Source)
at java.lang.Thread.run(Unknown Source)

I havent got a clue what is wrong.

here is the execute procedure part of my jsp page


if (request.getParameter(MandagLunchUID) == null)
{
MyQuery = EXECUTE PROCEDURE INSERT_INTO_MATSEDEL 'Mat mat mat' '2002-03-18' 1 
0;

//MyQuery = EXECUTE PROCEDURE INSERT_INTO_MATSEDEL (;
//MyQuery = MyQuery + request.getParameter(MandagLunchText) + ,;
//MyQuery = MyQuery + request.getParameter(MandagLunchDatum) + ,;
//if (IsVego.booleanValue())
//{
//  MyQuery = MyQuery + 1 + ,;
//}
//else
//{
// MyQuery = MyQuery + 0 + ,; 
//};
//MyQuery = MyQuery + 0);

MyRecordSet = StatementRecordset1.executeQuery(MyQuery);

out.print(OK insert måndag lunch);
}

As you can see there is a lot of remarks there, I only have that static call right now 
for test purpose..



 [EMAIL PROTECTED] 2002-03-19 16:44:05 

You will need to learn how to use JDBC to access databases.  I would
suggest either going to Sun's JDBC site or looking at Interbase.  Once you
know how to execute the stored procedure from regular Java, JSP is trivial.

Randy


 -Original Message-
 From: Magnus Jansson [mailto:[EMAIL PROTECTED]] 
 Sent: Tuesday, March 19, 2002 11:22 AM
 To: [EMAIL PROTECTED] 
 Subject: newbie jsp question
 
 
 I'm getting nuts I tries to execute a stored procedure that 
 looks like this:
 
 INSERT_INTO_MATSEDEL (MATTEXT BLOB, DATUM Date, ISVEGO 
 Integer, ISLUNCH Integer) 
 
 But I haven't got a clue how to write the jsp code to execute 
 that procedure.
 
 I'm using Interbase 6.5 Pleeeaseee help me.
 
 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
 - - - - - - - - - - - - - - 
 Magnus Jansson
 IT-Manager
 Väddö folkhögskola
 760 40 Väddö
 Sweden
 
 Phone: +46 (0) 176-528 00
 Cellular: +46 (0) 70-370 33 16
 Fax: +46 (0) 176-528 28
 http://www.vaddo.fhsk.se (work)
 http://www.jason.pp.se (private)
 
 
 

--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]



--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




OT: jsp question about uploading images to a database

2002-02-01 Thread Magnus Jansson

I want to insert images into a database via http and jsp pages. Does anyone have any 
experience or tips how to do that


--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




RE: jsp question about uploading images to a database

2002-02-01 Thread Marc Ostrow

http://www.servlets.com/cos/index.html

These classes will get you the upload part.

-Original Message-
From: Magnus Jansson [mailto:[EMAIL PROTECTED]]
Sent: Friday, February 01, 2002 9:20 AM
To: [EMAIL PROTECTED]
Subject: OT: jsp question about uploading images to a database

I want to insert images into a database via http and jsp pages. Does anyone
have any experience or tips how to do that


--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]


--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Duplicate Class Names in JSP Question

2001-11-14 Thread Thomas Burns

I have the following code in one of my .jsp files. 
%@ page import=com.redsoft.ems.beans.app.User %
%@ page import=com.redsoft.ems.tags.app.User %

It causes the errors listed below. Interestingly, if I comment out either page 
directive, I don't get the error. I also verified through testing that the problems 
seems to be related to the ending classname being the same (ie. User). I created two 
classes with the same class name, but in different packages and still had the same 
problem. I did verify that the two .User classes don't have overlapping names and have 
package statments that are correct.

Brief searches in the bug database did not yield suggestions or bug reports. Am I 
missing something?

Thoughts?
Thanks,
-Tom
Houston, TX


---



A Servlet Exception Has Occurred
Exception Report:
javax.servlet.ServletException: Unable to compile class for JSPimport 
com.redsoft.ems.tags.app.User;
   ^
import com.redsoft.ems.tags.app.User;
   ^
2 errors

at com.redsoft.ems.ActionServlet.routeAction(ActionServlet.java:115)
at com.redsoft.ems.ActionServlet.service(ActionServlet.java:72)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Unknown 
Source)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(Unknown Source)
at org.apache.catalina.core.StandardWrapperValve.invoke(Unknown Source)
at org.apache.catalina.core.StandardPipeline.invokeNext(Unknown Source)
at org.apache.catalina.core.StandardPipeline.invoke(Unknown Source)
at org.apache.catalina.core.ContainerBase.invoke(Unknown Source)
at org.apache.catalina.core.StandardContextValve.invoke(Unknown Source)
at org.apache.catalina.core.StandardPipeline.invokeNext(Unknown Source)
at org.apache.catalina.core.StandardPipeline.invoke(Unknown Source)
at org.apache.catalina.core.ContainerBase.invoke(Unknown Source)
at org.apache.catalina.core.StandardContext.invoke(Unknown Source)
at org.apache.catalina.core.StandardHostValve.invoke(Unknown Source)
at org.apache.catalina.core.StandardPipeline.invokeNext(Unknown Source)
at org.apache.catalina.core.StandardPipeline.invoke(Unknown Source)
at org.apache.catalina.core.ContainerBase.invoke(Unknown Source)
at org.apache.catalina.core.StandardEngineValve.invoke(Unknown Source)
at org.apache.catalina.core.StandardPipeline.invokeNext(Unknown Source)
at org.apache.catalina.core.StandardPipeline.invoke(Unknown Source)
at org.apache.catalina.core.ContainerBase.invoke(Unknown Source)
at org.apache.catalina.connector.warp.WarpRequestHandler.handle(Unknown Source)
at org.apache.catalina.connector.warp.WarpConnection.run(Unknown Source)
at java.lang.Thread.run(Thread.java:484)

Root Cause:
org.apache.jasper.JasperException: Unable to compile class for JSPimport 
com.redsoft.ems.tags.app.User;
   ^
import com.redsoft.ems.tags.app.User;
   ^
2 errors

at org.apache.jasper.compiler.Compiler.compile(Unknown Source)
at org.apache.jasper.servlet.JspServlet.loadJSP(Unknown Source)
at 
org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary(Unknown Source)
at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(Unknown 
Source)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(Unknown Source)
at org.apache.jasper.servlet.JspServlet.service(Unknown Source)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.catalina.core.ApplicationDispatcher.invoke(Unknown Source)
at org.apache.catalina.core.ApplicationDispatcher.doForward(Unknown Source)
at org.apache.catalina.core.ApplicationDispatcher.forward(Unknown Source)
at com.redsoft.ems.action.ActionRouter.route(ActionRouter.java:45)
at com.redsoft.ems.ActionServlet.routeAction(ActionServlet.java:112)
at com.redsoft.ems.ActionServlet.service(ActionServlet.java:72)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Unknown 
Source)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(Unknown Source)
at org.apache.catalina.core.StandardWrapperValve.invoke(Unknown Source)
at org.apache.catalina.core.StandardPipeline.invokeNext(Unknown Source)
at org.apache.catalina.core.StandardPipeline.invoke(Unknown Source)
at org.apache.catalina.core.ContainerBase.invoke(Unknown Source)
at org.apache.catalina.core.StandardContextValve.invoke(Unknown Source)
at org.apache.catalina.core.StandardPipeline.invokeNext(Unknown Source)
at org.apache.catalina.core.StandardPipeline.invoke(Unknown Source)
at 

Re: Duplicate Class Names in JSP Question

2001-11-14 Thread Craig R. McClanahan

The generated Java class for your JSP page is required to be legal Java
code -- and it's not legal to import both of these names in the same
source file.  Therefore, your program is in error.

Craig


On Wed, 14 Nov 2001, Thomas Burns wrote:

 Date: Wed, 14 Nov 2001 21:36:21 -0600
 From: Thomas Burns [EMAIL PROTECTED]
 Reply-To: Tomcat Users List [EMAIL PROTECTED],
  Thomas Burns [EMAIL PROTECTED]
 To: Tomcat Users List [EMAIL PROTECTED]
 Subject: Duplicate Class Names in JSP Question

 I have the following code in one of my .jsp files.
 %@ page import=com.redsoft.ems.beans.app.User %
 %@ page import=com.redsoft.ems.tags.app.User %

 It causes the errors listed below. Interestingly, if I comment out either page 
directive, I don't get the error. I also verified through testing that the problems 
seems to be related to the ending classname being the same (ie. User). I created two 
classes with the same class name, but in different packages and still had the same 
problem. I did verify that the two .User classes don't have overlapping names and 
have package statments that are correct.

 Brief searches in the bug database did not yield suggestions or bug reports. Am I 
missing something?

 Thoughts?
 Thanks,
 -Tom
 Houston, TX


 ---



 A Servlet Exception Has Occurred
 Exception Report:
 javax.servlet.ServletException: Unable to compile class for JSPimport 
com.redsoft.ems.tags.app.User;
^
 import com.redsoft.ems.tags.app.User;
^
 2 errors

   at com.redsoft.ems.ActionServlet.routeAction(ActionServlet.java:115)
   at com.redsoft.ems.ActionServlet.service(ActionServlet.java:72)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Unknown 
Source)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(Unknown Source)
   at org.apache.catalina.core.StandardWrapperValve.invoke(Unknown Source)
   at org.apache.catalina.core.StandardPipeline.invokeNext(Unknown Source)
   at org.apache.catalina.core.StandardPipeline.invoke(Unknown Source)
   at org.apache.catalina.core.ContainerBase.invoke(Unknown Source)
   at org.apache.catalina.core.StandardContextValve.invoke(Unknown Source)
   at org.apache.catalina.core.StandardPipeline.invokeNext(Unknown Source)
   at org.apache.catalina.core.StandardPipeline.invoke(Unknown Source)
   at org.apache.catalina.core.ContainerBase.invoke(Unknown Source)
   at org.apache.catalina.core.StandardContext.invoke(Unknown Source)
   at org.apache.catalina.core.StandardHostValve.invoke(Unknown Source)
   at org.apache.catalina.core.StandardPipeline.invokeNext(Unknown Source)
   at org.apache.catalina.core.StandardPipeline.invoke(Unknown Source)
   at org.apache.catalina.core.ContainerBase.invoke(Unknown Source)
   at org.apache.catalina.core.StandardEngineValve.invoke(Unknown Source)
   at org.apache.catalina.core.StandardPipeline.invokeNext(Unknown Source)
   at org.apache.catalina.core.StandardPipeline.invoke(Unknown Source)
   at org.apache.catalina.core.ContainerBase.invoke(Unknown Source)
   at org.apache.catalina.connector.warp.WarpRequestHandler.handle(Unknown Source)
   at org.apache.catalina.connector.warp.WarpConnection.run(Unknown Source)
   at java.lang.Thread.run(Thread.java:484)

 Root Cause:
 org.apache.jasper.JasperException: Unable to compile class for JSPimport 
com.redsoft.ems.tags.app.User;
^
 import com.redsoft.ems.tags.app.User;
^
 2 errors

   at org.apache.jasper.compiler.Compiler.compile(Unknown Source)
   at org.apache.jasper.servlet.JspServlet.loadJSP(Unknown Source)
   at 
org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary(Unknown Source)
   at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(Unknown 
Source)
   at org.apache.jasper.servlet.JspServlet.serviceJspFile(Unknown Source)
   at org.apache.jasper.servlet.JspServlet.service(Unknown Source)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
   at org.apache.catalina.core.ApplicationDispatcher.invoke(Unknown Source)
   at org.apache.catalina.core.ApplicationDispatcher.doForward(Unknown Source)
   at org.apache.catalina.core.ApplicationDispatcher.forward(Unknown Source)
   at com.redsoft.ems.action.ActionRouter.route(ActionRouter.java:45)
   at com.redsoft.ems.ActionServlet.routeAction(ActionServlet.java:112)
   at com.redsoft.ems.ActionServlet.service(ActionServlet.java:72)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Unknown 
Source)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(Unknown Source)
   at org.apache.catalina.core.StandardWrapperValve.invoke(Unknown Source

Fw: Duplicate Class Names in JSP Question

2001-11-14 Thread Thomas Burns

Incidentially, using the following works fine as well...
%@ page import=com.redsoft.ems.beans.app.* %
%@ page import=com.redsoft.ems.tags.app.* %


- Original Message - 
From: Thomas Burns 
To: Tomcat Users List 
Sent: Wednesday, November 14, 2001 9:36 PM
Subject: Duplicate Class Names in JSP Question


I have the following code in one of my .jsp files. 
%@ page import=com.redsoft.ems.beans.app.User %
%@ page import=com.redsoft.ems.tags.app.User %

It causes the errors listed below. Interestingly, if I comment out either page 
directive, I don't get the error. I also verified through testing that the problems 
seems to be related to the ending classname being the same (ie. User). I created two 
classes with the same class name, but in different packages and still had the same 
problem. I did verify that the two .User classes don't have overlapping names and have 
package statments that are correct.

Brief searches in the bug database did not yield suggestions or bug reports. Am I 
missing something?

Thoughts?
Thanks,
-Tom
Houston, TX


---
 


A Servlet Exception Has Occurred
Exception Report:
javax.servlet.ServletException: Unable to compile class for JSPimport 
com.redsoft.ems.tags.app.User;
   ^
import com.redsoft.ems.tags.app.User;
   ^
2 errors

at com.redsoft.ems.ActionServlet.routeAction(ActionServlet.java:115)
at com.redsoft.ems.ActionServlet.service(ActionServlet.java:72)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Unknown 
Source)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(Unknown Source)
at org.apache.catalina.core.StandardWrapperValve.invoke(Unknown Source)
at org.apache.catalina.core.StandardPipeline.invokeNext(Unknown Source)
at org.apache.catalina.core.StandardPipeline.invoke(Unknown Source)
at org.apache.catalina.core.ContainerBase.invoke(Unknown Source)
at org.apache.catalina.core.StandardContextValve.invoke(Unknown Source)
at org.apache.catalina.core.StandardPipeline.invokeNext(Unknown Source)
at org.apache.catalina.core.StandardPipeline.invoke(Unknown Source)
at org.apache.catalina.core.ContainerBase.invoke(Unknown Source)
at org.apache.catalina.core.StandardContext.invoke(Unknown Source)
at org.apache.catalina.core.StandardHostValve.invoke(Unknown Source)
at org.apache.catalina.core.StandardPipeline.invokeNext(Unknown Source)
at org.apache.catalina.core.StandardPipeline.invoke(Unknown Source)
at org.apache.catalina.core.ContainerBase.invoke(Unknown Source)
at org.apache.catalina.core.StandardEngineValve.invoke(Unknown Source)
at org.apache.catalina.core.StandardPipeline.invokeNext(Unknown Source)
at org.apache.catalina.core.StandardPipeline.invoke(Unknown Source)
at org.apache.catalina.core.ContainerBase.invoke(Unknown Source)
at org.apache.catalina.connector.warp.WarpRequestHandler.handle(Unknown Source)
at org.apache.catalina.connector.warp.WarpConnection.run(Unknown Source)
at java.lang.Thread.run(Thread.java:484)

Root Cause:
org.apache.jasper.JasperException: Unable to compile class for JSPimport 
com.redsoft.ems.tags.app.User;
   ^
import com.redsoft.ems.tags.app.User;
   ^
2 errors

at org.apache.jasper.compiler.Compiler.compile(Unknown Source)
at org.apache.jasper.servlet.JspServlet.loadJSP(Unknown Source)
at 
org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary(Unknown Source)
at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(Unknown 
Source)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(Unknown Source)
at org.apache.jasper.servlet.JspServlet.service(Unknown Source)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.catalina.core.ApplicationDispatcher.invoke(Unknown Source)
at org.apache.catalina.core.ApplicationDispatcher.doForward(Unknown Source)
at org.apache.catalina.core.ApplicationDispatcher.forward(Unknown Source)
at com.redsoft.ems.action.ActionRouter.route(ActionRouter.java:45)
at com.redsoft.ems.ActionServlet.routeAction(ActionServlet.java:112)
at com.redsoft.ems.ActionServlet.service(ActionServlet.java:72)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Unknown 
Source)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(Unknown Source)
at org.apache.catalina.core.StandardWrapperValve.invoke(Unknown Source)
at org.apache.catalina.core.StandardPipeline.invokeNext(Unknown Source)
at org.apache.catalina.core.StandardPipeline.invoke(Unknown Source

Login j_security_check JSP question

2001-10-02 Thread Gerry Duhig

Help!

I want to find a sample of a JSP Page to use as the authentication form in a
secure application. I have seen reference to such a page but cannot find a
sample. We currently use an html page but need some additional processing.

Please direct me to a URL or send me a sample

Thanks

Gerry





Réf. : Login j_security_check JSP question

2001-10-02 Thread R . DAVIDOVICH


in the folder $CATALINA8HOME/webapps/examples/jsp/security/protected/
there are three pages: login.jsp, error.jsp and index.jsp...
and in the server's web.xml there's the security constraint and the login
configuration...

hope it's what you're looking for...

---
Raul Davidovich
Adm Réseaux et Systèmes
Cvitkovic  Associés Consultants

(33) 1 45 15 40 68
(33) 1 45 15 40 41 Fax
---
http://www.caconcology.com




XML version of JSP question

2001-09-10 Thread James Smith

Hello.  I've looked through the archives, but I haven't seen a solution to
this problem.  I'm using XSLT to create a JSP page and to get that to work,
I am using Tomcat 4.0 Release Candidate 1 (on a Windows 2000 box, only
running Tomcat--no Apache nor IIS).  But the simple tests of the XML-version
of JSP I'm using seems to process all the scriplets first, and then the
HTML.  For instance, this code in regular JSP format returns the right
results:

%
int a = 15;
%
htmlheadtitlehi there/title/head
body
Hi.  My variable is: %=a%. br /
% out.println(I like mongeese!br /); %
/body/html

**the results***

Hi. My variable is: 15.
I like mongeese!

**

While the XML-style, which looks like this:

?xml version=1.0 ?
jsp:root xmlns:jsp=http://java.sun.com/JSP/Page;
  version=1.2
jsp:scriptlet
int a = 15;
/jsp:scriptlet
htmlheadtitletest/title/head
body
Hi everyone!  The number is: jsp:expressiona/jsp:expression.br /
jsp:scriptlet
out.println(I like the mongoose!br /);
/jsp:scriptlet
/body/html
/jsp:root

Returns this:

15



I like the mongoose! Hi everyone! The number is: .


I attempted to add a namespace to my HTML tags in the XML version; however,
when I tried to run that version, I received an exception saying that the
URI I was using (http://www.w3.org/1999/xhtml) was not resolvable:

***

org.apache.jasper.JasperException: This absolute uri
(http://www.w3.org/1999/xhtml) cannot be resolved in either web.xml or the
jar files deployed with this application



So my questions are:
1) How do I get Jasper to resolve the namespace URI?  (I'm assuming that I
have to stick a line in web.xml?)
2) How do I get Tomcat to render XML-style JSP in the right order, just as
regular style JSP renders?

Thank all of you very much for your assistance in these questions.

James Smith




RE: XML version of JSP question

2001-09-10 Thread Greg Trasuk

Hi James:

It appears that you need to put your text into CDATA sections inside
jsp:text tags.  The following seems to work:

?xml version=1.0 ?
jsp:root xmlns:jsp=http://java.sun.com/JSP/Page;
  version=1.2
jsp:scriptlet
int a = 15;
/jsp:scriptlet
jsp:text![CDATA[htmlheadtitletest/title/head
body
Hi everyone!  The number is:]]
/jsp:text jsp:expressiona/jsp:expression
jsp:text.br //jsp:text
jsp:scriptlet
out.println(I like the mongoose!br /);
/jsp:scriptlet
jsp:text![CDATA[/body/html]]/jsp:text
/jsp:root

Greg Trasuk, President
StratusCom Manufacturing Systems Inc. - We use information technology to
solve business problems on your plant floor.
http://stratuscom.ca

 -Original Message-
 From: James Smith [mailto:[EMAIL PROTECTED]]
 Sent: Monday, September 10, 2001 11:25 AM
 To: [EMAIL PROTECTED]
 Subject: XML version of JSP question


 Hello.  I've looked through the archives, but I haven't seen
 a solution to
 this problem.  I'm using XSLT to create a JSP page and to get
 that to work,
 I am using Tomcat 4.0 Release Candidate 1 (on a Windows 2000 box, only
 running Tomcat--no Apache nor IIS).  But the simple tests of
 the XML-version
 of JSP I'm using seems to process all the scriplets first,
 and then the
 HTML.  For instance, this code in regular JSP format returns the right
 results:

 %
 int a = 15;
 %
 htmlheadtitlehi there/title/head
 body
 Hi.  My variable is: %=a%. br /
 % out.println(I like mongeese!br /); %
 /body/html

 **the results***

 Hi. My variable is: 15.
 I like mongeese!

 **

 While the XML-style, which looks like this:

 ?xml version=1.0 ?
 jsp:root xmlns:jsp=http://java.sun.com/JSP/Page;
   version=1.2
 jsp:scriptlet
 int a = 15;
 /jsp:scriptlet
 htmlheadtitletest/title/head
 body
 Hi everyone!  The number is:
 jsp:expressiona/jsp:expression.br /
 jsp:scriptlet
 out.println(I like the mongoose!br /);
 /jsp:scriptlet
 /body/html
 /jsp:root

 Returns this:
 
 15



 I like the mongoose! Hi everyone! The number is: .
 

 I attempted to add a namespace to my HTML tags in the XML
 version; however,
 when I tried to run that version, I received an exception
 saying that the
 URI I was using (http://www.w3.org/1999/xhtml) was not resolvable:

 ***

 org.apache.jasper.JasperException: This absolute uri
 (http://www.w3.org/1999/xhtml) cannot be resolved in either
 web.xml or the
 jar files deployed with this application

 

 So my questions are:
 1) How do I get Jasper to resolve the namespace URI?  (I'm
 assuming that I
 have to stick a line in web.xml?)
 2) How do I get Tomcat to render XML-style JSP in the right
 order, just as
 regular style JSP renders?

 Thank all of you very much for your assistance in these questions.

 James Smith





Re: XML version of JSP question

2001-09-10 Thread James Smith

Excellent.  It worked.  Thank you very much.

James Smith

- Original Message - 
From: Greg Trasuk [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, September 10, 2001 2:28 PM
Subject: RE: XML version of JSP question


 Hi James:
 
 It appears that you need to put your text into CDATA sections inside
 jsp:text tags.  The following seems to work:
 
 ?xml version=1.0 ?
 jsp:root xmlns:jsp=http://java.sun.com/JSP/Page;
   version=1.2
 jsp:scriptlet
 int a = 15;
 /jsp:scriptlet
 jsp:text![CDATA[htmlheadtitletest/title/head
 body
 Hi everyone!  The number is:]]
 /jsp:text jsp:expressiona/jsp:expression
 jsp:text.br //jsp:text
 jsp:scriptlet
 out.println(I like the mongoose!br /);
 /jsp:scriptlet
 jsp:text![CDATA[/body/html]]/jsp:text
 /jsp:root
 
 Greg Trasuk, President
 StratusCom Manufacturing Systems Inc. - We use information technology to
 solve business problems on your plant floor.
 http://stratuscom.ca
 
  -Original Message-
  From: James Smith [mailto:[EMAIL PROTECTED]]
  Sent: Monday, September 10, 2001 11:25 AM
  To: [EMAIL PROTECTED]
  Subject: XML version of JSP question
 
 
  Hello.  I've looked through the archives, but I haven't seen
  a solution to
  this problem.  I'm using XSLT to create a JSP page and to get
  that to work,
  I am using Tomcat 4.0 Release Candidate 1 (on a Windows 2000 box, only
  running Tomcat--no Apache nor IIS).  But the simple tests of
  the XML-version
  of JSP I'm using seems to process all the scriplets first,
  and then the
  HTML.  For instance, this code in regular JSP format returns the right
  results:
 
  %
  int a = 15;
  %
  htmlheadtitlehi there/title/head
  body
  Hi.  My variable is: %=a%. br /
  % out.println(I like mongeese!br /); %
  /body/html
 
  **the results***
 
  Hi. My variable is: 15.
  I like mongeese!
 
  **
 
  While the XML-style, which looks like this:
 
  ?xml version=1.0 ?
  jsp:root xmlns:jsp=http://java.sun.com/JSP/Page;
version=1.2
  jsp:scriptlet
  int a = 15;
  /jsp:scriptlet
  htmlheadtitletest/title/head
  body
  Hi everyone!  The number is:
  jsp:expressiona/jsp:expression.br /
  jsp:scriptlet
  out.println(I like the mongoose!br /);
  /jsp:scriptlet
  /body/html
  /jsp:root
 
  Returns this:
  
  15
 
 
 
  I like the mongoose! Hi everyone! The number is: .
  
 
  I attempted to add a namespace to my HTML tags in the XML
  version; however,
  when I tried to run that version, I received an exception
  saying that the
  URI I was using (http://www.w3.org/1999/xhtml) was not resolvable:
 
  ***
 
  org.apache.jasper.JasperException: This absolute uri
  (http://www.w3.org/1999/xhtml) cannot be resolved in either
  web.xml or the
  jar files deployed with this application
 
  
 
  So my questions are:
  1) How do I get Jasper to resolve the namespace URI?  (I'm
  assuming that I
  have to stick a line in web.xml?)
  2) How do I get Tomcat to render XML-style JSP in the right
  order, just as
  regular style JSP renders?
 
  Thank all of you very much for your assistance in these questions.
 
  James Smith
 
 




Newbie JSP Question:

2001-08-30 Thread Peter L. Markowsky

I know this doesn't relate to Tomcat directly, but since Tomcat hosts JSPs
or at least is able I was wondering if anyone out there knew / could
recommend how to pass values from one JSP page to another. The problem I'm
having is that when I try to submit a form and then use
request.getParameter( parametername ) I keep getting nulls even though I
specify the parameter name.
-Thanks for all the Help
Pete Markowsky





Re: Newbie JSP Question:

2001-08-30 Thread Nirav S. Desai

Do you have a submit button. 
Peter L. Markowsky wrote:
 
 I know this doesn't relate to Tomcat directly, but since Tomcat hosts JSPs
 or at least is able I was wondering if anyone out there knew / could
 recommend how to pass values from one JSP page to another. The problem I'm
 having is that when I try to submit a form and then use
 request.getParameter( parametername ) I keep getting nulls even though I
 specify the parameter name.
 -Thanks for all the Help
 Pete Markowsky

-- 
Nirav S. Desai
Software Engineer
Vecna Technologies, Inc.
6525 Belcrest Rd, Suite 612
Hyattsville MD, 20782
Phone: 301.864.7253
Fax:   301.699.3180



Re: Newbie JSP Question:

2001-08-30 Thread Dmitri Colebatch

try request.setAttribute( ... ) in the first jsp and request.getAttribute(
... ) in the second.

hth
dim


On Thu, 30 Aug 2001, Peter L. Markowsky wrote:

 I know this doesn't relate to Tomcat directly, but since Tomcat hosts JSPs
 or at least is able I was wondering if anyone out there knew / could
 recommend how to pass values from one JSP page to another. The problem I'm
 having is that when I try to submit a form and then use
 request.getParameter( parametername ) I keep getting nulls even though I
 specify the parameter name.
   -Thanks for all the Help
   Pete Markowsky
 
 
 




Re: Newbie JSP Question:

2001-08-30 Thread Guilherme Zambon

Take care with the case sensitive.
A way to see which parameters were passed is using a code like:
%@ page import=java.util.*%
html
head
/head
body
pre
%
Enumeration e = request.getParameterNames();
String s = new String();
while(e.hasMoreElements()) {
s = (String) e.nextElement();
%
The parameter %=s% has value%=request.getParameter(s)%br
%
}
%
/pre
/body
- Original Message - 
From: Peter L. Markowsky [EMAIL PROTECTED]
To: Sukhwinder Singh [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Thursday, August 30, 2001 6:28 PM
Subject: Newbie JSP Question:


I know this doesn't relate to Tomcat directly, but since Tomcat hosts JSPs
or at least is able I was wondering if anyone out there knew / could
recommend how to pass values from one JSP page to another. The problem I'm
having is that when I try to submit a form and then use
request.getParameter( parametername ) I keep getting nulls even though I
specify the parameter name.
-Thanks for all the Help
Pete Markowsky






Java Beans and JSP Question.

2001-07-31 Thread Dan Hinojosa

I have a standard java bean.  The different thing about it is that I
usually have two overloaded set methods per attribute.  For example,

public class MyBean {
private int a;

public setA (int a) throws Exception {
if (a  100) throw new Exception (Must be less than 100);
}

public setA (String a) throws Exception {
try {
setA(Integer.parseInt(a));
} catch (NumberFormat Exception exception) {
throw new Exception (Format incorrect.);
}
}

//I usually have one getA
public int getA() {
return a;
}
}


Now when I use this bean in a JSP that is stored in the request scope,
at times the compiler will complain that it cannot find a get method for
A.  Even though one get method for that particular attribute is
clearly there.

Some added information, I use Forte Community Edition 2, and Tomcat.
Forte's compiler complains about one attribute while Tomcat complains
about another completely different attribute it cannot find the get
method for.  Which makes me itch with anger.  The note is my example
above is very simple. I used it just to explain my problem.  My actual
bean has about 17 attributes all with 2 setter methods each and 1 get
method each.

Does anyone know how to resolve this issue?

Thanks for your help.
Dan Hinojosa






Re: Java Beans and JSP Question.

2001-07-31 Thread Pritchard

I spent some time chasing the same problem.  It
appeared to me that the Introspector was getting
get/set methods in pairs based on the property name,
parameter list, and return type.  It seemed to expect
that you adhered to the Java beans standard of 
void setA(int a){}
int getA(){}
where the return type of the getter matched the input
parameter of the setter.  It matched up get/set method
pairs that way.

So in your case the pair would be
void setA(int a)
int getA()

void setA(String a)
null  

It then iterated through the list of methods looking
for one that matched the *name* I had requested.  It
sometimes found the pair where the getter was null
before finding the other pair and caused the error
you've found.

I fixed it by renaming my method to setAasString() or
something like that.  A bit ugly, but I couldn't find
another way to make the introspector behave.

Sean
 
 
 -Original Message-
 From: Dan Hinojosa [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, July 31, 2001 12:40 PM
 To: [EMAIL PROTECTED]
 Subject: Java Beans and JSP Question.
 
 
 I have a standard java bean.  The different thing
 about it is that I
 usually have two overloaded set methods per
 attribute.  For example,
 
 public class MyBean {
 private int a;
 
 public setA (int a) throws Exception {
 if (a  100) throw new Exception (Must be
 less than 100);
 }
 
 public setA (String a) throws Exception {
 try {
 setA(Integer.parseInt(a));
 } catch (NumberFormat Exception exception) {
 throw new Exception (Format
 incorrect.);
 }
 }
 
 //I usually have one getA
 public int getA() {
 return a;
 }
 }
 
 
 Now when I use this bean in a JSP that is stored in
 the request scope,
 at times the compiler will complain that it cannot
 find a get method for
 A.  Even though one get method for that particular
 attribute is
 clearly there.
 
 Some added information, I use Forte Community
 Edition 2, and Tomcat.
 Forte's compiler complains about one attribute while
 Tomcat complains
 about another completely different attribute it
 cannot find the get
 method for.  Which makes me itch with anger.  The
 note is my example
 above is very simple. I used it just to explain my
 problem.  My actual
 bean has about 17 attributes all with 2 setter
 methods each and 1 get
 method each.
 
 Does anyone know how to resolve this issue?
 
 Thanks for your help.
 Dan Hinojosa
 
 


__
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/



Re: Java Beans and JSP Question.

2001-07-31 Thread Craig R. McClanahan

On Tue, 31 Jul 2001, Dan Hinojosa wrote:

 I have a standard java bean.  The different thing about it is that I
 usually have two overloaded set methods per attribute.

Doing this violates the design patterns for getters and setters listed in
the JavaBeans specification.  Therefore, the JDK's introspection logic
will not recognize this as a property.

You need to either have only one setter (with a type that matches the
corresponding getter), or you must define a BeanInfo class that
specifically lists the method names and parameter types of your getter and
setter methods.

Craig McClanahan




Java Beans and JSP Question.

2001-07-31 Thread Shawn

Dear Dan,

I believe I'm familiar with the problem you're having and think it's related to Forte. 
  In my case, either Tomcat or Forte complained about methods that were clearly there. 
 What I've had to do is take my bean and put it in two places.  Within Explorer in 
Forte which shows my filesystems I have 
c:\tomcat\webapps\myApp\WEB-INF\classes\com\koyuru.  I have also had to directly mount 
com\koyuru as a filesystem within Forte as well.  If I modify a bean in one, I must 
copy it to the other, otherwise either Tomcat or Forte will complain.

In my case I was using examples from the jspBook and tried to modify them but Forte 
claimed my new method wasn't there. It didn't seem so related to overloading as much 
as the filesystem.  That shut it up though.

Shawn


I have a standard java bean.  The different thing about it is that I
usually have two overloaded set methods per attribute.  For example,

public class MyBean {
private int a;

public setA (int a) throws Exception {
if (a  100) throw new Exception (Must be less than 100);
}

public setA (String a) throws Exception {
try {
setA(Integer.parseInt(a));
} catch (NumberFormat Exception exception) {
throw new Exception (Format incorrect.);
}
}

//I usually have one getA
public int getA() {
return a;
}
}

Now when I use this bean in a JSP that is stored in the request scope,
at times the compiler will complain that it cannot find a get method for
A.  Even though one get method for that particular attribute is
clearly there.

Some added information, I use Forte Community Edition 2, and Tomcat.
Forte's compiler complains about one attribute while Tomcat complains
about another completely different attribute it cannot find the get
method for.  Which makes me itch with anger.  The note is my example
above is very simple. I used it just to explain my problem.  My actual
bean has about 17 attributes all with 2 setter methods each and 1 get
method each.

Does anyone know how to resolve this issue?

Thanks for your help.
Dan Hinojosa




AW: Java Beans and JSP Question.

2001-07-31 Thread Nikolic Branislav

UNSUBSCRIBE!!!

-Ursprungliche Nachricht-
Von: Craig R. McClanahan [mailto:[EMAIL PROTECTED]]
Gesendet: Dienstag, 31. Juli 2001 23:52
An: [EMAIL PROTECTED]
Betreff: Re: Java Beans and JSP Question.


On Tue, 31 Jul 2001, Dan Hinojosa wrote:

 I have a standard java bean.  The different thing about it is that I
 usually have two overloaded set methods per attribute.

Doing this violates the design patterns for getters and setters listed in
the JavaBeans specification.  Therefore, the JDK's introspection logic
will not recognize this as a property.

You need to either have only one setter (with a type that matches the
corresponding getter), or you must define a BeanInfo class that
specifically lists the method names and parameter types of your getter and
setter methods.

Craig McClanahan




Java Beans and JSP Question

2001-07-31 Thread Shawn
Dear Dan,

I believe I'm familiar with the problem you're having and think it's related
to Forte.   In my case, either Tomcat or Forte complained about methods that
were clearly there.  What I've had to do is take my bean and put it in two
places.  Within Explorer in Forte which shows my filesystems I have
c:\tomcat\webapps\myApp\WEB-INF\classes\com\koyuru.  I have also had to
directly mount com\koyuru as a filesystem within Forte as well.  If I modify
a bean in one, I must copy it to the other, otherwise either Tomcat or Forte
will complain.

In my case I was using examples from the jspBook and tried to modify them
but Forte claimed my new method wasn't there. It didn't seem so related to
overloading as much as the filesystem.  That shut it up though.

Shawn


I have a standard java bean.  The different thing about it is that I
usually have two overloaded set methods per attribute.  For example,

public class MyBean {
private int a;

public setA (int a) throws Exception {
if (a  100) throw new Exception ("Must be less than 100");
}

public setA (String a) throws Exception {
try {
setA(Integer.parseInt(a));
} catch (NumberFormat Exception exception) {
throw new Exception ("Format incorrect.");
}
}

//I usually have one getA
public int getA() {
return a;
}
}

Now when I use this bean in a JSP that is stored in the request scope,
at times the compiler will complain that it cannot find a get method for
"A".  Even though one get method for that particular attribute is
clearly there.

Some added information, I use Forte Community Edition 2, and Tomcat.
Forte's compiler complains about one attribute while Tomcat complains
about another completely different attribute it cannot find the get
method for.  Which makes me itch with anger.  The note is my example
above is very simple. I used it just to explain my problem.  My actual
bean has about 17 attributes all with 2 setter methods each and 1 get
method each.

Does anyone know how to resolve this issue?

Thanks for your help.
Dan Hinojosa


white space in JSP - question from a newbie

2001-07-28 Thread Rodney J. Lucas



I ran across a problem while trying to learn how to program with tomcat/jsp.

I was running a simple case statement and got an error stating Statement
not reached.
=
Error: 500
Location: /lucas/switch.jsp
Internal Servlet Error:

org.apache.jasper.JasperException: Unable to compile class for
JSPC:\bin\tomcat\3.2.3\work\localhost_8080%2Flucas\_0002fswitch_0002ejspswit
ch_jsp_3.java:74: Statement not reached.
out.write(\t\r\n\r\n);
^
===

I couldn't figure this out for a while until I understood out how to view
the java produced by the jsp code.  Because my case statement had
whitespaces between jsp tags the jasper engine decided to produce out.write
statements in the wrong place.

I modified my jsp to work but I wanted to ask if this was a bug.
I can just format my code differently, but it seems like a error other
newbies would make and I am sure it can get a bit nastier with more
complicated code. Is this behaviour part of the spec or can I expect
different implementations to behave differently.

Rodney

Here is a listing to reproduce the error.  I have fixed most of the
whitespace problem exept for the case statement just before monday.

==
%!
java.util.Calendar todaysDate= java.util.Calendar.getInstance();
int myDay = todaysDate.get(todaysDate.DAY_OF_WEEK);
%

html
head
titleSWITCH/title
meta http-equiv=Content-Type content=text/html; charset=iso-8859-1
/head

body bgcolor=#FF text=#00
pfont size=-1 color=red

% switch (myDay) {
case 1: %
Today is Sunday
%  break; %

%  case 2: %
Today is Monday
%  break;

case 3: %
Today is Tuesday
%  break;
case 4: %
Today is Wednesday
%  break;
case 5:%
Today is Thursday
%  break;
case 6: %
Today is Friday
%  break;
case 7: %
Today is Saturday
%  break;
default: %
Invalid day of the week:
%  break;
} %

/font/p
/body
/html




Jsp question

2001-06-28 Thread Fredrik Liden

Let's say I have multiple forms on a page.

Does anyone know if I can retrive the name of the form that was submitted
using the request object? or if there is any other way to find out.

Thanks!

Fredrik



Re: Jsp question

2001-06-28 Thread Matt Christensen

Two quick ideas:

1. Include in each of your forms a html hidden tag that has a name value
that will be common for each form, and a value dependent on the identity of
the form.  Then you can get from the request object the expected key value
and find the form.
input type=hidden name=FormVariable value=FormNumber2

2.  If every one of your forms has some sort of submit button, you can give
that button a common name for all forms, and a value dependent on the form
its a part of.
input type=submit name=FormVariable value=FormNumber1

Hope that helps,
Matt
- Original Message -
From: Fredrik Liden [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, June 28, 2001 1:44 PM
Subject: Jsp question


 Let's say I have multiple forms on a page.

 Does anyone know if I can retrive the name of the form that was submitted
 using the request object? or if there is any other way to find out.

 Thanks!

 Fredrik





Tomcat/JSP Question

2001-06-01 Thread Mike Alba



Hi,

 Forgive me for the beginner question but I 
am trying to 
instantiate a class for a JSP.
I am using:

jsp:useBean id = "EX" class = "Example" scope = "session" 
/
Thus I am under the assumption that my "Example" class is being
instantiated and the constructor is called, is this incorrect?Basically 
I am trying to instantiate a class for a session and
was wondering if this is the way to do it. 
And so if it is can I access class objects, I am assuming
I am supposed to use 
 jsp:get_property
 jsp:set_property

rather then EX.counter
where counter is a property of the "Example class"

Once again sorry for the newbie question
and thanks for any help you can give!!

Mike


RE: Tomcat/JSP Question

2001-06-01 Thread Purcell, Scott

I think you may have the syntax for 
  jsp:get_property
  jsp:set_property
wrong.
It is jsp:getProperty()
and jsp:setProperty()
 
Here is a textbook example from Fields and Kolbs book. Hope it helps
#JSP
 
% page import = com.taglib.wdjsp.components.CompoundIntrestBean %
jsp:useBean id=calculator class=CompoundInterestBean /
jsp:setProperty name=calculator property=principal /
/jsp:useBean
jsp:getProperty name=calculator property=principal /
 
Hope that helps,
Scott
 
 
 

-Original Message-
From: Mike Alba [mailto:[EMAIL PROTECTED]]
Sent: Friday, June 01, 2001 2:47 PM
To: [EMAIL PROTECTED]
Subject: Tomcat/JSP Question


Hi,
 
  Forgive me for the beginner question but I am trying to 
instantiate a class for a JSP.
I am using:
jsp:useBean id = EX class = Example scope = session /

Thus I am under the assumption that my Example class is being
instantiated and the constructor is called, is this incorrect?
Basically I am trying to instantiate a class for a session and
was wondering if this is the way to do it. 
And so if it is can I access class objects, I am assuming
I am supposed to use 
  jsp:get_property
  jsp:set_property
 
rather then EX.counter
where counter is a property of the Example class
 
Once again sorry for the newbie question
and thanks for any help you can give!!
 
Mike




Re: Tomcat/JSP Question

2001-06-01 Thread Mike Alba

Actually I was wondering if you can do this

Class Example
{
  
  public Object myObject;

  public Example()
  {
 this.myObject = new myObject();
  } // end constructor

}

then acess it via my JSP

jsp:useBean id = EX class = Example scope = session /
% int my_object = EX.myObject %

It says that this doesnt exist? Is there no way 
to do this?

Thanks so much for your help!

Mike

- Original Message - 
From: Purcell, Scott [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, June 01, 2001 12:47 PM
Subject: RE: Tomcat/JSP Question


 I think you may have the syntax for 
   jsp:get_property
   jsp:set_property
 wrong.
 It is jsp:getProperty()
 and jsp:setProperty()
  
 Here is a textbook example from Fields and Kolbs book. Hope it helps
 #JSP
  
 % page import = com.taglib.wdjsp.components.CompoundIntrestBean %
 jsp:useBean id=calculator class=CompoundInterestBean /
 jsp:setProperty name=calculator property=principal /
 /jsp:useBean
 jsp:getProperty name=calculator property=principal /
  
 Hope that helps,
 Scott
  
  
  
 
 -Original Message-
 From: Mike Alba [mailto:[EMAIL PROTECTED]]
 Sent: Friday, June 01, 2001 2:47 PM
 To: [EMAIL PROTECTED]
 Subject: Tomcat/JSP Question
 
 
 Hi,
  
   Forgive me for the beginner question but I am trying to 
 instantiate a class for a JSP.
 I am using:
 jsp:useBean id = EX class = Example scope = session /
 
 Thus I am under the assumption that my Example class is being
 instantiated and the constructor is called, is this incorrect?
 Basically I am trying to instantiate a class for a session and
 was wondering if this is the way to do it. 
 And so if it is can I access class objects, I am assuming
 I am supposed to use 
   jsp:get_property
   jsp:set_property
  
 rather then EX.counter
 where counter is a property of the Example class
  
 Once again sorry for the newbie question
 and thanks for any help you can give!!
  
 Mike
 




Re: Tomcat/JSP Question

2001-06-01 Thread Francisco Areas Guimaraes

I could be wrong, but 'int' is a primitive type, I don´t know if it extends
Object, have you tried 'Integer my_object = EX.myObject' ?

Francisco

- Original Message -
From: Mike Alba [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, June 01, 2001 7:17 PM
Subject: Re: Tomcat/JSP Question


 Actually I was wondering if you can do this

 Class Example
 {

   public Object myObject;

   public Example()
   {
  this.myObject = new myObject();
   } // end constructor

 }

 then acess it via my JSP

 jsp:useBean id = EX class = Example scope = session /
 % int my_object = EX.myObject %

 It says that this doesnt exist? Is there no way
 to do this?

 Thanks so much for your help!

 Mike

 - Original Message -
 From: Purcell, Scott [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Friday, June 01, 2001 12:47 PM
 Subject: RE: Tomcat/JSP Question


  I think you may have the syntax for
jsp:get_property
jsp:set_property
  wrong.
  It is jsp:getProperty()
  and jsp:setProperty()
 
  Here is a textbook example from Fields and Kolbs book. Hope it helps
  #JSP
 
  % page import = com.taglib.wdjsp.components.CompoundIntrestBean %
  jsp:useBean id=calculator class=CompoundInterestBean /
  jsp:setProperty name=calculator property=principal /
  /jsp:useBean
  jsp:getProperty name=calculator property=principal /
 
  Hope that helps,
  Scott
 
 
 
 
  -Original Message-
  From: Mike Alba [mailto:[EMAIL PROTECTED]]
  Sent: Friday, June 01, 2001 2:47 PM
  To: [EMAIL PROTECTED]
  Subject: Tomcat/JSP Question
 
 
  Hi,
 
Forgive me for the beginner question but I am trying to
  instantiate a class for a JSP.
  I am using:
  jsp:useBean id = EX class = Example scope = session /
 
  Thus I am under the assumption that my Example class is being
  instantiated and the constructor is called, is this incorrect?
  Basically I am trying to instantiate a class for a session and
  was wondering if this is the way to do it.
  And so if it is can I access class objects, I am assuming
  I am supposed to use
jsp:get_property
jsp:set_property
 
  rather then EX.counter
  where counter is a property of the Example class
 
  Once again sorry for the newbie question
  and thanks for any help you can give!!
 
  Mike
 






Re: Tomcat/JSP Question

2001-06-01 Thread Mike Alba

Oops it is supposed to be

% Object myObject = EX.myObject %
- Original Message -
From: Francisco Areas Guimaraes [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, June 01, 2001 3:22 PM
Subject: Re: Tomcat/JSP Question


 I could be wrong, but 'int' is a primitive type, I don´t know if it
extends
 Object, have you tried 'Integer my_object = EX.myObject' ?

 Francisco

 - Original Message -
 From: Mike Alba [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Friday, June 01, 2001 7:17 PM
 Subject: Re: Tomcat/JSP Question


  Actually I was wondering if you can do this
 
  Class Example
  {
 
public Object myObject;
 
public Example()
{
   this.myObject = new myObject();
} // end constructor
 
  }
 
  then acess it via my JSP
 
  jsp:useBean id = EX class = Example scope = session /
  % int my_object = EX.myObject %
 
  It says that this doesnt exist? Is there no way
  to do this?
 
  Thanks so much for your help!
 
  Mike
 
  - Original Message -
  From: Purcell, Scott [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Sent: Friday, June 01, 2001 12:47 PM
  Subject: RE: Tomcat/JSP Question
 
 
   I think you may have the syntax for
 jsp:get_property
 jsp:set_property
   wrong.
   It is jsp:getProperty()
   and jsp:setProperty()
  
   Here is a textbook example from Fields and Kolbs book. Hope it helps
   #JSP
  
   % page import = com.taglib.wdjsp.components.CompoundIntrestBean %
   jsp:useBean id=calculator class=CompoundInterestBean /
   jsp:setProperty name=calculator property=principal /
   /jsp:useBean
   jsp:getProperty name=calculator property=principal /
  
   Hope that helps,
   Scott
  
  
  
  
   -Original Message-
   From: Mike Alba [mailto:[EMAIL PROTECTED]]
   Sent: Friday, June 01, 2001 2:47 PM
   To: [EMAIL PROTECTED]
   Subject: Tomcat/JSP Question
  
  
   Hi,
  
 Forgive me for the beginner question but I am trying to
   instantiate a class for a JSP.
   I am using:
   jsp:useBean id = EX class = Example scope = session /
  
   Thus I am under the assumption that my Example class is being
   instantiated and the constructor is called, is this incorrect?
   Basically I am trying to instantiate a class for a session and
   was wondering if this is the way to do it.
   And so if it is can I access class objects, I am assuming
   I am supposed to use
 jsp:get_property
 jsp:set_property
  
   rather then EX.counter
   where counter is a property of the Example class
  
   Once again sorry for the newbie question
   and thanks for any help you can give!!
  
   Mike
  
 
 





RE: Tomcat/JSP Question

2001-06-01 Thread Skidmore, Walt
Title: RE: Tomcat/JSP Question





Try putting in get/set methods for the object, then getting them that way, e.g.:


--
public Object getMyObject()
{
 return myObject;
}


public void setMyObject(Object _o)
{
 myObject = _o;
}


% Object myObject = EX.getMyObject(); %
--


The get/set methods will allow introspection.


Or, if you want to just get it directly, you need to have a semicolon on the end, like this:


--
% Object myObject = EX.myObject; %
--


For regular code in the jsp, you need to enclose it in % % and follow regular syntax rules. If your bean had a String property, you could get it this way:

--
%=EX.myString%
--


The %= % is shorthand for % out.print( );%.


Kinda confusing at first, but you get used to it. Hope this helps...


-Original Message-
From: Mike Alba [mailto:[EMAIL PROTECTED]]
Sent: Friday, June 01, 2001 3:26 PM
To: [EMAIL PROTECTED]
Subject: Re: Tomcat/JSP Question



Oops it is supposed to be


% Object myObject = EX.myObject %
- Original Message -
From: Francisco Areas Guimaraes [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, June 01, 2001 3:22 PM
Subject: Re: Tomcat/JSP Question



 I could be wrong, but 'int' is a primitive type, I don´t know if it
extends
 Object, have you tried 'Integer my_object = EX.myObject' ?

 Francisco

 - Original Message -
 From: Mike Alba [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Friday, June 01, 2001 7:17 PM
 Subject: Re: Tomcat/JSP Question


  Actually I was wondering if you can do this
 
  Class Example
  {
 
  public Object myObject;
 
  public Example()
  {
  this.myObject = new myObject();
  } // end constructor
 
  }
 
  then acess it via my JSP
 
  jsp:useBean id = EX class = Example scope = session /
  % int my_object = EX.myObject %
 
  It says that this doesnt exist? Is there no way
  to do this?
 
  Thanks so much for your help!
 
  Mike
 
  - Original Message -
  From: Purcell, Scott [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Sent: Friday, June 01, 2001 12:47 PM
  Subject: RE: Tomcat/JSP Question
 
 
   I think you may have the syntax for
   jsp:get_property
   jsp:set_property
   wrong.
   It is jsp:getProperty()
   and jsp:setProperty()
  
   Here is a textbook example from Fields and Kolbs book. Hope it helps
   #JSP
  
   % page import = com.taglib.wdjsp.components.CompoundIntrestBean %
   jsp:useBean id=calculator class=CompoundInterestBean /
   jsp:setProperty name=calculator property=principal /
   /jsp:useBean
   jsp:getProperty name=calculator property=principal /
  
   Hope that helps,
   Scott
  
  
  
  
   -Original Message-
   From: Mike Alba [mailto:[EMAIL PROTECTED]]
   Sent: Friday, June 01, 2001 2:47 PM
   To: [EMAIL PROTECTED]
   Subject: Tomcat/JSP Question
  
  
   Hi,
  
   Forgive me for the beginner question but I am trying to
   instantiate a class for a JSP.
   I am using:
   jsp:useBean id = EX class = Example scope = session /
  
   Thus I am under the assumption that my Example class is being
   instantiated and the constructor is called, is this incorrect?
   Basically I am trying to instantiate a class for a session and
   was wondering if this is the way to do it.
   And so if it is can I access class objects, I am assuming
   I am supposed to use
   jsp:get_property
   jsp:set_property
  
   rather then EX.counter
   where counter is a property of the Example class
  
   Once again sorry for the newbie question
   and thanks for any help you can give!!
  
   Mike
  
 
 






Re: Simple Catalina/JSP question

2001-05-29 Thread Gary Gwin

Sachin,

Until they fix the bug, you don't need to reboot. Simply delete the compiled
classes in the tomcat/work/localhost directory.

Gary

sachin chaudhari wrote:
 
 I am using catalina 4.0 B5. But if I make changes to
 the JSP page it does recompile the page. Even after
 restarting the catalina. Only way to see the changes
 is to add a new JSP page  restart the server. What
 configs in server.xml I need to change?
 
 Thanks in advance for your help.
 
 =
 Sachin Chaudhari
 
 __
 Do You Yahoo!?
 Yahoo! Auctions - buy the things you want at great prices
 http://auctions.yahoo.com/

--



Simple Catalina/JSP question

2001-05-28 Thread sachin chaudhari

I am using catalina 4.0 B5. But if I make changes to
the JSP page it does recompile the page. Even after
restarting the catalina. Only way to see the changes
is to add a new JSP page  restart the server. What
configs in server.xml I need to change?

Thanks in advance for your help.

=
Sachin Chaudhari

__
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.yahoo.com/



Re: Simple Catalina/JSP question

2001-05-28 Thread Remy Maucherat

 I am using catalina 4.0 B5. But if I make changes to
 the JSP page it does recompile the page. Even after
 restarting the catalina. Only way to see the changes
 is to add a new JSP page  restart the server. What
 configs in server.xml I need to change?

 Thanks in advance for your help.

It's a Windows-only problem which will be fixed in the beta which will be
coming up for J1.

Remy




Re: Simple Catalina/JSP question

2001-05-28 Thread sachin chaudhari

Thanks a lot! You think I can get the latest build
from the same place from apache.org on July 1st.


--- Remy Maucherat [EMAIL PROTECTED] wrote:
  I am using catalina 4.0 B5. But if I make changes
 to
  the JSP page it does recompile the page. Even
 after
  restarting the catalina. Only way to see the
 changes
  is to add a new JSP page  restart the server.
 What
  configs in server.xml I need to change?
 
  Thanks in advance for your help.
 
 It's a Windows-only problem which will be fixed in
 the beta which will be
 coming up for J1.
 
 Remy
 


=
Sachin Chaudhari

__
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.yahoo.com/



mod_include/jsp question...

2001-01-10 Thread Nate Roe


I'm trying to use Apache to parse the bulk of a web page, pulling in a
small amount of JSP in the footer with SSI.  I'd like the page to be
SHTML, and the footer to be JSP.  But I'm having trouble... apparently,
mod_include doesn't treat included files exactly the way Apache does. 
(I am _not_ specifying IncludesNoExec).  

My question is: can you use SHTML to #include a JSP, such that Apache
handles the SHTML part and Tomcat handles the JSP part?

If so, where could I find some specific information for setting this up?

thanks,
nate roe

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]