File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JSP and the fly likes JSP with DWR.XML Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "JSP with DWR.XML" Watch "JSP with DWR.XML" New topic


ka durgesh

Joined: Jul 19, 2006
Posts: 5
hi all

i am learning DWR.xml with jsp .can any body give me the sample examples and related tutorials on that.where do i get the correct info on that..?

thank you

karthikeyan Chockalingam
Ranch Hand

Joined: Sep 06, 2003
Posts: 259
May try this link

ka durgesh

Joined: Jul 19, 2006
Posts: 5
here i am sending my code i am working it in eclipse please loook at this and please tell me where error is

this is my dwrtest1.html page

<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
<script type="text/javascript"
src="jspproj2/dwr/interface/dwrtest.js"> </script>
<script type="text/javascript"
function uvalid()
return dwrtest.uValid(DWRUtil.getValue("username"),alert("hi this is digi"));
<script type="text/javascript"

<form action="dwrtest1.jsp" method="get">
<td> UserName: <input type="text" name="username" onchange ="uvalid();"></td>
<td> PassWord: <input type="password" name="password"></td>
<td> <input type="submit" name="submit" value="submit" >
<input type="reset" name="cancel" ></td>

and this is my dwrtest1.jsp page

String uname = request.getParameter("username");
String pwd = request.getParameter("password");
if (uname.equals(pwd))
out.print("wel come");
out.print("dont come"); %>

and this is my file

public class dwrtest {
public boolean uValid(String uname)

if (uname.equals(""))
return false;
return true;


this is my dwr.xml file

"-//GetAhead Limited//DTD Direct Web Remoting 1.0//EN"

<create creator="new" javascript="dwrtest">
<param name="uname" value="String"/>

this is web.xml file



in the code what i am doing is just validating the username field for notnull using dwr concept please can anybody tell me where i am doing the mistake.
Ben Souther

Joined: Dec 11, 2004
Posts: 13410

ka durgesh,
Javaranch tip:

If you are going to post more than a line or two of your code, wrap that
code in a set of UBB Code tags.
Doing so will help to preserve your code's indenting, making it easier to read.
If it is easier to read, more people will actaully read it and you will
stand a better chance of getting help with your question.
See UseCodeTags for more
help with UBB code tags.

Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
I agree. Here's the link:
subject: JSP with DWR.XML
It's not a secret anymore!