AJAX +DWR

I want to try one AJAX example with DWR, so I refered one tutorial and according to taht I have downloaded dwr.jar and placed it in web-inf/lib and created

[b]dwr.xml[/b]

[code] <!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="JDate">

<param name="class" value="java.util.Date"/>

</create>

<create creator="new" javascript="Demo">

<param name="class" value="your.java.Bean"/>

</create>

</allow>

</dwr>[ /code]

and my web.xml is

<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">

<web-app>

<servlet>

<servlet-name>guestDBServlet</servlet-name>

<servlet-class>guestDBServlet</servlet-class>

</servlet>

<servlet-mapping>

<servlet-name>guestDBServlet</servlet-name>

<url-pattern>/guestDBServlet</url-pattern>

</servlet-mapping>

<servlet>

<servlet-name>dwr-invoker</servlet-name>

<display-name>DWR Servlet</display-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>

<resource-ref>

<description>DB Connection</description>

<res-ref-name>jdbc/MySQL</res-ref-name>

<res-type>javax.sql.DataSource</res-type>

<res-auth>Container</res-auth>

</resource-ref>

</web-app>

Now the tutorial was saying got to

http://localhost:8080/[YOUR-WEBAPP]/dwr/

You should see a page showing you the classes that you've selected

When I tried got message Project/dwr is not available

Anybody can advice ?

[2354 byte] By [seemapa] at [2007-10-3 9:42:11]
# 1
check server's logs for error
alban.maillerea at 2007-7-15 4:58:21 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 2

> I want to try one AJAX example with DWR, so I refered

> one tutorial and according to taht I have downloaded

> dwr.jar and placed it in web-inf/lib and created

//other stuff

>

>

> <resource-ref>

> <description>DB Connection</description>

> <res-ref-name>jdbc/MySQL</res-ref-name>

> <res-type>javax.sql.DataSource</res-type>

> <res-auth>Container</res-auth>

></resource-ref>

> </web-app>

>

> Now the tutorial was saying got to

> http://localhost:8080/[YOUR-WEBAPP]/dwr/

> You should see a page showing you the classes that

> you've selected

>

> When I tried got message Project/dwr is not

> available

>

> Anybody can advice ?

Ahem.......if only things were so simple ;)

The web.xml shows a MySql datasource being setup which means a MySql DB is being used by the application. Did you set up all that?

ram.

Madathil_Prasada at 2007-7-15 4:58:21 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...