You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by John Coonrod <jc...@thp.org> on 2000/04/06 20:13:10 UTC

RE: JSP question on submitting

You can use the <jsp:forward... command to go on to any other url

===== Original Message from tomcat-user@jakarta.apache.org at 4/06/00 2:13 
pm
>How can I get a JSP page to automatically submit itself to a cgi page?  I have written a .jsp 
page that receives the data from form, then interacts with a bean to save 
that data to a database.  After this page has processed the db updates, I 
want to to automatically submit itself
>to another page, without the user having to hit a submit button.  Does anyone know how to 
auto-submit after all jsp instructions have been processed?
>
>Thanks,
>
>Jeff


Re: JSP question on submitting

Posted by Jeff Neuenschwander <je...@collegeguy.com>.
Well, I suppose it could be a servlet.  But then I have the problem of how
to POST data to the next from from the servlet, which is basically the
problem I have now.  If I could use GET I'd just have the JSP (or servlet)
generate the key pairs manually instead of using input fields...

There has to be an easy way to do this, basically all I want it to do it
when it gets to the end of the page, just hit the submit button by itself...

Ok, I just looked up the jsp:forward tag on the JSP specification from
Sun... It didn't answer the question, but nearby, I found this:


<jsp:param>
The jsp:param element is used to provide key/value information. This element
is used in
the jsp:include, jsp:forward and jsp:plugin elements.
When doing jsp:include or jsp:forward, the included page or forwarded page
will
see the original request object, with the original parameters augmented with
the new
parameters, with new values taking precedence over existing values when
applicable. The
scope of the new parameters is the jsp:include or jsp:forward call; i.e. in
the case of an
jsp:include the new parameters (and values) will not apply after the
include. This is the
same behavior as in the ServletRequest include and forward methods (see
Section
8.1.1 in the Servlet 2.2 specification).
For example, if the request has a parameter A=foo and a parameter A=bar is
specified for
forward, the forwarded request shall have A=bar,foo. Note that the new param
has
precedence.

So I guess the forward tag does include parameter from the original page as
well...

Whatever works, thanks for the help!

Jeff

----- Original Message -----
From: "Bond - James D." <ja...@telesoft.com>
To: <to...@jakarta.apache.org>
Sent: Thursday, April 06, 2000 6:49 PM
Subject: Re: JSP question on submitting


