wood burning stoves 2.0*
The moose likes IDEs, Version Control and other tools and the fly likes Netbeans projects with basic web applications Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "Netbeans projects with basic web applications" Watch "Netbeans projects with basic web applications" New topic
Author

Netbeans projects with basic web applications

Olakunle Oladipo Oni
Greenhorn

Joined: Aug 28, 2008
Posts: 18
I want to be clear about using the netbeans IDE to implement java EE solutions. I’ve been getting myself acquainted with JAVAEE technologies in recent days and from my findings, I’ve discovered that it’s a good medium to start with. I have basic knowledge about how the IDE operates but I’ll appreciate if someone can clarify (giving practical steps on the basis of the IDE) on the issues I will raise about how to organize my codes for JAVAEE solutions on the netbeans IDE.
I want to create a basic web application and possibly try out others to gain expertise with JAVAEE solutions using the netbeans IDE. I intend to start with servlets before proceeding with JSP. The question I’m raising is based on a recent solution I tried to implement using netbeans.
(1) Firstly, how do I create a netbeans project that constitutes only a servlet and an associated resource like an html page with no index.jsp template. I want a basic application in which a user enters an employee ID from the HTML front end and the servlet on the basis of the supplied ID retrieves the employee data from a database and displays it. I have code for these web components (including database access) but I’m not very clear about implementing it on netbeans. Why I’m asking this question is because I feel the index.jsp within the project I created is interfering with the servlet file.
(2) A dialog came up in the process of creating the servlet file suggesting I (may) supply initialization parameters. I’ll appreciate if someone can highlight on how the supply of initialization parameter is applicable to the problem presented above and how (and in which context) I’m to supply these parameters in netbeans for solutions in general.
(3) The issue of URL mapping isn’t totally clear to me as well. I’ll appreciate a clarification of this issue with respect to the present problem and how to implement this in netbeans. With a clarification of these fundamental issues I believe I should be good to go with other problem solving ventures in the domain of servlets before going into JSP which I’m aware is based on servlet technology.

Olakunle Oni
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5823
    
    7

1) I think what you are asking is how to avoid having an index.jsp file as the welcome-file. This post might help: http://www.coderanch.com/t/487496/Servlets/java/set-Servlet-as-welcome-file

2) Only you know the answer to that question. The purpose of initialization parameters is so that your web app can be configured without having to rebuild the application. Usually it is used to settings that make a difference during application initialization, such as making database connections. Of course, there are better ways to make such connections, but that is one possibility.

3) I recommend doing a search on URL mapping. Once you know what it can be used for an have a specific question regarding it, you can ask here and we'll try to help. And actually, our servlet forum would be a better place to ask such a question.

JBoss In Action
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5823
    
    7

Reading question #3 again, maybe I misunderstood. Are you asking about the <url-pattern> within <servlet-mapping> within the web.xml file? (When asking IDE specific questions it often helps to identify the exact dialog, and how you got to that dialog, and the exact phrasing in that dialog.)
 
Don't get me started about those stupid light bulbs.
 
subject: Netbeans projects with basic web applications