I am new to java and jsp.How can I deploy a jsp project to war file ?
which software can be used and how ?
| SitePoint Sponsor |



I am new to java and jsp.How can I deploy a jsp project to war file ?
which software can be used and how ?

war is zip file.
You have to zip your project and rename to war.
I advise you to use NetBeans. It comes with tomcat and jsp debugger.
It will deploy automatically for development and build war.
An alternative for NetBeans is Eclipse (http://www.eclipse.org/)

Eclipse is great but NetBeans is better in that case.
Netbeans is simpler for those who start. It is much simpler.
http://download.netbeans.org/netbeans/6.1/final/
Download "Web & Java EE" or "All"
+ You need JDK but I guess you already have it.
---
Here are steps
1. New Web project
2. New JSP Page
3. Build
project has dist folder and it will have war.
-----
In Eclipse it is harder as Eclipse comes without Tomcat and without extension to control tomcat.
I do not remember if eclipse was able to debug JSP pages.
BTW I do not like JSP. (Just like PHP) We can talk about that![]()




Download and use Eclipse.
For a Web project, you need download Tomcat plugin (into Eclipse) and then Open/ Create a Tomcat project in Eclipse.
WAR is a deployment file, an existing Web application directory can be exported into WAR and vice-versa.




I don't remember exactly,
but I'd downloaded that plugin from here, I guess:
http://www.eclipsetotale.com/tomcatPlugin.html
We need put it into Eclipse plugin directory, after that we can create a Tomcat project and start/ stop Tomcat from Eclipse.
Sadly, am also naive to this (however still liked to share this information); so please help yourself
I knew that much I'd said!





First... have you tried searching for this on the internet, maybe with google? There are tons of tutorials on how to create a war file.
Anyway...
A WAR is just a zip file, you could create a war with winzip or winrar or some other zip utility. However it is a lot easier to use something like Eclipse or Netbeans. Both fine products although personally I like Eclipse better. You don't need the tomcat plugin just to generate the war, in fact Eclipse WTP has pretty good support for Tomcat as is. I'm not exactly sure what the plugin does, probably gives more features of what you can configure but you don't need it just to create the WAR.
If you have a web project in Eclipse you can just right-click the project in the Project Explorer pane and select "Export... --> WAR File". The rest should be straight forward.
Sysdeo's Tomcat plugin for Eclipse guideseeq is referring to is really good. What I like the most about it is the ability to debug my server app as if it were just a standalone Java program.
Plus there are some other conveniences, like connecting stack trace logs with their corresponding source lines, hot bytecode update on editing, etc. Can't even imagine what life was like before Sysdeo![]()

NetBeans has everything eclipse has including hot bytecode update BUT it comes with everything configured and you do not have to install sysdeo plugin or tomcat.





I prefer Eclipse hands down. You do not need Tomcat Plugin..actually I've never heard of this. All you have to do is create a project called "Web Project", then configure a tomcat server in Eclipse (Window->Show View->Server), and add your project by right clicking that server and choose "Add Deployment"
Besides this!!! there's a easier way to deploy your JSP. Well, that's assuming all your code is 100% in JSP. If you're using a server like tomcat, create a directory under webapps. Say "abc", then drop your jsp files "a.jsp", "b.jsp". Run the server and you can access those pages like http://localhost:8080/abc/a.jsp. This would be the way for quick and dirty way.

I don't knew if Eclipse has something to manage HTTP projects.
So all people here say about Tomcat plugin.
Using that I was able to start/ stop and run HTTP application from Eclipse.
Months back, I'd seen MyEclipse what is fantastic IDE but 30-day free trial only.
Companies, for example, GE or IBM etc. have customized things for all that work but I don't know something better than Eclipse is free.





Yeah MyEclipse looks pretty nice, but it's not free. My preference is actually IntelliJ, but that's also not free, but the latest release of Eclipse Web Tools (Ganymede) is really good and 100% open source/free. It has very good integration with Tomcat, if by http you mean connecting with Apache then I don't think it can be done without a plugin, but I don't need that for Java development.





Since MyEclipse supported Maven, our whole team has converted. To me MyEclipse is more than enough and I don't want to learn yet another IDE that does the same thing.
how to create installsheild for eclipse plugin project??
or
how to deploy the eclipse plugin project for setup and shortcut icon like this........





In general you should create a new thread ... even as I'm writing this I'm seeing a warning not to reply to threads over 1 month old... and I agree. Also your question has nothing to do with this thread other than the word "deploy" which is used in a different context.
That said, have you tried searching for information on those topics?
Bookmarks