Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to execute a JSP file from command line?

 
Kavita Ghia
Ranch Hand
Posts: 91
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello friends,
Is there a way to execute a JSP from the comandline or from my own application?

Regards,
Kavita
 
P SOLAIAPPAN
Ranch Hand
Posts: 68
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
You cannot execute JSP through command line. JSP needs a servlet engine to conver it in to servlet code and run. JSP is meant for web applications, not for stand alone applications
solaiappan
 
Frank Carver
Sheriff
Posts: 6920
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If your JSP is already running in a servlet container, you can always contact it using Java's built-in networking and request some output. Or are you looking for a way to run a JSP without a servlet container?
 
pooranan balasubramanian
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I want to know how to execute a JSP page within a container without issuing a call from a browser or another Java program. Basically i need to execute some tags from a taglibrary(OScache).
 
Tina Coleman
Ranch Hand
Posts: 150
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You could try poking at some of the unit testing frameworks - Cactus, etc. That's a horrible hack to get to the tags, but could be theoretically done.
 
deepak kukreja
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
what option you do have is to compile ur jsp page without executing it.
But for compiling too u have to use browser.
u can use jsp_precompile parameter for that.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic