[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

Question
[x]
Attachment Details

How to run a Java Web Application with Netbeans + Tomcat 6

Asked by koolmind in NetBeans IDE, Apache Tomcat Application Server, Java Server Pages (JSP)

Tags: NetBeans, Tomcat 6, Java, Jsp

Hi

I'm trying to run a simple Java Web Application on netbeans.
Every time I try to run my project, the project folder is deleted and Tomcat (obviously) cannot find anything to run!

Someone on this site was talking about wrong deploying and building folder... but I cannot find anything to modify on Netbeans IDE to make things works!

I tried to execute my script directly from my web browser, once I called a "Clean and Build" command on NetBeans.

If I do that, something is shown.. but another problem comes out!
The partially working code is located into [TOMCAT]/webapps/firstJSP/build/web/ . That creates a serious problem using <jsp:useBean />. Pratically the server cannot find the bean class and throw  exceptions about wrong parameters and so on.

The problem is easily solved if I copy all files from [TOMCAT]/webapps/firstJSP/build/web/  to [TOMCAT]/webapps/firstJSP/

But I have to do it manually every time I modify and re-build my project!! It's not tollerable!

So I'm asking you: "How can I build (and then deploy) correctly my files, so that the results is written directly on the context root [TOMCAT]/webapps/firstJSP/ ?

I'm absolutely sure that I'm doing things in a wrong way (I'm very new to JSP programming!!), so I need your help to go on!

---

I have to add something new.
I tried to make another project, setting [TOMCAT]/NewDir/WebApplication1 as project directory...  now I can build my project without deleting the project folder! How is it possibile?? Why there's no trace of my project into webapps folder?

Thank you!
 
Loading Advertisement...
 
[+][-]08/18/09 02:21 PM, ID: 25127818Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08/21/09 04:47 AM, ID: 25150770Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20091111-EE-VQP-89 - Hierarchy / EE_QW_3_20080625