Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

getting my admin to support JSP/servlets

Status
Not open for further replies.

carpeliam

Programmer
Mar 17, 2000
990
US
Like most colleges I suppose, my college gives me free space for a website. Because I'm a computer science major who's doing a lot of programming and web design/development, I'm trying to squeeze as much as I can out of this. So currently, I can write CGI scripts (Perl) and run database queries on my own personal database (mySQL). But they don't support servlets... and because my Java prowess far outmatches that of my Perl, I'd really prefer doing JSP over Perl scripts, even though I have more experience with Perl (only because I have yet to write one JSP because I don't have a server that offers it). So my mission is to convince my admin to allow servlets so I can write some JSP stuff. And your mission is to come up with good things to tell my admin :eek:) Here's our conversation so far...<br><br>&quot;We don't currently have any plans to implement servlets. Personally, I think they're way too big a security hole to let students execute whatever they want on the servers. Even as it is, running scripts can be kind of scary, and I'm looking at installing something like cgi-wrappers to make sure malicious users can't do terrible things to the system via scripts. (Not that they can't anyway, just from the shell, but this would make me a bit less nervous.)&quot;<br><br><br>&gt; Maybe I'm unclear, what are the different risks for Perl CGI scripts and servlets?<br><br>&quot;They're actually pretty similar. But we support perl already, and Java has problems of its own (like eating CPU like there's no tomorrow...).&quot;<br><br>===============<br><br>Now, from what I understand, Java used to be a memory hog, but has since come to run very smoothly (and can even run faster than C/C++ at times) due to its automatic garbage collection. I know CGI can be very slow because each query is a seperate hit to the server... I recall that being different for something like ASP/JSP, but I'm not sure. Is JSP more efficient in that way? If so, please let me know, I need ammo :eek:)<br><br>Also... Java's security has improved greatly, especially from Java 1.1 to Java 1.2. But is it more secure than a Perl script? Please, give me something to tell my admin :eek:)<br><br>Please forgive the double post, this is going to both the Java and JSP forums... thanks again. <p>Liam Morley<br><a href=mailto:lmorley@wpi.edu>lmorley@wpi.edu</a><br><a href=] :: imotic :: website :: [</a><br>"light the deep, and bring silence to the world.<br>
light the world, and bring depth to the silence."
 
JSP's can take forever to compile (if done on the fly) some during development several can bring the system down. But once complied and loaded into memory they are extremly fast.
 
well can I compile it without having to compile it on the server? Can I test it on my own machine, simulating a server environment, and avoid taking the system down? <p>Liam Morley<br><a href=mailto:lmorley@wpi.edu>lmorley@wpi.edu</a><br><a href=] :: imotic :: website :: [</a><br>"light the deep, and bring silence to the world.<br>
light the world, and bring depth to the silence.
 
You can compile and test JSP's and servlets on you own machine, (using the tool provided with the JSWDK or wit hsomething like JRun) but the server will have to compile them on its own before they can be served to the rest of the world.
 
so moving the classfiles over physically wouldn't work? What is it about the local server environment that the classfiles need to be aware of, and why do they specifically need to know? <p>Liam Morley<br><a href=mailto:lmorley@wpi.edu>lmorley@wpi.edu</a><br><a href=] :: imotic :: website :: [</a><br>"light the deep, and bring silence to the world.<br>
light the world, and bring depth to the silence.
 
Instead of using JSP, you could use Servlet and therefore insure that they are precompiled.&nbsp;&nbsp;JSP compile into servlets anyways and if you are going to be using Java to take the place of perl than there is a good chance Servlets would be the more likely choice.&nbsp;&nbsp;The main reason, I see, to use JSP over Servlets is when the majority of the HTML on the page remains static, other than that servlets tend to be a more logical choice.<br><br>Wushutwist
 
Liam,<br><br>&gt; What is it about the local server environment that the classfiles need <br>&gt; to be aware of, and why do they specifically need to know? <br><br>One reason is that the web server uses temporary space (folders/files) to maintain the compiled servlet byte code. Therefore it needs to perform path mapping etc. to get everything to work right if you use relative paths in any of your resulting HTML.<br><br>Developing Servlets as opposed to using a JSP engine is a real drag, but that sure would let you get going if Servlets are already supported in your environment.<br><br>&quot;But, that's just my opinion... I could be wrong&quot;.<br>-pete
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top