jsp

Save cookies with subDomain ?

greetings all i want to save cookies with subDomains and i want to know how to do so this is my current configuration: ProxyPass / ajp://127.0.0.1:8009/appName/ ProxyPassReverse / ajp://127.0.0.1:8009/appName/ ProxyPassReverseCookieDomain .appName.com *.appName.com ProxyPassReverseCookiePath / /appName ...

What is a secure way to pass login and password from a client to a server during authentication?

I've just set up a proxy and run all my request through that proxy. I investigated several different applications: they pass login and password pair raw, i.e. I can grab them from POST-request parameter. How should it be implemented to make it more secure? (I haven't investigated gmail and facebook yet, but I think they don't have thi...

how to create Jqgrid using jsp..

Hello All I am very new in jquery and json.i know jsp and java in my project job i have to implement a data grid same like shows in http://www.trirand.com/blog/jqgrid/jqgrid.html# i this example site i need a datagrid using Json object. i explore all in internet but i cant find any help of that. please provide me an example with uses j...

JSP what taglib should be added?

What lines starting with <%@ should be added at the beginning of a JSP file to be able to make use of the tag. I have added the following line to the beginning of my jsp. <%@ taglib prefix="html" uri="http://struts.apache.org/tags-html" %> But Eclipse IDE says The tag handler class for "html:link" (org.apache.struts.taglib.h...

Annotated Controllers in Spring, passing parameter to jsp

Hello, I'm trying to complete that tutorial with annotated controllers. I got stuck on the Step 2. Here is what they have for Simple Controllers: public ModelAndView handleRequest(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { String now = (new Date()).toString(); logg...

passing values between two jsp files

<% if(empRecNum != null && !(empRecNum.equals(""))) { empSelected=true; } boolean canModify = UTIL.hasSecurity("PFTMODFY") && empSelected; %> <script type="text/javascript"> function add(){ alert('hello'); df('ADD'); } </script> On the click of add button, i need to pass...

passing value to JavaScript from JSP

<% if(empRecNum != null && !(empRecNum.equals(""))) { empSelected=true; } boolean canModify = UTIL.hasSecurity("PFTMODFY") && empSelected; %> <script type="text/javascript"> function add(){ alert(canModify); df('ADD'); } </script> I need to alert the canModify in my JavaSc...

checking whether the variable is true or not.

function add(){ <%if(empRecNum != null && !(empRecNum.equals(""))) { empSelected=true; } boolean canModify = UTIL.hasSecurity("PFTMODFY") && empSelected; %> df('ADD'); } When i click on add, i need to check whether the empSelected is true or not and pass this canModify value. Will this...

How to open one jsp from another through struts

How to open One jsp from another through Struts? For example, I have 2 JSPs, Page1.jsp & Page2.jsp. Page1.jsp does not contain any Form. Page2.jsp contains a Form. I need a link on Page1.jsp which when clicked takes me to Page2.jsp. What are the Actionmappings needed to be added to struts-config.xml? Update: I t...

JSON and HTTP POST through URL

Hi, How can I allow my servlet to accept 4 parameters via HTTP POST through a URL? Example of URL: http:///servlet The information returned will be in text format using the JSON format. JSONObject myStr = new JSONObject(); Am using Model-View-Controller access model. JSP are my view pages, Servlets are my controllers and model are...

php function - jsp equivalent

in php I do this: <?php function displaySomething($list) { foreach ($list as $item) { ?> <html code here><?php echo $item["field"] ?><html code again etc> <?php } } ?> And then I use it to display different lists in different places in my page. Is there a way to achieve this with jsp? Create methods with paramete...

Why does this PrettyTime custom tag produce 11 lines of blank text before the "pretty" date in the HTML output?

<%@ tag language="java" pageEncoding="utf-8" isELIgnored="false" %> <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> <%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> <%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %> <%@ tag import="com.ocpsoft.pretty.time.PrettyTime, java.util.Date"%>...

Java keywords not allowed as EL identifiers

Recently I upgraded my development tomcat from 7.0.0 to 7.0.4. I had things like: <c:set var="static" value=".." /> <c:set var="class" value=".." /> Both worked on 7.0.0 but stopped working on 7.0.4. I opened a bug, it was closed, with the answer that: In and of itself, that tag will compile. The checks for Java identifiers w...

Good alternate for Jakarta Taglibs?

We use Jakarta Taglibs to ouput some basic HTML form elements like selects. It appears this library has been retired.. are there any good alternates? Looking for something simple that will take a Java Map and output it to HTML. ...

passing value to JSP via javaScript

boolean canModify = UTIL.hasSecurity("PFTMODFY") && something; function name() { I need to pass a value false to something when the page loads. } window.onLoad = name How can i pass a value from JavaScript to JSP on the page load ...

combo box issue in jsp

i have combo box in jsp using Struts2: select the value of combo box, page is refreshing but after refreshing it display the default value in combo box (first value), not the selected value. how i show the selected value in combox after refreshing. here is my code on jsp. Combo box: <select name="ItemName" id="ItemName" onchange="...

Differing ascii tables code values ?

Hi, I'm trying to display an extended character on a mobile phone. The ascii value of 160 on my windows machine is á. According to http://slayeroffice.com/tools/ascii/ the ascii value of á is 225. Which one is correct ? Can different hardware devices such as phones have a different ascii character set or do they all follow a standard ...

Creating a menu in CSS using classes

Hi, I have a website page that uses tables for layout and I am trying to convert it to CSS (never used before) The navigation is 6 forms with different images placed besides. I know I can give each of these an id and position using css but there must be a less clunky way? I was wondering If I can create a class which specifies the lin...

JSP login with declarative security - How does the actual authentication happen?

Hi, I've been a little puzzled with this as I have not seen many examples that gave me the complete picture. The best explanation I found so far is this. By defining a security role in web.xml such as "admin" for example, and having my login form with all the necessary fields (i.e j_security_check as action, and fields j_username, j_pa...

Access spring web application context beans in EL expression

I'm new to Spring MVC and have the following situation: In WEB-INF/demoshop-servlet.xml I have the following line: <bean id="someBean" class="com.xxx.xxx.web.SomeBean" /> I also have a JSP that contains a line like: ${someBean.someAttribute} I expected that the attribute is read from the bean when the page is rendered but it's not...