Neil Laurance

Ranch Hand
+ Follow
since Jul 18, 2002
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
1
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 Neil Laurance

Its fairly recent. I guess we will just wait and see
15 years ago
How about starting a SpringSource Spring Certification Forum?
Cheers, Neil
15 years ago
I had this as well.
It is because I had forgotten to place the hibernate-entitymanager.jar into my lib directory. Then when Persistence tries to find any persistence-providers on the classpath, it was not finding any at all.
Cheers, Neil
SCJP:90%
SCWCD:91%
SCBCD:93%
SCDJWS:91%
Now on to the Architects exam...
Cheers, Neil
16 years ago
Managed to suss it, borrowing from XSLT Programmer's Reference:

Cheers, Neil

[ December 17, 2004: Message edited by: Neil Laurance ]

Edit Comment: Disabled smiles. - m
[ December 17, 2004: Message edited by: Madhav Lakkapragada ]
Actually, thinking about it, I don't think I can use translate. This function replaces one character with another. Whilst I wan't to replace one character with two others. I think I may need to create a recursive template?
I was wondering if anyone could help me out on this one. I have a small XML file like:

I am creating a very simple XSLT to transform this to CSV output. I have the following XSLT:

Which produces:

Which is almost there. However, I want to escape any (") characters. I have tried something like:

But this complains with:

I just can't seem to escape the (") characters correctly Anyone solved this one?

Thanks, Neil
Please forgive my crossposting (message also posted to JDC Forums)

I was wondering if anyone could provide some advice:

Our webstart app works fine on 1.4.2_03, but throws a CORBA marshalling error on 1.4.2_06. The class it fails to marshall is a MutableTreeNode, so it appears this class is incompatible between the JRE used on the server and the JRE used on the client.

To prevent this, I was hoping there was some way to distinguish between the 2 JREs. From my understanding of the JNLP spec, I can have something like:


But this would mean the localURL gets called each time, and a JRE repeatedly installed. Another idea I had was to create a small Main Proxy class that each JNLP invokes first, which would check the JRE version, then pass over to the real application.

Any other ideas? Thanks, Neil
19 years ago
You have created an array of Reverse items using:

This array is initialised with 100 null Reverse references.
You cannot use Arrays.sort when part of this array contains nulls.
Better to use a dynamically growing list, and use Collections.sort:

This should hopefully solve your problems.
Cheers, Neil
19 years ago
Implement the Comparable interface:
http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Comparable.html

Cheers, Neil
19 years ago
Hi, I've posted this question on Java Developer Connection's Forums, but no responses yet. Was wondering if anyone here could help me out?

I am running through the examples in the "Java Web Services in a NutShell" book.

I am using jwsdp-1.4 and tomcat-jwsdp-1.4.

I was trying the EchoService example, which sends an empty SOAP message to a servlet deployed in Tomcat. This servlet should then simply echo the message back to the sender.

However, when I attempt to run the example, I get the following error:

[java] Headers:
[java] Content-Type: text/xml; charset=utf-8
[java] Content-Length: 132
[java] SOAPAction: ""

[java] Message:
[java] <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"><SOAP-ENV:Header/><SOAP-ENV:Body/></SOAP-ENV:Envelope>
[java] Using connection class com.sun.xml.messaging.saaj.client.p2p.HttpSOAPConnection
[java] Sep 29, 2004 10:22:45 AM com.sun.xml.messaging.saaj.client.p2p.HttpSOAPConnection post
[java] SEVERE: SAAJ0008: Bad Response; HTTP method GET is not supported by this URL
[java] com.sun.xml.messaging.saaj.SOAPExceptionImpl: Bad response: (405HTTP method GET is not supported by this URL
[java] com.sun.xml.messaging.saaj.SOAPExceptionImpl: java.security.PrivilegedActionException: com.sun.xml.messaging.saaj.SOAPExceptionImpl: Bad response: (405HTTP method GET is not supported by this URL
[java] at com.sun.xml.messaging.saaj.client.p2p.HttpSOAPConnection.post(HttpSOAPConnection.java:285)
[java] at com.sun.xml.messaging.saaj.client.p2p.HttpSOAPConnection$PriviledgedPost.run(HttpSOAPConnection.java:151)
[java] at java.security.AccessController.doPrivileged(Native Method)
[java] at com.sun.xml.messaging.saaj.client.p2p.HttpSOAPConnection.call(HttpSOAPConnection.java:121)
[java] at ora.jwsnut.chapter3.client.EmptyMessageClient.main(EmptyMessageClient.java:41)
[java] java.security.PrivilegedActionException: com.sun.xml.messaging.saaj.SOAPExceptionImpl: Bad response: (405HTTP method GET is not supported by this URL
[java] at java.security.AccessController.doPrivileged(Native Method)
[java] at com.sun.xml.messaging.saaj.client.p2p.HttpSOAPConnection.call(HttpSOAPConnection.java:121)
[java] at ora.jwsnut.chapter3.client.EmptyMessageClient.main(EmptyMessageClient.java:41)
[java] Caused by: com.sun.xml.messaging.saaj.SOAPExceptionImpl: Bad response: (405HTTP method GET is not supported by this URL
[java] at com.sun.xml.messaging.saaj.client.p2p.HttpSOAPConnection.post(HttpSOAPConnection.java:285)
[java] at com.sun.xml.messaging.saaj.client.p2p.HttpSOAPConnection$PriviledgedPost.run(HttpSOAPConnection.java:151)
[java] ... 3 more

The error message seems to suggest that the HttpSOAPConnection class is getting confused between POST and GET modes. Or is there something I need to configure in my client code? Has anyone else seen / worked around this?

Thanks, Neil
19 years ago
FYI:
I opened the CVSNT Service Control Panel, and clicked on the Advanced tab. Hovering over the 'Pretend to be a UNIX CVS version' displayed the tooltip 'Change certain server responses so that the server looks like a UNIX CVS client to remote servers. Eclipse and WSAD sometimes need this'
Checking this box seemed to make this message disappear in Eclipse?
Apologies if this question has been asked before, but is the SCWCD based on JSP 1.2 or JSP 2.0?
Thanks, Neil
A quick question for all you Servlet API gurus :-)
I have some information that I need to store past the end of an HttpSession lifecyle.
This information needs to be available to all servlets in the web application.
Regarding the ServletContext, the Servlet Specification states:


SRV.3.2 Scope of a ServletContext Interface
There is one instance object of the ServletContext interface associated with each
web application deployed into a container. In cases where the container is
distributed over many virtual machines, a web application will have an instance of
the ServletContext for each VM.
Servlets in a container that were not deployed as part of a web application are
implicitly part of a �default� web application and have a default ServletContext.
In a distributed container, the default ServletContext is non-distributable and
must only exist in one VM.


Therefore, this information cannot be stored in the web application's ServletContext. However, we are using tomcat, which can be configured to allow access to the default context with the following entry in the server.xml configuration file:

This default context is guaranteed to be in a single JVM only, so perhaps we can store stuff in there. Glorious hack, or dangerous approach?
For example, the following JSPs can share information between web applications, so I am guessing this approach should work for distributed web applications also:
File 1:

File 2:

Comments please :-)
20 years ago