> > That is a good idea.  The only problem is that I have one situation
where it
> > always would auto-refresh, but then another where it calls up different
ones
> > depending on parameters.    The <jsp:forward...directive might work, but
I
> > was thinking that the forward directive works more like automatically
> > clicking on a link, which I thought was different than actually
submitting a
> > form.  I need the input fields on my form to be submitted to the new
form,
> > which I think your method of the javascript would work, except I don't
know
> > which form to call until after the bulk of the page is processed.
>
> Well I think the forward forwards the request and IS more like a link.
>
> I was just playing around and I guess I'm wrong, you can't use javascript
> on your link for the auto-redirect like you can on normal links :(
>
> Not sure what to do ....... why does it have to be on a JSP in the middle
> though?  Why doesn't your first page send everything to a Servlet, have
> that servlet do all the work, then have the servlet forward the request to
> the page you want?
>
> > If the second page was mine, it'd be much easier, but it's a 3rd party
> > vendor.  I'm getting some info from a form, submitting it to another
form
> > for database storage, then the page that writes to the database sends
the
> > data to a 3rd party cgi... I just don't want my users to have to click a
> > "Click here to continue" button for no reason on the jsp page that write
to
> > the database...
> >
> > Any other ideas?
> >
> > Thanks,
> >
> > Jeff
> >
> >
> > ----- Original Message -----
> > From: "Bond - James D." <ja...@telesoft.com>
> > To: <to...@jakarta.apache.org>
> > Sent: Thursday, April 06, 2000 4:06 PM
> > Subject: Re: JSP question on submitting
> >
> >
> > >
> > > > If I have my first jsp page have some new hidden input fields (such
as
> > > > values that the jsp page pulled from a db), are those fields posted
to
> > the
> > > > page that it forwards to, just like if I had put a submit button on
the
> > form
> > > > and pushed it?
> > > >
> > > > I do have a form method that specifies POST and the URL, but how
does it
> > > > work when I use forward?  I know I have to put the URL again in the
> > > > jsp:forward statement, but will the page it forwards to get those
input
> > > > fields posted to it?
> > > >
> > > > Thanks,
> > > >
> > > > Jeff
> > >
> > > well here's something I've never tried ......... try putting the
> > > auto-redirect HTML meta tag in your header and have it call the
> > > javascript method to submit the form .......... I don't see why that
> > > wouldn't work (but it'd have it wait a few seconds, not instantly
> > > redirect so that you're sure all your form elements are filled).
> > >
> > > > ----- Original Message -----
> > > > From: "John Coonrod" <jc...@thp.org>
> > > > To: <to...@jakarta.apache.org>
> > > > Sent: Thursday, April 06, 2000 1:13 PM
> > > > Subject: RE: JSP question on submitting
> > > >
> > > >
> > > > > You can use the <jsp:forward... command to go on to any other url
> > > > >
> > > > > ===== Original Message from tomcat-user@jakarta.apache.org at
4/06/00
> > 2:13
> > > > > pm
> > > > > >How can I get a JSP page to automatically submit itself to a cgi
> > page?  I
> > > > have written a .jsp
> > > > > page that receives the data from form, then interacts with a bean
to
> > save
> > > > > that data to a database.  After this page has processed the db
> > updates, I
> > > > > want to to automatically submit itself
> > > > > >to another page, without the user having to hit a submit button.
> > Does
> > > > anyone know how to
> > > > > auto-submit after all jsp instructions have been processed?
> > > > > >
> > > > > >Thanks,
> > > > > >
> > > > > >Jeff
> > > > >
> > > > >
> > > >
> >
> --------------------------------------------------------------------------
> > > > > To unsubscribe, email: tomcat-user-unsubscribe@jakarta.apache.org
> > > > > For additional commmands, email:
tomcat-user-help@jakarta.apache.org
> > > > >
> > > > >
> > > >
> > > >
> > >
> >
> --------------------------------------------------------------------------
> > > > To unsubscribe, email: tomcat-user-unsubscribe@jakarta.apache.org
> > > > For additional commmands, email: tomcat-user-help@jakarta.apache.org
> > > >
> > >
> > >
> > > James Dalrymple
> > > Telesoft Corp.
> > >
> > >
> >
> --------------------------------------------------------------------------
> > > To unsubscribe, email: tomcat-user-unsubscribe@jakarta.apache.org
> > > For additional commmands, email: tomcat-user-help@jakarta.apache.org
> > >
> > >
> >
> >
>
> --------------------------------------------------------------------------
> > To unsubscribe, email: tomcat-user-unsubscribe@jakarta.apache.org
> > For additional commmands, email: tomcat-user-help@jakarta.apache.org
> >
>
>
> James Dalrymple
> Telesoft Corp.
>
>
> --------------------------------------------------------------------------
> To unsubscribe, email: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commmands, email: tomcat-user-help@jakarta.apache.org
>
>


Question about Apache connecting to Tomcat !

Posted by David Qian <Da...@accrue.com>.
Hello, everyone:

I am trying to compile Apache 1.3.12 on on sun machine.

The machine is as follows:
SunOS bird 5.7 Generic_106541-08 sun4u sparc SUNW,Ultra-250

I used the following command to compile apache to support Dynamic Shared
Object:

./configure --prefix=/path/to/apache --enable-rule=SHARED_CORE
make install

Then When I used the following commands to compile the mod_jserv.c,

apxs -c .* -o mod_jserv.so

I got the following error meesgges:

apxs:Error: Sorry, no DSO support for Apache available
apxs:Error: under your platform. Make sure the Apache
apxs:Error: module mod_so is compiled into your server
apxs:Error: binary `/export/bird/bkt0/etel/apache/bin/httpd'.

I am struggling this for a couple of days now.

Any instruction or guideline will be greatly appreciately !

Thanks !

David


Re: JSP question on submitting

Posted by "Bond - James D." <ja...@telesoft.com>.
> That is a good idea.  The only problem is that I have one situation where it
> always would auto-refresh, but then another where it calls up different ones
> depending on parameters.    The <jsp:forward...directive might work, but I
> was thinking that the forward directive works more like automatically
> clicking on a link, which I thought was different than actually submitting a
> form.  I need the input fields on my form to be submitted to the new form,
> which I think your method of the javascript would work, except I don't know
> which form to call until after the bulk of the page is processed.

Well I think the forward forwards the request and IS more like a link.

I was just playing around and I guess I'm wrong, you can't use javascript
on your link for the auto-redirect like you can on normal links :(

Not sure what to do ....... why does it have to be on a JSP in the middle
though?  Why doesn't your first page send everything to a Servlet, have
that servlet do all the work, then have the servlet forward the request to
the page you want?

> If the second page was mine, it'd be much easier, but it's a 3rd party
> vendor.  I'm getting some info from a form, submitting it to another form
> for database storage, then the page that writes to the database sends the
> data to a 3rd party cgi... I just don't want my users to have to click a
> "Click here to continue" button for no reason on the jsp page that write to
> the database...
> 
> Any other ideas?
> 
> Thanks,
> 
> Jeff
> 
> 
> ----- Original Message -----
> From: "Bond - James D." <ja...@telesoft.com>
> To: <to...@jakarta.apache.org>
> Sent: Thursday, April 06, 2000 4:06 PM
> Subject: Re: JSP question on submitting
> 
> 
> >
> > > If I have my first jsp page have some new hidden input fields (such as
> > > values that the jsp page pulled from a db), are those fields posted to
> the
> > > page that it forwards to, just like if I had put a submit button on the
> form
> > > and pushed it?
> > >
> > > I do have a form method that specifies POST and the URL, but how does it
> > > work when I use forward?  I know I have to put the URL again in the
> > > jsp:forward statement, but will the page it forwards to get those input
> > > fields posted to it?
> > >
> > > Thanks,
> > >
> > > Jeff
> >
> > well here's something I've never tried ......... try putting the
> > auto-redirect HTML meta tag in your header and have it call the
> > javascript method to submit the form .......... I don't see why that
> > wouldn't work (but it'd have it wait a few seconds, not instantly
> > redirect so that you're sure all your form elements are filled).
> >
> > > ----- Original Message -----
> > > From: "John Coonrod" <jc...@thp.org>
> > > To: <to...@jakarta.apache.org>
> > > Sent: Thursday, April 06, 2000 1:13 PM
> > > Subject: RE: JSP question on submitting
> > >
> > >
> > > > You can use the <jsp:forward... command to go on to any other url
> > > >
> > > > ===== Original Message from tomcat-user@jakarta.apache.org at 4/06/00
> 2:13
> > > > pm
> > > > >How can I get a JSP page to automatically submit itself to a cgi
> page?  I
> > > have written a .jsp
> > > > page that receives the data from form, then interacts with a bean to
> save
> > > > that data to a database.  After this page has processed the db
> updates, I
> > > > want to to automatically submit itself
> > > > >to another page, without the user having to hit a submit button.
> Does
> > > anyone know how to
> > > > auto-submit after all jsp instructions have been processed?
> > > > >
> > > > >Thanks,
> > > > >
> > > > >Jeff
> > > >
> > > >
> > >
> > --------------------------------------------------------------------------
> > > > To unsubscribe, email: tomcat-user-unsubscribe@jakarta.apache.org
> > > > For additional commmands, email: tomcat-user-help@jakarta.apache.org
> > > >
> > > >
> > >
> > >
> >
> > --------------------------------------------------------------------------
> > > To unsubscribe, email: tomcat-user-unsubscribe@jakarta.apache.org
> > > For additional commmands, email: tomcat-user-help@jakarta.apache.org
> > >
> >
> >
> > James Dalrymple
> > Telesoft Corp.
> >
> >
> > --------------------------------------------------------------------------
> > To unsubscribe, email: tomcat-user-unsubscribe@jakarta.apache.org
> > For additional commmands, email: tomcat-user-help@jakarta.apache.org
> >
> >
> 
> 
> --------------------------------------------------------------------------
> To unsubscribe, email: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commmands, email: tomcat-user-help@jakarta.apache.org
> 


James Dalrymple
Telesoft Corp.


Re: JSP question on submitting

Posted by Jeff Neuenschwander <je...@collegeguy.com>.
That is a good idea.  The only problem is that I have one situation where it
always would auto-refresh, but then another where it calls up different ones
depending on parameters.    The <jsp:forward...directive might work, but I
was thinking that the forward directive works more like automatically
clicking on a link, which I thought was different than actually submitting a
form.  I need the input fields on my form to be submitted to the new form,
which I think your method of the javascript would work, except I don't know
which form to call until after the bulk of the page is processed.

If the second page was mine, it'd be much easier, but it's a 3rd party
vendor.  I'm getting some info from a form, submitting it to another form
for database storage, then the page that writes to the database sends the
data to a 3rd party cgi... I just don't want my users to have to click a
"Click here to continue" button for no reason on the jsp page that write to
the database...

Any other ideas?

Thanks,

Jeff


----- Original Message -----
From: "Bond - James D." <ja...@telesoft.com>
To: <to...@jakarta.apache.org>
Sent: Thursday, April 06, 2000 4:06 PM
Subject: Re: JSP question on submitting


>
> > If I have my first jsp page have some new hidden input fields (such as
> > values that the jsp page pulled from a db), are those fields posted to
the
> > page that it forwards to, just like if I had put a submit button on the
form
> > and pushed it?
> >
> > I do have a form method that specifies POST and the URL, but how does it
> > work when I use forward?  I know I have to put the URL again in the
> > jsp:forward statement, but will the page it forwards to get those input
> > fields posted to it?
> >
> > Thanks,
> >
> > Jeff
>
> well here's something I've never tried ......... try putting the
> auto-redirect HTML meta tag in your header and have it call the
> javascript method to submit the form .......... I don't see why that
> wouldn't work (but it'd have it wait a few seconds, not instantly
> redirect so that you're sure all your form elements are filled).
>
> > ----- Original Message -----
> > From: "John Coonrod" <jc...@thp.org>
> > To: <to...@jakarta.apache.org>
> > Sent: Thursday, April 06, 2000 1:13 PM
> > Subject: RE: JSP question on submitting
> >
> >
> > > You can use the <jsp:forward... command to go on to any other url
> > >
> > > ===== Original Message from tomcat-user@jakarta.apache.org at 4/06/00
2:13
> > > pm
> > > >How can I get a JSP page to automatically submit itself to a cgi
page?  I
> > have written a .jsp
> > > page that receives the data from form, then interacts with a bean to
save
> > > that data to a database.  After this page has processed the db
updates, I
> > > want to to automatically submit itself
> > > >to another page, without the user having to hit a submit button.
Does
> > anyone know how to
> > > auto-submit after all jsp instructions have been processed?
> > > >
> > > >Thanks,
> > > >
> > > >Jeff
> > >
> > >
> >
> --------------------------------------------------------------------------
> > > To unsubscribe, email: tomcat-user-unsubscribe@jakarta.apache.org
> > > For additional commmands, email: tomcat-user-help@jakarta.apache.org
> > >
> > >
> >
> >
>
> --------------------------------------------------------------------------
> > To unsubscribe, email: tomcat-user-unsubscribe@jakarta.apache.org
> > For additional commmands, email: tomcat-user-help@jakarta.apache.org
> >
>
>
> James Dalrymple
> Telesoft Corp.
>
>
> --------------------------------------------------------------------------
> To unsubscribe, email: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commmands, email: tomcat-user-help@jakarta.apache.org
>
>


Re: JSP question on submitting

Posted by "Bond - James D." <ja...@telesoft.com>.
> If I have my first jsp page have some new hidden input fields (such as
> values that the jsp page pulled from a db), are those fields posted to the
> page that it forwards to, just like if I had put a submit button on the form
> and pushed it?
> 
> I do have a form method that specifies POST and the URL, but how does it
> work when I use forward?  I know I have to put the URL again in the
> jsp:forward statement, but will the page it forwards to get those input
> fields posted to it?
> 
> Thanks,
> 
> Jeff

well here's something I've never tried ......... try putting the
auto-redirect HTML meta tag in your header and have it call the
javascript method to submit the form .......... I don't see why that
wouldn't work (but it'd have it wait a few seconds, not instantly
redirect so that you're sure all your form elements are filled).

> ----- Original Message -----
> From: "John Coonrod" <jc...@thp.org>
> To: <to...@jakarta.apache.org>
> Sent: Thursday, April 06, 2000 1:13 PM
> Subject: RE: JSP question on submitting
> 
> 
> > You can use the <jsp:forward... command to go on to any other url
> >
> > ===== Original Message from tomcat-user@jakarta.apache.org at 4/06/00 2:13
> > pm
> > >How can I get a JSP page to automatically submit itself to a cgi page?  I
> have written a .jsp
> > page that receives the data from form, then interacts with a bean to save
> > that data to a database.  After this page has processed the db updates, I
> > want to to automatically submit itself
> > >to another page, without the user having to hit a submit button.  Does
> anyone know how to
> > auto-submit after all jsp instructions have been processed?
> > >
> > >Thanks,
> > >
> > >Jeff
> >
> >
> > --------------------------------------------------------------------------
> > To unsubscribe, email: tomcat-user-unsubscribe@jakarta.apache.org
> > For additional commmands, email: tomcat-user-help@jakarta.apache.org
> >
> >
> 
> 
> --------------------------------------------------------------------------
> To unsubscribe, email: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commmands, email: tomcat-user-help@jakarta.apache.org
> 


James Dalrymple
Telesoft Corp.


Re: JSP question on submitting

Posted by Jeff Neuenschwander <je...@collegeguy.com>.
If I have my first jsp page have some new hidden input fields (such as
values that the jsp page pulled from a db), are those fields posted to the
page that it forwards to, just like if I had put a submit button on the form
and pushed it?

I do have a form method that specifies POST and the URL, but how does it
work when I use forward?  I know I have to put the URL again in the
jsp:forward statement, but will the page it forwards to get those input
fields posted to it?

Thanks,

Jeff
----- Original Message -----
From: "John Coonrod" <jc...@thp.org>
To: <to...@jakarta.apache.org>
Sent: Thursday, April 06, 2000 1:13 PM
Subject: RE: JSP question on submitting


> You can use the <jsp:forward... command to go on to any other url
>
> ===== Original Message from tomcat-user@jakarta.apache.org at 4/06/00 2:13
> pm
> >How can I get a JSP page to automatically submit itself to a cgi page?  I
have written a .jsp
> page that receives the data from form, then interacts with a bean to save
> that data to a database.  After this page has processed the db updates, I
> want to to automatically submit itself
> >to another page, without the user having to hit a submit button.  Does
anyone know how to
> auto-submit after all jsp instructions have been processed?
> >
> >Thanks,
> >
> >Jeff
>
>
> --------------------------------------------------------------------------
> To unsubscribe, email: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commmands, email: tomcat-user-help@jakarta.apache.org
>
>


Re: JSP question on submitting

Posted by Jeff Neuenschwander <je...@collegeguy.com>.
Thanks.

Jeff
----- Original Message -----
From: "John Coonrod" <jc...@thp.org>
To: <to...@jakarta.apache.org>
Sent: Thursday, April 06, 2000 1:13 PM
Subject: RE: JSP question on submitting


> You can use the <jsp:forward... command to go on to any other url
>
> ===== Original Message from tomcat-user@jakarta.apache.org at 4/06/00 2:13
> pm
> >How can I get a JSP page to automatically submit itself to a cgi page?  I
have written a .jsp
> page that receives the data from form, then interacts with a bean to save
> that data to a database.  After this page has processed the db updates, I
> want to to automatically submit itself
> >to another page, without the user having to hit a submit button.  Does
anyone know how to
> auto-submit after all jsp instructions have been processed?
> >
> >Thanks,
> >
> >Jeff
>
>
> --------------------------------------------------------------------------
> To unsubscribe, email: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commmands, email: tomcat-user-help@jakarta.apache.org
>
>