Micheline Dax

Greenhorn
+ Follow
since Mar 22, 2005
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 Micheline Dax

Hi folks,

I have a problem using the <c:import /> tag.

Here is my code :
<c:import url="../fetch.do?id=25" var="titi" />
<c:import url="../fetch.do?id=245" var="toto" />

When I try to access titi and toto, they both contains the same content (the two included pages of course returns differents one).

So I tried this :

<c:import url="../fetch.do" var="titi">
<c:param name="id">25</c:param>
</c:import>

<c:import url="../fetch.do" var="titi">
<c:param name="id">255</c:param>
</c:import>

Same result !

Can anyone provide me a solution to this caching by url problem ?

Thanks in advance,

Sne.
14 years ago
JSP
Hi there !

I have a problem with data export/import ant tasks with dbunit.

I use data export to export preproduction data and import to inject them in my test db.

There is a consequent amount of data exported (xml is about 1 meg !) and there is about 30 tables exported.

When I try to import datas in the test db, I get a referential integrity error. Normal, since the data export task didn't exported datas in an order compliant with pk/fk references...

I saw on the internet that most of people seems to edit data exported and reorder them manually... well, that's obviously not an option in my case.

Anyone suceeded in finding a 'real' automated solution to this ?

Thanks in advance,


sen.
14 years ago
Hi there.

I have a List of "Books" to render in a tree format.
Each book have 3 Set, one of "Character", one of "Chapter", and one of "Picture".

I want to display a tree like that

Books
|- Book 1
| |-Chapters
| | |- Chapter 1
| | |- Chapter 2
| |-Characters
| | |- Character 1
|- Book 2
|-Chapters

Empty Sets MUST be displayed for popup menu's sakes.

Books
|- New Book
| |-Chapters
| |-Characters

Since I didn't want to synchronize a tree of DefaultMutableTreeNode with my Book List, I created a custom TreeModel (BookTreeModel).

My method getChild(Node parent, int index) return either the initial Books List (for the root node), either a "Book" object, either a Set for the node "Characters", "Chapters", "Pictures", and "Character" "Picture" an "Chapter" when exploring the Sets.

My problem is that it appears that the two empty sets are supposed to be "equals" for the java language.

So When I return several empty sets (a newly created Book doesn't contains any chapters not pictures yet, so the sets are empty ! ), the tree considers them as the SAME NODE, so my Tree contains holes in it !
Only the last returned empty Set is displayed (logic).

Since I didn't found any 'elegant' way to dodge that probleme (doesn't want to subclass Set to override equals or such a ugly thing), I'm returning to the community to point me towards an elegant one !

Thanks in advance for your answers,

Sne.
14 years ago
Hi to all !

I had a little 'discussion' with a colleage of mine last week about the good use of words 'model' and 'data'.

I was saying that "my controller pass the model to the view and the view use the model to be constructed".

He said "no, your view use the data to be constructed, not the model. The model is the static view of an application, you don't pass nor manipulate the model".

I'm ok with the concepts and the differentiation between 'the model' (how the data is 'organized') and the 'data' ("User" class is the model, "surname" is a describing part of the model, and "bob" is the data, or the value), and his remark sound 'ok' for me...

But when I see such a title
'Model change notification'
in such an article
http://java.sun.com/products/jfc/tsc/articles/architecture/
I'm confused.


Must we, all the time, talk strictly about "model" when talking about classes static structure, and "data" (or maybe "model's data") when talking about the 'dynamic" values ?
Should we change the title above by
'Data change notification' ?

So should I start saying "My jsp use the data" and "the controller pass the data to the view" ?
And "Springframeworkly speaking", why is there a Class named "ModelAndView" that says "Holder for both Model and View in the web MVC framework", where we should have called it "DataAndView" that should have said "Holder for both Data to be displayed and View in the web MVC framework" ???

Confronting all of this with the "MVC" definition confuse me even more :
shouldn't it be renamed "Business Model", "View Model" and "Controller Model" ???

This confusion about strict term use and definition really puzzle me...

Any help on that matter would be greatly appreciated !

Thanks in advance,

sne.
I CAN'T believe no ever had that problem... come on, save me, please !
15 years ago
Hi folks !

I'm seriously running into trouble with this problem that's turning me mad.

Here is the elements :

- Using Apache Ant version 1.6.5 compiled on June 2 2005
- Using XDoclet 1.2.2 (or 1.2.3, same result)
- Defined a custom ant target :

