• Post Reply Bookmark Topic Watch Topic
  • New Topic

Run compiled JSP files from work dir?

 
Jeppe Sommer
Ranch Hand
Posts: 270
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is it possible to run the JSP files being compiled (*.java files) in the \WEB-INF\work directory only, and delete all the JSP f�les from the application?

If that is possible, do you have to turn it on, that you wish to run the compiled "JSP files" in the \WEB-INF\work directory, somewhere in the server configuration file?

And is there any disadvantages by running the compiled JSP files?

Thanks
[ August 17, 2006: Message edited by: Jeppe Fjord ]
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65519
105
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why on earth would you want to do that?
 
Jeppe Sommer
Ranch Hand
Posts: 270
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
For two reasons,

1) To avoid that I use to much disk space, and

2) To protect my JSP code from anyone else.

Okay, I just realized that the JSP files compiled isn�t protected! :-(

Is that a bad idea?
[ August 17, 2006: Message edited by: Jeppe Fjord ]
 
Gregg Bolinger
Ranch Hand
Posts: 15304
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Jeppe Fjord:
For two reasons,

1) To avoid that I use to much disk space, and

2) To protect my JSP code from anyone else.

Okay, I just realized that the JSP files compiled isn�t protected! :-(

Is that a bad idea?

[ August 17, 2006: Message edited by: Jeppe Fjord ]


1. Not something I'd be concerned with, but the compiled JSP isn't going to be that different in size than the non-compiled JSP.

2. You can place your JSP files in the WEB-INF folder which has no direct url web access.

[ August 17, 2006: Message edited by: Gregg Bolinger ]
[ August 17, 2006: Message edited by: Gregg Bolinger ]
 
Rusty Smythe
Ranch Hand
Posts: 93
Mac Objective C Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Jeppe Fjord:
Is it possible to run the JSP files being compiled (*.java files) in the \WEB-INF\work directory only, and delete all the JSP f�les from the application?


Yes it is possible. There is really no advantage, though.

Originally posted by Bear Bibeault:
Why on earth would you want to do that?


You wouldn't. What you would want to do is go the very next step and compile the .java into .class, stick the result under the classes directory (with the appropriate folder tree), and update the web.xml to handle them.

The advantage to this method is the normal delay in accessing each JSP does not exist, because it is already compiled into bytecode (.class).

<soapbox>
If you're compiling the JSPs and modifying the web.xml manually, you aren't doing it correctly. Only use an automated build tool to do this, because otherwise you are wasting your time that could be better spent coding.

One such tool that does this is Maven 1.x with the tomcat plugin from codehaus.
</soapbox>
 
Jeppe Sommer
Ranch Hand
Posts: 270
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Okay thank you all for the replies.

I think I will keep the JSP files...
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!