4,248 Topics
![]() | |
I need to pass a vector<String> from a servlet to a JSP file. The vector contains data retrieved by a database. Sending from the url is not suitable(because there is lot of data). So what is the proper way to do that? | |
I have to display image on jsp page with some text output. This image is already saved at a location parallel to web-inf and is generated dynamically using a servlet. I have used img tag html to display the image. Other outputs are taking their values from database. First problem … | |
How to trigger onChange event if the same option value is selected from the dropdown list. Presently, only the same value is chosen by selecting different option value and then the same value. Is there any overloading possible for onChange function Thanks in Advance | |
I have three dropdown list. Each has "Select" as the first option. The user shall choose atleast one option from atleast one dropdown list. if not an alert has to shown. How to accomplish this? | |
the following is the code: [CODE] <%@ page import="java.util.*" import="java.sql.*" import="java.io.*" language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%> <% Integer hit = 0; Connection con = null; Statement stmt=null; ResultSet rs = null; %> <% try { out.println(); Class.forName("com.mysql.jdbc.Driver").newInstance(); con = DriverManager.getConnection("jdbc:mysql://localhost/lab2","root","root"); stmt=con.createStatement(); rs=stmt.executeQuery("SELECT hitCount from table1"); hit = rs.getInt("hitCount"); hit = hit … | |
I have a simple question, I developed a java application, which runs on Oracle application server and Oracle database. This application depends on multiple JSPs on which multiple users can access a single JSP in the same time, some problems occurs due to the excessive usage of this application and … | |
Hi Everyone I've Installed Myeclipse and Tomcat 6.x , Everythings fine , the Server starts in 60 ms time which is not usual , I mean it'll take loger time. Eclipse shows that server is started , but when I run the project , There's nothing happens , not a … | |
Hey guys, I'm currently learning JSP and Java using Netbeans, and I was wondering if there was an easy way to create a web template layout. For example, using a single header, footer, and navigation bar for all pages. In Ruby on Rails, there is a "layouts" view, which you … | |
hey everybody i have question regarding JSP i'm new to this language and it's required from me to send emails by jsp and i'm using dreamweaver for that i worked and did the codes but still get errors: type Exception report message description The server encountered an internal error () … | |
hello everyone, i need 1 help. i am having 3 ".jsp" files : x1.jsp,x2.jsp and x3.jsp. in x1.jjsp i am having a combo box, from the combo box i am selecting 1 value. there is a submit button below it. i am using "form method = post action=x2.jsp". the value … | |
I am developping an JEE application and i don't understand why this lines are not recognize by eclispe. I have import the library struts. If someone has an idea.... thanks [code=JSP]<%@ taglib uri="http://jakarta.apache.org/struts/tags-bean" prefix="bean" %> <%@ taglib uri="http://jakarta.apache.org/struts/tags-html" prefix="html" %> <%@ taglib uri="http://jakarta.apache.org/struts/tags-logic" prefix="logic" %>[/code] | |
Hi guys I am trying to prevent user to access directly using URL to my application , so in order to do that I have used security constraint in web.xml file and it works with me . my problem is in my application I am using href and redirect method … | |
Hello every one, i m trying to use session in jsp application for remembering username from one page to another. it is working fine but when i use hyperlink to come back to home page the username becomes null. please help me how to remember username when user is using … | |
hi, i am new in java web application. i am working with eclipse 3.5 and tomcat 6. tomcat is working with eclipse very fine. but when i am trying to run jsp code, i am getting the following message from java virtual machine launcher, could not find the main class: … | |
Hello everyone, first of all, I dont know if this should be in the java or the jsp forum. I put it here since is a web related question. I am making a report module for a web page using java. For this I will use a jquery plugin called … | |
hey guys, i'm new here! i would like to know how to code the "Add to cart" ? can someone help me please? | |
![]() | Hi, I'm trying to figure out how to pass parameters across JSP pages without using links. For some reason, I can only get null across... Here is my code: Page 1 [CODE] <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>Test Page</title> </head> <body> <form name="testForm" action="Test.jsp"> <select name='tableSelect' onChange='testForm.submit();' style="text-align:center"> <option … |
Hi guys, I am trying to restrict users to access the sources of my application so I have used tomcat-users.xml file , but later I will be facing a problem which is how if I have a lot of authorized users , so I will add each one to that … | |
Hi. I have a web application whereby I perform a search through 4 fields, namely:book serial no.,tel no.,gender and publishing date.In my jsp page variables picking the values respectively are:serial,tel,gender and datez.These are submitted to the java class.Currently, I perform my searches as follows(in java class): /***********************************************/ [code=Java]//......after connecting to … | |
Hello- I am pretty new to JSP I need some help with a GET method. Apparently IE has a URL length limitation.. IE0- "If you are using the GET method, you are limited to a maximum of 2,048 characters, minus the number of characters in the actual path." By sending … | |
When my servlet creates a session, even if it is the first time running the servlet, the session.isNew() returns false. I checked to make sure the session ID's are different each time I run it and they are, yet isNew() still returns false. I'm trying to do the following in … | |
JSP is a new world for me, since 3 days ago. I am having a problem (or I have no idea) how does the inserting datas into database works. I have looked at some examples, but still, im having a hard time. I know PHP and ASP, but JSP is … | |
Hi, I am new to jsp, and Beans. I have been working on this piece of code, for the past week and I am no further along :'( I am using Tomcat Apache 6.0 In the ROOT folder I have a simple page test1.jsp: [code=JSP]package user; <%@ page contentType="text/html; charset=utf-8" … | |
i installed blazix server in my pc ,but i cant able to run my jsp program please help me | |
![]() | Hi, I would like to know if it's possible to specify the "target='FrameName'" in response.sendRedirect("Home.jsp") by any chance? I tried this: [CODE] <!-- Security Check --> <form action="Login" target="_top"> <% if ((String) request.getSession(false).getAttribute("sessionStatus") == null) { response.sendRedirect("Login?pageTimeout=yes"); } %> </form> <!-- Security Check --> [/CODE] But it doesn't work... The … ![]() |
[CODE]<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <%@page import = "javax.swing.*" import="DefaultNamespace.user"%> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <title>Play Tic-Tac-Toe</title> </head> <body> <table width="100%" border="0" cellspacing="0" cellpadding="0" align="center"> <tr> <td> </td> </tr> <tr> <td> <div align="center"> <font color="#19A1CB" size="2" face="Verdana, Arial, Helvetica, sans-serif"> <span><b>Tic … | |
hai... i need idea how to make security code in jsp.. for example: when we register to any website, mostly we need to fill the security code that appear at the registration form page. so how can,I as a developer to do that security code? this is the example of … | |
I want to use XML file to insert some data and want to upload that data into my JSP page. That is "XML parsing in JSP" but i tried using JDOM parser but i cant able to get ... any one know dis??????? | |
![]() | Hi, I would just like to know if it's possible to ping a certain port from a jsp page. For example: If I had a Apache_Status.jsp on my machine and I wanted to ping it on another machine at: 123.456.78.90:8080 And I had a Glassfish_Status.jsp on my machine and I … ![]() |
Hi experts, I am having very small error with my attachment file. the thing is , if I let my servlet send e-mail fwith attachment file exists on my computer and that file I edit by myself , there is no error with my file , so if i download … | |
hi, does anyone know how to do login validation using java...here is my code,bt i cant validate if the username and pw typed are the user in the database. (The java code that i wrote) [CODE] public int Login(Friend fr) throws EventException { Connection con = null; System.out.println("Database connection succeeded"); … | |
Hi,I am new to struts.i want to make a database connection with the help of a method call in some other class.I am not able to make the method for the database connectivity.Please if someone could help me. | |
Hai.. I want to write a JSP program. In that i want to do insert, delete, display records in a same program. I connected to the database. its working fine. The problem is it displays the record in the window twice.(becoz it has two records). I need that to display … | |
Hi, considering the tutorial given by peter_budo, if manager wants to assign a new course to a teacher, how would he be able to assign that ? I have designed the course page in which students can apply but how a manager can assign a teacher to that course ?? … | |
As I am new to MySQL, I dont know how to connect my jsp page to the MySQL Database. So please help me by giving some code on how to connect. I have downloaded driver for Java named as Connector/J. MySQL version is 5.0. In this line con = DriverManager.getConnection("jdbc:mysql://localhost/JSP_MYSQL?user=root&password=admin"); … | |
I have tomcat 6.0.18 running on my laptop. Tomcat is installed under my /home/xxx/bin directory. However, after I start tomcat, I'm unable to connect to tomcat through my browser but my eclipse is able to do so. I do not get any error message, the browser just keeps on trying. … | |
Hello all I am using the request scope. I have parent window, which opens a child window on button click. Am using window.open That child window opened is request scope. Problem is, on that child window there is a button.. say I write "greg" in the textbox and click the … | |
Hi there, I'm new to webapp creation and want to try making one using eclipse, maven and spring. The tutorials I find on the net use the maven-archetype-webapp to start their creation, but for some reason that doesn't work on my eclipse... When I fire it up its settings start … | |
Hello everyone, I am new to JSP. Can any one help me how to implement "search" button in jsp, what i need is that i need one text box where i will write the name of the person whose details i need to search, then on clicking the search button … | |
hey guys, i'm new to java servlets..i have been making a website using java servlets on stock market and stuff...now what my query is that i want to retrieve data from database(ms-access) and display it on my html page.... i don't have much knowledge about html so i took a … | |
hi i have a problem in running javascript code between jsp page.. lets below is my jsp body . [code=jsp]<body> <script language="javascript" > alert("hi"); </script> <h1>hello</hello> <% System.out.println("hello"); %> </body>[/code] in the above code there is no problem in running javascipt .. it gives hi alert easily but.. for below … | |
I am trying to make a cookie that should contain a number value. It all work fine, unless the form that sends the info to my receiver page sends and empty string. Then something strange happens. It does not seem to be empty, so my error checker does not detect … | |
Hello everyone.. I have a problem in my project. what i have done is when i login, if the username and password is correct it will redirect to a homepage which is in a new folder called private. I have a logout link in that home page which refers to … | |
[CODE]<%@ page language="java" pageEncoding="ISO-8859-1"%> <%@taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> <%@taglib uri="/WEB-INF/struts-html-el.tld" prefix="html_el" %> <%@taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> <%@taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> <%@ taglib uri="/WEB-INF/c.tld" prefix="c" %> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title>Listing all cities</title> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> </head> <body> <center><h3>city List</h3></center> </body> <html:form action="/UpdateSuccessAction.do" > <c:forEach … | |
hi all i need to make a upload option for user to upload .csv file using jsp then i have to read the .csv file and validate it. if i validation of row is correct then i have update in database else i have to show the error to the … ![]() | |
Hi all, I'm having tough time on how to use linux commands from the servlets. I am able to run the commands from java program but I can't run the same program from servlets? Is there a way to do this? Here is a sample of my code that runs … | |
Am trying to read a date that i have stored in a database table and then parse it to a date object of the Date class using a servlet, but it returns null for the converted date.Where am i going wrong?Some advice on how to sort that out would be … | |
Hello. I wish to create a servlet which checks if the entered username and password are correct.If yes..message hello else go back to page showing error message. I know the settings for tomcat. i know the basic code for servlet.I also know i need http servlet .I will be using … | |
Html-structure [code] <html><head></head><body> <!-- START XOXO --> "lots of html and jsp stuff" <!-- STOP XOXO --> "file reading" </body> </html> [/code] The file reading code [code] <%@ page import="java.io.*" %> <% String line = ""; String file = request.getRequestURL().toString(); int print = 0; BufferedReader input = new BufferedReader(new FileReader(file)); … | |
Hi, this is my final project. I have generated an xml string, this is my code: [code]import java.io.StringReader; import java.io.IOException; import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; import org.w3c.dom.CharacterData; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.Node; import org.w3c.dom.NodeList; import org.xml.sax.InputSource; <%@ page import="javax.xml.parsers.*" %> <%@ page import="org.w3c.dom.*" %> <%@ page import="java.io.*" %> <%@page import="recipe.*" … |
The End.