• Post Reply Bookmark Topic Watch Topic
  • New Topic

Calling JSP from Standalone Java program  RSS feed

 
Srinivas Aluri
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a requirement to invoke a JSP with some request parameters from a standalone java program. All I have is the URL with requestparameters.

How can I do this?
 
Prabhu Venkatachalam
Ranch Hand
Posts: 502
Java jQuery Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
you can use java.net.HttpURLConnection class to do this.

Check Java API for this class and try google for some examples.

HTH!
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The Jakarta Commons group at Apache has also put out a higher level library.
Depending on how much you have to do (cookies, sessions, etc..) this may or may not be easier than URLConnection.
http://jakarta.apache.org/commons/httpclient
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!