• Post Reply 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

problem deploying a bean in tomcat

 
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
plz help me !!

i am trying to deploy a Bean using jsp in tomcat..
the problem is when i access that jsp on the
browser (in which i have accessed the bean) ,it shows
the contents of the jsp on the browser, not its
result.. i have tried my best but failed...
plz help me and let me know all the possible errors
i have saved jsp in webapps/examples/jsp folder
and bean in a self created folder in classes folder
through the command javac -d . testBean.java
waiting for ur reply
thank u
Mudassir
 
Ranch Hand
Posts: 405
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Based on the limited information you provided, I guess the most obvious question to get out of the way is ... are you importing the bean in your jsp code? Such as:

Where the java class is located in the web-inf\classes\time\beans folder in your web archive.
If you can provide some code samples, we can better help you solve your issue.
Craig.
 
mudassir shahab
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thanx buddy ...the problem is still there...this time i wrote the statement <%@ page import="com.pk.operation.testbean" %> which i was missing
but this time browser shows internal servlet error..i am providing u the full info ..plz check it out..
bean which is in classes/com/pk/operation folder
package com.pk.operation;
public class testbean
{ private String i="dummy";
public testbean()
{
}
public String getValue()
{
return i;
}
public void setValue(String i)
{
this.i=i;
}
}
-----------------------
and the jsp page :
<HTML>
<BODY>
<%@ page import="com.pk.operation.testbean" %>
<jsp:useBean id="test" scope="session" class="com.pk.operation.testbean" />
<jsp:setProperty name="test"
property="Value"
value="Hello WWW" />

<jsp:getProperty name="test" property="Value" />

</BODY>
</HTML>
---------------------------------
i am using tomcat 3 in windows xp
waiting for ur reply
 
Ranch Hand
Posts: 5399
1
Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Try with
<jsp:setProperty name="test"
property="value"
value="Hello WWW" />
Note the small 'V' in property attribute.
BTW what error its displaying ??
 
Craig Jackson
Ranch Hand
Posts: 405
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I agree change the property value in the jsp:setProperty and jsp:getProperty elements to lowercase and you should be okay. That should hopefully eliminate your internal server error message.
Craig.
 
mudassir shahab
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thanks once again chaps..it is know fine with that lowwer case "value" substitution..but another problem has occured...once the value has been shown on the browser via the bean get property it is not changing if now i am trying to change its value ( that is the browser is not interacting with the bean...)
plz if u know which version of internet explorer or any other suitable browser for j2ee technologies together with the OS is compatible ..plz let me know..u have solved my two problems but third has occured..
waiting for ur reply
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic