• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to compile JSP?

 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello JSP experts,
I am a novice in using JSP.I use tomcat 3.1 for the same.
How to compile jsp file ,what i mean exactly is how do we know simple Java & related errors without actually having to invoke the jsp page thru the browser. I know that if there is any error the same can be viewed on the browser screen when the JSP is invoked.But is there a way where in atleast the translation time errors are done away with before viewing in the browser.
Thanx in advance,
Regards
 
Brett Knapik
Ranch Hand
Posts: 255
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As far as I know you can only compile a jsp page when it is invokled by the browser
------------------
I wish there was a button on my monitor to turn up the intellegince.
Theres a button called 'brightness' but it doesn't work
 
Frank Carver
Sheriff
Posts: 6920
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There is no "standard" way to do this. It depends on which servlet container you are using. I know that Resin has a way of doing this, and I guess thatn Tomcat does too. Please check out the web site or mailing list of the container you are using.
 
Cherry Mathew
Ranch Hand
Posts: 159
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Tomcat does it???/
Please tell me how
Cherry
 
Tim Holloway
Saloon Keeper
Pie
Posts: 18100
51
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Tomcat's JSP compiler is named "org.apache.jasper.JspC". Check out the jspc.bat or jspc.sh scripts in the tomcat bin directory.
 
Venugopal nandikolla
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I have tried it long time ago.It'll work ,try using the command below.You must specify the uriroot (The root directory of your input files -- jsp's).The -webxml creates web.xml(but you must use -webapp as show below).The c.jsp is my only jsp in the c:\.Hope this will help you.
jspc -uriroot c:\ -webxml c:\web.xml -webapp c:\ c.jsp

Venu

 
Cherry Mathew
Ranch Hand
Posts: 159
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank u all for the responses
Venugopal,
I did try the jspc but it gives me exception IllegalArgumentException. Unknown object java.util.Hashtable etc.
please explain in detail the options of jspc. and till which directory i got to give
regards
Cherry
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic