Server-Side Development Section Index | Page 6
How can I create a protected, "restricted" website? I.e., where someone can only access the site by e.g., entering a password.
Normally web servers have their own protection system already in place. If you are running Apache, for example, or anothe NCSA compliant web server, you can rely on the standard basic authenticati...more
I need to find out how to transform a xml document and save the results using JSP. The JSP will request the source documents of the xml and xsl from a form (ie file already exist on the server) and the JSP would save the results to a file on the server. I can achieve this though a GUI and applying the templates and saving the results to a file bit the same code doesn't work with the JSP. I am using the Java API for xml woth Xalan XSLT processor.
Transformer class will take source and write the results to StreamResult which take Writer object as a parameter on one of the constructors. So you can use the Transformer, create DOMSource from y...more
Here are some links: An official white paper about EJB performance: http://developer.java.sun.com/developer/technicalArticles/ebeans/ejbperformance/ http://www.jdance.com/ejbperformance.shtm has s...more
You can retrieve any HTTP header information (including User-Agent) through the request object. The following scriptlet should return browser information: <%=request.getHeader("User-Agent...more
I am using a response.sendRedirect(response.encodeRedirectURL(page)) in a custom tag. As far as I know this should cause the browser to redirect to the page specified. However, instead of redirec...more
How can I use the the result of isValid() method of TagExtraInfo class in my application to validate the attributes of a custom jsp tag since my tag class and the class which extends TagExtraInfo are different classes?
The isValid() method of the TagExtraInfo class is called by the JSP engine before your custom tag is executed, i.e. before the doStartTag() method is called. The current values of the attributes a...more
I have an html page which is used to submit data into a jsp page. This jsp page invokes a bean, which may take a lot of time to execute. I need to show an intermediate page which says "executing bean", while the bean is being executed. How can I do this?
In a recent project, I did the following: * file entry.jsp contains a form. The form accepts user input and contains two hidden fields "nextURLDelay" (value 5) and "nextURL"...more
I have a system developed in Power Builder. Now my requirement is to make it web enabled and I don't want to rewrite the buisness logic already written in Power Builder. So how can I use Power Builder object in my application written in Java using CORBA as midlle tier? Is it possible?
I have a system developed in Power Builder. Now my... I have a system developed in Power Builder. Now my requirement is to make it web enabled and I don't want to rewrite the buisness logic already...more
Is it possible to pass a JDBC connection object from client to server? Both are written in Java.
You can set the content type of your message like: msg.setContent(message,"text/html;charset="UTF-8"");
When using com.oreilly.servlet.MultipartRequest to upload files, I get a java.io.UnsupportedEncodingException: ISO-8859-1 -- What's up?
The problem is not come out as improper META tag of html. becasuse java is providing the ISO-8859-1 encoding standard. the problem source is com.oreilly package. i look inside the source and i rea...more
As many other guru have already told you, there is no way to do that with Servlets 2.2. Previously there were two methods, but they both have been deprecated and they return null. The new Servlet...more
I don't know anything about JRun, but I think that you can use any external profiler tools like the one mentioned in this answer: http://www.jguru.com/faq/viewquestion.jsp?EID=407939. I personally...more
Entity Beans with no primary keys. Is it possible to create an Entity Bean(CMP) based on table that does not have a primary key.
Entity Beans with no primary keys Is it possible to create an Entity Bean(CMP) based on table that does not have a primary key.
Can someone please give me a very simple but comprehensive description of using the Tag Extra Info classes for Tag Handlers?
As a brief description we can say that javax.servlet.jsp.tagext.TagExtraInfo it's a very handy class that allows a Tag to provide scripting variables that can be used outside the tag class and ins...more