Dave Donohoe

Ranch Hand
+ Follow
since May 16, 2000
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 Dave Donohoe

Hi,
I am using an XSL Style sheet to display data from XML Using a table.....
All is fine until there is a Carriage Return in the XML ie
:
:
<description>This is the
description.</description>
:
:
When I try to assign this data to a variable, this causes an error - Unterminated String Constant - how can I escape the Carraige Return so that it wont cause an error but will still maintain its form?
D
Hi all - hope someone can help.
I have a JSP with a description field which is a textarea.
I pass into the JSP the value I want displayed.
If this string has a carriage return in it, it throws a JavaScript error (Unterminated String Constant) when I try to set the value of the text box...
ie
String is "This is
the description"
in the jsp - (note - typed, not actual code so ignore any code errors)
var str = request.getParameter("desc");
mytextbox.value = str;
In the html, this looks like
mytextbox.value = "This is
the description"
How can I escape the carraige return so that it dosnt cause the error?
D
20 years ago
JSP
Thanks Steve! That worked perfectly!
D
20 years ago
I am using the FileReader & BufferedReader classes to read in a text file & display it in the the brower.
This works fine except that tabs & spaces get left out ie text in the file like this so the start of a new paragraph does not have the tab in front of it that it does in the file.

How can I keep the tabs & spaces format of the text file?
[ March 31, 2002: Message edited by: Dave Donohoe ]
20 years ago
When I deployed my EJB on my machine I could create the instance of the bean & connect to it no problem. But, when I deploy the EJB on another machine & connect to that server, the lookup works but an RMI Exception is thrown -
java.rmi.RemoteException: CORBA UNKNOWN 1230242048 No; nested exception is:
org.omg.CORBA.UNKNOWN: minor code: 1230242048 completed: No
org.omg.CORBA.UNKNOWN: minor code: 1230242048 completed: No
at java.lang.Class.newInstance0(Native Method)
at java.lang.Class.newInstance(Class.java:237)
at com.iona.corba.art.streamables.SystemExceptionStreamable._read(System
ExceptionStreamable.java:103)
at com.iona.corba.giop.GIOP_1_2_ReplyProcessorImpl.process_reply(GIOP_1_
2_ReplyProcessorImpl.java:314)
at com.iona.corba.giop.GIOPClientStreamRequestInterceptorImpl.stream_inv
oke(GIOPClientStreamRequestInterceptorImpl.java:562)
at com.iona.corba.art.binding.IORProxy.invoke(IORProxy.java:527)
at org.omg.CORBA.portable.ObjectImpl._invoke(ObjectImpl.java:294)
at _ReminderHome_Stub.create(_ReminderHome_Stub.java:114)
at com.columba.exprimer.ColumbaConnection.doInitialise(ColumbaConnection
.java:449)
at com.columba.exprimer.GenericDesktop.service(GenericDesktop.java:159)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:4
01)
at org.apache.tomcat.core.Handler.service(Handler.java:286)
at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372
)
at org.apache.tomcat.core.ContextManager.internalService(ContextManager.
java:797)
at org.apache.tomcat.core.ContextManager.service(ContextManager.java:743
)
at org.apache.tomcat.service.http.HttpConnectionHandler.processConnectio
n(HttpConnectionHandler.java:210)
at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:
416)
at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java
:498)
at java.lang.Thread.run(Thread.java:484)

Just before I attept to talk to the bean, I create an instance of another Bean also deployed on the same server - this one works fine even though the code is different.
Are there any settings that would make the bean work deployed on one machine but not on another?
Thanks in advance,
Dave
Hi Kyle,
Thanks for your reply.
The init method of the bean will go to the database & pull back & store a list of users.
When a user logs onto the client, the user name is sent to the bean & I have to check the vector to see if the User is in the Vector - a boolean is returned to the client indicating whether or not the user was found....
This is my first attempt at writing an EJB so please forgive my igonorance - the variables are not static....merely global - does this make a difference?
D
[ March 24, 2002: Message edited by: Dave Donohoe ]
I have an Entity Bean with 2 global vectors.
I call one method to populate the vectors (& the vectors DO get populated).
Then I call another method to access the Vectors, but the Vectors are empty.
I do not re-instantiate the bean, & I dont overwrite the Vectors.
The vectors are declared as private.
Any ideas?
D
I have an XML File & I want to output the data in a table in rows of 3. I want each cell of my table to contain a gif & text from the XML File
I use the following -
<xsl:for-each select=".">
<xsl:choose>
<xsl:when test="TO_STRING!='All'">
<xsl:choose>
<xsl:when test='position() mod 3 = 0'>
<tr>
</xsl:when>
</xsl:choose>
<td>
<img src="C:\images\note.gif"></img><br></br>
<xsl:value-of select="MSG_FROM"/><br></br>
<script language="Javascript">formatDate('<xsl:value-of select="MSG_DATE"/>')</script>
</td>
<xsl:choose>
<xsl:when test='position() mod 3 = 2'>
</tr>
</xsl:when>
</xsl:choose>
</xsl:when>
</xsl:choose>
</xsl:for-each>
The gif & the text are displayed as expected but they are all in one line - ie the test 'position() mod 3 = 0' is never true.....
What am I doing wrong?
Dave
Hi,
I have a Web Based application that displays search results using Style Sheets.
I have a JSP Search Screen where I enter data & the results are displayed using XSL.
When I do the search, display the results & then display another Style Sheet ( so the history is JSP -> XSL -> XSL) & hit the Back button, it skips the middle Style Sheet & goes straight to the JSP. But, if I call a jsp between the 2 XSL Style Sheets (ie history is JSP -> XSL -> JSP -> XSL) & hit the back button, it goes to the second JSP as expected.
I have NO idea what the problem is, does anyone else?
Thanks in advance,
D
Thanks for your reply, Nate.
Basically I want the JInternalFrame modal with regard to the Application not the System.
Using a different Layer of JLayeredPane worked perfectly!
D
20 years ago
I have a JInternalFrame & I want to be able to keep this window to the front (same as the always on top feature of WinZip 8.0)
I dont want to make it a modal dialog because I still want the user to be able to interact with the other items on the screen while the JInternalFrame is displayed.....any ideas?
20 years ago
I have an Applet that calls a Servlet like so -
String tmp_szServletLocation = "http://localhost:8080/App/TheServlet";

URL tmp_urlServlet = new URL(tmp_szServletLocation);
URLConnection tmp_urlCon = tmp_urlServlet.openConnection();
tmp_urlCon.setUseCaches (false);
tmp_urlCon.setDefaultUseCaches(false);
ObjectInputStream inputFromServlet = new ObjectInputStream(tmp_urlCon.getInputStream());

I know it goes into the Servlet, as I have Debug Statments within the service method.
BUT, the onload() method in the Servlet never gets triggered.....
ANY ideas please?
[ January 23, 2002: Message edited by: Dave Donohoe ]
20 years ago
Thanks for your replies William,
I have solved the problem!
What I was trying to do was pass the hashtable from the Servlet to the applet.
20 years ago
The following code calls an applet & sends a hashtable to the applet.
This will not work - it seems as if the applet never gets called. However, no exceptions/errors are raised!
The code works if I create hastable & only add one hash pair to it - does this mean that there is a limit on the size that can be sent to the applet?

ObjectOutputStream output = new ObjectOutputStream(m_httpResponse.getOutputStream());
output.writeObject(m_hshData);
output.writeBytes("<APPLET CODE='DavesApplet.class' ARCHIVE='DDavesApplet.jar' WIDTH=0 HEIGHT=0 CODEBASE='/BEAT/applet/'>");
output.flush();
output.close();
20 years ago
I have a Servlet that calls an applet like so
output.writeBytes("<APPLET CODE='DavesApplet.class' ARCHIVE='DDavesApplet.jar' WIDTH=50 HEIGHT=50 CODEBASE='/BEAT/applet/'>");
The applet then uses an ObjectInputStream to connect to the servlet & get a Vector from the servlet. All this works fine except that the contents of the vector get printed to the screen. How can I leave the window in the browser blank? Ideally, I would prefer not to have the gray box of the applet appear either.
D
20 years ago