For those who are developing applications that are under PCI scope, where the guidance suggests that you should store your application logs on another tier, remoting to a syslog server elsewhere feels like a best practice.
The question becomes, what should the PatternLayout look like that best enables folks to review their logs at least...
My first post, so go easy on me.
I'm looking for advice on organising and referencing third party jars for use in my j2ee web application. The jars I need to organise and reference are the JWSDP-2.0 JAXB api jars.
I'm using Eclipse and Tomcat 5.5. My web app exchanges XML with a web service, and therefore needs to do some XML marshall...
I'm involved in yet another application .
this time, it's about developing a J2ME application.
the mobile the application will run on is going to be connected to an electrical socket .
and whenever the mobile is unplugged (interruption of electrical energy supply in the battery), the application should detect it
and do some custom acti...
Hey all,
I'm trying to figure out the best way to install my Java app on client computers.
The main guideline here is that these clients are computer illiterates - so the less fuss the better.
I was thinking of using a model that would launch a Java Web Start app which would both take care of the registration and installation processes...
How can I get battery status through J2ME ?
...
Problem setting
Entities arrive for processing and are taken through a series of steps which operate on those entities and possibly on other, related, entities and generate some results;
Some of the entities are required to be processed in real-time, without any database access;
Currently the implementation simply looks up entities in ...
I want to create a JSON object. I have tried the following
myString=new JSONObject().put("JSON", sampleClass).toString();
but mystring gives me {"SampleClass@170f98"}.
I also tried the following
XStream xsStream=new XStream(new JsonHierarchicalStreamDriver());
SampleClass sampleClass=new SampleClass(userset.getId(),userset.getUser...
int iThreadCount = 1;
iThreadCount = GHMTreadUtil.getHygThreadCount();
arrHygThread = new Thread[iThreadCount];
for(int iCount=0;iCount<iThreadCount;iCount++)
{
LogMgr.logDebugInfo("spawning the HYG Thread"+iCount,objDebug);
Job1 objJob1=new Job1 ();
Job2 objJob2 =new Job2 ();
Thread objHygThread = new Thread(objJob1,ob...
I find the pack:tag very cool. It minifies javascripts, CSS and other stuff thereby reducing the network payload.
It works quite fine on Tomcat. But when I run it on Websphere AS 6.1, it does not work. There are no errors reported in the logs, but it simply does not work.
Anyone pointers/tips would be great.
...
Problem: I have a method that compiles to over 8000 bytes of Java bytecode. HotSpot has a magic limit that makes the JIT not kick in for methods that exceed 8000 bytes. (Yes, it is reasonable to have a huge method. This is a tokenizer loop.) The method is in a library and I don't want to require users of the library to have to configure ...
Are there any decent BitTorrent libraries for Java? I need to program a simple torrent client, but it would be great if I didn't have to write everything from scratch.
...
My HTMLUnit tests are failing, and I've got a feeling it's because I'm entering a password using the setValueAttribute() method and that for some reason doesn't work. Any ideas? Am I supposed to pass HTMLUnit the encrypted form of the password?
EDIT:
The code to set the pass:
loginForm.getInputByName("loginPassword").setValueAttribute...
I'm using FlatPack to parse and load data from flat files. This requires loading a config file that stores mappings of the columns of the flat file.
I have a constant to define the location of the mapping file:
private static final String MAPPING_FILE = "src/com/company/config/Maping.pzmap.xml";
I have a parse(File dataFile) method ...
Such as in PHP:
<?php
$a = 'hello';
$$a = 'world';
echo $hello;
// Prints out "world"
?>
I need to create an unknown number of HashMaps on the fly (which are each placed into an arraylist). Please say if there's an easier or more Java-centric way. Thanks.
...
Hello,
I've created a RESTful server app that sits and services requests at useful URLs such as www.site.com/get/someinfo. It's built in Spring.
However, these accesses are password protected. I'm now building a client app that will connect to this RESTful app and request data via a URL. How can I pass the credentials across? Currently...
Hi all,
I am using form based authentication with tomcat.
In a certain point in my site I allow the user to decide whether they want to add a role to their account. i.e. a user can decide to be an administrator as well. This request results in a new database entry. Now, in the site I show or hide certain links depending to what roles t...
I am looking for a way to achieve PreparedStatement caching, so as to save recreating the PreparedStatement objects for queries that were already executed in the past.
Is there some built in way to achieve this using Tomcat? Or must I program this cache myself?
...
Alrite, I am gonna jump straight to the code:
public interface Visitor {
public void visitInventory();
public void visitMaxCount();
public void visitCountry();
public void visitSomethingElse();
public void complete();
//the idea of this visitor is that when a validator would visit it, it would validate data
//when a persister visits i...
When I start tomcat 6 it freezes in certain point of the startup and stays there forever (I've waited 3 hours and nothing happened - not even an out of memory error). I don't have any clue of what could cause a behavior like that.
I'm runnig tomcat with Jira and Confluence, and the problem seem to be when tomcat tries to load confluence...
I'm currently using Apache Tomcat 5.5.16 to serve a Lucene-based search API.
Lately I've been having some NullPointerExceptions inside my servlet class. The class is called com.my_company.search.servlet.SearchServlet.
With certain types of input I can routinely create a NullPointerException, but I'm having trouble figuring out where e...