This week's book giveaway is in the Spring forum.
We're giving away four copies of Spring Boot in Practice and have Somnath Musib on-line!
See this thread for details.
Win a copy of Spring Boot in Practice this week in the Spring forum!

Vins Ver

Greenhorn
+ Follow
since Oct 14, 2009
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 Vins Ver

Vins Ver wrote:Hello people,
Facing a problem while getting a message with Japanese text in it. Would give you a brief background.
1. Application Server migrated from 9i (jdk 1.3) to 10g (jdk 1.5)
2. MQ server upgrade from 5 to 7.0.1
3. AIX Server upgrade from Solaris 8 to Solaris 10.
Using the below mentioned method to get the MQ message. The japanese characters are got correctly in 9i version but they give junk values in 10g. The CCSID for MQ server is 943 (Shift_JIS).

Please suggest. Have a sneaky feeling this has something to do with different jdk versions(I may be very wrong) but cannot pin point the issue.

Thanks.


Also have tried quite a few charset values without success:

There is a difference in the junk characters being displayed with different charsets, thus may be it is a similar related issue. Any ideas?
12 years ago
guess not many are active so publishing this in General Java category too.

https://coderanch.com/t/483644/Java-General/java/getting-Junk-characters-Japanese-MQ

If anyone reads this.. please suggest.
12 years ago
Hello people,

Facing a problem while getting a message with Japanese text in it. Would give you a brief background.
1. Application Server migrated from 9i (jdk 1.3) to 10g (jdk 1.5)
2. AIX Server upgrade from Solaris 8 to Solaris 10.(Applications Server machine)
3. MQ server upgrade from 5 to 7.0.1


Using the below mentioned method to get the MQ message. The japanese characters are got correctly in 9i version but they give junk values in 10g. The CCSID for MQ server is 943 (Shift_JIS).



Please suggest. Have a sneaky feeling this has something to do with different jdk versions(I may be very wrong) but cannot pin point the issue.

Thanks.
12 years ago
Hello people,

Facing a problem while getting a message with Japanese text in it. Would give you a brief background.
1. Application Server migrated from 9i (jdk 1.3) to 10g (jdk 1.5)
2. MQ server upgrade from 5 to 7.0.1

Using the below mentioned method to get the MQ message. The japanese characters are got correctly in 9i version but they give junk values in 10g. The CCSID for MQ server is 943 (Shift_JIS).

public String syncMQGet(String pstrGetQueueName, int pintWaitInterval, String pstrCorrelId) {
String strCorrelId = pstrCorrelId;
try {
connectGetQueue(pstrGetQueueName);
oGetMsgOpt = new MQGetMessageOptions();
oGetMsgOpt.options = MQC.MQGMO_FAIL_IF_QUIESCING | MQC.MQGMO_WAIT;
oGetMsgOpt.matchOptions = MQC.MQMO_MATCH_CORREL_ID;
oGetMsgOpt.waitInterval=pintWaitInterval*1000;
oGetMessage = new MQMessage();
oGetMessage.correlationId=strCorrelId.getBytes();;
oGetQueue.get(oGetMessage,oGetMsgOpt);
byte bResponse[] = new byte[oGetMessage.getDataLength()];
oGetMessage.readFully(bResponse);
str_Message = new String(bResponse); // also tried as str_Message = new String(bResponse,"Shift_JIS") without success
bResponse = null;
} catch(MQException m) {
if(m.reasonCode == 2033){
} else {
}
} catch(Exception e) {
}
return str_Message;
}

Please suggest. Have a sneaky feeling this has something to do with different jdk versions(I may be very wrong) but cannot pin point the issue.

Thanks.
12 years ago
am able to redirect now to the https server with test SSL signature. made changes to the ssl.conf of the application server.... now have to test it for a valid digital signature.

cheers.
12 years ago
JSP
Any idea people?

Cheers..
Vins
12 years ago
JSP
I have an application running on 9i Application Server in HTTPS mode and working on migration to 10g Application Server.

The problem:

HTTPS has beeen configured on the 10g AS and a virtual host name (<VirtualHost-Name>). so when i access my application using a URL, https://<VirtualHost-Name>/login.jsp i can see the login page. On logging in the application uns perfectly fine. The application has few links. On clicking these links, the page is redirected to other jsps. This is done by using response.sendRedirect(/<context-name>/NextPage.jsp). Now once we have logged on, i can see the https URL in the address bar of IE. but once i click the link, it is redirected to http and the URL in IE address bar is http://<serverName>:<port>/<context-name>/NextPage.jsp. This redirection fails as a timeout. I cannot figure out why is the click on link redirecting to http URL with server-name and port. Some of the questions i have:

1. How can i make the page redirect to https. Also, the page should be redirected using the VirtualHost-Name.
2. Why is the <VirtualHost-Name> is being changed to <serverName:><port>

Thanks for help. Regards...
12 years ago
JSP
Regret Posting this in servlets section instead of JSP. Mods please delete this thread. creating a new thread in JSPs section. Thanks.

I have an application running on 9i Application Server in HTTPS mode and working on migration to 10g Application Server.

The problem:

HTTPS has beeen configured on the 10g AS and a virtual host name (<VirtualHost-Name>). so when i access my application using a URL, https://<VirtualHost-Name>/login.jsp i can see the login page. On logging in the application uns perfectly fine. The application has few links. On clicking these links, the page is redirected to other jsps. This is done by using response.sendRedirect(/<context-name>/NextPage.jsp). Now once we have logged on, i can see the https URL in the address bar of IE. but once i click the link, it is redirected to http and the URL in IE address bar is http://<serverName>:<port>/<context-name>/NextPage.jsp. This redirection fails as a timeout. I cannot figure out why is the click on link redirecting to http URL with server-name and port. Some of the questions i have:

1. How can i make the page redirect to https. Also, the page should be redirected using the VirtualHost-Name.
2. Why is the <VirtualHost-Name> is being changed to <serverName:><port>

Thanks for help. Regards...

12 years ago
Hi Paul,

Any pointers on how to achieve that?

Thanks.
Vins
12 years ago
Hi Yousuff,

web.xml URL-mapping would only be relevant after the web-context(URL mapping of the application and not the servlet). The web-context in this case is 'servlets'. The SERVLET URL mapping is done in web.xml thus i can access it with URL http://<serverName>:<port>/servlets/HelloWorld and not with URL http://<serverName>:<port>/servlet/HelloWorld .

Thus whatever servlet URL mapping i give in the web.xml it would come only after http://<serverName>:<port>/servlets/
e.g.: if i give servlet URL mapping as myFolder/HelloWorld then i can access HelloWorld by http://<serverName>:<port>/servlets/myFolder/HelloWorld

Regards,
Vins
12 years ago
Hi All...

i have come across a problem and inspite of going through a large amount of oracle documentation, am unable to come to a solution.

We have an 2 servlets in our application which is being accessed by external application via a URL. This access URLs cannot be changed in the external applications.

We are using Oracle 10g application server.

for eg.:
URL 1. http://<serverName>:<port>/servlets/HelloJava
URL 2. http://<serverName>:<port>/servlet/HelloWorld

Please note that one URL has context name as 'servlets' and other has it as 'servlet'.

Now when we deploy an application in Oracle 10g, it asks fr URL mapping. I provided this URL mapping as 'servlets' (i couldnt figure out any other way to avoid changing the URL being accessed.).

Thus now URL 1 is working fine, but URL 2 gives a 404(file not found) error, which is obvious as there is no application context as servlet. I can access HelloWorld Servlet using the URL http://<serverName>:<port>/servlets/HelloWorld , i.e. using 'servlets' and not 'servlet'.

Is there any way win which i can access HelloWorld by the URL 2.

Cheers..
Vins

12 years ago