Adrien Ruffie

Ranch Hand
+ Follow
since Jan 14, 2009
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 Adrien Ruffie

Hello All,

I have the following code snippet:
JSONObject is a org.json.JSONObject (I can't use GSON)

But when I recover the  dcDataAsJSONObject.get(keyName); with keyName = Phone
I recover a Integer with 673138793
I need to recover my phone as a String with "0673138793"  ...
Do you know a means to do that ?

Best regarde Adrian
6 years ago
Thank its perfect ! But do you know the same thing for javascript libraries in the webapp which aren't managed by maven ?
8 years ago
Hello all,

I have a web app which use several librairies like, solr, hornetq, guava ...
I use maven and jenkins also. But about 3 years, all our libraries are out of date. I search a means which allowing to be aware about a new lib version. Example, when Solr publish a new version about their library, keeps us informed.
Do you know a maven, jenkins, webapp, means ... which allow to be aware about new available lib version ?

thank you very much.

Best regards,

Adrien
8 years ago
Hello all,

I have a small question, do you know a means to force a cllassloader (in a webapp), to load jars in a specific directory, but be sure that the version of the used classes in the jvm or those in these jars and not (the same class) in the webapp or in the container ?

Do you know what I mean ?
I have one class com.myapp.MyClass in
- my webcontainer
- under WEB-INF classes of my webapp
- and one in /opt/addons/

How I can be sure the class will be loaded and used at the runtime in my webapp jvm, will be classlocated into /opt/addons/ directory ?

I try to do more at this mechanism directly in the web app instead directly using the container (in order to abstract the type / version of container)

I want only one mechanism (not one specific for tomcat/jboss/websphere ...)

I have read several solution with classloader/urlclassloader but i'm not sure, that can override container classloader

Thank all and best regards,

Adrien
9 years ago
The problem is somebody else's server aren't enough competent to check the problem ... I think Tomcat chunck the request 4k by 4k and when the first 4k frame/weft was recevieded,
I think a response of the first received frame/weft was sent but not received by my first webapp where the sending beging ...

Do you think I'm right ?
Do you have an idea if tomcat can limite the size ? Because the send of my file is correctly launch like:

with restlet:

System.out.println("Begin sending");
resource.post(entity);
System.out.println("Ending sending");

But the "Ending sending" is not logged, and on my server I check the file and the size is only just of 4ko ... instead 54ko

Tomcat can break the uploading to 4ko ?
Hello all,

I try to my webapp to transfer a file over a remote server, but I get the following error:

org.restlet.resource.ResourceException: Request Entity Too Large
at org.restlet.resource.ClientResource.handle(ClientResource.java:858) ~[org.restlet-2.0.8.jar:na]
at org.restlet.resource.ClientResource.post(ClientResource.java:1197) ~[org.restlet-2.0.8.jar:na]




I use restlet but I investigate the problem and it seems to be due to the following problem:

10.4.14 413 Request Entity Too Large

The server is refusing to process a request because the request entity is larger than the server is willing or able to process. The server MAY close the connection to prevent the client from continuing the request.

If the condition is temporary, the server SHOULD include a Retry- After header field to indicate that it is temporary and after what time the client MAY try again.

Any one have an idea of the problem ?

Great thank and best regards

Adrien Ruffié
Hi all,

I have a small problem and I don't know where I can fix it.

In one jsp page, I submit a form with a message body with following html code (which is store in "MsgBody" in my request)



But when I submit my form, I received in my servlet a parameter "MsgBody" without several tag like <html>/<body> ... do you know this behavior, by default tag are delete ?



I use Tomcat 7, maybe a tomcat behavior can influence for this tag loose in request param ?

Thank and best regards
10 years ago
Hello all,

I have my webapp projet in Eclipse which compile correctly but when I try to perform "mvn clean compile", several following logs appears:

[ERROR] \Java\Workspaces\Indigo\mycompanycrm4\mycompany-webapp\src\main\java\com\mycompany\frontline\display\render\custom\ImageHandleBarRenderBoolCustom.java:[16,95] type parameter com.mycompany.frontline.property.display.valuable.bean.BooleanMonoValueBean is not within its bound

My class implements correctly generic, inteface, inheritance tree ... the application work correctly in my tomcat launched by Eclipse, but when I try to package it the compiler block ...
I'm not able to change the code, do you know a solution to force Maven to compile correctly ? Have you ever faced the problem ?

I can't attach the log file due to an uploading problem "Files with the extension .log are not allowed as attachment in the message" (same error with .txt extension). Bellow the traces:



Thank you very much

Best regards,

Adrien
10 years ago
Hello All I have a small problem with DecimalFormat,

I have the following code:



But the problem is that, in database I have following value: 1 000 100 003 840 , and I need to print it like : 1 000 100 003 840 €, but the "value" is a BigDecimal and print like "1.0001E+12" and after the decimalFormat.format(value) I get following result "1 000 100 000 000,00" , do you know my problem, I loose 3 840 € ...

The format variable is the following string "###,##0.00"

Do you know a solution to this problem ?

Great thank and best regards,

Adryen
10 years ago
ok this is what I thought.

I a good solution for me very thank all :-)
10 years ago
Ok sorry for the problem

A very good classe example, it work very well, but just a question why I can replace %%token%% by $$Token$$ ?
It give me an array bound exception, '$' charater is special in regex ?

10 years ago
Great thank, it work correctly :-)

But I'am interesting by your advices:

And even if it's so, there is still a lot you can take from Steve's advice:
break down the string into simple patterns to perform the individual pieces of the process.
concatenate them together - maybe surrounded by brackets to create groups - to get your full regex.

but isn't the solution you give me in the last code snippet ?

Because I think it done correctly my needs:
1] check if subject like maybe one provided
2] If subject as maybe same, extract the token
10 years ago
Yes I forgotten this line ...

Example I have following code:


And finnaly I need to extract "AX3Q1XV3" of the first string but only if the subject contains following 2 parts: "[ref demande : " and "]"
10 years ago
Yes good idea I haven't correctly understand thank you, but another problem can appears ... for example:



Doesn't work because the regular expression take in account that the last part is the closed bracket ...
10 years ago