This week's giveaway is in the Java/Jakarta EE forum.
We're giving away four copies of Java EE 8 High Performance and have Romain Manni-Bucau on-line!
See jsp for the past few days (since im still new).. It gets the buttons that will be displayed in the jsp by parsing through a xml file.when you select a button, the button's value will then be the parameter passed in the request so that the next set of buttons will be shown. the trick is that there is only one jsp and only one xml file. i've already done the jsp but i cant seem to make the next set of buttons appear.. can anyone suggest a way to implement this?

here si the code:

<%@ page contentType="text/html; charset=iso-8859-1" language="java" import="java.sql.*" errorPage="" %>
<%@ taglib uri="/WEB-INF/taglibs-xtags.tld" prefix="xtags" %>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Dynamic Page</title>

String searchby = (String)request.getAttribute("SEARCHBY");
if (searchby == null) {
request.setAttribute("SEARCHBY", "phenotype");
String peep = "//"+(String)request.getAttribute("SEARCHBY");
String miki = "name("+peep+")";

<xtags arse uri="/buttons.xml"/>
<xtags:variable id="name" select="<%=miki%>"/>

<table border="1" align="center" cellspacing="5" cellpadding="5">
<th>Search By:</th>
<xtags:forEach select="<%=peep%>">
<input type="button" value='<xtags:valueOf select="name"/>'/>


**sorry bout the variables,i was planning on changing it later on..
Ranch Hand
Posts: 541
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Next time please use the UBB Code buttons you see next to the post box. There is one specifically for Code, so it stops stuff like that smiley appearing.

I'm not totally familiar with everything your using but I hate a few questions:

1. Where is your <form> HTML element?
2. Where are you setting the SEARCHBY element? You need to set it somewhere for it to appear as a parameter to the next page.
[ June 26, 2005: Message edited by: Tim Baker ]
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!