Solved

JSP's and information in URL's

Posted on 2004-04-30
3
180 Views
Last Modified: 2010-04-01
Hi all

The trouble I am having is this...

I have a number of pages that all use the same header, footer and navigation bar, the only difference between them is that they have a different form (html page), one is user registration, 1 is login etc...

I want to create a page where i can send it a name in the url

e.g.
template.jsp?content=logIn

then i need to get the name of the parameter(content) and use it to include the html form...

Can anyone please tell mehow to do this

Many thanks in advance
0
Comment
Question by:KrisM82
[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
3 Comments
 
LVL 4

Accepted Solution

by:
indigostark earned 45 total points
ID: 10959655
in your main template.jsp
have something like the following

<%
       String content = request.getParameter("content");
       
       if(content.equalsIgnoreCase("login"))
       {
%>

<%@ include file="loginForm.htm" %>

<%
      }
       else if(content.equalsIgnoreCase("registration"))
      {
%>

<%@ include file="registrationForm.htm" %>

<%
       }
%>

etc........................
0

Featured Post

Independent Software Vendors: 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!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
issue with pdf generation 2 96
spring dependency injection using java config 2 91
gZip compression filter 2 182
authenticate preemptively soap ui option 3 172
Read  the original post  on Monitis Blog. Hi.  My name is Erik Dietrich, and this is the first time I’ve posted on the Monitis blog.  By way of introduction, I thought it would make sense to talk about my initial experience with Monitis.   Befo…
Did you know that more than 4 billion data records have been recorded as lost or stolen since 2013? It was a staggering number brought to our attention during last week’s ManageEngine webinar, where attendees received a comprehensive look at the ma…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

726 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