You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@turbine.apache.org by Britta Ladwig-Attinger <BL...@t-online.de> on 2001/06/28 20:06:16 UTC
path to the intake.xml file
I am trying to use the Intake Service in TDK 2.1 b4
in TurbineResources I have:
tool.request.intake=org.apache.turbine.services.intake.IntakeTool
services.IntakeService.xml.path=WEB-INF/conf/intake.xml
I am able to access the IntakeTool in my java code but the
isAllValid()
method always returns true, even if rules from my intake.xml are not okay.
So I got the impression that turbine doesn't find my intake.xml file at all.
I made a test with deleting the intake.xml,
restarted my application and all stayed the same:
it obviously doesn't find the file.
Which is the correct way to tell the system where to look for the intake.xml
file?
Britt
Britta Ladwig-Attinger
bladwig@t-online.de
Tel. 0171-8220393 und 08142-597963
Fax 08142-597964
Re: path to the intake.xml file
Posted by Scott Eade <se...@backstagetech.com.au>.
> I have upgraded to 2.1 release and ny problem remains the same:
> in TurbineResources I have:
>
> tool.request.intake=org.apache.turbine.services.intake.IntakeTool
Have you uncommented the following line that appears before this?
services.IntakeService.classname=org.apache.turbine.services.intake.TurbineIntakeService
In all there should be three lines in TR.properties that refer to
intake - the two in your message and the one above.
> # Intake Service
> services.IntakeService.xml.path=WEB-INF/conf/intake.xml
That looks like the default, so turbine will look for intake.xml in the
location specified beneath the webapp/newapp directory.
>
> The intake.xml looks like:
>
> <input-data basePackage="com.mmi.site.">
> <group name="Order" key="order">
> <field name="Email" key="email" type="String">
> <rule name="minLength" value="1">Please enter an email address</rule>
> <rule name="mask" value=".+@.+\..+">Please enter a valid email
> address</rule>
> </field>
> </group>
> </input-data>
>
> (I have also tried it with rule: type=required only and with
> rule: type=required AND rule minLength="1")
I found it worthwhile to validate my intake.xml file with a validating
xml parser. This picked up a couple of problems I didn't spot
while validating the file manually.
Before I started using JavaService to wrapper Tomcat (on
Win2000) I used to see a line on the console mentioning that
Resolver (presumably an XML entity resolver) had accessed
intake.dtd - this is a good sign that the file is found and read
- do you see this?
>
> I am able to access the IntakeTool in my java code - also the group and its
> field, but the
> isAllValid()
> method always returns true, even if rules from my intake.xml are not okay.
>
> So I got the impression that turbine doesn't find my intake.xml file at all.
> I made a test with deleting the intake.xml,
> restarted my application and all stayed the same:
> it obviously doesn't find the file.
I seem to recall errors in turbine.log making it pretty obvious that
intake.xml could not be found. If you don't have these, I suggest
that you don't have intake properly configured.
> Which is the correct way to tell the system where to look for the intake.xml
> file?
You are telling it the location correctly (assuming the file is where you
are saying it is) - I think your problem is elsewhere.
> Britt
Keep at it. Intake is well worth the effort.
Scott
---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org
RE: NEW: path to the intake.xml file
Posted by Britta Ladwig-Attinger <BL...@t-online.de>.
Jon,
that's exactly what I did, I looked at the code on the Scarab webpage
and I can't see me doing anything different to them.
Also see mail from Diogo (06/29/01) who says he has the same problem.
May be here's is the root to my problem (???):
I am using the intake fields in a .vm file which includes the following:
<form method="post" action="$link.setPage("xx.vm").setAction("myAction")
in myAction.java I am trying to validate:
get the intake class from the context and
intake.isAllValid()
always returns true
my intake.xml looks like
<input-data basePackage="com.mmi.site.">
<group name="Order" key="order">
<field name="Email" key="email" type="String">
<rule name="minLength" value="1">Please enter an email address</rule>
<rule name="mask" value=".+@.+\..+">Please enter a valid email
address</rule>
</field>
</group>
</input-data>
I would deeply appreciate any help on that,
thanks,
Britta
Britta Ladwig-Attinger
bladwig@t-online.de
Tel. 0171-8220393 und 08142-597963
Fax 08142-597964
-----Original Message-----
From: Jon Stevens [mailto:jon@latchkey.com]
Sent: Freitag, 29. Juni 2001 18:30
To: Turbine-user
Subject: Re: NEW: path to the intake.xml file
on 6/29/01 1:38 AM, "Britta Ladwig-Attinger" <BL...@t-online.de> wrote:
> Which is the correct way to tell the system where to look for the
intake.xml
> file?
>
> Britt
<http://scarab.tigris.org/source/browse/scarab/src/conf/TurbineResources.pro
perties?rev=1.31&content-type=text/x-cvsweb-markup>
As always, look at Scarab for your examples of the latest/greatest stuff...
-jon
--
If you come from a Perl or PHP background, JSP is a way to take
your pain to new levels. --Anonymous
<http://jakarta.apache.org/velocity/ymtd/ymtd.html>
---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org
Re: NEW: path to the intake.xml file
Posted by Jon Stevens <jo...@latchkey.com>.
on 6/29/01 1:38 AM, "Britta Ladwig-Attinger" <BL...@t-online.de> wrote:
> Which is the correct way to tell the system where to look for the intake.xml
> file?
>
> Britt
<http://scarab.tigris.org/source/browse/scarab/src/conf/TurbineResources.pro
perties?rev=1.31&content-type=text/x-cvsweb-markup>
As always, look at Scarab for your examples of the latest/greatest stuff...
-jon
--
If you come from a Perl or PHP background, JSP is a way to take
your pain to new levels. --Anonymous
<http://jakarta.apache.org/velocity/ymtd/ymtd.html>
---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org
NEW: path to the intake.xml file
Posted by Britta Ladwig-Attinger <BL...@t-online.de>.
>>> I am trying to use the Intake Service in TDK 2.1 b4
>Sorry, we don't support questions against any of the past beta's. You need
>to upgrade to the released version: 2.1
>-jon
Makes sense!
I have upgraded to 2.1 release and ny problem remains the same:
in TurbineResources I have:
tool.request.intake=org.apache.turbine.services.intake.IntakeTool
# Intake Service
services.IntakeService.xml.path=WEB-INF/conf/intake.xml
The intake.xml looks like:
<input-data basePackage="com.mmi.site.">
<group name="Order" key="order">
<field name="Email" key="email" type="String">
<rule name="minLength" value="1">Please enter an email address</rule>
<rule name="mask" value=".+@.+\..+">Please enter a valid email
address</rule>
</field>
</group>
</input-data>
(I have also tried it with rule: type=required only and with
rule: type=required AND rule minLength="1")
I am able to access the IntakeTool in my java code - also the group and its
field, but the
isAllValid()
method always returns true, even if rules from my intake.xml are not okay.
So I got the impression that turbine doesn't find my intake.xml file at all.
I made a test with deleting the intake.xml,
restarted my application and all stayed the same:
it obviously doesn't find the file.
Which is the correct way to tell the system where to look for the intake.xml
file?
Britt
---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org
Re: path to the intake.xml file
Posted by Jon Stevens <jo...@latchkey.com>.
on 6/28/01 11:06 AM, "Britta Ladwig-Attinger" <BL...@t-online.de> wrote:
> I am trying to use the Intake Service in TDK 2.1 b4
Sorry, we don't support questions against any of the past beta's. You need
to upgrade to the released version: 2.1
Thanks,
-jon
--
If you come from a Perl or PHP background, JSP is a way to take
your pain to new levels. --Anonymous
<http://jakarta.apache.org/velocity/ymtd/ymtd.html>
---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org