jsp

RPX openID auth_info in java

I am using RPXnow Openid service with java but I am not getting how to call authentication url of api with token and obtain xml response returned by openid service in same calling jsp.Pls help. ...

wamp server :How to deploy jsp application

I am newly started using WAMP server. I am unable to deploy my java application on it. only Html pages run. Please help with directory structure and where to keep jsp, java, .class ,war,xml files. JSP code is shown on html page when i click link for jsp. ...

Creating a List in EL

Suppose I have a custom tag that takes a List of Strings: <%@ attribute name="thelist" type="java.util.List&lt;java.lang.String&gt;" required="true" %> How can I create this attribute in the jsp that calls the tag? I could use a scriptlet <tags:list thelist='<%= java.util.Arrays.asList("blah","blah2") %>' /> but is there any wa...

TeamCity: Scripting elements jsp:declaration, jsp:expression, jsp:scriptlet are disallowed here.

I am not sure where to begin with this error message. I have tried googling, but I was never able to nail down a solid reason why I am getting this message. I have looked at various jsp tutorials and they all seem relatively simple so I don't see the problem. I am writing another plugin for JetBrains TeamCity and have been passing va...

Problem with JSP getRemoteAddress

I would like to find out how to get IP address of the client, that is visiting my web pages. Content of JSP page: <% out.print( request.getRemoteAddr() + "<br>"); out.print( request.getRemoteHost() ); %> Output: 0:0:0:0:0:0:0:1 0:0:0:0:0:0:0:1 ...

Connection between jsp file and resource class

My example is using the ImplicitViewable configuration feature (see WEB-INF/web.xml) and implicit viewables approach, where the JSP pages are mapped via being placed at the right path corresponding to the appropriate resource package name. It doesn't work. What should I do as an extra? if ${it.name} is written into jsp file also resour...

How to include image at runtime using JSP?

I am trying to write a code to download file from server. i am using file.list to display the file in the server so that the user can select it. My doubt is i want to insert a mark( small image)along file name,when the user clicks on the corresponding file name.How to perform this task For Example Pathfinder.exe example.txt mozilla...

Javascript handling an XML file

Can Javascript directly handle an xml file requested via AJAX. I have a server side xml file and need to populate fields from this xml. Can i say 'directly read "xmlfile.xml" (on server)' and then extract values in javascript from the response received and populate as required? Can you explain with example if possible? ...

Simple JSP Application

Hi I am new to JSP and i am trying to write the below code... <%@ page import="java.io.*" %> <%@ page import="com.wipro.assignment2.exceptions.UploadFileNotFoundException" %> <% String requestPath=request.getParameter("file1"); System.out.println("I am printing before SUBMIT button click"); if(requestPath!=null) { ...

Can NullPointerExceptions cause Tomcat performance issues after they've stopped happening?

Hi, all. One of my applications runs on a Windows Service instance of Tomcat 5.5, running Java 1.6. We've got an issue in the code where the application creates a NullPointerException if a SOAP request times out. We had an issue, this morning, where the component on the other side of the SOAP request was unavailable. The result was a...

Passing post data for windows.popup

A popup window is opened using window.popup Is it possible send post data to the popup page? I am working in tomcat + jsp ...

How to upload multiple files in jsp?

I have been using "input type='file' " tag to upload single file but I want to extend the functionality to upload multiple files (selecting multiple file in the same dialog box to upload). I don't have any idea how to accomplish these, any ideas and suggestions? ...

jsp: Grouping news by month

Hey guys. I have a question: I now have a sort array where I have all the news that I fetch from the database. But now ALL are shown. What I want are the news from the last 3 months and these news grouped by month. september ......... News 1, News 2 News 3, News 4 august ....... . . . Any ideas? ...

short version of jsp mail?

Hey guys. I'm searching for an "one-liner" for mailing within jsp. I just wanna send the values of 5 parameters to the webmasters mail-address. Any ideas for a short solution? ...

is it possible to generate page scope variable in jsp 2.0 tag available to parent page?

lets suppose we have a sample.jsp page: <%@ taglib prefix="custom" tagdir="/WEB-INF/tags" %> ... <custom:do var="foo"/> ... is it possible to generate variable with name 'foo' in do.tag which will be visible in our sample.jsp page? page scope variable? ...

Programmatically login to website from Java application

Hello Folks, I am using Apache's HttpCommons 3.1 package to login to a website. The website is jsp page with the form using j_security_check along with j_username and j_password. From a browser, I would do the following: o to the Login.jsp page fill in user name and password click on login button With the valid username and passw...

Struts 2 Select tag

I'm pretty new to the jsp and struts way of doing things and so far I like what I see. My current question is with the use of the struts select tag. I have a page that displays a number of dropdown boxes using struts select currently the options are hard coded in the jsp. I would like to populate them based on a properties file. Howeve...

How do I round a number in JSTL?

Hi, I'm doing a division in a JSP and I'd like to round the result - how should I do this? i.e. <c:set var="expiry" value="${(expire.time - now.time) / (60 * 1000)}"/> ...how do I round the result? Thanks, ...

Clean way for conditionally rendering HTML in view?

Is there a cleaner way to do this in a JSP/Struts1 setup ? <% if (SessionConfig.isAdminMode() ) { %> ... some HTML here ... <% } %> EDIT: In admin mode I would like to have access to additional parameters from a form element, e.g. from the form element: input type="text" value="Test user" name="Owner" EDIT 2: Actually, my probl...

Why data not retrieved using request.getParameter() when using post method in html

In my jsp code I use the request.getParameter() to retrieve the data which is entered in html. The data was retrieved when using get method but it is not when im using post method Why this happend My html form is <code> <form name="inp" action="upload.jsp" method="post" onsubmit="return valid();" enctype="multipart/form-data"> <tabl...