JSP / Servlet Question

Right now I have JSPs running on my machine. [Again new to java programming] If I wanted to send just compiled code to a customer let's say what would be involved in doing so? I'm using JBoss if relevant. Thanks.

By compiled code you mean the class files?? Normally you jar all your class files or you war it in case of web applications or you ear it in case of enterprise apps.

SCJP 1.4, SCWCD 1.4 - Hints for you, Certified Scrum Master
Did a rm -R / to find out that I lost my entire Linux installation!

Rob Hunter
Ranch Hand

Joined: Apr 09, 2002
Posts: 829

posted Jun 11, 2007 11:59:00

0

Right now I have JSPs in one of my war files. The JSPs excute fine. What I was wondering is how can I send the functions these JSPs do to some other machine but not send the source? I assume that the JSPs get compiled into class files (if not correct me). If so, how can I just sent the class files over instead of sending the JSPs (which can be viewed, modified,....)? Thanks.

If you're not using Tomcat (or any of the other containers that use Jasper for JSP compilation) check with your container's documentation.

Rob Hunter
Ranch Hand

Joined: Apr 09, 2002
Posts: 829

posted Jun 11, 2007 12:28:00

0

Ben, I have a JSP (let's call Test.jsp) and, after doing a search, found a Test.class in one of the tomcat directories in JBoss. I was wondering could I put that class file into a directory underneath my war directory and do a serlet mapping in JBoss' jboss-web.xml or web.xml file(s)? I thought this would be a better question in this forum rather than the JBoss one since I was unsure of what the JSPs get converted into. Do the JSPs get converted into servlet's then once called? I've seen in JBoss that you can put servlet's in a directory, amp them in the same war file, and call them by a completely different name. Are you familar with any of this? Thanks for the response.

Again, I haven't done it personally but I do know that JBoss uses Tomcat as its servlet container and Tomcat uses Jasper so anything that you find on the ANT JSP-Precompilation tasks should be relevant to you.