Mikael Molin

Ranch Hand
+ Follow
since Jul 31, 2009
Sweden
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 Mikael Molin

I have 2 properties configured in 2 different ways and both work in a Controller when you get them by Applicationcontext and prints them to the console, but they don work on jsp page, anyone has any tips ?

messages.properties located in /WEB-INF/messages/


validation.properties located in src/main/resources/


mvc-dispatcher-servlet.xml


controller that works


jsp page that doesnt works only prints ???one???   ???two???


3 weeks ago
JSP
Yes i have a better blueprint and a valid schema here beside me.

I understand now and will use:

the code above will give me the output <ns:x>0</ns:x> and thats works fine, i didnt want it to be null and  jaxb not marshalling it.

Thanks for your answers.
Yes it is a typo / should not be there.

right now this code ggg that reference to the typer'GGG':
<xs:simpleType name="GGG">
   <xs:restriction base="xs:unsignedShort"/>
</xs:simpleType>

generates java:

but if i chande the simpleType 'GGG' to a xs:dedimal it makes the java code required. like this:
<xs:simpleType name="GGG">
   <xs:restriction base="xs:decimal"/>
</xs:simpleType>

generates java:


same goes for xs:string
so this is what makes me confused, just by changing the simpleType makes it required or not .
I was thinking that maybe this line at the beginning of the xsd has something to do with it, cause we are refering to Collectum and the might have restrictions but i am not sure.

i have an xsd with elements in it The only element i cant set to required is 'ggg' and its of a type xs:unsignedShort, the othere elemets work fine and the java code sets it to required=true, just this one is bothering me, any ideas

part of xsd:


part of the xsd type:
1 year ago
I have a Spring Rest api that gets this fault when fortify is scanning the application
Does anyone knows how to fix this ?
I have tried with @Valid on the object and springs HtmlUtils.

I have also added a filter CrossScriptingFilter in the web.xml which do works, but still fortify complains on this method.

heres the cosde

Rest


Here is the utils method


here is my dto

1 year ago
Iam getting this error message


I think it has something to do wit Optimistic lock, but what does it acctually mean ?.

I annotated the class with @Version  and letting the openjpa provider controll versions

/Mike
I have an Angular2 application +java in my IDE using subversion. The trunk works great when i do a maven install, i have created a branch but getting a build error. i know whats causing the problem but i dont understand why.

It's the package.json file, on the trunk it works if i set the aot flag to either true or false, but on the branch it only works if i set the flag to false, can anyone explain this please.

Here are the files, it should be no differens between the trunk and the branch but anyways and the package.json here is set to true, but must be set to false on the branch.

my pom.xml -trunk

my pom.xml branch


package.json
2 years ago
Yes thats it, missed it somehow but thank you very much
2 years ago
I am using postman to send some json data to my spring rest controller  to convert it to a java object but i am getting this error all the time, what am i doing wrong ? I just want to be able to send data that will be converted to java object,. For this i am using jackson-databind for the convertion.

pom.xml


REST controller:


json data payload in postman


TestDto  class
2 years ago
can someone please explain what this regex mean <xsd:pattern value="[\c ]{0,30}"/> ?

i want to allow comma aswell and came up with this regex <xs:pattern value="([a-zA-Z0-9, ])*"/> which works, but i want to doit with the \c thing.

/Mike
Can I run an application that was built with Java 1.7 on a system that has JRE 1.8 ?

/Mike
3 years ago
i have two input fields in my xhtml page, when i enter a value into the first one its ok but when i enter a value into the second field the first one gets deleted or erased instantly . This happens all the time. When i press my command button i of course want both values not only one.

3 years ago
JSF
In one part of my web app i have 4 entities that are linked to eachother by an arraylist, they are annotaded with @OneToMany and the fetchtype is default which is fetch=FetchType.LAZY.

My problem is that it takes to long to get all those entities that are linked in the chain, According to Spring they must be retrived in a transaction, thats fine but it takes to long so it will result in
a transaction rollback, the transaction timeout is set to 5 min and it is deployed o websphere. the guys that are in charge of websphere do not want to raise the transaction timeout due to other applications on the server and unnecessary use
of resources, also they dont know what effect it will have on other applications if raised. How can i solve this ?
3 years ago
How do you configure Spring JTA tranactionManager with Websphere to use Webspheres transactionsmanager and set the transaction timeout to whatever you like . Doing so by xml ?
4 years ago