Solved

JSP's and information in URL's

Posted on 2004-04-30
3
176 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
3 Comments
 
LVL 4

Accepted Solution

by:
indigostark earned 45 total points
Comment Utility
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

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

In this article, you will read about the trends across the human resources departments for the upcoming year. Some of them include improving employee experience, adopting new technologies, using HR software to its full extent, and integrating artifi…
A procedure for exporting installed hotfix details of remote computers using powershell
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

772 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