| Author |
JSP with DWR.XML
|
ka durgesh
Greenhorn
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 durgesh
|
 |
karthikeyan Chockalingam
Ranch Hand
Joined: Sep 06, 2003
Posts: 259
|
|
May try this link http://getahead.ltd.uk/dwr/server/dwrxml
|
http://www.skillassert.com
|
 |
ka durgesh
Greenhorn
Joined: Jul 19, 2006
Posts: 5
|
|
hi 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 <html> <head> <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" src="jspproj2/dwr/engine.js"> function uvalid() { return dwrtest.uValid(DWRUtil.getValue("username"),alert("hi this is digi")); } </script> <script type="text/javascript" src="jspproj2/dwr/DWRUtil.js"></script> </head> <body> <form action="dwrtest1.jsp" method="get"> <table> <tr> <td> UserName: <input type="text" name="username" onchange ="uvalid();"></td> </tr> <tr> <td> PassWord: <input type="password" name="password"></td> </tr> <tr> <td> <input type="submit" name="submit" value="submit" > <input type="reset" name="cancel" ></td> </tr> </table> </form> </body> </html> and this is my dwrtest1.jsp page <% response.setContentType("text/html"); String uname = request.getParameter("username"); String pwd = request.getParameter("password"); if (uname.equals(pwd)) out.print("wel come"); else out.print("dont come"); %> and this is my dwrtest.java file public class dwrtest { public boolean uValid(String uname) { if (uname.equals("")) return false; else return true; } } this is my dwr.xml file <!DOCTYPE dwr PUBLIC "-//GetAhead Limited//DTD Direct Web Remoting 1.0//EN" "http://www.getahead.ltd.uk/dwr/dwr10.dtd"> <dwr> <allow> <create creator="new" javascript="dwrtest"> <param name="uname" value="String"/> </create> </allow> </dwr> this is web.xml file <servlet> <servlet-name>dwr-invoker</servlet-name> <servlet-class>uk.ltd.getahead.dwr.DWRServlet</servlet-class> <init-param> <param-name>debug</param-name> <param-value>true</param-value> </init-param> </servlet> <servlet-mapping> <servlet-name>dwr-invoker</servlet-name> <url-pattern>/dwr/*</url-pattern> </servlet-mapping> 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
Sheriff
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
|
 |
 |
|
|
subject: JSP with DWR.XML
|
|
|