This week's book giveaway is in the Agile and Other Processes forum.
We're giving away four copies of Software Teaming: A Mob Programming, Whole-Team Approach and have Woody Zuill and Kevin Meadows on-line!
See this thread for details.

Mohit

Greenhorn
+ Follow
since Oct 31, 2003
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Mohit

Hi All
I am trying to integrate Apache web server with resin servlet engine.
Everything works fine except struts.
Somehow Apache/Resin doesnt recognise *.do url pattern and when ever i try to acsess http://localhost/test/login.do
it throws me 404 File not found error..
If same application i run in standalone resin server then it works fine..
Though i have added webapplication id in resin.conf but still resin doesnt get this request..
In resin.conf i have added the following lines which tells apache to fwd *.do request to resin which is not happening
<web-app id='/test>
<servlet-mapping url-pattern='/*.do' servlet-name='plugin_match'/>
</web-app>
Does anybody has any idea or has someone got sucess in integration apache + resin + struts..
18 years ago
Hi All
I am trying to integrate Apache web server with resin servlet engine.
Everything works fine except struts.
Somehow Apache/Resin doesnt recognise *.do url pattern and when ever i try to acsess http://localhost/test/login.do
it throws me 404 File not found error..
If same application i run in standalone resin server then it works fine..
Though i have added webapplication id in resin.conf but still resin doesnt get this request..
In resin.conf i have added the following lines which tells apache to fwd *.do request to resin which is not happening
<web-app id='/test>
<servlet-mapping url-pattern='/*.do' servlet-name='plugin_match'/>
</web-app>
Does anybody has any idea or has someone got sucess in integration apache + resin + struts..
18 years ago
Confusion Confusion ....
If you see it practical point of view then ans (a) is the correct ans.
But theoritically its something different..
Hi Mike
Still i am not clear..
If its true then why did i get null pointer exception when i ran that.jsp.
And second thing in static inclusion, jsp engine writes the content of included file into including file and treat the included file seprately.
Thats why in static inclusion even if you change the content of included file and run the jsp page which has included this file will not reflect the changes.
-MOhit
I am not clear with the explanation given for Q12(page 461) in SCWCD kit.
Question is
Consider the following code contained in a file named this.jsp
<jsp:useBean id="address" class="AddressBean" />
<jsp:setProperty name="address" property="*" />
<%@ include file="that.jsp" %>
Which of the following is true about the AddressBean instance declared in the above code
a) The bean instance will not be available in that.jsp.
b) The bean instance may or may not be available in that.jsp, depending on the threading model implemented by that.jsp.
c) The bean instance will be available in that.jsp, and the that.jsp page can print the values of the bean�s properties using <jsp:getProperty />.
d) The bean instance will be available in that.jsp, and the that.jsp page can print the values of the bean�s properties using <jsp:getProperty /> only if that.jsp also contains a <jsp:useBean/> declaration identical to the one in this.jsp and before using <jsp:getProperty/>.
As per my understanding Answer should be option (a). bcoz we have included that.jsp in this.jsp so the bean instance will not be avialable in that.jsp.
But Answer given is (c) and explanation given is
The that.jsp page is included using a directive. Thus, it is a static inclusion, and the two pages form a single translation unit.
I dont understand this. How come we can have the instance of bean avialable in that.jsp file? Scope of bean is page so it wld be avialabe only in this.jsp page and moreover this.jsp has included the that.jsp
so for the translation of this.jsp that.jsp is required
and that.jsp will always get executed independently.
I tried the example and ran that.jsp page i got null pointer exception.
can anybody shed some light on this?
thanks
-MOhit
Here you go ........

package test;
import javax.servlet.*;
import javax.servlet.http.*;
import java.io.*;
import java.util.*;
public class Servlet1 extends HttpServlet {
static final private String CONTENT_TYPE = "text/html";
//Initialize global variables
public void init() throws ServletException {
}
//Process the HTTP Get request
public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
response.setContentType(CONTENT_TYPE);
PrintWriter out = response.getWriter();
out.println("<html>");
out.println("<head><title>Servlet1</title></head>");
out.println("<body>");
out.println("<p>The servlet has received a GET. This is the reply.</p>");
out.println("</body></html>");
out.flush();//explicitly comminting the response
try{
response.sendRedirect("Jsp1.jsp");

}catch(Exception e){
System.out.print(e.toString());
}
}
//Clean up resources
public void destroy() {
}
}