473,507 Members | 5,257 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

getting Request null inside IE

101 New Member
Hi,

I have a very strange problem with my application.
I have developed it using Struts.

I have a TextBox With Some fixed value in it and on Submit iam passing it to another page.
[PHP]<html:form action="/login">

<html:text property="userName" value="Bunty"/>
<html:submit/>
</html:form>[/PHP]

I am printing it's value through Action Class to check what value it is getting..

When I am Running this application in mozilla it is working fine printing the values perfectly.

But when i am running it using IE it is giving blank. It is getting request null.


Please help me in this.....


Struts Config
[PHP]<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE struts-config PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 1.1//EN" "http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd">
<struts-config>

<form-beans>
<form-bean name="loginForm" type="com.some.ikan.form.LoginForm"/>
<form-bean name="questionsForm" type="com.some.ikan.form.QuestionsForm"/>
<form-bean name="answersForm" type="com.some.ikan.form.AnswersForm"/>
<form-bean name="submitForm" type="com.some.ikan.form.SubmitForm"/>
</form-beans>

<!-- ========== Global Exception Definitions ============================== -->
<global-exceptions />

<!-- ========== Global Forward Definitions =============================== -->
<global-forwards />

<!-- ========== Action Mapping Definitions =============================== -->



<action-mappings>
<action
attribute="loginForm"
input="/jsp/index.jsp"
name="loginForm"
scope="session"
path="/login"
type="com.some.ikan.action.LoginAction">
<forward name="answer" path="/jsp/query2.jsp" />
<forward name="question" path="/jsp/query1.jsp" />
<forward name="error" path="/jsp//jsp/error.jsp" />
</action>
<action forward="/jsp/loginOut.jsp"
path="/logout"/>

<action
attribute="questionsForm"
input="/jsp/query1.jsp"
name="questionsForm"
scope="session"
path="/questions"
type="com.some.ikan.action.QuestionsAction">
<forward name="noerror" path="/jsp/questions.jsp" />
</action>
<action
attribute="answersForm"
input="/jsp/query2.jsp"
name="answersForm"
path="/answers"
type="com.some.ikan.action.AnswersAction">
<forward name="noerror" path="/jsp/questionsForAnswererChoice.jsp" />
</action>
<!-- Webeditor Action -->
<action
path="/submit"
type="com.some.ikan.action.WebEditorAction">
<forward name="noerror" path="/jsp/closingpage.jsp" />
<forward name="error" path="/jsp/error.jsp" />
</action>
<!--Editor for answer-->

<action
path="/submitAnswer"
type="com.some.ikan.action.WebEditorForAnswerActio n">
<forward name="noerror" path="/jsp/closingpage1.jsp" />
<forward name="error" path="/jsp/error.jsp" />
</action>
<!--Question Edit Action-->

<action
path="/QuestionEditsubmit"
type="com.some.ikan.action.QuestionEditsubmitActio n">
<forward name="noerror" path="/jsp/otherdetailsforanswererNew.jsp" />
<forward name="error" path="/jsp/error.jsp" />
</action>
<!--Question delete Action-->

<action
path="/deleteAction"
type="com.some.ikan.action.DeleteAction">
<forward name="noerror" path="/jsp/query2.jsp" />
</action>
</action-mappings>

<!-- ========== Controller Configuration ================================ -->
<!-- ========== Message Resources Definitions ============================ -->
<message-resources parameter="com.some.ikan.ResourceBundles.Applicati onResources" />
<!-- ========== Plug Ins Configuration ================================= -->
<plug-in className="Plugin.IkanPlug">
</plug-in>
</struts-config>[/PHP]

LoginAction.java

[PHP]

