Hi All,

I have a servlet "DBLookUpImpl" which implments RemoteServiceServlet. at
present I am using this servlet for RPC calls.

can I override the doGet() in DBLookUpImpl servlet and invoke the servlet
from browser using the url mentioned in url-pattern in web.xml ?

when i tried this way i am getting below error but i have put one
system.out.println statement which gets printed in tomcat console.

*HTTP ERROR: 405*
*HTTP method GET is not supported by this URL*

*code snippet of "DBLookUpImpl"*

public class DBLookUpImpl extends RemoteServiceServlet implements
DBLookUpService{

public String getLocaleString(String str) { // RPC method every thing works
fine

return some string;

}

public void doGet(HttpServletRequest req, HttpServletResponse resp)
throws ServletException, IOException {
System.out.println("insdie DBLookUpImpl  class"); // this message gets
printed in tomcat console, i dont see any html being displayed instead i
see HTTP ERROR: 405
PrintWriter out = resp.getWriter();
out.print("<html>");
out.print("<body>");
out.print("<h1>welcome user</h1>");
out.print("</body>");
out.print("</html>");


*code snippet of web.xml*

<servlet>
    <servlet-name>greetServlet</servlet-name>

<servlet-class>com.google.gwt.sample.stockwatcher.server.DBLookUpImpl</servlet-class>
  </servlet>

  <servlet-mapping>
    <servlet-name>greetServlet</servlet-name>
    <url-pattern>/stockwatcher/greet</url-pattern>
  </servlet-mapping>

can you some help me on this.

Thanks
karun

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to