-1

I download the bluemix starter application package for Java Liberty and created a jsp page to use javamail api and i created the a servlet that requests for parameters to jsp page and created the another class that transport the mail using SMTP and i deploy this on bluemix.When i go to access it via internet the servlet is called but it does'nt respond anything may be it does'nt request my class that transport mesage so how can i solve this problem

and i set properties of smtp using contextparam in web.xml

Yogesh Doke
  • 1,706
  • 2
  • 12
  • 20

2 Answers2

1

Looking into the error{ requested resourse not avilable /emailsendingservlet.java} seems issue is with slash i.e try with emailsendingservlet.java instead of /emailsendingservlet.java.

When you add a slash to URL pattern then the container will look for a web application deployed with name 'emailsendingservlet'.Since this not there you will receive 404 error.

Below is the reference link:

tomcat requested resource () is not available

Community
  • 1
  • 1
priya2503
  • 111
  • 1
  • i remove that slash but it not works.@WebServlet("EmailSendingServlet") is my url pattern in my servlet and i provide action="EmailSendingServlet" in my jsp page – Yogesh Doke Dec 26 '14 at 12:16
  • when i create a new class path to new Bin folder and i change the bin by replacing Bin in build.xml then it creates a war file but when i go to access it gives errors requested resourse not avilable /emailsendingservlet.java actually i guess that my class path has problem and my class files does not store in bin folder please help me – Yogesh Doke Dec 26 '14 at 13:04
  • actually the problem might be in bin actully my .class file does not store in bin what is problem actually it stores in build/classes – Yogesh Doke Dec 26 '14 at 13:37
0

Problem lies in build.xml.you need to check if build.xml have a pointer to com.ibm.ws.javaee.servlet.[version].jar in the path element which is defined in its classpath.

<path id="classpathDir">
<pathelement location="bin"/>
<pathelement location="lib/com.ibm.ws.javaee.servlet.3.0_1.0.1.jar"/>
</path>

Also,Check if the jar location is mentioned wrong or missing.

Anand
  • 621
  • 3
  • 9
  • 31