Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » Servlet in Dynamic Web Project(annotation, initialized parameters, web.xml)
Servlet in Dynamic Web Project [message #851665] Sat, 21 April 2012 06:53 Go to next message
roy lou is currently offline roy louFriend
Messages: 10
Registered: April 2012
Junior Member
Environment:
Eclipse SR2 + Tomcat 7.0.26 + SE JDK 1.7
Description:
I created a servlet under a Dynamic Web Project in Eclipse and specified initialized parameter(s) in [Create Servlet] pane. After the new servlet is created, I couldn't locate <init-param> section in web.xml. Instead, the initialized parameters were found to be declared in the code as the form of annotation: @WebServlet(initParams = { @WebInitParam(name = "USD_CAD", value = "1.06")}) above servlet class definition.
Question:
1. Is there a way to create servlets within Dynamic Web Project without Eclipse using annotation approach? So that they will be showing in web.xml's <init-parm> sections? Thanks!
2. Does it take to configure somewhere in the Eclipse? Thanks!
Re: Servlet in Dynamic Web Project [message #851911 is a reply to message #851665] Sat, 21 April 2012 12:52 Go to previous message
Russell Bateman is currently offline Russell BatemanFriend
Messages: 3798
Registered: July 2009
Location: Provo, Utah, USA
Senior Member

On 2012.04.21 0:53, roy lou wrote:
> Environment: Eclipse SR2 + Tomcat 7.0.26 + SE JDK 1.7
> Description:
> I created a servlet under a Dynamic Web Project in Eclipse and specified
> initialized parameter(s) in [Create Servlet] pane. After the new servlet
> is created, I couldn't locate <init-param> section in web.xml. Instead,
> the initialized parameters were found to be declared in the code as the
> form of annotation: @WebServlet(initParams = { @WebInitParam(name =
> "USD_CAD", value = "1.06")}) above servlet class definition.
> Question:
> 1. Is there a way to create servlets within Dynamic Web Project without
> Eclipse using annotation approach? So that they will be showing in
> web.xml's <init-parm> sections? Thanks!
> 2. Does it take to configure somewhere in the Eclipse? Thanks!

Questions about Eclipse Dynamic Web Project are asked and answered in
the Eclipse web tools forum.
Previous Topic:problem with websphere application server
Next Topic:Jump to Matching Braces
Goto Forum:
  


Current Time: Thu Apr 25 08:53:04 GMT 2024

Powered by FUDForum. Page generated in 0.07798 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top