Win a copy of Spring in Action (5th edition) this week in the Spring forum!

Nicky Eng

Ranch Hand
+ Follow
since Mar 26, 2005
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
1
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Nicky Eng

I have this configuration in my bean.xml



I have a few services in com.example.engine.manager package:
DealManager
BookManager
TransManager

but I wanted to disable some service like DealManager and the rest of services will be still running.
Therefore I put this "exclude-filter" into bean.xml, but it doesn't work.

any wrong with my syntax (i ran it without error though) or any that I don't know?

I tried search with google but the results are not helpful.

Any master here can give me a clue ?

Thanks in advance.
Regards
6 years ago
I have one function to upload an image.

I need to save image into different domain.

So when client call my API, pass in the photo as multipart type, then I need to save it into different domain.

Does my code below Workable? I mean will it save into the stat.abc.com/userpt/ OR will hit error ?
Note: below piece of code running in app.abc.com domain. But both domains are in the same server.


please help


7 years ago
I have one issue which I don't understand why it cannot work.

I have a page first load data from Servlet and display in a table(inside div1). Inside the table each row I have link attached to data.

When I click on the link, the dialog (div2) is not showing up.

But if i put static data on the table and have link attached to data, i click then it works, my div2 is shown on the screen.

So am I missing something in JQuery?

Let's see my code:


Part 2:


I checked the page, it loaded with my data but from browser's page source, it doesn't have data from JQuery script at all....it just display something like this


maybe that is why the link is not working? because of the rendered html code ?
i'm lost....


please help.
Regards
Nick
I used .hide() and .show()...and it works.

Thanks a lot then.
I have a div element1

and inside I have a menu div and a content div, like this:



But I do also have another menu2 which is hidden and will be display when user select one of the menu item in "id=menu" Menu. In css, i put like this:


I want to replace id=menu with id=menu2 when user click item in id=menu, my jquery would be :


Surprisingly, the first time user click item in id=menu the id=menu2 appears and replaced id=menu.
But then try again 2nd time, it doesn't work. The id=menu2 is not appearing. Unless I refresh my page.

Am I doing anything wrong with my JQuery code ?

Please help...its urgent
Thanks
Dear all,


I tried to figure out how New York Times website done in HTML 5 display their content...but I googled fail.

If you try this : www.nytimes.com/chrome

You will see the main page (Main page in attachment)

So when you click the one of the article, this article will appears in new page with a "close" button on the top-left page ( can I say it as popup box ? ) which stay on top of the main page.

Here is my question: How to do that popup box thing when I click on the article or a link or a button in HTML 5?

Any idea ?
I have Spring in Action in pdf format.

But I find it difficult to understand as lacking of diagrams for demonstration of the concepts that being discussed throughout the book.
I fell to sleep during reading ><

any book else?

7 years ago
I have 2 web application and found one funny case which is in Admin the character display fine but it displays blank/question_mark for the character in User Web.

1 - Admin
2 - User Web

In Admin application, in web.xml encoding is iso-8859-1. and all the JSPs i put this tag:



In UserWeb app, in web.xml encoding is utf-8 and all the JSPs i put this tag:



So the case is, I have this character in DB --> ' (which is chr(146) - extended ascii character)
In admin it retrieve from DB and display the character correctly as in --> '
but it doesn't display correctly in UserWeb.

DB character set is US7ASCII

--------------------
Is above encoding part is the cause of the issue ?
If so, why UTF-8 character encoding cannot somehow accept extended ascii character like chr(146) ?

Anyone got idea ?
I've been stuck for the whole day ...


7 years ago
Many thanks to Srini here for your kind advice.

The main problem having the 'bad certificate' simply because of our provider did not import the certificate into the correct server, in this case is the test-server.

The problem is resolved after we had arranged meeting with their technical team.
I'm so happy that now its clear.



Still, many thanks to Srini. You have been very helpful here.

Regards
Nick
8 years ago
I have tried all steps already and i found out the exception is not just 'bad certificate' but also at the end of the stack trace, it said "java.lang.NullPointerException" as show below




what possible could caused this bad_certificate & NULL pointer Exception ?

the process of SSL handshake is this:
1. Server Hello
2. Client Hello
3. Certificate chain
4. found trusted certificate
5. Certificate request
6. Server Hello done.
7. Certificate chain
8. ClientKeyExchange, RSA PreMasterSecret, TLSv1 <-- finished
9. verify_data <-- this process hit error when it reach below process :




what else i can do ?
8 years ago
hi Srini,

Thank you so much for your posting.

I've skipped step 1 and 2 because I thought client certificate has been provided to us by our webservice provider(WSDL) for testing purpose. So there is no need to generate my own(i'm the client in this case) right?
If i generate my own, then what's the point of 'abctest.cer' certificate provided to me by webservice provider?


I can't change/know anything in the server side because i'm just a client who trying to call provider's webservice's function over HTTPS.
So, if the server insist want 2ways SSL, then in my program, there is no way to ignore/skip SSL authentication process......


Answer to your question:
2. My program (client program) use only plain java stand alone with axis.jar. I generated java source code from a WSDL file by using wsdltojava tool. and then i created a engine to call webservice function. Binding to wsdl is fine, but when my engine calling one of the function, it start doing ssl handshake process, and resulted the server (webservice provider) give me alert 'bad certificate'. No tomcat.


the link you posted earlier, i had read them all and i gained better knowledge on ceritificate but not with this 'bad certificate' error though.
So what's next shall i do ?
8 years ago
just to provide more details here:

I have java jre, I DO NOT have tomcat running.

Will the missing of tomcat resulting in 'bad certificate' error when using SOAP to call webservice over HTTPS ?

anyone help?
8 years ago
I have tried this:

Step 3:


So all certificate given by my provider, I already successfully imported into my java jre's cacerts. I run again my java program, it stuck again with this:




Since i already have imported server cert( abc.cer ), client cert(abctest.cer), and private key client cert(abctest.p12) into cacerts... How come I still can get "bad certificate" ?

Gosh
Already 1 week passed I still stuck with this issue.
8 years ago
may I start again from the beginning...

WebService provider gives me 3 certificates (testing purpose)
1. client testing certificate with private key: abctest.p12 (password: abctest)
2. client testing certificate with public key: abctest.cer
3. provider-server certificate with public key: abc.cer

----------------
Step 1:


I added abc.cer into my cacerts file by using following command:


Result: successfully added.



Step 2:


I add abctest.cer into my cacerts file by using following command:


Result: successfully added.



Step 3:


I add abctest.p12 into my cacerts file by using following command:




I do not understand, adding abctest.p12 into cacerts need an existing alias name ? Even if i pick one of the alias name, it would ask me to overwrite it..shall i overwrite it ? and which alias name shall i overwrite?

I'm confused. abctest.p12 comes with private key ---> is a cert chain ?

anyone help ?
8 years ago