Cindy Jones

Ranch Hand
+ Follow
since Oct 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 Cindy Jones

Hi

WelcomeProcessor is creating a new instance of hibernateClass. Since hibernateClass is using the Session class, welcomeprocessor is indirectly dependent on Session. Include the hibernate jar in your war file.

Thanks!

Thanks Peter.
15 years ago
Hi,

I am trying to improve the performance of my JBOSS app server and this link got me started:
http://www.jboss.org/community/wiki/jbossastuningsliming

I started with slimming down the server (remove services/libraries that are not being used) and this does not seem to have any negative impact on my application
However I am looking for the following information:
Has anyone done this in production? Is this the best approach? Also, would you recommend building up from the "minimal" folder instead of removing stuff from the default folder? What are my alternatives?

Thanks in advance!
15 years ago
I have a war file with a number of jar files and the deployment on a remote server is taking a long time. One work around that I thought of is having the jar files that are used in the war to be copied over to the jboss/$server/lib folder. Is this a good approach? What are my alternatives?
This seems to work as expected except for my struts jar which the application still expects within web-inf/lib; throwing an exception as below if it is not:
The absolute uri: http://jakarta.apache.org/struts/tags-html cannot be resolved in either web.xml or the jar files deployed with this application

Thanks!
15 years ago
I am getting the following exception when trying to load an image:
sun.awt.image.ImageFormatException: Unsupported color conversion request
at sun.awt.image.JPEGImageDecoder.readImage(Native Method)
at sun.awt.image.JPEGImageDecoder.produceImage(JPEGImageDecoder.java:119)
at sun.awt.image.InputStreamImageSource.doFetch(InputStreamImageSource.java:246)
at sun.awt.image.ImageFetcher.fetchloop(ImageFetcher.java:172)
at sun.awt.image.ImageFetcher.run(ImageFetcher.java:136)
On googling, I found that this is because the color model is CMYK and not RGB. Has anyone faced this before? One option here(https://coderanch.com/t/339188/Swing-AWT-SWT-JFace/java/Unsupported-Color-Conversion-Request) is to edit this in photoshop to use RGB model. Does anyone else have anything else that I can try ?

Thanks!
15 years ago
On reading up on java UUID I read that chances of a duplicate occurring are so slim that it can be ignored.
Is it sufficient to call the method UUID.randomUUID to get a unique Id? I have 2 load balanced servers on which my application will be running.

Thanks
15 years ago

Thanks for the tip - let me try and figure out if thats what I need.

15 years ago
I need to generate a unique id in my system that cannot be guessed by anyone. Is the following logic good enough? After generating the id I will also be hashing this number using SHA1.

public String genarateUId(){
Calendar cal = Calendar.getInstance();
String myId=""+cal.get(Calendar.DATE)+ cal.get(Calendar.MONTH) + cal.get(Calendar.YEAR)+System.currentTimeMillis();
Random randomGenerator=new Random();
int randomInt = randomGenerator.nextInt(10000);
myId=randomInt+myId;
System.out.println(myId);
return myId;
}

Is there a better alternative?

Thanks in advance!
15 years ago
How about using Apache CXF? Someone recommended this as an alternate solution.
15 years ago
I need to expose a functionality as a restful service as well as provide a SOAP interface.
I have implemented rest using JBOSS resteasy .
The rest service exposed is test which was implemented as below to support form and xml requests.


What is the best way to expose the test method as a SOAP service? I have implemented this as an Axis service by defining a method as below but is this the best approach?
Is there some functionality of rest easy that I can leverage to get this working?



Thanks in advance!
15 years ago
Thanks everyone!
JavaRanch rocks
15 years ago
JSP
15 years ago
Thanks, that worked! Here is a sample that helped me.

http://www.weberdev.com/get_example-4413.html
15 years ago
JSP
Sorry. The requirement is to send a header from a jsp to the server. The client is the jsp.

I have a java class that does a post to the server by creating an HttpURLConnection. Here I am able to
setRequestProperty("mynewheader","something") and retrieve the same using the @HeaderParam annotation.

I want the same behaviour when I use a jsp but I dont have a clue how to set mynewheader from within the jsp.

Thanks!
15 years ago
JSP
I have a requirement to send a new header parameter(like "mynewheader") to the client from a jsp page. How can this be achieved? The request object does not have the setHeader method and if I set it through the response object I am not able to get the value at the server.

Some more back ground to my problem:
The form submit invokes a rest service that tries to get the value using an @HeaderParam annotation.
This value is populated correctly if I attempt to post my request using an HttpURLConnection and set the new header value that I need to populate using the
setRequestProperty method.
I want to achieve the same result using a jsp

Thanks!




15 years ago
JSP