NetBeans Forums

 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
  

Deploy ServletExamples to another Server

 
Post new topic   Reply to topic    NetBeans Forums -> Java EE Users
View previous topic :: View next topic  
Author Message
Greybeard



Joined: 01 Aug 2011
Posts: 4

PostPosted: Mon Aug 01, 2011 6:11 pm    Post subject: Deploy ServletExamples to another Server Reply with quote

I'm a newbie to NetBeans and also to Java for that matter. That sets the base of my knowledge. I successfully open the ServletExamples in the IDE and I deploy and run it on my PC. The result is I decided it was useful for me. Before I modify it for my own use I wanted to go thru the procedure of actually deploying the web application to my external Web Host GoDaddy. I uploaded the contents of the web directory in my project chain which I knew wouldn't work 'cuz there's only html files and no servlets or classes. Of course, it failed on my external server with a 404 error when trying to run one of the servlets. I have no idea how to deploy this simple application and I'm concerned that I can't find _any_ documentation on deploying outside of the development environment. I'm a C++ developer trying to migrate to Java. This has been a little overwhelming to me. I thought C++ was complex. Perhaps I'm too dumb. Can anyone point me to a tutorial or demo or help or docs explaining how to actually make use of the web application I write? I tried searching but the amount of information is just really overwhelming me.

Thanks,
Greybeard
Back to top
Greybeard



Joined: 01 Aug 2011
Posts: 4

PostPosted: Tue Aug 02, 2011 7:14 pm    Post subject: Server Dependent Reply with quote

Interesting that the solution may be quite simple yet probably universal to all Tomcat Servers.

Servlets do not become available(deployed) until the Tomcat Server on my GoDaddy host is restarted allowing it to explode the .WAR file or read the web.xml file to know what the servlet to URL mapping is. The server is restarted once daily according to GoDaddy support. This Greybeard was just reminded of Server behavior that I should have been familiar with so my bad. Of course, the Tomcat Server inside the IDE is restarted for you under your control albeit transparent to the user.

I eagerly await the restart tomorrow at 1AM.

Greybeard
Back to top
mdeggers



Joined: 28 Jan 2009
Posts: 208

PostPosted: Tue Aug 02, 2011 8:03 pm    Post subject: Reply with quote

Actually it's a bit more complicated than that.

By default, Tomcat is installed in development and autodeploy mode.

For information about development mode, see this for Tomcat 6:

http://tomcat.apache.org/tomcat-6.0-doc/jasper-howto.html

In particular, note modificationTestInterval and recompileOnFail. Both
would be very expensive in a production environment.

For more information about autodeploy, see this for Tomcat 6:

http://tomcat.apache.org/tomcat-6.0-doc/config/host.html

In particular note autoDeploy, unpackWARs, and the entire section on
AutoDeploy at:

http://tomcat.apache.org/tomcat-6.0-doc/config/host.html#Automatic_Application_Deployment

I hope this helps explain the some of the differences.

. . . . just my two cents.
/mde/
Back to top
Greybeard



Joined: 01 Aug 2011
Posts: 4

PostPosted: Tue Aug 02, 2011 9:26 pm    Post subject: Reply with quote

Oh, I'm sure it is but I'm just hanging on for the ride. Thanks for the input. GoDaddy support includes a description on how to deploy web applications and I was quoting from that. I'm assuming their Tomcat is configured properly for autodeploy. At least the support description makes it sound that way and that the autodeploy directory is my root directory so that's where I placed my .WAR file.
Back to top
Display posts from previous:   
Post new topic   Reply to topic    NetBeans Forums -> Java EE Users All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB
By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo