Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa JSF-Questions JSP Parse did not work

Have Programming Question? Ask it here!
 
 
 


Sakai
JSP Parse did not work
1 Answer(s)      4 years and 8 months ago
Posted in : Java Server Faces Questions



Advertisement
View Answers

December 17, 2009 at 10:31 AM


Hi Friend,

Modify DropDown.java and output.jsp:

1)DropDown.java:

import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;

public class DropDown extends HttpServlet {
public void doPost(HttpServletRequest request, HttpServletResponse response)throws IOException, ServletException{
PrintWriter out = response.getWriter();
String selectedValues[]=request.getParameterValues("Feedback");
for(int i=0;i<selectedValues.length;i++){
request.setAttribute("value"+i, "" + selectedValues[i]);
}
request.getRequestDispatcher("/jsp/output.jsp").forward(request, response);
}
}

2)output.jsp:

<html>
<body>
<%String selectedValues[]=request.getParameterValues("Feedback");
for(int i=0;i<selectedValues.length;i++){%>
<%=request.getAttribute("value"+i)%>
<%
}
%>
</body>
</html>

Thanks


Related Tutorials/Questions & Answers:
JSP Parse did not work - Java Server Faces Questions
JSP Parse did not work  I have these codes: =========================================================================== index.jsp: "Poor" "Good" "Very Good" "Excellent" DropDown.java: import java.io.
Did my upgrade from mySQL 5.1 to 5.5 work
Did my upgrade from mySQL 5.1 to 5.5 work  Did my upgrade from mySQL 5.1 to 5.5 work
Advertisements
JSP and Servlet did not run - JSP-Servlet
JSP and Servlet did not run  I tried to run this program but when I clicked submit button it give me; HTTP Status 404- and did not give me display... --------- Simple Use of Servlet and JSP
work - JSP-Servlet
JSP Work Directory   What is the absolute path for the JSP working directory
How to Work - JSP-Servlet
doing final year project using java,jsp,servlet.i only know java.i want details about where we save the jsp and servlet file and how we link with java.send one model database program with where we save that program using jsp,servlet,java
parse in iphone
parse in iphone  <p>{ itemCount: 2, subtotal: "$15.50", items:[ { title: "The Big Book of Foo", description: "Bestselling book of Foo by A.N. Other", imageUrl: "/images/books/12345.gif
parse xml
parse xml   <STATES> <STATE sname="AndhraPradesh" > <DISTRICT dname="Ananthapur" > <address> Apollo...; </STATE> How to parse the above xml. please help me   Here
parse map in java
parse map in java  What is a Parser? Can you give the source code to parse map in Java
php parse string to time
php parse string to time  I am looking for a solution to parse a string into a formatted date time string
parse url iphone sdk
parse url iphone sdk  How can i parse two different URL's using NSXMLParser
php parse string for url
php parse string for url  Do i need a regex to parse a URL-type string in PHP
php parse ini string
php parse ini string  Need to know how to parse the ini file to extract values
php parse string into array
php parse string into array  How can i parse a string into array and convert an array into string
php parse ini array
php parse ini array  I wanted to parse a variable inside a variable value. Can any one give the example
php parse string to float
php parse string to float  Is there any Regex or way to get float from a string
php parse ini file
php parse ini file  I need a simple and easy example to Parsing an ?advanced? INI file with PHP
php parse soap response
php parse soap response  What is soap and how can i convert a soap response to XML. Thanks in Advance
php parse string as php
php parse string as php  Best way of parsing a string within a string
php parse subdomain
php parse subdomain  Basically, looking for a example on how to let PHP to create subdomain automatically for each user? Is it possible to retrieve subdomain as a get variable
php parse string to date
php parse string to date  In my app i have a date string in the following format: $date = "08/20/2009"; Can you suggest how can i separate each part of the date
php parse string as int
php parse string as int  While trying to pass string to int using int() i get the following error: Call to undefined function int() Why it is throwing an error
date_parse
date_parse() in PHP date_parse function returns associative array... error. Description on Date Parse Format in PHP array date_parse ( string $date ) Parameters of date parse class PHP date - Date in format accepted
JavaScript parse date
JavaScript parse date..., you will learn how to parse the date in JavaScript. JavaScript provides the function parse() that takes a date in string format and returns the equivalent
Could not parse configuration: hibernate.cfg.xml
Could not parse configuration: hibernate.cfg.xml  Hi, I am getting the error- log4j:WARN No appenders could be found for logger.... Exception in thread "main" org.hibernate.HibernateException: Could not parse
jvm work
jvm work  wht is the work of jvm? deaply.   Hi Friend, Java Virtual Machine or JVM for short is a software execution engine to run the java programs. Java Virtual Machine is also known as "Java Interpreter" which
How to work with POST method in jsp page
How to work with POST method in jsp page       This is detailed JSP code, how to use POST method instead of GET method in jsp page. GET is default method for sending
how to parse xml in j2me tutorial
how to parse xml in j2me tutorial   i want to parse xml file in j2me wireless toolkit.i saw ur examples & source code for parsing xml file in j2me & i try to execute same example on my pc i some how manage to run
date_parse_from_format
  date_parse_from_format date_parse_from_format function returns... about given date. Description on PHP Date Parse Format array date_parse_from_format ( string $format , string $date ) Parameters of Date Parse Function PHP
parse a file into primitive binary format
parse a file into primitive binary format  Hi, I need help converting an audio file or any other file to its primitive binarty format, and when I read the inputstream I find it some integers and I don't know its binary
Use of <x:parse> tag of JSTL
:parse> tag of  Xml tag library of Jstl. This tag is used to parse...;http://java.sun.com/jsp/jstl/xml" %>  Attributes: ... at hand. parse_xmlJstlTag.jsp <%@ taglib prefix="c" uri
Message Resource Bundle work.
Message Resource Bundle work.  How does Value replacement in Message Resource Bundle work
validator framework work in Struts
validator framework work in Struts  How does validator framework work in Struts
how to parse a csv file using standard libraries?
how to parse a csv file using standard libraries?  hie i am a beginner in java i want to parse a csv file using any standard libraries i want to know how the libraries are imported and used in eclipse thanks in advance
Mysql Date Parse
Mysql Date Parse       Mysql Date is used to parse the string date time in Date Format function... illustrate an example from 'Mysql Date Parse'. To understand and grasp example we use
collection frame work
collection frame work  explain all the concept in collection frame work
how formBackingObject() method will work.
how formBackingObject() method will work.  How the formBackingObject method will behave
i got illegal start of expression error , plese tell me the mistake where i did...
i got illegal start of expression error , plese tell me the mistake where i did...   import org.springframework.context.*; import java.util.*; public class MyListener implements ApplicationListener { public static void main
Parsing The XML File Using JDOM Parser in JSP
Parsing The XML File Using JDOM Parser in JSP       In this example we show how to work with JDOM parser to parse the xml document. JDOM can read existing XML documents
collection frame work
collection frame work  could you please tell me detail the concept of collection frame work
collection frame work
collection frame work  explain the hierarchy of one dimensional collection frame work classes
validate() method of ActionForm work
validate() method of ActionForm work  How does validate() method of ActionForm work
socket connection: how to parse data from server?
socket connection: how to parse data from server?  hi, I am a j2me programmer,i want to retrieve some data from server using socket connection,I h'v... with inputstream read() method. Now I want to know, how to parse the data from
how do you parse by reference in java(with JGrasp)
how do you parse by reference in java(with JGrasp)  i am a 1st year beginner in java programming(GR 10) at hillcrest High School in south Africa My question is how do you parse by reference in java(with JGrasp) please help me i
Java code to parse xml - Java Beginners
Java code to parse xml   TL1 10.50.26.98... to parse the code and get the values from.../GetData.shtml The example explains how to parse a xml document. Thanks
How to work with Ajax in spring
How to work with Ajax in spring  give some sample code for ajax with spring (example like if i select a state from one drop down in another drop down related districts should come
ios work with nsdictionary
ios work with nsdictionary  How to work with NSDictionary in Objective C?   Working with NSDictionary in Objective C Basically, in Objective C NSDictionary is used to create and retrive the Key values for objectecs
Can you see what i have done because i did it but i still have problem - SQL
Can you see what i have done because i did it but i still have problem  This is what i have done but i still have a problem:- Can you correct my mistakes? ------------------------------------------------------- create database
JFreeChart dosn't work
JFreeChart dosn't work  Hello everybody I'm trying to make a line chart from JFreechart, but I just can't get it to work. The graph get its data... it, an error occurs (i tried an example from here, with XY, and it didn't work either) I
org.hibernate.InvalidMappingException: Could not parse mapping document - Hibernate
org.hibernate.InvalidMappingException: Could not parse mapping document .... Exception occur:Could not parse mapping document from resource event/Sample.hbm.xml org.hibernate.InvalidMappingException: Could not parse mapping
How to parse the attributes values from XML using KXML parser in j2me
How to parse the attributes values from XML using KXML parser in j2me  hai team, i did xml parsing from serverside...i got a resultant value from xml,but here tag value name only came from parsing attribute name cant come
 

 

 

DMCA.com