Solved

retrieve HTML Meta tag in servlet

Posted on 2002-06-27
8
487 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
8 Comments
 
LVL 19

Expert Comment

by:cheekycj
Comment Utility
Is this a part of the response?

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

CJ
0
 
LVL 86

Expert Comment

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

Author Comment

by:kulsmadya
Comment Utility
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
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 86

Accepted Solution

by:
CEHJ earned 50 total points
Comment Utility
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
Comment Utility
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
Comment Utility
Yes
0
 
LVL 35

Expert Comment

by:girionis
Comment Utility
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

INTRODUCTION Working with files is a moderately common task in Java.  For most projects hard coding the file names, using parameters in configuration files, or using command-line arguments is sufficient.   However, when your application has vi…
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…
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.

771 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now