Jonathan Goode

Greenhorn
+ Follow
since Dec 01, 2005
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Jonathan Goode

Hi, I already have an Ant build file which works fine but I also need to set file permissions via ftp but I'm struggling to work out the syntax.

I need to change just directories, from the base directory down, to 755. I already have code for changing just files to 644.



Thanks.
16 years ago
Thanks ever so much for your help William and Ben! What a fool I am! Everything is working now including my ant build script which compiles/wars/deploys to tomcat. I also had further problems with Eclipse running Tomcat and then accessing the manager but sorted it all out with a little tweaking here and there. Cheers.
[ March 19, 2007: Message edited by: Jonathan Goode ]
17 years ago
Still no joy. I've tried starting from fresh and downloading Apache Tomcat 5.5.15 again then changing tomcat-users.xml to have a user with a manager role then going to http://localhost:8080/manager but I still keep getting a 404 error. When I started from fresh and added a new user with a manager role then started Tomcat, when I went back to add the line you said Tomcat had already done it for me - no difference. (By default there is manager.xml already in C:\Program Files\Java\apache-tomcat-5.5.15\conf\Catalina\localhost.) I also took Eclipse out of the equation too has previously I used it to start/stop Tomcat but nothing. I don't understand why http://localhost:8080/servlets-examples/ works but manager doesn't! I've run setclasspath.bat and added "pause" to it to see it going through each method checking that it sets everything Ok and hits no errors and it does but kinda new that it was fine seen as though http://localhost:8080/servlets-examples/ works. I can't see in the documentation that there is anything to set to get manager to work? Many thanks for your help but this is outrageous!
[ March 18, 2007: Message edited by: Jonathan Goode ]
17 years ago
Thanks for the reply. My manager.xml is identical to yours and yes under the location for docBase I have:

images
WEB-INF
html-manager-howto.html
manager-howto.html
manager.xml
status.xsd
xform.xsl

Yep I restarted Tomcat and in the past it has been restarted many times. By the way I'm using Eclipse 3.2 + Tomcat 5.5.15 + Ant 1.6.5 on Windows XP. Just incase (for manager.xml) where is ${catalina.home} set? Here is what my tomcat-users.xml looks like:



Does anything else need to be set? I guess accessing the Tomcat manager works fine for you with these things set? Thanks.
[ March 17, 2007: Message edited by: Jonathan Goode ]
17 years ago
hi, basically i cannot access my tomcat manager thus my ant build.xml script is failing when it comes to install/remove a .war archive of my servlet with my tomcat manager. i can access my servlet visiting the URI http://localhost:8080/default/servlet but when i visit http://localhost:8080/manager/ it says "The requested resource (/manager) is not available". I have added a user to tomcat-users.xml with a manager role and manager.xml is in "apache-tomcat-5.5.15\conf\Catalina\localhost". I'm not entirely sure what manager.xml is supposed to contain but it was already in the folder when it told me to put it there whilst i was going through the apache tomcat documentation on how to configure the manager. host-manager.xml is also in the folder. Any help would be much appreciated. Regards.
17 years ago
Thanks very much for your help. I've managed to get it all working - just in time for my hand in date of tomorrow! Topic can be closed.
18 years ago
Thanks very much for your help. I've managed to get it all working - just in time for my hand in date of tomorrow! Topic can be closed.
18 years ago
I hate to be a pain but Ernest replied to my first Jess Query and then moved my post to "Other Java Products and Servers" but as far as I can see that part of the forum is rather dead and I am really anxious to get a reply from Ernest or anyone else who can help. Here is my code and what I'm hoping to do:

(deffunction under-16 ()
(printout t "How old are you?")
(assert (Patient(age (read)))))

then to modify at a later stage:

(modify 1(Patient(age (read))))
(modify 1(Patient(location (read))))
etc...

I want to create a function which asks a question such as "How old are you?" and then get Jess to compare the integer entered with the criteria specified in my rule(s). I already have a template called Patient with a slot named age. When I use the above it just gives 0. Here is my first rule:

(defrule eligibility-rule1
(Patient (age ?age& < ?age 16)))
=>
(printout t "You are eligible for free prescriptions. (Rule: 1)" crlf) )

