• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

configuration of Weblogic server for JSP

 
Ravinder S Edhan
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 11914
209
C++ Firefox Browser IntelliJ IDE Java Mac Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Ashish Pagare
Ranch Hand
Posts: 101
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic