L Duperval

Ranch Hand
+ Follow
since May 14, 2003
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 L Duperval

Tim Holloway wrote:In context XML, to define type/value and assign a name:



Ok, thanks I'll try that but I think it is part of my unsuccessful attempts. I'll double check.

However, your main problem is failure to provide the right context for the JNDI lookup. For the above example, you'd look up the value under "java:comp/env/serverUrl".



What do you mean by that? The code I use works in Websphere and finds the correct values, as I defined them trough WS's admin console.

If I understand you correctly, it's non-portable and won't work like that in Tomcat, for example, because I'm missing come contextual information which seems to be provided automatically by Websphere.

L
13 years ago
Hi,

I'm sure this will end up being a stoopid mistake on my part but...

I'm trying to get the following code to return a non-null value:

context = new InitialContext();
value = (String) context.lookup("myDefinedKey");

Where must I define "myDefinedKey" so it is available from any servlet? I tried in the web.xml, the server.xml and the context.xml but either I'm not putting the information in the correctl location, or I'm not defining it correctly.

Can anyone help?

Thanks,

L
13 years ago
Oh, just wanted to add that this is a Maven project, and I'm using the Maven plugin if that has any effect.

L
13 years ago
HI,

I am trying to do code coverage on my application which has two parts: one is the service library with most of the nuts'n'bolts and the other is the Web app portion, with the servlets. When I run code coverage on the service library from within RAD, it works fine. However, when I try to run it for the Web app, I get 0% coverage for everything.

My tests are run from withing RAD, using HttpUnit to call the URLs I am trying to test. I followed this information (http://www.ibm.com/developerworks/rational/library/10/introtocodecoveragetoolinrationalapplicationdeveloper) to enable code coverage. I start the server, run the Unit tests from RAD, the .coveragedata file is generated, then I import it but the only code which has coverage > 0% is the JUnit code. Everything else is at 0% (whether my servlets or the code in the service library).

Does anyone understand what I may be doing wrong?

Thanks,

L
13 years ago
Hi,

I notice that later releases of the J2SE for the output of an XMLGregorianCalendar with the fractional second. Other than overriding the XMLGregorianCalendar class, is there a way to remove that part of the output?

Thanks,

L
Hi,

I thought this would be easy to find but it isn't. Is there a page that explains how to install and configure Cactus in Geronimo?

Thanks,

L
13 years ago
Yes, I know this thread is old but since not much has been said on it...

I have the same issue and I am not running a load balancer. The tests are running locally on my machine, in a RAD/Websphere environment. I noticed that, in my case, only the first test would fail with no result. After that, the other tests would run normally. So, what did I do? I created a dummy test which fails. I put it first in my file to (make it more likely that it will) make it run before the other tests.

It sorta works. The error is not caught, so I always get a failure in the dummy test. However, the other tests run and function as expected.

Another way to make it work is to run the test suite twice, without redeploying the war or the restarting the server.

I don't understand the behaviour, however. Any insight appreciated,

L
13 years ago
Never mind. Turns out that in our environment, it's a bit more complicated than a simple <exclude>. I'll revisit this later.

L
13 years ago
Hi,

I have a project which uses httpunit to do some remote servlet testing. One annoying aspect of this is that whenever I modify my test classes, the code gets recompiled and redeployed to Websphere (happens with Eclipse and with RAD). I'm sure there is something that needs to be done on my end to prevent this. What am I doing wrong?

Thanks,

L
13 years ago
For some reason, I thought I needed to have a framework in place (such as Struts) to use forwarding. I'm looking into it.

Thanks for the theoretical background.

L
13 years ago
This may be an easy question... I am working with Websphere 7.0, in case it matters.

I am creating a series of servlets which process XML documents. For eaxh XSD I have a different servlet. So, from a client perspective, you need to know the type of data you are working with in order to call the correct servlet to do the work. I want to avoid this.

So, I created a new servlet, whose task is to analyze the incoming XML and call the proper servlet to do the actual work. So, one point of contact for the client.

My problem is that the way I implemented it (using reflection), I have to manage the servlet's life cycle, which I don't want to.

After thinking about it, I realize there are (at least) two ways to do this:

  • Redirect the requestoto the proper servlet, using a new GET
  • Ask Websphere to return an (existing) instance of the proper servlet and call its doGet() method appropriately
  • Something else?

  • Any ideas or Web pages I should look at to figure how to to this?

    Thanks,

    L
    13 years ago
    *Sigh* OK, keyboard and chair issue. I actually had it right but in my program, I was setting the wrong parameter....

    The only thing missing from the code above is this line:

    <xsl:param name="outputDir" select="output"/>

    which I put at the beginning of the file.

    L
    Hi,

    Situation: I am generating multiple output files from a single transformation

    Problem: I want to be able to set dynamically the root directory for output

    I am generating the output file like this:



    My problem is how to set the value of outputDir. I'm having difficulty figuring out how to mix the value of a parameter with the name of a variable created on the fly in this manner.

    Ideas?

    Thanks,

    L
    Maybe the XML declaration and the fact that it only has one root element.

    L
    Hi,

    I asked this question in another thread, and I thought it worked, but I was wrong.

    Here is the situation: I have to use the XSLT implementation of JDK6. I can't use Xalan or Saxon.

    I am trying to generate multiple file output from a single XML document. In Xalan, it works fine, using this:



    When I remove the Xalan 2.7.1 libraries, I get an error saying that the "file" attribute is missing in the <redirect:write> line. THis gives me the impression that I can't use the JDK implementation of Xalan to get dynamic file output the way I can in Xalan 2.7.1.

    Am I correct? Or did I miss something? Any help is appreciated,

    Thanks,

    L

    P.S. I'm using 1.6.0_18