jsp

Making JSP page not set the response content-type

Is it possible to make JSP pages not set any content type on response? In my setup, JSP doesn't directly generate the response, but rather an intermediate presentation, which is then processed by additional Java code that creates HTML or JSON based on that. So, can I somehow make JSP not set content-type on the response and leave it to...

Can any framework project use Struts-taglib

I have read here that one disadvantage that some may find with using Spring MVC over Struts is that Struts has tags that output HTML code, while Spring has tags that don't generate HTML. My question is can't you just use the Struts tag-lib in a Spring MVC project (or any other kind of framework project), by dropping the right jar into t...

Jsp static import

I've created a Spring Roo project. Everything looks fine. Now I want to add a form with a text input and a button to my index.jspx. This form will change a static field currentUser in my ToDo class. So I'm adding: <form> <%@ page import="static com.mypack.domain.ToDo.*" %> <label for="_username_id">My name is:</label> <% curren...

Problems with Tomcat server and JSP web application

I am running a JSP/Servlet Web application and out of nowhere we experienced some random problems that don't make any sense. I checked the catalina.out file to check the log files, and I noticed it contained some of the following messages SEVERE: Error starting static Resources java.lang.IllegalArgumentException: Invali...

org.apache.jasper.JasperException .... Unterminated &lt;%@ page tag

I get org.apache.jasper.JasperException: /index.jsp(2,1) Unterminated <%@ page tag The page tags look like this: <%@ page import="java.util.*" %> <%@ page import="au.edu.uwa.peb.autoextractor.model.ScanResultItem"; %> This seems to indicate to me that a < does not have a corresponding > tag ... is this so ... my IDE does not h...

Which variables can be accessed with the ${...} syntax in a Struts tag in a JSP page?

I'm getting a little bit frustrated since I can't find out which variables I can access with the ${...} syntax in a Struts tag, placed in a JSP page. As an example I've got the following code: <c:set target="${status.menueStatus}" property="activeMenuePath" value="whatever" /> Where does the object "status.menueStatus" have to be def...

saving value selected in a list when submit button is clicked

Hi everyone, In my JSP I have a dropdownlist and a submit button when clicking the submit button I lose the value already selected in my list. I am using the jstl because i need to construct other table corresponding the value selected in my list.For that I must call a submit button but the problem; it reset the value selected I want t...

the attribute item of the tag <c:forEach> and java code to keep the dll dynamic

the problem I found is exactly in the attribut items of the tag forEach because I use a class java to build my options dynamically so I have not the options from the begining to put them in the items I tried the following: <%=h.ConstructListActivity("Activity","SELECT from Activityopc activityopc".toString()) %>' var="option"> but it d...

file read and return a byte array

dear all, i want to read a mp3 file using java and want to download it in jsp,i want to return byte array or i can only return one byte at a time?.please suggest ...

What's a good way to parameterize "static" content (e.g. CSS) in a Tomcat webapp?

Some of our CSS files contain parameters that can vary based on the deployment location (dev, QA, prod). For example: background: url(#DOJO_PATH#/dijit/themes...) to avoid hardcoding a path to a particular CDN or locally-hosted Dojo installation. These values are textually substituted with the real values by a deployment script, whe...

Recommend JSP Quiz Tutorials

Hi Everyone, I need to make a quiz that uses JSP and servlets but I can't find any tutorials online which can help me create my own one. If there are any can someone recommend me some, I have tried Google and nothing reasonable has come up. Thanks. ...

Most interoperable web service platform for Apache Tomcat JSP platform to be consumed by .NET

For a company that has their stack built on Apache Tomcat and JSP what would be the best web service platform to be leveraged by that infrastructure that would be consumed by .NET client. From the .NET side I know the answer would be Windows Communication Foundation (WCF) but I'm not sure from the other side. ...

How to download attachment file from JSP

I want to know how can I download any file from JSP page based on content disposition as an attachment from mail server. I want to create a link on JSP page, and by clicking on that link user can download file from mail server. The link should be for content dispostion's attachment type. How can I do that in JSP? ...

jQuery + Dialog Form Validation

I have a jQuery Dialog form and on submit I'm trying to validate the fields. I'm using jQuery Validation plugin to validate. In this I'm facing an issue, the validate function is not being called. I'm posting some snippet of my code: $("#register-dialog-form").dialog({ autoOpen: false, height: 350, width: 450, modal: tr...

JSP Javascript upload file

I'm developing an web app with jsp,servlet in server side and javascript in client side. How can a i upload multiple files(images) to the server(and save them to the db)? ...

How to pass variable from jsf managed bean to jsp page

How can I pass a variable from JSF managed bean to JSP page. PS: I'm in portal context (liferay). I tried this: in Managed Bean: HttpServletRequest request = (HttpServletRequest) FacesContext.getCurrentInstance().getExternalContext().getRequest(); request.setAttribute("var", "someTxt"); in JSP: <% String var = (String)reques...

Using JSP 2.0 tags in Facelets

Is someone using Facelets with JSP 2.0 tags? How to add tag library to xhtml page? In JSP I used: <% taglib prefix="example" tagdir="/WEB-INF/tags/my" %> and : <example:sample/> How can I do the same in facelets with JSP 2.0 tags? ...

Passing a variable to jsp when reloading an iframe using javascript

In my javascript code I load a jsp page in an iframe and pass some variables like this: htmlData[i++]="<iframe id=\"mapframe\" frameborder=\"0\" style=\"width:330px;height:300px\" src=\"" + "mapURL.jsp" +"&lat=" + AjxStringUtil.urlComponentEncode("33.65") +"&lng=" + AjxStringUtil.urlComponentEncode("-84.42") +"&a...

Output a String from an array in JSP

Hi everyone I want to make a quiz, I want to have to output an array of questions after a form is submitted. I know to use a bean I think but how would I do this? Thanks ...

Output reformatted text within a file included in a JSP

I have a few HTML files that I'd like to include via tags in my webapp. Within some of the files, I have pseudo-dynamic code - specially formatted bits of text that, at runtime, I'd like to be resolved to their respective bits of data in a MySQL table. For instance, the HTML file might include a line that says: Welcome, [username]. ...