File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Servlets and the fly likes how to read value of <a> tag in servlet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "how to read value of <a> tag in servlet" Watch "how to read value of <a> tag in servlet" New topic
Author

how to read value of <a> tag in servlet

gayatri umesh
Greenhorn

Joined: Aug 26, 2009
Posts: 17

In servlet, i gave this

Nothing is printed....kindly help......
Max Rahder
Ranch Hand

Joined: Nov 06, 2000
Posts: 177
Your code should work. If nothing is printed, not even "null", then you probably aren't getting to your servlet at all. If you set a break point in the servlet, is it hit? If not, your web.xml URL mapping may be wrong. (Or some other mapping file, if you're using something like Struts.)
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18541
    
    8

What do you mean when you say "printed"? In most cases, System.out.println() in a servlet will write to a log file somewhere in the servlet container. Did you expect "A" to show up in the generated HTML? Or what?
Sebastian Janisch
Ranch Hand

Joined: Feb 23, 2009
Posts: 1183
Use



if you want to return text to the client.


JDBCSupport - An easy to use, light-weight JDBC framework -
gayatri umesh
Greenhorn

Joined: Aug 26, 2009
Posts: 17
When i run the jsp, and click the link 'A', it goes to the ProductController servlet....but nothing is displayed....
gayatri umesh
Greenhorn

Joined: Aug 26, 2009
Posts: 17
i gave System.out.println() and the output prints in the console..I am using RAD..I tried displaying the value using PrintWriter object also....
Sebastian Janisch
Ranch Hand

Joined: Feb 23, 2009
Posts: 1183
Try to see what parameters come in.

First output a hard coded literal to see if the servlet gets executed.

Then do Enumeration<String> params = request.getParameterNames();

iterate over that Enumeration and see what comes up.
Shruthi Sam
Ranch Hand

Joined: Jul 09, 2008
Posts: 73
Hey,
Its working for me... check once again

Here is the code i tried...

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how to read value of <a> tag in servlet