?
Solved

JSP's and information in URL's

Posted on 2004-04-30
3
Medium Priority
?
184 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 180 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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

New style of hardware planning for Microsoft Exchange server.
The well known Cerber ransomware continues to spread this summer through spear phishing email campaigns targeting enterprises. Learn how it easily bypasses traditional defenses - and what you can do to protect your data.
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
Suggested Courses
Course of the Month15 days, 3 hours left to enroll

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