It does not include context name. Actually the URL is hidden because of the usage of frames. So in otherwords user will never see the exact path of the URL where the addUser.htm sits.
Main Topics
Browse All TopicsWhy dwr cannot find util.js, my Ajax class and interface.js ?. Actually it works fine in my local enviorment but when i deployed the app in our dev box (Which uses an IP address as a URL) it does not recognize anything.
For local machine i did this and worked like a charm.
/projectname/dwr/interface
/projectname/dwr/util.js
But when i am deploying it in the test enviorment it does not work. Anyhow i tried this also but still no luck
<% String base = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() ;
%>
and i did this :-
<script type="text/javascript" src='<%=base%>/dwr/interfa
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Exactly that is the whole point. How can i get the util.js, engine.js file ?. When i tested the app in my local machine i never had those files. As mentioned in the docs i just did :-
/projectname/dwr/util.js
and it worked fine. I extracted the dwr.jar file tryng to find those 2 files but unfortunately could'nt find those.
Thanks for your answers. I downloaded the DWR 1.0 war file from :-
http://directwebremoting.o
Extracted in eclipse and still not able to find the util.js or interface in the dwr package. It's very wiered that JS error on my application is that it cannot find my USER class where i already have specified in dwr.xml and applicationContext.xml for calling my service layer.
We are using SUn Solaris. This is the path where we deploy our application (WAR file).
/home/usr/appartment.web.c
Under document foler i extracted the Appartment.WAR. So now i have all the contents of my Appartment WAR file which contains WEB-INF folder, jsp packages, etc.
Under /home/usr/appartment.web.c
i have my applicationContext.xml and my *servlet.xml and dwr.xml. This is how my dwr.xml looks like :-
dwr.xml
<!DOCTYPE dwr PUBLIC
"-//GetAhead Limited//DTD Direct Web Remoting 1.0//EN"
"http://www.getahead.ltd.u
<dwr>
<allow>
<create creator="spring" javascript="USER">
<param name="beanName" value="userHandler"></param>
</create>
</allow>
</dwr>
This is the refrence to my applicationContext.xml
<bean id="userService" class="user.service.impl.U
<property name="userDao"><ref local="userDao"/></property>
</bean>
<bean id="userHandler" class="user.controller.USE
<property name="userService"> <ref local="userService"/></prope
</bean>
<bean id="userDao" class="user.dao.impl.UserD
<property name="dataSource"><ref bean="dataSource"/></propert
</bean>
As per you i created a seperated folder dwr under :-
/home/usr/appartment.web.c
and extracted the contents of the dwr.war file in
/home/usr/appartment.web.c
This is what i have in my addUser.jsp
<script type="text/javascript" src="<%= basePath %>/dwr/interface/USER.js"></s
<script type="text/javascript" src="<%= basePath %>/dwr/engine.js"></script>
.
I get an error stating that dwr.invoker.servlet cannot find a class by the name of USER.
I found the problem. Actually the problem lies that i did not had the dwr.xml path in the config parameter in web.xml. After adding the config path to my dwr.xml and setting the load-on-startup everything work great. There is no need of deploying the DWR package or anything like that.
That iswhy you had the dwr.jar file to take care of it instead of unzipping it. Hope this helps other people. Thanks for your support,
Business Accounts
Answer for Membership
by: objectsPosted on 2009-07-14 at 18:35:18ID: 24855573
whats the url of the page? Does it include context name?