• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
  • Piet Souris
  • salvin francis
  • fred rosenberger


Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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

Ranch Hand
Posts: 259
ka durgesh
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 dwrtest.java 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.
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
Not looking good. I think this might be the end. Wait! Is that a tiny ad?
Devious Experiments for a Truly Passive Greenhouse!
    Bookmark Topic Watch Topic
  • New Topic