jsp

Can using Jquery, I submit a form that belongs to different website.

Hello I want to fill a form and submit it using my application but the form that i am filling and submitting is a different webpage. Is this possible using Jquery or any other way. Example: my application name formfiller( let the url be www.formxxxx.com) now i want using formxxxx/xyz.jsp i want to fill and submit a form that is presen...

Using information stored in database to generate the nodes for a Tree using struts 2 and ajax.

I need to develop a tree to display the hierarchy of categories on a retail site. For example -Clothing - Men - Trousers - Shirts - Women I'm working on struts and using the struts dojo plugin to use this tag : <sx:tree id="root" label="Category"> For the other child nodes, the data is stored in a database. If I use ...

Spring mvc: controller returns [][], usable in jsp with foreach, but how to bind?

I'm building a spring mvc application. Now the problem I have is the following. I have a controller which adds a DayInfo[][] to my ModelMap. (DayInfo has an id, a title (String) and Text(also String). Now the problem I have is that I have no problem displaying this DayInfo[][] with <foreach> tags in my jsp. However I'm outputting the ...

Including a JSP page with Icefaces/Facelets

Hi, I have a requirement to allow a user to embed JSP pages into my website...I'm using IceFaces/Facelets to do the navigation menus etc. and would like to include a JSP page using ui:include Is there anyway of doing this (given that the JSP is not valid XML). Thanks. ...

Read an invalid cookie with Java (jsp)?

I have a cookie that is formatted like partA:partB. The colon is not escaped in any fashion. I need to read this cookie in a JSP script, and request.getCookies() is only returning partA. I can't change the cookie because it is used in multiple applications, and fixing the cookie would break production code. Any ideas how I can read the f...

What are the possible causes of JasperException

I have a JSP that takes an Arraylist from the session object and removes the items from it. It seemed to be working fine and then out of nowhere when I navigate to that page, the page is blank. I checked the Tomcat log files and in catalina.out I am receiving a JasperException an it is showing it as being on a line with the following fo...

Label field problem in the treenode Tag. (Struts2/Ajax)

I'm using struts as a framework for a web-app. The following code runs inside a loop where I access the database to retrieve values to be used as nodes for a tree. <s:set name="categoryValue" value= "%{'<%=rs.getString("category")%>'}"> </s:set> <sx:treenode id="child1" label ="%{#categoryValue}"/> The error I get is "/jsp/tree.j...

how to display the values of a map variable in javascript

I have a javasrcript variable var hash = { '.bmp' : 1, '.gif' : 1, '.jpeg' : 1, '.jpg' : 1, '.png' : 1, '.tif' : 1, '.tiff' : 1, }; I want to display the values (.bmp, .gif, .jpeg, .jpg, .png, .tif, .tiff) of this "hash" object in my alert message. How can I do this? Please help. ...

select multiple double side

hello, i want to do a select multiple double side like this : http://www.senamion.com/blog/jmultiselect2side.html (Demo2) but i don't know how i can retrieve my data when i click submit button..? ...

Is dependency injection possible for JSP beans?

This may be a long shot question.. I am working on an application that is based on JSP/Javascript only (without a Web framework!) Is there a way to have depencency injection for JSP beans? By jsp beans I mean beans defined like this <jsp:useBean id="cart" scope="session" class="session.Carts" /> Is there a way/library/hack to interc...

javascript: How to assign a function to an element.

Hi, Here's what I want: I have an element in my html code, and I want to assign a function to the onClick event, depending on some conditions to be known down the road. For example <a href="" id = "element"><img .....> //other code </a> Then I want to do something like this <logic:equals some_condition> <script> ...

Handling multiple forms on a single JSP

I have a JSP page with several forms on it. Some of these forms are generated dynamically, and each of them submits some information to a database. Handling one form is easy, as I can simply make the form post to itself, and handle the data using a single bean. Since I have multiple forms, I now have a problem. Several of the forms on t...

Alternatives to JSP for Spring MVC view layer

I'm looking to create a new app from scratch and will probably use Spring MVC and possibly Spring Web Flow. The projects created by Spring Roo use Spring MVC and optionally Web Flow. What are some good alternatives for view technology, or is JSP with spring and jstl taglibs and jquery the way to go? ...

How to show user-friendly error page instead of tomcat log with stack trace in browser when runtime exception is thrown?

I'm developing web-application with JSF. I tested it as I was able to but from time to time runtime exceptions are thrown. So, how to redirect user to special error page every time an exception is thrown (instead of displaying 500 Error with full tomcat logs)? ...

URL mapping in Servlets

I am building a site with JSPs and Servlets. How do I map a URL like this example.com/12345 so that I get the response as if the request was example.com/content.jsp?id=12345? ...

Loading Java applet from WEB-INF/classes by JSP

Hi guys, Ive got a problem with loading an applet from WEB-INF/classes directory. The main class of an applet (MainApplet.class) is there in the package aaa, but when loading I got the exception java.lang.ClassNotFoundException. Where am I wrong? My jsp is in Web Pages dir. < jsp:plugin type="applet" code="aaa/MainApplet.class" jrever...

After Filter redirects to login.jsp, proper servlet doesnt get called

My simple project structure is shown in this link. I am using Eclipse and Tomcat 6. There is login.jsp which submits its form to login_servlet. The login_servlet sets a session variable and then redirects to home.jsp. The home.jsp file has links to the 4 JSP files under a directory called /sam. In web.xml I have given the url-pattern as...

JSP 2.0 SEO friendly links encoding

Currently I have something like this in my JSP <c:url value="/teams/${contact.id}/${contact.name}" /> The important part of my URL is the ID, I just put the name on it for SEO purposes (just like stackoverflow.com does). I was just wondering if there is a quick and clean way to encode the name (change spaces per +, latin chars remova...

JSF - Session Bean restart on logout and login

Hi, I have a web application with a backing bean which has the context of the current logged in user. It is implemented on JSF. When the user logs out he is forwarded to a login screen (in another JSP page). I would like the current session to be erased when that happens and a new one to be created the next time the user logs in and en...

JSP: Use information from one page to another

Hi, I currently have a JSP page with a Form for the user to enter their name, but what I want is to get the user forwarded to a different JSP page after form submission and to carry on their name to be used. I don't want to use JSTL EL just simple JSP uses. I was thinking of using a bean storing the detail in a session but how would i...