Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Devaka Cooray
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Knute Snortum
  • Junilu Lacar
  • paul wheaton
Saloon Keepers:
  • Ganesh Patekar
  • Frits Walraven
  • Tim Moores
  • Ron McLeod
  • Carey Brown
Bartenders:
  • Stephan van Hulst
  • salvin francis
  • Tim Holloway

Again problem in usebean  RSS feed

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Report post to moderator
Thanx Mr/Miss Ben..
But

hi
i am developing a application in jsp & i am getting an error in tomcat server on using usebean


Error: 500
Location: /krunaljspbeans/beans.jsp
Internal Servlet Error:

org.apache.jasper.JasperException: Unable to load class krunaljspbeans.LanguageBeans




In this,
i create one html->beans.html
in that html i call beans.jsp.

as well as i put those two app,html and jsp in krunaljspbeans package that is in root directiory.ok.

in this jsp i use that usebeans.
that code is:
<html>
<body>

<jsp:useBean id="languageBean" class=" krunaljspbeans.LanguageBeans" />
<jsp:setProperty name="languageBean" property="name" value='<%= request.getParameter("name") %>' />
<p> Hello, <jsp:getProperty name="languageBean" property="name" /><%= LanguageBeans.getName()%></p>
</body>
</html>

and my java class LanguageBeans code is:

package krunaljspbeans;

public class LanguageBeans
{
private String name="unknown";
public String getName()
{
return(name);
}
public void setName(String name)
{
this.name = name;
}
}

i compile that program and put that class in root/webinf/class/krunaljspbeans

after that when i run http://localhost:8080/krunaljspbeans/beans.html
it gives me above error.

so,Plz tell me where i m wrong?
Plz, give me right direction.
Thanx.
 
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Report post to moderator
I put my reply in the Original Thread

Please try not to spread a single conversation among multiple threads.
There is a "Reply" button at the bottom of each thread that you can use to add new posts.
 
    Bookmark Topic Watch Topic
  • New Topic
Boost this thread!