Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

what is the URL for my servlet.war?

Hey , I am new to servlet and jboss, I just deploy my servlet on jboss 4.2 .jboss console shows me it is deployed successfully

my web.xml contain

<display-name>Notification_Auth_server_simulator</display-name>
<welcome-file-list>
<welcome-file>index.html</welcome-file>
<welcome-file>index.htm</welcome-file>
<welcome-file>index.jsp</welcome-file>
<welcome-file>default.html</welcome-file>
<welcome-file>default.htm</welcome-file>
<welcome-file>default.jsp</welcome-file>
</welcome-file-list>
<servlet>
   <description></description>
   <display-name>Notify</display-name>
  <servlet-name>Notify</servlet-name>
  <servlet-class>com.me.Notify</servlet-class>
  </servlet>
  <servlet-mapping>
  <servlet-name>Notify</servlet-name>
 <url-pattern>/notify</url-pattern>
 </servlet-mapping>
  </web-app> 

and for jboss-web.xml

  <jboss-web>
  <context-root>mysite</context-root>
  </jboss-web>

I tried in my browser http://localhost:8080/mysite/notify and it doesn't work

what is the correct site name ?

Thanks

like image 936
mebada Avatar asked May 20 '10 11:05

mebada


1 Answers

The slashes are the other way around, and there is a double-slash after the colon:

http://localhost:8080/mysite/notify 

Furthermore, if your servlet doesn't support the GET http method, it won't work. You have to override the doGet() method.

Also make sure mysite is the name of your war.

like image 76
Bozho Avatar answered Oct 04 '22 16:10

Bozho