Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Uisng URLCONNECTION to call java Object  RSS feed

 
Ravi Kiran Va
Ranch Hand
Posts: 2234
Eclipse IDE Firefox Browser Redhat
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi ,


Assume that we placed a normal java file say class Test inside WEB-INF classses folder .



Is it possible to call this java file using URLConnection ??
 
Kumar Raja
Ranch Hand
Posts: 548
2
Hibernate Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ravi Kiran Va wrote:Hi ,


Assume that we placed a normal java file say class Test inside WEB-INF classses folder .



Is it possible to call this java file using URLConnection ??


I was curious about this question and just thought of putting my idea (may be wrong or really foolish thought ), though the post has not been addressed for many days.

Now calling Test, through URLConnection, may be or can be achievable by loading this class from the servlet which you are invoking through URLConnection.

This is just my wild guess and I have not tried this though.
 
Paul Clapham
Sheriff
Posts: 22494
43
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, you don't usually "call" a Java source file, whatever that might mean, so it's hard to tell what your question means. However as a general rule, if you want to cause a program on a different computer to start executing, you will have to contact some server on that other computer which will make that happen for you. Obviously it would be a serious security flaw if you could just connect to another computer and run any program on it willy-nilly.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!