aspose file tools
The moose likes Servlets and the fly likes Is j2ee required for servlet? Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of Mongo DB Applied Patterns this week in the MongoDB forum
or a resume review from Five Year Itch in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Servlets
Reply Bookmark "Is j2ee required for servlet?" Watch "Is j2ee required for servlet?" New topic
Author

Is j2ee required for servlet?

Madhusudan Banik
Greenhorn

Joined: Jan 14, 2007
Posts: 10
Hi, i have already installed j2se 1.6 and apache tomcat 5. I running successfully JSP page. But trouble with servlet. Is j2EE is needed to successfully run servlet? Thanks in advance.
Vassili Vladimir
Ranch Hand

Joined: Mar 08, 2007
Posts: 1585
Hi,

To run a Servlet or a JSP, you don't need a fully compliant J2EE Application Server, you just need a web container like Tomcat to run a web component ...

Best of luck ...


Vassili ...
SCJP 5.0, SCWCD 1.4, SCJA 1.0
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 56150
    
  13

"Max Ant", please check your private messages for an important message from me.


[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 56150
    
  13

What problems are you encountering? Is it in compiling or in running the servlets?

As pointed out, you don't need anything more than Tomcat and J2SE.
Madhusudan Banik
Greenhorn

Joined: Jan 14, 2007
Posts: 10
Firstly i get compilation error due to some HttpServlet related classes. Then i add the classpath variable servlet-api.jar form the tomcat\common\lib\ and the program compiles successfully. But now i get 404 not found error from the browser.
I make these
put Hello.class file into webapps\ex1\WEB-INF\classes\
and make a web.xml file and put it webapps\ex1\WEB-INF\
and from the browser http://localhost:8080/ex1/Hello

It get me the 404 file not found error.
I need to dig it why this happens.
Any advice will be appreciated.
Madhusudan Banik
Greenhorn

Joined: Jan 14, 2007
Posts: 10
My problem was solved.
It's wordpad related problem.
I edit my web.xml file using wordpad and its add some extra character which give me these trouble.
 
I agree. Here's the link: http://zeroturnaround.com/jrebel
 
subject: Is j2ee required for servlet?
 
Similar Threads
If I use xp, will I be unable to run the J2EE 1.3 RI ?
Java development on Windows-95
Trying to deploy a web component...
Successfull J2EE projects
j2ee Server Error