This week's book giveaway is in the Mac OS forum.
We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line!
See this thread for details.
The moose likes BEA/Weblogic and the fly likes configuration of Weblogic server for JSP Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Products » BEA/Weblogic
Bookmark "configuration of Weblogic server for JSP" Watch "configuration of Weblogic server for JSP" New topic
Author

configuration of Weblogic server for JSP

Ravinder S Edhan
Ranch Hand

Joined: Dec 15, 2003
Posts: 57
Hi Everybody...
I'm having weblogic server installed in my system. I'm trying to run <jsp:useBean> but it is giving me error while running my jsp.. Error is --- Cannot resolve symbol.
Is this problem due to ..that my server is not configured or some other problem.
I had placed my class file in [classes] folder under [WEB-INF] folder. My jsp file which I'm calling from an HTML page is placed under [DefaultWebApp] folder.
for ur reference here are three file
1. html
2.jsp &
3. java file
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE>Session Learning</TITLE>
</HEAD>
<BODY>
<FORM METHOD=POST ACTION="saveName.jsp">
Enter name : <INPUT TYPE="text" NAME="username"><BR>
Enter e-mail : <INPUT TYPE="test" NAME="emil">@edhan.com<br>
Enter age : <INPUT TYPE="TEXT" NAME="age">
<BR><INPUT TYPE="submit" VALUE="Enter">
</FORM>
</BODY>
</HTML>
-----------------------
<%@ page language="java" %>
<%@ page import ="java.util.*" %>
<jsp:useBean id="user" class="userData" scope="session"/>
<jsp:setProperty name="user" property="*"/>
<HTML>
<BODY>
Hello,
<%= user.getName() %>
<%= user.getEmail() %>
<%= user.getAge() %>
</BODY>
</HTML>
------------------------------
public class userData {
String name;
String email;
int age;
public void setName(String mname) {
name=mname;
}
public void setEmail(String memail) {
email=memail;
}
public void setAge(int mage) {
age=mage;
}
public String getName() { return name; }
public String getEmail() { return email; }
public int getAge() { return age; }
}
------
Please help me out.....
Thanx
[ December 19, 2003: Message edited by: Ravinder S Edhan ]
Andrew Monkhouse
author and jackaroo
Marshal Commander

Joined: Mar 28, 2003
Posts: 11465
    
  94

Hi Ravinder,
Welcome to JavaRanch.
The SCEA forum is for people to discuss the Sun Certified Enterprise Architect exams and assignments.
A better place for your question would be the BEA/Weblogic forum. I have therefore moved your post there.
Regards, Andrew


The Sun Certified Java Developer Exam with J2SE 5: paper version from Amazon, PDF from Apress, Online reference: Books 24x7 Personal blog
Ashish Pagare
Ranch Hand

Joined: Oct 14, 2003
Posts: 101
Hi Ravinder,
Make following changes:
1. What you are missing is a import statement for your javabean class in the jsp page. This is the root cause for the "cannot resolve symbol issue.

2. Change the Form element in your html to this. Observe that I have made some minor changes in the Input element for email field to match it with the javabean property.

3. Add a no argument constructor in your javabean class.
I simulated your issue on my machine and everything looks fine after changes. Let me know if you face any issues.
 
GeeCON Prague 2014
 
subject: configuration of Weblogic server for JSP