Solved

retrieve HTML Meta tag in servlet

Posted on 2002-06-27
8
509 Views
Last Modified: 2013-11-24
hi,
i want to get the value of meta tag defined in the html header in servlet.
if the html header contains
<meta name="myName" content="abc">

then in servlet, i want to retrieve the value of myName.

How should i do it???


0
Comment
Question by:kulsmadya
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
8 Comments
 
LVL 19

Expert Comment

by:cheekycj
ID: 7114528
Is this a part of the response?

AFAIK, you can't read response headers in Servlets.

CJ
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 7115008
Is the html file on the server or is it being uploaded to the server?
0
 

Author Comment

by:kulsmadya
ID: 7115319
i will get the http post message from a servlet.
& the post message will contain the header fields defined like meta as i have mentioned above.
So, i need to read these meta fields in my servlet for further processing.
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 86

Accepted Solution

by:
CEHJ earned 50 total points
ID: 7115383
I'm not sure how meta tags should be getting in to the header fields of a POST request. These are the sorts of headers usually found in an HTTP request:

From
Accept
Accept-Encoding
Accept-Language
User-Agent
Referer
Authorization
Charge-To
If-Modified-Since
Pragma

I order for the servlet to receive and read meta tags, you would have to do something like:

1. Read the meta tags at the client and put them into a POST query string
or
2. Upload the html file and extract its meta tags
0
 

Author Comment

by:kulsmadya
ID: 7115429
for ur 2nd option,

do i need to parse the html page & find the META Tag & get the name & content? is this what u meant???
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 7118182
Yes
0
 
LVL 35

Expert Comment

by:girionis
ID: 8893467
No comment has been added lately, so it's time to clean up this TA.

I will leave a recommendation in the Cleanup topic area that this question is:

- points to CEHJ

Please leave any comments here within the
next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER !

girionis
Cleanup Volunteer
0

Featured Post

Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
CSV file parsing thru Java 13 40
java example issue 5 46
How to configure empty element in XML Document parser? 15 45
Eclipse for Java EE development 2 45
Java Flight Recorder and Java Mission Control together create a complete tool chain to continuously collect low level and detailed runtime information enabling after-the-fact incident analysis. Java Flight Recorder is a profiling and event collectio…
Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
Video by: Michael
Viewers learn about how to reduce the potential repetitiveness of coding in main by developing methods to perform specific tasks for their program. Additionally, objects are introduced for the purpose of learning how to call methods in Java. Define …
Viewers will learn about the different types of variables in Java and how to declare them. Decide the type of variable desired: Put the keyword corresponding to the type of variable in front of the variable name: Use the equal sign to assign a v…

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question