jsp

Javascript in JSP

try { <%if(lBlnBlockScreen){%> UTIL_FORM.fVarForm = document.all.frmMain; UTIL_FORM.fVarInclude = [ document.getElementById('INT_GENDER_DROPDOWN'), . . . document.getElementById('INT_JOIN_calender') ]; UTIL_FORM.fnDisableAll(); document.frmMain.CancelButton.style.display = ''; doc...

What is the problem in this application?

Hi, in my application I am getting a problem which is like Http status-500, I think the problem is in the tld, but really i don't get what is the problem, I'm posting the codes below please check it out and tell me where is the problem. import javax.servlet.jsp.*; import javax.servlet.jsp.tagext.*; public class RequiredTag implements Ta...

Restart list numbering in word for each new list created

Hi, I am exporting content from a jsp page into MS Word using javascript. When the user is in Word there is a table with 10 rows and 2 columns, A & B. The user creates an ordered list in row 1, column A like this: 1 dog 2 cat 3 mouse if the user then creates a second list in row 1 column B is turns out like this: 4 car 5 tr...

Need help with some Hibernate relational mappings

These are the tables I want to map using Hibernate: user (PK UserId) article (PK ArticleId, FK CreatorUserId) category (PK CategoryId, FK ParentCategoryId) I have been looking at the documentation for Hibernate, but I really cannot choose what type of mapping is the most suitable for my tables. Any help would be greatly appreciated! ...

Java servlet and authentication

Hi all, I have a small application with 3-4 servlets and a basic module that provide me authentication like: public class Authentication { public boolean isUserAuthenticated(){ .... } } Is there a way to check the authentication using my class BEFORE every other servlet calls, without have to add code in each of them? I'...

JSPs not displaying objects from model in Spring

I have what should be an easy issue to solve, but I'm having no luck. In my servlet-servlet.xml file, I have the following beans (in addition to others): <bean id="viewResolver" class="org.springframework.web.servlet.view.UrlBasedViewResolver"> <property name="viewClass" value="org.springframework.web.servlet.view.JstlView" /> <prop...

How to change Tomcat / Struts root directory?

Hi, I have a newbie question on Tomcat / Struts. I'm trying to set up a dev version of a site (that's working on the Unix server) on my local machine (Mac). It looks like it can't find anything that is outside of a root server: A JSP page without references to other JSP pages loads, but without images/CSS (in the '/images/' folder) A...

ContentType is application/pdf but it still generates Excel sheet

I am using the following code to generate a PDF document from a JSP, but it generates an Excel sheet. <%@ page buffer="7024kb" %> <%@ page contentType="application/pdf"%> <% String reportType=request.getParameter("reportType"); String fileName=reportType; response.addHeader("Content-disposition", "attachment; filename="+fileName);...

Alternative to User-Agent in .jsp

Sometimes in my .jsp i use User-Agent in order to define what .css class or attribute to use dependently upon client's browser. example: <c:set var="browser" value="${header['User-Agent']}" scope="session"/> <c:if test="${(fn:contains(browser,'Safari'))||(fn:contains(browser,'Chrome'))}"> <c:set var="cellClass" va...

Resin Restarts when class files or Servlets are uploaded.

Hi. When we upload a .class file or a servlet to the server, the web server restarts. This does not happen when we upload a JSP. Is there a way to configure Resin so that it dynamically loads the class without restarting the web server? ...

How to implement a login page without code duplication

I am currently making a dvd browsing system using JSP / Java Servlets and am having trouble figuring out a way to make my login page a bit more efficient. My current login system does this: When a user submits the correct email/password combination, a servlet checks to see if the combination is correct and they are redirected to a lobby...

What is the use of TAG Libraries in JSP and why we are using it?

I am new to JSP and i've come accross Tag libraries, Please give me some detail explaination of tag libraries, where and what type of application we should use that? Thanks in advancve ...

how to highlight the current jsp page link in navigation

is there a better logic to highlight the current jsp page link in navigation page. ...

Pass a List to another jsp file

I wanted to pass a List type object which is in the main JPS to an include JSP ( jsp:include). Since the parm only support strings, I cannot use the parm tag to pass List type data to the include file. Uses examples: <jsp:include page="/jsp/appList.jsp"> <jsp:param name="applications" value="${applications}"/> </jsp:include> Or...

Is request forwarding possible when using CGI?

I'm writing a small content server as a web service. There are 2 units - one authenticates the application requesting content and when authentication succeeds, the request is forwarded to the other unit that serves the content. [1] If I want to do this using CGI scripts, is there any equivalent of jsp:forward in CGI? [2] Suppose if fo...

Eclipse WTP: "The import ___ cannot be resolved for" error in a JSP file for a class defined in project

A Visual Studio user struggling w/ Eclipse... I imported a set of servlets/JSPs into a project in Oracle Workshop for Weblogic. /page.jsp has the following import statement: import="com.foo.bar.*" Eclipse is displaying an error "The import com cannot be resolved". The class that implements the above import in /WEB-INF/src but I don...

Help with putting RDF in a web page (jsp)

When I read the documentation on Common-Tags, I thought it would be easy to put this in a jsp because the examples were cut and paste <body xmlns:ctag="http://commontag.org/ns#" rel="ctag:tagged"> <span typeof="ctag:Tag" rel="ctag:means" resource="http://rdf.freebase.com/ns/en.u2" property="ctag:label" c...

JSP Portlets Flow

Im new to JSP Portlets..I was just concentrating on the flow of these Portlets....I had one doubt, How does our first jsp page gets executed..??? How does doView() executed ?? (Displaying the very first JSP Page...) I was just guessing in this way... portlet.xml --> JSPPortlet(which extends Generic Portlet) --> doDispatch() --> doVie...

javascript setTimeOut function within a jsp

I am trying to use the timeout function within a jsp. But it doesn't work. <script language="javascript"> function hol_logs() { var myAjax = new Ajax.Request( "getlogs.jsp", { method: 'get',parameters: 'jobId=<%=job%>', onComplete: zeige_logs } ); setTimeOut("hol_logs()", 10000); } function zeige_logs( orig...

JSP: where system.out.println prints ?

Where does tomcat puts the System.out.println output ? i'm not interested in OUT.println, i'm using a system that use system.out to log issues, like login sucess/fail, and i need to look to that generated "log". tnx!! ...