Jochen Maes

Greenhorn
+ Follow
since Dec 03, 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
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 Jochen Maes

Hey all,


I'm trying to find a nice SMTP API or Protocol implementation that allows mye to launch an SMTP server to receive mails in my Java application.
I've looked at James, but that's a separate SMTP server that needs to be installed seperately, i'd like to launch my app and have an SMTP server immeadiately running.

Is there allready an API?

thanks
solved it, it's a bug in the sun jdk.

IT works perfectly with the ibm jdk...

weird...
19 years ago
Hi all,



I've been using the jaxb-ea version long time, but now i switched to the jaxb 1.4 version because that one is provided with hyperjaxb.

I created a dtd and an xjs, but whatever i try in the anttask (xjc task) i can't get it to work.
So i created a xsd (generated it from the dtd) and ran xjc with that one. This does work but creates a class for each element (even when it should be a value).
In xjs i can define if it should be a value or a class but i don't kow how to handle that with the xsd.

Someone advise on how to use the dtd & xjs with the new jaxbversion?

thank you
HI all,

I'm trying to get hyperjaxb working and can't get the ant files working. I'm sure something is wrong with my setup (almost cannot be anything else).

I have an test.xml file (build file) and it has 2 tasks one with a taskdef and one without. (same actions). But when i run the taskdef one i get following error (xml file attached)

SeJo@versake article41 $ ant -f test.xml -d -v
Apache Ant version 1.6.2 compiled on August 17 2004
Apache Ant version 1.6.2 compiled on August 17 2004
Buildfile: test.xml
Detected Java version: 1.4 in: /opt/sun-jdk-1.4.2.05/jre
Detected OS: Linux
parsing buildfile /home/SeJo/workspace/project/test.xml with URI = file:///home/SeJo/workspace/project/test.xml
Project base dir set to: /home/SeJo/workspace/project
Build sequence for target `generate.sources' is [generate.sources]
Complete build sequence is [generate.sources, ]

generate.sources:

BUILD FAILED
/home/SeJo/workspace/project/test.xml:14: taskdef A class needed by class com.sun.tools.xjc.XJCTask cannot be found: org/apache/tools/ant/Task
at org.apache.tools.ant.taskdefs.Definer.addDefinition(Definer.java:487)
at org.apache.tools.ant.taskdefs.Definer.execute(Definer.java:183)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
at org.apache.tools.ant.Task.perform(Task.java:364)
at org.apache.tools.ant.Task.perform(Task.java:364)
at org.apache.tools.ant.Target.execute(Target.java:341)
at org.apache.tools.ant.Target.performTasks(Target.java:369)
at org.apache.tools.ant.Project.executeTarget(Project.java:1214)
at org.apache.tools.ant.Project.executeTargets(Project.java:1062)
at org.apache.tools.ant.Main.runBuild(Main.java:673)
at org.apache.tools.ant.Main.startAnt(Main.java:188)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:196)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:55)
Caused by: java.lang.NoClassDefFoundError: org/apache/tools/ant/Task
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:539)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:251)
at java.net.URLClassLoader.access$100(URLClassLoader.java:55)
at java.net.URLClassLoader$1.run(URLClassLoader.java:194)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
at java.lang.ClassLoader.loadClass(ClassLoader.java:282)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274)
at java.lang.ClassLoader.loadClass(ClassLoader.java:282)
at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
at org.apache.tools.ant.AntClassLoader.findBaseClass(AntClassLoader.java:1180)
at org.apache.tools.ant.AntClassLoader.loadClass(AntClassLoader.java:956
)
at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:219)
at org.apache.tools.ant.taskdefs.Definer.addDefinition(Definer.java:457)
... 11 more
--- Nested Exception ---
java.lang.NoClassDefFoundError: org/apache/tools/ant/Task
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:539)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:251)
at java.net.URLClassLoader.access$100(URLClassLoader.java:55)
at java.net.URLClassLoader$1.run(URLClassLoader.java:194)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
at java.lang.ClassLoader.loadClass(ClassLoader.java:282)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274)
at java.lang.ClassLoader.loadClass(ClassLoader.java:282)
at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
at org.apache.tools.ant.AntClassLoader.findBaseClass(AntClassLoader.java:1180)
at org.apache.tools.ant.AntClassLoader.loadClass(AntClassLoader.java:956)
at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:219)
at org.apache.tools.ant.taskdefs.Definer.addDefinition(Definer.java:457)
at org.apache.tools.ant.taskdefs.Definer.execute(Definer.java:183)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
at org.apache.tools.ant.Task.perform(Task.java:364)
at org.apache.tools.ant.Target.execute(Target.java:341)
at org.apache.tools.ant.Target.performTasks(Target.java:369)
at org.apache.tools.ant.Project.executeTarget(Project.java:1214)
at org.apache.tools.ant.Project.executeTargets(Project.java:1062)
at org.apache.tools.ant.Main.runBuild(Main.java:673)
at org.apache.tools.ant.Main.startAnt(Main.java:188)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:196)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:55)

Total time: 2 seconds




test.xml:

<?xml version="1.0" encoding="UTF-8"?>
<project name="art41" default="generate.sources" basedir=".">
<path id="classpath">
<fileset dir="/opt/jars">
<include name="ant.jar"/>
<include name="hyperjaxb.jar"/>
<include name="jaxb-xjc.jar"/>
<include name="xsdlib.jar"/>
<include name="xercesImpl.jar"/>
<include name="sax.jar"/>
</fileset>
</path>
<target name="generate.sources">
<taskdef name="xjc" classname="com.sun.tools.xjc.XJCTask"></taskdef>
<mkdir dir="blah.blah"/>
<xjc schema="xml_schema_project.xsd" target="blah.blah" classpathref="classpath.lib">
<arg line="-Xhibernate-xdoclets"/>
<classpath>
<pathelement location="." />
<pathelement location="/opt/jars/ant.jar" />
<pathelement location="/opt/jars/hyperjaxb.jar" />
<pathelement location="/opt/jars/jaxb-xjc.jar" />
<pathelement location="/opt/jars/xsdlib.jar" />
<pathelement location="/opt/jars/xercesImpl.jar" />
<pathelement location="/opt/jars/sax.jar" />
</classpath>
</xjc>
<!-- this one does work if i leave the XHibernation-xdoclets argument out
<java classname="com.sun.tools.xjc.Driver">
<arg line="-dtd"/>
<arg file="xml_schema_project.dtd"/>
<arg line="-xjs"/>
<arg file="xml_schema_project.xjs"/>
<arg line="-Xhibernate-xdoclets"/>
<classpath>
<pathelement location="." />
<pathelement location="/opt/jars/ant.jar" />
<pathelement location="/opt/jars/hyperjaxb.jar" />
<pathelement location="/opt/jars/jaxb-xjc.jar" />
<pathelement location="/opt/jars/xsdlib.jar" />
<pathelement location="/opt/jars/dom4j.jar" />
<pathelement location="/opt/jars/sax.jar" />
<pathelement location="/opt/jars/xercesImpl.jar" />
</classpath>
</java>-->
</target>
</project>
19 years ago
rakhi,

like said in the above jsp pages are generated servlets, so once generated there is no difference...
You wan't performane incof? well the first time a jsp is loaded it will be (re)compiled (if changed), that does take a sec or so, depending on the complexity. also the jsp lest you change a page without the server being reloaded immediatelly. Servlet changes need a serverreload thus as in development sometimes a burden.
But servlets can be loaded at server startup time, jsp can depending on whitch servers (precompiling) but isn't always available, or descent.
I wouldn't suggest to state that once running jsp/servlets have big differences.
greetings,
20 years ago
JSP
hi all,

I use eclipe 3.0M4, myeclipse 3.6.4, tomcat 5.0.16, j2sdk1.4.1_05
When i have a jsp file that is called directly from the adressbar (in mozilla, ie etc) the debugging options do work, and i can step through my jsp page the way i want.
when i call the page by an action (like login.do) the debbug won't work even when it is the same page.
Does anyone have the same problem, and perhaps knows the solution?
thank you all
20 years ago
I'm already using multiple tables for multiple data fields...
but it's proper to set up a table for each row...
don't know why that should change things
20 years ago
JSP
hi all
when construction my page (from xml data), my page stops in the middle of the build...
in the mids of a table or something...
I can't figure it out, my server timeout is set to 30 mins so that isn't the problem normally...
i do an response.flushBuffer() each row i create...
i've tried to set the autoFlush to off and flushing the outputstream myself...

Please help i can't find how to solve it!
greetings
Jochen
20 years ago
JSP
how did you fix it?
20 years ago
found it myself...
<xtags:valueOf select="/Source/@Source_CD" context="<%=jochen%>"/>
works thnx neway..
i've been searchin for this for an hour bad day today
20 years ago
Hi all,
In my jsp i parse 2 streams like this:

but when i want to do a

i don't get a result.
i tried it with this

but that doesn't work neither... How can i get a Attribute from an element now?
I need to have them parses both!
greetings and thank
20 years ago
nice workaround, hmm might come in handy, thanks for sharing
20 years ago
Hi all,

my mappings are like this:
[code]<action path="/order" type="OrderAction">
<forward name="orders" path="/orders/orders.jsp"/>
<forward name="detail" path="/orders/detail.jsp"/>
<forward name="form" path="/orders/placeorder.jsp"/>
<forward name="emptyform" path="/orders/placeorder.jsp?empty=true"/>
<forward name="place" path="/orders/confirm.jsp?response=ok"/>
<forward name="cancelled" path="/orders/cancelled.jsp"/>[code]
as you see the paths are hard coded...
is there a possibility to add somepthing in front of the path dynamicly? like user1 has /user1/<actionpath> and user2 has /user2/<actionpath> ???
i have absolutely no clue how to acchieve this... please advice...
20 years ago
cj jack,
yes this is how i do it right know but i find it very unclean to do that for each image and url..
i was hoping there is a cleaner way of doing but then again this isn't on jsp/servlet level anymore but on serverlevel...
thx for the input
20 years ago
JSP
Dear,

The getRealPath(String path) just returns the complete path... if the file is there or not.
I really need to check if the file is there...
If not i need to know it as quickely as possible...
thx..
20 years ago
JSP