In GWT 1.6,
1.calc.html should contain a generated Javascript code like
"<script type="text/javascript" language='javascript' src='mail/
mail.nocache.js'></script>" in
http://www.gwtorm.com/mail/Mail.html.
2.A service interface like MailService has the following code:
@RemoteServiceRelativePath("mailService")
public interface MailService extends RemoteService {
void save(Contact contact) throws LinqException;
Mails getMails(int startIndex, int count) throws LinqException;
int getTotalMailCount() throws LinqException;
List<Contact> getContacts(int personId) throws LinqException;
Contact getContact(ContactPK contactPK) throws LinqException;
}
3.mailService is mapped to MailServiceImpl servlet as indicated
in the following web.xml.
<servlet>
<servlet-name>mailServlet</servlet-name>
<servlet-
class>com.google.gwt.sample.mail.client.server.MailServiceImpl</
servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>mailServlet</servlet-name>
<url-pattern>/mail/mailService</url-pattern>
</servlet-mapping>
If you took look at
com.google.gwt.user.server.rpc.RemoteServiceServlet, you will find
RemoteServiceServlet just overrides doPost method. That is a reason
you get HTTP Error 405 when you try to get access to that url through
get method.
Jim
http://www.gwtorm.com - GWT ORM
http://code.google.com/p/dreamsource-orm/
On Jun 2, 6:41 pm, Tharindu Madushanka <
tharindu...@gmail.com> wrote:
> Hi,
>
> Perhaps this might not be the correct place to ask this. But please
> kindly tell some answer to this.
>
> I am new to web development and I started reading about GWT, and when
> I look at web.xml I see the
>
> <servlet>
> <servlet-name>greetServlet</servlet-name>
> <servlet-class>com.gwt.test.server.GreetingServiceImpl</servlet-
> class>
> </servlet>
>
> <servlet-mapping>
> <servlet-name>greetServlet</servlet-name>
> <url-pattern>/calc/greet</url-pattern>
> </servlet-mapping>
>
> I used ant script created to run the application in hosted mode. When
> I run the application in hosted browser it shows the url ashttp://localhost:8080/calc.html
> Perfectly I could access this Url from other browser as well. But my
> question is what is the purpost of <url-pattern>/calc/greet</url-
> pattern> . I tried to access the url by typinghttp://localhost:8080/calc/greet,
> but it displays following error - HTTP Error 405
>
> HTTP method GET is not supported by this URL
>
> RequestURI=/calc/greet
> It it directly access from url by typinghttp://.../calc.html, then