Win a copy of Rust Web Development this week in the Other Languages forum!

Sharon Cowling

+ Follow
since Feb 09, 2002
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Sharon Cowling

Does anyone have any ideas about this? Do I need to provide more information?
I am adding email addresses to an xml file, I need to select a certain user and then add an email address to that user, the code works for one user with:
<xtags:forEach select="/configuration/users/user/emails">
(plus the xtags:add code as below)
But when you add an email address to another user it adds it to the first users email as it does not know which user it is dealing with, so as you can see below I am including <%username%> in the xtags statement, however this code now does not add to the xml file at all, no errors either. Does anyone have any ideas why this doesn't work, or how it should be done
<xtags:forEach select="/configuration/users/user[username='<%=username%>']/emails">
--%><num><%= num %></num><%--
--%><emailuser><%= emailuser %></emailuser><%--
--%><emailpassword><%= emailpassword %></emailpassword><%--
--%><emailserveraddress><%= emailserveraddress %></emailserveraddress><%--
--%><emailproto><%= emailproto %></emailproto><%--
I currently have a Java class that reads through an xml file searching for the input parameters - 1 is the element and 1 is the value, if the element is found and not the value the value needs to be inserted into the xml file, I can't figure out how to add the value, heres a code snippet:
Heres the bit i'm having trouble with:
if (e.getTagName().equals(id)) {
System.out.println("Did not find matching value node...adding new node now...");
Node c2 = document.createTextNode(value);
basically they enter in an id like <name> and a value such as "Bobs Company"
the code searches for the id entered and if there is no value that equals "Bobs company" it should be written to the xml file.
the full code is below. I am missing how to write an element to an already existing file as my above bit of code does not write anything!
a longer version of the code is below:
Please let me know if i need to provide more info.
Nope it's not checked.
19 years ago
I'm using Tomcat 4 with SSL.
I have a hyperlink on one of my https jsp pages for the user to download the data on the screen to a .csv. Previous to adding SSL to the site the download worked fine, now when trying to download I get the following message:
Internet Explorer cannot download reports.csv from <server_name> The file could not be written to the cache.
This is a problem with IE6, it downloads fine with Mozilla, unfortunately the users will be using IE. I have read that IE 6 has this problem, but I am yet to find a solution. It was suggested to me that installing SP1 would fix it, but it didn't. Any ideas or suggestions?
19 years ago
D:\Apache Tomcat 4.0\webapps\myproject\WEB-INF\classes\hansen\playground\
19 years ago
I'm going to try this example:
As it is on the javaranch forum, I figure some of you guys will be familiar with it, so I'll give it a go and post if I strike problems, or have any questions in regards to it.
I really want to use Struts for an internal application at work, but I want to see a working example that I have created first.
19 years ago
My directory structure is:
D:\Apache Tomcat 4.0\webapps\myproject\
19 years ago
I'm working through a really basic sample application I found on the web
I've followed the instructions, but seem to have gone wrong somewhere, but I'm not sure where!
I thought maybe someone has come across the same error, it may be a configuration problem. I'm using Tomcat 4, and Struts 1.0.2. The struts-config.xml looks correct to me, I've added that at the bottom of the post.
Below is the error message I get when clicking the submit button on the sample app:
Let me know what further information you need from me.
Apache Tomcat/4.0.4 - HTTP Status 500 - No action instance for path /submit could be
type Status report
message No action instance for path /submit could be created
description The server encountered an internal error (No action instance for path
/submit could be created) that prevented it from fulfilling this request.
<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE struts-config (View Source for full doctype...)>
- <struts-config>
- <!-- ========== Form Bean Definitions =================
- <form-beans type="org.apache.struts.action.ActionFormBean">
<form-bean name="submitForm" type="hansen.playground.SubmitForm" />
- <!-- ========== Action Mapping Definitions ============
- <action-mappings type="org.apache.struts.action.ActionMapping">
- <action path="/submit" type="hansen.playground.SubmitAction" name="submitForm" input="/submit.jsp" scope="request">
<forward name="success" path="/submit.jsp" />
<forward name="failure" path="/submit.jsp" />
19 years ago
Hi, is anyone interested in giving me a hand with Struts? I've followed a couple of examples but I can't get them to work, I'm using Tomcat 4. I posted on the Struts mailing list, but all I got back was a rude reply, so if anyone wants to correspond with me via email it would be most appreciated, let me know and I'll post my email address.
19 years ago
Don't worry, it was a tomcat problem and it has been solved.
19 years ago
I have received an error message, whilst testing my JSP app. I'm using Tomcat 4 and Posgresql 7.2.1
Something unusual has occured to cause the driver to fail. Please report this exception: Exception: java.sql.SQLException: FATAL 1: Sorry, too many clients already
So I thought that I would stop and start Tomcat, but I get this error message:
root@kent:/usr/local/jakarta/build/tomcat/bin# /usr/local/jakarta/build/tomcat/bin/
Guessing TOMCAT_HOME from to /usr/local/jakarta/build/tomcat/bin/..
Setting TOMCAT_HOME to /usr/local/jakarta/build/tomcat/bin/..
Using classpath: /usr/local/jakarta/build/tomcat/bin/../classes:/usr/local/jakarta/build/tomcat/bin/../lib/ant.jar:/usr/local/jakarta/build/tomcat/bin/../lib/jaxp.jar:/usr/local/jakarta/build/tomcat/bin/../lib/parser.jar:/usr/local/jakarta/build/tomcat/bin/../lib/servlet.jar:/usr/local/jakarta/build/tomcat/bin/../lib/test:/usr/local/j2sdk1.3.0/lib/tools.jar:/usr/local/j2sdk1.3.0/jre/lib/jdbc7.1-1.2.jar
Stop tomcat Connection refused
at Method)
at org.apache.tomcat.task.StopTomcat.execute(
at org.apache.tomcat.startup.Tomcat.stopTomcat(
at org.apache.tomcat.startup.Tomcat.execute(
at org.apache.tomcat.startup.Tomcat.main(
I have not implemented connection pooling yet, and from this problem it looks like I'll have to do that shortly, I've had a look on the net and I haven't found anything helpful, I need to be able to shutdown tomcat.
If someone is able to give me a hand in determining and fixing the problem it would be most appreciated.

19 years ago
Thank you for your comments. Unfortunately this app has been written in JSP with a few java classes attached...I will definetely look into Struts on a future java project.
19 years ago
I have a major problem, the JSP app has started behaving differently since SSL was applied.
A user fills out a form (jsp1), when they click submit they are taken to a JSP controller page (jsp2) that runs checks for errors and business logic. If any errors are found they are forwarded to an error page (jsp3) stating the error message(s), they can click the back button (javascript window.history.back()) which then goes to jsp1, with their fields still containing their details.
But now with SSL when the user clicks back they are taken to a new instance of the form, which is empty. (The users will not like this!)
I know I need to use the session object to acheive getting the users data back into the form, but I'm not quite sure how to do this, I keep getting null pointer exceptions.
Can someone point me to some documentation or explain it to me? This would be most appreciated.
19 years ago
Thanks for that, silly mistake on my behalf. Now thats sorted I'm still getting the wrong results out of the Vector, entering 2 out of the possible 12 entries, and I'm getting back my 2 values, and 5 empty strings, well they look like empty strings in the database, but I'm testing for that...any other way to test for a Vector element that does not contain a String value?
19 years ago