You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@turbine.apache.org by Nathaniel Reed <na...@seastar.jpl.nasa.gov> on 2002/01/31 23:29:34 UTC

Ever seen this? - screen executed twice!

I use
<a href="$link.setPage("MyScreen.vm").addPathInfo("myParam",
$myParamValue)">...</a>

And this executes my screen (MyScreen), but according to the log output
the screen gets executed a SECOND time without the parameters.. It fails
(exception) this second time, and the screen gets output without the
needed data.

Any ideas?  Isn't this just bread-and-butter stuff?!  I'm not doing
anything unusual here.

--
Nate Reed
Physical Oceanography Distributed Active Archive Center
Jet Propulsion Laboratory (Raytheon)
nate@seanet.jpl.nasa.gov
(626) 744-5528
(626) 744-5506



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Ever seen this? - screen executed twice!

Posted by Peter Lynch <pe...@mindspring.com>.
Nate,

Lets see some of your log...and the velocity output of the href.

-Peter

----- Original Message -----
From: "Nathaniel Reed" <na...@seastar.jpl.nasa.gov>
To: "Turbine Users List" <tu...@jakarta.apache.org>
Sent: Thursday, January 31, 2002 7:10 PM
Subject: Re: Ever seen this? - screen executed twice!


<snip />
> > Nathaniel Reed wrote:
> > >
> > > I use
> > > <a href="$link.setPage("MyScreen.vm").addPathInfo("myParam",
> > > $myParamValue)">...</a>
> > >
> > > And this executes my screen (MyScreen), but according to the log
output
> > > the screen gets executed a SECOND time without the parameters.. It
fails
> > > (exception) this second time, and the screen gets output without the
> > > needed data.
<snip/>




--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Ever seen this? - screen executed twice!

Posted by Nathaniel Reed <na...@seastar.jpl.nasa.gov>.
The version is 2.1... No, there is no Javascript.  Just an <A HREF> link on an HTML
page.

I haven't had any problems with actions.  I was surprised this error, since the
example ("Rdf") worked OK, and my code is based on the example, in which there is a
link provided from "Index.vm" to "Form.vm," and the "rdfid" is extracted from the
http request.

Nate

John McNally wrote:

> which version?  This is something that crept into Turbine-3 at the
> beginning.  Jason said it mimic'ed turbine-2.x behavior, but it was not
> happening when i last used the turbine-2 tree.  It should not be
> happening now in turbine-3.
>
> Thought the part about parameters being missing the second time makes me
> think you are having a different problem, in the case I knew about the
> parameters would not change between the two invocations.  Do you have an
> action that is being executed twice as well?  This can result from
> javascript form submissions.
>
> john mcnally
>
> Nathaniel Reed wrote:
> >
> > I use
> > <a href="$link.setPage("MyScreen.vm").addPathInfo("myParam",
> > $myParamValue)">...</a>
> >
> > And this executes my screen (MyScreen), but according to the log output
> > the screen gets executed a SECOND time without the parameters.. It fails
> > (exception) this second time, and the screen gets output without the
> > needed data.
> >
> > Any ideas?  Isn't this just bread-and-butter stuff?!  I'm not doing
> > anything unusual here.
> >
> > --
> > Nate Reed
> > Physical Oceanography Distributed Active Archive Center
> > Jet Propulsion Laboratory (Raytheon)
> > nate@seanet.jpl.nasa.gov
> > (626) 744-5528
> > (626) 744-5506
> >
> > --
> > To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> > For additional commands, e-mail: <ma...@jakarta.apache.org>
>
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>

--
Nate Reed
Physical Oceanography Distributed Active Archive Center
Jet Propulsion Laboratory (Raytheon)
nate@seanet.jpl.nasa.gov
(626) 744-5528
(626) 744-5506



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Ever seen this? - screen executed twice!

Posted by John McNally <jm...@collab.net>.
which version?  This is something that crept into Turbine-3 at the
beginning.  Jason said it mimic'ed turbine-2.x behavior, but it was not
happening when i last used the turbine-2 tree.  It should not be
happening now in turbine-3.

Thought the part about parameters being missing the second time makes me
think you are having a different problem, in the case I knew about the
parameters would not change between the two invocations.  Do you have an
action that is being executed twice as well?  This can result from
javascript form submissions.

john mcnally

Nathaniel Reed wrote:
> 
> I use
> <a href="$link.setPage("MyScreen.vm").addPathInfo("myParam",
> $myParamValue)">...</a>
> 
> And this executes my screen (MyScreen), but according to the log output
> the screen gets executed a SECOND time without the parameters.. It fails
> (exception) this second time, and the screen gets output without the
> needed data.
> 
> Any ideas?  Isn't this just bread-and-butter stuff?!  I'm not doing
> anything unusual here.
> 
> --
> Nate Reed
> Physical Oceanography Distributed Active Archive Center
> Jet Propulsion Laboratory (Raytheon)
> nate@seanet.jpl.nasa.gov
> (626) 744-5528
> (626) 744-5506
> 
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: TurbineConfig constructor that doesn't use path

Posted by Daniel Rall <dl...@finemaltcoding.com>.
Daniel Rall <dl...@finemaltcoding.com> writes:

> You actually want ClassLoader::getResourceAsStream(String), which
> takes a patch relative to your classpaths.

Freudian slip, s/patch/path/.

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: TurbineConfig constructor that doesn't use path

Posted by Daniel Rall <dl...@finemaltcoding.com>.
Geoff Fortytwo <g4...@snowball.com> writes:

> It would be better if TurbineConfig had an additional constructor
> which allows the user to specify a class location. TurbineConfig would
> then use the java.util.ResourceBundle.getBundle function to load the
> properties file.

You actually want ClassLoader::getResourceAsStream(String), which
takes a patch relative to your classpaths.

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


TurbineConfig constructor that doesn't use path

Posted by Geoff Fortytwo <g4...@snowball.com>.
The TurbineConfig class requires a path to the TurbineResources.properties. 
This means that it's impossible to store the TurbineResources.properties 
file inside a jar file. It also means that I'm forced to use the same path 
on different machines or specify the path in some external way.

It would be better if TurbineConfig had an additional constructor which 
allows the user to specify a class location. TurbineConfig would then use 
the java.util.ResourceBundle.getBundle function to load the properties file.


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Any suggestions? (was Re: Ever seen this? - screen executed twice!)

Posted by Scott Eade <se...@backstagetech.com.au>.
Nathaniel,

I seem to recall this being discussed within the last
couple of weeks.  I think there was mention of JavaScript
somehow being involved in the problem.  Do go back
carefully through the mail archive for the last couple
of weeks - the answer may well be there.

I haven't experienced the problem myself so I cannot
offer any direct help.

HTH,

Scott

----- Original Message -----
From: "Nathaniel Reed" <na...@seastar.jpl.nasa.gov>
To: "Turbine Users List" <tu...@jakarta.apache.org>
Sent: Friday, February 01, 2002 11:39 AM
Subject: Any suggestions? (was Re: Ever seen this? - screen executed twice!)


> Unfortunately, I'm completely stalled by this weird template behavior and
am
> running out of time on my project.  If I cannot come up with some kind of
fix I
> will have to scrap Turbine and try to reuse some of my work with Velocity
and
> Torque unbundled from Turbine.  I was hoping someone has seen this error
before
> and can save me some extra work and delays.  It looks like this has been
reported
> before in the mailing list archives, but apparently there is no official
"fix" for
> this.
>
> I tried some variations on my test case.  For instance, if the screen
throws an
> exception due to invalid data, then for some reason the 2nd time the
template
> (MyForm.vm) is rendered a different Screen is used (MyHome.java, the
opening
> screen) according to the Log output, but the template(MyForm.vm) gets
displayed
> with no data.   I still cannot imagine why in the world why
doBuildTemplate() is
> getting invoked a 2nd time!  Some kind of redirect is happening, perhaps,
and the
> parameters omitted from the URL, but what is causing this?
>
> Nathaniel Reed wrote:
>
> > I use
> > <a href="$link.setPage("MyScreen.vm").addPathInfo("myParam",
> > $myParamValue)">...</a>
> >
> > And this executes my screen (MyScreen), but according to the log output
> > the screen gets executed a SECOND time without the parameters.. It fails
> > (exception) this second time, and the screen gets output without the
> > needed data.
> >
> > Any ideas?  Isn't this just bread-and-butter stuff?!  I'm not doing
> > anything unusual here.
> >
> > --
> > Nate Reed
> > Physical Oceanography Distributed Active Archive Center
> > Jet Propulsion Laboratory (Raytheon)
> > nate@seanet.jpl.nasa.gov
> > (626) 744-5528
> > (626) 744-5506
> >
> > --
> > To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> > For additional commands, e-mail:
<ma...@jakarta.apache.org>
>
> --
> Nate Reed
> Physical Oceanography Distributed Active Archive Center
> Jet Propulsion Laboratory (Raytheon)
> nate@seanet.jpl.nasa.gov
> (626) 744-5528
> (626) 744-5506
>
>
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Any suggestions? (was Re: Ever seen this? - screen executed twice!)

Posted by Nathaniel Reed <na...@seastar.jpl.nasa.gov>.
Unfortunately, I'm completely stalled by this weird template behavior and am
running out of time on my project.  If I cannot come up with some kind of fix I
will have to scrap Turbine and try to reuse some of my work with Velocity and
Torque unbundled from Turbine.  I was hoping someone has seen this error before
and can save me some extra work and delays.  It looks like this has been reported
before in the mailing list archives, but apparently there is no official "fix" for
this.

I tried some variations on my test case.  For instance, if the screen throws an
exception due to invalid data, then for some reason the 2nd time the template
(MyForm.vm) is rendered a different Screen is used (MyHome.java, the opening
screen) according to the Log output, but the template(MyForm.vm) gets displayed
with no data.   I still cannot imagine why in the world why doBuildTemplate() is
getting invoked a 2nd time!  Some kind of redirect is happening, perhaps, and the
parameters omitted from the URL, but what is causing this?

Nathaniel Reed wrote:

> I use
> <a href="$link.setPage("MyScreen.vm").addPathInfo("myParam",
> $myParamValue)">...</a>
>
> And this executes my screen (MyScreen), but according to the log output
> the screen gets executed a SECOND time without the parameters.. It fails
> (exception) this second time, and the screen gets output without the
> needed data.
>
> Any ideas?  Isn't this just bread-and-butter stuff?!  I'm not doing
> anything unusual here.
>
> --
> Nate Reed
> Physical Oceanography Distributed Active Archive Center
> Jet Propulsion Laboratory (Raytheon)
> nate@seanet.jpl.nasa.gov
> (626) 744-5528
> (626) 744-5506
>
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>

--
Nate Reed
Physical Oceanography Distributed Active Archive Center
Jet Propulsion Laboratory (Raytheon)
nate@seanet.jpl.nasa.gov
(626) 744-5528
(626) 744-5506



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>