<target name="ldapdoclet" description="">

<taskdef name="ldapdoclet"
classname="xdoclet.DocletTask">
<classpath>
<path refid="xdoclet.classpath"/>
</classpath>
</taskdef>

<ldapdoclet
destdir="${basedir}/target/tmp/"
force="true"
excludedtags="@version,@author"
verbose="false">

<packageSubstitution
packages="fr"
substituteWith="com"/>

<fileset dir="src">
<include name="**/*.java"/>
</fileset>


<template
templateFile="etc/xdoclet/modules/web/resources/LDAPEntryTransformer.xdt"
destinationFile="{0}LDAPEntryTransformer.java"
havingClassTag="ldap.entity"
/>

</ldapdoclet>
</target>

- In /src I have 2 java classes that have the @ldap.entity class tag.

SO !

When I run "ant ldapdoclet"
-the two classes (let's call them A and B) I have under the package
fr.zobi.cg99.intra.model
generate 2 files (which content is perfect according to my xdt file)
ALDAPEntryTransformer.java
BLDAPEntryTransformer.java

BUT

those 2 files are STILL in the package
fr.zobi.cg99.intra.model.*

not in
com.zobi.cg99.intra.model.*

as expected, according to the use of <packageSubstitution .../>


I tried many parameters tweak with <packageSubstitution > (even tried to copy it inside my <template> )
but NONE worked. Tried clearing the target directory, recreate the source, copy paste the code, changed xdoclet
version...
According to the documentation, that should work, but it doesn't.

If anyone can help, any advice would be GREATLY appreciated !

Thanks in advance,

Sn.

[ November 23, 2005: Message edited by: Micheline Dax ]
[ November 23, 2005: Message edited by: Bear Bibeault ]
15 years ago
Hello everybody.

I suppose this is a somewhat recurent question, but as always, I didn't managed to find a satisfying answer...

Here is my problem :

- I'm developping an web application for french users that can type accentuated letters in forms.
- I store the information in DB and everything is ok.
- I get it back, display it in jsp (with jstl of course! ), everything still ok.

Now I want to capitalise some words.

I use the apache String taglibs :
<str:upperCase>...</str>

That one correctly uppercase the accentuated letter, (for ex '�' in '�').
Still fine.

But now, I want the <str:upperCase> to transform the accentuated letters
in UNaccentuated letters, for ex '�' in 'E'.

I'm not a 'character encoding' guru, so I humbly beg for any help to solve that problem !

Thanks in advance,

S.
[ May 16, 2005: Message edited by: Bear Bibeault ]
15 years ago
JSP
Ok well !

After some more digging... I'm making some progress !

http://java.sun.com/products/javamail/FAQ.html#helo

Then I trid :
InetAddress.getLocalHost()

that gives me :
java.net.UnknownHostException: networkName: networkName


Considering my /etc/hosts file, that really makes me wonder...
what did I missed ?
Well...

To fix the ideas : the application is deployed on the machine
networkName (IP : 10.0.0.1)


The error I get when I try to send mail with log4j :
----------------------------------------------------------------------------
log4j:ERROR Error occured while sending e-mail notification.
javax.mail.SendFailedException: Sending failed;
nested exception is:
class javax.mail.MessagingException: 501 Syntax: HELO hostname
at javax.mail.Transport.send0(Transport.java:218)
at javax.mail.Transport.send(Transport.java:80)
----------------------------------------------------------------------------


The /etc/hosts file contains (excerpt) :
------------------------------------------------------------------------
127.0.0.1 localhost
10.0.0.1 networkName.mycompany.priv.com networkName.mycompany.com networkName
------------------------------------------------------------------------


So why does this damn Transporter doesn't send the hostname whe EHLO'ing the smtp server ???
Hello !

Since I'm really getting out of patience and time, I beg for your help !

I'm sending email via SMTPAppender.
Everything works fine when the application runs on my laptop. Emails are sent and received.

When I put it on a *nux box, with of course, everything exaclty configured the same, emails are not send anymore !
I get a
501 Usage HELO hostname
exception.

The smtp server is reachable, of course. That's really the EHLO command that fail...

Same code, same configuration, same jars, aso...

But something is getting wrong on the linux box !

I ran into every existing doc I found on javamail, log4j and so, but didn't found an answer to that issue...

Can anyone give some help ???

Thanks in advance !

A (mad) J2EE developer.