• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Error when connection to servlet from java class

 
Ankita Jha
Ranch Hand
Posts: 55
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello ranchers,


I m facing a very different and unique issue.

I have a java file which calls servlet.
and my java file is loaded in oracle using loadJava command.
Then those class files were published and a package was created.

suppose if my class contains 3 methods,
then my package will contain 3 functions.


now when i execute this function ..............i get the return value as FALSE..
which mean it is not able to establish connection with servlet.

I have also maintained logs of class file hitting the servlet.
when i execute the fucntion directly from java file my logs are registered,
but when i do the same from database.no logs is registeted.

Any help will be appreciated.

its urgent.

Also attching herewith the log files.
 
avi sinha
Ranch Hand
Posts: 453
Google Web Toolkit Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ankita Jha wrote:Hello ranchers,
I have a java file which calls servlet.


strange
why are you calling a servlet from a java file ???

avi sinha
 
Leonardo Carreira
Ranch Hand
Posts: 494
Eclipse IDE Java Postgres Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ankita Jha..

Do you mean call Servlet(exposed as WebService)?..
 
Swastik Dey
Rancher
Posts: 1625
5
Android Java Java ME
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Whats the problem calling a servlet from a java application, even if its not exposed as a web service. Look into URLConnection or HttpURLConnection classes under java.net package. Ankita is facing a different issue i.e. hitting the servlet from oracle.
 
cow clarke
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That would be an strange idea, which I've never considered before, but I think it worth your effort to get it through.
Connect to a Servlet, I just wonder what you are doing by then. Do you mean that you would like to request some message from it just like an browser do, or something like web service?

Hoping for further discussion.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic