- This topic has 19 replies, 3 voices, and was last updated 19 years, 7 months ago by
jposthum.
-
AuthorPosts
-
jposthumMemberHi,
Im new to myeclipse and to the Sun application server. I tried to search for the same problem in the forums but couldnt find anything. I think its a little stupid detail Im doing wrong.
When I deploy the StrutsDemo according to the tutorial and start the Sun server, I receive lots of errors. I dont receive errors when I haven’t deployed any project.
my Os is windows proffessional service pack II
I use eclipse 3.1.1
myeclipse 4.0.3 GAFirst I enable the server via menu window-> preferences
Home directory: C:\Sun\AppServer
Configuration directory: C:\Sun\AppServer\config
Server name: server
Domain Name: domain1
domain directory C:\Sun\AppServer\domains\domain1
I set the radio button to ‘enable’
I set the jdk to my full java SDK directoryWhen I start the server right now without any projects deployed everthing goes fine.
When I deploy my application I receive errors
My Eclipse project home is on my D: partition
When I deploy the StrutsDemo project I select
Sun Java Application Server Edition 8.1
I select Explode archive
The deploy location is automatically set to “C:\Sun\AppServer\domains\domain1\autodeploy\StrutsDemo” This I cant change because its greyed out
When I press finish it says ‘successfully deployed’Then I start the Sun server
http://localhost:8080/StrutsDemo/form/login.jsp gives the standard error: “description The requested resource (/StrutsDemo/form/login.jsp) is not available.”When I shutdown the server, copy the StrutDemo to the docroot directory where the default index.html file is also located and restart the server I once again type
http://localhost:8080/StrutsDemo/form/login.jsp
This time my browser says: org.apache.jasper.JasperException: The absolute uri: http://jakarta.apache.org/struts/tags-bean cannot be resolved in either web.xml or the jar files deployed with this applicationDo I need to configure a file I didnt think of?
Please help?November 15, 2005 at 8:18 am #241514
Riyad KallaMemberJust to clarify, from your example it looks like the app server is running just fine, it’s when you try and access the app you are getting errors and exceptions, right?
Is this Struts project a new project you created? Does it contain a struts.jar file in it’s WEB-INF/lib directory?
Are you using Struts 1.2? If you are, then your URIs for your taglibs are wrong, you need to change them to: http://struts.apache.org/<whatever>, where <whatever> means tags-beans, tags-html, etc.
November 15, 2005 at 1:25 pm #241544
jposthumMemberThanks for the quick help. I checked. I do use struts 1.2 so I changed the URI’s
Next to that I also checked if I have the struts.jar in the WEB-INF/lib directory.
After doing so I retryed and I god the following error:
org.apache.jasper.JasperException: The absolute uri: http://struts.apache.org/tags-bean cannot be resolved in either web.xml or the jar files deployed with this application
Do I need to edit the domain.xml file in the sun server?November 15, 2005 at 1:29 pm #241546
Riyad KallaMemberIs this a Web Project? (if you open up your project properties, you have a MyEclipse-Web preference panel)?
November 15, 2005 at 7:03 pm #241562
jposthumMemberYes it is a web project. I posted the entire error. I hope you recognize this error. It occurs when I call http://localhost:8080/StrutsDemo/form/login.jsp
Do I need to set a CLASSPATH environment variable?org.apache.jasper.JasperException: The absolute uri: http://struts.apache.org/tags-bean cannot be resolved in either web.xml or the jar files deployed with this application
org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:54)
org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:416)
org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:123)
org.apache.jasper.compiler.TagLibraryInfoImpl.generateTLDLocation(TagLibraryInfoImpl.java:320)
org.apache.jasper.compiler.TagLibraryInfoImpl.(TagLibraryInfoImpl.java:152)
org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:423)
org.apache.jasper.compiler.Parser.parseDirective(Parser.java:488)
org.apache.jasper.compiler.Parser.parseElements(Parser.java:1544)
org.apache.jasper.compiler.Parser.parse(Parser.java:131)
org.apache.jasper.compiler.ParserController.doParse(ParserController.java:216)
org.apache.jasper.compiler.ParserController.parse(ParserController.java:105)
org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:214)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:487)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:468)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:456)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:516)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:307)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:251)
javax.servlet.http.HttpServlet.service(HttpServlet.java:860)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
java.lang.reflect.Method.invoke(Method.java:585)
org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:249)
java.security.AccessController.doPrivileged(Native Method)
javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:282)
org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:165)November 15, 2005 at 9:07 pm #241568
Scott AndersonParticipantCan you try opening up the struts.jar in your WEB-INF/lib directory and opent META-INF/tlds/tags-bean.tld. What is the URI shown for the library? Does it match what you’ve specified in your JSP page?
November 16, 2005 at 1:32 am #241580
jposthumMemberthe name is: struts-bean-1.1.tld
When I open it it displays:<?xml version=”1.0″ encoding=”UTF-8″?>
<!DOCTYPE taglib PUBLIC “-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.1//EN” “http://java.sun.com/j2ee/dtds/web-jsptaglibrary_1_1.dtd”>
<taglib>
<tlibversion>1.2</tlibversion>
<jspversion>1.1</jspversion>
<shortname>bean</shortname>
<uri>http://jakarta.apache.org/struts/tags-bean</uri>
<tag>
<name>cookie</name>
<tagclass>org.apache.struts.taglib.bean.CookieTag</tagclass>
<teiclass>org.apache.struts.taglib.bean.CookieTei</teiclass>
<bodycontent>empty</bodycontent>
<attribute>
<name>id</name>
<required>true</required>
<rtexprvalue>false</rtexprvalue>
</attribute>
<attribute>
<name>multiple</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<name>name</name>
<required>true</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<name>value</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
</tag>
<tag>
<name>define</name>
<tagclass>org.apache.struts.taglib.bean.DefineTag</tagclass>
<teiclass>org.apache.struts.taglib.bean.DefineTei</teiclass>
<bodycontent>JSP</bodycontent>
<attribute>
<name>id</name>
<required>true</required>
<rtexprvalue>false</rtexprvalue>
</attribute>
<attribute>
<name>name</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<name>property</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<name>scope</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<name>toScope</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<name>type</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<name>value</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
</tag>
<tag>
<name>header</name>
<tagclass>org.apache.struts.taglib.bean.HeaderTag</tagclass>
<teiclass>org.apache.struts.taglib.bean.HeaderTei</teiclass>
<bodycontent>empty</bodycontent>
<attribute>
<name>id</name>
<required>true</required>
<rtexprvalue>false</rtexprvalue>
</attribute>
<attribute>
<name>multiple</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<name>name</name>
<required>true</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<name>value</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
</tag>
<tag>
<name>include</name>
<tagclass>org.apache.struts.taglib.bean.IncludeTag</tagclass>
<teiclass>org.apache.struts.taglib.bean.IncludeTei</teiclass>
<bodycontent>empty</bodycontent>
<attribute>
<name>anchor</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<name>forward</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<name>href</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<name>id</name>
<required>true</required>
<rtexprvalue>false</rtexprvalue>
</attribute>
<attribute>
<name>name</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<name>page</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<name>transaction</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
</tag>
<tag>
<name>message</name>
<tagclass>org.apache.struts.taglib.bean.MessageTag</tagclass>
<bodycontent>empty</bodycontent>
<attribute>
<name>arg0</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<name>arg1</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<name>arg2</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<name>arg3</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<name>arg4</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<name>bundle</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<name>key</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<name>locale</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<name>name</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<name>property</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<name>scope</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
</tag>
<tag>
<name>page</name>
<tagclass>org.apache.struts.taglib.bean.PageTag</tagclass>
<teiclass>org.apache.struts.taglib.bean.PageTei</teiclass>
<bodycontent>empty</bodycontent>
<attribute>
<name>id</name>
<required>true</required>
<rtexprvalue>false</rtexprvalue>
</attribute>
<attribute>
<name>property</name>
<required>true</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
</tag>
<tag>
<name>parameter</name>
<tagclass>org.apache.struts.taglib.bean.ParameterTag</tagclass>
<teiclass>org.apache.struts.taglib.bean.ParameterTei</teiclass>
<bodycontent>empty</bodycontent>
<attribute>
<name>id</name>
<required>true</required>
<rtexprvalue>false</rtexprvalue>
</attribute>
<attribute>
<name>multiple</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<name>name</name>
<required>true</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<name>value</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
</tag>
<tag>
<name>resource</name>
<tagclass>org.apache.struts.taglib.bean.ResourceTag</tagclass>
<teiclass>org.apache.struts.taglib.bean.ResourceTei</teiclass>
<bodycontent>empty</bodycontent>
<attribute>
<name>id</name>
<required>true</required>
<rtexprvalue>false</rtexprvalue>
</attribute>
<attribute>
<name>input</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<name>name</name>
<required>true</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
</tag>
<tag>
<name>size</name>
<tagclass>org.apache.struts.taglib.bean.SizeTag</tagclass>
<teiclass>org.apache.struts.taglib.bean.SizeTei</teiclass>
<bodycontent>empty</bodycontent>
<attribute>
<name>collection</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<name>id</name>
<required>true</required>
<rtexprvalue>false</rtexprvalue>
</attribute>
<attribute>
<name>name</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<name>property</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<name>scope</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
</tag>
<tag>
<name>struts</name>
<tagclass>org.apache.struts.taglib.bean.StrutsTag</tagclass>
<teiclass>org.apache.struts.taglib.bean.StrutsTei</teiclass>
<bodycontent>empty</bodycontent>
<attribute>
<name>id</name>
<required>true</required>
<rtexprvalue>false</rtexprvalue>
</attribute>
<attribute>
<name>formBean</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<name>forward</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<name>mapping</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
</tag>
<tag>
<name>write</name>
<tagclass>org.apache.struts.taglib.bean.WriteTag</tagclass>
<bodycontent>empty</bodycontent>
<attribute>
<name>bundle</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<name>filter</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<name>format</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<name>formatKey</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<name>ignore</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<name>locale</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<name>name</name>
<required>true</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<name>property</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<name>scope</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
</tag>
</taglib>November 16, 2005 at 1:34 am #241581
jposthumMemberThe name says 1.1 but when I chose the version when I added struts capabilities to my project I selected 1.2
Can it be that the Sun application server doesnt support 1.2?November 16, 2005 at 8:22 am #241597
Riyad KallaMemberThere should be two TLDs, struts-beans.tld (1.2) and struts-beans-1.1.tld (1.1)
Do you have any <taglib> entries in your web.xml file? If so, please paste them in here.
Can it be that the Sun application server doesnt support 1.2?
This shouldn’t be a problem.
November 16, 2005 at 12:58 pm #241647
jposthumMemberThanks for sticking with me on my problem.
I checked: and There are two TLDs, struts-beans.tld and struts-beans-1.1.tld
Do I need to set an environment variable to this lib folder?Below the code of my web.xml
<?xml version=”1.0″ encoding=”UTF-8″?>
<web-app xmlns=”http://java.sun.com/xml/ns/j2ee” xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance” version=”2.4″ xsi:schemaLocation=”http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd”>
<servlet>
<servlet-name>action</servlet-name>
<servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
<init-param>
<param-name>config</param-name>
<param-value>/WEB-INF/struts-config.xml</param-value>
</init-param>
<init-param>
<param-name>debug</param-name>
<param-value>3</param-value>
</init-param>
<init-param>
<param-name>detail</param-name>
<param-value>3</param-value>
</init-param>
<load-on-startup>0</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>action</servlet-name>
<url-pattern>*.do</url-pattern>
</servlet-mapping>
</web-app>November 16, 2005 at 2:29 pm #241658
Riyad KallaMemberOk all of this looks fine, no you don’t need an environment… can you do me a favor and shut down your app server, remove your deployment from your app server and then restart it and see if you still get the error? From what you’ve told me your projects looks fine, which makes me think the error is comming from somewhere else.
November 17, 2005 at 3:33 am #241693
jposthumMemberAgain… thanks for the help
I did what you said, this didnt make any difference.If I type http://localhost:8080/StrutsDemo/form/success.jsp instead of login.jsp I see in my browser:
“Hello null” (should be username)
So this looks good.But then I tried something different. I deployed my project as a packaged .war archive instead of an exploded archive. Then I started the server. Then while the server is starting (in debug mode btw) a class editor window pops up saying its missing ‘rt.jar’.
I neglected this window and opened my browser. ‘http://localhost:8080/StrutsDemo/form/login.jsp’ now seemed to work fine. I filled the textfield and pushed the submit button. THen I saw the success page.This all seems like it does work somehow, but something is buggin. I still like to deploy my project in exploded mode.
I hope that any of the above makes sense to you.November 17, 2005 at 3:37 am #241695
jposthumMember(Extra information)
I searched for rt.jar on my computer and found it 3 times.java sdk folder,
jre folder,
sun folder.When I manually added any of these folders to the “class editor” it said it didnt fount the correct class.
November 17, 2005 at 8:26 am #241699
Riyad KallaMemberDo me a favor, export your project to a ZIP and email it to me: support@genuitec.com ATTN Riyad, with a link to this thread so I know why I’m getting it. I have a feeling we are spinning in circles here because of some tiny little config issue.
November 17, 2005 at 5:24 pm #241751
jposthumMemberHi,
I just send you an email with my zipped project, and also my zipped domain from my application server.
Thanks
-
AuthorPosts