• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Netbeans projects with basic web applications

 
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
author
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
1) I think what you are asking is how to avoid having an index.jsp file as the welcome-file. This post might help: https://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.
 
Peter Johnson
author
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.)
 
reply
    Bookmark Topic Watch Topic
  • New Topic