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

Ping Li

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

Recent posts by Ping Li

Ping Li wrote:Dear friends,

I am looking for some help on doing URL rewriting on website URL running on weblogic server.

I've developed a web application called 'Shopping' running on a weblogic server, let's assume its URL is http://webapphost:7001/Shopping, but we are going to use a virtual URL http://www.mycompany.net/Customer, then rewrite the URL to existing http://webapphost:xxxxx//Shopping?app=Customer.

Does anyone can help me to figure out how to direct http://www.mycompany.net/Customer
to
existing web application instance at http://webapphost:xxxxx/Shopping?app=Customer

I know that we can set up virtual host using weblogic console, can we do the same thing for virtual URL?

Thank you for your help!

12 years ago
Dear friends,

I am looking for some help on doing URL rewriting on website URL running on weblogic server.

I've developed a web application called 'Shopping' running on a weblogic server, let's assume its URL is http://webapphost:7001/Shopping, but we are going to use a virtual URL http://www.mycompany.net/Customer, then rewrite the URL to existing http://webapphost:xxxxx//Shopping?app=Customer.
Does anyone can help me to figure out how to direct http://www.mycompany.net/Customer
to
existing web application instance at http://webapphost:xxxxx/Shopping?app=Customer

I know that we can set up virtual host using weblogic console, can we do the same thing for virtual URL?

Thank you for your help!
12 years ago
Issue solved.

Based on my research and online information, it’s mostly like an IE bug. IE browser abruptly drops the existing connection to the server and immediately requests the same page again. In my jsp file, submit action is emitted from JavaScript function, this implementation somehow triggers IE bug. So I removed submit() call from javascript function, instead, submit() is called from submit button's onClick="....; submit();...", after that, the duplicated submission problem disappeared.

Here is code after modification:

<INPUT TYPE=image SRC="...BtnLogin.gif" onClick="return verifyTerms(); submit(); this.disabled=’true’; " onMouseOver="this.src='...BtnLogin_mo.gif'" onMouseOut="this.src='...BtnLogin.gif'" />

12 years ago
Additional information, the javascript function the form used is:

<SCRIPT LANGUAGE="JavaScript1.1" >
function verifyTerms()
{
if ( ....)
{
alert("The terms and conditions\nmust be accepted to login.");
return false;
}
document.forms[0].submit();
return true;
}
</SCRIPT>
12 years ago
Dear JavaRancher:

I have a login jsp page that logs user’s login history in the database, I just found out that there is duplicated logging information inserted in the database with a single login action. It happens randomly when using IE (version 6).

Every time when a double logging happens, it is always associated a server (weblogic 6) side exception: "javax.servlet.jsp.JspException: Connection reset by peer: socket write error". I debugged into the service (strut action source code) and found that the same request has been submitted to the service twice. It seems that IE browser abruptly drops the existing connection to the server and immediately requests the same page again (in this case, IE send duplicated login request to the server).

The duplicated request issue does not happen when using Firefox.

I don’t know how to fix the problem , your help is highly appreciated.

By the way I am using struts1.1:

The jsp form used is something similar like this:

<html:form action="/login/login.do" focus="accountNumber" >
<html:text property="accountNumber" maxlength="50" title="accountNumber"/>
...

<INPUT TYPE=image SRC="BtnLogin.gif" onClick="return verifyTerms(); " onMouseOver="this.src='BtnLogin_mo.gif'" onMouseOut="this.src='BtnLogin.gif'" />
</html:form>
12 years ago
When I first saw the email about this JavaRanch promotion, I didn�t pay much attention because I didn�t expect �code craft� would be so good until I read its reader�s reviews. Now I definitely want to get this book no matter I bought it or get it for free. I am sure it will certainly help me to write excellent code. Thank you, Peter!

One of mine friend once told me: "Software engineering is, after all, just like crafting a pieces of art", do you agree?
Dear All,

In axis, there is an RPCElement class can be used to pull out SOAP input object�s information, but in axis2, it seems that RPCElement can not be used anymore. Question is which class in axis2 can be used as substitute for RPCElement. I found �RPCRequestElement� and �RPCRespondElement� classes in axis2 web site, but not sure they are the right answer, if yes, which axis2 jar they belong to?

Is any example there for how to use axis2 classes such as RPCRequestElement?

Any help is highly appreciated!
15 years ago
Thanks a lot. It helps!
15 years ago
Dear All

I wondered whether someone could lead me to a good tuturial or some sample
code.

I'm trying to write some web services using the eclipse platform and wtp
tools.

I need the client web service to create a SOAP header - from my server-side
web service, when i create the methods and the wsdl file, how do i tell the
client it must create a SOAP header.

Is any other web service test tool there which can allow me edit SOAP header on client side?

Thanks for any help
15 years ago
Hi,

I am writing an authentication module which needs remote host address to do the job. the class which extends AbstractHandler, I tried to get remote host address in the function "invoke" by using MessageContext.getProperty(MessageContext.REMOTE_ADDR) function, but it returns null.

(I am using axis2 framework)

Any ideas? Your help is highly appreciated.

Thanks,
15 years ago
It took me about 3 months to get ready. I didn't have much time to study, but I tried my best to study it one hour a day.
15 years ago
I passed SCWCD this past Saturday at 84%. I used HFSJ book and did three mock exams from whizlabs simulator (My scores on whizlabs are very close the the real exam).

Dear JavaRanch friends, thank you!
15 years ago
Thank you all for replying my question. I passed SCWCD this past Saturday at 84%. From my experience HFSJ is enough for passing the exam. I also did some mock exams from whizlabs simulator (My scores on whizlabs are very close the the real exam).

Thanks,
Hi, Here is my question found in Whizlabs Exam Simulator:

Which of the following JSTL fragment will not delete the "empName" attribute from "session" scope? Select one choice.
a. <c:remove name="empName"/>
b. <c:set var="empName" scope="session" value=""/>
c. <c:remove scope="session" name="empName"/>
d. both a and b
e. None of the above

I think the answer is a and c. Because <c:set> syntax is
<c:remove var="varName" [scope="{page|request|session|application}]/>
not <c:remove name="..." ..../>


But when I checked answer, it shows e. Can anybody help me figure it out? Thanks.
Hi, Santana

I took jq during in my final days of the test. Since jq guaranteed that if you, the user, get more than 61% on these tests, you will pass the real exam. So I only took the first 7 tests. In my point of view, some jq questions are kind of subtle or tough, but real one just tests your fundamental Java knowledge stated in SCJP1.4 Testing Objectives, so it�s easier to catch the answers than jq.

But jq is still a valuable tool to sharp up your test skills.

Good luck!
16 years ago