jsp

JSP EL expressions not working in tag files

We are trying to move our Java web application from a Tomcat 5.5 server to a more modern Tomcat 6.0.24 one, but we are having some problems with JSP EL. The expressions placed within XML tag files are not recognized by the server, that simply renders them as text (just as in the following example). Any ideas why? <object id="${id}" ...

JSTL Google App Engine Problem

My problem is, that when the <c:if tag is reached the following problem occurs. I am using Spring on google app engine. java.lang.AbstractMethodError: javax.servlet.jsp.PageContext.getELContext()Ljavax/el/ELContext; at javax.servlet.jsp.jstl.core.LoopTagSupport.unExposeVariables(LoopTagSupport.java:620) at javax.servlet.jsp.js...

How do you call a controller method from an onchange event?

How do you call a controller method from an onchange event? I'm using Spring MVC. I have a <form:list> and I wish to update the current page when an onchange event is triggered in the list. ...

Spring-MVC Common Model Attributes Used in Tags or Page Fragments

It's common to have many pages in a website that request the same model attributes, for example, a header that renders the current users name, or a column that needs a few server based pieces of information. ... <body> <mytaglib:header/> ... <jsp:include page="footer.jsp"/> ... </body> The simplest solution is that every controller me...

request.getQueryString() should not be null?

I'm debugging an old Struts 1.2 w/ Tiles application running on Oracle App Server 10.1.3. There are some scenarios in which request.getQueryString() seems to improperly return null and it seems to have started doing this without any changes to the application code, indicating that server patching may be a factor. I added some scriptlet c...

Processing XML data for JSP

I have a form/calculator, which posts to itself some data, this data is then calculated by dispatching a servlet and the results are output as xml. The dispatcher code is shown below: //create instance ServletContext sc = this.getServletContext(); //create dispatcher RequestDispatcher rd = sc.getRequestDispatcher("/ProCalcServlet"); rd...

How to check if a JSF UIComponent is valid in a jsp file?

In a jsp file, is there a way to find a component on that page and check if that component is valid. Say i have a an input field, and a panelGroup with complex html that should be showed if validation failed on the input field. What i'm really looking for is a EL expression for the rendered attribute on the panelGroup. I tried playing ...

Calling a Remote Java Servlet

I have a jsp page which holds a form, it is supposed to send off the form data to a remote servlet, which calculates it, and then returns it as XML. It works, but at the moment I'm creating an instance and dispatcher which only works with local servlets whereas I want it to work with a remote servlet. I was previously told that HTTPClie...

<html:errors> not working..

Hello, I am little stuck with . It is not populating the errors for me, rather it is loading the page without . Attaching my code: <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE struts-config PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 1.2//EN" "struts-config_1_2.dtd"> <struts-con...

where translated servlet of jsp got stored

As we know, when the jsp got complied it will get converted to servet. I have installed weblogic server 9.2, and i deployed a struts project which has jsp files. And in the browser i am able to see the application. Now i want to see the servelt file of jsp which i ran. Can anybody please tel me where i can find it or do i need to do ...

Tool to reverse map JSP to URL?

Is there a tool to automate the task of finding out where a given JSP is used, by URL? Ultimately, the question I need to answer is, What URL(s) do I need to call, to see the output of this JSP in my browser? Finding out involves searching for the JSP name, then searching for any JSPs that include it (possibly through several levels), ...

Why would I use a templating engine? jsp include and jstl vs tiles, freemaker, velocity, sitemesh

I'm about to choose to way to organize my view (with spring-mvc, but that should matter much) There are 6 options as far as I see (though they are not mutually exclusive): tiles sitemesh freemaker velocity <jsp:include> <%@ include file=".."> tiles and sitemesh can be grouped; so can freemaker and velocity. Which one within each gro...

Using an ID to Reply to a Comment with jQuery in a Sping-MVC app

I need to be able to comment to an article, but also be able to reply to a comment using the same form. Fairly simple, but how do I know that a user clicked on "REPLY", and know which comment they clicked "REPLY" too? I'd imaging I need to add some attribute to the anchor, but I'm not sure what it should be. I'd like this to be a best...

Quick JSP/Servlet article/book/tutorial

Hi gangs, I am just asking about a very quick book/article (about 100-200 pages) about JSP/Servelts that the one that already knows JSP/Servlet can use to refresh it's knowledge in short time (1 day or so). It is better to be a free book/tutorial. Thanks in advance. ...

in JSP is there a way to pass HttpServletRequest object as an attribute to another HttpServletRequest object

I am using Struts/JSP for a webapp. I have a page A where I am collecting user defined parameters (as request parameters can't make them session params) and then I go to page B to ask yes/no kind of a question to the user. In case of yes I need to come back to page A and continue regular processing. But obviously the request object for p...

CKEDITOR, Image Upload in jsp pages

Hello. I've been looking for a tutorial on this matter but all of them are using php. I need to integrate an image uploader for ckeditor in jsp pages using java code. if someone could help me out or direct me to a tutorial, I'll be very thankfull. ...

Is there and shorthand for <fmt:message key="key" />

It's tedious and ugly to write things like: <input type="button" value="<fmt:message key="submitKey" />" /> And in case you want to nest the message tag in another tag's attribute it becomes even worse. Is there any shorthand for that. For example (like in JSF): <h:commandButton value="#{msg.shareKey}" /> (spring-mvc-only solution...

called class in jsp

i create a class called "Data" and call it in JSP.. when i comple it, the error says, Data cannot be resolved to a type 2: pageEncoding="ISO-8859-1"%> 3: <%@ page import= " Data" %> 4: <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"&gt; 5: <jsp:useBean id="user" class="Data" scope="s...

jQuery post() JSP return collection

My HTML looks like this: <script type="text/javascript" src="jquery-1.4.2.js"></script> <script type="text/javascript"> $(document).ready(function(){ $("#btn").click(function(){ $.post("test.jsp", { "txt": $("#txt").val() }, function(data){ alert(data); ...

Spring Security 2.0, Getting the authentication status of a user

I am working on a webapp which uses Spring security 2.0 (not the new one), which we don't have the Java sources, but we do have access to the jsp. What is the easiest way to tell if a user is authenticated (any role will do) from the jsp? Basically I want to display a different link depending on whether a user logged in or not. ...