This week's book giveaway is in the Jython/Python forum.
We're giving away four copies of Murach's Python Programming and have Michael Urban and Joel Murach on-line!
See this thread for details.
Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

problem deploying a bean in tomcat  RSS feed

 
mudassir shahab
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
  • 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
 
Craig Jackson
Ranch Hand
Posts: 405
  • Mark post as helpful
  • send pies
  • 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
  • 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
 
R K Singh
Ranch Hand
Posts: 5390
1
Java Spring
  • Mark post as helpful
  • send pies
  • 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
  • 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
  • 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
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!