jsp

Problem with login ,userService , lost session - google app angine

Hi I'm creating my application and i want integrate it with google account and I have following problems: I want to authorize the user and get back to this pages and after share some data from google calendar. So this is my code snippet to create the login url (index.jsp) boolean b= true; UserService userService = UserServiceFactory...

jsp: page imports causing a syntax error

Hello. I'm writing a jsp application, what i did so far was to include the classes i need and to write the string text: <%@ page import="com.google.code.facebookapi.FacebookException;" %> <%@ page import="com.google.code.facebookapi.FacebookWebappHelper;" %> <%@ page import="com.google.code.facebookapi.FacebookXmlRestClient;" %> <%@ p...

jsp: How can I protect a jsp page with a password ?

Hello. I would like to protect a jsp page with a password that needs to be typed. In apache i can add a password file to .htaccess but I don't know how to do that in apache tomcat. thanks ...

@Override for interface methods causes JSP compilation to fail.

For some reason, putting @Override on methods overriding interface methods causes JSP compilation to fail in weblogic. Everything is definitely running off of JDK 1.6.0_14, but this Java 5'ism still persists. Oddly, JSP compilation occasionally fails with a stacktrace pointing at code not necessarily obviously used by the JSP itself. W...

JSPC: jsp:attribute must be the subelement of a standard or custom action

I'm using Maven to precompile my JSPs in my webapp. I'm using quite a few custom tags but one of them chokes Apache's JSP compiler. The relevant part of the JSP is this: <jb:contentChanger containerId="${previewImageContainer}"> <jsp:attribute name="content"> <div id="${previewImageContainer}"> <jsp:include page="../inc/fa...

how to include tiles definition attributes in an inserted page

I have a tiles-defs.xml that has these definitions... <definition name="masterLayout" path="/WEB-INF/tiles-layouts/globalLayout.jsp"> <put name="pageTemplate" value="over-ride for each page" /> </definition> <definition name="childLayout" extends="masterLayout"> <put name="pageTemplate" value="/WEB-INF/tiles-layouts/child/layou...

(Question about 'final' and) How do I access the list object contents of 'myModels' from the Spring ModelMap in JSTL?

@RequestMapping(value = "/index", method = RequestMethod.GET) public final String index(final ModelMap model) { List myModels = ArrayList<MyModel>(getMyModels()); model.addAttribute("mymodel", myModels); return "index"; } In Spring I put the myModels list into the ModelMap to be passed to the "index" view. How do I t...

How do I have common error page templates with tiles in a Spring/MVC 3.0 app?

I have a Spring MVC/3.0 app using tiles as it's view, this is working fine however I can't figure out how to get the error pages to also use tiles. I have in my web.xml <error-page> <error-code>404</error-code> <location>/WEB-INF/error/404.jsp</location> </error-page> which works fine as an ordinary view NOT using tiles, however ...

Ideal error page for J2EE App

I'm having a tough time consolidating errors in my application. Currently, my error.jsp looks like following (part of it): <%@ page isErrorPage="true" %> <%@page contentType="text/html"%> <%@page import="java.util.*"%> <%@page import="javax.servlet.*"%> <%@page import="javax.servlet.http.*"%> <%@page import="java.util.Calendar"%>...

How to port `error_messages_for` from Ruby erb to Java JSP/JSTL?

How would you port this front-end logic from erb to jsp/jstl? <%= error_messages_for :foo %> Is there any Java library that does something similar? ...

How do you simulate a Rails error flash in jsp?

Is there a jsp/jstl equivalent of this Rails error flash? <%- flash.each do |name, msg| -%> <%= content_tag :div, msg, :id => "flash_#{name}" %> <%- end -%> I've been looking for a pre-built solution that is as simple as this Rails idiom. ...

Open a new window from a button ?

hello, i want to open a new window from a button, but in this new window I retrieve an address from my servlet (Action) <html:button property="bouton" styleId="bouton" styleClass="boutonYellow" style="border: 1px solid rgb(0, 38, 97); width:200px;cursor:default;" disabled="true"> <fmt:message key="name"/> </html:button> ...

Error Showing Data Base Data with Spring MVC

Hello ! Im so grateful of the help this community has offered on my learning and production experience, i come to you with another question, thank you in advance. Ok, i have a Flex + Spring + Hibernate + Tomcat + Mysql application that has been in development for 3 years. So now i need to add some html views on them. So what i intend t...

Javascript/JSP: How to pass JSP variables value on one page to javascript variables on next page?

Hi Currently I am trying to send JSP value to javascript. Is it possible? My cases is as follows: On Page abc.jsp, user enters data in form. Which is send on the next page xyz.jsp. I want to use this data in xyz.jsp pages javascript. Is it possible? Is yes how to do this? also would like to know, if I auto refresh this page(or part of...

Custom JSP tags: accessing parent tag writer from TagSupport.doStartTag

In relation to Custom Tags in JSP 2.1 (Java EE 5): I understand that to faciliate nesting, a classic BodyTagSupport can pipe the output of the body from its buffer to its parent tag's writer, e.g. BodyContent bc = getBodyContent(); bc.writeOut(bc.getEnclosingWriter()); However, is there an equivalent technique for the simpler TagSuppo...

Should session be used to handle error message for form validation?

I'm creating registration page and I've done basic client side (JS) form validation. Now I am to write server side validation. What I have done is call request.getParameter(): String username = request.getParameter("username"); Then if the username input is not valid, I put error message to ArrayList: ArrayList<String> errors = new...

How to invoke an external library function on an object within a JSTL loop before outputting it?

Let's say I have the following JSTL loop: <c:forEach items="${foos}" var="foo" varStatus="status"> <c:out value="${processedFoo}"/> </c:forEach> And let's say I have an external library com.foo.processor which contains a ProcessorFactory class with a process method. How do I import this library and call the following code from in...

Get information from JSP(form) to Java Bean

I have a JSP form. My requirement is to get this form's data and create a java beans object on the server side. Example: my form has fields like Name, SSN, EMAIL & Phone Number public class Test { long ssv= 1282199222991L; long phone= 4082224444L; String email = "[email protected]"; String name="abcdef" } From the knowledg...

JSP compilation fails with "The method [MethodSignature] is undefined for the type [ClassName]"

An error occurred at line: 9 in the jsp file: /Test1.jsp The method addURL(String, String) is undefined for the type SearchLink 6: 7: if(url1!=null && url1.trim().length()!=0){ 8: myfirst.SearchLink p=new myfirst.SearchLink(); 9: String result=p.addURL(url1,source1); 10: out.println(result); 11: System.out.pr...

custom tag development - attribute not working

I'm trying to write a custom tab with attributes, but I can not get the tag handler class to read the attribute values. Using an <%= %> , I can get objValue to work. But objValue2 does not get evaluated when I use ${}. jsp: <% CommitmentItem ci = (CommitmentItem) request.getAttribute("commitmentItem"); %> <myTag:calPOP objValue="<%= c...