Link to home
Start Free TrialLog in
Avatar of hhammash
hhammash

asked on

HTML pages in EE

Hi,

When I ask a question I receive the following address in the address bar:

https://www.experts-exchange.com/Web/askQuestion.jsp

After submitting the question,  the Address in the Address bar becomes something like this:

https://www.experts-exchange.com/questions/21221424/Positioning-of-CCS-for-a-menu-bar.html

This is a database driven website.  When I submit using askQuestion.jsp it goes to a database,  probably Oracle.  Then question becomes an .html page instead of
Q_21221424.jsp.

How is that done.  Submit a form using JSP then view the question in HTML,  also the question has a number.

Thank you



Avatar of riyasjef
riyasjef

Hi

For each question, seperate HTML page must be generated..Otherwise I do not think google can search the questions ..

RJ
They might have configured their webserver to parse
Q_21221680.html

into queryquestion.jsp?q=21221680

Or whatever.

Avatar of hhammash

ASKER

Hi RJ,

Thank you for your reply.

Each form will generate an HTML page with question ID.  But,  when you reply to a subject,  you add to the HTML page,  how is this done?

The HTML page itself is divided into the asker name and the persons who reply.  How is that done.  Is it limited to JSP or it can be done via ASP and PHP?

Thanks
ASKER CERTIFIED SOLUTION
Avatar of humeniuk
humeniuk
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Just noticed that my Apache's URL Rewriting Guide link is for Apache 1.3 and PaulPosition's is Apache 2.0.  I think the document is the same, but you probably want to use the 2.0 one just in case (if you're using Apache 2.0 and go that route).
Thank you for your detailed replies,  I'll take a look at the tutorials.

There is still a part to my question.  When you reply to my post,  it adds to this HTML page.  Is it also by rewriting and giving an anchor to it?

Thanks
The content of the page is dynamic.  When I submit this reply it will be added to the E-E database.  When you request this page, the E-E server will generate this page using the question id (21221680) to populate the page with your question and subsequent comments (including this one).

Each comment is given an anchor, ie. your last comment was #12686471 (hence https://www.experts-exchange.com/questions/21221680/HTML-pages-in-EE.html#12686471), but that is only for identification/navigation purposes.  The page could be populated without the anchor.

The URL will then be rewritten from whatever its dynamic form is ie. .../question.jsp?qid=21221680 to it's current form .../Q_21221680.html using the mod_rewrite (I presume since E-E is hosted on Apache servers).
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Hi,

Thank you all for the answers.

COBOLdinosaur,

Yes I've seen these pages even in ASP forums.

Yes the Javascript link worked.

Does this mean that this html page Q_21221680 does not exist?  Whenever we call it it gets generated?

Thanks
"Does this mean that this html page Q_21221680 does not exist?  Whenever we call it it gets generated?"
Right, it doesn't exist on the server in this form, but when you use the simplified URL https://www.experts-exchange.com/questions/21221680/HTML-pages-in-EE.html, it is able to interpret what you mean, create the page, and send it to you.
Nice procedure.

Final question:

- What is the purpose of generating HTML pages while we can simply have .jsp, .asp or .php?


Thank you
"Nice procedure."
Yes, very handy.

One reason touched on above is to make a URL more search engine friendly.  As noted, the major search engines can crawl and index dynamic page URL's up to a point.  Another reason is to simplify things for the website users.  I'm sure you've seen some wild and extremely long dynamic URL's on the web.  This process makes it much easier for us to use, remember, link to, and share these pages.  And in web development, ease of use is extremely important.
Thank you
For persons who are interested in doing the same thing using ASP.  Here is a good tutorial.

http://www.codetoad.com/asp_dynamic_static.asp

Thanks
Glad we could help.  Thanks for the A. :^)

Cd&
Glad to be able to help out.  Thanks for the A.
You are welcome,  thank you.