Search Results

Search found 1850 results on 74 pages for 'jsp'.

Page 3/74 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • NullPointerException in generated JSP code calling setJspId()

    - by Dobbo
    I am trying to deploy the Duke's Bank example form the J2EE 5 tutorial on JBoss 7.1.1. I have only used (unaltered) the source, and the standard XML configuration files for deployment, part of the exercise here is to see how I might structure a JSP based project of my own. The exception I get is as follows: ERROR [[jsp]] Servlet.service() for servlet jsp threw exception: java.lang.NullPointerException at javax.faces.webapp.UIComponentClassicTagBase.setJspId(UIComponentClassicTagBase.java:1858) [jboss-jsf-api_2.1_spec-2.0.1.Final.jar:2.0.1.Final] at org.apache.jsp.main_jsp._jspx_meth_f_005fview_005f0(main_jsp.java:99) at org.apache.jsp.main_jsp._jspService(main_jsp.java:76) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) [jbossweb-7.0.13.Final.jar:] at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) [jboss-servlet-api_3.0_spec-1.0.0.Final.jar:1.0.0.Final] at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:369) [jbossweb-7.0.13.Final.jar:] at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:326) [jbossweb-7.0.13.Final.jar:] at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:253) [jbossweb-7.0.13.Final.jar:] at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) [jboss-servlet-api_3.0_spec-1.0.0.Final.jar:1.0.0.Final] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:329) [jbossweb-7.0.13.Final.jar:] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.13.Final.jar:] at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275) [jbossweb-7.0.13.Final.jar:] at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161) [jbossweb-7.0.13.Final.jar:] at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:397) [jbossweb-7.0.13.Final.jar:] at org.jboss.as.jpa.interceptor.WebNonTxEmCloserValve.invoke(WebNonTxEmCloserValve.java:50) [jboss-as-jpa-7.1.1.Final.jar:7.1.1.Final] at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:153) [jboss-as-web-7.1.1.Final.jar:7.1.1.Final] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155) [jbossweb-7.0.13.Final.jar:] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) [jbossweb-7.0.13.Final.jar:] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) [jbossweb-7.0.13.Final.jar:] at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:368) [jbossweb-7.0.13.Final.jar:] at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877) [jbossweb-7.0.13.Final.jar:] at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:671) [jbossweb-7.0.13.Final.jar:] at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:930) [jbossweb-7.0.13.Final.jar:] at java.lang.Thread.run(Thread.java:636) [rt.jar:1.6.0_18] I have not given any JBoss configuration files, the WAR's WEB-INF part looks like this: $ jar tvf build/lib/dukebank-web.war 0 Sat Dec 15 22:00:12 GMT 2012 META-INF/ 123 Sat Dec 15 22:00:10 GMT 2012 META-INF/MANIFEST.MF 0 Sat Dec 15 22:00:12 GMT 2012 WEB-INF/ 2514 Fri Dec 14 14:29:20 GMT 2012 WEB-INF/web.xml 1348 Sat Dec 15 08:19:46 GMT 2012 WEB-INF/dukesBank.tld 7245 Sat Dec 15 08:19:46 GMT 2012 WEB-INF/faces-config.xml 2153 Sat Dec 15 08:19:46 GMT 2012 WEB-INF/tutorial-template.tld 0 Sat Dec 15 22:00:12 GMT 2012 WEB-INF/classes/... The JSP file (main.jsp) that causes this problem is: <f:view> <h:form> <jsp:include page="/template/template.jsp"/> <center> <h3><h:outputText value="#{bundle.Welcome}"/></h3> </center> </h:form> </f:view> The template file it includes: <%@ taglib uri="/WEB-INF/tutorial-template.tld" prefix="tt" %> <%@ page errorPage="/template/errorpage.jsp" %> <%@ include file="/template/screendefinitions.jspf" %> <html> <head> <title> <tt:insert definition="bank" parameter="title"/> </title> <link rel="stylesheet" type="text/css" href="stylesheet.css"> </head> <body bgcolor="#ffffff"> <tt:insert definition="bank" parameter="banner"/> <tt:insert definition="bank" parameter="links"/> </body> </html> I will refrain from coping any more files because, as I said at the start I haven't altered any of the files I have used. Many thanks for your help, Steve

    Read the article

  • JSP includes and MVC pattern

    - by xingyu
    I am new to JSP/Servlets/MVC and am writing a JSP page (using Servlets and MVC pattern) that displays information about recipies, and want the ability for users to "comment" on it too. So for the Servlet, on doGet(), it grabs all the required info into a Model POJO and forwards the request on to a JSP View for rendering. That is working just fine. I'd like the "comment" part to be a separate JSP, so on the RecipeView.jsp I can use to separate these views out. So I've made that, but am now a little stuck. The form in the CommentOnRecipe.jsp posts to a CommentAction servlet that handles the recording of the comment just fine. So when I reload the Recipe page, I can see the comment I just made. I'd like to: Reload the page automatically after commenting (no AJAX for now) Block the user from making more than one comment on each Recipe over a 1 day timeframe (via a Cookie). So I store a cookie indicating the product ID whenever the user makes a comment, so we can check this later? How would it work in a MVC context? Show a message to the user that they have already commented on the Recipe when they visit one which they have commented on I'm confused about using beans/including JSPs etc on how to achieve this. I know in ASP.NET land, it would be a UseControl that I would place on a page, or in ASP.NET MVC, it would be a PartialView of some sort. I'm just confused with the way this works in a JSP/Servlets/MVC context.

    Read the article

  • JSP page within GWT frame

    - by manu sinha
    i have created a gwt application in which i need to display a series of jsp pages. the jsp pages are present inside a gwt frame which itself is present within a Tabpanel. Now i need to close the tab panel automatically as soon as the user enters the value in any jsp page and submit it. Can anyone suggest me any possible solution as to how i can access(get reference) the tab panel from the jsp page in order to close it.

    Read the article

  • Making JSP page not set the response content-type

    - by doublep
    Is it possible to make JSP pages not set any content type on response? In my setup, JSP doesn't directly generate the response, but rather an intermediate presentation, which is then processed by additional Java code that creates HTML or JSON based on that. So, can I somehow make JSP not set content-type on the response and leave it to the intermediate code? If I just remove contentType="..." in a JSP, it still defaults to text/html.

    Read the article

  • Google map in jsp document

    - by Todd
    Hi, I am trying to implement google map api into one of my web page which is generated by jsp document, and I am having trouble getting it work. I found some jsp taglibrary by www.lamatek.com/GoogleMaps, but it doesn't seem to work.(I mean even examples on their web site don't work) Has anyone done work on google map in jsp document? I can really use some help or advice.(It seems like jsp docuemnt and javascript just don't get along) p.s I can get static google map work, but that's not my client wants.

    Read the article

  • passing form values from one jsp to another

    - by shil
    hi i need to access form data given entered in one jsp in another.. this is how my code looks fisrt jsp: second jsp: <%=request.getParameter("firstame")% now this prints a null value.. what is the mistake here? how do i get to access the values in my second jsp?

    Read the article

  • good Book for learning JSP practically

    - by persistence
    hi I am new to JSP. I wish to learn JSP with more of practical approach. I have already gone through "Head First JSP and servlets"...but it is more dedicated towards SCWCD... so this time i wish to take sugesstion before picking up a book... I need a book with is much more of practical approach... covers traps in JSP.... thanks.

    Read the article

  • Error in jsp program calling servlet variable

    - by megala
    hi i created one webapplication project.It containe one servlet file jsp file. I created one string variable in servlet and assign some value like /* sampleservlet.java *******/ String s=" WELCOME" My constraints I want to display the string in my jsp file.so that i import the servlet file inj jsp and i created object as ---call--- jsp file contain following coding <%sampleservlet call ;% <%call.s% But it shows error how to solve this?

    Read the article

  • Java servlet and JSP accessing the same session bean

    - by Mykola Golubyev
    Let's say I have simple Login servlet that checks the passed name and creates User object and stores it in a session. User user = new User(); user.setId(name); request.getSession().setAttribute("user", user); response.sendRedirect("index.jsp"); In the index.jsp page I access the user object through jsp:useBean <jsp:useBean id="user" scope="session" class="package.name.User"/> <div class="panel"> Welcome ${user.id} </div> It works so far. The question: is this a valid usage or it is just current implementation uses the same name as the jsp bean id when stores and looks for a bean in a session?

    Read the article

  • Is dependency injection possible for JSP beans?

    - by kazanaki
    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 intercept the bean creation so that when "cart" is referenced for the first time, some some of injection takes place? Can I define somewhere a "listener" for JSP beans (like you can do for JSF beans for example)? I am free to do anything I want in the back-end, but I cannot add a web framework in the front-end (Don't ask!)

    Read the article

  • Passing a variable to jsp when reloading an iframe using javascript

    - by Vee
    In my javascript code I load a jsp page in an iframe and pass some variables like this: htmlData[i++]="<iframe id=\"mapframe\" frameborder=\"0\" style=\"width:330px;height:300px\" src=\"" + "mapURL.jsp" +"&lat=" + AjxStringUtil.urlComponentEncode("33.65") +"&lng=" + AjxStringUtil.urlComponentEncode("-84.42") +"&accord=" + AjxStringUtil.urlComponentEncode(accord) +"\"></iframe>"; Then I have to reload that jsp page after an action, and I do this: accord = ui.newHeader.text(); document.getElementById('mapframe').contentWindow.location.reload(); The reload works except that the "accord" variable is not getting updated. When I call it from the jsp, it still has its original value. How do I pass the new value when reloading the iframe/jsp? It shouldn't make any difference, but I am working with jquery and this is for a Yahoo zimlet. Thanks.

    Read the article

  • Java: JSP halt execution on rest of page

    - by bguiz
    Hi, How do you stop a JSP from executing? I have JSPs which kick the user off a page by means of a "forward". public boolean kickIfNotLoggedIn( HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { //code to check if user is logged in req.getRequestDispatcher( ACCESS_DENIED_PAGE).forward(request, response); } In my JSP, I have this code, BEFORE any HTML output: <% //loginHelper.kickIfNotLoggedIn(request, response); if (!loginHelper.kickIfNotLoggedIn(request, response)) { return; } %> If I don't use the return statement, the JSP continues processing, and I get a NullPointerException. If I use the return statement (as is commonly suggested on various sources on the net), I get an IllegalStateException: StandardWrapperValve[jsp]: PWC1406: Servlet.service() for servlet jsp threw exception java.lang.IllegalStateException: PWC3991: getOutputStream() has already been called for this response at org.apache.coyote.tomcat5.CoyoteResponse.getWriter(CoyoteResponse.java:717) at org.apache.coyote.tomcat5.CoyoteResponseFacade.getWriter(CoyoteResponseFacade.java:226) at org.apache.jasper.runtime.JspWriterImpl.initOut(JspWriterImpl.java:187) Any ideas how to fix this, or another way to achieve an access denied page? Thanks

    Read the article

  • Is there any good reason to use <rtexprvalue>false</rtexprvalue> in JSP tags?

    - by Superfilin
    Is there any good reason to disallow scriptlet or EL expression to be inserted as attribute value? Let's say we have tag: <tag> <name>mytag</name> <tag-class>org.apache.beehive.netui.tags.tree.Tree</tag-class> <attribute> <name>attr</name> <required>false</required> <rtexprvalue>false</rtexprvalue> <type>boolean</type> </attribute> </tag> What could be a good reason for dissallowing the below? <my:mytag attr="${setting}" />

    Read the article

  • JSP / Tomcat / Apache setup overview on Fedora Core

    - by Richard T
    Hi Folks, For someone with so much Java experience, boy do I feel clueless - thanks in advance for your help in my grocking the present (Feb, 2010) JSP environment. Here's what I am hoping to learn: Do I understand correctly that most people use Apache to "front-end" their Tomcat servers, such that Apache "talks" directly to web clients and "proxies" Tomcat servers? Do I understand correctly that Apache isn't capable of serving JSP directly but requires a server (like Tomcat)? Is there an RPM package for Fedora Core so I don't have to build one myself? Or, does Fedora Core's package installer do a good job on this one from source code? (Some do, some don't!) While I'm here asking questions; Does Tomcat come with a working example that one can start hacking on as a way to get started quickly? If not, got a good suggestion? Thanks folks, RT

    Read the article

  • How can I map a spring controller to a url with .jsp extension?

    - by Matteo Caprari
    Hi. We are in the process of migrating a jsp-only application to Spring-MVC. For various reasons we can't change the extension of the current pages. (calls to login.jsp need to handled by a spring controller that will use a jsp file as view). We are doing this iteratively, so some pages need to stay jsp files (calls to welcome.jsp won't be handled by a controller). To do that I mapped both the DispatcherDervlet and the HandlerMapping to *.jsp, and configured the JstlView in the standard way. Unfortunately, if I browse to //login.jsp I get an error saying <No mapping found for HTTP request with URI [/<context>/WEB-INF/jsp/login.jsp] in DispatcherServlet with name 'spring'> It all works if I change .jsp to any other extension in DispatcherServlet and HandlerMapping. web.xml: <servlet> <servlet-name>spring</servlet-name> <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class> <load-on-startup>1</load-on-startup> </servlet> <servlet-mapping> <servlet-name>spring</servlet-name> <url-pattern>*.jsp</url-pattern> </servlet-mapping> spring-servlet.xml: <!-- View resolver --> <bean id="viewResolver" class="org.springframework.web.servlet.view.UrlBasedViewResolver"> <property name="viewClass" value="org.springframework.web.servlet.view.JstlView"/> <property name="prefix" value="/WEB-INF/jsp/"/> <property name="suffix" value=".jsp"/> </bean> <!-- URL Mapping --> <bean id="publicUrlMapping" class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping"> <property name="urlMap"> <map> <entry key="/login.jsp" value-ref="loginController"/> </map> </property> </bean> Thanks a lot.

    Read the article

  • Java JSP/Servlet: controller servlet throwing the famous stack overflow

    - by NoozNooz42
    I've read several docs and I don't get it: I know I'm doing something wrong but I don't understand what. I've got a website that is entirely dynamically generated: there's hardly any static content at all. So, trying to understand JSP/Servlet, I've written my own "front controller" intercepting every single query, it looks like this: <servlet-mapping> <servlet-name>defaultservlet</servlet-name> <url-pattern>/*</url-pattern> </servlet-mapping> Basically I want any user request, like: example.org example.org/bar example.org/foo.html to all go through a default servlet which I've written. The servlet then examines the URI and find to which .jsp the request must be dispatched, and then does, after having set all the attributes correctly, a: RequestDispatcher dispatcher = getServletContext().getRequestDispatcher("/WEB-INF/jsp/index.jsp"); dispatcher.forward(req, resp); When I'm using a url-pattern (in web.xml) like, say, *.html, everything works fine. But when I change it to /* (to really intercept everything), I enter an endless loop and it ends up with a... StackOverflow :) When the request is dispatched, is the URI ".../WEB-INF/jsp/index.jsp" itself matched by the web.xml filter /* that I set? How should I do if I want to intercept everything using a /* url-pattern and yet be able to dispatch/forward/? I'm not asking about specs/Javadocs here: I'm really confused about the bigger picture and I'd need some explanation as to what could be going on. Am I not supposed to intercept really everything? If I can intercept everything, what should I be aware of regarding forwarding/dispatching?

    Read the article

  • Building asynchronous cache pattern with JSP

    - by merweirdo
    I have a JSP that will take some 8 minutes to render. The code logic itself can not be made more efficient (it will update often and be updated by basically a pointy haired boss). I tried wrapping it with a caching layer like <%@ taglib uri="/WEB-INF/classes/oscache.tld" prefix="oscache" %> <oscache:cache time="60"> <div class="pagecontent"> ..... my logic </div> </oscache:cache> This is nice until the 60 seconds is over. The next query after that blocks until the 8 minutes of rendering is done with again. I would need a way to build a pattern something like: If there is no version of the dynamic content in the cache run the actual logic (and populate the cache for subsequent requests) If there is a non-expired version of the dynamic content in the cache serve the output of the JSP logic from the cache If there is an expired version of the dynamic content in the cache serve the output of the JSP logic still from the cache AND run the JSP logic in the background so that the cache gets updated transparently to the user - avoiding the user have to wait for 8 minutes I found out that at least EHCache might be able to do some asynchronous cache updating but it did not sadly seem to apply to the JSP tags... Also I have to take in 10-20 parameters for the actual logic of the JSP and some of them should be used as a key for caching. Code example and/or pointers would be greatly appreciated. I do not frankly care if the solution provided is extremely ugly. I just want a simple 5 minute caching with asynchronous cache update taking into account some parameters as a key.

    Read the article

  • How can I extend Eclipse Java search to JSPs?

    - by benhsu
    Friends, Our JSP code uses both Spring form tags and JSTL tags. Is there a way that when I search for getFoo() in the Eclipse Java Search, for Eclipse to also return uses of the foo property in the JSP files? I suspect the answer is "no", because there isn't a way at compile time to tell the types of the JSP beans, but its worth asking, right?

    Read the article

  • Tiles vs. JSP includes

    - by Angus Croll
    We have a large web-app with hundreds of jsps pages. To avoid repeating markup up blocks we are considering making use of struts tiles. Now it seems messy to have a combination of both <t:insertTemplate template="/WEB-INF/templates/xxxxx.jsp"> and <%@ include file="xxxxx.jsp"%> statements so we are considering converting all includes statements to insertTemplates (whether or not the template includes any tile syntax) Has anyone had any experience with using tiles 100% for jsp includes?

    Read the article

  • How to download attachment file from JSP

    - by Stardust
    I want to know how can I download any file from JSP page based on content disposition as an attachment from mail server. I want to create a link on JSP page, and by clicking on that link user can download file from mail server. The link should be for content dispostion's attachment type. How can I do that in JSP?

    Read the article

  • Setting the default jsp view with spring mvc

    - by Walker
    I want to set one of jsp files in my jsps folder as the default view for the application. Is there any way we can tell in that abc.jsp needs to be default and it can be found in such and such path. Also the url pattern is html so is there a way it can be mapped in Spring MVC. For example - When a user types www.example.com , I want the application to direct to abc.jsp page and also when someone types www.example.com/something, even then application should direct to abc.jsp, but the url pattern shouldnt be compromised. Many Thanks. Nice Day Walker

    Read the article

  • Browser show incomplete JSP data

    - by memoryleaks
    I am using JSP, Struts 1.3 and Apache Tomcat 5.5. For some reason response from JSP is being truncated and complete information is not shown. Class generated from the problem JSP page looks just fine. There are no any errors logged in Catalina's logs. I have no idea how this issue can be fixed.

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >