Win a copy of Head First Android this week in the Android forum!

Peter van Nes

Greenhorn
+ Follow
since Jun 09, 2010
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
2
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Peter van Nes

Hi Tim,

Thanks, outputLink was what i was looking for.
Sorry for the XML screw-ups, those ended up here because i could not use the exact examples as i am using in our environment.

Cheers,
Peter
7 years ago
JSF
Hi,

Can somebody explain me why when i use the following outputText tag


The generated HTML is


And when i use the next outputText tag the output is enclosed in quotes



To temporarily fix something i need to generate an html tag using a param value. Here an example


Cheers,
Peter

7 years ago
JSF
Thanks!
It's quite hard to cast an array to a single object :-)

Cheers,
Peter
7 years ago
I am trying to implement an MXBean which returns a List of Beans.

MXBean

MBean



When i try to get the attribute



It fails with a ClassCastException.

<Sep 26, 2014 11:18:32 PM CEST> <Error> <com.reddipped.sysstats.model.SystemInfoCollector> <BEA-000000> <null
java.lang.ClassCastException: [Ljavax.management.openmbean.CompositeData; cannot be cast to javax.management.openmbean.CompositeData
at com.reddipped.sysstats.model.SystemInfoCollector.run(SystemInfoCollector.java:81)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:304)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:178)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
Truncated. see log file for complete stacktrace

Anyone able to help me out how to retrieve the mbean as an MXBean attribute ?

Cheers,
Peter
7 years ago
Were able to resolve this issue by adding the listener-uri. Although the class is available in the default package it must be explicitly added to the listener element.

7 years ago
When i try to deploy an (Netbeans) enterprise application which includes an web application project (war) and an java application (jar)
On deployment i get a `weblogic.management.DeploymentException: classloader-structure element in weblogic-application.xml is referencing the module-uri SysStatsMBean.jar which does not exist in this application`

When built, the ear file now has the following structure.



Weblogic-application.xml contains





Anyone able to give me a hint how to resolve this ?

Cheers,
Peter
7 years ago
I om fairly new to spring and am now trying to develop a simple webshop demo application in spring3.
In the application i have defined an ArticleBean with the necessary getters and setters ( articleNumber , articleName, articleDescription , articlePrice , articleCategory ).
An OrderlineBean contains the attributes quantity (Integer) and article (ArticleBean)
A Cart has the attribute orderlines of type HashMap<String,OrderlineBean>()

The following part of the jsp results in a correct rendered form. e.g. the article data is correctly shown.



When posting the form, the number of orderlines in attribute subStock is 0 when processed by ModelAndView updateCart in the controller.



Can anyone any help to get me in the right direction?

Cheers,
Peter


update May 22th 2014 22:34

I have simplyfied the jsp form, still the same results though...

7 years ago
Hi,

I want to make a small jar available to the public, including the sourcecode.
This jar uses jchardet made available under the Mozilla Public License 1.1 (MPL 1.1).
What is needed if i want to include the jchardet.jar in my own jar without compromising the MPL ?
I have tried to understand all the legal chitchat, but am not able to conclude what is sufficient.

Is it sufficient to include the distributed jchardet.jar and include my own sources in the jar ?

Cheers Peter



8 years ago

Just forget this question of me. Assumed (…) that the AbstractHandler was calling the servlet.
Now created a handlerCollection with a ServletContextHandler and a ContextHandler.

Cheers,
Peter
8 years ago
Hi,

I am current developing a small servlet based on Jetty 8. In this j2ee application i want to filter the request parameters and do specific actions on them.
Currently i have an abstractHandler assigned to the server which works fine, the only thing i do not known how to write is to forward the request to the servlet.


8 years ago
Hi Bear,

I can add a bean to the ServletContextHandler to which a new servlet is added.



Now i want to access the bean added to the ServletContextHandler from the servlet.
I tried to access it through the servlet context from within the servlet.





8 years ago
Hi,

I am trying a simple servlet based on Jetty 8. In the main class where i create the server instance and add the servlet i want to fill and add a bean with configuration data which is read and stored in the bean at startup.

The bean is added using the addBean method of context.




Is it possible to access the bean from within the servlet ? I can get the ServletContext but have not found any clue how to retrieve the bean added to the context from within the servlet.



Any hints / Tips ?
Cheers,
Peter
8 years ago
Thanks James !

You were absolutely correct. Somewhere in a method i did put the byte array in a String, after fixing this it works perfect even on windows ;-)

Cheers Peter
11 years ago
@Paul Clapham, The difference is that the mime-encoded attachment is not readable (corrupt) when sending it from the Windows server. Difference in line-endings do indeed not matter when the body part is of content type text, but when the content type is application/pdf it does make a difference

@Rob Prime, Yes they are exactly the same. The PDFs in the example do come from the same database. The invoices also can be viewed in a webpage and are therefore also encoded in Base64 and added to a data url. On both systems the pdfs can be viewed in the webpage. So i suspect that the base64 encoding in the javax.mail api is influenced by the line-ending characters on both systems. But when using org.apache.catalina.util.Base64 encoding is done correctly. Is there a way to enforce javax.mail to use this class for base64 encoding ?

Cheers
Peter
11 years ago
Nobody any suggestions, .... just a small hint... ?

11 years ago