public class LoginAction extends Action {

// --------------------------------------------------------- Instance Variables

// --------------------------------------------------------- Methods
public static Logger myLogger=Logger.getLogger(LoginAction.class);

public ActionForward execute(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response)
throws Exception {
myLogger.info("entering LoginAction execute");
String next = null;

LoginForm loginForm = (LoginForm) form;

String mUserName = loginForm.getUserName();
//This I am getting Blank Inside IE but works in Mozilla
System.out.println("UserName " + mUserName);
myLogger.info("entering LoginAction execute for user:"+ mUserName);


//String mPassword = loginForm.getPassword();
HttpSession hs = request.getSession();
hs.setAttribute("username", "something");

String queidFromRequest=(String)request.getParameter("que idFromRequest");
String queidfromlink=(String)hs.getAttribute("queidfromli nk");
try
{
String role="none";

if(queidfromlink!=null)
{
if(role.equalsIgnoreCase("Admin"))
response.sendRedirect("/IKANNEW2/jsp/otherdetailsforanswerer.jsp?que_id="+queidfromlink );
else
response.sendRedirect("/IKANNEW2/jsp/otherdetails.jsp?que_id="+queidfromlink);
}
else if(!role.equalsIgnoreCase("none"))
{
next="answer";
}

else
{
next="question";
}
}
catch (Exception e) {
//next = "error";
myLogger.error("Exception",e);
}

myLogger.info("returned from LoginAction with value:"+next);
return mapping.findForward(next);
}
}[/PHP]

ActionForm

[PHP]
public class LoginForm extends ActionForm {

// --------------------------------------------------------- Instance Variables



/**
*
*/
private static final long serialVersionUID = -1281925207517807L;
/**
* userName property
*/
private String userName;



// --------------------------------------------------------- Methods


/**
* Returns the userName.
*
* @return String
*/
public String getUserName() {

return userName;
}

/**
* Method reset
*
* @param mapping mapping
* @param request request
*/
public void reset(ActionMapping mapping, HttpServletRequest request) {

userName = "";

}


/**
* Set the userName.
*
* @param userName The userName to set
*/
public void setUserName(String userName) {
this.userName = userName;
}

}[/PHP]
Dec 19 '07 #1
0 2896

Sign in to post your reply or Sign up for a free account.

Similar topics

2
331
by: Leonard Rutkowski | last post by:
I am using a third party product that requires a reference to a page, Me.Page for example. I would like to use this product in a function, in a vb class, that I am writing. I know that I can pass...
4
1797
by: Larry Tate | last post by:
I am wanting to get those cool html error pages that ms produces when I hit an error in asp.net. For instance, when I get a compilation error I get an html error page that shows me the ...
5
3036
by: Pham Nguyen | last post by:
Hello, Is it appropriate to use the CallContext class for storing request-specific data? I have a set of business objects that I'm building. Each class contains a hashtable that maps from a key...
3
3055
by: Hitesh | last post by:
Hi, I am getting the response from another Website by using the HttpHandler in my current site. I am getting the page but all the images on that page are not appearing only placeholder are...
8
8475
by: bryan | last post by:
Is there any way I can get the application path (the one returned by Request.ApplicationPath) in the Application_Start method in Global.asax? Request is not valid there. On a related note, is there...
3
15048
by: rn5a | last post by:
Server.MapPath returns the physical file path that corresponds to the specified virtual path whereas Request.MapPath maps the specified virtual path to a physical path. Assuming that a file named...
3
9529
by: tshad | last post by:
I have a file that I converted from VB.Net to C# that works fine in VB.Net when I compile but not in C# using the same libraries. The error I am getting is: PageInit.cs(9,7): error CS0138: A...
0
1692
by: =?Utf-8?B?RmFicml6aW8gQ2lwcmlhbmk=?= | last post by:
I need to access classic ASP intrinsic objects and their properties from a ..net assembly wrapped to COM. The COM .net assembly is then instanciated from a classic ASP page with...
1
4899
by: raghuvendra | last post by:
Hi I have a jsp page with 4 columns: namely Category name , Category order, Input field and a submit button. All these are aligned in a row. And Each Category Name has its corresponding Category...
0
7481
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5619
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5039
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4702
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3190
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3179
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1537
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
758
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
411
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.