3,760 Topics
| |
The code I have written in Servlet is as follows: [code=Java]ArrayList news=admindelegate.getNewsdelegate();//this is defined already request.setAttribute("news",news); rd = request.getRequestDispatcher("ViewNews2.jsp"); rd.forward(request,response);[/code] and my JSP code is: [code=JSP]ArrayList newslist=null; ArrayList newslist=(ArrayList)request.getAttribute("news"); int newscount= newslist.size(); System.out.println("newscount:"+newscount); if(!newslist.isEmpty()) { for(int i=0;i<newscount;i++) { %> <tr> <Td><%=newslist.get(0)%></Td> <Td><%=newslist.get(1)%></Td> </tr> <% } } %>[/code] But this table … | |
Hi, I have a little servlet which does the following: [CODE] package Services; import java.io.*; import java.net.*; import javax.servlet.*; import javax.servlet.http.*; import java.util.Random; public class Service extends HttpServlet{ private String getContinent() { Random random = new Random(); int continent = random.nextInt(6); switch (continent) { case 0: return "EUROPE"; case 1: … | |
Does JSP support for each statement ?? Actually i need to cycle through each post variable like this in ASP for each tempvarname in request.querystring value1 = request.form(tempvarname) pass=pass&value1 next I am unable to do this JSP... Can somebody help ? | |
Hi, I am new in jsp. And I want to use web rowset in jsp. How can I use it can any one help me? Thanks | |
[code] <tr> <td height="52" colspan="8"> <table border="0" cellspacing="0" cellpadding="0" width="100%" class="rsTable" id=rsTable cols=4> <% if(UserModuleVO!=null){ %> <% for(int i=0;i<UserModuleVO.length;i++) { %> <% if(UserModuleVO[i].getUserSubModule()!=null){ %> <% for(int j=0;j<UserModuleVO[i].getUserSubModule().length;j++) { %> <% if(UserModuleVO[i].getUserSubModule()[j].getUserAction()!=null){ %> <% for(int k=0;k<UserModuleVO[i].getUserSubModule()[j].getUserAction().length;k++) { %> <tr class="form_list_table_contents"> <td><%= getSecDropDownDesc(2,UserModuleVO[i].getLayerModuleID()) %></td> <td><%= getSecDropDownDesc(3,UserModuleVO[i].getUserSubModule()[j].getLayerSubModuleID()) %></td> <td><%= getSecDropDownDesc(4,UserModuleVO[i].getUserSubModule()[j].getUserAction()[k].getLayerActionID()) %></td> </tr> <% … | |
Hello. Well, I've been trying to create a a web app, using JSP+JSF technologies. I've completed writing the background classes, and also created a test jsp page: [CODE] <html xmlns="http://www.w3.org/1999/xhtml" xmlns:jsp="http://java.sun.com/JSP/Page" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xml:lang="en" lang="en"> <jsp:directive.page contentType="application/xhtml+xml; charset=UTF-8"/> <head> <title>Please log in</title> </head> <body> <f:view> <h:form id="loginform"> <h:outputText value="Something"/> <h:commandButton … | |
My head is telling me that the answer to this question is going to be NO, but hopefully i m wrong. I have a servlet which gets redirected using RequestDispatcher to a jsp page, the jsp page has some html input fields. In the servlet i get the values from … | |
i am building a web chat application for mobiles. Registration form for new users currently includes username , password , re-enter password and a submit button to send all to a form bean. i am having problem to create a link or a button to send the input of 'username' … | |
well friends i am new to jsp please suggest me appropiate links to start with... all suggest the way to configure tomcat to run properly.......... | |
hi i am beginner i am using j2sdkee1.2.1 and jdk1.3 for deploy my servlets. what is cloudscape in it? how i can use cloudscape for my servlets ? can i dynamically create my database table in servlets? | |
I would like to know witch one is better Jboss or tomcat ? | |
Hi everyone, I want to retrieve data from database in jsp page based on the particular m_emp_no .I am finding it very difficult so please can you all help me out with the problem. Here is the structure of my database and i am using ms.access [ICODE]m_emp_no m_leavetype m_bal 1004 … | |
The example code below produces two radio buttons, side by side, i.e. [B]O[/B] Keywords [B]O[/B] All Fields Without specifying a width for the selectOneRadio component (which I don't think is the best solution because of user controllable font sizes, etc), "All Fields" wraps across two lines to become: [B]O[/B] All … | |
hi all new to tomcat.. i installed tomcat on c:/tomcat 5.0.28 and c:\j2sdk1.4.1_07. i run my hello world servlet ,did all stuff making diretories,web.xml for running a servlet .it execute on my system. i search for this in google,but i don't understand !!!! but if my servlets are using or … | |
Hi I am trying get user info from the database into the textbox when i select Usename Which is stored in the drop down. so could any help how to get all usernames into dropdown and when i select any usenames i should get all details into the text box.........please … | |
I have a Form input field in my JSP:[code] <input name="nickname" type="text" value="<%= NameClass.getInfo() %>" /> [/code] How do I make sure this data is escaped correctly to be able to show quotes and apostrophes. I tried slash in front [b](name=\"nickname\")[/b] and it didnt work. I dont have JSF,Struts, JSTL, … | |
I am facing problem while retrieving values from the jsp page. my database structure is as follows: ----------------------------------------------------------------------- m_emp_no|from_date|to_date|approver|status| ________________________________________ 1002 | 22/9/2008 | 23/9/2008|1003 |pending 1004 | 29/9/2008 | 30/9/2008|1003 |pending 2044 | 15/9/2008 | 16/9/2008|3076 |pending -------------------------------------------------------------------------- I am retrieving values from database properly using the following sql … | |
i want to export list of DATA from my JSP page(code) to a pdf file... plz.. give me idea about it or sme example code in jsp that exports list of data from jsp page to pdf file.... thanks | |
I am designing a web application For running Automated test.I record the flow of an application (say yahoo.com) using Selenium IDE and exporting the test suite to java.So now i have a file For example login.java.The application i am creating is like i will have a browse button.i will browse … | |
How to create this table : Yellow Balloons [INDENT] [/INDENT]Cat Red Apple [INDENT][/INDENT]House Blue Jeans [INDENT][/INDENT]Tie Instead of this kind of table: Yellow Balloons Yellow Cat Red Apple Red House Blue Jeans Blue Tie | |
I've created a jsp that will download a file for the user when its loaded. When this file is downloaded and opened, the end of the file contains this funny character - [B]ÿ[/B] Does any one have any idea how to remove this character or prevent this from happening. Here's … | |
Hi, i am building a web chatting app. for mobiles. can anyone help me that how to get mobile no. when user submit the form. or when user request. I want to keep in record that page is opened on which mobile number. I have come to know that mobile … | |
I have a jsp page to take input from user and want to store values in database with the confirmation message on the same jsp page . But I already have stored an array list in session during processing of other pages of other modules of my project . Now … | |
I read jsp tutorial by peter_budo on database connectivity using MVC model in jsp then I tried to create a registration page but I have errors on my page . Please help me correct them. I here have 1. registration.jsp - as interface for taking input 2. RegisterServlet.java - as … | |
I have a collections to be populated in a JSP combo box. Now suppose there is a different page for each user which displays user specific values in a combo box in that page. The combobox should display the value from the collection specific to the user. But my combo … | |
Hi All, Iam new to Connection Pooling in Java. I need to create connection pooling for my MySQL Database with JSP using Bean Class. Please help me.. Thanks in advance. -- Vinikz | |
Hi guys i have started with JSP and i have following query regarding JSTL If i have Checkbox on JSP Page how can i get all the elements which are checked using JSTL | |
[COLOR=red][B]Please help me how to check whether the username,password entered in the login page is validor exists in the database User name,Password fields[/COLOR][/B] | |
Hi. I am using windows, and NetBeans version 6.1 I create a JSP project: and then I create an index.jsp in web folder and then I created a LoginAuthentication class in a package named connection. BUT I dont know why when I click the singin button of the index.jsp, an … |
The End.