jsp

Pass page scope attributes to a JSP using pagecontext.include for use in JSTL?

We're using this JSP template solution almost verbatim at work: http://java.sun.com/developer/technicalArticles/javaserverpages/jsp_templates/ When it gets JSP pages to be included, it uses pageContext.include, which leaves us with one problem, and that is that we have a lot of scriplet code that gets initialized in the JSP itself (tag...

How do you access URL text following the # sign through Java?

Using Java (.jsp or whatever) is there a way where I can send a request for this page: http://www.mystore.com/store/shelf.jsp?category=mens#page=2 and have the Java code parse the URL and see the #page=2 and respond accordingly? Basically, I'm looking for the Java code that allows me to access the characters following the hash tag. T...

In what order does DOJO handles ajax requests?

Hi, Using a form in a dialog box I am using Dojo in jsp to save the form in my database. After that request is completed using dojo.xhrPost() I am sending in another request to update a dropdown box that should include the added form object that was just saved, but for some reason the request to update the dropdown is executed before s...

How to create Chat application using Servlets & JSP

I want to create chat application using Servlets & JSP. May I know how can I create chat application as I have never created before? How much knowledge I need to have to create chat application? Is there any need of networking API to create chat application? What's the design pattern I need to follow to create that application? Is...

does Jsp runs under the Servlet code?

if we write a code in jsp that will convert to servlet code and get runs. is it true? your suggestions are more thankful. ...

Evaluate empty or null JSTL c tags

How can I validate a String null or empty using the c tags of JSTL. I have a variable of name var1 and I can display it, but I want to add a comparator for validate it. <c:out value="${var1}" /> I want to validate when is different of null or empty (my values are string). ...

How to get dropdown value using jsp:useBean and jsp:setProperty?

I have a rather simple form in JSP that looks like this: <form action="response.jsp" method="POST"> <label>First Name:</label><input type="text" name="firstName" /><br> <label>Last Name:</label><input type="text" name="lastName" /><br> <label>Email:</label><input ty...

Retrieve JavaBean names associated with JSP or build variable with dynamic name

I am usign a JavaBean in a jsp page. I would like to give it a dynamic name, because depending on the value of a variable (let's call it foo), I want it to have different contents, and I want to keep all of these different versions in memory. I want the beans to have session scope, because reevaluating the contents is expensive. Right ...

JSP request parameter is returning null on a jsp include with Weblogic.

Hello, I am having trouble with the jsp:include tag. I have code like the following: <jsp:include page="./Address.jsp"> <jsp:param value="30" name="tabIndex"/> <jsp:param value="true" name="showBox"/> <jsp:param value="none" name="display"/> </jsp:include> The page is included fine, but when I try to access the parame...

how to get values from a group ofcheckboxes?

Hi everyone, i am trying to get values of checkboxes to insert them later on in database. It is ok that unchecked checkboxes will not be sent to my servlet but the problem that i have when cheking more than one checkboxe it returns just the first I'am doing like that im my JSP: <td><input type=checkbox id=\""+i+"\" name=cbo value=<%=obj...

How to upload an image using JSP -Servlet and EJB 3.0

I want to upload an Image using JSP Servlet and ejb 3.0 ...

Getting a java collection of objects in Alphabetical order

I have a question that I dont really know where to start. So I thought i'd ask it here. Basically, I have a drop down with names in it. I want these names to be in alphabetical order. Populating the drop down happens as follows; I query a database and pull down an Id and Name, make a object called "UserList", and set the name and id v...

Return tiff file from outputstream on JSP

I am using a JSP to display a single TIFF file. The flow is as follows: I am given a PDF to convert to a TIFF. I feed a 'black box' API the PDF in the form of a File object and an OutputStream (I am currently using a ByteArrayOutputStream but that can change as needed. The 'black box' converts the PDF to a TIFF and saves the result to...

Getting the path name of a page who inserts a Struts tile from the inserted Struts tile

Hi! I've got a JSP which inserts a Struts tile, which is another JSP. Now I want to get from inside the inserted Struts tile the (path) name of the JSP which inserted that tile. I want to get the (path) name of the "uber" or "parent" JSP. If it is, in which way is this doable? ...

Refreshing a single component in a JSP page

Can I refresh a HTML component in JSP? I have two dropdowns. On selection of a value in the first dropdown the values in the dropdown box are to be fetched from the database. Is this possible using JSP? ...

Redirect into two different page after login.jsp according user category

I have created a login.jsp with some login username and password. Users are categorized into A and B. Then I have to redirect each user according to the user category. I also need to retrieve the username in the next page. My form in login.jsp page is something like this: <form method="POST" action='<%= response.encodeURL("j_security_ch...

JSP functions - How to declare long as parameter in TLD

I'm getting an error WARNING: Method "pl" for function "pl" not found, I think its because I'm not declaring the parameters right. <function-signature>java.lang.String pl(java.lang.Long, java.lang.String)</function-signature> is what I have in the TLD. and: public static String pl(long num, String str) is what I have in the .java fil...

Java: help me convert a working .jsp to some XML notation

I've got a .jsp file that is working fine. It's maybe a bit special in that it is calling a factory (ArticlesFactory) that returns a singleton (but that is a detail) of class Articles (it does so by automatically fetching shared Google Docs that are transformed to html and then stored into ".../text/en" but that is a detail too). The f...

How to read in the XML file on a remote website using JSP?

Hi, I'm using java servlets and jsp in my application and I need to read the remote XML file and properly render it into HTML and display on a web page...What is the technology used for reading process?Should I use HTTPURLConnection class to read the contents of the xml file or there is some other way? And also,if I use servlet as a con...

To know whether a web page is built using PHP, JSP, ASP.NET, or other technologies

Hi, I often come across some nice web sites and I want to know what technologies (PHP, JSP, ASP.NET, etc) are used to build those web sites. The web address of some web sites end with ".aspx", ".php", ".jsp", etc. But some web address do not contains any indicators. Is there any systematic way we can use to know the technologies used ...