• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Run compiled JSP files from work dir?

 
Ranch Hand
Posts: 270
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
Ranch Hand
Posts: 15304
6
Mac OS X IntelliJ IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
Ranch Hand
Posts: 93
Mac Objective C Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Okay thank you all for the replies.

I think I will keep the JSP files...
 
Evildoers! Eat my justice! And this tiny ad's justice too!
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic