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/02/01 01:39:14 UTC

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>


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>