jsp

trying to decide between asp.net and jsp

Hey Guys, I am wondering if anyone can shed some lights on the situation. I am about to start a project and trying to figure out what solution is best to go with asp.net or java jsp pages I have personally worked alot with .net and am really happy with the framework and Visual studio as IDE I find it easy to work with and there is a ...

calling a php file from jsp on clicking one button

Hi users, i want to know how to call php file from on clicking some button in jsp file. can u please let me know a ways to do that. ...

Get request URL from jsp

How can i get request URL from JSP. If i use following code within JSP i get - System.out.println("servlet path= " + request.getServletPath()); System.out.println("request URL= " + request.getRequestURL()); System.out.println("request URI= " + request.getRequestURI()); I get path to view(jsp) with jsp prefix. But i want to get URL ...

Why would JSP tags appear in HTML source code?

I'm a front-end web developer at a company using Java on their server. As a front-end developer, I'm concerned with the HTML structure that the server produces, but I don't have control over anything our back-end team produces. Rather than ask someone on that team, I would like to gather knowledge from the Stackoverflow community so I ca...

How can I replace true and false with yes or no using JSP and JSTL?

How can I replace true and false with yes or no using JSP and JSTL? i hava values TRUE and FALSE in my table. i want when i retive these values using jstl on my jsp pages the true false will replace with YES AND NO ...

how to set session attribute from a hidden field ?

is it possible to set a session attribute using JSTL from a hidden input in the jsp page? ...

Date or String declaration in a javabean

Should I declare an attribute in a javabean that holds a date value a user types in on an HTML form as a String or Date? I feel I should declare as a Date, however, since I do server validation on all form data, if the date doesn't validate, when I pass the form bean back to the jsp view for correcting, I lose the date value that the ...

How to format a number in Expression Language?

How can I make a formatted output for a number (e.g. long or BigDecimal) in EL? For example, I want to limit a number of decimal digits to 3 in ${result.returnValue.contract.balance} ...

Struts is not using my default CSS for rendering <select> items seems to ignore my CSS

Struts seems to completely ignore the styleclass option for rendering the and associated options. I have spent a good deal of time getting the CSS right for this website to shar on all the pages, but cannot get struts to play ball? ...

JSP: Using the same Java object across pages

I have 2 jsp pages, index.jsp and viewer.jsp. viewer.jsp is inside an IFRAME in index.jsp. index.jsp needs to grab a list of domain names from a Java object foo and provide a drop down menu for the user. After the user picks one and submits it, viewer.jsp needs to read this domain name and use foo to extract all the the data it needs to...

how to detect client timezone?

any ideas how to get client/request timezone in jsp? ...

MVC Framework for existing application.

I am modifying existing java web application that was written long time ago, and it is written in the wrost possible way. It has business logic and sql statemens in JSP files. Because of the certain constraint, I can not re-design the entire application. but I can implement better design in any new feature that I add. can anybody sugge...

JSP does not insert my data into database

<%@ page language="java" import="java.util.*" pageEncoding="ISO-8859-1"%> <%@ page import="java.sql.*" %> <%@ page import="java.io.*"%> <%@ page import="java.io.File"%> <%@ page import="java.util.*"%> <%@ page import="java.sql.*"%> <%@ page import="java.sql.Blob"%> <%@ page import="java.sql.PreparedStatement"%> <%@ page import="java.sql....

Generic error pages in webapp under jboss

Not a jsp/maven/java dev myself, i'm trying to configure error pages in a generic way, for a webapp, without touching jboss's configuration. Here's how i'm trying to do so: in my web.xml, i've set up <error-page> <error-code>*</error-code> <location>/actions/erreur</location> </error-page> Here, I doubt using...

How do I set the user's locale on a JSP

I have a .jsp page that the user loads directly. The request it with a URL like the following: http://www.example.com/myfile.jsp?country=CA&amp;language=fr In the JSP, I pull the URL GET parameters and attempt to set the locale using them as follows: <% String myLanguage = request.getParameter("language"); String myCountry = ...

<jsp:forward> doesn't work with tiles framework? Please help

Hi all, I have recently decided to implement struct framework with my current project. All are good except there a number of pages that uses , the particular page forwarding statement stopped working. The pages that used are all part of the "body" of the tiles. Say I have a Register.jsp page that uses signup.jsp as its body thru tiles...

Display a file on JSP page based on the search result

Can anyone help me? I want to create a search button that will search a word in more than one text file stored on the disk and want to dispaly the corresponding text file in a jsp page. ...

Is there an option for code completion in JSP scriptlets in JDeveloper?

I have a little problem with JDeveloper. It has excellent code completion abilities in java files, and it also works fine for tags in JSP files, but it doesn't work inside scriptlets. For example, if I have code like this: <x:sometag attribute=<%=MyClass.A I want it to automatically complete it, when I press Ctrl+space, with the avail...

JSP and Javascript

Can anyone psuedo a solution to my problem, or just give discussion to help me find a solution? I've always found that using JSP to populate HTML is a very awkward solution to creating pages, and if you want to convert to AJAX almost always results in needing to rewrite the whole "component" or whatever it is your displaying. I need a ...

Type of object returned by an input from a web page

I'm attempting to upload a file into a jsp and then use the file in some other code. My problem is that it comes into the servlet as an Object via the request.getAttribute() call so I don't know what to cast it to. I have this code so far to try and test what it is but I'm getting a NullPointerException. test.jsp <%@ page language="j...