Domain: apache.org
Stories and comments across the archive that link to apache.org.
Comments · 2,937
-
what works for me
Haven't had much luck finding a decent IDE for my environment (servlets->EJB->JDBC, etc, etc). What I have found that works well is a good text editor: gvim. Syntax highlighting, and my fingers know vi. CVS for source control and ant for build/distribution. Also have had good luck with optimizeit for profiling java apps. Profilier is especially nice because it lets me attach to an application server and filter out application server specific classes (which can be many). This allows me to really see what my beans are doing. Also fond of jprobe for debugging. Using many different apps for different aspects of development can be a pain in the ass, but I've found that after a little meddling around, it works quite well. Anyhow, just my 2 cents.
-
Java the UNIX way: Ant and vim
Because my Java work is almost exclusively centred around servlets, I don't need anything too fancy GUI-wise. In fact, I find the best way to work is the same way I've worked with other languages for years - with a text editor and a build tool. Vim is IMHO still the best source-code editor around, but what is there to use as a build tool when it comes to Java?
Ant, of course :) Ant's a very powerful build tool that combines an XML-based build-script markup with the power to write your own custom tasks in Java, and in my environment it makes building/testing/deploying a breeze. Simple, powerful and effective - great stuff :) -
There's a number of nice text editors & IDEsHow about these:
- Vim - Really, it's what I use.
- JEdit - Pure-Java, super pluggable IDE.
- NetBeans - The origninal pure-java IDE.
- Forte - Never used it... lots of people like it.
- JBuilder - Seems like a descent ide.
Like I said, though, I really *do* use vim, mc and ant. And that's it. jode if you need to do some decompiling, and everything is great under Linux.
It's been called "The Bronze Age IDE" by my colleagues, but it's fast and stable. Run a couple windows in each virtual desktop and you can edit 20 files at once easily. Vim has everything I want in an editor -- color syntax hilighting, auto-indenting, quickie macros, horizontal and vertical split, block copy and indent, etc. And ten million other little features.
No matter what IDE you use, ant is by far the best Java-based build system. Everyone should be using it.
-nate
-
IDEA from IntellijI've only seen it mentioned once so far, so I have to plug IDEA from intellij.
It contains everything you would think if in an editor, including CVS support, support for debugging, selection of JDK per project, javadoc integration.
The things that I find set it apart are:
- ant support (if you haven't used ant yet for compiling your projects - have a look at it)
- outstanding jsp support - highlighting, code imports
- support for refactoring. If, like myself you have never really thought about refactoring, it's great when you decide that you need to improve a class or method name late in a project. In IDEA that's one click.
If you are after a visual GUI editor, IDEA isn't for you - but I find that most editors produce crap GUI code anyway.
Like Netbeans, it is also written in java.
Intellij don't provide screenshots, but there is a tutorial provided here - ant support (if you haven't used ant yet for compiling your projects - have a look at it)
-
Don't forget Ant!
Ant is akin to Make, but with an XML control script. Our script compiles, builds javadocs, runs the ObjectStore post-processor on the classes, and builds the
.jar files for us.
-B -
IDEs
I use Java builder 4, its nice enough. A lot
of the time, I still do simple bugfixing and
rebuilds using xedit and make script.
Jarkata Ant is nice "make" replacement for building
java apps. And can be integrated into jbuilder,
and other IDEs, if your project gets completed
enough to need one.
This ought to have been a slashdot poll rather
than an Ask slashdot. -
Netbeans
During the whole discussion of Eclipse the other day, I wrote about how it differs from Netbeans.
For me it meets pretty much all of my needs:
Open source
Decent interface (although some people disagree), which you can configure to appear as a single window or multiple windows (great for those multi-monitor setups)
Support for CVS
Ability to mount FTP directories as a filesystem so that I can store projects on the servers at school
Support for a whole wack of Java standards which I don't use at all - JINI, JSP, beans, etc...
ANT build scipts
Plenty of other stuff I won't bother to mention.
In fact the only real minus to it is that it is kind of a memory hog and takes a bit to load up (probably because it's written all in Java). Either way though, it's worth a look.
-
Re:Thanks, but whatever
Read the fucking article.
Now go to www.eclipse.org
This a general puropose IDE and is not meant to be used only for Java development. It is written in Java without the part of Java that makes Java Slow (Swing/AWT).
The IDE uses a native widget toolkit called SWT, that is cross-platfrom and is lightining fast. Maybe not as fast as your 31337 perl script on your 386 with 2 megs of ram, but it runs really nice on my celeron 400. Best of all it runs on Linux.
And it since it doesn't even come with a Java GUI app builder, it is not exactly like they are pushing Java GUI apps on you.
I've been using this with Tomcat and it simply rocks!
As Eclipse picks up steam, the C++ and other dev environment plugins will get better, and you can make your fat client apps without java.
and the setup is still kludgey for most.
It's a zip file you extract and run the executable - wow big kludegy setup.
Perhaps you should try it out before you flame it.
Java is just a dog.
It is obvious by your embarrassing display of ignorance, that you should not be in a position to make any of your software related opinions public. Everyone knows that Java is coffee.
Have a nice day. -
XSL-FO
Converting to PDF is easy too. Just use XSL-FO. Apache has an implementation of this. Currently they only create PDFs, but it could easily be sent to a printer directly. You can also convert directly to TeX:
-
Re:First impressionApache is the rock solid 1.3.20
1.3.20 has some security issues, 1.3.22 has been released. Check out http://httpd.apache.org/dist/httpd/Announcement.h
t ml for more info, and here are the security vulnerabilities listed in the announcement:- A vulnerability was found in the Win32 port of Apache 1.3.20. A client submitting a very long URI could cause a directory listing to be returned rather than the default index page. A 403 Forbidden will now be returned CAN-2001-0729
- A vulnerability was found in the split-logfile support
program. A request with a specially crafted Host:
header could allow any file with a
.log extension on the system to be written to. PR#7848 CAN-2001-0730 - A vulnerability was found when Multiviews are used to negotiate the directory index. In some configurations, requesting a URI with a QUERY_STRING of M=D could return a directory listing rather than the expected index page. CAN-2001-0731
-
Re:First impressionApache is the rock solid 1.3.20
1.3.20 has some security issues, 1.3.22 has been released. Check out http://httpd.apache.org/dist/httpd/Announcement.h
t ml for more info, and here are the security vulnerabilities listed in the announcement:- A vulnerability was found in the Win32 port of Apache 1.3.20. A client submitting a very long URI could cause a directory listing to be returned rather than the default index page. A 403 Forbidden will now be returned CAN-2001-0729
- A vulnerability was found in the split-logfile support
program. A request with a specially crafted Host:
header could allow any file with a
.log extension on the system to be written to. PR#7848 CAN-2001-0730 - A vulnerability was found when Multiviews are used to negotiate the directory index. In some configurations, requesting a URI with a QUERY_STRING of M=D could return a directory listing rather than the expected index page. CAN-2001-0731
-
Re:I love Perl.
I can't say I agree that JSP, ASP, PHP, or any of the *SP family of languages are good design. They encourage exactly the opposite of MVC, they encourage you to mix HTML and (non-display related) programming code.
As it has been pointed out, at least with regards to JSP, "allows" does not mean "encourages". And talking about MVC, you should take a look at one of the many "MVC"-like implementations for Servlet development (be it using JSP or not).
-
Re:I love Perl.
I can't say I agree that JSP, ASP, PHP, or any of the *SP family of languages are good design. They encourage exactly the opposite of MVC, they encourage you to mix HTML and (non-display related) programming code.
As it has been pointed out, at least with regards to JSP, "allows" does not mean "encourages". And talking about MVC, you should take a look at one of the many "MVC"-like implementations for Servlet development (be it using JSP or not).
-
Re:Mod_Perl vs. XML issues resolved?
It's fixed in Apache 1.3.22. You could also disable the EXPAT rule when compiling Apache.
-
Traditionally UNIX utils on Win32
Here are just a few of the tools that are considered traditionally in UNIX/Linux/BSD territory that are available for Win32. In all actuality, there's enough out there to get as much of Linux running on Win32 as Win32 running under WINE.
XFree86: http://sources.redhat.com/cygwin/xfree/
KDE: http://kde-cygwin.sourceforge.net/
GTK/PHP/Libglade: http://gtk.php.net/download.php
Apache: http://www.apache.org
PHP: http://www.php.net
PHPTriad: http://www.phpgeek.com
Perl: http://www.activestate.com
Ruby: http://www.pragmaticprogrammer.com/ruby/downloads/ ruby-install.html
Python: http://www.python.org/download/download_windows.ht ml
TCL/TK: http://www.pconline.com/%7Eerc/tclwin.htm
MySQL: http://www.mysql.com
MySQL ODBC: http://www.mysql.com/downloads/api-myodbc.html
PostgreSQL: Included in cygwin (only works on NT)
ATT's U/WIN* Unix for Windows: http://www.research.att.com/sw/tools/uwin/
Cygwin: http://sourceware.cygnus.com/cygwin/
DJGPP: http://www.delorie.com/djgpp/
Native UNIX command-line binaries: http://www.wzw.tu-muenchen.de/~syring/win32/UnxUti ls.html
vi: http://www.cs.vu.nl/~tmgil/vi.html
Emacs: http://www.cs.washington.edu/homes/voelker/ntemacs .html
OpenOffice: http://www.openoffice.org
Mozilla: http://www.mozilla.org
GIMP: http://user.sgic.fi/~tml/gimp/win32/
List of GNU software for Windows: http://www.gnusoftware.com/
And so on . . .
There's a list over at DMOZ.org of a lot of this. -
Jakarta JMeter
There's the Jakarta project's JMeter, from the folks at Apache. It's written in Java, but can be used to load test a wide variety of network resources.
-
Re:People sticking with Windows because of AOL?
They also have sponsor AOLServer, an open soruce web server.
I have not heard of this project... What does it offer over Apache (another Open Source web server)? -
Re:Try Cocoon
For the lazy, that's xml.apache.org.
-
Killer 3rd party tools make CVS invaluable
The Apache project has created many scripts for use with CVS which helps out a lot with the types of things you describe. To get some of these tasty treats check out their cvs web interface, or check out their CVSROOT module directly. I believe they encourage people to use these scripts (it is Apache, after all
:)Apache provides:
- Access Control Lists
- Commit Message Mailing System
Also, like someone else mentioned, Mozilla.org has developed some killer online tools for managing source code with CVS. You get things like:
- LXR - a "massively-hyperlinked source code browser that lets you cross-reference function and variable names"
- Bonsai - a tree control "tool for watching up-to-the-minute goings-on" in CVS and "viewing checkins and log messages, reading diffs, etc."
- Other tools like Tinderbox and Bugzilla
--Micko
-
Killer 3rd party tools make CVS invaluable
The Apache project has created many scripts for use with CVS which helps out a lot with the types of things you describe. To get some of these tasty treats check out their cvs web interface, or check out their CVSROOT module directly. I believe they encourage people to use these scripts (it is Apache, after all
:)Apache provides:
- Access Control Lists
- Commit Message Mailing System
Also, like someone else mentioned, Mozilla.org has developed some killer online tools for managing source code with CVS. You get things like:
- LXR - a "massively-hyperlinked source code browser that lets you cross-reference function and variable names"
- Bonsai - a tree control "tool for watching up-to-the-minute goings-on" in CVS and "viewing checkins and log messages, reading diffs, etc."
- Other tools like Tinderbox and Bugzilla
--Micko
-
Thats it ... time to go
Thats it
... time to go .... If anyone is still using IIS can they please leave the building. http://www.redhat.com http://www.apache.org -
Try SubversionThere's a new program out there working on version control. It's called Subversion and it uses the Apache Liscense. They plan to improve in areas that include versioning of directories, renames and file meta-data , atomic commits, and heaps of other stuff. Graceful handling of repeated merges is also on the boards. It will also handle binary files. I found out about it in Linux Journal Magazene, and think it's pretty cool.
David
-
The "MS and Sun both suck" argument MUST END
Did you notice that their member list included the Apache Software Foundation and O'Reilly?
These are groups that I would trust in creating a secure, distributed, decentralized identity system.
Let's face it folks, some kind of worldwide identity system is going to happen. Instead of whining about whether Sun or Microsoft is more evil, start thinking about how something like this WOULD work; it's an amazing challenge, and I am far more comfortable with a consortium of companies developing it than a single one.
Just my $0.02
- jonathan.
-
Eating your own dog food
An un-split Microsoft has no choice but to use IIS. How much faith would you have in the Apache Project if their Jakarta team, for instance, switched their home page over to IIS or AOLserver?
Many pundits and observers believed that Microsoft would be more profitable split than whole. Why? Because the two (or three) BabySofts would not need to promote each others' products, and they would still not be in competition with each other. Currently the IIS offering hurts the Hailstorm group because they are not free to choose the best, most secure product(s) to run their system. Bad for billg, good for the Hailstorm detractors.
-sting3r -
Re:That means
Right now, you have all of your information replicated all over the place, meaning that you trust that many people with your data. All you need is one of them not patching an exploit, and bam, your data is gone. Why have multiple points of potential failure when you can just have one?
Nice theory. They can't seem to keep Hotmail accounts secure, and they can't even keep their own IIS installations patched. With a track record like that, do you want Microsoft to be the single point of failure?
It isn't like they would consider using someone else's software even if it had a better security history.
-
Their definition of "market share" excludes Apache
MS may *say* they own 95% of the server market, but they are *lying*.
They may very well be correct. Economists define "market share" along the lines of "fraction of the total amount of money spent by consumers in return for products," excluding software available for no charge such as AOLserver and Apache HTTP Server. Microsoft's IIS is the most popular HTTP (etc.) server software that's not at least free as in beer, and it may very well have over 90 percent of that market.
-
In theory...... you could be able to use ASP2PHP while staying in a familiar (Windows/IIS) environment as long as possible:
- Install PHP on your IIS server.
- Convert your ASP to PHP using ASP2PHP and get it running on Windows/IIS/PHP.
- Install Apache with PHP on the Windows box. Get your site running on Windows/Apache/PHP.
- Install a new box with some securish Unix lookalike or other and move the site over.
Whose idea was it to put Windows servers on the 'net in the first place, anyway?
Cheers
//Johan -
Sneak Peek at the Docs
Here is a sneak peek at the documentation for the new IIS rewrite. Of course there are a lot of bugs in this version of the document and it'll have to be edited quite heavily before the final release...
-
Apache::ASP
I assume you saw The Apache::ASP home, a link you can find on the mod_perl home.
You can also run ASP on Apache using ChiliSoft ASP, which seems to be owned by Sun now. I've had little experience with the latter, but it seems to work out of the box with existing ASP sites and also has a web admin utility, along with the warm and fuzzy feeling of paying lots of money for something
:-)Apache and IIS are both pretty flexible, but Apache at its core is much simpler and forces you to specify what you want rather than having everything available by default and allowing you to stumble into what you might need. (Not that you'd do that, but I'll be a lot of sysadmins are wishing that IIS weren't so featureful right now...)
Chris
-
I like Gartner's solution better.Apache.
I'd suggest running it on Debian. As you say, Go there, subscribe to the mailinglists on security and other useful things. Read the how-to's, walkthroughs and useful documents about administring. Well, the mailinglist is optional as setting up a cron job (type man at) to apt-get updgrade and apt-get update will do better.
Debian boxes can be remote administered through a secure shell (ssh), without loosing the connection. Try running dselect through one some time, it's really cool. Did that to install and then uninstall proftp.
-
Migration tool: ASP2PHPI haven't seen any posts about it, but I think that ASP2PHP deserves some attention. A migration could (theoretically) be done like this:
- Download and install PHP for IIS on Windows.
- Convert your ASP pages to PHP (using ASP2PHP).
- Get it running on IIS.
- Replace IIS with Apache (still on Windows).
- Replace Windows with some secure Unix lookalike or other.
Cheers
//Johan -
Re:Any step-by-step manuals out there?
Hi, and welcome to the club. I am glad that you are now considering the transition. Just to give some of my credentials: I am ungraduate at a fairly well known university, taking computer science. I also have about 3 years of summertime employment in ASP, VB, and minimal web server management.
Well now to the point. I have made the transition to linux environment about a year ago -- and I now consider myself an average user/admin. The main question in performing the transition is to ask yourself, how much unix/linux/BSD you already know. If the answer is none -- I recommend to not do an immediate transition, but instead get a separate computer, install a distro of linux, and just play with it, to get stuff figured out and working. This step will take a few weeks of devoted time. The main thing is DO NOT GIVE UP. Linux has all the features, but if you do not know where they are, stuff won't work. In which cases post questions to those who know. Or even better yet get a book. $50 will give you up front useful info on networking, and may tell you how to get the webserver running. I am using the book Using Linux, Sixth Edition SE. It has been a lifesaver, although it is oriented towards redhat, debian, and caldera versions.
Some usefel links:
RedHat Linux
Mandrake Linux
Debian
Linux Documantation Project
I recommend downloading (or purchasing) one of the distros above. The first two try to be really user friendly, and do a decent job at it. The third one is a bit more cryptic, but you will probably want that version for your real server, since it does not have a ton of annoying unnecessary flashy things, like graphical bootup. Besides the install the real diference is update management, which both redhat and mandrake do using rpm system. It is easy to figure graphical rpm. Once you get comfortable with that, consider using that book that yau bought, along with linuxdoc (the fourth link) to figure out how to get all that networking, like VPN, DNS, etc, using the configuration files -- the only good way of setting up the network.
After you figure out basic administartion, Try getting some simple pages to learn apache.
Apache web server
Perhaps a book on apache Perl and PHP programming might help. Do not actually know any specific titles. Basic idea is the same as in IIS. There is a public directory, similar to inetpub\wwwroot. where you can put the files. I believe that PHP is most similar to ASP. And since you did not use SQL server for database access, but Access, I assume that you do not need the speed of a full blown server. In this case MYSQL will do the trick. For something more significant you should check out Postgres db, or a commercial product such as db2. Learning these will take some time, but remember, these things have been written with an simplicity in mind. It just takes a little bit, to see where this simplicity is.
Well this msg is already too long. To sum it up, do not throw away your old system yet. Take time to learn linux, and in a little time you will possess the necessary skills to do transition. As for the tools that will make the transition for you, I have not heard of them, however they probably do exist. And starting somewhat anew is not always a bad thing. A lot of us hope that some version of windows will be written anew, but I doubt it will happen.
Well, good luck! The switch is not easy, but there are plenty of benefits in the long run. Do not give up, and you will see them soon. -
Gimme a break!
Rewriting is always an option. It's not a pretty one, but it CAN be done if you're dedicated enough.
Case in point - last year I saw the dead-end coming for my company's Enterprise solution, which was written in ASP/COM. The argument (er... *ahem*, discussion) I had with the higher-ups concluded that we HAD to continue moving forward. We couldn't wait 6 months for a rewrite (ambitious at best).
Fine, I said. Then let me do everything concurrently. Here's how it works:
Install Tomcat onto your Windows NT Server running IIS, along with JRE 1.3 and the HotSpot Server.
Link Tomcat in with IIS using the mod_isapi.dll you can get from the Tomcat site. Also install Tomcat as a service using jk_nt_service.exe.
Keep your Java session abstracted. The main session remains as-is within your ASP application. Write a bit of java.net code to hook in through a custom ASP page (note: security - ordinary clients can't access this page) to retrieve and update any session variables. This can be done by reading the ASPSESSION cookie, and spoofing it in your requests to IIS.
Any NEW components, write in Java. Remember - session variables get retrieved and saved from the ASP side still.
As you're working on new components, when you can arrange it, convert old components to Java one by one. Session still remains on ASP.
Wash, rinse, repeat until all components have been written in Java. Once this is done, convert your login into Java, and change your abstracted Session to be a Java session instead of hooking into IIS for the ASP one.
Voila. You are now 100% Java. Now get rid of IIS and switch to something else. This is the approach that my team took to rid ourselves of the VB horror that someone left me when I joined. It took about 8 months of solid effort, but it worked. We are now rid of all reliance on MS technologies from our site. We also managed to do it quickly because of good code layout, and the use of the most wonderful Velocity templates also available from the Jakarta site. This helped a lot.
The point is, you CAN do a rewrite. What you usually are NOT allowed to do is a code freeze. So... work around it! The beauty of this solution is that you are running two separate applications (technically) for a time. Keep a consistent look, and the users can't tell the difference between the ASP and the Java side. Change one function at a time, slowly, and eventually you'll reach the Utopia you're looking for. -
Regular patching only a small part of TCOFrom the article...
using Internet-exposed IIS Web servers securely has a high cost of ownership. Enterprises using Microsoft's IIS Web server software have to update every IIS server with every Microsoft security patch that comes out -- almost weekly.
I imagine you would need to patch Apache fairly regularly as well. Its not like its immune to worms or security holes. In fact, apache.org was compromised this year due to a security hole.
I am in the process of converting from a Windows based web server to Debian/Apache, and the process is not without its problems. On the first try, Debian did not pick up both processors on my machine. Also, using mySQL, I can consistently crash my machine by trying to index a 5 million row table.
So, I have some problems. As you might when converting from Windows to Linux. Where do I go? I can't just call my Debian rep and ask him to help me fix my problems. I have to hunt for the answers and spend a lot of time figuring out just what the heck is wrong with my system.
So keep this in mind if you are switching because of TCO costs. Yes, you will need to patch once a week sticking with Windows. However, I don't think this report fully explains everything that may be involved when figuring out the TCO for a Linux system.
That said, I expect to be able to solve my problems and end up with a very nice server. -
Re:MS never fix?IIS has much much more functionality than Apache does, and it has been around much longer, unfortunately in this case longer means a more convoluted codebase,
Please name one bit of functionality that IIS had that apache does not. The only thing I can think of is
.asp, and that's because Microsoft wanted a proprietary way to do the things that Apache users were already doing with perl and php.The second bit is just insane. IIS was microsoft's late entry into the webserver wars, long after Apache was created. Apache, in turn, was "a patch-y" version of the old NCSA web server. I was going to get dates, but the NCSA httpd web pages haven't been updated since '96. There's some history here, though. The IIS code base is convoluted mostly because they were rushing to catch up so that people didn't give money to Netscape for their Windows-based web servers.
-
Re:Yet Another Linux Bigot (YALB)
You can get Nimda about seven different ways and 6 of them have nothing to do with running a web server. Just browsing an infected site, something beyond your control, with IE 5.5 sp1 or less was enough.
This is true, of course. This worm spreads in a number of ways, all of which exploit security flaws in Microsoft software:
- It can directly attack your computer if you are running
Microsoft Internet Information Server (IIS)
- Consider using Apache instead
- It can attack as a mail attachment if you are using
Microsoft Outlook as a mail client
- Consider using Pegasus instead
- Consider using Netscape 6 instead
- Consider using KMail (on UNIX/Linux) instead.
- It can attack as an executable attachment to a Web page if
you browse with Microsoft Internet Explorer
- Consider using Opera instead.
- Consider using Mozilla instead.
- Consider using Netscape 6 instead.
- Consider using Konqueror (on UNIX/Linux) instead.
Notice a pattern there? Yes, that's right. If you don't run Microsoft, you can't get Nimda. Or Code Red, or Code Red II, or SirCam, or Melissa, or...
This isn't about being a Linux bigot. You can't get Nimda on MacOS. You can't get it on Solaris. You can't get in on OS/400, or AIX, or an Amiga, or on *BSD. This isn't a matter of Linux being good. Linux is just ordinary, like any other half-competent operating system.
This is a matter of Microsoft being incompetent. Hopelessly, culpably, irredeemably incompetent.
- It can directly attack your computer if you are running
Microsoft Internet Information Server (IIS)
-
Re:sigh
Given the recent direction of JSP in the direction of tag libraries and Struts, I'd say that JSP is quite well suited for the front end if you have a big one.
Define overkill? I have a frontend I'm creating that's well over 300 screens and 18 subsystems. I need maintainable screen flow and automatic form databinding. Will PHP really be more managable? Does PHP integrate with an object/relational mapping toolkit? Eventually I'll have to hook into Java for latter kinds of things, which implies I probably should be doing the whole project with J2EE to begin with.
-
URLs containing help on TomcatThe best places for learning about Tomcat (both 3.x and 4.0), aside from the documentation, are mailing lists and forums, two of which are:
(a) The mailing list tomcat-user-help@jakarta.apache.org, to which you can subscribe through the Jakarta site. The archives for this mailing list are helpful, too, and can be searched. In both the current mailing list and the archives, the most productive use of your time would be to read everything posted by Craig McClanahan and Pier Fumagalli, who are the primary developers (of Tomcat) and writers of most of the documentation. They seem to know more about Tomcat than anyone else (at least Tomcat 4.0), and they often post material to the mailing list that is not found anywhere in the official documentation.
(b) The Tomcat FAQ forum and Tomcat FAQ at jGuru.com.
In this vein, see an introductory article ("Server-side Java with Jakarta Tomcat") in Linux Journal (April, 2001) in the regular column, At the Forge.
-
Re:Jakarta = SunThat's blatantly untrue.
Have a look at Who We Are from the Jakarta site - and that's just the project management committee. Some names from Sun, certainly, but far from all. As someone who's had a few patches etc accepted for Ant (and hopefully a few soon for Log4J) I probably count as a Jakarta developer too, and I'm not with Sun.
Jon
-
JSP, Servlets, PHP, Tomcat, etc explained
So why can't I just compile my code after I write it, and run it that way?
You can.
And why do I have to mix code and content?
This is a difficult question. You don't have to mix code and content. In fact you want to do so as little as possible. Here's what it comes down to:
Many large scale web sites are a combination of front end UI written in HTML/CSS and backend database-driven functionality written in Java. Somehow you need to dynamically generate HTML based on database content and given critera. People figured out pretty fast that most web pages are sufficiently complex that embedding HTML/CSS directly in Java code (or a Perl/CGI script) is not a good solution. It makes the Java code difficult to read for the programmer, and it makes it very difficult for the designer to change the appearance of the site.
Things like JSP and PHP attempt to head towards solving this. Rather than having all the HTML and Java code in one massive file, you have more template-like functionality. You initially create a HTML page as your template, then add dynamic elements using the scripting language. With JSP, the bulk of functionality is theoretically stored in other places, like JavaBeans. You then call this functionality with custom tags.
This is not enforced, however. PHP and JSP are quite rich languages. If you design or maintain your JSP/PHP application poorly, you might find yourself back at square one: too much mixing of code and content. Except this time, too much code has creeped into the content, rather than the content creeping into the code. I must emphasize that it doesn't have to be this way. At least in the context of PHP, proper use of includes and objects should solve most major problems. But not everybody is that careful.
Another (some would say more evolved) approach are the pure template languages like Velocity (for Java) and Smarty (for PHP). They do not have the rich language structure of raw PHP or JSP. They only provide the most basic ways to output data. They force you to put complex logic somewhere other than the HTML template.
For the most demanding enterprise-class applications, you will need a full scale application server with load balancing, enterprise frameworks, and other high-end featurees. One such app server is WebObjects. There are many others.
You're talking about some good things, but I'm still looking for why Tomcat is the only, or best, way to have this.
It's definitely not the only one, and the best is certainly a matter of what you're trying to accomplish. There are a lot of options out there, and it's understandable that you might be a little overwhelmed.
The first thing to do is determine what your needs are. A lot of people like PHP, and with good reason. It's fast, it's easy to learn, has a lot of very useful built-in functionality, and is open source. PHP can also interface with Java. However, it can be argued that PHP cannot provide the infrastructure and scalability that a pure Java solution can.
If you decided to use Java, you have a mind-boggling number of options open to you. The options range from free/open source to very expensive. You have servlets, JSP, Velocity, Cocoon, XML, application servers and much more. Java has hooks into just about every aspect of server-side application development right now. To choose one as the best is impossible. It might make things to think of Java as the platform for all of these things.
Tomcat, specifially, is a servlet/JSP engine. There are dozens of other such pieces of software. Tomcat tends to get more visibility because it is under the Apache banner.
So when deciding what to use depends on these varibles, in addition to others:
[1] Your timeline to complete your project
[2] Your existing programming knowledge
[3] Your budget/human resources
[4] Sophistication of the site/application you need to build
[5] Personal taste
There is no one perfect solution for everyone, but some are more popular than others. In your case, you probably want to choose something with broad community support and lots of free documentation, sample code, third party books, etc. In my personal opinion, if you're just getting started with web development, and have absolutely no idea what you want, try PHP. It will probably get you up and running the quickest. It also has a tendency to teach you web development concepts without you realizing it.
If you want to get more involved in web development as a career, you might also want to get a book that teaches you the Java language (ideally, with a focus on servlets). After that, you might have a clearer idea of what to tackle next.
- Scott -
Re:Why use PHP?
And if you wish to continue to use JSPs, check out Jakarta Struts. Struts provides a very nice way to continue using JSPs whilst still getting complete separation of presentation/controller/business logic. Highly recommended.
Gollo. -
Re:Why use PHP?Let's not forget that there are alternatives to JSP which might be even better to work with. I would strongly encourage you to check out Velocity.
As long as we're talking about templating engines, you might also want to have a look at the alternatives as well.
As mentioned below, Velocity is one of the possibilities, but there are others, including Webmacro, FreeMarker, and Tea. Each of these have thier own advantages and disadvantages, but all primarily focus on have a Model-View-Controller architecture, and try and enfoce separation between templates and the data the populates them. This is usually where JSP and ASP sites tend to fall down in practise.
And yes, I do have a favourite
;)Nicholas.
-
yeah, tomcat 3.x is a train wreckI don't know what happened between Apache JServe (Servlets 2.0 and JSP 1.0 via things like
gnujsp)and Tomcat, but man, talk about night and day difference in installation headaches.Quite frankly, I've yet to make Tomcat work completely right. Installing new servlets and writing JSPs was pretty easy under the old system, and the integration with Apache was pretty good, so you may be able to implement ~username servlet and JSPs using that system instead. (Unless you need something in the later specs.)
(I'm fooling with tomcat 4 on a win2k machine at the moment and it does look pretty smooth, but then I've only had about 15 minutes yet to mess with it.) -
MORE INFOThere seems to be three aspects to this worm:
- The IIS exploit. The worm tries to get hold of cmd.exe and other IIS vulnerabilities (there are too many to count). It can enter a target machine this way.
- The Outlook attachment exploit. This is the usual script attachment/dumb luser vulnerability.
- The network share exploit. The worm then searches the network for Windows shares, and plants
.eml files recursively in all the shares and subdirectories. It also infects .exe files. If you open any of these .eml files or run any of the .exe files, the worm will replicate again.
We were hit hard by this at my company today. Our IT department just didn't learn its lesson from Code Red, and allowed people to continue running IIS on their personal machines.
Wanna know how to get rid of it? People where I work have had success with the following:
- Stop and disable IIS.
- Apply the IIS patch, available from Micro$oft (not sure of the URL).
- Disable all your network shares.
- GREP your entire file system for readme.eml, and delete any executables that show up in this search.
- Delete all
.eml files from your system (a handy way to do this is with del /S *.eml at a command prompt)... - Make sure there are no
.eml files left, then reboot your machine. - Finally, install a real web server....this one is a good choice.
Bill Gates and Steve Ballmer should be drawn and quartered for this one... How much have these vulnerabilities cost companies in the last two years? It's just too bad that product liability laws don't apply to Micro$oft.
-
Re:SIGSEGVThe problem is apparent on Apache's below 1.3.12 and they appear to segfault when they obtain any query string containing a %2f.
Check out:
http://bugs.apache.org/index.cgi/full/543.
One of the requests made by the worm is:
"GET
/scripts/..%c0%2f../winnt/system32/cmd.exe?/c+dir HTTP/1.0" 404 309 "-" "-"You will probably find that this is not in your logs and that a segfault appears in it's place.
We failed to find any workaround but the server load is so low that we dont deem it worth the hassle of upgrading to a newer apache.
-
Re:Jakarta = Sun
-
Re:Why use PHP?
why PHP is so popular when JSP provides a much more robust solution
Let's not forget that there are alternatives to JSP which might be even better to work with. I would strongly encourage you to check out Velocity.
Don't want to get into a religious war about this one, but I can say that when I was evaluating my company's Enterprise solution a few months ago, Velocity seemed to be more flexible and offered a better way to separate design from code. JSP suffers from the same things that haunt developers using ASP - it's much too easy to end up with dirty (extremely dirty) code after a few rounds of maintenance. -
slightly offtopic, other jakarta stuff
also ant 1.4 was released recently (couple weeks ago). ant is a great build tool, i don't want to get into its features here (java and xml based build, replaces makefiles for my java builds, integrates with some IDEs and build verification/unit test tools (JUnit)). the reason i post here is because ant started out as a little tool with which tomcat developers build tomcat, and grew into its own tool. ant home page on jakarta.
-
GNU Make isn't just for compiling source code
Basically, there's a dependence flow, where each cell on a spreadsheet is referenced to cells on previous sheets.
The Free Software Foundation has a dependence flow manager that can track dependencies between objects in a filesystem and can call programs to re-create files when the files they depend on have changed. This tool is called GNU Make and comes with most distributions of a GNU system or a GCC development environment.
I'd actually love to move to a browser interface
And you can with server-side Ruby, Python, Java, or Perl. Simply port your simulation to a compiled or interpreted language, create a makefile to re-run the simulation whenever the input changes, and write CGI programs to coordinate the whole mess into a Web application. If the whole thing runs on one box (as is most often the case for a flat-file app), and that box must run Windows, use the Win32 version of Apache HTTP Server, the MinGW GCC distribution (or Cygwin if your app is GPL compatible), and ActivePerl or ActivePython.
-
Apache doesn't have to log this trash
If you're running Apache, you can do conditional logging by inserting the following in your main virtualhost:
SetEnvIf Request_URI "winnt" dontlog
SetEnvIf Request_URI "root.exe" dontlog
CustomLog /path/to/http_access.log combined env=!dontlog
Of course you can set this up to be any kind of log you want, not simply "combined". And, sorry if this has been posted before, but I really don't have time to read all the posts. More info here: http://httpd.apache.org/docs/logs.html#conditional