Kees van Oosterhout

Ranch Hand
+ Follow
since Jul 08, 2002
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Kees van Oosterhout

Gents,

For my application I need to read and write CSV files in my business layer. I'm aware of not using the IO package in EJB (3). Is there any good (Open-Source) Resource Adapter for JBoss 4.2GA which i can use to accomplish this?

Thanks in advance,

KvO
I am also very interested in any info 'bout the 340 exam....
21 years ago
Franz, have you solved the problem yet?
Why not try both? Thus, a log4j lib for the shared libs and log4j libs for each of the webapps
Hope it helps.....
I have too made the choice between Log4j and the Logging API. I have chosen Log4j because,
- Many of the systems are using JDK 1.3.1 or less
- Log4j offers a lot more functionality
- The configuration can be done by a xml file, which is a standard
Yes, I do. I have IE6, the english version.
My file:
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
<log4j:configuration xmlns:log4j='http://jakarta.apache.org/log4j/'>
<appender name="INFO" class="org.apache.log4j.RollingFileAppender">
<param name="File" value="c:/logs/ecd/ecd_info.log" />
<param name="MaxFileSize" value="10240KB"/>
<param name="MaxBackupIndex" value="10" />
<param name="Append" value="true" />
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="%d{yyyyMMdd HH:mm:ss} %-5p [%x] - %m%n"/>
<!--<param name="ConversionPattern" value="%d{yyyyMMdd HH:mm:ss} %-5p [%x] %C{1}.%M(%L) - %m%n"/> -->
</layout>
</appender>
<appender name="STDOUT" class="org.apache.log4j.ConsoleAppender">
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="%d{yyyyMMdd hh:mm:ss} %-5p [%x] %M(%C{1}:%L) - %m%n"/>
</layout>
</appender>
<root>
<priority value ="WARN" />
<appender-ref ref="INFO" />
</root>
</log4j:configuration>
Hope it helps...
There is one thing. Be sure to place the .dtd file in the exactly the same directory as the config file and not in a subdirectory like 'org.apache....'. If it is, i can't help you...
(Try to download latest version of log4j. It is backwards compatible.... )
Ok. We all know Log4j, but besides this open source product, are the any other log component which can be compared? And which one do you think is the best?
Have you tried placing the .dtd file in the same dir as your .xml file?
I think a servlet should not maintain any state. Who knows how many instances of your servlet are in the container. Try to store your connection in the servlet context. I think this will work fine. You can recall the connection in the doGet() method. Just to be shure, you can display the connection just after creating it.....
Hope it helps....
22 years ago
No, no, no. !!
A DBConnection should not be placed in the session object. Placing this in the context is definitly the way to go. The DBConnection will be accesible by all servlets in all requests. Off course the results returned from the connection can be placed in a session, wether or not in a self-defined data structure.
Browse in the J2EE Api to find more information about the context, for a quick solution.
22 years ago
The objects have to be serialized when a session is migrating to another VM, i think. Or maybe it is a low memory issue. Check if your web.xml has the <distributable/> tag. If it does, remove it and try again.
Hope it helps.....
22 years ago
Steven,
Is your browser supporting cookies? And if it doesn't, does your web containter use URL rewriting? It needes at least one of these methods to support session on HTTP.
22 years ago
Off course, you can have more influence on efficiency writing servlets. But when you enter a web application project which requires (or ever will require) several disciplines, writing servlets for HTML is not the way to go. A (HTML/Javascript) web designer will probably have no idea what to do.
Furthermore, when you are writing complex HTML (with javascript, stylesheets, events and using DHTML) a JSP will give you a much better view on the output of you application.
For understanding JSP pages you need to know:
- directives
- declarations
- expressions
- scriplets
And the objects:
- request
- session
- application
There is more, but this will take you a lot further.....
Hope it helps
22 years ago