Questions tagged as 'jsp'

1
answer

How to get an image of the save screen in the project folder and save the path in Mysql database?

So, I have a jsp with form, it converts the image to b64 and sends as a pro servlet string the servlet converts to b643 String stt = request.getParameter("base64img"); try{ String parts[] = stt.split(","); Strin...
asked by 04.12.2016 / 16:28
1
answer

How do I get user id in a session?

I'm doing a project using jsp and servlet, I need when a user logs in, his id is stored in the session, so that with this id, the system knows that this id user is making changes to their (Example, phone change). How could I do that? Control:...
asked by 02.12.2016 / 00:26
1
answer

Difficulty in visualizing data in a web project VRaptor

Check how my JSP page is <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html>...
asked by 22.03.2015 / 17:49
1
answer

SQL Server and JSP connection error

I'm trying to connect to SQL Server using JSP. But the connection is not made. Connection Class: package DAO; import java.sql.*; public class Conexao { public static Connection conectar() { try { Class.forName("net.sourceforge.jtds.j...
asked by 08.11.2014 / 18:53
1
answer

How to create an administrator profile from this code?

How to create an administrator profile from this code, and when to have a check made if it is a regular user or an administrator? DaoUsuario.java package br.edu.facema.model.dao; import br.edu.facema.model.bean.Usuario; import java.sql.Con...
asked by 25.11.2014 / 05:45
1
answer

Validation of E-mail in form in the JSP

I'm trying to validate a form from a JSP via JavaScript but I'm not able to apply the Script correctly, what am I doing wrong? <%@taglib uri="http://java.sun.com/jstl/core" prefix="c" %> <%@taglib uri="http://struts.apache.org/tags-ht...
asked by 29.09.2014 / 20:32
1
answer

function that wipes the VALUE of the field in the JSP

I need to insert a function in my JSP that clears the value of the input when the user clicks to enter the value, but I can not insert class into the input, nor is Placeholder accepted nor Onclick, could anyone tell me any way to do? <%@tag...
asked by 03.10.2014 / 20:13
1
answer

Change attributes from one Object to another

In my java application I have an object declared as Extrair extrair = new Extrair(); And I use this object and its attributes for my servlet. But I need to pass this object to .jsp. In the jsp I use extrair = request.getAttribute();...
asked by 26.08.2014 / 05:23
2
answers

Pass variable value from JSP to JAVA

Good afternoon, I'm using JAVA and JSP to program. I have a JSP variable and I need to pass the stored value to the JAVA code. I need to pass the variable "X" that is in index.jsp to variable "Y" which is in the main of indexJava.java C...
asked by 19.06.2014 / 18:00
1
answer

Explanation of a JSP command

I have a command line in my JSP code that I can not understand type StringUtils.isBlank I know it's a condition, what I do not know is what's inside. Here's part of the code: if(StringUtils.isBlank(historicoProcedimento.getRestricoes...
asked by 12.05.2014 / 21:55