Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 3 of 3

Thread: servlet init param

  1. #1
    Junior Member
    Join Date
    Oct 2011
    Posts
    25
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default servlet init param

    Hi,
    I am creating a web application using some init param for servlet.
    I am using tomcat 6.
    When I am using a '&' character in init param value tag I am getting error.
    What may be the reason.

    I do not know is this right place to post or not.

    bean factory
    Last edited by abani; December 18th, 2011 at 02:10 AM.


  2. #2
    Member
    Join Date
    Oct 2011
    Posts
    42
    Thanks
    0
    Thanked 3 Times in 3 Posts

    Default Re: servlet init param

    Quote Originally Posted by abani View Post
    Hi,
    I am creating a web application using some init param for servlet.
    I am using tomcat 6.
    When I am using a '&' character in init param value tag I am getting error.
    What may be the reason.

    I do not know is this right place to post or not.

    Regards
    Abani
    You must escape the & character as a XML element: &

    java exception
    Last edited by hns1984; January 11th, 2012 at 06:56 PM.

  3. #3
    Member
    Join Date
    Nov 2011
    Posts
    37
    Thanks
    0
    Thanked 1 Time in 1 Post

    Default Re: servlet init param

    Hi,
    You can use hex code for & character and check.

    Core java
    Last edited by mr.miku; January 11th, 2012 at 07:13 PM.

Similar Threads

  1. servlet
    By selva in forum Java Servlet
    Replies: 2
    Last Post: August 7th, 2011, 10:59 PM
  2. What are the requirements to develop Servlet Application?
    By yousef atya in forum Java Servlet
    Replies: 2
    Last Post: July 28th, 2011, 06:20 PM
  3. collecting information/moving from servlet to servlet
    By CBird in forum What's Wrong With My Code?
    Replies: 0
    Last Post: March 1st, 2011, 07:04 PM
  4. Servlet or Jsp?
    By flangofas in forum JavaServer Pages: JSP & JSTL
    Replies: 3
    Last Post: December 8th, 2010, 11:54 AM
  5. Can i call init() method in destroy method.?
    By muralidhar in forum Java Servlet
    Replies: 1
    Last Post: October 22nd, 2010, 11:18 AM

Tags for this Thread