aspose file tools*
The moose likes JSP and the fly likes JSP / Servlet Question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "JSP / Servlet Question" Watch "JSP / Servlet Question" New topic
Author

JSP / Servlet Question

Rob Hunter
Ranch Hand

Joined: Apr 09, 2002
Posts: 819
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.

Rob
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

What do you mean by compiled code?

Are you talking about applet development?


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

Also, this is a JSP forum.
ALL the questions here are assumed to be JSP related so "JSP/Servlet" question does very little to describe the nature of your post.

See: UseAMeaningfulSubjectLine
for some useful tips on creating a meaningful subject line.
Doing so will greatly increase your chances of getting a meaningful answer.
Joe Harry
Ranch Hand

Joined: Sep 26, 2006
Posts: 9381
    
    2

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: 819
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.

ROb
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

There are Ant tasks that work with the Jasper compiler to pre-compile your JSPs. I haven't done it personally but I know there is a lot out there on the subject.
http://www.google.com/search?hl=en&q=Pre-compiling+JSPs&btnG=Search

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: 819
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.

Rob
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

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.

I know this is not an uncommon thing to do.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JSP / Servlet Question