• 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

how to write servlets without using NetBeans software

 
Ranch Hand
Posts: 1087
Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
how to write servlets ,deployment descriptor,model etc maually?
 
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Start typing?

What problems are you actually having?
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I always suggest that beginners start with the examples provided with the Tomcat distribution and modify them. Much easier to learn from your mistakes by starting with working code and make mistakes that break it than try from scratch.

Bill
 
Vishal Hegde
Ranch Hand
Posts: 1087
Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i mean creating new folder such as web-inf, src,test etc if its done how to compile serverside and client side is by by using


javac classname.java?
 
William Brogden
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I cant make any sense out of that. Code for servlets is compiled just like any other Java code. Like I said, study the examples provided, including the web.xml files and the way the examples directory is laid out.

Bill
 
David Newton
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If you're writing a webapp there's no compiling on the client side.

I'm still not sure what you're trying to do: you can write a web.xml by hand (easily), write a servlet, create a WAR file, and deploy it all by hand really easily. Are there specific steps you're having a problem with?
 
Vishal Hegde
Ranch Hand
Posts: 1087
Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
with netbeans ,yes i am specific by steps, but manually like creating folders i am not..Even if i create folder and all class files and all

what shhould be the 1st thing to compile servlets or model or view,controller and how to set the class path manually for the servlets ,model,controller


Also i have no idea about XML ..just know thaat they are reffered as deployment descriptor from where to learn XML and whatever folders i created how to put it on a server side (by the way i am trying on the same local machine)
 
David Newton
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'd probably just search the web for a basic Java web app tutorial; it gives the directory hierarchy, where various files go, and what they should contain.
 
Saloon Keeper
Posts: 27762
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Tomcat's documentation includes a pretty good description of the architecture of a WAR, and WARs are the basis of every J2EE web application. So it's a good thing to read up on.

Start here: http://tomcat.apache.org/tomcat-6.0-doc/appdev/index.html

The actual WAR layout information is here: http://tomcat.apache.org/tomcat-6.0-doc/appdev/deployment.html

There's also a section provided on how to organize project source for building with the ANT tool. Because of the multitude of different tasks it takes to build a WAR, I recommend you use a command-line build tool like Ant or Maven. Back before they were invented I used scripts and it wasn't much fun.

I make it a firm policy that ALL my projects can be built from the command without an IDE. While an IDE is a helpful thing to have, you shouldn't have to depend on it to make critical production builds. I learned this the hard way from IDEs that had become incompatible and from projects that people sent me that could only build if I had the exact same brand and version IDE as they did and had configured a lot of desktop-level items the exact same way they had. On top of that, one place I worked did production builds on a non-GUI machine. Where an IDE wouldn't work at all!
 
Ranch Hand
Posts: 82
2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If you are trying to understand how the servlets work, I would highly recommend the Head First Servets and JSP. I have been working with that and it has explained how to set-up all the files manually, creating the XML files and a good explanation of how the container works.
 
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
There's a section in our Cattle Drive area on building servlets.

The tutorials there don't rely on IDEs.
 
reply
    Bookmark Topic Watch Topic
  • New Topic