Get a server running locally to run a Struts app

AI Thread Summary
To run a local server for a Java web application, it is essential to compile the code using Ant and ensure access to the necessary libraries, particularly servlet.jar, which may not be found if only Eclipse is installed. The application can be packaged into a WAR (Web Application Archive) file, which is suitable for deployment on a web server like Tomcat. By placing the WAR file in the server's auto-deploy directory, the web application can be accessed via a browser at the specified localhost URL. It is recommended to start with a simple JSP (Java Server Pages) application before progressing to more complex frameworks like Struts.
DaveC426913
Gold Member
Messages
23,830
Reaction score
7,815
I need to get a server running locally so I can run my 'Hello World' Java Web app.

http://benmira.free.fr/en/j2ee/struts1.htm" I'm using. Unless I misunderstand, all I really need to do is copy all the code into flat files with the appropriate filenames - and then compile it with Ant.

But how do I run it? At some point I'll need to call http : //localhost:8080/hello/HelloWorld


To compile I'm going to need access to servlet.jar. A search of my drive shows nothing except associated with the Eclipse editor, yet I've got java rle and java sdk installed. I'm obviously missing some component.
 
Last edited by a moderator:
Technology news on Phys.org
Well if nothing else you should be able to produce a war file. War is like a jar but suited for deploying on a web server. You put the war in the auto-deploy directory of the server, and when the Tomact or whatever Java server you have running it will deploy the web app from the war. Then you can access it. I would advise you to first make a simple JSP(Java Server Pages) appliaction and then go with Struts or some other web framework.
 
Dear Peeps I have posted a few questions about programing on this sectio of the PF forum. I want to ask you veterans how you folks learn program in assembly and about computer architecture for the x86 family. In addition to finish learning C, I am also reading the book From bits to Gates to C and Beyond. In the book, it uses the mini LC3 assembly language. I also have books on assembly programming and computer architecture. The few famous ones i have are Computer Organization and...
I have a quick questions. I am going through a book on C programming on my own. Afterwards, I plan to go through something call data structures and algorithms on my own also in C. I also need to learn C++, Matlab and for personal interest Haskell. For the two topic of data structures and algorithms, I understand there are standard ones across all programming languages. After learning it through C, what would be the biggest issue when trying to implement the same data...
Back
Top