Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Servlets parameters(Urgently)

 
Sree Devi
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Actually Iam new to Servlets.Now,I want to link to a web page from my servlet program.Can anyone give me the syntax for this.
Also,I want the information about how to initialize parameters for one servlet through web.Xml Plz answer me in detail.
Thank You
 
Anthony Karta
Ranch Hand
Posts: 342
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi there,
are you trying to finish your assignment now?

for Q#2, here you go:
<servlet>
<servlet-name>xxxName</servlet-name>
<servlet-class>com.aaa.xxx</servlet-class>
<init-param>
<param-name>param</param-name>
<param-value>paramValue</param-value>
</init-param>
</servlet>

I'm not fully understand your Q#1, what you want to achieve?
want to redirect the page? try something like this:
responseObject.sendRedirect("http://xxx.com/index.html")

regards
tony
 
Jeroen Wenting
Ranch Hand
Posts: 5093
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
remember that stating you want an URGENT response NOW!!! is considered extremely rude.
You're not paying anyone, we're all just trying to help others here for no pay.

Your servlet will generate some output. Typically that's HTML. If you place a normal hyperlink in that HTML there's your link right there.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!