Mikael Göransson writes:
On Sun, 08 Dec 2002 09:49:58 -0500
"David Brown" <[EMAIL PROTECTED]> wrote:
Mikael Göransson writes:
> On Sun, 08 Dec 2002 09:23:56 -0500
> "David Brown" <[EMAIL PROTECTED]> wrote: > >> Mikael Göransson writes: >> >> > hey, >> > >> > it seems like i can't run my javabeans.
>> > i'm using tomcat 4.1.12 binary distrubtion. >> > >> > i get the error "cannot resolve symbol". >> > >> > and i have no idea what it could be, it's just
>> > a simple bean: >> > >> > public class JellyBean implements java.io.Serializable {
>> > private String color;
>> >
>> > public JellyBean() {
>> > }
>> >
>> > public String getColor() {
>> > return color;
>> > }
>> >
>> > public void setColor(String newColor) {
>> > color = newColor;
>> > }
>> > } >> > >> > >> > -- >> > _ _ . | _ _ | [EMAIL PROTECTED]
>> > | )( | | |< (_| (-` | http://micke.debinary.net
>> > >> > >> > --
>> > To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
>> > For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> >> > >> >> Hello Mikael, what is ur overall environment/system?: running apache?, iis? >> r u running any jsp or servlet? do u have a webapp that gets expanded from a >> .war. if so, what? i have many "javabean" class files in directories that >> branch off at the same point as my servlets under WEB-INF after expansion of >> my .war and using the full package "import" i can access all constructors >> and methods. someone on this ml can help u but pls reply w/ what u r trying >> to do and what errors/exceptions u r logging. thanx, david. >> >> >> --
>> To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
>> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> >> >> > > atm i'm running tomcat as standalone on linux/slackware 8.1 and i'm not using
> a webapp that expands from a .war file. > > my servlets and jsp code workes fine, it's just when i try to implement my
> javabeans in jsp code i get the error (cannot resolve symbol). > > this is the code in the jsp page:
> <jsp:useBean id="jb" scope="session" class="JellyBean" />
> <jsp:setProperty name="jb" property="color" param="newColor" />
> <b>The color has been set to:</b> <jsp:getProperty name="jb" property="color" /><p> > > and the javabean code (again):
> public class JellyBean implements java.io.Serializable {
> private String color;
>
> public JellyBean() {
> }
>
> public String getColor() {
> return color;
> }
>
> public void setColor(String newColor) {
> color = newColor;
> }
> } > > and the first error:
> org.apache.jasper.JasperException: Unable to compile class for JSP > > An error occurred at line: 7 in the jsp file: /setbeancolor.jsp > > Generated servlet error:
> [javac] Compiling 1 source file > > /usr/program/tomcat4/work/Standalone/localhost/_/setbeancolor_jsp.java:48: cannot resolve symbol
> symbol : class JellyBean > location: class org.apache.jsp.setbeancolor_jsp
> JellyBean jb = null;
> ^ > > i appreciate any help > > > -- > _ _ . | _ _ | [EMAIL PROTECTED]
> | )( | | |< (_| (-` | http://micke.debinary.net
> > > --
> To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> >

Hello Mikael, if i read u right u mean no WEB-INF? w/o this very special directory some of tc scope has been chopped off. how, do u get the jsp/servlet to work? how do u have docbase defined in ur server.xml? tc needs docbase to know where to look in the directory hierarcy. also, i assume u r not using a web.xml? u have a very unusual environment. can u send any inkling of ur directory hierarchy? say, something like: $CATALINA_HOME/<what?>... thanx, david.
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

i got a WEB-INF and a web.xml, and the javabean class is located in
$CATALINA_HOME/webapps/ROOT/WEB-INF/classes
and my working servlets classes are located in
$CATALINA_HOME/webapps/ROOT/WEB-INF/classes
and the jsp source files in
$CATALINA_HOME/webapps/ROOT

--
_ _ . | _ _ | [EMAIL PROTECTED]
| )( | | |< (_| (-` | http://micke.debinary.net

--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>


Hello Mikael, u r using the docBase=ROOT i assume uncommented in server.xml. though this is ok it is unadvisable. for a much more satisfying development environment u should seriously consider doing things the way the tc gurus have generated the .war for the /examples webapp. if u r familiar w/ the ant build development tool then u r on ur way just study the build.xml file the /examples webapp and make a modified version 4 ur own webapps. in case u r not familiar w/ ant the go back to jakarta-tomcat.org and study what they have to say about building a rock solid development system. by the way this works me and i have used many "ide's" and contrived development systems that try to hide the xml config in the servlet server/j2ee development environment. the java/j2ee world has really been very well thought out and any project can be developed using just four files: build.xml, .ear, .war, and .jar. hope this helps, david.
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to