Search Results

Search found 7465 results on 299 pages for 'jsp tags'.

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

  • 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

  • javascript and jsp

    - by akellakarthik1254
    i am new bee to java. i have a html which has a show users button, on clicking this button i should redirect the user to a users.jsp page. How do i achieve that. will a function like this will help function msg() { alert("List of Users");<br/> jsp:forward page="Users.jsp"<br/> }

    Read the article

  • What would be the light way to render a JSP page without an App/Web Server

    - by kolrie
    First, some background: I will have to work on code for a JSP that will demand a lot of code fixing and testing. This JSP will receive a structure of given objects, and render it according to a couple of rules. What I would like to do, is to write a "Test Server" that would read some mock data out of a fixtures file, and mock those objects into a factory that would be used by the JSP in question. The target App Server is WebSphere and I would like to code, change, code in order to test appropriate HTML rendering. I have done something similar on the past, but the JSP part was just calling a method on a rendering object, so I created an Ad Hoc HTTP server that would read the fixture files, parse it and render HTML. All I had to do was run it inside RAD, change the HTML code and hit F5. So question pretty much goes down to: Is there any stand alone library or lightweight server (I thought of Jetty) that would take a JSP, and given the correct contexts (Request, Response, Session, etc.) render the proper HTML?

    Read the article

  • How do I set the user's locale on a JSP

    - by ebynum
    I have a .jsp page that the user loads directly. The request it with a URL like the following: http://www.example.com/myfile.jsp?country=CA&language=fr In the JSP, I pull the URL GET parameters and attempt to set the locale using them as follows: <% String myLanguage = request.getParameter("language"); String myCountry = request.getParameter("country"); Locale myLocale = new Locale(myLanguage, myCountry); pageContext.setAttribute("myLocale", myLocale, PageContext.PAGE_SCOPE); %> <fmt:setLocale value="${myLocale}" scope="page" /> There are several places in the JSP that then display a message pulled from a localized resource bundle using <bean:message bundle="ts" key="..." /> from Struts. On the first request for this page (after changing the language in the URL), it is returned in US English (the default Locale), and then subsequent refreshes will return the properly localized content.

    Read the article

  • logout code in jsp.

    - by ajay
    I am using basic level authentication. and i need best logout code in JSP / servlet. I am using JSP & servlet and MS-ACCESS as backend. Is it require a session creation in JSP? please reply as soon as possible. Thanking you.....

    Read the article

  • Custom tag with the logic in JSP (interprets JSPs with the passed parameters)

    - by Romario
    I want to create a custom jsp tag. I want this tag to take a jsp file as a parameter, and in this jsp I want to write the whole logic of the tag. Let's say I want to pass a collection to a tag and then I would write code in jsp to iterate the collection and display it in . Why I want to do it - I really hate having out.print() in my code. Is something like this feasible? I remember doing something similar a while ago, I just forgot the details and my search doesn't seem to find relevant info - a link to a good implementation of the would be nice.

    Read the article

  • JSP: Use information from one page to another

    - by Sandeep Bansal
    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 it work. Thanks.

    Read the article

  • jsp update request happens to be invoked by a link

    - by Akshatha
    <tr class="bg-row1"> <td class="td-highlighted-2"> <div align="left"><a href="<%=contextPath%>/jsp/admin/UpdateProject.jsp"><%=searchList1.getProjid()%></a></div> </td> <td class="td-highlighted-2"> <div align="left"><%=searchList1.getProjname()%></div> </td> </tr> here jsp update request happens to be invoked by a link in updateproject.jsp how can i refer projid and projname value in a text box

    Read the article

  • Run jsp in eclipse on specific port and ssl

    - by zealot452
    Hello, I have used Eclipse 3.4 to create a Dynamic Web Project. I have also configured my server to use port 8443 with ssl. If I start my server I can access my test.jsp by going to it's address https://localhost:8443/TestContext/test.jsp In eclipse, I have installed this server and added my project to the server. If I Run test.jsp it always launches as http://localhost:8080/TestContext/test.jsp My question is: How can I set up eclipse to run this on https://localhost:8443/ rather than the default 8080? Thanks in advance.

    Read the article

  • Notepad++ tabbing out of tags, autocomplete

    - by Matt
    I'm trying to learn a little HTML. Everyone says to use Notepad++ over notepad. I have autocomplete on. My question: When I type my opening tag and Notepad++ then puts"""" closing tag, how do I "jump" out of the tag when I'm done typing? If I tab or hit enter, I'm still stuck before the closing tag. I can use my arrow keys, but if I'm going to do that, I would rather just type the closing tags. Also if I have an UL of 10 items, and I want to change it to an OL, how do I select both the opening and closing tags so I may edit them at the same time? Thanks PS I wasn't able to post the HTML tags.

    Read the article

  • Please help with my JSP Internationalization problem

    - by wokena
    I have problem with I18N in JSP, specifically, with forms. When I enter some Czech characters (e.g., "ešcržýá...") into my page one form, into the field "fieldOne", and then show text from that field on page two, instead of Czech characters I see this as "čč". (Note, the second page gets the Czech characters with "request.getProperty("fieldOne")") Here is the source code: Page one: <%@page contentType="text/html"%> <%@page pageEncoding="UTF-8"%> <%@ taglib uri="http://jakarta.apache.org/struts/tags-bean" prefix="bean" %> <%@ taglib uri="http://jakarta.apache.org/struts/tags-html" prefix="html" %> <%@ taglib uri="http://jakarta.apache.org/struts/tags-logic" prefix="logic" %> <html> <head></head> <body> <form action="druha.jsp" method="post"> <input type="textarea" name="fieldOne"> <input type="submit"> </form> </body> </html> Page two: <%@page contentType="text/html" pageEncoding="UTF-8"%> <%@ taglib uri="http://jakarta.apache.org/struts/tags-bean" prefix="bean" %> <%@ taglib uri="http://jakarta.apache.org/struts/tags-html" prefix="html" %> <%@ taglib uri="http://jakarta.apache.org/struts/tags-logic" prefix="logic" %> <html> <head></head> <body> <h1>The text: </h1> <%=request.getProperty("fieldOne")%> </body> </html> Thanks for help...

    Read the article

  • JSF (and friends) tags vs. traditional html tags

    - by H3wh0s33ks
    So this question came up today and I didn't have a specific or scientific answer. What are the costs associated with using jsf (or tomahawk, faclets, etc., etc.) tags in place of traditional html tags. My gut reaction is that you should use jsf tags in situations where you need the additional functionality they provide, and use traditional tags when you don't. Also I feel like jsf tags would require more resources (since the server has to take them and rerender them as html anyways) than html. Does anybody know what the cost actually is (as far as time and memory)? Also useful information is what is the convention that is in use, pure jsf or a mixture of the two?

    Read the article

  • Writing a Servlet that checks to see if JSP's exist and forwards to another JSP if they aren't

    - by Omar Kooheji
    I've beeb tasked with writing a servlet that intercepts a call to and JSP in a specific directoy, check that the file exists and if it does just forwarding to that file, if if doesn't I'm to forward to a default JSP. I've setup the web.xml as follows: <servlet> <description>This is the description of my J2EE component</description> <display-name>This is the display name of my J2EE component</display-name> <servlet-name>CustomJSPListener</servlet-name> <servlet-class> ... CustomJSPListener</servlet-class> <load-on-startup>1</load-on-startup> </servlet> ... <servlet-mapping> <servlet-name>CustomJSPListener</servlet-name> <url-pattern>/custom/*</url-pattern> </servlet-mapping> And the doGet method of the servlet is as follows: public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { logger.debug(String.format("Intercepted a request for an item in the custom directory [%s]",request.getRequestURL().toString())); String requestUri = request.getRequestURI(); // Check that the file name contains a text string if (requestUri.toLowerCase(Locale.UK).contains("someText")){ logger.debug(String.format("We are interested in this file [%s]",requestUri)); File file = new File(requestUri); boolean fileExists = file.exists(); logger.debug(String.format("Checking to see if file [%s] exists [%s].",requestUri,fileExists)); // if the file exists just forward it to the file if (fileExists){ getServletConfig().getServletContext().getRequestDispatcher( requestUri).forward(request,response); } else { // Otherwise redirect to default.jsp getServletConfig().getServletContext().getRequestDispatcher( "/custom/default.jsp").forward(request,response); } } else { // We aren't responsible for checking this file exists just pass it on to the requeseted jsp getServletConfig().getServletContext().getRequestDispatcher( requestUri).forward(request,response); } } This seems to result in an error 500 from tomcat, I think this is because the servlet is redirecting to the same folder which is then being intercepted again by the servlet, resulting in an infinite loop. Is there a better way to do this? I'm lead to believe that I could use filters to do this, but I don't know very much about them.

    Read the article

  • Access variables between nested JSP tags

    - by user308053
    I would like to exchange information between two nested JSP tagx artifacts. To give an example: list.jspx <myNs:table data="${myTableData}"> <myNs:column property="firstName" label="First Name"/> <myNs:column property="lastName" label="Last Name"/> </myNs:table> Now, the table.tagx is supposed to display the data columns as defined in the nested column tags. The question is how do I get access to the values of the property and label attributes of the nested column tags from the table tag. I tried jsp:directive.variable but that seems only to work to exchange information between a jsp and a tag, but not between nested tags. Note, I would like to avoid using java backing objects for both the table and the column tags at all. I would also like to know how I can access an attribute defined by a parent tag (in this example I would like to access the contents of the data attribute in table.tagx from column.tagx). So it boils down to how can I access variables between nested JSP tags which are purely implemented through the tag definitions themselves (no Java TagHandler implementation desired)?

    Read the article

  • Populating JavaScript Array from JSP List

    - by tkeE2036
    Ok so perhaps someone can help me with a problem I'm trying to solve. Essentially I have a JSP page which gets a list of Country objects (from the method referenceData() from a Spring Portlet SimpleFormController, not entirely relevant but just mentioning in case it is). Each Country object has a Set of province objects and each province and country have a name field: public class Country { private String name; private Set<Province> provinces; //Getters and setters } public class Province { private String name; //Getters and setters } Now I have two drop down menus in my JSP for countries and provinces and I want to filter the provinces by country. I've been following this tutorial/guide to make a chain select in JavaScript. Now I need a dynamic way to create the JavaScript array from my content. And before anyone mentions AJAX this is out of the question since our project uses portlets and we'd like to stay away from using frameworks like DWR or creating a servlet. Here is the JavaScript/JSP I have so far but it is not populating the Array with anything: var countries = new Array(); <c:forEach items="${countryList}" var="country" varStatus="status"> countries[status.index] = new Array(); countries[status.index]['country'] = ${country.name}; countries[status.index]['provinces'] = [ <c:forEach items="${country.provinces}" var="province" varStatus="provinceStatus"> '${province.name}' <c:if test="${!provinceStatus.last}"> , </c:if> </c:forEach> ]; </c:forEach> Does anyone know how to create an JavaScript array in JSP in the case above or what the 'best-practice' would be considered in this case? Thanks in advance!

    Read the article

  • Accessing Spring beans from a Tiles view (JSP)

    - by Sinuhe
    In Spring MVC I can access my beans in JSP using JstlView's exposedContextBeanNames (or exposeContextBeansAsAttributes). For example, then, in my JSP I can write (${properties.myProperty). But when the same JSP is a part of a tiles view, these properties aren't accessible. Is possible to configure Tiles properly or access these properties in another way? I'm using Spring MVC 3.0.2 and Tiles 2.2.1. Here's a bit of my configuration: <bean id="tilesViewResolver" class="org.springframework.web.servlet.view.UrlBasedViewResolver"> <property name="order" value="1"/> <property name="viewClass" value="org.springframework.web.servlet.view.tiles2.TilesView" /> </bean> <bean class="org.springframework.web.servlet.view.InternalResourceViewResolver"> <property name="viewClass" value="org.springframework.web.servlet.view.JstlView"/> <property name="order" value="2"/> <property name="prefix" value="/WEB-INF/views/"/> <property name="suffix" value=".jsp"/> <property name="exposedContextBeanNames"> <list><value>properties</value></list> </property> </bean>

    Read the article

  • html includes in a JSP using IIS/WebLogic

    - by Striker
    I have my IIS 6 server setup to process server side includes, we're also using the WebLogic ISAPI plugin for IIS. I have a simple html file that I'm trying to include in the JSP using the following include: <!-- #include file="/pleaseWait/pleaseWait.html" --> When I use the above line in a JSP I get an error message saying: "pleaseWait is not defined". From an HTML file on the web server it works fine. The include works in the HTML whether I use file or virtual. I can't use the jsp @ include because that's resolved at build time and the HTML file does not exist in the Java project. It's static content so it's on the IIS server. In the past we've change the extension to .jsp and included the images and static content in the .war file....the problem with that is we now have 10 different versions of this code in our apps and not all of them look or function the same. This is an attempt to standardize and centralize the code for this feature across our apps. Any ideas or suggestions?

    Read the article

  • SQL query in JSP file pulling variable from VXML file

    - by s1066
    Hi I'm trying to get an SQL query to work within a JSP file. The JSP file is pulled by a VXML file here is my JSP file code: <?xml version="1.0"?> <%@ page import="java.util.*" %> <%@ page import="java.sql.*" %> <% boolean success = true; // Always optimistic String info = ""; String schoolname = request.getParameter("schoolname"); String informationtype = request.getParameter("informationtype"); try { Class.forName("org.postgresql.Driver"); String connectString = "jdbc:postgresql://localhost:5435/N0176359"; String user = "****"; String password = "*****"; Connection conn = DriverManager.getConnection(connectString, user, password); Statement st = conn.createStatement(); ResultSet rsvp = st.executeQuery("SELECT * FROM lincolnshire_school_information_new WHERE school_name=\'"+schoolname+"\'"); rsvp.next(); info = rsvp.getString(2); }catch (ClassNotFoundException e) { success = false; // something went wrong } %> As you can see I'm trying to insert the value of the variable declared as "schooname" into the end of the SQL query. However when I come to run the jsp file it doesn't work and I get an error "ResultSet not positioned properly". When I put a standard query in (without trying to make it value of the variable it works fine) Hope that makes sense, and thank you for any help!

    Read the article

  • From Servlet to JSP

    - by kawtousse
    When trying to pass a table built with HTML in my servlet like that: response.setContentType("text/html" ); PrintWriter out = response.getWriter(); out.println("<html>" ); out.println("<head>" ); out.println("<title>Imput OPC</title>" ); out.println("</head>" ); out.println("<body>" ); ... and then response.sendRedirect("/xxx.jsp" ); But I did not found any table in the JSP. A friend told me to use a Bean but how can i catch values from the form ( because I have a treatement with the form before constructing table)in a bean.I must use a servlet for that. So what I want is exactly to construct in the response a table then send it to jsp knowing that: .sendRedirect and getServletContext().getRequestDispatcher("/xxx.jsp").forward(request, response); gives nothing at all. Please Help its urgent. Thinks.

    Read the article

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