Thanks a million.
[ December 01, 2005: Message edited by: Jonathan Goode ]
18 years ago
I thought of doing this.

(deffunction under-16 ()
(printout t "How old are you?")
(assert (Patient(age (read)))))

then to modify at a later stage:

(modify 1(Patient(age (read))))
(modify 1(Patient(location (read))))

etc...
18 years ago
Here is the code so perhaps you can see my mistake more easily or at least what I'm doing wrong:

(deftemplate Patient
"Patient Information"
(slot rule
(type STRING)
(default "-"))
(slot age
(type INTEGER)
(default 30))
(slot location
(type STRING)
(default "-"))
(slot full-time_education
(type ATOM)
(default No))
)


(deffunction under-16 ()
(printout t "How old are you?")
(assert (Patient (age (read)))))


(defrule eligibility-rule1
(Patient (rule ?rule) (age ?age& < ?age 16)))
=>
(printout t "You are eligible for free prescriptions. (Rule: " ?rule ")" crlf) )

(defrule eligibility-rule2
(Patient (rule ?rule) (age ?age& < ?age 25)) (location "Wales"))
=>
(printout t "You are eligible for free prescriptions. (Rule: " ?rule ")" crlf) )

(defrule eligibility-rule3
(Patient (rule ?rule) (age ?age& < ?age 19)) (full-time_education Yes))
=>
(printout t "You are eligible for free prescriptions. (Rule: " ?rule ")" crlf) )

(defrule eligibility-rule4
(Patient (rule ?rule) (age ?age& > ?age 59)))
=>
(printout t "You are eligible for free prescriptions. (Rule: " ?rule ")" crlf) )


Is this what you intended? When I run it it just returns 0 no matter what age value I enter! Your help is much appreciated and unfortunately I don't have the text.
[ December 01, 2005: Message edited by: Jonathan Goode ]
18 years ago
Basically I wondered if someone could help me with a problem I have as I'm new to Jess and unsure of what to do - as a University assessment I must implement a set of rules (listed on this site http://www.patient.co.uk/showdoc/23069022) using Jess. So far I'm doing Ok and have written my rules but when it comes to creating a function which asks a question such as "How old are you?" and then getting Jess to compare the integer entered with the criteria specified in my rule(s) I'm stumped. I've tried using (assert (age (read))) where age is specified in a template then linking to the rule with phase but to no avail. Here is my first rule:
(defrule eligibility-rule1
(Patient (rule ?rule) (age ?age& < ?age 16)))
=>
(printout t "You are eligible for free prescriptions. (Rule: " ?rule ")" crlf) )

Here is the beginning of my first function:
(deffunction under-16 ()
(printout t "How old are you?")
(assert (age (read))))

Hopefully I'm making sense. Thanks in advance.

[ December 01, 2005: Message edited by: Jonathan Goode ]

[ December 01, 2005: Message edited by: Jonathan Goode ]
[ December 01, 2005: Message edited by: Jonathan Goode ]
18 years ago
Basically I wondered if someone could help me with a problem I have as I'm new to Jess and unsure of what to do - as a University assessment I must implement a set of rules (listed on this site http://www.patient.co.uk/showdoc/23069022) using Jess. So far I'm doing Ok and have written my rules but when it comes to creating a function which asks a question such as "How old are you?" and then getting Jess to compare the integer entered with the criteria specified in my rule(s) I'm stumped. I've tried using (assert (age (read))) where age is specified in a template then linking to the rule with phase but to no avail. Here is my first rule:
(defrule eligibility-rule1
(Patient (rule ?rule) (age ?age& < ?age 16)))
=>
(printout t "You are eligible for free prescriptions. (Rule: " ?rule ")" crlf) )

Here is the beginning of my first function:
(deffunction under-16 ()
(printout t "How old are you?")
(assert (age (read))))

Hopefully I'm making sense. Thanks in advance.

[ December 01, 2005: Message edited by: Jonathan Goode ]

[ December 01, 2005: Message edited by: Jonathan Goode ]
[ December 01, 2005: Message edited by: Jonathan Goode ]
18 years ago